{"version":3,"file":"Gradient.Cr-NHTSG.mjs","names":["React.useMemo"],"sources":["https:/framerusercontent.com/modules/DVuqfDFGYT5yC8kLKR0p/Uc0eNqfvFaOkkSXoc60h/Gradient.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n */export function UncodeGradient(props){const{text,delimiter,gradientAngle,gradientColors,titleColor,font,Align,animateGradient,elementType,useCustomHighlight,highlightFont,codeBy}=props;// Desestrutura as propriedades de fonte\n// Deconstruct font properties\nconst{fontSize,lineHeight,fontFamily,fontWeight}=font;// Injetar @keyframes no <head> apenas uma vez (para animação do gradiente)\n// Inject @keyframes into the <head> only once (for gradient animation).\nReact.useEffect(()=>{const styleId=\"framerGradientAnimationStyle\";if(!document.getElementById(styleId)){const styleElement=document.createElement(\"style\");styleElement.id=styleId;styleElement.textContent=`\n                @keyframes framerGradientAnimation {\n                    0% {\n                        background-position: 0% 50%;\n                    }\n                    50% {\n                        background-position: 100% 50%;\n                    }\n                    100% {\n                        background-position: 0% 50%;\n                    }\n                }\n            `;document.head.appendChild(styleElement);}},[]);// Forçar recriação do elemento principal a cada mudança nas props\n// Force the main element to be recreated on each relevant prop change\nconst refreshKey=React.useMemo(()=>{return[text,delimiter,gradientAngle,gradientColors.join(\"-\"),titleColor,fontSize,lineHeight,fontFamily,fontWeight,Align,animateGradient,elementType,useCustomHighlight,useCustomHighlight&&highlightFont?JSON.stringify(highlightFont):\"\"].join(\"|\");},[text,delimiter,gradientAngle,gradientColors,titleColor,fontSize,lineHeight,fontFamily,fontWeight,Align,animateGradient,elementType,useCustomHighlight,highlightFont]);// Divide o texto com base no delimitador\n// Split the text based on the chosen delimiter\nconst parts=text.split(delimiter);// Monta a string de gradiente\n// Build the gradient string\nconst gradientString=`linear-gradient(${gradientAngle}deg, ${gradientColors.join(\", \")})`;// Estilo base para texto normal (não destacado)\n// Base style for non-highlighted text\nconst normalTextStyle={color:titleColor};// Estilo base para texto em gradiente\n// Base style for gradient-highlighted text\nconst gradientTextStyle={background:gradientString,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",...animateGradient&&{backgroundSize:\"400% 400%\",animation:\"framerGradientAnimation 6s ease infinite\"}};// Se \"useCustomHighlight\" estiver ativo, sobreescreve tipografia dos trechos destacados\n// If \"useCustomHighlight\" is true, override highlighted parts' typography\nif(useCustomHighlight&&highlightFont){const{fontSize:hlFontSize,lineHeight:hlLineHeight,fontFamily:hlFontFamily,fontWeight:hlFontWeight}=highlightFont;gradientTextStyle.fontSize=hlFontSize;gradientTextStyle.lineHeight=hlLineHeight;gradientTextStyle.fontFamily=hlFontFamily;gradientTextStyle.fontWeight=hlFontWeight;}// Definir qual elemento HTML usar (h1–h6 ou p), sem o bold padrão do navegador\n// Decide which HTML element to use (h1–h6 or p), overriding default bold\nconst Tag=elementType;// Monta estilo para o container (override do bold para headings)\n// Build style for container (override bold for headings)\nconst containerStyle={fontFamily,fontSize,lineHeight,fontWeight,textAlign:Align,textWrap:\"balance\",margin:0};return /*#__PURE__*/React.createElement(Tag,{key:refreshKey,style:containerStyle},parts.map((part,index)=>{const isHighlighted=index%2===1;return /*#__PURE__*/_jsx(\"span\",{style:isHighlighted?gradientTextStyle:normalTextStyle,children:part},index);}));}UncodeGradient.displayName=\"UncodeGradient\";/**\n * @disableFramerUnlink\n */addPropertyControls(UncodeGradient,{// Texto, delimitador e gradiente\ntext:{type:ControlType.String,title:\"Text / Texto\",defaultValue:\"Matusael *Gosta de Framer*, mas prefere Webflow.\",displayTextArea:true,description:\"Text with parts to be highlighted. Use the delimiter to wrap gradient text. / Texto com partes a serem destacadas. Utilize o delimitador para envolver o texto com gradiente.\"},delimiter:{type:ControlType.String,title:\"Delimiter / Delimitador\",defaultValue:\"*\",description:\"Character used to mark the beginning and end of gradient text. / Caractere usado para marcar o in\\xedcio e o fim do texto com gradiente.\"},gradientAngle:{type:ControlType.Number,title:\"Gradient Angle / \\xc2ngulo do Gradiente\",defaultValue:90,min:0,max:360,unit:\"\\xb0\",displayStepper:true,description:\"Angle of the gradient in degrees. / \\xc2ngulo do gradiente em graus.\"},gradientColors:{type:ControlType.Array,title:\"Gradient Colors / Cores do Gradiente\",defaultValue:[\"#FF00FF\",\"#00FFFF\"],propertyControl:{type:ControlType.Color},description:\"List of colors for the gradient. Add as many as needed. / Lista de cores para o gradiente. Adicione quantas forem necess\\xe1rias.\"},// Configurações de fonte\ntitleColor:{type:ControlType.Color,title:\"Color / Cor\",defaultValue:\"#ffffff\",description:\"Text color for non-highlighted parts. / Cor do texto n\\xe3o destacado.\"},font:{//@ts-ignore\ntype:ControlType.Font,title:\"Font / Fonte\",displayFontSize:true,displayTextAlignment:false,defaultFontType:\"Instrument Sans\",controls:\"extended\",defaultValue:{fontSize:50,lineHeight:\"1.2em\",fontWeight:400},description:\"Complete text typography control. / Tipografia completa para o texto.\"},Align:{type:ControlType.Enum,title:\"Alignment / Alinhamento\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left / Esquerda\",\"Center / Centro\",\"Right / Direita\"],defaultValue:\"left\",description:\"Text alignment. / Alinhamento do texto.\"},// Animação do gradiente\nanimateGradient:{type:ControlType.Boolean,title:\"Animate Gradient / Animar Gradiente\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"If enabled, the gradient will animate. / Se habilitado, o gradiente ser\\xe1 animado.\"},// Element type (h1–h6, p)\nelementType:{type:ControlType.Enum,title:\"Element Type / Tipo de Elemento\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\"],optionTitles:[\"Heading 1\",\"Heading 2\",\"Heading 3\",\"Heading 4\",\"Heading 5\",\"Heading 6\",\"Paragraph (p)\"],defaultValue:\"p\",description:\"Choose between headings or paragraph. / Escolha entre headings ou par\\xe1grafo.\"},// Controle para fonte customizada das partes destacadas (*)\nuseCustomHighlight:{type:ControlType.Boolean,title:\"Custom Highlight Font / Fonte Destacada\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"If enabled, specify a separate font style for highlighted text. / Se habilitado, defina uma fonte separada para o texto destacado.\"},highlightFont:{//@ts-ignore\ntype:ControlType.Font,title:\"Highlight Font / Fonte Destacada\",displayFontSize:true,displayTextAlignment:false,defaultFontType:\"Instrument Sans\",controls:\"extended\",defaultValue:{fontSize:50,lineHeight:\"1.2em\",fontWeight:400},description:\"Font style for highlighted text. / Fonte para as partes destacadas.\",hidden:props=>!props.useCustomHighlight},// Créditos\ncodeBy:{type:ControlType.String,title:\" \",placeholder:\"Code by @omatusaelhorch\",readOnly:true,description:\"Component created by @omatusaelhorch. / Componente criado por @omatusaelhorch\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"UncodeGradient\":{\"type\":\"reactComponent\",\"name\":\"UncodeGradient\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient.map"],"mappings":"iRAEG,SAAgB,EAAe,EAAM,CAAC,GAAK,CAAC,OAAK,YAAU,gBAAc,iBAAe,aAAW,OAAK,QAAM,kBAAgB,cAAY,qBAAmB,gBAAc,UAAQ,EAEjL,CAAC,WAAS,aAAW,aAAW,cAAY,EAEjD,MAAoB,CAAC,IAAM,EAAQ,+BAA+B,GAAG,CAAC,SAAS,eAAe,EAAQ,CAAC,CAAC,IAAM,EAAa,SAAS,cAAc,QAAQ,CAAC,EAAa,GAAG,EAAQ,EAAa,YAAY;;;;;;;;;;;;cAY9L,SAAS,KAAK,YAAY,EAAa,GAAI,EAAE,CAAC,CAE5D,IAAM,EAAWA,MAAyB,CAAC,EAAK,EAAU,EAAc,EAAe,KAAK,IAAI,CAAC,EAAW,EAAS,EAAW,EAAW,EAAW,EAAM,EAAgB,EAAY,EAAmB,GAAoB,EAAc,KAAK,UAAU,EAAc,CAAC,GAAG,CAAC,KAAK,IAAI,CAAG,CAAC,EAAK,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