{"version":3,"file":"GradientWord.BLmtl5YA.mjs","names":["useMemo","_Fragment"],"sources":["https:/framerusercontent.com/modules/6rM7vqQv5EbTISbW6Qwt/2zuqSHYUryujYOC16HX7/GradientWord.js"],"sourcesContent":["// Component that applies a gradient to a single word and allows tag control\nimport{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * Gradient Word Highlighter\n * \n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function GradientWord(props){const{text=\"The Context Development Lifecycle Platform (CDLC) for Enterprise\",targetWord=\"Context Development Lifecycle Platform\",secondaryTargetWord=\"\",gradientStart=\"#7DD3FC\",gradientEnd=\"#60A5FA\",gradientAngle=90,gradientStartPosition=0,gradientEndPosition=100,tag=\"p\",textColor=\"#000000\",whiteSpace=\"normal\",font,style}=props;const processedText=useMemo(()=>{if(!text||!targetWord&&!secondaryTargetWord)return[{text,isGradient:false}];// Create regex pattern that matches either target word\nconst targets=[targetWord,secondaryTargetWord].filter(Boolean);if(targets.length===0)return[{text,isGradient:false}];// Escape special regex characters in target words\nconst escapedTargets=targets.map(t=>t.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\"));const pattern=escapedTargets.map(t=>`(${t})`).join(\"|\");const regex=new RegExp(pattern,\"gi\");const parts=text.split(regex).filter(Boolean);return parts.map(part=>({text:part,isGradient:targets.some(target=>part.toLowerCase()===target.toLowerCase())}));},[text,targetWord,secondaryTargetWord]);const Tag=tag;const baseStyle={position:\"relative\",margin:0,padding:0,width:\"100%\",color:textColor,whiteSpace,...font};const gradientStyle={background:`linear-gradient(${gradientAngle}deg, ${gradientStart} ${gradientStartPosition}%, ${gradientEnd} ${gradientEndPosition}%)`,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",display:\"inline\"};return /*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(Tag,{style:{...baseStyle,...style},children:processedText.map((part,index)=>/*#__PURE__*/_jsx(\"span\",{style:part.isGradient?gradientStyle:undefined,children:part.text},index))})});}addPropertyControls(GradientWord,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"The Context Development Lifecycle Platform (CDLC) for Enterprise\",displayTextArea:true},targetWord:{type:ControlType.String,title:\"Target Word\",defaultValue:\"Context Development Lifecycle Platform\",placeholder:\"Word to highlight...\"},secondaryTargetWord:{type:ControlType.String,title:\"Secondary Target\",defaultValue:\"\",placeholder:\"Second word to highlight...\"},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"span\",\"div\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"Paragraph\",\"Span\",\"Div\"],defaultValue:\"p\"},whiteSpace:{type:ControlType.Enum,title:\"Text Wrapping\",options:[\"normal\",\"nowrap\",\"pre\",\"pre-wrap\",\"pre-line\",\"break-spaces\"],optionTitles:[\"Normal\",\"No Wrap\",\"Preserve All\",\"Preserve + Wrap\",\"Preserve Lines\",\"Break Spaces\"],defaultValue:\"normal\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},gradientStart:{type:ControlType.Color,title:\"Gradient Start\",defaultValue:\"#7DD3FC\"},gradientStartPosition:{type:ControlType.Number,title:\"Start Position\",defaultValue:0,min:0,max:100,step:1,unit:\"%\"},gradientEnd:{type:ControlType.Color,title:\"Gradient End\",defaultValue:\"#60A5FA\"},gradientEndPosition:{type:ControlType.Number,title:\"End Position\",defaultValue:100,min:0,max:100,step:1,unit:\"%\"},gradientAngle:{type:ControlType.Number,title:\"Gradient Angle\",defaultValue:90,min:0,max:360,step:1,unit:\"\\xb0\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"48px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1.2em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientWord\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientWord.map"],"mappings":"kLAMG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,OAAK,mEAAmE,aAAW,yCAAyC,sBAAoB,GAAG,gBAAc,UAAU,cAAY,UAAU,gBAAc,GAAG,wBAAsB,EAAE,sBAAoB,IAAI,MAAI,IAAI,YAAU,UAAU,aAAW,SAAS,OAAK,SAAO,EAAY,EAAcA,MAAY,CAAC,GAAG,CAAC,GAAM,CAAC,GAAY,CAAC,EAAoB,MAAM,CAAC,CAAC,OAAK,WAAW,GAAM,CAAC,CACre,IAAM,EAAQ,CAAC,EAAW,EAAoB,CAAC,OAAO,QAAQ,CAAC,GAAG,EAAQ,SAAS,EAAE,MAAM,CAAC,CAAC,OAAK,WAAW,GAAM,CAAC,CACvC,IAAM,EAA9D,EAAQ,IAAI,GAAG,EAAE,QAAQ,sBAAsB,OAAO,CAAC,CAA8B,IAAI,GAAG,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,CAAO,EAAM,IAAI,OAAO,EAAQ,KAAK,CAA+C,OAAlC,EAAK,MAAM,EAAM,CAAC,OAAO,QAAQ,CAAc,IAAI,IAAO,CAAC,KAAK,EAAK,WAAW,EAAQ,KAAK,GAAQ,EAAK,aAAa,GAAG,EAAO,aAAa,CAAC,CAAC,EAAE,EAAG,CAAC,EAAK,EAAW,EAAoB,CAAC,CAAO,EAAI,EAAU,EAAU,CAAC,SAAS,WAAW,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,MAAM,EAAU,aAAW,GAAG,EAAK,CAAO,EAAc,CAAC,WAAW,mBAAmB,EAAc,OAAO,EAAc,GAAG,EAAsB,KAAK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