{"version":3,"file":"Text_Opacity_Letters.DHLbrzCd.mjs","names":["React.useContext","React.useMemo","React.Fragment","useRef","React.useId","Image1","useRef"],"sources":["https:/framerusercontent.com/modules/hspiK3X3qhq6pgT7fa4A/GWMZw8fBc3HkJLfcnIxB/GFjsWOTJB.js","https:/framerusercontent.com/modules/c9FVHzQYDfzWy7Ll7MiD/0rb5xtu3LcgzgxoDOTSv/Text_Opacity_Letters.js"],"sourcesContent":["// Generated by Framer (eda58b2)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,getLoadingLazyAtYPosition,Image as Image1,useComponentViewport,useLocaleInfo,useVariantState,withCSS}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const serializationHash=\"framer-h0PYt\";const variantClassNames={CuBGeLGGv:\"framer-v-bsbm5v\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const B1_4iG1nE=undefined;const transition1={bounce:0,delay:0,duration:.6,type:\"spring\"};const toResponsiveImage=value=>{if(typeof value===\"object\"&&value!==null&&typeof value.src===\"string\"){return value;}return typeof value===\"string\"?{src:value}:undefined;};const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const Variants=motion.create(React.Fragment);const getProps=({height,id,image,width,...props})=>{return{...props,B1_4iG1nE:image??props.B1_4iG1nE??{pixelHeight:1337,pixelWidth:1080,src:\"https://framerusercontent.com/images/DFMYuERcJoJGVvcvbEs1kwyBdYM.png?width=1080&height=1337\",srcSet:\"https://framerusercontent.com/images/DFMYuERcJoJGVvcvbEs1kwyBdYM.png?scale-down-to=1024&width=1080&height=1337 827w,https://framerusercontent.com/images/DFMYuERcJoJGVvcvbEs1kwyBdYM.png?width=1080&height=1337 1080w\"}};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,B1_4iG1nE,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({defaultVariant:\"CuBGeLGGv\",ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsx(motion.div,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-bsbm5v\",className,classNames),\"data-framer-name\":\"Image \",draggable:\"false\",layoutDependency:layoutDependency,layoutId:\"CuBGeLGGv\",ref:refBinding,style:{borderBottomLeftRadius:10,borderBottomRightRadius:10,borderTopLeftRadius:10,borderTopRightRadius:10,...style},children:/*#__PURE__*/_jsx(Image1,{background:{alt:\"\",fit:\"fill\",loading:getLoadingLazyAtYPosition((componentViewport?.y||0)+(0+((componentViewport?.height||191)-0-((componentViewport?.height||191)-0)*1)/2)),sizes:`max(${componentViewport?.width||\"100vw\"}, 1px)`,...toResponsiveImage(B1_4iG1nE)},className:\"framer-1hl6bjp\",draggable:\"false\",layoutDependency:layoutDependency,layoutId:\"JTC0Y1dkx\"})})})})});});const css=[\"@supports (aspect-ratio: 1) { body { --framer-aspect-ratio-supported: auto; } }\",\".framer-h0PYt.framer-132yexz, .framer-h0PYt .framer-132yexz { display: block; }\",\".framer-h0PYt.framer-bsbm5v { align-content: center; align-items: center; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; height: 191px; justify-content: center; overflow: hidden; padding: 0px; position: relative; width: 171px; will-change: var(--framer-will-change-override, transform); }\",\".framer-h0PYt .framer-1hl6bjp { flex: 1 0 0px; height: 100%; overflow: visible; position: relative; width: 1px; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 191\n * @framerIntrinsicWidth 171\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerVariables {\"B1_4iG1nE\":\"image\"}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const FramerGFjsWOTJB=withCSS(Component,css,\"framer-h0PYt\");export default FramerGFjsWOTJB;FramerGFjsWOTJB.displayName=\"Galley Card\";FramerGFjsWOTJB.defaultProps={height:191,width:171};addPropertyControls(FramerGFjsWOTJB,{B1_4iG1nE:{__defaultAssetReference:\"data:framer/asset-reference,DFMYuERcJoJGVvcvbEs1kwyBdYM.png?originalFilename=01.png&preferredSize=auto\",title:\"Image\",type:ControlType.ResponsiveImage}});addFonts(FramerGFjsWOTJB,[{explicitInter:true,fonts:[]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"FramerGFjsWOTJB\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerVariables\":\"{\\\"B1_4iG1nE\\\":\\\"image\\\"}\",\"framerComponentViewportWidth\":\"true\",\"framerImmutableVariables\":\"true\",\"framerIntrinsicHeight\":\"191\",\"framerIntrinsicWidth\":\"171\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerAutoSizeImages\":\"true\",\"framerDisplayContentsDiv\":\"false\",\"framerColorSyntax\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GFjsWOTJB.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useTransform}from\"framer-motion\";import{useRef,useEffect}from\"react\";const EachCharacter=({char,start,end,progress,duration,easing,index,transitionStartIndex})=>{const colorProgress=useTransform(progress,[start,end],[\"#ADADAD\",\"#000000\"]);const initialColor=index<transitionStartIndex?\"#000000\":\"#ADADAD\";return /*#__PURE__*/_jsx(motion.span,{style:{color:index<transitionStartIndex?initialColor:colorProgress},transition:{duration:duration,ease:easing},children:char});};const EachWord=({word,progress,starting,ending,duration,easing,transitionStartIndex,currentCharacterIndex})=>{const characters=word.split(\"\");const wordLength=word.length;const amount=ending-starting;const step=amount/wordLength;return /*#__PURE__*/_jsxs(motion.span,{children:[characters.map((char,idx)=>{const charStart=starting+step*idx;const charEnd=starting+step*(idx+1);return /*#__PURE__*/_jsx(EachCharacter,{char:char,start:charStart,end:charEnd,progress:progress,duration:duration,easing:easing,index:currentCharacterIndex+idx,transitionStartIndex:transitionStartIndex},idx);}),\"\\xa0\"]});};export default function Text_Color_Letters(props){const{text,duration,easing,fontSize,lineHeight,letterSpacing,paragraphAlign,transitionStartIndex,fontFamily,fontWeight}=props;const words=text.split(\" \");const totalWords=words.length;const ref=useRef(null);const{scrollYProgress}=useScroll({target:ref,offset:[\"start 0.75\",\"start 0.15\"]});useEffect(()=>{const style=document.createElement(\"style\");style.appendChild(document.createTextNode(`\n            @import url('https://fonts.googleapis.com/css2?family=${fontFamily.replace(/ /g,\"+\")}:wght@400;500;700&display=swap');\n        `));document.head.appendChild(style);return()=>{document.head.removeChild(style);};},[fontFamily]);let currentCharacterIndex=0;return /*#__PURE__*/_jsx(\"p\",{ref:ref,style:{fontFamily:`${fontFamily}, sans-serif`,fontSize:`${fontSize}px`,fontWeight:fontWeight,color:\"#ADADAD\",display:\"flex\",flexWrap:\"wrap\",lineHeight:`${lineHeight}px`,letterSpacing:`${letterSpacing}px`,justifyContent:paragraphAlign,margin:0},children:words.map((word,idx)=>{const starting=idx/totalWords;const ending=(idx+1)/totalWords;const wordLength=word.length;const startIdx=currentCharacterIndex;currentCharacterIndex+=wordLength+1// Including space\n;return /*#__PURE__*/_jsx(EachWord,{word:word,progress:scrollYProgress,starting:starting,ending:ending,duration:duration,easing:easing,transitionStartIndex:transitionStartIndex,currentCharacterIndex:startIdx},idx);})});}addPropertyControls(Text_Color_Letters,{text:{title:\"Text\",type:ControlType.String,defaultValue:\"Hello Text\"},fontFamily:{title:\"Font Family\",type:ControlType.String,defaultValue:\"Urbanist\"},fontSize:{title:\"Font Size\",type:ControlType.Number,defaultValue:48,min:10,max:100},fontWeight:{title:\"Font Weight\",type:ControlType.Enum,options:[\"400\",\"500\",\"700\"],optionTitles:[\"Regular\",\"Medium\",\"Bold\"],defaultValue:\"400\"},lineHeight:{title:\"Line Height\",type:ControlType.Number,defaultValue:60,min:10,max:100},letterSpacing:{title:\"Letter Spacing\",type:ControlType.Number,defaultValue:-3,min:-10,max:10},paragraphAlign:{title:\"Paragraph Align\",type:ControlType.Enum,options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\"},duration:{title:\"Duration\",type:ControlType.Number,defaultValue:.3,min:.1,max:3,step:.1},easing:{title:\"Easing\",type:ControlType.Enum,options:[\"easeInOut\",\"easeIn\",\"easeOut\",\"linear\"],optionTitles:[\"Ease In Out\",\"Ease In\",\"Ease Out\",\"Linear\"],defaultValue:\"easeInOut\"},transitionStartIndex:{title:\"Transition Start Index\",type:ControlType.Number,defaultValue:22,min:0,max:1e3}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Text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