{"version":3,"file":"LearnProse.CQ4BxobX.mjs","names":["__esmMin","init_jsx_runtime","c","p","addPropertyControls","ControlType","init_framer_DcGZRLrs","parseBlocks","blocks","chunk","src","lines","l","items","prev","isExternal","href","renderInline","re","out","last","key","m","text","LearnProse","props","content","textColor","strongColor","linkColor","badgeColor","badgeBackground","CSS","size","b","item","j","i","init_LearnProse"],"sources":["https:/framerusercontent.com/modules/kBtLyess2l4c86uLohsB/cs04hB5x12DicW3zwJvA/LearnProse.js"],"sourcesContent":["// Learn pages (/learn/*): article copy. Native Framer text layers can't hold inline links or bold runs,\n// so section copy lives here as light markdown:\n//   blank line        new paragraph\n//   \"1. \" lines       numbered list (consecutive items join one list)\n//   **bold**          bold lead-ins\n//   [text](url)       links (external ones open in a new tab)\n// Headings stay native text layers so they keep the site's h1/h2 text styles.\n// Text steps down to phone sizes when the block itself is narrow (container query), so the Framer\n// canvas breakpoints, preview and the live site all match.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";function parseBlocks(src){const blocks=[];for(const chunk of src.replace(/\\r\\n/g,\"\\n\").split(/\\n\\s*\\n/)){const lines=chunk.split(\"\\n\").map(l=>l.trim()).filter(Boolean);if(!lines.length)continue;if(lines.every(l=>/^\\d+\\.\\s/.test(l))){const items=lines.map(l=>l.replace(/^\\d+\\.\\s+/,\"\"));const prev=blocks[blocks.length-1];if(prev&&prev.type===\"ol\")prev.items.push(...items);else blocks.push({type:\"ol\",items});}else{blocks.push({type:\"p\",text:lines.join(\" \")});}}return blocks;}function isExternal(href){return/^https?:\\/\\//.test(href)&&!/^https?:\\/\\/(www\\.)?helium\\.com/.test(href);}function renderInline(text){const re=/\\*\\*(.+?)\\*\\*|\\[([^\\]]+)\\]\\(([^)\\s]+)\\)/g;const out=[];let last=0;let key=0;let m;while(m=re.exec(text)){if(m.index>last)out.push(text.slice(last,m.index));if(m[1]!==undefined){out.push(/*#__PURE__*/_jsx(\"strong\",{children:renderInline(m[1])},key++));}else{const href=m[3];out.push(/*#__PURE__*/_jsx(\"a\",{href:href,...isExternal(href)?{target:\"_blank\",rel:\"noopener\"}:{},children:renderInline(m[2])},key++));}last=re.lastIndex;}if(last<text.length)out.push(text.slice(last));return out;}const CSS=`\n.hl-prose-box { container-type: inline-size; }\n.hl-prose { font-family: 'Figtree', sans-serif; font-weight: 400; color: var(--hl-text); font-size: 18px; line-height: 1.6; overflow-wrap: break-word; }\n.hl-prose.lede { font-size: 22px; line-height: 1.5; }\n.hl-prose > * { margin: 0; }\n.hl-prose > * + * { margin-top: 1.1em; }\n.hl-prose strong { font-weight: 600; color: var(--hl-strong); }\n.hl-prose a { color: var(--hl-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }\n.hl-prose a:hover { text-decoration-thickness: 2px; }\n.hl-prose a:focus-visible { outline: 2px solid var(--hl-link); outline-offset: 2px; border-radius: 4px; }\n.hl-prose ol { list-style: none; padding: 0; counter-reset: hl-step; display: flex; flex-direction: column; gap: 16px; }\n.hl-prose ol > li { position: relative; padding-left: 44px; counter-increment: hl-step; }\n.hl-prose ol > li::before { content: counter(hl-step); position: absolute; left: 0; top: 0.05em; width: 28px; height: 28px; border-radius: 50%; background: var(--hl-badge-bg); color: var(--hl-badge); font-size: 14px; font-weight: 600; line-height: 28px; text-align: center; }\n@container (max-width: 480px) {\n  .hl-prose { font-size: 16px; }\n  .hl-prose.lede { font-size: 19px; }\n  .hl-prose ol > li { padding-left: 38px; }\n  .hl-prose ol > li::before { width: 26px; height: 26px; line-height: 26px; font-size: 13px; }\n}\n`;/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function LearnProse(props){const{content,size,textColor,strongColor,linkColor,badgeColor,badgeBackground}=props;const blocks=parseBlocks(content||\"\");return /*#__PURE__*/_jsxs(\"div\",{className:\"hl-prose-box\",style:{position:\"relative\",width:\"100%\",\"--hl-text\":textColor,\"--hl-strong\":strongColor,\"--hl-link\":linkColor,\"--hl-badge\":badgeColor,\"--hl-badge-bg\":badgeBackground},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(\"div\",{className:size===\"lede\"?\"hl-prose lede\":\"hl-prose\",children:blocks.map((b,i)=>b.type===\"ol\"?/*#__PURE__*/_jsx(\"ol\",{children:b.items.map((item,j)=>/*#__PURE__*/_jsx(\"li\",{children:renderInline(item)},j))},i):/*#__PURE__*/_jsx(\"p\",{children:renderInline(b.text)},i))})]});}addPropertyControls(LearnProse,{content:{type:ControlType.String,title:\"Content\",displayTextArea:true,defaultValue:\"A paragraph with **bold** and a [link](/contact).\\n\\n1. **First step.** Detail.\\n2. **Second step.** Detail.\"},size:{type:ControlType.Enum,title:\"Size\",options:[\"body\",\"lede\"],optionTitles:[\"Body\",\"Lede\"],displaySegmentedControl:true,defaultValue:\"body\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#767676\"},strongColor:{type:ControlType.Color,title:\"Bold\",defaultValue:\"#1A191B\"},linkColor:{type:ControlType.Color,title:\"Link\",defaultValue:\"#5F26FC\"},badgeColor:{type:ControlType.Color,title:\"List number\",defaultValue:\"#5F26FC\"},badgeBackground:{type:ControlType.Color,title:\"List badge\",defaultValue:\"rgba(95, 38, 252, 0.1)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LearnProse\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LearnProse.map"],"mappings":"A,oKAS6G,SAASO,EAAY,EAAI,CAAC,IAAMC,EAAO,CAAC,EAAE,IAAI,IAAMC,KAASC,EAAI,QAAQ,QAAQ;CAAI,CAAC,CAAC,MAAM,SAAS,EAAE,CAAC,IAAMC,EAAMF,EAAM,MAAM;CAAI,CAAC,CAAC,IAAI,GAAGG,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