{"version":3,"file":"CursorPalmer.CL_PY9hl.mjs","names":[],"sources":["https:/framerusercontent.com/modules/mVfSmjwzxZ4Ith5ua5JD/tuxUOyHA8JqQNuUdGlI6/CursorPalmer.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";/**\n * PalmerCursor — Inverting cursor + \"View\" pill\n *\n * DEFAULT: A circle that inverts colors beneath it\n * (white text becomes black, etc.) using mix-blend-mode: difference.\n *\n * ON CARDS tagged with data-cursor=\"view\":\n * The circle morphs into a solid black pill with \"VIEW\" text.\n *\n * HOW TO APPLY:\n *   1. Select the page frame in Framer\n *   2. Right sidebar > Code Overrides\n *   3. File: CursorPalmer > Override: PalmerCursor\n *\n * HOW TO TAG PROJECT CARDS:\n *   Select the card\n *   Right sidebar > Attributes > add:\n *     Name: data-cursor    Value: view\n *   Optional:\n *     Name: data-cursor-label    Value: Open\n */export function PalmerCursor(Component){return props=>{useEffect(()=>{if(typeof window===\"undefined\")return;if(window.matchMedia(\"(hover: none)\").matches)return;// ——— config ———\nconst DEFAULT_SIZE=16;const PILL_WIDTH=88;const PILL_HEIGHT=40;const SMOOTHING=.5;const LABEL_DEFAULT=\"VIEW\";const PILL_BG=\"#121111\";const PILL_TEXT=\"#FFFFFF\";const FONT=\"'Inter Display','Inter',-apple-system,BlinkMacSystemFont,system-ui,sans-serif\";// Hide OS cursor globally\nconst hideStyle=document.createElement(\"style\");hideStyle.id=\"palmer-cursor-hide\";hideStyle.textContent=`\n                html, body, *, *::before, *::after { cursor: none !important; }\n            `;document.head.appendChild(hideStyle);// Inverting circle (white + difference blend)\nconst invertLayer=document.createElement(\"div\");invertLayer.id=\"palmer-invert\";invertLayer.style.cssText=`\n                position: fixed;\n                top: 0;\n                left: 0;\n                z-index: 2147483646;\n                pointer-events: none;\n                width: ${DEFAULT_SIZE}px;\n                height: ${DEFAULT_SIZE}px;\n                border-radius: 999px;\n                background: #FFFFFF;\n                mix-blend-mode: difference;\n                transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);\n                transition:\n                    width 260ms cubic-bezier(0.22, 1, 0.36, 1),\n                    height 260ms cubic-bezier(0.22, 1, 0.36, 1),\n                    opacity 180ms ease;\n                opacity: 1;\n                will-change: transform, width, height;\n            `;document.body.appendChild(invertLayer);// \"VIEW\" pill (shown on tagged cards)\nconst pill=document.createElement(\"div\");pill.id=\"palmer-pill\";pill.style.cssText=`\n                position: fixed;\n                top: 0;\n                left: 0;\n                z-index: 2147483647;\n                pointer-events: none;\n                width: ${PILL_WIDTH}px;\n                height: ${PILL_HEIGHT}px;\n                border-radius: 999px;\n                background: ${PILL_BG};\n                color: ${PILL_TEXT};\n                display: flex;\n                align-items: center;\n                justify-content: center;\n                font-family: ${FONT};\n                font-size: 13px;\n                font-weight: 600;\n                letter-spacing: 0.08em;\n                text-transform: uppercase;\n                white-space: nowrap;\n                transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%) scale(0.6);\n                transition:\n                    opacity 220ms ease,\n                    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);\n                opacity: 0;\n                will-change: transform, opacity;\n            `;pill.textContent=LABEL_DEFAULT;document.body.appendChild(pill);let mouseX=-100;let mouseY=-100;let posX=-100;let posY=-100;let rafId=0;let currentState=\"default\";let currentLabel=LABEL_DEFAULT;const applyState=(next,nextLabel=LABEL_DEFAULT)=>{if(next===currentState&&nextLabel===currentLabel)return;currentState=next;currentLabel=nextLabel;if(next===\"hidden\"){invertLayer.style.opacity=\"0\";pill.style.opacity=\"0\";return;}if(next===\"view\"){invertLayer.style.opacity=\"0\";pill.textContent=nextLabel;pill.style.opacity=\"1\";}else{invertLayer.style.opacity=\"1\";pill.style.opacity=\"0\";}};const readIntent=el=>{if(!el){applyState(\"default\");return;}const tagged=el.closest?.(\"[data-cursor]\");if(tagged){const intent=tagged.getAttribute(\"data-cursor\")||\"default\";if(intent===\"view\"){const customLabel=tagged.getAttribute(\"data-cursor-label\")||LABEL_DEFAULT;applyState(\"view\",customLabel);return;}if(intent===\"hidden\"){applyState(\"hidden\");return;}}applyState(\"default\");};const onMove=e=>{mouseX=e.clientX;mouseY=e.clientY;readIntent(document.elementFromPoint(e.clientX,e.clientY));};const onLeave=()=>applyState(\"hidden\");const onEnter=()=>applyState(\"default\");window.addEventListener(\"mousemove\",onMove,{passive:true});document.addEventListener(\"mouseleave\",onLeave);document.addEventListener(\"mouseenter\",onEnter);const tick=()=>{posX+=(mouseX-posX)*SMOOTHING;posY+=(mouseY-posY)*SMOOTHING;invertLayer.style.transform=`translate3d(${posX}px, ${posY}px, 0) translate(-50%, -50%)`;const pillScale=currentState===\"view\"?1:.6;pill.style.transform=`translate3d(${posX}px, ${posY}px, 0) translate(-50%, -50%) scale(${pillScale})`;rafId=requestAnimationFrame(tick);};rafId=requestAnimationFrame(tick);return()=>{cancelAnimationFrame(rafId);window.removeEventListener(\"mousemove\",onMove);document.removeEventListener(\"mouseleave\",onLeave);document.removeEventListener(\"mouseenter\",onEnter);invertLayer.remove();pill.remove();hideStyle.remove();};},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"PalmerCursor\":{\"type\":\"reactHoc\",\"name\":\"PalmerCursor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CursorPalmer.map"],"mappings":"2HAoBG,SAAgB,EAAa,EAAU,CAAC,MAAO,KAAQ,MAAc,CAAuC,GAA5B,IAAS,QAAsB,EAAO,WAAW,gBAAgB,CAAC,QAAQ,OAC7J,IAAqE,EAAU,GAAS,EAAc,OAChG,EAAU,SAAS,cAAc,QAAQ,CAAC,EAAU,GAAG,qBAAqB,EAAU,YAAY;;cAE1F,SAAS,KAAK,YAAY,EAAU,CAClD,IAAM,EAAY,SAAS,cAAc,MAAM,CAAC,EAAY,GAAG,gBAAgB,EAAY,MAAM,QAAQ;;;;;;;;;;;;;;;;;;cAkB3F,SAAS,KAAK,YAAY,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