{"version":3,"file":"ScrollImageFrame.BG_9VbrX.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/73ljE08whaRICjZqWDvD/7zLxKexcu3X2ydOAkOU0/ScrollImageFrame.js"],"sourcesContent":["// Image frame that scrolls the image subtly as the user scrolls the website\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useScroll,useTransform,motion}from\"framer-motion\";import{useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollImageFrame(props){const{image={src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"},scrollSpeed,direction,borderRadius,zoom,zoomOrigin}=props;const containerRef=useRef(null);const{scrollYProgress}=useScroll({target:containerRef,offset:[\"start end\",\"end start\"]});const multiplier=direction===\"down\"?scrollSpeed:-scrollSpeed;const y=useTransform(scrollYProgress,[0,1],[-multiplier,multiplier]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",borderRadius},children:/*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\",y},children:/*#__PURE__*/_jsx(\"img\",{src:image.src,alt:image.alt,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",transform:`scale(${zoom})`,transformOrigin:zoomOrigin}})})});}addPropertyControls(ScrollImageFrame,{image:{type:ControlType.ResponsiveImage,title:\"Image\"},scrollSpeed:{type:ControlType.Number,title:\"Scroll Speed\",defaultValue:50,min:0,max:200,step:10,unit:\"px\"},direction:{type:ControlType.Enum,title:\"Direction\",options:[\"up\",\"down\"],optionTitles:[\"Up\",\"Down\"],defaultValue:\"down\",displaySegmentedControl:true},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"16px\"},zoom:{type:ControlType.Number,title:\"Zoom\",defaultValue:1.1,min:1,max:3,step:.05},zoomOrigin:{type:ControlType.Enum,title:\"Zoom Origin\",options:[\"center\",\"top\",\"bottom\",\"left\",\"right\"],optionTitles:[\"Center\",\"Top\",\"Bottom\",\"Left\",\"Right\"],defaultValue:\"center\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollImageFrame\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollImageFrame.map"],"mappings":"yOAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,QAAM,CAAC,IAAI,sEAAsE,IAAI,mBAAmB,EAAE,cAAY,YAAU,eAAa,OAAK,cAAY,EAAY,EAAaA,EAAO,IAAI,EAAO,CAAC,mBAAiB,EAAU,CAAC,OAAO,EAAa,OAAO,CAAC,YAAY,WAAW,CAAC,CAAC,EAAQ,EAAW,IAAY,OAAO,EAAY,CAAC,EAAkB,EAAE,EAAa,EAAgB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAW,CAAU,CAAC,EAAE,OAAoB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,cAAY,EAAE,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,GAAC,EAAE,SAAsB,EAAK,MAAM,CAAC,IAAI,EAAM,IAAI,IAAI,EAAM,IAAI,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,UAAU,QAAQ,UAAU,SAAS,EAAK,GAAG,gBAAgB,CAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,iBAH/zB,IAAyD,IAA0B,IAAoD,EAGyrB,EAAoB,EAAiB,CAAC,MAAM,CAAC,KAAK,EAAY,gBAAgB,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