{"version":3,"file":"GradientText.UODfpUTa.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/gm7FlncXrqFkzDMv2t2o/oGGvqU2ZlevIKQiGC8We/GradientText.js"],"sourcesContent":["// Gradient text component with special markup syntax using {}\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function GradientText(props){const{text=\"This is {gradient text} with normal text\",gradient=\"linear-gradient(45deg, #FF6B6B, #4ECDC4)\",textColor=\"#000000\",font,element=\"div\"}=props;const processedText=useMemo(()=>{if(!text)return[];// Split by gradient markup and line breaks\nconst parts=text.split(/(\\{[^}]*\\}|\\n)/);return parts.map((part,index)=>{if(part===\"\\n\"){return /*#__PURE__*/_jsx(\"br\",{},index);}// Check for gradient markup\nconst isGradient=part.startsWith(\"{\")&&part.endsWith(\"}\");if(isGradient){const content=part.slice(1,-1);return /*#__PURE__*/_jsx(\"span\",{style:{background:gradient,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",display:\"inline\",...font},children:content},index);}// Regular text\nreturn /*#__PURE__*/_jsx(\"span\",{style:{color:textColor,...font},children:part},index);});},[text,gradient,textColor,font]);const isFixedWidth=props?.style&&props.style.width===\"100%\";const isFixedHeight=props?.style&&props.style.height===\"100%\";const Element=element;return /*#__PURE__*/_jsx(Element,{style:{...props.style,position:\"relative\",width:isFixedWidth?\"100%\":\"max-content\",height:isFixedHeight?\"100%\":\"auto\",display:\"flex\",alignItems:isFixedHeight?\"center\":\"flex-start\",textAlign:font?.textAlign||\"left\",margin:0,padding:0},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\"},children:processedText})});}addPropertyControls(GradientText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"This is {gradient text} with normal text\",displayTextArea:true,placeholder:\"Use {} for gradient text\"},element:{type:ControlType.Enum,title:\"HTML Element\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"span\",\"div\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"Paragraph\",\"Span\",\"Div\"],defaultValue:\"div\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Regular\",letterSpacing:\"0em\",lineHeight:\"1.2em\"}},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},gradient:{type:ControlType.String,title:\"Gradient CSS\",defaultValue:\"linear-gradient(45deg, #FF6B6B, #4ECDC4)\",placeholder:\"e.g. linear-gradient(45deg, #FF6B6B, #4ECDC4)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientText.map"],"mappings":"0KAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,2CAA2C,WAAS,2CAA2C,YAAU,UAAU,OAAK,UAAQ,OAAO,EAAY,EAAcA,MAAiB,EAChO,EAAK,MAAM,iBAAiB,CAAc,KAAK,EAAK,IAAQ,CAAC,GAAG,IAAO;EAAM,OAAoB,EAAK,KAAK,EAAE,CAAC,EAAM,CACtE,GAAzC,EAAK,WAAW,IAAI,EAAE,EAAK,SAAS,IAAI,CAAe,CAAC,IAAM,EAAQ,EAAK,MAAM,EAAE,GAAG,CAAC,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,WAAW,EAAS,qBAAqB,OAAO,oBAAoB,cAAc,eAAe,OAAO,QAAQ,SAAS,GAAG,EAAK,CAAC,SAAS,EAAQ,CAAC,EAAM,CAC1S,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EA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