{"version":3,"file":"CustomCursor.vaIXvuKf.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/gil6u0Al9j3fgr5248PC/wnVaCpisKXvnbLo8Wo8W/CustomCursor.js"],"sourcesContent":["// Custom cursor that follows the regular cursor but appears behind stacks\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useRef,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Custom cursor that follows the regular cursor but appears behind stacks\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CustomCursor(props){const{size=20,color=\"#FF6B6B\",opacity=.8,blur=0,followSpeed=.1,zIndex=-1,shape=\"circle\",borderWidth=0,borderColor=\"#000000\"}=props;const[position,setPosition]=useState({x:0,y:0});const[targetPosition,setTargetPosition]=useState({x:0,y:0});const animationRef=useRef();const isStatic=useIsStaticRenderer();// Track mouse position\nuseEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const handleMouseMove=e=>{startTransition(()=>{setTargetPosition({x:e.clientX,y:e.clientY});});};window.addEventListener(\"mousemove\",handleMouseMove);return()=>window.removeEventListener(\"mousemove\",handleMouseMove);},[isStatic]);// Smooth follow animation\nuseEffect(()=>{if(isStatic)return;const animate=()=>{setPosition(current=>{const dx=targetPosition.x-current.x;const dy=targetPosition.y-current.y;return{x:current.x+dx*followSpeed,y:current.y+dy*followSpeed};});animationRef.current=requestAnimationFrame(animate);};animationRef.current=requestAnimationFrame(animate);return()=>{if(animationRef.current){cancelAnimationFrame(animationRef.current);}};},[targetPosition,followSpeed,isStatic]);if(isStatic){return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background:\"#f5f5f5\",borderRadius:8,fontSize:14,color:\"#666\",textAlign:\"center\",padding:20},children:[\"Custom Cursor Preview\",/*#__PURE__*/_jsx(\"br\",{}),/*#__PURE__*/_jsx(\"small\",{children:\"Will follow mouse in preview\"})]});}const getShapeStyles=()=>{const baseStyles={width:size,height:size,border:borderWidth>0?`${borderWidth}px solid ${borderColor}`:\"none\"};switch(shape){case\"circle\":return{...baseStyles,borderRadius:\"50%\"};case\"square\":return{...baseStyles,borderRadius:0};case\"diamond\":return{...baseStyles,borderRadius:0,transform:\"rotate(45deg)\"};default:return{...baseStyles,borderRadius:\"50%\"};}};return /*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",left:position.x-size/2,top:position.y-size/2,backgroundColor:color,opacity:opacity,filter:blur>0?`blur(${blur}px)`:\"none\",pointerEvents:\"none\",zIndex:zIndex,transition:\"none\",...getShapeStyles()}});}addPropertyControls(CustomCursor,{size:{type:ControlType.Number,title:\"Size\",defaultValue:20,min:5,max:100,step:1,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FF6B6B\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.8,min:0,max:1,step:.1},blur:{type:ControlType.Number,title:\"Blur\",defaultValue:0,min:0,max:20,step:1,unit:\"px\"},followSpeed:{type:ControlType.Number,title:\"Follow Speed\",defaultValue:.1,min:.01,max:1,step:.01},zIndex:{type:ControlType.Number,title:\"Z-Index\",defaultValue:-1,min:-999,max:999,step:1,displayStepper:true},shape:{type:ControlType.Enum,title:\"Shape\",options:[\"circle\",\"square\",\"diamond\"],optionTitles:[\"Circle\",\"Square\",\"Diamond\"],defaultValue:\"circle\",displaySegmentedControl:true},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:0,min:0,max:10,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\",hidden:({borderWidth})=>borderWidth===0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomCursor\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"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