{"version":3,"file":"Highlightext.6LE4gpBO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/upjdP1rjfXhNU24hyZpk/cSqeHrl4x6SSF0fCD9G9/Highlightext.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export function HighlightedText({text,highlightWords,fontFamily,fontSize,highlightColor,textAlign,lineHeight}){const wordsToHighlight=highlightWords.split(\",\").map(w=>w.trim().toLowerCase());const renderWord=(word,index)=>{const cleanWord=word.replace(/[^a-zA-Z0-9-]/g,\"\");const isHighlighted=wordsToHighlight.includes(cleanWord.toLowerCase());return /*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",display:\"inline-block\",fontFamily,marginRight:\"0.35ch\"},children:isHighlighted?/*#__PURE__*/_jsx(\"span\",{style:{backgroundColor:highlightColor,borderRadius:\"4px\",padding:\"0.1em 0.25em\",display:\"inline-block\"},children:word}):word},index);};return /*#__PURE__*/_jsx(\"div\",{style:{fontFamily,fontSize,lineHeight,textAlign},children:text.split(\" \").map((word,index)=>renderWord(word,index))});}addPropertyControls(HighlightedText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Drive revenue with Data-Driven advertising\"},highlightWords:{type:ControlType.String,title:\"Highlight Words\",defaultValue:\"Data-Driven\"},fontFamily:{type:ControlType.String,title:\"Font\",defaultValue:\"Inter, sans-serif\"},fontSize:{type:ControlType.Number,title:\"Font Size\",min:0,max:100,step:1,defaultValue:40},lineHeight:{type:ControlType.String,title:\"Line Height\",defaultValue:\"1.4\"},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\",\"justify\"],optionTitles:[\"Left\",\"Center\",\"Right\",\"Justify\"],defaultValue:\"left\"},highlightColor:{type:ControlType.Color,title:\"Highlight Color\",defaultValue:\"#BCFF95\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"HighlightedText\":{\"type\":\"reactComponent\",\"name\":\"HighlightedText\",\"slots\":[],\"annotations\":{\"fram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