{"version":3,"file":"RevealText.CKB48Dko.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/3DMXnaHXlDTEYEzeQBXL/PPbi915qFeyUSWsww3kV/RevealText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useScroll,useTransform,useReducedMotion}from\"framer-motion\";import{useRef}from\"react\";function Word({word,i,n,progress,from,to}){const start=i/n;const end=Math.min(1,start+1.6/n+.04);const color=useTransform(progress,[start,end],[from,to]);return /*#__PURE__*/_jsxs(motion.span,{style:{color},children:[word,\" \"]});}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 900\n */export default function RevealText(props){const{text=\"We don’t rush change. We make room for it — through honest conversation, a steady pace and a relationship you can trust.\",size=44,from=\"#8E8478\",to=\"#1E1B18\",tag=\"p\",align=\"center\"}=props;const ref=useRef(null);const isStatic=useIsStaticRenderer();const reduce=useReducedMotion();const{scrollYProgress}=useScroll({target:ref,offset:[\"start 0.85\",\"end 0.45\"]});const words=(text||\"\").split(/\\s+/).filter(Boolean);const Tag=tag;const base={margin:0,width:\"100%\",fontFamily:'\"Cormorant Garamond\", \"Inter\", sans-serif',fontWeight:400,fontSize:`clamp(${Math.round(size*.62)}px, ${(size/14.4).toFixed(2)}vw, ${size}px)`,lineHeight:1.2,letterSpacing:\"-0.015em\",textAlign:align,...{textWrap:\"balance\"},...props.style,position:\"relative\"};if(isStatic||reduce)return /*#__PURE__*/_jsx(Tag,{ref:ref,style:{...base,color:to},children:text});return /*#__PURE__*/_jsxs(Tag,{ref:ref,style:base,children:[/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",width:1,height:1,margin:-1,padding:0,overflow:\"hidden\",clip:\"rect(0 0 0 0)\",whiteSpace:\"nowrap\",border:0},children:text}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",children:words.map((w,i)=>/*#__PURE__*/_jsx(Word,{word:w,i:i,n:words.length,progress:scrollYProgress,from:from,to:to},i))})]});}addPropertyControls(RevealText,{text:{type:ControlType.String,title:\"Text\",displayTextArea:true,defaultValue:\"We don’t rush change. We make room for it — through honest conversation, a steady pace and a relationship you can trust.\"},size:{type:ControlType.Number,title:\"Max size\",defaultValue:44,min:20,max:96,unit:\"px\"},from:{type:ControlType.Color,title:\"From\",defaultValue:\"#8E8478\"},to:{type:ControlType.Color,title:\"To\",defaultValue:\"#1E1B18\"},tag:{type:ControlType.Enum,title:\"Tag\",options:[\"p\",\"h2\"],defaultValue:\"p\"},align:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\"],optionTitles:[\"Left\",\"Centre\"],defaultValue:\"center\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RevealText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"900\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RevealText.map"],"mappings":"+PAAqO,SAAS,EAAK,CAAC,OAAK,IAAE,IAAE,WAAS,OAAK,MAAI,CAAC,IAAM,EAAM,EAAE,EAA8C,EAAM,EAAa,EAAS,CAAC,EAA/D,KAAK,IAAI,EAAE,EAAM,IAAI,EAAE,GAAgD,CAAC,EAAE,CAAC,EAAK,CAAE,CAAC,EAAE,OAAoB,EAAM,EAAO,KAAK,CAAC,MAAM,CAAC,OAAK,EAAE,SAAS,CAAC,EAAK,GAAG,CAAC,CAAC,CAAE,CAIvc,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,2HAA2H,OAAK,GAAG,OAAK,UAAU,KAAG,UAAU,MAAI,IAAI,QAAM,UAAU,EAAY,EAAIA,EAAO,IAAI,EAAQ,EAAS,EAAoB,EAAQ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