markstream-react 2.0.18 → 2.0.20

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.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{A as e,B as a,C as s,a as o,D as r,b as t,E as n,c as d,F as i,d as l,e as m,f as N,H as c,g as k,h as u,i as g,j as p,k as C,I as f,l as h,m as I,n as B,L as D,o as T,p as M,M as K,q as W,r as b,s as L,N as S,P as R,a as X,R as E,S as x,t as H,u as P,v as F,T as O,w as v,x as y,y as _,V as j,W as w,z as A,G as q,J as G,K as U,N as Y,O as z,Q as J,U as V,Y as Q,Z,_ as $,$ as ee,a0 as ae,a1 as se,a2 as oe,a3 as re,a4 as te,a5 as ne,a6 as de,a7 as ie,a8 as le,a9 as me,aa as Ne,ab as ce,ac as ke,ad as ue,ae as ge,af as pe}from"./Tooltip-CJBn43zr.js";import{P as Ce,b as fe,e as he,f as Ie,j as Be,l as De,m as Te,q as Me,u as Ke,y as We,A as be,G as Le,J as Se,K as Re,N as Xe,S as Ee}from"./codeBlockExtraProps-DKls4xQW.js";export{e as AdmonitionNode,a as BlockquoteNode,s as CheckboxNode,o as CodeBlockNode,r as D2BlockNode,t as DefinitionListNode,n as EmojiNode,d as EmphasisNode,i as FallbackComponent,l as FootnoteAnchorNode,m as FootnoteNode,N as FootnoteReferenceNode,c as HardBreakNode,k as HeadingNode,u as HighlightNode,g as HtmlBlockNode,p as HtmlInlineNode,C as HtmlPreviewFrame,f as ImageNode,h as InfographicBlockNode,I as InlineCodeNode,B as InsertNode,D as LinkNode,T as ListItemNode,M as ListNode,K as MERMAID_WORKER_BUSY_CODE,W as MathBlockNode,b as MathInlineNode,L as MermaidBlockNode,S as NodeRenderer,R as ParagraphNode,Ce as PreCodeNode,X as ReactCodeBlockNode,E as ReferenceNode,x as StrikethroughNode,H as StrongNode,P as SubscriptNode,F as SuperscriptNode,O as TableNode,v as TextNode,y as ThematicBreakNode,_ as Tooltip,j as VmrContainerNode,w as WORKER_BUSY_CODE,A as canParseOffthread,fe as clearGlobalCustomComponents,q as clearKaTeXCache,G as clearKaTeXWorker,U as clearMermaidWorker,Y as default,he as defineHtmlComponents,Ie as defineStreamingComponents,z as disableD2,J as enableD2,V as findPrefixOffthread,Be as getCustomComponentDisplay,De as getCustomNodeComponents,Q as getKaTeXBackpressureDefaults,Te as getLanguageIcon,Z as getMermaidWorkerLoad,$ as isD2Enabled,Me as languageMap,Ke as normalizeLanguageIdentifier,We as preloadExtendedLanguageIcons,be as removeCustomComponents,ee as renderKaTeXInWorker,ae as renderKaTeXWithBackpressure,se as renderNode,Le as resolveLanguageId,Se as setCustomComponents,oe as setD2Loader,re as setDefaultI18nMap,te as setKaTeXBackpressureDefaults,ne as setKaTeXCache,de as setKaTeXConcurrencyLimit,ie as setKaTeXWorker,le as setKaTeXWorkerDebug,Re as setLanguageIconResolver,me as setMermaidWorker,Ne as setMermaidWorkerClientDebug,ce as setMermaidWorkerMaxConcurrency,Xe as subscribeLanguageIconsRevision,ke as terminateWorker,ue as useSafeI18n,ge as useSmoothMarkdownStream,pe as waitForKaTeXWorkerSlot,Ee as withMarkstreamComponentDisplay};
1
+ import{A as e,B as a,C as s,a as o,D as r,b as t,E as n,c as d,F as i,d as l,e as m,f as N,H as c,g as k,h as u,i as g,j as p,k as C,I as f,l as h,m as I,n as B,L as D,o as T,p as M,M as K,q as W,r as b,s as L,N as S,P as R,a as X,R as E,S as x,t as H,u as P,v as F,T as O,w as v,x as y,y as _,V as j,W as w,z as A,G as q,J as G,K as U,N as Y,O as z,Q as J,U as V,Y as Q,Z,_ as $,$ as ee,a0 as ae,a1 as se,a2 as oe,a3 as re,a4 as te,a5 as ne,a6 as de,a7 as ie,a8 as le,a9 as me,aa as Ne,ab as ce,ac as ke,ad as ue,ae as ge,af as pe}from"./Tooltip-TgGOwKYp.js";import{P as Ce,b as fe,e as he,f as Ie,j as Be,l as De,m as Te,q as Me,u as Ke,y as We,A as be,G as Le,J as Se,K as Re,N as Xe,S as Ee}from"./codeBlockExtraProps-DKls4xQW.js";export{e as AdmonitionNode,a as BlockquoteNode,s as CheckboxNode,o as CodeBlockNode,r as D2BlockNode,t as DefinitionListNode,n as EmojiNode,d as EmphasisNode,i as FallbackComponent,l as FootnoteAnchorNode,m as FootnoteNode,N as FootnoteReferenceNode,c as HardBreakNode,k as HeadingNode,u as HighlightNode,g as HtmlBlockNode,p as HtmlInlineNode,C as HtmlPreviewFrame,f as ImageNode,h as InfographicBlockNode,I as InlineCodeNode,B as InsertNode,D as LinkNode,T as ListItemNode,M as ListNode,K as MERMAID_WORKER_BUSY_CODE,W as MathBlockNode,b as MathInlineNode,L as MermaidBlockNode,S as NodeRenderer,R as ParagraphNode,Ce as PreCodeNode,X as ReactCodeBlockNode,E as ReferenceNode,x as StrikethroughNode,H as StrongNode,P as SubscriptNode,F as SuperscriptNode,O as TableNode,v as TextNode,y as ThematicBreakNode,_ as Tooltip,j as VmrContainerNode,w as WORKER_BUSY_CODE,A as canParseOffthread,fe as clearGlobalCustomComponents,q as clearKaTeXCache,G as clearKaTeXWorker,U as clearMermaidWorker,Y as default,he as defineHtmlComponents,Ie as defineStreamingComponents,z as disableD2,J as enableD2,V as findPrefixOffthread,Be as getCustomComponentDisplay,De as getCustomNodeComponents,Q as getKaTeXBackpressureDefaults,Te as getLanguageIcon,Z as getMermaidWorkerLoad,$ as isD2Enabled,Me as languageMap,Ke as normalizeLanguageIdentifier,We as preloadExtendedLanguageIcons,be as removeCustomComponents,ee as renderKaTeXInWorker,ae as renderKaTeXWithBackpressure,se as renderNode,Le as resolveLanguageId,Se as setCustomComponents,oe as setD2Loader,re as setDefaultI18nMap,te as setKaTeXBackpressureDefaults,ne as setKaTeXCache,de as setKaTeXConcurrencyLimit,ie as setKaTeXWorker,le as setKaTeXWorkerDebug,Re as setLanguageIconResolver,me as setMermaidWorker,Ne as setMermaidWorkerClientDebug,ce as setMermaidWorkerMaxConcurrency,Xe as subscribeLanguageIconsRevision,ke as terminateWorker,ue as useSafeI18n,ge as useSmoothMarkdownStream,pe as waitForKaTeXWorkerSlot,Ee as withMarkstreamComponentDisplay};
package/dist/next.d.ts CHANGED
@@ -170,6 +170,8 @@ interface LinkNodeProps {
170
170
  }[];
171
171
  raw: string;
172
172
  loading?: boolean;
173
+ /** `'linkify'` marks links auto-detected from bare text. */
174
+ markup?: string;
173
175
  };
174
176
  indexKey: number | string;
175
177
  customId?: string;
@@ -653,6 +655,7 @@ declare const LinkNode: {
653
655
  text: string;
654
656
  children?: stream_markdown_parser.ParsedNode[];
655
657
  loading?: boolean;
658
+ markup?: string;
656
659
  }> & LinkNodeStyleProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
657
660
  displayName: string;
658
661
  };
package/dist/next.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import a,{useState as s,useEffect as e}from"react";import{A as r,B as o,C as t,a as n,D as i,b as m,E as l,c as d,F as c,d as u,e as p,f,H as g,g as C,h as k,i as T,j as E,k as D,I as K,l as M,m as W,n as I,L as _,o as L,p as R,q as X,r as b,s as x,N as B,P as S,R as y,S as h,t as A,u as N,v as j,T as v,w as P,x as O,y as w,V as F}from"./Tooltip-CJBn43zr.js";import{M as H,W as Y,z as q,G,J as U,K as V,O as z,Q as J,U as $,X as Q,Y as Z,Z as aa,_ as sa,$ as ea,a0 as ra,a1 as oa,a2 as ta,a3 as na,a4 as ia,a5 as ma,a6 as la,a7 as da,a8 as ca,a9 as ua,aa as pa,ab as fa,ac as ga,ad as Ca,af as ka}from"./Tooltip-CJBn43zr.js";import{P as Ta}from"./codeBlockExtraProps-DKls4xQW.js";import{b as Ea,e as Da,f as Ka,l as Ma,m as Wa,q as Ia,u as _a,y as La,A as Ra,G as Xa,J as ba,K as xa,N as Ba}from"./codeBlockExtraProps-DKls4xQW.js";import{A as Sa,B as ya,C as ha,a as Aa,D as Na,b as ja,E as va,c as Pa,F as Oa,d as wa,e as Fa,f as Ha,H as Ya,g as qa,h as Ga,i as Ua,j as Va,k as za,I as Ja,l as $a,m as Qa,n as Za,L as as,o as ss,p as es,M as rs,q as os,r as ts,N as ns,P as is,s as ms,R as ls,S as ds,t as cs,u as us,v as ps,T as fs,w as gs,x as Cs,y as ks,V as Ts}from"./index-DueMgs9g.js";function Es(r,o){function t(t){const[n,i]=s(!1);return e(()=>{i(!0)},[]),n?a.createElement(r,t):function(a){const s="__MARKSTREAM_REACT_DISABLE_SYNC_KATEX__",e=globalThis,r=e[s];e[s]=!0;try{return o(a)}finally{void 0===r?delete e[s]:e[s]=r}}(t)}return t.displayName=`MarkstreamNextEntry(${r.displayName||r.name||"Component"})`,t}const Ds=Es(r,Sa),Ks=Es(o,ya),Ms=Es(t,ha),Ws=Es(n,Aa),Is=Ws,_s=Es(D,za),Ls=Es(i,Na),Rs=Es(m,ja),Xs=Es(l,va),bs=Es(d,Pa),xs=Es(u,wa),Bs=Es(p,Fa),Ss=Es(f,Ha),ys=Es(g,Ya),hs=Es(C,qa),As=Es(k,Ga),Ns=Es(T,Ua),js=Es(E,Va),vs=Es(K,Ja),Ps=Es(M,$a),Os=Es(W,Qa),ws=Es(I,Za),Fs=Es(_,as),Hs=Es(L,ss),Ys=Es(R,es),qs=Es(X,rs),Gs=Es(b,os),Us=Es(x,ts),Vs=Es(B,ns),zs=Es(c,Oa),Js=Es(S,is),$s=Es(Ta,ms),Qs=Es(y,ls),Zs=Es(h,ds),ae=Es(A,cs),se=Es(N,us),ee=Es(j,ps),re=Es(v,fs),oe=Es(P,gs),te=Es(O,Cs),ne=Es(w,ks),ie=Es(F,Ts);export{Ds as AdmonitionNode,Ks as BlockquoteNode,Ms as CheckboxNode,Ws as CodeBlockNode,Ls as D2BlockNode,Rs as DefinitionListNode,Xs as EmojiNode,bs as EmphasisNode,zs as FallbackComponent,xs as FootnoteAnchorNode,Bs as FootnoteNode,Ss as FootnoteReferenceNode,ys as HardBreakNode,hs as HeadingNode,As as HighlightNode,Ns as HtmlBlockNode,js as HtmlInlineNode,_s as HtmlPreviewFrame,vs as ImageNode,Ps as InfographicBlockNode,Os as InlineCodeNode,ws as InsertNode,Fs as LinkNode,Hs as ListItemNode,Ys as ListNode,H as MERMAID_WORKER_BUSY_CODE,qs as MathBlockNode,Gs as MathInlineNode,Us as MermaidBlockNode,Vs as NodeRenderer,Js as ParagraphNode,$s as PreCodeNode,Is as ReactCodeBlockNode,Qs as ReferenceNode,Zs as StrikethroughNode,ae as StrongNode,se as SubscriptNode,ee as SuperscriptNode,re as TableNode,oe as TextNode,te as ThematicBreakNode,ne as Tooltip,ie as VmrContainerNode,Y as WORKER_BUSY_CODE,q as canParseOffthread,Ea as clearGlobalCustomComponents,G as clearKaTeXCache,U as clearKaTeXWorker,V as clearMermaidWorker,Vs as default,Da as defineHtmlComponents,Ka as defineStreamingComponents,z as disableD2,J as enableD2,$ as findPrefixOffthread,Ma as getCustomNodeComponents,Q as getD2,Z as getKaTeXBackpressureDefaults,Wa as getLanguageIcon,aa as getMermaidWorkerLoad,sa as isD2Enabled,Ia as languageMap,_a as normalizeLanguageIdentifier,La as preloadExtendedLanguageIcons,Ra as removeCustomComponents,ea as renderKaTeXInWorker,ra as renderKaTeXWithBackpressure,oa as renderNode,Xa as resolveLanguageId,ba as setCustomComponents,ta as setD2Loader,na as setDefaultI18nMap,ia as setKaTeXBackpressureDefaults,ma as setKaTeXCache,la as setKaTeXConcurrencyLimit,da as setKaTeXWorker,ca as setKaTeXWorkerDebug,xa as setLanguageIconResolver,ua as setMermaidWorker,pa as setMermaidWorkerClientDebug,fa as setMermaidWorkerMaxConcurrency,Ba as subscribeLanguageIconsRevision,ga as terminateWorker,Ca as useSafeI18n,ka as waitForKaTeXWorkerSlot};
2
+ import a,{useState as s,useEffect as e}from"react";import{A as r,B as o,C as t,a as n,D as i,b as m,E as l,c as d,F as c,d as u,e as p,f,H as g,g as C,h as k,i as T,j as E,k as D,I as K,l as M,m as W,n as I,L as _,o as L,p as R,q as X,r as b,s as x,N as B,P as S,R as y,S as h,t as A,u as N,v as j,T as v,w as P,x as O,y as w,V as F}from"./Tooltip-TgGOwKYp.js";import{M as H,W as Y,z as q,G,J as U,K as V,O as z,Q as J,U as $,X as Q,Y as Z,Z as aa,_ as sa,$ as ea,a0 as ra,a1 as oa,a2 as ta,a3 as na,a4 as ia,a5 as ma,a6 as la,a7 as da,a8 as ca,a9 as ua,aa as pa,ab as fa,ac as ga,ad as Ca,af as ka}from"./Tooltip-TgGOwKYp.js";import{P as Ta}from"./codeBlockExtraProps-DKls4xQW.js";import{b as Ea,e as Da,f as Ka,l as Ma,m as Wa,q as Ia,u as _a,y as La,A as Ra,G as Xa,J as ba,K as xa,N as Ba}from"./codeBlockExtraProps-DKls4xQW.js";import{A as Sa,B as ya,C as ha,a as Aa,D as Na,b as ja,E as va,c as Pa,F as Oa,d as wa,e as Fa,f as Ha,H as Ya,g as qa,h as Ga,i as Ua,j as Va,k as za,I as Ja,l as $a,m as Qa,n as Za,L as as,o as ss,p as es,M as rs,q as os,r as ts,N as ns,P as is,s as ms,R as ls,S as ds,t as cs,u as us,v as ps,T as fs,w as gs,x as Cs,y as ks,V as Ts}from"./index-DueMgs9g.js";function Es(r,o){function t(t){const[n,i]=s(!1);return e(()=>{i(!0)},[]),n?a.createElement(r,t):function(a){const s="__MARKSTREAM_REACT_DISABLE_SYNC_KATEX__",e=globalThis,r=e[s];e[s]=!0;try{return o(a)}finally{void 0===r?delete e[s]:e[s]=r}}(t)}return t.displayName=`MarkstreamNextEntry(${r.displayName||r.name||"Component"})`,t}const Ds=Es(r,Sa),Ks=Es(o,ya),Ms=Es(t,ha),Ws=Es(n,Aa),Is=Ws,_s=Es(D,za),Ls=Es(i,Na),Rs=Es(m,ja),Xs=Es(l,va),bs=Es(d,Pa),xs=Es(u,wa),Bs=Es(p,Fa),Ss=Es(f,Ha),ys=Es(g,Ya),hs=Es(C,qa),As=Es(k,Ga),Ns=Es(T,Ua),js=Es(E,Va),vs=Es(K,Ja),Ps=Es(M,$a),Os=Es(W,Qa),ws=Es(I,Za),Fs=Es(_,as),Hs=Es(L,ss),Ys=Es(R,es),qs=Es(X,rs),Gs=Es(b,os),Us=Es(x,ts),Vs=Es(B,ns),zs=Es(c,Oa),Js=Es(S,is),$s=Es(Ta,ms),Qs=Es(y,ls),Zs=Es(h,ds),ae=Es(A,cs),se=Es(N,us),ee=Es(j,ps),re=Es(v,fs),oe=Es(P,gs),te=Es(O,Cs),ne=Es(w,ks),ie=Es(F,Ts);export{Ds as AdmonitionNode,Ks as BlockquoteNode,Ms as CheckboxNode,Ws as CodeBlockNode,Ls as D2BlockNode,Rs as DefinitionListNode,Xs as EmojiNode,bs as EmphasisNode,zs as FallbackComponent,xs as FootnoteAnchorNode,Bs as FootnoteNode,Ss as FootnoteReferenceNode,ys as HardBreakNode,hs as HeadingNode,As as HighlightNode,Ns as HtmlBlockNode,js as HtmlInlineNode,_s as HtmlPreviewFrame,vs as ImageNode,Ps as InfographicBlockNode,Os as InlineCodeNode,ws as InsertNode,Fs as LinkNode,Hs as ListItemNode,Ys as ListNode,H as MERMAID_WORKER_BUSY_CODE,qs as MathBlockNode,Gs as MathInlineNode,Us as MermaidBlockNode,Vs as NodeRenderer,Js as ParagraphNode,$s as PreCodeNode,Is as ReactCodeBlockNode,Qs as ReferenceNode,Zs as StrikethroughNode,ae as StrongNode,se as SubscriptNode,ee as SuperscriptNode,re as TableNode,oe as TextNode,te as ThematicBreakNode,ne as Tooltip,ie as VmrContainerNode,Y as WORKER_BUSY_CODE,q as canParseOffthread,Ea as clearGlobalCustomComponents,G as clearKaTeXCache,U as clearKaTeXWorker,V as clearMermaidWorker,Vs as default,Da as defineHtmlComponents,Ka as defineStreamingComponents,z as disableD2,J as enableD2,$ as findPrefixOffthread,Ma as getCustomNodeComponents,Q as getD2,Z as getKaTeXBackpressureDefaults,Wa as getLanguageIcon,aa as getMermaidWorkerLoad,sa as isD2Enabled,Ia as languageMap,_a as normalizeLanguageIdentifier,La as preloadExtendedLanguageIcons,Ra as removeCustomComponents,ea as renderKaTeXInWorker,ra as renderKaTeXWithBackpressure,oa as renderNode,Xa as resolveLanguageId,ba as setCustomComponents,ta as setD2Loader,na as setDefaultI18nMap,ia as setKaTeXBackpressureDefaults,ma as setKaTeXCache,la as setKaTeXConcurrencyLimit,da as setKaTeXWorker,ca as setKaTeXWorkerDebug,xa as setLanguageIconResolver,ua as setMermaidWorker,pa as setMermaidWorkerClientDebug,fa as setMermaidWorkerMaxConcurrency,Ba as subscribeLanguageIconsRevision,ga as terminateWorker,Ca as useSafeI18n,ka as waitForKaTeXWorkerSlot};
package/dist/server.d.ts CHANGED
@@ -156,6 +156,8 @@ interface LinkNodeProps {
156
156
  }[];
157
157
  raw: string;
158
158
  loading?: boolean;
159
+ /** `'linkify'` marks links auto-detected from bare text. */
160
+ markup?: string;
159
161
  };
160
162
  indexKey: number | string;
161
163
  customId?: string;
package/dist/tailwind.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby blockquote-node auto html-block-node safe escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes number ?? ease-in-out typeof infinite node.title top link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer clsx inline-code inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b emoji-node checkbox-node checkbox checkbox-input href name xlink:href markstream-d2-root-svg window.requestAnimationFrame is not instance.render instance missing object render returned empty to d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 text-sm font-medium gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 dependency install it enable smooth footnote-anchor hover:underline cursor-pointer ↩︎ footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode definition dd definition-desc ml-4 heading-node footnote-reference handleScroll footnote-link mark highlight-node hard-break next code_block next.type window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid markdown-renderer boolean primary fallback failed is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load emphasis-node markstream-core react-dom w-4 h-4 flex-shrink-0 library error message rendered text-red-500 p-4">Failed instanceof error.message hidden keydown transform ease center fullscreen touch text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasRenderError hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview transition-all duration-100 block inset-0 overflow-auto p-4 text-left cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing [data-stream-diffs-state] theme themes themeType language languages stream disableFileHeader onThemeChange renderCustomHeader renderHeaderMetadata renderHeaderPrefix wrap split line-info night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus transparent marker diff plaintext important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class vitesse-dark vitesse-light unified node.code fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedRuntimeOptions.overflow scroll pre-wrap nextOptions.unsafeCSS [data-file] [data-diff] helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container is-diff is-plain-text code-block-header code-header-main icon-slot code-header-copy min-w-0 code-header-title code-header-caption code-header-actions code-action-btn action-icon copied evenodd code-block-body--collapsed code-block-body--expanded code-fallback-plain m-0 code-editor-layer code-height-placeholder editorReady void aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status data-ssr-fallback aria-busy normalizedLanguage data-language no node.type html_inline infographic d2 d2lang configuredShowLineNumbers disableLineNumbers text-node-center paragraph-node renderNodeProp paragraph child.type classAttr node.cite children list-item pl-1.5 my-2 value list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list right text-right table-node-wrapper table-node--loading border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] rowIdx bodyRows.length table-node__loading table-node__spinner isOpen strong-node emphasis strikethrough-node strikethrough highlight insert-node insert subscript-node subscript superscript-node superscript thematic-break-node cssVars image-node__img code-block-node code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] node.content $$ math-inline-wrapper math-inline reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] data-reference-id customComponents html-inline vmr-container unknown-node italic node text_special heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close server-renderer node-content valueAttr hr-node thematic-break in out zoom containerClass pointermove pointerup pointercancel my-8 table-node colgroup table-node__resize-handle window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 tooltip event.key text-node [mermaidWorkerClient] messageerror cleared worker inject via busy timed canParse findPrefix javascript typescript go python ruby shell powershell plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin java cs php sql zsh objective-c objective-cpp [markstream-react] htmlPreviewSandbox contains both allow-scripts and this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-2 space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content available default abort thinking htmlFor markstream-react-d2 role aria-describedby [katexWorkerClient] init cache-hit timeout waiting slot npm development process document value?.useMonaco stream-diffs/markstream monospace hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified ui-monospace fontFamily markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner markstream-pre__line-numbers markstream-pre__line-numbers-text markstream-pre__code sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor normalizedType katex mathRef math-inline--hidden math-inline__loading math-inline__spinner rendering math-rendering globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected °C`;
1
+ const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents blockquote-node auto checkbox-node checkbox checkbox-input clsx href name xlink:href typeof markstream-d2-root-svg number window.requestAnimationFrame is not instance.render instance missing object render returned empty to top d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 text-sm font-medium font-mono gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs rounded !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 smooth footnote-anchor hover:underline cursor-pointer ↩︎ heading-node font-semibold insert-node list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list list-item pl-1.5 my-2 valueAttr children ?? renderNode ctx ease-in-out infinite node.title link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 hard-break next code_block next.type window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid markdown-renderer boolean safe dl definition-list indexKey mb-4 dt definition-term definition dd definition-desc ml-4 inline-code inline text-[85%] px-1 py-0.5 bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b emoji-node dependency install it enable markstream-core react-dom w-4 h-4 flex-shrink-0 library failed error message rendered text-red-500 p-4">Failed instanceof error.message hidden keydown transform ease center fullscreen touch text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasRenderError hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview transition-all duration-100 block inset-0 overflow-auto p-4 text-left cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 is-dark tooltip [data-stream-diffs-state] theme themes themeType language languages stream disableFileHeader onThemeChange renderCustomHeader renderHeaderMetadata renderHeaderPrefix wrap split line-info night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus transparent marker diff plaintext important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class vitesse-dark vitesse-light unified node.code fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedRuntimeOptions.overflow scroll pre-wrap nextOptions.unsafeCSS [data-file] [data-diff] helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container is-diff is-plain-text code-block-header code-header-main icon-slot code-header-copy min-w-0 code-header-title code-header-caption code-header-actions code-action-btn action-icon copied evenodd code-block-body--collapsed code-block-body--expanded code-fallback-plain m-0 code-editor-layer code-height-placeholder editorReady void aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status containerClass vmr-container emphasis-node unknown-node italic node note data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby text-node text-node-center javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin java cs php sql zsh objective-c objective-cpp node.type html_inline infographic d2lang configuredShowLineNumbers disableLineNumbers paragraph text_special node.content heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close html-block-node escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes [markstream-react] htmlPreviewSandbox contains both allow-scripts and this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 event.key html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank primary fallback is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load hr-node thematic-break paragraph-node child.type strong-node right text-right pointermove pointerup pointercancel table-node-wrapper my-8 table-node table-node--loading aria-busy colgroup border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] table-node__resize-handle table-node__loading table-node__spinner strikethrough-node reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] subscript-node in out zoom superscript-node footnote-reference handleScroll footnote-link mark highlight-node [mermaidWorkerClient] messageerror cleared worker inject via busy timed canParse findPrefix data-ssr-fallback normalizedLanguage data-language no renderNodeProp classAttr node.cite value rowIdx bodyRows.length isOpen thematic-break-node cssVars image-node__img code-block-node code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] $$ math-inline-wrapper math-inline data-reference-id customComponents html-inline server-renderer node-content tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-2 space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content available default abort markstream-react-d2 thinking htmlFor role aria-describedby [katexWorkerClient] init cache-hit timeout waiting slot npm development process document mathRef rendering math-rendering math-inline--hidden math-inline__loading math-inline__spinner value?.useMonaco stream-diffs/markstream monospace hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified ui-monospace fontFamily markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner markstream-pre__line-numbers markstream-pre__line-numbers-text markstream-pre__code sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor normalizedType katex globalThis.requestAnimationFrame globalThis.cancelAnimationFrame °C module did expected`;
2
2
  module.exports = safeList;
3
3
  module.exports.safeList = safeList;
4
4
  module.exports.default = safeList;
package/dist/tailwind.js CHANGED
@@ -1,2 +1,2 @@
1
- export const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby blockquote-node auto html-block-node safe escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes number ?? ease-in-out typeof infinite node.title top link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer clsx inline-code inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b emoji-node checkbox-node checkbox checkbox-input href name xlink:href markstream-d2-root-svg window.requestAnimationFrame is not instance.render instance missing object render returned empty to d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 text-sm font-medium gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 dependency install it enable smooth footnote-anchor hover:underline cursor-pointer ↩︎ footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode definition dd definition-desc ml-4 heading-node footnote-reference handleScroll footnote-link mark highlight-node hard-break next code_block next.type window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid markdown-renderer boolean primary fallback failed is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load emphasis-node markstream-core react-dom w-4 h-4 flex-shrink-0 library error message rendered text-red-500 p-4">Failed instanceof error.message hidden keydown transform ease center fullscreen touch text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasRenderError hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview transition-all duration-100 block inset-0 overflow-auto p-4 text-left cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing [data-stream-diffs-state] theme themes themeType language languages stream disableFileHeader onThemeChange renderCustomHeader renderHeaderMetadata renderHeaderPrefix wrap split line-info night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus transparent marker diff plaintext important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class vitesse-dark vitesse-light unified node.code fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedRuntimeOptions.overflow scroll pre-wrap nextOptions.unsafeCSS [data-file] [data-diff] helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container is-diff is-plain-text code-block-header code-header-main icon-slot code-header-copy min-w-0 code-header-title code-header-caption code-header-actions code-action-btn action-icon copied evenodd code-block-body--collapsed code-block-body--expanded code-fallback-plain m-0 code-editor-layer code-height-placeholder editorReady void aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status data-ssr-fallback aria-busy normalizedLanguage data-language no node.type html_inline infographic d2 d2lang configuredShowLineNumbers disableLineNumbers text-node-center paragraph-node renderNodeProp paragraph child.type classAttr node.cite children list-item pl-1.5 my-2 value list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list right text-right table-node-wrapper table-node--loading border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] rowIdx bodyRows.length table-node__loading table-node__spinner isOpen strong-node emphasis strikethrough-node strikethrough highlight insert-node insert subscript-node subscript superscript-node superscript thematic-break-node cssVars image-node__img code-block-node code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] node.content $$ math-inline-wrapper math-inline reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] data-reference-id customComponents html-inline vmr-container unknown-node italic node text_special heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close server-renderer node-content valueAttr hr-node thematic-break in out zoom containerClass pointermove pointerup pointercancel my-8 table-node colgroup table-node__resize-handle window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 tooltip event.key text-node [mermaidWorkerClient] messageerror cleared worker inject via busy timed canParse findPrefix javascript typescript go python ruby shell powershell plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin java cs php sql zsh objective-c objective-cpp [markstream-react] htmlPreviewSandbox contains both allow-scripts and this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-2 space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content available default abort thinking htmlFor markstream-react-d2 role aria-describedby [katexWorkerClient] init cache-hit timeout waiting slot npm development process document value?.useMonaco stream-diffs/markstream monospace hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified ui-monospace fontFamily markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner markstream-pre__line-numbers markstream-pre__line-numbers-text markstream-pre__code sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor normalizedType katex mathRef math-inline--hidden math-inline__loading math-inline__spinner rendering math-rendering globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected °C`;
1
+ export const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents blockquote-node auto checkbox-node checkbox checkbox-input clsx href name xlink:href typeof markstream-d2-root-svg number window.requestAnimationFrame is not instance.render instance missing object render returned empty to top d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 text-sm font-medium font-mono gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs rounded !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 smooth footnote-anchor hover:underline cursor-pointer ↩︎ heading-node font-semibold insert-node list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list list-item pl-1.5 my-2 valueAttr children ?? renderNode ctx ease-in-out infinite node.title link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 hard-break next code_block next.type window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid markdown-renderer boolean safe dl definition-list indexKey mb-4 dt definition-term definition dd definition-desc ml-4 inline-code inline text-[85%] px-1 py-0.5 bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b emoji-node dependency install it enable markstream-core react-dom w-4 h-4 flex-shrink-0 library failed error message rendered text-red-500 p-4">Failed instanceof error.message hidden keydown transform ease center fullscreen touch text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasRenderError hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview transition-all duration-100 block inset-0 overflow-auto p-4 text-left cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 is-dark tooltip [data-stream-diffs-state] theme themes themeType language languages stream disableFileHeader onThemeChange renderCustomHeader renderHeaderMetadata renderHeaderPrefix wrap split line-info night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus transparent marker diff plaintext important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class vitesse-dark vitesse-light unified node.code fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedRuntimeOptions.overflow scroll pre-wrap nextOptions.unsafeCSS [data-file] [data-diff] helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container is-diff is-plain-text code-block-header code-header-main icon-slot code-header-copy min-w-0 code-header-title code-header-caption code-header-actions code-action-btn action-icon copied evenodd code-block-body--collapsed code-block-body--expanded code-fallback-plain m-0 code-editor-layer code-height-placeholder editorReady void aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status containerClass vmr-container emphasis-node unknown-node italic node note data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby text-node text-node-center javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin java cs php sql zsh objective-c objective-cpp node.type html_inline infographic d2lang configuredShowLineNumbers disableLineNumbers paragraph text_special node.content heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close html-block-node escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes [markstream-react] htmlPreviewSandbox contains both allow-scripts and this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 event.key html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank primary fallback is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load hr-node thematic-break paragraph-node child.type strong-node right text-right pointermove pointerup pointercancel table-node-wrapper my-8 table-node table-node--loading aria-busy colgroup border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] table-node__resize-handle table-node__loading table-node__spinner strikethrough-node reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] subscript-node in out zoom superscript-node footnote-reference handleScroll footnote-link mark highlight-node [mermaidWorkerClient] messageerror cleared worker inject via busy timed canParse findPrefix data-ssr-fallback normalizedLanguage data-language no renderNodeProp classAttr node.cite value rowIdx bodyRows.length isOpen thematic-break-node cssVars image-node__img code-block-node code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] $$ math-inline-wrapper math-inline data-reference-id customComponents html-inline server-renderer node-content tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-2 space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content available default abort markstream-react-d2 thinking htmlFor role aria-describedby [katexWorkerClient] init cache-hit timeout waiting slot npm development process document mathRef rendering math-rendering math-inline--hidden math-inline__loading math-inline__spinner value?.useMonaco stream-diffs/markstream monospace hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified ui-monospace fontFamily markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner markstream-pre__line-numbers markstream-pre__line-numbers-text markstream-pre__code sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor normalizedType katex globalThis.requestAnimationFrame globalThis.cancelAnimationFrame °C module did expected`;
2
2
  export default safeList;
@@ -18,5 +18,7 @@ export declare function LinkNode(props: NodeComponentProps<{
18
18
  text: string;
19
19
  children?: ParsedNode[];
20
20
  loading?: boolean;
21
+ /** `'linkify'` marks links auto-detected from bare text. */
22
+ markup?: string;
21
23
  }> & LinkNodeStyleProps): React.JSX.Element;
22
24
  export default LinkNode;
@@ -155,6 +155,7 @@ export declare const LinkNode: {
155
155
  text: string;
156
156
  children?: import('stream-markdown-parser').ParsedNode[];
157
157
  loading?: boolean;
158
+ markup?: string;
158
159
  }> & import('./components/LinkNode/LinkNode').LinkNodeStyleProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
159
160
  displayName: string;
160
161
  };
@@ -3,5 +3,5 @@ export declare function showTooltipForAnchor(anchor: HTMLElement | null, content
3
3
  x: number;
4
4
  y: number;
5
5
  } | undefined, isDark?: boolean | null): void;
6
- export declare function hideTooltip(immediate?: boolean): void;
6
+ export declare function hideTooltip(immediate?: boolean, anchor?: HTMLElement | null): void;
7
7
  export declare function isTooltipVisible(): boolean;
@@ -115,6 +115,8 @@ export interface LinkNodeProps {
115
115
  }[];
116
116
  raw: string;
117
117
  loading?: boolean;
118
+ /** `'linkify'` marks links auto-detected from bare text. */
119
+ markup?: string;
118
120
  };
119
121
  indexKey: number | string;
120
122
  customId?: string;
@@ -1 +1 @@
1
- import t from"mermaid";async function a(a,r){var n;const e=function(t,a){const r=`%%{init: {"theme": "${"dark"===a?"dark":"default"}"}}%%\n`;return t.trimStart().startsWith("%%{")?t:r+t}(a,r),i=t;if("function"==typeof i.parse)return await(null==(n=i.parse)?void 0:n.call(i,e)),!0;throw new Error("mermaid.parse not available in worker")}t.initialize({startOnLoad:!1,securityLevel:"strict",flowchart:{htmlLabels:!1}}),self.onmessage=async t=>{var r;const n=t.data,e=t=>self.postMessage(t),i=n.id;try{if("canParse"===n.action)return void e({id:i,ok:!0,result:await a(n.payload.code,n.payload.theme)});if("findPrefix"===n.action)return void e({id:i,ok:!0,result:await async function(t,r){const n=t.split("\n"),e=function(t){const a=/^(?:graph|flowchart|flowchart\s+tb|flowchart\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\b/;for(let r=0;r<t.length;r++){const n=t[r].trim();if(n&&!n.startsWith("%%")&&a.test(n))return r}return-1}(n);if(-1===e)return null;const i=n.slice(0,e+1);await a(i.join("\n"),r);let o=e+1,s=n.length,l=e+1,c=0;for(;o<=s&&c<12;){const t=Math.floor((o+s)/2),d=[...i,...n.slice(e+1,t)].join("\n");c++;try{await a(d,r),l=t,o=t+1}catch{s=t-1}}return[...i,...n.slice(e+1,l)].join("\n")}(n.payload.code,n.payload.theme)});e({id:i,ok:!1,error:"Unknown action"})}catch(o){e({id:i,ok:!1,error:null!=(r=null==o?void 0:o.message)?r:String(o)})}};
1
+ import t from"mermaid";async function r(r,n){var a;const i=function(t,r){return function(t,r){var n,a;const i=null!==(n=null===(a=t.match(/^---[^\S\r\n]*(?:\r\n?|\n)[\s\S]*?(?:\r\n?|\n)---[^\S\r\n]*(?:\r\n?|\n)/))||void 0===a?void 0:a[0])&&void 0!==n?n:"",e=t.slice(i.length);return e.trimStart().startsWith("%%{")?t:i+r+e}(t,`%%{init: {"theme": "${"dark"===r?"dark":"default"}"}}%%\n`)}(r,n),e=t;if("function"==typeof e.parse)return await(null==(a=e.parse)?void 0:a.call(e,i)),!0;throw new Error("mermaid.parse not available in worker")}t.initialize({startOnLoad:!1,securityLevel:"strict",flowchart:{htmlLabels:!1}}),self.onmessage=async t=>{var n;const a=t.data,i=t=>self.postMessage(t),e=a.id;try{if("canParse"===a.action)return void i({id:e,ok:!0,result:await r(a.payload.code,a.payload.theme)});if("findPrefix"===a.action){const t=await async function(t,n){const a=t.split(/\r\n?|\n/),i=function(t){var r;const n=/^(?:graph|flowchart|flowchart\s+tb|flowchart\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\b/;let a="---"===(null==(r=t[0])?void 0:r.trimEnd());for(let i=0;i<t.length;i++){const r=t[i].trim();if(a)i>0&&"---"===t[i].trimEnd()&&(a=!1);else if(r&&!r.startsWith("%%")&&n.test(r))return i}return-1}(a);if(-1===i)return null;const e=a.slice(0,i+1);await r(e.join("\n"),n);let o=i+1,l=a.length,s=i+1,c=0;for(;o<=l&&c<12;){const t=Math.floor((o+l)/2),d=[...e,...a.slice(i+1,t)].join("\n");c++;try{await r(d,n),s=t,o=t+1}catch{l=t-1}}return[...e,...a.slice(i+1,s)].join("\n")}(a.payload.code,a.payload.theme);return void i({id:e,ok:!0,result:t})}i({id:e,ok:!1,error:"Unknown action"})}catch(o){i({id:e,ok:!1,error:null!=(n=null==o?void 0:o.message)?n:String(o)})}};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "markstream-react",
3
3
  "type": "module",
4
- "version": "2.0.18",
4
+ "version": "2.0.20",
5
5
  "description": "React/Next.js streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, long documents, Mermaid, KaTeX, stream-diffs powered code blocks, and custom React components.",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",
@@ -108,8 +108,8 @@
108
108
  "dependencies": {
109
109
  "@floating-ui/dom": "^1.8.0",
110
110
  "clsx": "^2.1.1",
111
- "markstream-core": "2.0.18",
112
- "stream-markdown-parser": "1.2.19"
111
+ "markstream-core": "2.0.20",
112
+ "stream-markdown-parser": "1.2.21"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@types/react": "^18.3.31",