{"version":3,"file":"shared-lib.Do934hiD.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/kM1JbA2kL4A4IHfesIn3/YHnOWMFkNezj6Cew2ro7/CursorDot.js","https:/framerusercontent.com/modules/q9vBacjNRe976H2zXT1H/8evABYm1oiFZqKZ01HD8/siteMetadata.js"],"sourcesContent":["// Site-wide custom dot cursor.\n// A small dot that snaps 1:1 to the mouse (no follow lag) and smoothly scales up\n// when hovering interactive elements (links, buttons, or anything matching the\n// hover selector). Position updates are direct style writes (no re-renders, no\n// spring), only the SCALE is animated — matching the old native setup: instant\n// tracking + animated size.\n//\n// Usage: drop ONE instance anywhere on a page (it renders a fixed overlay, so\n// placement/size of the layer itself doesn't matter). For the whole site, put it\n// on every page or inside the shared Navigation template.\n// Renders nothing on touch devices and in static export; shows a small preview\n// dot on the Framer canvas.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{useEffect,useRef}from\"react\";const HOVER_SELECTOR='a, button, [role=\"button\"], input, textarea, select, summary, [data-cursor=\"hover\"]';/**\n * Cursor Dot\n *\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CursorDot(props){const{size=12,hoverSize=36,color=\"rgb(236, 232, 223)\",scaleDuration=.2,hideNativeCursor=true,blend=false,style}=props;const dotRef=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(isCanvas)return;// Only run for real mouse pointers — skip touch devices.\nif(typeof window===\"undefined\"||!window.matchMedia(\"(pointer: fine)\").matches)return;const dot=dotRef.current;if(!dot)return;let raf=0;let x=-100;let y=-100;let scale=1;let visible=false;const apply=()=>{raf=0;dot.style.transform=`translate3d(${x}px, ${y}px, 0) translate(-50%, -50%)`;dot.style.opacity=visible?\"1\":\"0\";};const onMove=e=>{x=e.clientX;y=e.clientY;visible=true;// batch writes to one per frame, position itself is instant (no easing)\nif(!raf)raf=requestAnimationFrame(apply);};const setScale=s=>{scale=s;dot.style.width=`${size*scale}px`;dot.style.height=`${size*scale}px`;};const onOver=e=>{const t=e.target;if(t&&t.closest&&t.closest(HOVER_SELECTOR))setScale(hoverSize/size);};const onOut=e=>{const t=e.target;if(t&&t.closest&&t.closest(HOVER_SELECTOR))setScale(1);};const onLeave=()=>{visible=false;if(!raf)raf=requestAnimationFrame(apply);};const onDown=()=>setScale(Math.max(.6,scale*2/3));const onUp=()=>setScale(document.querySelector(`${HOVER_SELECTOR}:hover`)?hoverSize/size:1);window.addEventListener(\"mousemove\",onMove,{passive:true});window.addEventListener(\"mouseover\",onOver,{passive:true});window.addEventListener(\"mouseout\",onOut,{passive:true});window.addEventListener(\"mousedown\",onDown,{passive:true});window.addEventListener(\"mouseup\",onUp,{passive:true});document.documentElement.addEventListener(\"mouseleave\",onLeave);// Hide the native cursor everywhere while the dot is active.\nlet styleEl=null;if(hideNativeCursor){styleEl=document.createElement(\"style\");styleEl.textContent=\"*, *::before, *::after { cursor: none !important }\";document.head.appendChild(styleEl);}return()=>{cancelAnimationFrame(raf);window.removeEventListener(\"mousemove\",onMove);window.removeEventListener(\"mouseover\",onOver);window.removeEventListener(\"mouseout\",onOut);window.removeEventListener(\"mousedown\",onDown);window.removeEventListener(\"mouseup\",onUp);document.documentElement.removeEventListener(\"mouseleave\",onLeave);if(styleEl)styleEl.remove();};},[isCanvas,size,hoverSize,hideNativeCursor]);// Canvas preview: just show the dot so the layer is visible in the editor.\nif(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{...style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,borderRadius:\"50%\",backgroundColor:color}})});}return /*#__PURE__*/_jsx(\"div\",{style:{...style,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"div\",{ref:dotRef,style:{position:\"fixed\",top:0,left:0,width:size,height:size,borderRadius:\"50%\",backgroundColor:color,opacity:0,pointerEvents:\"none\",zIndex:99999,mixBlendMode:blend?\"difference\":\"normal\",transition:`width ${scaleDuration}s ease, height ${scaleDuration}s ease, opacity 0.15s ease`,willChange:\"transform\"}})});}addPropertyControls(CursorDot,{size:{type:ControlType.Number,title:\"Size\",defaultValue:12,min:4,max:40,unit:\"px\"},hoverSize:{type:ControlType.Number,title:\"Hover Size\",defaultValue:36,min:8,max:120,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgb(236, 232, 223)\"},scaleDuration:{type:ControlType.Number,title:\"Scale Time\",defaultValue:.2,min:0,max:1,step:.05,unit:\"s\"},hideNativeCursor:{type:ControlType.Boolean,title:\"Hide Native\",defaultValue:true},blend:{type:ControlType.Boolean,title:\"Blend Mode\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CursorDot\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"24\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CursorDot.map","// Generated by Framer (c9b3949)\nexport default function metadata(params,activeLocale){return{description:\"Motion designer crafting 3D, animation, and simulation in Cinema 4D and Houdini. Based in Islamabad, Pakistan.\",favicon:\"https://framerusercontent.com/assets/U5fqQSszHfhtI1elzVMD67UqP20.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/w7rqEzEVT71tfPueMKtZhyndsNQ.png\",title:\"Yaseen Irshad - Motion Designer\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"s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