{"version":3,"file":"CustomText.B30RVB4t.mjs","names":["React","__esmMin","init_npm_react_18_3_1","init_jsx_runtime","c","p","e","addPropertyControls","init_framer_DxfB3JJo","ControlType","CustomText","props","parseText","text","lines","line","lineIndex","formattedParts","part","boldFont","italicFont","boldColor","index","boldText","italicText","italicColor","superText","superscriptFont","superscriptColor","fontColor","font","style","init_CustomText"],"sources":["https:/framerusercontent.com/modules/nAW3yE6SqkJllDkEC55S/qextkHRhiByEIkFvyvkB/CustomText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React from\"react\";import{addPropertyControls,ControlType}from\"framer\";function CustomText({// Text content and formatting\ntext=\"**2024 Year in Review:** A Year of Pioneering *Truly Transparent* Pharmacy Benefits.\\n\\nThis is a new paragraph with **bold**, *italic*, and E=mc^2^ text.\",// Font styling\nfont={fontSize:16,lineHeight:1.4},fontColor=\"#2B2927\",boldFont={fontSize:16,lineHeight:1.4,fontWeight:\"bold\"},boldColor=\"#2B2927\",italicFont={fontSize:16,lineHeight:1.4,fontStyle:\"italic\"},italicColor=\"#2B2927\",superscriptFont={fontSize:12,lineHeight:1.4},superscriptColor=\"#2B2927\",// Additional styles\nstyle,...props}){// Function to parse text and apply formatting\nconst parseText=text=>{if(!text)return\"\";// Replace literal \\n with actual newlines and normalize line breaks\nconst normalizedText=text.replace(/\\\\n/g,\"\\n\")// Convert literal \\n to actual newlines\n.replace(/\\r\\n/g,\"\\n\")// Normalize Windows line breaks\n.replace(/\\r/g,\"\\n\")// Normalize Mac line breaks\n;// Split by line breaks and handle paragraphs\nconst lines=normalizedText.split(\"\\n\");return lines.map((line,lineIndex)=>{if(line.trim()===\"\"){// Empty line - render as line break\nreturn /*#__PURE__*/_jsx(\"br\",{},`br-${lineIndex}`);}// Parse formatting within each line\n// Split by all formatting markers including superscript\nconst parts=line.split(/(\\*\\*\\*.*?\\*\\*\\*|\\*\\*.*?\\*\\*|\\*.*?\\*|\\^.*?\\^)/);const formattedParts=parts.map((part,index)=>{if(part.startsWith(\"***\")&&part.endsWith(\"***\")){// Bold and italic (triple asterisks)\nconst text=part.slice(3,-3);return /*#__PURE__*/_jsx(\"strong\",{style:{...boldFont,...italicFont,color:boldColor,fontWeight:\"bold\",fontStyle:\"italic\"},children:text},`${lineIndex}-${index}`);}else if(part.startsWith(\"**\")&&part.endsWith(\"**\")){// Bold (double asterisks)\nconst boldText=part.slice(2,-2);return /*#__PURE__*/_jsx(\"strong\",{style:{...boldFont,color:boldColor},children:boldText},`${lineIndex}-${index}`);}else if(part.startsWith(\"*\")&&part.endsWith(\"*\")){// Italic (single asterisks)\nconst italicText=part.slice(1,-1);return /*#__PURE__*/_jsx(\"em\",{style:{...italicFont,color:italicColor},children:italicText},`${lineIndex}-${index}`);}else if(part.startsWith(\"^\")&&part.endsWith(\"^\")){// Superscript (carets)\nconst superText=part.slice(1,-1);return /*#__PURE__*/_jsx(\"sup\",{style:{...superscriptFont,color:superscriptColor},children:superText},`${lineIndex}-${index}`);}else{// Regular text\nreturn /*#__PURE__*/_jsx(\"span\",{style:{color:fontColor},children:part},`${lineIndex}-${index}`);}});// Each line as a div, with line breaks between\nreturn /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{children:formattedParts}),lineIndex<lines.length-1&&/*#__PURE__*/_jsx(\"br\",{})]},`line-${lineIndex}`);});};return /*#__PURE__*/_jsx(\"div\",{style:{...font,...style},children:parseText(text)});}// Add property controls for Framer\naddPropertyControls(CustomText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"**2024 Year in Review:** A Year of Pioneering *Truly Transparent* Pharmacy Benefits.\\n\\nThis is a new paragraph with **bold**, *italic*, and E=mc^2^ text.\",displayTextArea:true,description:\"Use **text** for bold, *text* for italic, ***text*** for both, ^text^ for superscript, and \\\\n for line breaks\"},font:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:16,lineHeight:1.4}},fontColor:{type:ControlType.Color,title:\"Font Color\",defaultValue:\"#2B2927\"},boldFont:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",title:\"Bold Font\",defaultValue:{fontSize:16,lineHeight:1.4,fontWeight:\"bold\"}},boldColor:{type:ControlType.Color,title:\"Bold Text Color\",defaultValue:\"#2B2927\"},italicFont:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",title:\"Italic Font\",defaultValue:{fontSize:16,lineHeight:1.4,fontStyle:\"italic\"}},italicColor:{type:ControlType.Color,title:\"Italic Text Color\",defaultValue:\"#2B2927\"},superscriptFont:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",title:\"Superscript Font\",defaultValue:{fontSize:12,lineHeight:1.4}},superscriptColor:{type:ControlType.Color,title:\"Superscript Text Color\",defaultValue:\"#2B2927\"}});export default CustomText;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CustomText.map"],"mappings":"A,iLAAsI,SAASU,EAAW,CAC1J,OAAK;;oEACL,OAAK,CAAC,SAAS,GAAG,WAAW,GAAG,EAAE,YAAU,UAAU,WAAS,CAAC,SAAS,GAAG,WAAW,IAAI,WAAW,MAAM,EAAE,YAAU,UAAU,aAAW,CAAC,SAAS,GAAG,WAAW,IAAI,UAAU,QAAQ,EAAE,cAAY,UAAU,kBAAgB,CAAC,SAAS,GAAG,WAAW,GAAG,EAAE,mBAAiB,UACjR,QAAM,GAAGC,GAAO,CAChB,IAAMC,EAAU,GAAM,CAAC,GAAG,CAACC,EAAK,MAAM,GAKtC,IAAMC,EAJeD,EAAK,QAAQ,OAAO;CAAI,CAAC,CAC7C,QAAQ,QAAQ;CAAI,CAAC,CACrB,QAAQ,MAAM;CAEU,CAAC,CAAC,MAAM;CAAI,EAAE,OAAOC,EAAM,KAAK,EAAK,IAAY,C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