{"version":3,"file":"CustomCursor.CAf5yJU6.mjs","names":["shadowOptions","borderOptions","useState","useRef"],"sources":["https:/framerusercontent.com/modules/4FYXL5lQz9cgJ2BJkaNV/uQoXZ4NvFasfJqYRTeHn/Image.js","https:/framerusercontent.com/modules/4StfDtvmw0SXAQ8KMVws/l9HYYdt42niLhrniFUJM/CustomCursor.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Responsive Image\n * By Benjamin\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any\n * @framerDisableUnlink\n *\n */export default function Image(props){const{image,alt,radius,padding,link,newTab,style,borderOptions,shadowOptions}=props;const wrapperStyle={display:\"flex\",placeContent:\"center\",placeItems:\"center\",width:\"100%\",height:\"100%\",padding:padding};const borderAndShadow=(borderOptions,shadowOptions)=>{if(!shadowOptions&&!borderOptions)return undefined;if(shadowOptions&&!borderOptions){return`${shadowOptions.shadowX}px ${shadowOptions.shadowY}px ${shadowOptions.shadowBlur}px ${shadowOptions.shadowColor}`;}if(!shadowOptions&&borderOptions){return`inset 0 0 0 ${borderOptions.borderWidth}px ${borderOptions.borderColor}`;}if(shadowOptions&&borderOptions){return`inset 0 0 0 ${borderOptions.borderWidth}px ${borderOptions.borderColor}, ${shadowOptions.shadowX}px ${shadowOptions.shadowY}px ${shadowOptions.shadowBlur}px ${shadowOptions.shadowColor}`;}};const imageStyle={maxWidth:\"100%\",maxHeight:\"100%\",borderRadius:radius,webkitUserDrag:\"none\",userDrag:\"none\",userSelect:\"none\"};const shadowStyle={position:\"absolute\",inset:0,pointerEvents:\"none\",borderRadius:radius,boxShadow:borderAndShadow(borderOptions,shadowOptions)};const imageSource=(image===null||image===void 0?void 0:image.src)||\"https://framerusercontent.com/images/64n4wnVJKDJspLlFZ6DarCP0M4.jpg\";return link?/*#__PURE__*/_jsxs(\"a\",{href:link,title:alt,target:newTab?\"_blank\":\"_self\",style:wrapperStyle,children:[/*#__PURE__*/_jsx(\"img\",{style:imageStyle,src:imageSource,srcSet:image===null||image===void 0?void 0:image.srcSet,alt:alt}),/*#__PURE__*/_jsx(\"div\",{style:shadowStyle})]}):/*#__PURE__*/_jsxs(\"div\",{style:wrapperStyle,children:[/*#__PURE__*/_jsx(\"img\",{style:imageStyle,src:imageSource,srcSet:image===null||image===void 0?void 0:image.srcSet,alt:alt}),/*#__PURE__*/_jsx(\"div\",{style:shadowStyle})]});}addPropertyControls(Image,{image:{title:\"Image\",type:ControlType.ResponsiveImage},alt:{type:ControlType.String,title:\"Alt\",placeholder:\"Alt Text\"},radius:{title:\"Radius\",type:ControlType.Number,min:0,max:100,step:1,displayStepper:true},padding:{title:\"Padding\",type:ControlType.Number,min:0,max:100,step:1,displayStepper:true},link:{type:ControlType.Link,title:\"Link\"},newTab:{type:ControlType.Boolean,title:\"New Tab\",hidden:props=>!props.link},borderOptions:{type:ControlType.Object,optional:true,title:\"Border\",icon:\"effect\",controls:{borderColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0,0,0,0.2)\"},borderWidth:{type:ControlType.Number,title:\"Width\",min:0,displayStepper:true,defaultValue:1}}},shadowOptions:{type:ControlType.Object,title:\"Shadow\",optional:true,icon:\"effect\",controls:{shadowX:{type:ControlType.Number,title:\"X\",min:0,defaultValue:0},shadowY:{type:ControlType.Number,title:\"Y\",min:0,defaultValue:2},shadowBlur:{type:ControlType.Number,title:\"Blur\",min:0,defaultValue:4},shadowColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"rgba(0,0,0,0.2)\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Image\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"any\",\"framerDisableUnlink\":\"*\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Image.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{motion,useSpring}from\"framer-motion\";// --- הגדרות משתמש ---\nconst RESTRICTED_PROJECTS=[\"lightricks\",\"artour\"];export default function CustomCursor(){const[hoverText,setHoverText]=useState(\"\");const[isHovering,setIsHovering]=useState(false);const[isMobile,setIsMobile]=useState(false)// משתנה חדש לזיהוי נייד\n;const mousePos=useRef({x:-100,y:-100});const currentProjectName=useRef(null);const cursorX=useSpring(-100,{stiffness:500,damping:30});const cursorY=useSpring(-100,{stiffness:500,damping:30});const shouldShowCursor=(text,mouseX)=>{if(!text)return false;const cleanText=text.toLowerCase();const isRestricted=RESTRICTED_PROJECTS.some(name=>cleanText.includes(name));if(isRestricted){const screenWidth=window.innerWidth;const leftBoundary=screenWidth/3;const rightBoundary=screenWidth/3*2;return mouseX>leftBoundary&&mouseX<rightBoundary;}return true;};useEffect(()=>{// 1. בדיקת מובייל/טאבלט מיידית\n// אם המסך קטן מ-850 פיקסלים, אנחנו מפסיקים כאן ולא מריצים את הקוד\nif(window.innerWidth<600){setIsMobile(true);return;}// --- מכאן הכל אותו דבר כמו קודם (רץ רק במחשב) ---\ndocument.body.style.cursor=\"none\";document.documentElement.style.cursor=\"none\";const cursorStyle=document.createElement(\"style\");cursorStyle.innerHTML=`* { cursor: none !important; }`;document.head.appendChild(cursorStyle);const link=document.createElement(\"link\");link.rel=\"stylesheet\";link.href=\"https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap\";document.head.appendChild(link);const moveMouse=e=>{mousePos.current={x:e.clientX,y:e.clientY};cursorX.set(e.clientX);cursorY.set(e.clientY);if(currentProjectName.current){const allowed=shouldShowCursor(currentProjectName.current,e.clientX);setIsHovering(allowed);}};const checkUnderCursor=()=>{const x=mousePos.current.x;const y=mousePos.current.y;if(x<0||y<0)return;const element=document.elementFromPoint(x,y);if(!element)return;const projectWrapper=element.closest('[data-is-project=\"true\"]');if(projectWrapper){const img=projectWrapper.querySelector(\"img\");const text=img?.alt?.trim()||\"Project\";currentProjectName.current=text;setHoverText(text);const allowed=shouldShowCursor(text,x);setIsHovering(allowed);}else{currentProjectName.current=null;setIsHovering(false);}};const start=e=>{const text=e.detail;currentProjectName.current=text;setHoverText(text);const allowed=shouldShowCursor(text,mousePos.current.x);setIsHovering(allowed);};const end=()=>{currentProjectName.current=null;setIsHovering(false);};window.addEventListener(\"mousemove\",moveMouse);window.addEventListener(\"scroll\",checkUnderCursor,{passive:true});window.addEventListener(\"cursorHoverStart\",start);window.addEventListener(\"cursorHoverEnd\",end);return()=>{window.removeEventListener(\"mousemove\",moveMouse);window.removeEventListener(\"scroll\",checkUnderCursor);window.removeEventListener(\"cursorHoverStart\",start);window.removeEventListener(\"cursorHoverEnd\",end);// ניקוי אלגנטי ביציאה\nif(document.head.contains(cursorStyle))document.head.removeChild(cursorStyle);if(document.head.contains(link))document.head.removeChild(link);document.body.style.cursor=\"\";document.documentElement.style.cursor=\"\";};},[]);// אם זה מובייל - אל תצייר כלום (return null)\nif(isMobile)return null;return /*#__PURE__*/_jsx(motion.div,{style:{position:\"fixed\",left:0,top:0,x:cursorX,y:cursorY,pointerEvents:\"none\",zIndex:99999,borderRadius:\"50%\",backgroundColor:\"#FF5500\",color:\"white\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",translateX:\"-50%\",translateY:\"-50%\",padding:\"10px\",whiteSpace:\"normal\",fontWeight:\"black\",fontSize:hoverText?.toLowerCase()===\"encyclopedia of ideas\"?\"16px\":\"18px\",textAlign:\"center\"},animate:{width:isHovering?120:20,height:isHovering?120:20},children:isHovering&&/*#__PURE__*/_jsx(\"span\",{style:{opacity:1,fontFamily:'\"Roboto Condensed\", sans-serif',fontWeight:700,wordBreak:\"normal\",overflowWrap:\"normal\",maxWidth:\"90px\",lineHeight:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",textAlign:\"center\",textTransform:\"uppercase\"},children:hoverText})});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\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