{"version":3,"file":"shared-lib.B7suf7D7.mjs","names":["useState","useRef","style"],"sources":["https:/framerusercontent.com/modules/UhS307m7Q6xhq8NSJS6U/iSjCTWFJYqkTVgg76cdJ/IdleCursorHider.js"],"sourcesContent":["// Custom cursor that hides after 5 seconds of inactivity (no mouse movement)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Custom Cursor with Inactivity Hide\n *\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function IdleCursorHider(props){const{cursorColor,cursorSize,hideDelay,style}=props;const[visible,setVisible]=useState(true);const[pos,setPos]=useState({x:0,y:0});const[isClicking,setIsClicking]=useState(false);const timerRef=useRef(null);useEffect(()=>{if(RenderTarget.current()!==RenderTarget.preview)return;// Check if device is mobile/touch device\nconst isMobile=\"ontouchstart\"in window||navigator.maxTouchPoints>0;if(isMobile)return;function handleMove(e){startTransition(()=>setPos({x:e.clientX,y:e.clientY}));startTransition(()=>setVisible(true));if(timerRef.current)window.clearTimeout(timerRef.current);timerRef.current=window.setTimeout(()=>{startTransition(()=>setVisible(false));},hideDelay*1e3);}function handleDown(){startTransition(()=>setIsClicking(true));}function handleUp(){startTransition(()=>setIsClicking(false));}window.addEventListener(\"mousemove\",handleMove);window.addEventListener(\"mousedown\",handleDown);window.addEventListener(\"mouseup\",handleUp);return()=>{window.removeEventListener(\"mousemove\",handleMove);window.removeEventListener(\"mousedown\",handleDown);window.removeEventListener(\"mouseup\",handleUp);if(timerRef.current)window.clearTimeout(timerRef.current);};},[hideDelay]);// Hide system cursor in preview\nuseEffect(()=>{if(RenderTarget.current()!==RenderTarget.preview)return;// Only hide cursor on desktop devices\nconst isMobile=\"ontouchstart\"in window||navigator.maxTouchPoints>0;if(isMobile)return;const prev=document.body.style.cursor;document.body.style.cursor=\"none\";// Add CSS to hide all cursor states\nconst style=document.createElement(\"style\");style.textContent=`\n            *, *:before, *:after {\n                cursor: none !important;\n            }\n            a, button, input, textarea, select, [role=\"button\"], [onclick] {\n                cursor: none !important;\n            }\n        `;document.head.appendChild(style);return()=>{document.body.style.cursor=prev;document.head.removeChild(style);};},[]);if(RenderTarget.current()!==RenderTarget.preview)return null;if(!visible)return null;return /*#__PURE__*/_jsx(\"div\",{style:{pointerEvents:\"none\",position:\"fixed\",left:0,top:0,width:0,height:0,zIndex:99999,...style},children:/*#__PURE__*/_jsx(\"img\",{src:\"https://framerusercontent.com/images/sJo1UxCHUfPUtyQmHNbK1TDAN0.png\",alt:\"C Cursor\",style:{position:\"absolute\",left:pos.x-cursorSize*(isClicking?.875:.75),top:pos.y-cursorSize*(isClicking?.875:.75),width:cursorSize*(isClicking?1.25*1.5:1.5),height:cursorSize*(isClicking?1.25*1.5:1.5),transition:isClicking?\"width 0.12s cubic-bezier(.4,0,.2,1), height 0.12s cubic-bezier(.4,0,.2,1), opacity 0.25s\":\"width 0.18s cubic-bezier(.4,0,.2,1), height 0.18s cubic-bezier(.4,0,.2,1), opacity 0.25s\",opacity:isClicking?0:1,pointerEvents:\"none\",userSelect:\"none\",mixBlendMode:\"exclusion\"}})});}addPropertyControls(IdleCursorHider,{cursorColor:{type:ControlType.Color,title:\"Cursor Color\",defaultValue:\"#111111\"},cursorSize:{type:ControlType.Number,title:\"Cursor Size\",defaultValue:24,min:8,max:80,step:1,unit:\"px\"},hideDelay:{type:ControlType.Number,title:\"Hide Delay\",defaultValue:5,min:1,max:30,step:1,unit:\"s\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"IdleCursorHider\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"100\",\"framerIntrinsicHeight\":\"100\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\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