{"version":3,"file":"GradientHeading.CSJsIG4k.mjs","names":["__esmMin","init_npm_react_18_3_1","ce","init_jsx_runtime","c","addPropertyControls","init_framer_BptO5W0R","GradientHeading","props","animName","duration","gradient","angle","colors","id","styleEl","fontSize","text","init_GradientHeading","ControlType"],"sources":["https:/framerusercontent.com/modules/t8645clVf5zUxV0XhctX/NGav7XES06ttmrCnPuUC/GradientHeading.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * GradientHeading — H3-sized animated gradient text.\n *\n * Inline gradient moving text primitive that matches the project's\n * /Heading/Heading 3 text style (40px / 48px / InterDisplay / -0.02em).\n * Use when you want the gradient animation on just a portion of a heading.\n *\n * Keyframes are injected into <head> on the client (not rendered as a\n * <style> child of the text span). A <style> raw-text element nested inside\n * the background-clip span corrupts Framer's static HTML export — especially\n * around ampersands — producing invalid tokens like </&amp;>. Keeping the\n * span text-only guarantees valid published HTML.\n *\n * Text alignment: `textAlign` only shows a visible effect when the instance\n * is wider than the text. Set the instance width to Fill (or a fixed width\n * wider than the copy), then choose Center/Right.\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 48\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function GradientHeading(props){const{text,colors,angle,duration,fontSize,textAlign}=props;const animName=`gh-move-${duration}`;const gradient=`linear-gradient(${angle}deg, ${colors.join(\", \")})`;// Inject keyframes once, client-side only. This keeps the rendered output\n// a clean text-only <span> so Framer's SSR/static export stays valid HTML.\nReact.useEffect(()=>{if(typeof document===\"undefined\")return;const id=`gradient-heading-kf-${duration}`;if(document.getElementById(id))return;const styleEl=document.createElement(\"style\");styleEl.id=id;styleEl.textContent=`@keyframes ${animName} { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } }`;document.head.appendChild(styleEl);},[duration,animName]);return /*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",width:\"100%\",textAlign,fontFamily:'\"HK Nova\", InterDisplay, \"Inter Display\", Inter, system-ui, sans-serif',fontWeight:700,fontSize:`${fontSize}px`,lineHeight:`${Math.round(fontSize*1.2)}px`,letterSpacing:\"-0.02em\",backgroundImage:gradient,backgroundSize:\"300% 300%\",WebkitBackgroundClip:\"text\",backgroundClip:\"text\",WebkitTextFillColor:\"transparent\",color:\"transparent\",animation:`${animName} ${duration}s ease-in-out infinite`},children:text});}GradientHeading.defaultProps={text:\"Gradient Text\",colors:[\"#5E59EB\",\"#00FFB3\",\"#5E59EB\"],angle:90,duration:10,fontSize:40,textAlign:\"left\"};addPropertyControls(GradientHeading,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Gradient Text\"},colors:{type:ControlType.Array,title:\"Colors\",control:{type:ControlType.Color},maxCount:5,defaultValue:[\"#5E59EB\",\"#00FFB3\",\"#5E59EB\"]},angle:{type:ControlType.Number,title:\"Angle\",min:0,max:360,unit:\"\\xb0\",defaultValue:90},duration:{type:ControlType.Number,title:\"Speed\",min:2,max:30,step:1,unit:\"s\",defaultValue:10},fontSize:{type:ControlType.Number,title:\"Size\",min:12,max:128,step:1,unit:\"px\",defaultValue:40},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientHeading\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"48\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientHeading.map"],"mappings":"A,qKAqBG,SAAwBO,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,SAAO,QAAM,WAAS,WAAS,aAAWC,EAAYC,EAAS,WA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