{"version":3,"file":"GradientText.Bv3_ivN9.mjs","names":["useRef","__esmMin","window","init_npm_react_18_3_1","init_ssg_sandbox_shims","de","init_jsx_runtime","J","ce","paint","root","el","from","grad","useGradient","box","t","withGradientHighlight","Component","props","withGradientTMS","withGradientHRM","init_GradientText"],"sources":["https:/framerusercontent.com/modules/QEG0f8K3z528FYGdfjsp/lkXA0qlI1jXp5Dnr50Xx/GradientText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useRef}from\"react\";// Turns highlighted words (solid brand colour) into the product gradient\nfunction paint(root,from,grad){if(!root)return;root.querySelectorAll(\"span, strong, em, a, p, h1, h2, h3, h4, h5, h6\").forEach(el=>{if(el.dataset.opGrad)return;if(getComputedStyle(el).color!==from)return;el.dataset.opGrad=\"1\";el.style.backgroundImage=grad;el.style.setProperty(\"-webkit-background-clip\",\"text\");el.style.backgroundClip=\"text\";el.style.setProperty(\"-webkit-text-fill-color\",\"transparent\");el.style.color=\"transparent\";// Thai tone marks / vowels sit above the font box: extend the painted area so they aren't clipped.\n// Vertical padding on inline elements doesn't change line layout.\nel.style.paddingTop=\"0.3em\";el.style.paddingBottom=\"0.15em\";el.style.setProperty(\"-webkit-box-decoration-break\",\"clone\");el.style.setProperty(\"box-decoration-break\",\"clone\");});}function useGradient(from,grad){const box=useRef(null);useEffect(()=>{const el=box.current;paint(el,from,grad);const t=window.setTimeout(()=>paint(el,from,grad),400);return()=>window.clearTimeout(t);});return box;}/** OneWMS: cyan → blue */export function withGradientHighlight(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const box=useGradient(\"rgb(1, 254, 237)\",\"linear-gradient(90deg, #01FEED 0%, #0084FF 100%)\");return /*#__PURE__*/_jsx(\"div\",{ref:box,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}/** OneTMS: orange → amber */export function withGradientTMS(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const box=useGradient(\"rgb(254, 71, 3)\",\"linear-gradient(90deg, #FE4703 0%, #FFA53D 100%)\");return /*#__PURE__*/_jsx(\"div\",{ref:box,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}/** OneHRM: violet → lilac */export function withGradientHRM(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const box=useGradient(\"rgb(139, 92, 246)\",\"linear-gradient(90deg, #8B5CF6 0%, #D17BFF 100%)\");return /*#__PURE__*/_jsx(\"div\",{ref:box,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}/** OneWMS logo: cyan -> sky -> indigo (same stops as the OneWMS logo). Canvas text colour rgb(5, 215, 240). */export function withGradientWMSLogo(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const box=useGradient(\"rgb(5, 215, 240)\",\"linear-gradient(90deg, #05D7F0 0%, #1BACF4 50%, #4C4FFE 100%)\");return /*#__PURE__*/_jsx(\"div\",{ref:box,style:{display:\"contents\"},children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withGradientTMS\":{\"type\":\"reactHoc\",\"name\":\"withGradientTMS\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGradientWMSLogo\":{\"type\":\"reactHoc\",\"name\":\"withGradientWMSLogo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGradientHighlight\":{\"type\":\"reactHoc\",\"name\":\"withGradientHighlight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGradientHRM\":{\"type\":\"reactHoc\",\"name\":\"withGradientHRM\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientText.map"],"mappings":"A,yIACA,SAASS,EAAM,EAAK,EAAK,EAAK,CAAKC,GAAYA,EAAK,iBAAiB,gDAAgD,CAAC,CAAC,QAAQ,GAAI,CAAIC,EAAG,QAAQ,QAAiB,iBAAiBA,CAAE,CAAC,CAAC,QAA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