{"version":3,"file":"SplitTextReveal.CPT1FwSf.mjs","names":["React.useRef","React.Fragment","React.useState"],"sources":["https:/framerusercontent.com/modules/AgfhytFxI1O4vxoYxZ3S/CE6moKroVtYWXkmcqhgU/SplitTextReveal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView,useReducedMotion}from\"framer-motion\";/**\r\n * @framerIntrinsicWidth 800\r\n * @framerIntrinsicHeight 180\r\n * @framerSupportedLayoutWidth any-prefer-fixed\r\n * @framerSupportedLayoutHeight auto\r\n */export default function SplitTextReveal({text=\"Make something\",accentText=\"worth feeling.\",color=\"#FFF4DE\",accent=\"#FF7954\",delay=0,stagger=.025,size=88,tag=\"h2\",font,style}){const root=React.useRef(null),inView=useInView(root,{once:true,amount:.18}),staticMode=useIsStaticRenderer(),reduce=useLiveReducedMotion(),Tag=tag;const visible=staticMode||reduce||inView;const phrase=[text,accentText].filter(Boolean).join(\" \");return /*#__PURE__*/_jsx(Tag,{ref:root,\"aria-label\":phrase,style:{...style,position:\"relative\",margin:0,color,fontFamily:\"Barlow Condensed, sans-serif\",fontWeight:600,fontSize:`clamp(${Math.min(48,size)}px, 7.5vw, ${size}px)`,lineHeight:.98,letterSpacing:\"-.025em\",...font},children:[text,accentText].map((line,j)=>/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"block\",color:j?accent:color},children:line.split(\" \").map((word,k)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[k>0&&\" \",/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",whiteSpace:\"nowrap\"},children:Array.from(word).map((char,i)=>/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",overflow:\"hidden\",verticalAlign:\"top\",paddingBottom:\".12em\",marginBottom:\"-.12em\"},children:/*#__PURE__*/_jsx(motion.span,{style:{display:\"inline-block\"},initial:staticMode||reduce?false:{y:\"110%\",rotate:3},animate:{y:visible?0:\"110%\",rotate:visible?0:3},transition:{duration:staticMode||reduce?0:.8,delay:staticMode||reduce?0:delay+j*.12+k*.05+i*stagger,ease:[.22,1,.36,1]},children:char})},i))})]},k))},j))});}addPropertyControls(SplitTextReveal,{text:{type:ControlType.String,defaultValue:\"Make something\"},accentText:{type:ControlType.String,defaultValue:\"worth feeling.\"},color:{type:ControlType.Color,defaultValue:\"#FFF4DE\"},accent:{type:ControlType.Color,defaultValue:\"#FF7954\"},size:{type:ControlType.Number,defaultValue:88,min:24,max:240},delay:{type:ControlType.Number,defaultValue:0,min:0,max:2,step:.05},stagger:{type:ControlType.Number,defaultValue:.025,min:0,max:.08,step:.005},tag:{type:ControlType.Enum,options:[\"h1\",\"h2\",\"h3\",\"p\"],defaultValue:\"h2\"},font:{type:ControlType.Font,controls:\"extended\"}});// Subscribe to preference changes as well as the initial Motion setting.\n// Kept local so this Framer file can be copied independently.\nfunction useLiveReducedMotion(){const initial=useReducedMotion();const[reduced,setReduced]=React.useState(Boolean(initial));React.useEffect(()=>{const media=window.matchMedia(\"(prefers-reduced-motion: reduce)\");const update=()=>setReduced(media.matches);update();media.addEventListener(\"change\",update);return()=>media.removeEventListener(\"change\",update);},[]);return reduced;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SplitTextReveal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"180\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SplitTextReveal.map"],"mappings":"2RAKG,SAAwB,EAAgB,CAAC,OAAK,iBAAiB,aAAW,iBAAiB,QAAM,UAAU,SAAO,UAAU,QAAM,EAAE,UAAQ,KAAK,OAAK,GAAG,MAAI,KAAK,OAAK,SAAO,CAAC,IAAM,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