{"version":3,"file":"FloatingLightImageControls.sfmG53dp.mjs","names":["React.useRef","React.useMemo","__esmMin","pe","init_npm_react_18_3_1","init_jsx_runtime","c","p","de","motion","useInView","init_framer_motion_DhsWWWsN","init_framer_BpuvUAiZ","addPropertyControls","ControlType","useIsStaticRenderer","FloatingLightImageControls","props","isStatic","frameRef","inView","shouldAnimate","pauseWhenOffscreen","floatAnimation","floatDistance","glowStyle","cornerRadius","glowColor","glowOpacity","glowBlur","imageAlt","altText","image","style","borderWidth","borderColor","init_FloatingLightImageControls"],"sources":["https:/framerusercontent.com/modules/LAwD5V6Do7wUFGuBnhVn/2lhYgNpJxrKR6FoXagYd/FloatingLightImageControls.js"],"sourcesContent":["// User request: Create a new Framer code component named “Floating Light Image Controls” that can replace the current canvas-based floating image visual on a luxury footwear/product storytelling page. It needs an editable image input plus property-panel controls for: floatDistance (subtle vertical movement), duration, glowColor, glowBlur, glowOpacity, cornerRadius, and an optional pauseWhenOffscreen toggle. Render a self-contained image frame that continuously floats up/down with a smooth mirrored motion and soft ambient glow; preserve image aspect ratio and fully cover the component bounds. Keep all visual values adjustable through Framer property controls, with restrained defaults suitable for a premium light-on-dark or light editorial page. Do not hardcode page-specific text or dimensions. Ensure static canvas preview is sensible and accessible alt text is supported through a control if practical.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function FloatingLightImageControls(props){const{image={src:\"https://framerusercontent.com/images/f9RiWoNpmlCMqVRIHz8l8wYfeI.jpg\",alt:\"Gradient 5 - Green\"},altText,floatDistance,duration,glowColor,glowBlur,glowOpacity,cornerRadius,borderColor,borderWidth,pauseWhenOffscreen,style}=props;const isStatic=useIsStaticRenderer();const frameRef=React.useRef(null);const inView=useInView(frameRef,{amount:.35});const shouldAnimate=React.useMemo(()=>{if(isStatic)return false;if(!pauseWhenOffscreen)return true;return inView;},[inView,isStatic,pauseWhenOffscreen]);const floatAnimation=React.useMemo(()=>{if(!shouldAnimate)return{y:0};return{y:[-floatDistance/2,floatDistance/2]};},[floatDistance,shouldAnimate]);const glowStyle=React.useMemo(()=>{return{position:\"absolute\",inset:\"-6%\",borderRadius:cornerRadius,background:glowColor,opacity:glowOpacity,filter:`blur(${glowBlur}px)`,pointerEvents:\"none\",zIndex:0};},[cornerRadius,glowBlur,glowColor,glowOpacity]);const imageAlt=altText||image.alt||\"\";return /*#__PURE__*/_jsxs(\"div\",{ref:frameRef,style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"visible\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:glowStyle,\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:cornerRadius,overflow:\"hidden\",border:`${borderWidth}px solid ${borderColor}`,zIndex:1,willChange:\"transform\"},animate:floatAnimation,transition:{duration,ease:\"easeInOut\",repeat:shouldAnimate?Infinity:0,repeatType:\"mirror\"},children:/*#__PURE__*/_jsx(\"img\",{...image,alt:imageAlt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",objectPosition:\"center\",display:\"block\"}})})]});}addPropertyControls(FloatingLightImageControls,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},altText:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"Floating product image\",placeholder:\"Describe image for accessibility\"},floatDistance:{type:ControlType.Number,title:\"Float\",defaultValue:14,min:0,max:60,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:6,min:1,max:20,step:.1,unit:\"s\"},glowColor:{type:ControlType.Color,title:\"Glow\",defaultValue:\"#FFFFFF\"},glowBlur:{type:ControlType.Number,title:\"Blur\",defaultValue:34,min:0,max:120,step:1,unit:\"px\"},glowOpacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:.2,min:0,max:1,step:.01},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:24,min:0,max:120,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"rgba(255,255,255,0.2)\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:1,min:0,max:12,step:1,unit:\"px\"},pauseWhenOffscreen:{type:ControlType.Boolean,title:\"Pause Offscreen\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingLightImageControls\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FloatingLightImageControls.map"],"mappings":"A,wPAIG,SAAwBgB,EAA2B,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,oBAAoB,EAAE,UAAQ,gBAAc,WAAS,YAAU,WAAS,cAAY,eAAa,cAAY,cAAY,qBAAmB,SAAOC,EAAYC,EAASH,EAAoB,EAAQI,EAASnB,EAAa,IAAI,EAAQoB,EAAOV,EAAUS,EAAS,CAAC,OAAO,GAAG,CAAC,EAAQE,EAAcpB,MAAsBiB,EAAgB,GAAM,CAAII,GAAsCF,EAAS,CAACA,EAAOF,EAASI,CAAkB,CAAC,EAAQC,EAAetB,MAAuBoB,EAAgC,CAAC,EAAE,CAAC,CAACG,EAAc,EAAEA,EAAc,CAAC,CAAC,EAAjD,CAAC,EAAE,CAAC,EAAiD,CAACA,EAAcH,CAAa,CAAC,EAAQI,EAAUxB,OAAyB,CAAC,SAAS,WAAW,MAAM,MAAM,aAAayB,EAAa,WAAWC,EAAU,QAAQC,EAAY,OAAO,QAAQC,EAAS,KAAK,cAAc,OAAO,OAAO,CAAC,GAAI,CAACH,EAAa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