{"version":3,"file":"Gradient_Highlight.DJtzcay3.mjs","names":[],"sources":["https:/framerusercontent.com/modules/WYBajOQIRLPxegSrYz2O/6cmcfP1epq0aKdnyLmku/Gradient_Highlight.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function HighlightText({text=\"Normal text highlight this more text\",highlightWords=\"\",normalColor=\"#000000\",typography={family:\"Archivo\",fontWeight:400,fontSize:16,lineHeight:1.5,letterSpacing:0,textAlign:\"left\"},gradient={color1:\"#FF6B6B\",color2:\"#4ECDC4\",angle:45},animation={enabled:true,type:\"smooth\",speed:3}}){const wordsToHighlight=highlightWords.split(\",\").map(word=>word.trim()).filter(word=>word.length>0);const processedContent=parseAndHighlightWords(text,wordsToHighlight,gradient.color1,gradient.color2,gradient.angle,animation.enabled,animation.type,animation.speed);const componentKey=`${gradient.color1}-${gradient.color2}-${normalColor}-${gradient.angle}`;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",background:\"none\",backgroundColor:\"transparent\"},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                    @keyframes gradientSmooth {\n                        0%   { background-position: 0% 50%; }\n                        100% { background-position: 200% 50%; }\n                    }\n                    @keyframes gradientBounce {\n                        0%   { background-position: 0% 50%; }\n                        25%  { background-position: 100% 50%; }\n                        50%  { background-position: 0% 50%; }\n                        75%  { background-position: 100% 50%; }\n                        100% { background-position: 0% 50%; }\n                    }\n                    @keyframes gradientPulse {\n                        0%, 100% { background-position: 0% 50%; filter: brightness(1); }\n                        50%       { background-position: 100% 50%; filter: brightness(1.4); }\n                    }\n                    @keyframes gradientWave {\n                        0%   { background-position: 0% 0%;     background-size: 200% 200%; }\n                        25%  { background-position: 100% 100%; background-size: 250% 250%; }\n                        50%  { background-position: 100% 0%;   background-size: 200% 200%; }\n                        75%  { background-position: 0% 100%;   background-size: 250% 250%; }\n                        100% { background-position: 0% 0%;     background-size: 200% 200%; }\n                    }\n                    .highlight-text-wrapper,\n                    .highlight-text-wrapper * {\n                        background-color: transparent !important;\n                    }\n                    .highlight-text-wrapper .gradient-text {\n                        background-color: unset !important;\n                    }\n                `}),/*#__PURE__*/_jsx(\"div\",{className:\"highlight-text-wrapper\",style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",background:\"transparent\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,width:\"100%\",color:normalColor,fontSize:`${typography.fontSize}px`,fontWeight:typography.fontWeight,fontFamily:`${typography.family}, sans-serif`,lineHeight:typography.lineHeight,letterSpacing:`${typography.letterSpacing}px`,textAlign:typography.textAlign,backgroundColor:\"transparent\"},children:processedContent})})]},componentKey);}function parseAndHighlightWords(text,words,color1,color2,angle,animationEnabled,animationType,animationSpeed){if(typeof text!==\"string\"||words.length===0)return text;const escapedWords=words.map(word=>word.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"));const pattern=new RegExp(`(${escapedWords.join(\"|\")})`,\"gi\");const parts=text.split(pattern);return parts.map((part,index)=>{const isHighlighted=words.some(word=>word.toLowerCase()===part.toLowerCase());if(isHighlighted){return /*#__PURE__*/_jsx(\"span\",{className:\"gradient-text\",style:{background:`linear-gradient(${angle}deg, ${color1}, ${color2}, ${color1})`,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",display:\"inline-block\",backgroundSize:animationEnabled?\"200% 200%\":\"100% 100%\",animation:animationEnabled?`gradient${animationType.charAt(0).toUpperCase()+animationType.slice(1)} ${animationSpeed}s ease infinite`:\"none\"},children:part},index);}return /*#__PURE__*/_jsx(\"span\",{children:part},index);});}const FONT_OPTIONS=[\"Archivo\",\"Inter\",\"Roboto\",\"Poppins\",\"Montserrat\",\"Open Sans\",\"Lato\",\"Raleway\",\"Nunito\",\"Plus Jakarta Sans\",\"DM Sans\",\"Space Grotesk\",\"Outfit\",\"Syne\",\"Geist\",\"Georgia\"];addPropertyControls(HighlightText,{// ── Content ───────────────────────────────────────────────────────────\ntext:{type:ControlType.String,title:\"Text\",defaultValue:\"Normal text highlight this more text\",displayTextArea:true},highlightWords:{type:ControlType.String,title:\"Highlight Words\",defaultValue:\"highlight, this\",description:\"Comma-separated words to apply gradient to\",displayTextArea:true},// ── Normal text color (top-level for quick access) ────────────────────\nnormalColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},// ── Typography (grouped, collapsible section) ─────────────────────────\ntypography:{type:ControlType.Object,title:\"Typography\",controls:{family:{type:ControlType.Enum,title:\"Font Family\",options:FONT_OPTIONS,optionTitles:FONT_OPTIONS,defaultValue:\"Archivo\"},fontWeight:{type:ControlType.Enum,title:\"Weight\",options:[100,200,300,400,500,600,700,800,900],optionTitles:[\"100 \\xb7 Thin\",\"200 \\xb7 ExtraLight\",\"300 \\xb7 Light\",\"400 \\xb7 Regular\",\"500 \\xb7 Medium\",\"600 \\xb7 SemiBold\",\"700 \\xb7 Bold\",\"800 \\xb7 ExtraBold\",\"900 \\xb7 Black\"],defaultValue:400},fontSize:{type:ControlType.Number,title:\"Size\",defaultValue:16,min:8,max:200,step:1,unit:\"px\"},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.5,min:.5,max:3,step:.1},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing\",defaultValue:0,min:-5,max:20,step:.5,unit:\"px\"},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],defaultValue:\"left\"}}},// ── Gradient (grouped, collapsible section) ───────────────────────────\ngradient:{type:ControlType.Object,title:\"Gradient\",controls:{color1:{type:ControlType.Color,title:\"Start Color\",defaultValue:\"#FF6B6B\"},color2:{type:ControlType.Color,title:\"End Color\",defaultValue:\"#4ECDC4\"},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:45,min:-360,max:360,step:1,unit:\"\\xb0\"}}},// ── Animation (grouped, collapsible section) ──────────────────────────\nanimation:{type:ControlType.Object,title:\"Animation\",controls:{enabled:{type:ControlType.Boolean,title:\"Enabled\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},type:{type:ControlType.Enum,title:\"Type\",options:[\"smooth\",\"bounce\",\"pulse\",\"wave\"],optionTitles:[\"Smooth\",\"Bounce\",\"Pulse\",\"Wave\"],defaultValue:\"smooth\"},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:3,min:.5,max:10,step:.5,unit:\"s\"}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HighlightText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Gradient_Highlight.map"],"mappings":"mKAA6G,SAAwB,EAAc,CAAC,OAAK,uCAAuC,iBAAe,GAAG,cAAY,UAAU,aAAW,CAAC,OAAO,UAAU,WAAW,IAAI,SAAS,GAAG,WAAW,IAAI,cAAc,EAAE,UAAU,OAAO,CAAC,WAAS,CAAC,OAAO,UAAU,OAAO,UAAU,MAAM,GAAG,CAAC,YAAU,CAAC,QAAQ,GAAK,KAAK,SAAS,MAAM,EAAE,EAAE,CAAqG,IAAM,EAAiB,EAAuB,EAA3H,EAAe,MAAM,IAAI,CAAC,IAAI,GAAM,EAAK,MAAM,CAAC,CAAC,OAAO,GAAM,EAAK,OAAO,EAAE,CAAqE,EAAS,OAAO,EAAS,OAAO,EAAS,MAAM,EAAU,QAAQ,EAAU,KAAK,EAAU,MAAM,CAAO,EAAa,GAAG,EAAS,OAAO,GAAG,EAAS,OAAO,GAAG,EAAY,GAAG,EAAS,QAAQ,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,WAAW,OAAO,gBAAgB,cAAc,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8B76B,CAAC,CAAc,EAAK,MAAM,CAAC,UAAU,yBAAyB,MAAM,CAAC,MAAM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