{"version":3,"file":"ImageFlow.fXEcgqaQ.mjs","names":["useRef","useState","useCallback"],"sources":["https:/framerusercontent.com/modules/qpkYbLpK1DzpoVRGKNck/rctf6PdHKYK8ldfVHa3M/ImageFlow.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useCallback,useRef}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * Image Flow - 3D Parallax Effect\n * An image that responds to cursor movement with 3D tilt and translate effects\n *\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function ImageFlow(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Project Planning\"},intensity=15,scale=1.05,borderRadius=12,perspective=1e3}=props;const containerRef=useRef(null);const[transform,setTransform]=useState({translateX:0,translateY:0});const[isHovered,setIsHovered]=useState(false);const isStatic=useIsStaticRenderer();const handleMouseMove=useCallback(e=>{if(!containerRef.current||isStatic)return;const rect=containerRef.current.getBoundingClientRect();const centerX=rect.left+rect.width/2;const centerY=rect.top+rect.height/2;const mouseX=e.clientX-centerX;const mouseY=e.clientY-centerY;const translateX=mouseX/(rect.width/2)*intensity;const translateY=mouseY/(rect.height/2)*intensity;setTransform({translateX,translateY});},[intensity,isStatic]);const handleMouseLeave=useCallback(()=>{setIsHovered(false);setTransform({translateX:0,translateY:0});},[]);const handleMouseEnter=useCallback(()=>{setIsHovered(true);},[]);const imageStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\",borderRadius:`${borderRadius}px`,willChange:\"transform\",transformStyle:\"preserve-3d\",transform:`\n            translate3d(${transform.translateX}px, ${transform.translateY}px, 0px)\n            scale3d(${isHovered?scale:1}, ${isHovered?scale:1}, 1)\n        `,transition:isHovered?\"transform 0.1s ease-out\":\"transform 0.5s ease-out\"};return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",perspective:`${perspective}px`,overflow:\"visible\",borderRadius:`${borderRadius}px`,cursor:\"pointer\"},onMouseMove:handleMouseMove,onMouseLeave:handleMouseLeave,onMouseEnter:handleMouseEnter,children:/*#__PURE__*/_jsx(\"img\",{src:image.src,srcSet:image.srcSet,alt:image.alt||\"Flow image\",style:imageStyle})});}addPropertyControls(ImageFlow,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},intensity:{type:ControlType.Number,title:\"Tilt Intensity\",defaultValue:15,min:0,max:40,step:1,unit:\"deg\"},scale:{type:ControlType.Number,title:\"Hover Scale\",defaultValue:1.05,min:1,max:1.3,step:.01},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:50,step:1,unit:\"px\"},perspective:{type:ControlType.Number,title:\"Perspective\",defaultValue:1e3,min:500,max:2e3,step:100,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageFlow\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"300\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageFlow.map"],"mappings":"gMASG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,mBAAmB,CAAC,YAAU,GAAG,QAAM,KAAK,eAAa,GAAG,cAAY,KAAK,EAAY,EAAaA,EAAO,KAAK,CAAM,CAAC,EAAU,GAAcC,EAAS,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAS,GAAqB,CAAO,EAAgBC,EAAY,GAAG,CAAC,GAAG,CAAC,EAAa,SAAS,EAAS,OAAO,IAAM,EAAK,EAAa,QAA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