{"version":3,"file":"InlineText.Cf2I-R6p.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/SMLRM5aCcIBACYjuGSNj/F5u8Lzo0R0o3Aw2bd6xW/InlineText.js"],"sourcesContent":["// Text component with inline emoji support and predefined text styles\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function InlineText(props){const{text=\"Ready to make [💻] remote work feel less remote?\",textStyle,textColor=\"#FFFFFF\",textAlignment=\"left\",imagePadding=4,htmlTag=\"span\"}=props;const activeTextStyle=useMemo(()=>{return textStyle||{fontSize:\"16px\",fontWeight:400,fontStyle:\"normal\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"};},[textStyle]);const processedText=useMemo(()=>{const slots=[props.slot1,props.slot2,props.slot3,props.slot4,props.slot5,props.slot6];const bracketRegex=/\\[\\]/g;const parts=text.split(bracketRegex);const result=[];let slotIndex=0;for(let i=0;i<parts.length;i++){if(parts[i]){// Split text part into words and add single spaces between them\nconst words=parts[i].split(\" \").filter(word=>word.length>0);for(let j=0;j<words.length;j++){if(words[j]){result.push(/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline\"},children:words[j]},`word-${i}-${j}`));}// Add single space between words (except after the last word)\nif(j<words.length-1){result.push(\" \");}}}if(i<parts.length-1&&slotIndex<slots.length&&slots[slotIndex]){result.push(/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",paddingLeft:`${imagePadding}px`,paddingRight:`${imagePadding}px`},children:/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline-block\",lineHeight:\"1\",verticalAlign:\"middle\"},children:slots[slotIndex]},`slot-${slotIndex}`)},`slot-container-${slotIndex}`));slotIndex++;}}return result;},[text,imagePadding,props.slot1,props.slot2,props.slot3,props.slot4,props.slot5,props.slot6]);const TagComponent=htmlTag;return /*#__PURE__*/_jsx(\"div\",{style:{display:\"block\",width:\"100%\",textAlign:textAlignment,...props.style},children:/*#__PURE__*/_jsx(TagComponent,{style:{display:\"inline\",color:textColor,...activeTextStyle,fontFamily:activeTextStyle.fontFamily,fontSize:activeTextStyle.fontSize,fontWeight:activeTextStyle.fontWeight,fontStyle:activeTextStyle.fontStyle,letterSpacing:activeTextStyle.letterSpacing,lineHeight:activeTextStyle.lineHeight},children:processedText})});}addPropertyControls(InlineText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Ready to make [] remote work feel less remote?\",displayTextArea:true},textStyle:{type:ControlType.Font,title:\"Text Style\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},textAlignment:{type:ControlType.Enum,title:\"Text Alignment\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\",displaySegmentedControl:true},htmlTag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"span\",\"p\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"div\"],optionTitles:[\"Span\",\"Paragraph\",\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"Div\"],defaultValue:\"span\"},imagePadding:{type:ControlType.Number,title:\"Image Padding\",defaultValue:4,min:0,max:20,step:1,unit:\"px\"},slot1:{type:ControlType.ComponentInstance,title:\"Element 1\"},slot2:{type:ControlType.ComponentInstance,title:\"Element 2\"},slot3:{type:ControlType.ComponentInstance,title:\"Element 3\"},slot4:{type:ControlType.ComponentInstance,title:\"Element 4\"},slot5:{type:ControlType.ComponentInstance,title:\"Element 5\"},slot6:{type:ControlType.ComponentInstance,title:\"Element 6\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"InlineText\",\"slots\":[\"slot1\",\"slot2\",\"slot3\",\"slot4\",\"slot5\",\"slot6\"],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InlineText.map"],"mappings":"kQAIG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,OAAK,mDAAmD,YAAU,YAAU,UAAU,gBAAc,OAAO,eAAa,EAAE,UAAQ,OAAO,CAAC,EAAY,EAAgBA,MAAoB,GAAW,CAAC,SAAS,OAAO,WAAW,IAAI,UAAU,SAAS,cAAc,UAAU,WAAW,QAAQ,CAAG,CAAC,EAAU,EAAQ,EAAcA,MAAY,CAAC,IAAM,EAAM,CAAC,EAAM,MAAM,EAAM,MAAM,EAAM,MAAM,EAAM,MAAM,EAAM,MAAM,EAAM,MAAM,CAAO,EAAa,QAAc,EAAM,EAAK,MAAM,GAAoB,EAAO,EAAE,CAAK,EAAU,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EAAM,OAAO,IAAI,CAAC,GAAG,EAAM,GAAG,CACzmB,IAAM,EAAM,EAAM,GAAG,MAAM,KAAK,OAAO,GAAM,EAAK,OAAO,GAAG,IAAI,IAAI,EAAE,EAAE,EAAE,EAAM,OAAO,IAAQ,EAAM,IAAI,EAAO,KAAkB,EAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,SAAS,CAAC,SAAS,EAAM,GAAG,CAAC,QAAQ,EAAE,GAAG,MACrM,EAAE,EAAM,OAAO,GAAG,EAAO,KAAK,IAAQ,CAAG,EAAE,EAAM,OAAO,GAAG,EAAU,EAAM,QAAQ,EAAM,KAAY,EAAO,KAAkB,EAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,eAAe,YAAY,GAAG,EAAa,IAAI,aAAa,GAAG,EAAa,IAAI,CAAC,SAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,eAAe,WAAW,IAAI,cAAc,SAAS,CAAC,SAAS,EAAM,GAAW,CAA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