{"version":3,"file":"GradH1.BTnDnOS4.mjs","names":["highlights","text","React.Fragment"],"sources":["https:/framerusercontent.com/modules/HrTqL7Xf7xmhtAoMheQe/KMoHr7tp2BDU6Y4atGRu/GradH1.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function GradientHeadline(props){const{text,highlight,gradient,fontSize,lineHeight,color,textAlign,fontFamily}=props;const safeText=text?.trim()||\"Your headline here\";const highlights=highlight?.split(\",\").map(s=>s.trim()).filter(Boolean)||[];function renderWithHighlights(text,highlights){if(highlights.length===0)return text;const escaped=highlights.map(h=>h.replace(/[-[\\]/{}()*+?.\\\\^$|]/g,\"\\\\$&\"));const regex=new RegExp(`(${escaped.join(\"|\")})`,\"gi\");const parts=text.split(regex);return parts.map((part,index)=>{const match=highlights.find(h=>h.toLowerCase()===part.toLowerCase());if(match){return /*#__PURE__*/_jsx(\"span\",{style:{background:gradient,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",display:\"inline\",fontWeight:400},children:part},index);}return /*#__PURE__*/_jsx(React.Fragment,{children:part},index);});}return /*#__PURE__*/_jsx(\"h1\",{style:{fontSize,lineHeight:`${lineHeight}px`,textAlign,color,fontFamily,fontWeight:400,margin:0},children:renderWithHighlights(safeText,highlights)});}addPropertyControls(GradientHeadline,{text:{type:ControlType.String,title:\"Full Text\",defaultValue:\"The future is bold and beautiful\"},highlight:{type:ControlType.String,title:\"Highlight Words\",defaultValue:\"bold, beautiful\",placeholder:\"Separate multiple with commas\"},gradient:{type:ControlType.String,title:\"Gradient\",defaultValue:\"linear-gradient(90deg, #1FDCB3, #4D3BCD)\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:48,min:10},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:56,min:10},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\"},color:{type:ControlType.Color,title:\"Fallback Color\",defaultValue:\"#000000\"},fontFamily:{type:ControlType.String,title:\"Font\",defaultValue:\"Gotham Book, sans-serif\",placeholder:\"e.g. Gotham Book, sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"GradientHeadline\":{\"type\":\"reactComponent\",\"name\":\"GradientHeadline\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradH1.map"],"mappings":"0KAA2H,SAAgB,EAAiB,EAAM,CAAC,GAAK,CAAC,OAAK,YAAU,WAAS,WAAS,aAAW,QAAM,YAAU,cAAY,EAAY,EAAS,GAAM,MAAM,EAAE,qBAA2B,EAAW,GAAW,MAAM,IAAI,CAAC,IAAI,GAAG,EAAE,MAAM,CAAC,CAAC,OAAO,QAAQ,EAAE,EAAE,CAAC,SAAS,EAAqB,EAAK,EAAW,CAAC,GAAGA,EAAW,SAAS,EAAE,OAAOC,EAAK,IAAM,EAAQD,EAAW,IAAI,GAAG,EAAE,QAAQ,wBAAwB,OAAO,CAAC,CAAO,EAAU,OAAO,IAAI,EAAQ,KAAK,IAAI,CAAC,GAAG,KAAK,CAA+B,OAAlBC,EAAK,MAAM,EAAM,CAAc,KAAK,EAAK,IAAqBD,EAAW,KAAK,GAAG,EAAE,aAAa,GAAG,EAAK,aAAa,CAAC,CAA+B,EAAK,OAAO,CAAC,MAAM,CAAC,WAAW,EAAS,qBAAqB,OAAO,oBAAoB,cAAc,QAAQ,SAAS,WAAW,IAAI,CAAC,SAAS,EAAK,CAAC,EAAM,CAAsB,EAAKE,EAAe,CAAC,SAAS,EAAK,CAAC,EAAM,CAAG,CAAE,OAAoB,EAAK,KAAK,CAAC,MAAM,CAAC,WAAS,WAAW,GAAG,EAAW,IAAI,YAAU,QAAM,aAAW,WAAW,IAAI,OAAO,EAAE,CAAC,SAAS,EAAqB,EAAS,EAAW,CAAC,CAAC,kBAArlC,IAA4B,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