{"version":3,"file":"CustomCursor.7JPexTnu.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/Tkq1KmAqkyVZ5dmLqtNW/V5IEPzoBUbi2Yc4FWqzJ/CustomCursor.js"],"sourcesContent":["// Custom cursor component with configurable shape, size, and color options\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useMotionValue,useSpring}from\"framer-motion\";/**\n * Custom Cursor\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CustomCursor(props){const{shape=\"circle\",size=20,changeColor=false,colorPalette=[\"#0099FF\",\"#8855FF\",\"#FF5588\",\"#22CC66\",\"#FFBB00\"],colorChangeSpeed=2e3,colorTransitionDuration=300,colorTransitionEase=\"ease\",opacity=1,backgroundColor=\"#000000\",borderWidth=0,borderColor=\"#FFFFFF\",clickScale=.7,invert=false,enableClickNavigation=false,clickLink=\"#section\",clickNavigationDelay=500}=props;const isStatic=useIsStaticRenderer();const[currentColorIndex,setCurrentColorIndex]=useState(0);const[isVisible,setIsVisible]=useState(false);const[isKeyboardMode,setIsKeyboardMode]=useState(false);const[isMouseDown,setIsMouseDown]=useState(false);const cursorX=useMotionValue(0);const cursorY=useMotionValue(0);const springConfig={damping:25,stiffness:400};const cursorXSpring=useSpring(cursorX,springConfig);const cursorYSpring=useSpring(cursorY,springConfig);useEffect(()=>{if(isStatic)return;const moveCursor=e=>{cursorX.set(e.clientX);cursorY.set(e.clientY);if(!isVisible&&!isKeyboardMode){startTransition(()=>setIsVisible(true));}// Exit keyboard mode when mouse moves\nif(isKeyboardMode){startTransition(()=>setIsKeyboardMode(false));}};const hideCursor=()=>{startTransition(()=>setIsVisible(false));};const handleKeyDown=e=>{// Detect Tab key for keyboard navigation\nif(e.key===\"Tab\"){startTransition(()=>{setIsKeyboardMode(true);setIsVisible(false);});}};const handleMouseDown=()=>{startTransition(()=>setIsMouseDown(true));// Handle navigation on click if enabled\nif(enableClickNavigation&&clickLink){setTimeout(()=>{if(typeof window!==\"undefined\"){// Check if it's a section link (starts with #)\nif(clickLink.startsWith(\"#\")){const element=document.querySelector(clickLink);if(element){element.scrollIntoView({behavior:\"smooth\",block:\"start\"});}}else{// External link\nwindow.location.href=clickLink;}}},clickNavigationDelay);}};const handleMouseUp=()=>{startTransition(()=>setIsMouseDown(false));};window.addEventListener(\"mousemove\",moveCursor);window.addEventListener(\"mouseleave\",hideCursor);window.addEventListener(\"keydown\",handleKeyDown);window.addEventListener(\"mousedown\",handleMouseDown);window.addEventListener(\"mouseup\",handleMouseUp);return()=>{window.removeEventListener(\"mousemove\",moveCursor);window.removeEventListener(\"mouseleave\",hideCursor);window.removeEventListener(\"keydown\",handleKeyDown);window.removeEventListener(\"mousedown\",handleMouseDown);window.removeEventListener(\"mouseup\",handleMouseUp);};},[cursorX,cursorY,isStatic,isVisible,isKeyboardMode]);useEffect(()=>{if(isStatic||!changeColor||colorPalette.length===0)return;const interval=setInterval(()=>{startTransition(()=>{setCurrentColorIndex(prev=>(prev+1)%colorPalette.length);});},colorChangeSpeed);return()=>clearInterval(interval);},[changeColor,colorPalette.length,colorChangeSpeed,isStatic]);if(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",backgroundColor:\"#F5F5F5\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,backgroundColor:changeColor?colorPalette[0]:backgroundColor,border:borderWidth>0?`${borderWidth}px solid ${borderColor}`:\"none\",...getShapeStyles(shape,size)}})});}const currentColor=changeColor?colorPalette[currentColorIndex]:backgroundColor;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n          * {\n            cursor: ${isKeyboardMode?\"auto\":\"none\"} !important;\n          }\n          html {\n            cursor: ${isKeyboardMode?\"auto\":\"none\"} !important;\n          }\n          body {\n            cursor: ${isKeyboardMode?\"auto\":\"none\"} !important;\n          }\n        `}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"fixed\",left:0,top:0,width:size,height:size,backgroundColor:currentColor,border:borderWidth>0?`${borderWidth}px solid ${borderColor}`:\"none\",pointerEvents:\"none\",zIndex:9999,x:cursorXSpring,y:cursorYSpring,translateX:\"-50%\",translateY:\"-50%\",opacity:isVisible&&!isKeyboardMode?opacity:0,transition:changeColor?`background-color ${colorTransitionDuration}ms ${colorTransitionEase}`:\"none\",mixBlendMode:invert?\"difference\":\"normal\",...getShapeStyles(shape,size)},animate:{scale:isMouseDown?clickScale:1},transition:{duration:.6,ease:\"easeInOut\"}})]});}function getShapeStyles(shape,size){switch(shape){case\"circle\":return{borderRadius:\"50%\"};case\"square\":return{borderRadius:0};case\"triangle\":return{width:0,height:0,backgroundColor:\"transparent\",borderLeft:`${size/2}px solid transparent`,borderRight:`${size/2}px solid transparent`};case\"diamond\":return{transform:\"rotate(45deg)\",borderRadius:size*.1};default:return{borderRadius:\"50%\"};}}addPropertyControls(CustomCursor,{shape:{type:ControlType.Enum,title:\"Shape\",options:[\"circle\",\"square\",\"triangle\",\"diamond\"],optionTitles:[\"Circle\",\"Square\",\"Triangle\",\"Diamond\"],defaultValue:\"circle\",displaySegmentedControl:true},size:{type:ControlType.Number,title:\"Size\",defaultValue:20,min:10,max:2e3,step:1,unit:\"px\"},clickScale:{type:ControlType.Number,title:\"Click Scale\",defaultValue:.7,min:.1,max:50,step:.1},invert:{type:ControlType.Boolean,title:\"Invert\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},changeColor:{type:ControlType.Boolean,title:\"Change Color\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},colorPalette:{type:ControlType.Array,title:\"Color Palette\",control:{type:ControlType.Color},defaultValue:[\"#0099FF\",\"#8855FF\",\"#FF5588\",\"#22CC66\",\"#FFBB00\"],hidden:({changeColor})=>!changeColor},colorChangeSpeed:{type:ControlType.Number,title:\"Change Speed\",defaultValue:2e3,min:500,max:5e3,step:100,unit:\"ms\",hidden:({changeColor})=>!changeColor},colorTransitionDuration:{type:ControlType.Number,title:\"Transition Duration\",defaultValue:300,min:0,max:2e3,step:50,unit:\"ms\",hidden:({changeColor})=>!changeColor},colorTransitionEase:{type:ControlType.Enum,title:\"Transition Ease\",options:[\"linear\",\"ease\",\"ease-in\",\"ease-out\",\"ease-in-out\"],optionTitles:[\"Linear\",\"Ease\",\"Ease In\",\"Ease Out\",\"Ease In-Out\"],defaultValue:\"ease\",displaySegmentedControl:false,hidden:({changeColor})=>!changeColor},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.01},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\",hidden:({changeColor})=>changeColor},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:\"#FFFFFF\",hidden:({borderWidth})=>borderWidth===0},enableClickNavigation:{type:ControlType.Boolean,title:\"Click Navigation\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},clickLink:{type:ControlType.String,title:\"Click Link\",defaultValue:\"#section\",placeholder:\"Enter URL or #section\",hidden:({enableClickNavigation})=>!enableClickNavigation},clickNavigationDelay:{type:ControlType.Number,title:\"Navigation Delay\",defaultValue:500,min:0,max:2e3,step:50,unit:\"ms\",hidden:({enableClickNavigation})=>!enableClickNavigation}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomCursor\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomCursor.map"],"mappings":"2RAMG,SAAwB,EAAa,EAAM,CAAC,GA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