markstream-react 0.0.45 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/Tooltip-DQ6sUeEf.js +205 -0
  2. package/dist/customHtmlTag-BRT4eqd8.js +3 -0
  3. package/dist/index-DOjYeelM.js +86 -0
  4. package/dist/index.css +1 -1
  5. package/dist/index.d.ts +3 -3
  6. package/dist/index.js +1 -1
  7. package/dist/index.px.css +1 -1
  8. package/dist/index.tailwind.css +1 -1
  9. package/dist/markstream-react.css +1 -1
  10. package/dist/next.d.ts +27 -11
  11. package/dist/next.js +1 -1
  12. package/dist/server.d.ts +23 -9
  13. package/dist/server.js +1 -1
  14. package/dist/tailwind.ts +1 -1
  15. package/dist/types/components/HtmlBlockNode/HtmlBlockNode.d.ts +5 -0
  16. package/dist/types/components/HtmlInlineNode/HtmlInlineNode.d.ts +4 -1
  17. package/dist/types/components/InfographicBlockNode/height.d.ts +5 -0
  18. package/dist/types/components/MermaidBlockNode/height.d.ts +6 -0
  19. package/dist/types/customComponents.d.ts +9 -1
  20. package/dist/types/index.d.ts +3 -3
  21. package/dist/types/next.d.ts +12 -3
  22. package/dist/types/server-renderer/html.d.ts +1 -2
  23. package/dist/types/server-renderer/index.d.ts +3 -3
  24. package/dist/types/server.d.ts +3 -2
  25. package/dist/types/types/component-props.d.ts +3 -3
  26. package/dist/types/types.d.ts +8 -5
  27. package/dist/types/utils/customHtmlTag.d.ts +16 -0
  28. package/dist/types/utils/htmlToReact.d.ts +9 -0
  29. package/dist/types/utils/normalizeKaTeXRenderInput.d.ts +1 -0
  30. package/dist/workers/mermaidParser.worker.js +1 -1
  31. package/package.json +3 -3
  32. package/dist/Tooltip-CgreNSxF.js +0 -211
  33. package/dist/index-DzmDCKan.js +0 -89
  34. package/dist/languageIcon-CEJktwcf.js +0 -3
  35. package/dist/types/components/SoftBreakNode/SoftBreakNode.d.ts +0 -5
@@ -1,89 +0,0 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import r from"react";import{BLOCKED_HTML_TAGS as i,VOID_HTML_TAGS as l,DANGEROUS_HTML_ATTRS as o,URL_HTML_ATTRS as a,isUnsafeHtmlUrl as c,EXTENDED_STANDARD_HTML_TAGS as s,getMarkdown as d,parseMarkdownToStructure as u}from"stream-markdown-parser";import{f as m,h,g as p,B as g,t as f,n as y}from"./languageIcon-CEJktwcf.js";function x(e){return e.startsWith("--")?e:e.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function k(e){const n={...e};if(Object.prototype.hasOwnProperty.call(n,"class")&&(n.className=n.class,delete n.class),Object.prototype.hasOwnProperty.call(n,"for")&&(n.htmlFor=n.for,delete n.for),"string"==typeof n.style){const e=function(e){const n=e.trim();if(!n)return;const t={};for(const r of n.split(";")){const e=r.trim();if(!e)continue;const n=e.indexOf(":");if(-1===n)continue;const i=x(e.slice(0,n).trim()),l=e.slice(n+1).trim();i&&(t[i]=l)}return Object.keys(t).length?t:void 0}(n.style);e?n.style=e:delete n.style}return n}function w(e){const n={};for(const[t,r]of Object.entries(e)){const e=t.toLowerCase();o.has(e)||a.has(e)&&r&&c(r)||(n[t]=r)}return n}function b(e,n){const t=e.toLowerCase();return!s.has(t)&&(Object.prototype.hasOwnProperty.call(n,t)||Object.prototype.hasOwnProperty.call(n,e))}function N(e,n){var t;if(!e)return[];try{const o=function(e){var n,t,r;const i=[];let o=0;for(;o<e.length;){if(e.startsWith("\x3c!--",o)){const n=e.indexOf("--\x3e",o);if(-1!==n){o=n+3;continue}break}const a=e.indexOf("<",o);if(-1===a){o<e.length&&e.slice(o).trim()&&i.push({type:"text",content:e.slice(o)});break}if(a>o){const n=e.slice(o,a);n.trim()&&i.push({type:"text",content:n})}const c=e.indexOf(">",a);if(-1===c)break;const s=e.slice(a+1,c).trim(),d=s.startsWith("/"),u=s.endsWith("/");if(d)i.push({type:"tag_close",tagName:s.slice(1).trim()});else{const e=s.indexOf(" ");let o,a="";-1===e?o=u?s.slice(0,-1).trim():s.trim():(o=s.slice(0,e).trim(),a=s.slice(e+1));const c={};if(a){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let i;for(;null!==(i=e.exec(a));){const e=i[1],l=null!=(r=null!=(t=null!=(n=i[2])?n:i[3])?t:i[4])?r:"";e&&!e.endsWith("/")&&(c[e]=l)}}i.push({type:u||l.has(o.toLowerCase())?"self_closing":"tag_open",tagName:o,attrs:c})}o=c+1}return i}(e);let a=0;const c=[],s=[];for(const e of o){if("text"===e.type){if(c.length>0&&c[c.length-1].blocked)continue;(c.length>0?c[c.length-1].children:s).push(null!=(t=e.content)?t:"");continue}if("self_closing"===e.type){if(i.has(e.tagName.toLowerCase()))continue;const t=w(e.attrs||{}),l=t.key,o=null!=l&&""!==l?l:"ms-html-"+a++,d=b(e.tagName,n)?n[e.tagName]||n[e.tagName.toLowerCase()]:void 0,u=c.length>0?c[c.length-1].children:s;d?u.push(r.createElement(d,{...t,key:o})):u.push(r.createElement(e.tagName,{...k(t),key:o,suppressHydrationWarning:!0}));continue}if("tag_open"===e.type){c.push({tagName:e.tagName,children:[],attrs:e.attrs,blocked:i.has(e.tagName.toLowerCase())});continue}const l=c.pop();if(!l||l.blocked)continue;const o=w(l.attrs||{}),d=o.key,u=null!=d&&""!==d?d:"ms-html-"+a++,m=b(l.tagName,n)?n[l.tagName]||n[l.tagName.toLowerCase()]:void 0,h=m?r.createElement(m,{...o,key:u},...l.children):r.createElement(l.tagName,{...k(o),key:u,suppressHydrationWarning:!0},...l.children);c.length>0?c[c.length-1].children.push(h):s.push(h)}for(;c.length>0;){const e=c.pop();if(!e||e.blocked)continue;const t=w(e.attrs||{}),i=t.key,l=null!=i&&""!==i?i:"ms-html-"+a++,o=b(e.tagName,n)?n[e.tagName]||n[e.tagName.toLowerCase()]:void 0,d=o?r.createElement(o,{...t,key:l},...e.children):r.createElement(e.tagName,{...k(t),key:l,suppressHydrationWarning:!0},...e.children);s.push(d)}return s}catch{return null}}let v,$=!1;function S(e,n,t){if(!e)return null;if(globalThis.__MARKSTREAM_REACT_DISABLE_SYNC_KATEX__)return null;const r=function(){if(v)return v;if($)return null;$=!0;try{const e=function(){try{const e=Reflect.get(globalThis,"process"),n="function"==typeof(null==e?void 0:e.getBuiltinModule)?e.getBuiltinModule("module"):null;return"function"==typeof(null==n?void 0:n.createRequire)?n.createRequire(import.meta.url):null}catch{return null}}();if(!e)return null;const n=e("katex");try{e("katex/contrib/mhchem")}catch{}return v=n,v}catch{return null}}();if(!r)return null;try{return r.renderToString(e,{displayMode:n,throwOnError:t})}catch{return null}}const _=d();function K(e){const n=String(null!=e?e:"").trim();if(!n)return"";const t=n.match(/^[<\s/]*([A-Z][\w-]*)/i);return t?t[1].toLowerCase():""}function B(e){return/^[a-z][a-z0-9-]*$/.test(e)}function I(e,n){const t=String(null!=e?e:"");if(!n)return t;const r=new RegExp(String.raw`^\s*<\s*${n}(?:\s[^>]*)?>\s*`,"i"),i=new RegExp(String.raw`\s*<\s*\/\s*${n}\s*>\s*$`,"i");return t.replace(r,"").replace(i,"")}function C(e){var n;return String(null!=(n=String(null!=e?e:"").split(/\s+/g)[0])?n:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}function D(t,r,i){var l,o;const a=C(r.language),c=String(null!=(o=null!=(l=r.code)?l:r.raw)?o:""),s=function(e){const n=y(String(null!=e?e:""));return n&&"plaintext"!==n?n.charAt(0).toUpperCase()+n.slice(1):"Text"}(r.language);/* @__PURE__ */
2
- return e("div",{className:`${t} ${t}--ssr`,"data-ssr-fallback":i.fallback,children:[!1!==i.showHeader&&/* @__PURE__ */n("div",{className:`${t}__header`,children:/* @__PURE__ */n("span",{className:`${t}__language`,children:s})}),
3
- /* @__PURE__ */n("div",{className:`${t}__body`,children:/* @__PURE__ */n("pre",{className:`language-${a}`,"aria-busy":!0===r.loading,"aria-label":`Code block: ${a}`,"data-language":a,tabIndex:0,children:/* @__PURE__ */n("code",{translate:"no",children:c})})})]})}function T(e){const{node:t,children:r}=e;/* @__PURE__ */
4
- return n("span",{className:"text-node whitespace-pre-wrap break-words"+(t.center?" text-node-center":""),children:null!=r?r:t.content})}function A(e){var i;const{node:l,ctx:o,renderNode:a,indexKey:c,children:s}=e;if(!o||!a)/* @__PURE__ */
5
- return n("p",{dir:"auto",className:"paragraph-node",children:s});const d=null!=(i=l.children)?i:[],u=d.length>0&&d.every(e=>{var n;return"image"===e.type||"softbreak"===e.type||"text"===e.type&&""===String(null!=(n=e.content)?n:"").trim()}),h={...o,inlineImages:!u};if(u)/* @__PURE__ */
6
- return n("div",{dir:"auto",className:"paragraph-node",children:m(d,h,String(null!=c?c:"paragraph"),a)});const p=[],f=[],y=()=>{if(!f.length)return;const e=p.length;p.push(
7
- /* @__PURE__ */n("p",{dir:"auto",className:"paragraph-node",children:m(f.slice(),h,`${String(null!=c?c:"paragraph")}-${e}`,a)},`${String(null!=c?c:"paragraph")}-inline-${e}`)),f.length=0};return d.forEach((e,t)=>{g.has(e.type)?(y(),p.push(
8
- /* @__PURE__ */n(r.Fragment,{children:a(e,`${String(null!=c?c:"paragraph")}-block-${t}`,h)},`${String(null!=c?c:"paragraph")}-block-${t}`))):f.push(e)}),y(),p.length?/* @__PURE__ */n(t,{children:p}):/* @__PURE__ */n("p",{dir:"auto",className:"paragraph-node",children:m(d,h,String(null!=c?c:"paragraph"),a)})}function H(e){const{node:t,ctx:r,renderNode:i,indexKey:l,children:o}=e,a=Math.min(6,Math.max(1,Number(t.level)||1)),c=`h${a}`,s=null==t?void 0:t.attrs,{class:d,className:u,style:h,...p}=null!=s?s:{},g=["heading-node","font-semibold",`heading-${a}`,d,u].filter(Boolean).join(" "),f=r?{...r,inlineImages:!0}:r;/* @__PURE__ */
9
- return n(c,{dir:"auto",className:g,..."object"==typeof h&&null!=h?{style:h}:{},...p,children:null!=o?o:r&&i?m(t.children,f,String(null!=l?l:`heading-${a}`),i):null})}function O(e){const{node:t,ctx:r,renderNode:i,indexKey:l,children:o}=e;/* @__PURE__ */
10
- return n("blockquote",{className:"blockquote-node",dir:"auto",cite:t.cite,children:null!=o?o:r&&i?m(t.children,r,String(null!=l?l:"blockquote"),i):null})}function P(e){const{node:t,ctx:r,renderNode:i,value:l,indexKey:o,children:a}=e;/* @__PURE__ */
11
- return n("li",{className:"list-item pl-1.5 my-2",dir:"auto",value:null==l?void 0:l,children:null!=a?a:r&&i?m(t.children,r,String(null!=o?o:"list-item"),i):null})}function E(e){var t;const{node:r,ctx:i,renderNode:l,indexKey:o}=e,a=r.ordered?"ol":"ul",c=r.ordered&&r.start?r.start:void 0,s=i&&p(i.customId).list_item||P;/* @__PURE__ */
12
- return n(a,{className:r.ordered?"list-node my-5 pl-[calc(13/8*1em)] list-decimal":"list-node my-5 pl-[calc(13/8*1em)] list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)]",start:c,children:null==(t=r.items)?void 0:t.map((e,t)=>{var a;/* @__PURE__ */
13
- return n(s,{node:e,value:r.ordered?(null!=(a=r.start)?a:1)+t:void 0,ctx:i,renderNode:l,indexKey:`${String(null!=o?o:"list")}-${t}`,customId:null==i?void 0:i.customId,isDark:null==i?void 0:i.isDark,typewriter:null==i?void 0:i.typewriter},`${String(null!=o?o:"list")}-${t}`)})})}function L(t){var r;const{node:i,ctx:l,renderNode:o,indexKey:a}=t,c=Array.isArray(null==(r=null==i?void 0:i.header)?void 0:r.cells)?i.header.cells:[],s=Boolean(null==i?void 0:i.loading),d=Array.isArray(null==i?void 0:i.rows)?i.rows:[],u=e=>"right"===e?"text-right":"center"===e?"text-center":"text-left";/* @__PURE__ */
14
- return e("div",{className:"table-node-wrapper","data-index-key":a,children:[
15
- /* @__PURE__ */e("table",{className:"my-8 text-sm table-node"+(s?" table-node--loading":""),"aria-busy":s,children:[
16
- /* @__PURE__ */n("thead",{className:"border-[var(--table-border,#cbd5e1)]",children:/* @__PURE__ */n("tr",{className:"border-b",children:c.map((e,t)=>/* @__PURE__ */n("th",{className:`font-semibold p-[calc(4/7*1em)] ${u(e.align)}`,dir:"auto",children:l&&o?h(e.children,l,`${String(null!=a?a:"table")}-th-${t}`,o):null},`header-${t}`))})}),
17
- /* @__PURE__ */n("tbody",{children:d.map((e,t)=>{var r;/* @__PURE__ */
18
- return n("tr",{className:t<d.length-1?"border-[var(--table-border,#cbd5e1)] border-b":"border-[var(--table-border,#cbd5e1)]",children:null==(r=e.cells)?void 0:r.map((e,r)=>/* @__PURE__ */n("td",{className:`p-[calc(4/7*1em)] ${u(e.align)}`,dir:"auto",children:l&&o?h(e.children,l,`${String(null!=a?a:"table")}-row-${t}-${r}`,o):null},`cell-${t}-${r}`))},`row-${t}`)})})]}),s&&/* @__PURE__ */e("div",{className:"table-node__loading",role:"status","aria-live":"polite",children:[
19
- /* @__PURE__ */n("span",{className:"table-node__spinner","aria-hidden":"true"}),
20
- /* @__PURE__ */n("span",{className:"sr-only",children:"Loading"})]})]})}function M(t){const{node:r,ctx:i,renderNode:l,indexKey:o}=t,a=Array.isArray(r.items)?r.items:[];/* @__PURE__ */
21
- return n("dl",{className:"definition-list","data-index-key":o,children:a.map((t,r)=>/* @__PURE__ */e("div",{className:"mb-4",children:[
22
- /* @__PURE__ */n("dt",{className:"definition-term font-semibold",children:i&&l?h(t.term,i,`${String(null!=o?o:"definition")}-term-${r}`,l):null}),
23
- /* @__PURE__ */n("dd",{className:"definition-desc ml-4",children:i&&l?h(t.definition,i,`${String(null!=o?o:"definition")}-desc-${r}`,l):null})]},`${String(null!=o?o:"definition")}-${r}`))})}function W(e){const{node:t,ctx:r,renderNode:i,indexKey:l}=e;/* @__PURE__ */
24
- return n("div",{id:`footnote-${t.id}`,className:"footnote-node flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",children:/* @__PURE__ */n("div",{className:"flex-1",children:r&&i?m(t.children,r,String(null!=l?l:`footnote-${t.id}`),i):null})})}function j(t){const{node:r}=t,i=`#footnote-${r.id}`;/* @__PURE__ */
25
- return n("sup",{id:`fnref-${r.id}`,className:"footnote-reference",children:/* @__PURE__ */e("a",{href:i,title:`View footnote ${r.id}`,className:"footnote-link",children:["[",r.id,"]"]})})}function R(e){const{node:t}=e;/* @__PURE__ */
26
- return n("a",{className:"footnote-anchor text-sm text-[#0366d6] hover:underline",href:`#fnref-${t.id}`,title:`Back to reference ${t.id}`,children:"↩︎"})}function q(t){var r;const{node:i,ctx:l,renderNode:o,indexKey:a,isDark:c}=t,s=String(i.kind||"note"),d=i.title&&String(i.title).trim().length?String(i.title):s.charAt(0).toUpperCase()+s.slice(1),u=`admonition-${String(null!=a?a:s)}`,h=!i.collapsible||null==(r=i.open)||r,p={note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"};/* @__PURE__ */
27
- return e("div",{className:`admonition admonition-${s}${c?" is-dark":""}`,"data-index-key":a,children:[
28
- /* @__PURE__ */e("div",{id:u,className:"admonition-header",children:[p[s]&&/* @__PURE__ */n("span",{className:"admonition-icon",children:p[s]}),
29
- /* @__PURE__ */n("span",{className:"admonition-title",children:d}),i.collapsible&&/* @__PURE__ */n("span",{className:"admonition-toggle","aria-expanded":h,"aria-controls":`${u}-content`,children:/* @__PURE__ */n("span",{children:h?"▼":"▶"})})]}),h&&/* @__PURE__ */n("div",{id:`${u}-content`,className:"admonition-content","aria-labelledby":u,children:l&&o?m(i.children,l,String(null!=a?a:u),o):null})]})}function z(e){const{node:t}=e;/* @__PURE__ */
30
- return n("span",{className:"checkbox-node",children:/* @__PURE__ */n("input",{type:"checkbox",checked:Boolean(t.checked),disabled:!0,className:"checkbox-input",readOnly:!0})})}function F(e){var t;const{node:r}=e;/* @__PURE__ */
31
- return n("span",{className:"emoji-node",children:null!=(t=r.name)?t:r.markup})}function U(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
32
- return n("strong",{className:"strong-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"strong")}-strong`,l):null})}function V(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
33
- return n("em",{className:"emphasis-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"emphasis")}-emphasis`,l):null})}function Z(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
34
- return n("del",{className:"strikethrough-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"strikethrough")}-strikethrough`,l):null})}function G(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
35
- return n("mark",{className:"highlight-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"highlight")}-highlight`,l):null})}function X(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
36
- return n("ins",{className:"insert-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"insert")}-insert`,l):null})}function Y(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
37
- return n("sub",{className:"subscript-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"subscript")}-subscript`,l):null})}function J(e){const{node:t,children:r,ctx:i,renderNode:l,indexKey:o}=e;/* @__PURE__ */
38
- return n("sup",{className:"superscript-node",children:null!=r?r:i&&l?m(t.children,i,`${String(null!=o?o:"superscript")}-superscript`,l):null})}function Q(e){/* @__PURE__ */
39
- return n("br",{})}function ee(e){return" "}function ne(e){/* @__PURE__ */
40
- return n("hr",{className:"thematic-break-node"})}function te(e){const{node:t,children:r}=e;/* @__PURE__ */
41
- return n("code",{className:"inline-code inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full",children:null!=r?r:t.code})}function re(t){var r,i,l,o,a,c,s,d,u;const{node:h,ctx:p,renderNode:g,indexKey:f}=t,y=p?{...p,inlineImages:!0}:p,x=void 0!==t.underlineBottom?"number"==typeof t.underlineBottom?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",k=null!=(r=t.animationOpacity)?r:.35,w=Math.max(.12,Math.min(.5*k,k)),b={"--link-color":null!=(i=t.color)?i:"#0366d6","--underline-height":`${null!=(l=t.underlineHeight)?l:2}px`,"--underline-bottom":x,"--underline-opacity":String(k),"--underline-rest-opacity":String(w),"--underline-duration":`${null!=(o=t.animationDuration)?o:1.6}s`,"--underline-timing":null!=(a=t.animationTiming)?a:"ease-in-out","--underline-iteration":"number"==typeof t.animationIteration?String(t.animationIteration):null!=(c=t.animationIteration)?c:"infinite"},N="string"==typeof h.title&&h.title.trim().length>0?h.title:String(null!=(s=h.href)?s:"");return h.loading?/* @__PURE__ */n("span",{className:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":"false",style:b,children:/* @__PURE__ */e("span",{className:"link-text-wrapper relative inline-flex",children:[
42
- /* @__PURE__ */n("span",{className:"leading-[normal] link-text",children:/* @__PURE__ */n(T,{node:{type:"text",content:String(null!=(d=h.text)?d:"")},ctx:p,indexKey:`${String(null!=f?f:"link")}-loading`,typewriter:t.typewriter})}),
43
- /* @__PURE__ */n("span",{className:"link-loading-indicator","aria-hidden":"true"})]})}):/* @__PURE__ */n("a",{className:"link-node",href:h.href,title:N,"aria-label":`Link: ${N}`,target:"_blank",rel:"noopener noreferrer",style:b,children:p&&g?m(h.children,y,String(null!=f?f:"link"),g):/* @__PURE__ */n(T,{node:{type:"text",content:String(null!=(u=h.text)?u:"")},ctx:p,indexKey:`${String(null!=f?f:"link")}-fallback`,typewriter:t.typewriter})})}function ie(t){var r,i,l,o,a,c;const s={showCaption:!1,...t},d=s.inline?"span":"figure",u=s.inline?"span":"div";/* @__PURE__ */
44
- return e(d,{className:s.inline?"image-node image-node--inline":"image-node image-node--block",children:[
45
- /* @__PURE__ */n(u,{className:s.inline?"image-node__inner image-node__inner--inline":"image-node__inner",children:/* @__PURE__ */n("img",{src:s.node.src,alt:String(null!=(i=null!=(r=s.node.alt)?r:s.node.title)?i:""),title:String(null!=(o=null!=(l=s.node.title)?l:s.node.alt)?o:""),className:`image-node__img${s.inline?" image-node__img--inline":""} is-loaded`,style:/\.svg(?:\?|$)/i.test(String(s.node.src))?{minHeight:null!=(a=s.svgMinHeight)?a:"12rem",width:"100%",height:"auto",objectFit:"contain"}:void 0,loading:!1===s.lazy?"eager":"lazy",decoding:"async",tabIndex:0,"aria-label":null!=(c=s.node.alt)?c:"Preview image"})}),!s.inline&&s.showCaption&&s.node.alt&&/* @__PURE__ */n("figcaption",{className:"image-node__caption",children:s.node.alt})]})}function le({node:e}){var t;const r=C(null==e?void 0:e.language),i=`Code block: ${r}`;/* @__PURE__ */
46
- return n("pre",{className:`language-${r}`,"aria-busy":!0===(null==e?void 0:e.loading),"aria-label":i,"data-language":r,tabIndex:0,children:/* @__PURE__ */n("code",{translate:"no",children:String(null!=(t=null==e?void 0:e.code)?t:"")})})}function oe(e){return D("code-block-node",e.node,{showHeader:e.showHeader,fallback:"code-block"})}function ae(e){return D("markdown-code-block-node",e.node,{showHeader:e.showHeader,fallback:"markdown-code-block"})}function ce(e){return D("mermaid-block-node",e.node,{showHeader:e.showHeader,fallback:"mermaid"})}function se(e){return D("d2-block-node",e.node,{showHeader:e.showHeader,fallback:"d2"})}function de(e){return D("infographic-block-node",e.node,{showHeader:e.showHeader,fallback:"infographic"})}function ue({node:e}){var t,r,i;const l=S(String(null!=(t=e.content)?t:""),!0,Boolean(e.loading));/* @__PURE__ */
47
- return n("div",l?{className:"math-block text-center overflow-x-auto relative min-h-[40px]",children:/* @__PURE__ */n("div",{dangerouslySetInnerHTML:{__html:l}})}:{className:"math-block text-center overflow-x-auto relative min-h-[40px]",children:/* @__PURE__ */n("div",{children:String(null!=(i=null!=(r=e.raw)?r:e.content)?i:"")})})}function me({node:e}){var t,r,i;const l="$$"===e.markup,o=S(String(null!=(t=e.content)?t:""),l,Boolean(e.loading));/* @__PURE__ */
48
- return n("span",o?{className:"math-inline-wrapper",children:/* @__PURE__ */n("span",{className:"math-inline",dangerouslySetInnerHTML:{__html:o}})}:{className:"math-inline-wrapper",children:/* @__PURE__ */n("span",{className:"math-inline",children:String(null!=(i=null!=(r=e.raw)?r:e.content)?i:"")})})}function he(e){const{node:t}=e;/* @__PURE__ */
49
- return n("span",{className:"reference-node cursor-pointer bg-[hsl(var(--muted))] text-xs rounded-md px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))]",role:"button",tabIndex:0,"data-reference-id":t.id,children:t.id})}function pe(e){var r,i;const l=p(e.customId),o=N(String(null!=(r=e.node.content)?r:""),l);/* @__PURE__ */
50
- return n(t,null==o?{children:String(null!=(i=e.node.content)?i:"")}:{children:o})}function ge(e){var r,i;const l=p(e.customId),o=N(String(null!=(r=e.node.content)?r:""),l);/* @__PURE__ */
51
- return n(t,null==o?{children:String(null!=(i=e.node.content)?i:"")}:{children:o})}function fe(e){const{node:t,ctx:i,renderNode:l,indexKey:o}=e,a=t.attrs?Array.isArray(t.attrs)?f(t.attrs):t.attrs:void 0;/* @__PURE__ */
52
- return n("div",{className:`vmr-container vmr-container-${t.name}`,...a,children:i&&l&&Array.isArray(t.children)?t.children.map((e,t)=>/* @__PURE__ */n(r.Fragment,{children:l(e,`${String(null!=o?o:"vmr-container")}-${t}`,i)},`${String(null!=o?o:"vmr-container")}-${t}`)):null})}function ye(e){return null}function xe(e){return null}function ke(n){const{node:t}=n;/* @__PURE__ */
53
- return e("div",{className:"unknown-node text-sm text-gray-500 italic",children:["Unsupported node type:"," ",String(null==t?void 0:t.type)]})}function we(e,t,i){var l,o,a;const c=null!=(l=i.customComponents)?l:p(i.customId),s=c[e.type];if(s)return r.createElement(s,{key:t,node:e,customId:i.customId,isDark:i.isDark,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter});if("html_block"===e.type||"html_inline"===e.type){const n=String(null!=(o=e.tag)?o:"").trim().toLowerCase()||function(e){const n=String(null!=e?e:"").match(/^\s*<\s*([A-Z][\w:-]*)/i);return n?n[1].toLowerCase():""}(e.content),l=n?c[n]:null;if(l){const o={...e,type:n,tag:n,content:I(e.content,n)};return r.createElement(l,{key:t,node:o,customId:i.customId,isDark:i.isDark,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter})}}switch(e.type){case"text":/* @__PURE__ */
54
- return n(T,{node:e,ctx:i,indexKey:t,typewriter:i.typewriter},t);case"text_special":/* @__PURE__ */
55
- return n(T,{node:{type:"text",content:null!=(a=e.content)?a:"",center:e.center},ctx:i,indexKey:t,typewriter:i.typewriter},t);case"paragraph":/* @__PURE__ */
56
- return n(A,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"heading":/* @__PURE__ */
57
- return n(H,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"blockquote":/* @__PURE__ */
58
- return n(O,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"list":/* @__PURE__ */
59
- return n(E,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"list_item":/* @__PURE__ */
60
- return n(P,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"table":/* @__PURE__ */
61
- return n(L,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"definition_list":/* @__PURE__ */
62
- return n(M,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"footnote":/* @__PURE__ */
63
- return n(W,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"footnote_reference":/* @__PURE__ */
64
- return n(j,{node:e},t);case"footnote_anchor":/* @__PURE__ */
65
- return n(R,{node:e},t);case"admonition":/* @__PURE__ */
66
- return n(q,{node:e,ctx:i,renderNode:we,indexKey:t,isDark:i.isDark,typewriter:i.typewriter},t);case"hardbreak":/* @__PURE__ */
67
- return n(Q,{node:e,typewriter:i.typewriter},t);case"softbreak":/* @__PURE__ */
68
- return n(ee,{node:e,typewriter:i.typewriter},t);case"link":/* @__PURE__ */
69
- return n(re,{node:e,ctx:i,renderNode:we,indexKey:t,isDark:i.isDark,showTooltip:"boolean"==typeof i.showTooltips?i.showTooltips:void 0,typewriter:i.typewriter},t);case"image":/* @__PURE__ */
70
- return n(ie,{node:e,inline:!0===i.inlineImages},t);case"inline_code":/* @__PURE__ */
71
- return n(te,{node:e,ctx:i,indexKey:t,typewriter:i.typewriter},t);case"code_block":return function(e,t,i,l){var o,a,c,s;const d=y(String(e.language||""));if("mermaid"===d){const o=l.mermaid;return o?r.createElement(o,{key:t,node:e,isDark:i.isDark,...i.mermaidProps||{}}):/* @__PURE__ */n(ce,{node:e,isDark:i.isDark,loading:Boolean(e.loading),...i.mermaidProps||{}},t)}if("infographic"===d){const o=l.infographic;return o?r.createElement(o,{key:t,node:e,isDark:i.isDark,...i.infographicProps||{}}):/* @__PURE__ */n(de,{node:e,isDark:i.isDark,loading:Boolean(e.loading),...i.infographicProps||{}},t)}if("d2"===d||"d2lang"===d){const o=l.d2;return o?r.createElement(o,{key:t,node:e,isDark:i.isDark,...i.d2Props||{}}):/* @__PURE__ */n(se,{node:e,isDark:i.isDark,loading:Boolean(e.loading),...i.d2Props||{}},t)}return i.renderCodeBlocksAsPre?/* @__PURE__ */n(le,{node:e},t):/* @__PURE__ */n(oe,{node:e,loading:Boolean(e.loading),stream:i.codeBlockStream,monacoOptions:null==(o=i.codeBlockThemes)?void 0:o.monacoOptions,themes:null==(a=i.codeBlockThemes)?void 0:a.themes,minWidth:null==(c=i.codeBlockThemes)?void 0:c.minWidth,maxWidth:null==(s=i.codeBlockThemes)?void 0:s.maxWidth,isDark:i.isDark,...i.codeBlockProps||{}},t)}(e,t,i,c);case"strong":/* @__PURE__ */
72
- return n(U,{node:e,children:m(e.children,i,`${String(t)}-strong`,we)},t);case"emphasis":/* @__PURE__ */
73
- return n(V,{node:e,children:m(e.children,i,`${String(t)}-em`,we)},t);case"strikethrough":/* @__PURE__ */
74
- return n(Z,{node:e,children:m(e.children,i,`${String(t)}-strike`,we)},t);case"highlight":/* @__PURE__ */
75
- return n(G,{node:e,children:m(e.children,i,`${String(t)}-highlight`,we)},t);case"insert":/* @__PURE__ */
76
- return n(X,{node:e,children:m(e.children,i,`${String(t)}-insert`,we)},t);case"subscript":/* @__PURE__ */
77
- return n(Y,{node:e,children:m(e.children,i,`${String(t)}-sub`,we)},t);case"superscript":/* @__PURE__ */
78
- return n(J,{node:e,children:m(e.children,i,`${String(t)}-sup`,we)},t);case"checkbox":case"checkbox_input":/* @__PURE__ */
79
- return n(z,{node:e,typewriter:i.typewriter},t);case"emoji":/* @__PURE__ */
80
- return n(F,{node:e,typewriter:i.typewriter},t);case"thematic_break":/* @__PURE__ */
81
- return n(ne,{node:e},t);case"math_inline":/* @__PURE__ */
82
- return n(me,{node:e},t);case"math_block":/* @__PURE__ */
83
- return n(ue,{node:e},t);case"reference":/* @__PURE__ */
84
- return n(he,{node:e,ctx:i,typewriter:i.typewriter},t);case"html_block":/* @__PURE__ */
85
- return n(pe,{node:e,typewriter:i.typewriter,customId:i.customId},t);case"html_inline":/* @__PURE__ */
86
- return n(ge,{node:e,typewriter:i.typewriter,customId:i.customId},t);case"vmr_container":/* @__PURE__ */
87
- return n(fe,{node:e,ctx:i,renderNode:we,indexKey:t,typewriter:i.typewriter},t);case"label_open":case"label_close":return null;default:/* @__PURE__ */
88
- return n(ke,{node:e},t)}}function be(e){var t,r,i,l;const o=p(e.customId),a=Object.keys(o).map(String).map(e=>e.trim().toLowerCase()).filter(B),c=null!=(t=e.parseOptions)?t:{},s=null!=(r=c.customHtmlTags)?r:[],m=Array.from(new Set([...null!=(i=e.customHtmlTags)?i:[],...Array.isArray(s)?s:[],...a].map(K).filter(Boolean))),h=e.customId?`server-renderer-${e.customId}`:"server-renderer",g=m.length>0?d(h,{customHtmlTags:m}):d(h),f=e.customMarkdownIt?e.customMarkdownIt(g):g,y=null!=(l=e.final)?l:c.final,x=null==y&&0===m.length?c:{...c,...null!=y?{final:y}:{},...m.length>0?{customHtmlTags:m}:{}},k=Array.isArray(e.nodes)&&e.nodes.length?e.nodes.map(e=>({...e})):e.content?u(e.content,null!=f?f:_,x):[],w=null!=e.indexKey?String(e.indexKey):"markdown-renderer",b=function(e,n,t){return{customId:e.customId,customComponents:n,isDark:e.isDark,indexKey:t,typewriter:e.typewriter,showTooltips:e.showTooltips,renderCodeBlocksAsPre:e.renderCodeBlocksAsPre,codeBlockStream:e.codeBlockStream,codeBlockProps:{..."boolean"==typeof e.showTooltips?{showTooltips:e.showTooltips}:{},...e.codeBlockProps||{}},mermaidProps:{...e.mermaidProps||{}},d2Props:{...e.d2Props||{}},infographicProps:{...e.infographicProps||{}},codeBlockThemes:{themes:e.themes,darkTheme:e.codeBlockDarkTheme,lightTheme:e.codeBlockLightTheme,monacoOptions:e.codeBlockMonacoOptions,minWidth:e.codeBlockMinWidth,maxWidth:e.codeBlockMaxWidth},events:{onCopy:e.onCopy,onHandleArtifactClick:e.onHandleArtifactClick}}}(e,o,w);/* @__PURE__ */
89
- return n("div",{className:"markstream-react markdown-renderer"+(e.isDark?" dark":""),"data-custom-id":e.customId,children:k.map((e,t)=>/* @__PURE__ */n("div",{className:"node-slot","data-node-index":t,"data-node-type":e.type,children:/* @__PURE__ */n("div",{className:"node-content",children:we(e,`${w}-${t}`,b)})},`${w}-${t}`))})}export{q as A,O as B,z as C,se as D,F as E,ke as F,we as G,Q as H,ie as I,re as L,ae as M,be as N,A as P,he as R,Z as S,L as T,fe as V,oe as a,M as b,V as c,R as d,W as e,j as f,H as g,G as h,pe as i,ge as j,xe as k,de as l,te as m,X as n,P as o,E as p,ue as q,me as r,ce as s,le as t,U as u,Y as v,J as w,T as x,ne as y,ye as z};
@@ -1,3 +0,0 @@
1
- import{jsx as n,Fragment as t}from"react/jsx-runtime";const e=/* @__PURE__ */new Set(["table","code_block","html_block","html_inline","blockquote","list","list_item","definition_list","footnote","footnote_reference","footnote_anchor","admonition","thematic_break","math_block","thinking","vmr_container"]);function o(n){if(Array.isArray(n)&&0!==n.length)return n.reduce((n,[t,e])=>t?(n["for"===t?"htmlFor":"class"===t?"className":t]=null==e||e,n):n,{})}function s(t,e,r,i){if(!Array.isArray(t)||0===t.length)return null;const c=[];for(let l=0;l<t.length;l++){const a=t[l];if(a){if("label_open"===a.type){const h=[];for(l++;l<t.length;){const n=t[l];if("label_close"===(null==n?void 0:n.type))break;n&&h.push(n),l++}const p=`${r}-label-${l}`;c.push(
2
- /* @__PURE__ */n("label",{...o(a.attrs),children:s(h,e,`${p}-child`,i)},p));continue}"label_close"!==a.type&&c.push(i(a,`${r}-${l}`,e))}}return c}function r(e,o,r,i){/* @__PURE__ */
3
- return n(t,{children:s(e,o,`${r}-inline`,i)})}const i="__global__",c="__MARKSTREAM_REACT_CUSTOM_COMPONENTS_STORE__",l=(()=>{const n=globalThis;if(n[c])return n[c];const t={scopedComponents:{},revision:0,listeners:/* @__PURE__ */new Set};return n[c]=t,t})();function a(){l.revision++;for(const n of Array.from(l.listeners))try{n()}catch{}}function h(n){return l.listeners.add(n),()=>{l.listeners.delete(n)}}function p(){return l.revision}function d(n,t){"string"==typeof n?l.scopedComponents[n]={...t||{}}:l.scopedComponents[i]={...n},a()}function g(n){const t=l.scopedComponents[i]||{};if(!n)return t;const e=l.scopedComponents[n]||{};return t&&0!==Object.keys(t).length?e&&0!==Object.keys(e).length?{...t,...e}:t:e}function u(n){if(n===i)throw new Error("removeCustomComponents: cannot delete global mapping; call clearGlobalCustomComponents instead.");delete l.scopedComponents[n],a()}function w(){delete l.scopedComponents[i],a()}const v='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round">\n <path d="M13.5 6.5v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h4.01" />\n <path d="m8.5 1.5 5 5h-4a1 1 0 01-1-1zm-3 10h5m-5-3h5m-5-3h1" />\n </g>\n</svg>\n\n';let m=null,f=null,k=null;const x=/* @__PURE__ */new Set;function j(n){m=null!=n?n:null}const M={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",d2lang:"d2",plaintext:"plain",text:"plain","c++":"cpp",md:"markdown"},C={"":v,plain:v,text:v,javascript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4.5 11c0 .828427.6715729 1.5 1.5 1.5.8284271 0 1.5-.671573 1.5-1.5V7.5M12.5 8.75C12.5 8.05964406 11.9627417 7.5 11.3 7.5L10.7 7.5C10.0372583 7.5 9.5 8.05964406 9.5 8.75 9.5 9.44035594 10.0372583 10 10.7 10L11.3 10C11.9627417 10 12.5 10.5596441 12.5 11.25 12.5 11.9403559 11.9627417 12.5 11.3 12.5L10.7 12.5C10.0372583 12.5 9.5 11.9403559 9.5 11.25" />\n <path d="m 4,1.5 h 8 c 1.385,0 2.5,1.115 2.5,2.5 v 8 c 0,1.385 -1.115,2.5 -2.5,2.5 H 4 C 2.615,14.5 1.5,13.385 1.5,12 V 4 C 1.5,2.615 2.615,1.5 4,1.5 Z" />\n </g>\n</svg>\n\n',typescript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 1.5h8A2.5 2.5 0 0114.5 4v8a2.5 2.5 0 01-2.5 2.5H4A2.5 2.5 0 011.5 12V4A2.5 2.5 0 014 1.5" />\n <path d="M12.5 8.75c0-.69-.54-1.25-1.2-1.25h-.6c-.66 0-1.2.56-1.2 1.25S10.04 10 10.7 10h.6c.66 0 1.2.56 1.2 1.25s-.54 1.25-1.2 1.25h-.6c-.66 0-1.2-.56-1.2-1.25m-3-3.75v5M5 7.5h3" />\n </g>\n</svg>\n\n',jsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#99d1db" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 10.8c4.14 0 7.5-1.25 7.5-2.8S12.14 5.2 8 5.2.5 6.45.5 8s3.36 2.8 7.5 2.8" />\n <path d="M5.52 9.4c2.07 3.5 4.86 5.72 6.23 4.95 1.37-.78.8-4.24-1.27-7.75C8.41 3.1 5.62.88 4.25 1.65c-1.37.78-.8 4.24 1.27 7.75" />\n <path d="M5.52 6.6c-2.07 3.5-2.64 6.97-1.27 7.75 1.37.77 4.16-1.45 6.23-4.95s2.64-6.97 1.27-7.75C10.38.88 7.59 3.1 5.52 6.6" />\n <path d="M8.5 8a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n\n',tsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 11.3c4.14 0 7.5-1.28 7.5-2.86S12.14 5.58 8 5.58.5 6.86.5 8.44s3.36 2.87 7.5 2.87Z" />\n <path d="M5.52 9.87c2.07 3.6 4.86 5.86 6.23 5.07 1.37-.8.8-4.34-1.27-7.93S5.62 1.16 4.25 1.95s-.8 4.34 1.27 7.92" />\n <path d="M5.52 7.01c-2.07 3.59-2.64 7.14-1.27 7.93s4.16-1.48 6.23-5.07c2.07-3.58 2.64-7.13 1.27-7.92-1.37-.8-4.16 1.47-6.23 5.06" />\n <path d="M8.5 8.44a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n\n',html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ef9f76" d="M1.5 1.5h13L13 13l-5 2-5-2z" />\n <path stroke="#c6d0f5" d="M11 4.5H5l.25 3h5.5l-.25 3-2.5 1-2.5-1-.08-1" />\n </g>\n</svg>\n\n',css:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round">\n <path d="m4 1.5h8c1.38 0 2.5 1.12 2.5 2.5v8c0 1.38-1.12 2.5-2.5 2.5h-8c-1.38 0-2.5-1.12-2.5-2.5v-8c0-1.38 1.12-2.5 2.5-2.5z" />\n <path stroke-width=".814" d="m 10.240861,11.529149 c 0,0.58011 0.437448,1.039154 0.96002,1.035371 l 0.451635,-0.0032 c 0.522572,-0.0036 0.949379,-0.451477 0.949379,-1.032848 0,-0.581372 -0.426807,-1.065638 -0.949379,-1.065638 l -0.451635,3.4e-5 c -0.522572,3.9e-5 -0.949379,-0.4855273 -0.949379,-1.0656374 0,-0.5801104 0.426807,-1.0378931 0.949379,-1.0378931 l 0.451635,2.825e-4 c 0.522572,3.267e-4 0.951743,0.4577827 0.951743,1.0378931 M 6.8003972,11.529149 c 0,0.58011 0.4374474,1.039154 0.9600196,1.035371 l 0.46464,-0.0032 c 0.5225722,-0.0035 0.9363738,-0.451477 0.9363738,-1.031587 0,-0.580111 -0.4090724,-1.065638 -0.9316446,-1.065638 l -0.4693692,3.4e-5 c -0.5225722,3.8e-5 -0.949379,-0.4855272 -0.949379,-1.0656373 0,-0.5801104 0.4268068,-1.0378931 0.949379,-1.0378931 h 0.4516348 c 0.5225722,0 0.9635665,0.4577827 0.9635665,1.0378931 M 3.4072246,11.529149 c 0,0.58011 0.4374474,1.051765 0.9600196,1.051765 H 4.818879 c 0.5225722,0 0.949379,-0.456521 0.949379,-1.037893 m 0.01129,-2.1312747 c 0,-0.5801103 -0.4374474,-1.037893 -0.9600196,-1.037893 L 4.3678939,8.3741358 C 3.8453217,8.3744624 3.4078743,8.8420074 3.4078743,9.4233788 v 2.1186642" />\n </g>\n</svg>\n\n',json:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5H4c-.75 0-1.5.75-1.5 1.5v2c0 1.1-1 2-1.83 2 .83 0 1.83.9 1.83 2v2c0 .75.75 1.5 1.5 1.5h.5m7-11h.5c.75 0 1.5.75 1.5 1.5v2c0 1.1 1 2 1.83 2-.83 0-1.83.9-1.83 2v2c0 .74-.75 1.5-1.5 1.5h-.5m-6.5-3a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1" />\n</svg>\n\n',python:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#8caaee" d="M8.5 5.5h-3m6 0V3c0-.8-.7-1.5-1.5-1.5H7c-.8 0-1.5.7-1.5 1.5v2.5H3c-.8 0-1.5.7-1.5 1.5v2c0 .8.7 1.5 1.48 1.5" />\n <path stroke="#e5c890" d="M10.5 10.5h-3m-3 0V13c0 .8.7 1.5 1.5 1.5h3c.8 0 1.5-.7 1.5-1.5v-2.5H13c.8 0 1.5-.7 1.5-1.5V7c0-.8-.7-1.5-1.48-1.5H11.5c0 1.5 0 2-1 2h-2" />\n <path stroke="#8caaee" d="M2.98 10.5H4.5c0-1.5 0-2 1-2h2M7.5 3.5v0" />\n <path stroke="#e5c890" d="m 8.5,12.5 v 0" />\n </g>\n</svg>\n\n',shell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M2 15.5c-.7 0-1.5-.8-1.5-1.5V5c0-.7.8-1.5 1.5-1.5h9c.7 0 1.5.8 1.5 1.5v9c0 .7-.8 1.5-1.5 1.5z" />\n <path d="m1.2 3.8 3.04-2.5S5.17.5 5.7.5h8.4c.66 0 1.4.73 1.4 1.4v7.73a2.7 2.7 0 01-.7 1.75l-2.68 3.51M3 8.5l3 2-3 2m4 0h2" />\n </g>\n</svg>\n\n',markdown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m9.25 8.25 2.25 2.25 2.25-2.25M3.5 11V5.5l2.04 3 1.96-3V11m4-.5V5M1.65 2.5h12.7c.59 0 1.15.49 1.15 1v9c0 .51-.56 1-1.15 1H1.65c-.59 0-1.15-.49-1.15-1V3.58c0-.5.56-1.08 1.15-1.08" />\n</svg>\n\n',mermaid:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />\n</svg>\n\n'};function y(n){var t;const e=function(n){if(!n)return"";const t=n.trim();if(!t)return"";const[e]=t.split(/\s+/),[o]=e.split(":");return o.toLowerCase()}(n);return null!=(t=M[e])?t:e}function b(n){const t=y(n);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}async function _(){return f||(k||(k=import("./languageIconExtended-B1nZmPQn.js").then(n=>(f=n.EXTENDED_LANGUAGE_ICON_MAP,function(){for(const n of x)try{n()}catch{}}(),f)).catch(()=>null)),k)}async function S(){await _()}function A(n){return x.add(n),()=>{x.delete(n)}}function B(n){if(m){const t=m(n);if(null!=t&&""!==t)return t}const t=y(n),e=C[t];if(e)return e;return(null==f?void 0:f[t])||(_(),'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">\x3c!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --\x3e<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m10 9l-3 3l3 3m4 0l3-3l-3-3"/><rect width="18" height="18" x="3" y="3" rx="2"/></g></svg>\n\n')}const V={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",shell:"Shell",plain:"Text",text:"Text",markdown:"Markdown",json:"JSON",python:"Python",cpp:"C++",vue:"Vue",html:"HTML",css:"CSS",svg:"SVG",mermaid:"Mermaid",d2:"D2"};export{e as B,B as a,b,w as c,j as d,A as e,s as f,g,r as h,h as i,p as j,V as l,y as n,S as p,u as r,d as s,o as t};
@@ -1,5 +0,0 @@
1
- import { NodeComponentProps } from '../../types/node-component';
2
- export declare function SoftBreakNode(_props: NodeComponentProps<{
3
- type: 'softbreak';
4
- }>): string;
5
- export default SoftBreakNode;