{"version":3,"file":"AnimatedGradientText.CrRXC6OJ.mjs","names":["useRef","useMemo","__esmMin","init_npm_react_18_3_1","pe","de","init_jsx_runtime","c","useInView","init_framer_motion_DhsWWWsN","motion","addPropertyControls","init_framer_BWFVvmND","ControlType","useIsStaticRenderer","AnimatedGradientText","props","isStatic","ref","inView","gradient","c3","useThirdColor","color3","angle","color1","color2","isFillWidth","style","isFixedHeight","spanStyle","backgroundSize","animate","font","wrapText","lineHeight","textTransform","shouldAnimate","duration","easing","text","init_AnimatedGradientText"],"sources":["https:/framerusercontent.com/modules/Biapq8TybbO7BLq8t9Hb/JCCPg4HGKyRi8DxqcDfa/AnimatedGradientText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo,useRef}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,useInView}from\"framer-motion\";/* Instructions:\nUpdate AnimatedGradientText so text can optionally wrap across multiple lines,\nadd an explicit adjustable line-height control, preserve existing controls/defaults,\nand keep animated gradient behavior working in SSR/static rendering. *//**\n * Animated Gradient Text\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function AnimatedGradientText(props){const{text,font,color1,color2,color3,useThirdColor,angle,duration,easing,backgroundSize,animate,textTransform,wrapText,lineHeight,style}=props;const isStatic=useIsStaticRenderer();const ref=useRef(null);const inView=useInView(ref,{amount:.2});const gradient=useMemo(()=>{const c3=useThirdColor?`, ${color3}`:\"\";return`linear-gradient(${angle}deg, ${color1}, ${color2}${c3})`;},[angle,color1,color2,color3,useThirdColor]);const isFillWidth=!!style&&style.width===\"100%\";const isFixedHeight=!!style&&style.height===\"100%\";const spanStyle=useMemo(()=>({...style,position:\"relative\",display:\"block\",minWidth:0,...isFillWidth?{width:\"100%\",maxWidth:\"100%\"}:{},...isFixedHeight?{height:\"100%\"}:{},backgroundImage:gradient,backgroundSize:`${backgroundSize}% ${backgroundSize}%`,backgroundRepeat:\"no-repeat\",backgroundClip:\"text\",WebkitBackgroundClip:\"text\",color:\"transparent\",WebkitTextFillColor:\"transparent\",willChange:animate&&!isStatic?\"background-position\":undefined,textTransform,...font,lineHeight,whiteSpace:wrapText?\"normal\":\"nowrap\",overflowWrap:wrapText?\"anywhere\":\"normal\",wordBreak:wrapText?\"break-word\":\"normal\"}),[animate,backgroundSize,font,gradient,isFillWidth,isFixedHeight,isStatic,lineHeight,textTransform,wrapText,style]);const shouldAnimate=animate&&!isStatic&&inView;return /*#__PURE__*/_jsx(motion.span,{ref:ref,style:spanStyle,animate:shouldAnimate?{backgroundPosition:[\"0% 50%\",\"100% 50%\",\"0% 50%\"]}:{backgroundPosition:\"50% 50%\"},transition:shouldAnimate?{duration:Math.max(.2,duration),ease:easing,repeat:Infinity,repeatType:\"loop\"}:undefined,\"aria-label\":text,role:\"text\",children:text});}addPropertyControls(AnimatedGradientText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Animated Gradient\"},textTransform:{type:ControlType.Enum,title:\"Transform\",options:[\"none\",\"uppercase\",\"lowercase\",\"capitalize\"],optionTitles:[\"None\",\"UPPERCASE\",\"lowercase\",\"Capitalize\"],defaultValue:\"none\"},wrapText:{type:ControlType.Boolean,title:\"Wrap Text\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.1,min:.8,max:3,step:.05},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"40px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},color1:{type:ControlType.Color,title:\"Color 1\",defaultValue:\"#000000\"},color2:{type:ControlType.Color,title:\"Color 2\",defaultValue:\"#CCCCCC\"},useThirdColor:{type:ControlType.Boolean,title:\"Color 3\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},color3:{type:ControlType.Color,title:\" \",defaultValue:\"#000000\",hidden:({useThirdColor})=>!useThirdColor},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:90,min:0,max:360,step:1,unit:\"deg\"},backgroundSize:{type:ControlType.Number,title:\"Spread\",defaultValue:200,min:100,max:600,step:10,unit:\"%\"},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:4,min:.2,max:20,step:.1,unit:\"s\",hidden:({animate})=>!animate},easing:{type:ControlType.Enum,title:\"Easing\",options:[\"linear\",\"easeIn\",\"easeOut\",\"easeInOut\"],optionTitles:[\"Linear\",\"Ease In\",\"Ease Out\",\"Ease In Out\"],defaultValue:\"easeInOut\",hidden:({animate})=>!animate}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedGradientText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnimatedGradientText.map"],"mappings":"A,iPAQG,SAAwBe,EAAqB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,SAAO,SAAO,SAAO,gBAAc,QAAM,WAAS,SAAO,iBAAe,UAAQ,gBAAc,WAAS,aAAW,SAAOC,EAAYC,EAASH,EAAoB,EAAQI,EAAIlB,EAAO,IAAI,EAAQmB,EAAOX,EAAUU,EAAI,CAAC,OAAO,EAAE,CAAC,EAAQE,EAASnB,MAAY,CAAC,IAAMoB,EAAGC,EAAc,KAAKC,IAAS,GAAG,MAAM,mBAAmBC,EAAM,OAAOC,EAAO,IAAIC,IAASL,EAAG,EAAG,EAAE,CAACG,EAAMC,EAAOC,EAAOH,EAAOD,CAAa,CAAC,EAAQK,EAAY,CAAC,CAACC,GAAOA,EAAM,QAAQ,OAAaC,EAAc,CAAC,CAACD,GAAOA,EAAM,SAAS,OAAaE,EAAU7B,OAAa,C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