{"version":3,"file":"shared-lib.Ba-lUtzG.mjs","names":["useRef","useState"],"sources":["https:/framerusercontent.com/modules/QZH0pBFxJvG90smCpGB7/Q3hPcMgMfCFyShRUYklD/GlassCursor.js","https:/framerusercontent.com/modules/eKzhsrGaI6aq3BkjAVZk/0Mlx5638b9d8KzWhFTf7/siteMetadata.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * GlassCursor\n * A custom circular cursor matching the site's glass-button aesthetic:\n * a semi-transparent tinted circle with a backdrop blur, so whatever's\n * behind the cursor shows through frosted, exactly like the WORK/CONTACT\n * nav pill.\n *\n * The fill itself uses mix-blend-mode: difference, so its rendered color\n * inverts relative to whatever is directly beneath the cursor — this\n * keeps it visible against any background (including solid black) while\n * still showing the frosted/blurred glass effect through the fill.\n *\n * Position tracking and the hover-grow are eased independently: position\n * uses `ease` (kept at 1 = instant, no trailing delay, per earlier setup),\n * while the grow/shrink on hovering a link uses its own `growEase` — a\n * lower value gives a soft, smooth \"easy ease\" grow rather than an\n * instant size snap.\n *\n * Rendered via a portal directly into document.body, so it always sits at\n * the true top of the stacking order and true viewport position — it can\n * never get trapped behind (or offset by) a transformed/sticky/fixed\n * ancestor like a floating header.\n *\n * Also injects a global stylesheet forcing cursor:none on every element,\n * not just body — browsers apply their own default \"cursor: pointer\"\n * directly on links/buttons/inputs, which otherwise overrides an inherited\n * cursor:none set only on body, causing the native pointer to reappear on\n * hover over clickable elements.\n *\n * Drop this anywhere on a page (it renders as a fixed overlay covering the\n * whole viewport, so position on the canvas doesn't matter). Add it to every\n * page you want the cursor active on.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function GlassCursor(props){const{size,hoverSize,tintColor,backdropBlur,ease,growEase,hideOnCanvas}=props;const dotRef=useRef(null);const pos=useRef({x:-100,y:-100});const target=useRef({x:-100,y:-100});const scale=useRef(1);const targetScale=useRef(1);const[mounted,setMounted]=useState(false);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{setMounted(true);},[]);useEffect(()=>{if(isCanvas)return;const move=e=>{target.current.x=e.clientX;target.current.y=e.clientY;};const isInteractive=el=>{if(!(el instanceof Element))return false;return!!el.closest(\"a, button, [role='button'], input, textarea, select\");};const over=e=>{targetScale.current=isInteractive(e.target)?hoverSize/size:1;};window.addEventListener(\"mousemove\",move);window.addEventListener(\"mouseover\",over);const prevCursor=document.body.style.cursor;document.body.style.cursor=\"none\";// Force cursor:none on every element, including links/buttons/inputs,\n// which otherwise get the browser's own default pointer cursor\n// regardless of body's inherited value.\nconst styleEl=document.createElement(\"style\");styleEl.setAttribute(\"data-glass-cursor\",\"true\");styleEl.textContent=`* { cursor: none !important; }`;document.head.appendChild(styleEl);let raf=0;const tick=()=>{pos.current.x+=(target.current.x-pos.current.x)*ease;pos.current.y+=(target.current.y-pos.current.y)*ease;// Grow/shrink eased independently and more softly than position.\nscale.current+=(targetScale.current-scale.current)*growEase;if(dotRef.current){dotRef.current.style.transform=`translate(${pos.current.x}px, ${pos.current.y}px) translate(-50%, -50%) scale(${scale.current})`;}raf=requestAnimationFrame(tick);};raf=requestAnimationFrame(tick);return()=>{window.removeEventListener(\"mousemove\",move);window.removeEventListener(\"mouseover\",over);document.body.style.cursor=prevCursor;styleEl.remove();cancelAnimationFrame(raf);};},[isCanvas,size,hoverSize,ease,growEase]);if(isCanvas&&hideOnCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"rgba(0,0,0,0.4)\",fontSize:14,fontFamily:\"sans-serif\",padding:12,textAlign:\"center\"},children:\"Glass cursor (invisible on canvas — active in Preview/Live)\"});}const dot=/*#__PURE__*/_jsx(\"div\",{ref:dotRef,style:{position:\"fixed\",top:0,left:0,width:size,height:size,borderRadius:\"50%\",backgroundColor:tintColor,backdropFilter:`blur(${backdropBlur}px)`,WebkitBackdropFilter:`blur(${backdropBlur}px)`,mixBlendMode:\"difference\",pointerEvents:\"none\",zIndex:2147483647,willChange:\"transform\"}});if(isCanvas||!mounted||typeof document===\"undefined\")return null;return /*#__PURE__*/createPortal(dot,document.body);}addPropertyControls(GlassCursor,{size:{type:ControlType.Number,title:\"Size\",defaultValue:10,min:4,max:100},hoverSize:{type:ControlType.Number,title:\"Hover Size\",defaultValue:20,min:4,max:160},tintColor:{type:ControlType.Color,title:\"Tint\",defaultValue:\"rgba(255,255,255,0.35)\"},backdropBlur:{type:ControlType.Number,title:\"Backdrop Blur\",defaultValue:10,min:0,max:40},ease:{type:ControlType.Number,title:\"Trail Ease\",defaultValue:1,min:.02,max:1,step:.01},growEase:{type:ControlType.Number,title:\"Grow Ease\",defaultValue:.18,min:.02,max:1,step:.01,description:\"Smoothness of the hover grow/shrink. Lower = softer, slower.\"},hideOnCanvas:{type:ControlType.Boolean,title:\"Placeholder on Canvas\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GlassCursor\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GlassCursor.map","// Generated by Framer (3f060d6)\nexport default function metadata(params,activeLocale){return{description:\"DESIGN PORTFOLIO\",favicon:\"https://framerusercontent.com/assets/2Go8Lt5orMAg4NBPxhOdijSlaic.png\",robots:\"max-image-preview:large\",title:\"CARL SHERRY\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"iNAmCG,SAAwB,EAAY,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