{"version":3,"file":"ScrollFadeText.CQWofZVY.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/772bxhDX1b31546JtB1q/uPl0f2JRlVjENTKhXpng/ScrollFadeText.js"],"sourcesContent":["// Standalone image scatter effect that can be applied to any content - images scatter outward on scroll\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 any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicHeight 800\n * @framerIntrinsicWidth 1200\n * @framerComponentUrl https://framer.com/m/Scroll-Scatter-xK9L.js\n */export default function ScrollScatter(props){const{scatterDuration=2e3,sectionFadeOut=true,sectionFadeStart=.9,sectionFadeEnd=1}=props;const containerRef=useRef(null);const{scrollYProgress}=useScroll({target:containerRef,offset:[\"start start\",\"end end\"]});// Section fade out animation\nconst sectionOpacity=useTransform(scrollYProgress,[sectionFadeStart,sectionFadeEnd],sectionFadeOut?[1,0]:[1,1]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...props.style,position:\"relative\",width:\"100%\",height:`${scatterDuration}px`},role:\"region\",\"aria-label\":\"Scroll container\",children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"sticky\",top:\"50%\",transform:\"translateY(-50%)\",width:\"100%\",height:\"100vh\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"visible\",opacity:sectionOpacity}})});}addPropertyControls(ScrollScatter,{sectionFadeOut:{type:ControlType.Boolean,title:\"Section Fade Out\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},sectionFadeStart:{type:ControlType.Number,title:\"Fade Start\",defaultValue:.9,min:0,max:1,step:.01,hidden:({sectionFadeOut})=>!sectionFadeOut},sectionFadeEnd:{type:ControlType.Number,title:\"Fade End\",defaultValue:1,min:0,max:1,step:.01,hidden:({sectionFadeOut})=>!sectionFadeOut},scatterDuration:{type:ControlType.Number,title:\"Scroll Duration\",defaultValue:4e3,min:500,max:5e3,step:100,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollScatter\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerComponentUrl\":\"https://framer.com/m/Scroll-Scatter-xK9L.js\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollFadeText.map"],"mappings":"yOAOG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,kBAAgB,IAAI,iBAAe,GAAK,mBAAiB,GAAG,iBAAe,GAAG,EAAY,EAAaA,EAAO,KAAK,CAAM,CAAC,mBAAiB,EAAU,CAAC,OAAO,EAAa,OAAO,CAAC,cAAc,UAAU,CAAC,CAAC,CAC5P,EAAe,EAAa,EAAgB,CAAC,EAAiB,EAAe,CAAC,EAAe,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAC,IAAI,EAAa,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,WAAW,MAAM,OAAO,OAAO,GAAG,EAAgB,IAAI,CAAC,KAAK,SAAS,aAAa,mBAAmB,SAAsB,EAAK,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,SAAS,IAAI,MAAM,UAAU,mBAAmB,MAAM,OAAO,OAAO,QAAQ,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,UAAU,QAAQ,EAAe,CAAC,CAAC,CAAC,CAAC,kBAPte,IAAyD,IAA0B,IAAoD,CAOiW,EAAoB,EAAc,CAAC,eAAe,CAAC,KAAK,EAAY,QAAQ,MAAM,mBAAmB,aAAa,GAAK,aAAa,KAAK,cAAc,MAAM,CAA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