{"version":3,"file":"AnimatedGradientText.CTO0bol8.mjs","names":["useRef","useMemo"],"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":"kPAQG,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,SAAO,SAAO,SAAO,gBAAc,QAAM,WAAS,SAAO,iBAAe,UAAQ,gBAAc,WAAS,aAAW,SAAO,EAAY,EAAS,EAAoB,EAAQ,EAAIA,EAAO,IAAI,EAAQ,EAAO,EAAU,EAAI,CAAC,OAAO,EAAE,CAAC,EAAQ,EAASC,MAAY,CAAC,IAAM,EAAG,EAAc,KAAK,IAAS,GAAG,MAAM,mBAAmB,EAAM,OAAO,EAAO,IAAI,IAAS,EAAG,EAAG,EAAE,CAAC,EAAM,EAAO,EAAO,EAAO,CAAa,CAAC,EAAQ,EAAY,CAAC,CAAC,GAAO,EAAM,QAAQ,OAAa,EAAc,CAAC,CAAC,GAAO,EAAM,SAAS,OAAa,EAAUA,OAAa,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,QAAQ,SAAS,EAAE,GAAG,EAAY,CAAC,MAAM,OAAO,SAAS,MAAM,EAAE,CAAC,EAAE,GAAG,EAAc,CAAC,OAAO,MAAM,EAAE,CAAC,EAAE,gBAAgB,EAAS,eAAe,GAAG,EAAe,IAAI,EAAe,GAAG,iBAAiB,YAAY,eAAe,OAAO,qBAAqB,OAAO,MAAM,cAAc,oBAAoB,cAAc,WAAW,GAAS,CAAC,EAAS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