{"version":3,"file":"ZoomImage.B6YCiklP.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/igTxMA33qek4RMpvfmXu/YaKmQnvRVdEtctvt1XLO/ZoomImage.js"],"sourcesContent":["// Zoom Image component that magnifies content on hover with cursor-based transform origin\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n */export default function ZoomImage(props){const{image={src:\"https://framerusercontent.com/images/70D908ZnP0cnDre3T7DlePO12M.jpeg\",alt:\"3D Gradient Waves\"},zoomScale,transition,backgroundColor,borderRadius}=props;const[isHovered,setIsHovered]=useState(false);const isStatic=useIsStaticRenderer();const zoomInStyle={scale:zoomScale};const zoomOutStyle={scale:1};const updateTransformOrigin=e=>{if(isStatic)return;const rect=e.currentTarget.getBoundingClientRect();const x=e.clientX-rect.left;const y=e.clientY-rect.top;const childElement=e.currentTarget.firstChild;if(childElement){// Only set transformOrigin, do not set transition here\nchildElement.style.transformOrigin=`${x}px ${y}px`;}};const handleMouseEnter=()=>{if(!isStatic){startTransition(()=>setIsHovered(true));}};const handleMouseLeave=()=>{if(!isStatic){startTransition(()=>setIsHovered(false));}};return /*#__PURE__*/_jsx(motion.div,{style:{...props.style,overflow:\"hidden\",position:\"relative\",backgroundColor,borderRadius,width:\"100%\",height:\"100%\"},onMouseMove:isStatic?undefined:updateTransformOrigin,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:/*#__PURE__*/_jsx(motion.div,{animate:isHovered?zoomInStyle:zoomOutStyle,transition:transition,style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"img\",{...image,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",transition:undefined}})})});}addPropertyControls(ZoomImage,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},zoomScale:{type:ControlType.Number,title:\"Zoom Scale\",defaultValue:2.5,min:1.1,max:5,step:.1},transition:{type:ControlType.Transition,title:\"Transition\",defaultValue:{duration:.1,ease:\"easeInOut\"}},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ZoomImage\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"200\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ZoomImage.map"],"mappings":"0OAMG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,uEAAuE,IAAI,mBAAmB,EAAE,YAAU,aAAW,kBAAgB,gBAAc,EAAW,CAAC,EAAU,GAAcA,EAAS,EAAK,EAAQ,EAAS,EAAoB,EAAQ,EAAY,CAAC,MAAM,CAAS,EAAQ,EAAa,CAAC,MAAM,CAAC,EAAQ,EAAsB,GAAG,CAAC,GAAG,EAAS,OAAO,IAAM,EAAK,EAAE,cAAc,sBAAsB,EAAQ,EAAE,EAAE,QAAQ,EAAK,KAAW,EAAE,EAAE,QAAQ,EAAK,IAAU,EAAa,EAAE,cAAc,WAAc,IACxjB,EAAa,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,IAAK,EAAQ,MAAqB,CAAK,GAAU,MAAoB,EAAa,EAAI,CAAC,CAAG,EAAQ,MAAqB,CAAK,GAAU,MAAoB,EAAa,EAAK,CAAC,CAAG,EAAE,OAAoB,EAAK,EAAO,IAAI,CA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