{"version":3,"file":"Text_effect_code_override.bA8qfNh0.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","c","init_jsx_runtime","de","useMotionTemplate","useTransform","useScroll","init_framer_motion_DhsWWWsN","withDiagonalReveal","ref","revealProgress","scrollYProgress","CONFIG","endStop","startStop","v","maskImage","Component","props","init_Text_effect_code_override"],"sources":["https:/framerusercontent.com/modules/CZxQzJaDKGURQfx5KD3e/HKqZZn7Tik3FEqhWV89L/Text_effect_code_override.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef}from\"react\";import{useScroll,useTransform,useMotionTemplate}from\"framer-motion\";// ─────────────────────────────────────────────────────────────\n// CONFIG — overrides can't show property controls, so tune here.\n// ─────────────────────────────────────────────────────────────\nconst CONFIG={angle:115,softness:40,dimmedOpacity:.12,scrollStart:.15,scrollEnd:.65};// ─────────────────────────────────────────────────────────────\nexport function withDiagonalReveal(Component){return props=>{const ref=useRef(null);// 0 = element top hits viewport bottom (just entering)\n// 1 = element bottom hits viewport top (just leaving)\nconst{scrollYProgress}=useScroll({target:ref,offset:[\"start end\",\"end start\"]});// Map the active scroll range to 0–1 reveal progress.\nconst revealProgress=useTransform(scrollYProgress,[CONFIG.scrollStart,CONFIG.scrollEnd],[0,1],{clamp:true});// The gradient's end stop sweeps across; the start stop trails it\n// by `softness` to create the smooth transition band.\nconst endStop=useTransform(revealProgress,[0,1],[-10,140]);const startStop=useTransform(endStop,v=>v-CONFIG.softness);const maskImage=useMotionTemplate`linear-gradient(${CONFIG.angle}deg, rgba(0,0,0,1) ${startStop}%, rgba(0,0,0,${CONFIG.dimmedOpacity}) ${endStop}%)`;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,WebkitMaskImage:maskImage,maskImage:maskImage,WebkitMaskRepeat:\"no-repeat\",maskRepeat:\"no-repeat\",WebkitMaskSize:\"100% 100%\",maskSize:\"100% 100%\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withDiagonalReveal\":{\"type\":\"reactHoc\",\"name\":\"withDiagonalReveal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_effect_code_override.map"],"mappings":"A,iLAIA,SAAgBU,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMC,EAAIX,EAAO,IAAI,EAE7E,CAAC,mBAAiBQ,EAAU,CAAC,OAAOG,EAAI,OAAO,CAAC,YAAY,WAAW,CAAC,CAAC,EACxEC,EAAeL,EAAaM,EAAgB,CAACC,EAAO,YAAYA,EAAO,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAI,CAAC,EAEpGC,EAAQR,EAAaK,EAAe,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,GAAG,CAAC,EAAQI,EAAUT,EAAaQ,EAAQ,GAAGE,EAAEH,EAAO,QAAQ,EAAQI,EAAU,CAAiB,mBAAmBJ,EAAO,MAAM,qBAAqBE,EAAU,gBAAgBF,EAAO,cAAc,IAAIC,EAAQ,IAAI,MAAoB,gBAAKI,EAAU,CAAK,MAAI,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,gBAAgBF,EAAoB,YAAU,iBAAiB,YAAY,WAAW,YAAY,eAAe,YAAY,SAAS,WAAW,CAAC,CAAC,CAAE,CAAE,C,gDANve,EAAO,CAAC,MAAM,IAAI,SAAS,GAAG,cAAc,IAAI,YAAY,IAAI,UAAU,GAAG,C"}