{"version":3,"file":"InlineImageText.CElNX9dD.mjs","names":[],"sources":["https:/framerusercontent.com/modules/VljVKPPwk6JoSxVh6dUT/fLh3q3U5w8cnQ881KT0z/InlineImageText.js"],"sourcesContent":["/**\n * For any website & code related support, contact Sam from wealthisteps.com at wealthistep@gmail.com\n * Linkedin - https://www.linkedin.com/in/samagramishra/\n * */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import*as React from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export function InlineImageText(props){const{text,images,font,color,styles,tag}=props;const segments=text.split(\"$$\");let imageIndex=0;// Create the component with the selected HTML tag\nconst TagName=tag||\"p\";// Function to render text with line breaks\nconst renderTextWithLineBreaks=text=>{return text.split(\"<br/>\").map((line,i)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[line,i<text.split(\"<br/>\").length-1&&/*#__PURE__*/_jsx(\"br\",{})]},i));};return /*#__PURE__*/_jsx(TagName,{style:{display:\"block\",fontSize:font.fontSize,fontFamily:font.fontFamily,fontWeight:font.fontWeight||\"normal\",lineHeight:font.lineHeight,letterSpacing:font.letterSpacing,textAlign:font.textAlign,color:props.color,wordWrap:\"break-word\",margin:0},children:segments.map((segment,index)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[segment&&/*#__PURE__*/_jsx(\"span\",{children:renderTextWithLineBreaks(segment)}),index<segments.length-1&&images[imageIndex]&&/*#__PURE__*/_jsx(\"img\",{src:images[imageIndex++],alt:`inline-${index}`,style:{display:\"inline-block\",width:styles.imageWidth,height:styles.imageHeight,borderRadius:styles.imageRadius,objectFit:\"cover\",marginLeft:styles.gap,marginRight:styles.gap,verticalAlign:\"bottom\",transform:`translateY(${styles.offsetY||0}px)`,position:\"relative\"}})]},index))});}addPropertyControls(InlineImageText,{text:{type:ControlType.String,title:\"Text\",placeholder:\"Type something…\",displayTextArea:true},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"p\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],defaultValue:\"p\"},images:{type:ControlType.Array,title:\"Images\",propertyControl:{type:ControlType.Image}},font:{type:ControlType.Font,controls:\"extended\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000\"},styles:{type:ControlType.Object,title:\"Style\",description:\"Developed by [Wealthisteps](https://wealthisteps.com/)\",controls:{gap:{type:ControlType.Number,title:\"Gap\",defaultValue:6},imageWidth:{type:ControlType.Number,title:\"Image Width\",defaultValue:24,min:1},imageHeight:{type:ControlType.Number,title:\"Image Height\",defaultValue:24,min:1},imageRadius:{type:ControlType.BorderRadius,title:\"Image Radius\"},offsetY:{type:ControlType.Number,title:\"Y Offset\",defaultValue:0,step:1,displayStepper:true}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"InlineImageText\":{\"type\":\"reactComponent\",\"name\":\"InlineImageText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InlineImageText.map"],"mappings":"wQAMG,SAAgB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,SAAO,OAAK,QAAM,SAAO,MAAI,CAAC,EAAY,EAAS,EAAK,MAAM,KAAK,CAAK,EAAW,EAClI,EAAQ,GAAK,IACb,EAAyB,GAAc,EAAK,MAAM,QAAQ,CAAC,IAAI,CAAC,EAAK,IAAiB,EAAA,EAAqB,CAAC,SAAS,CAAC,EAAK,EAAE,EAAK,MAAM,QAAQ,CAAC,OAAO,GAAgB,EAAK,KAAK,CAAE,EAAC,AAAC,CAAC,EAAC,EAAE,CAAC,CAAG,MAAoB,GAAK,EAAQ,CAAC,MAAM,CAAC,QAAQ,QAAQ,SAAS,EAAK,SAAS,WAAW,EAAK,WAAW,WAAW,EAAK,YAAY,SAAS,WAAW,EAAK,WAAW,cAAc,EAAK,cAAc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