markstream-react 0.0.56-beta.4 → 0.1.0-beta.3
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/README.md +17 -20
- package/dist/Tooltip-Bs7FyYvs.js +189 -0
- package/dist/codeBlockExtraProps-C_3No_qp.js +8 -0
- package/dist/{index-BQgUvQrW.js → index-uI922Np4.js} +46 -44
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/markstream-react.css +1 -1
- package/dist/next.d.ts +67 -126
- package/dist/next.js +1 -1
- package/dist/server.d.ts +66 -122
- package/dist/server.js +1 -1
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +1 -1
- package/dist/types/components/CodeBlockNode/PreCodeNode.d.ts +1 -1
- package/dist/types/components/CodeBlockNode/codeTypography.d.ts +4 -3
- package/dist/types/components/CodeBlockNode/streamDiffs.d.ts +2 -0
- package/dist/types/components/NodeRenderer/preloadStreamDiffs.d.ts +1 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/types/next.d.ts +0 -5
- package/dist/types/server-renderer/index.d.ts +0 -2
- package/dist/types/server.d.ts +0 -2
- package/dist/types/types/component-props.d.ts +53 -66
- package/dist/types/types.d.ts +13 -24
- package/dist/types/utils/languageIcon.d.ts +1 -1
- package/package.json +20 -30
- package/dist/Tooltip-DygdyBfV.js +0 -205
- package/dist/codeBlockExtraProps-B08PlQGP.js +0 -8
- package/dist/types/components/CodeBlockNode/monaco.d.ts +0 -1
- package/dist/types/components/CodeBlockNode/monacoThemeRegistry.d.ts +0 -7
- package/dist/types/components/CodeBlockNode/monacoThemeScheduler.d.ts +0 -4
- package/dist/types/components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.d.ts +0 -34
- package/dist/types/components/NodeRenderer/preloadMonaco.d.ts +0 -1
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,F as
|
|
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-Bs7FyYvs.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-Bs7FyYvs.js";import{P as Ta}from"./codeBlockExtraProps-C_3No_qp.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,I as ba,J as xa,L as Ba}from"./codeBlockExtraProps-C_3No_qp.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-uI922Np4.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
|
@@ -41,29 +41,13 @@ declare function withMarkstreamComponentDisplay<T extends ComponentType<never>>(
|
|
|
41
41
|
declare function defineStreamingComponents<const T extends Record<string, ComponentType<any>>>(components: T & StreamingComponentDefinitions<T>): T & StreamingComponentDefinitions<T>;
|
|
42
42
|
declare function defineHtmlComponents<const T extends Record<string, ComponentType<any>>>(components: T & HtmlComponentDefinitions<T>): T & HtmlComponentDefinitions<T>;
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
base?: string;
|
|
47
|
-
inherit?: boolean;
|
|
48
|
-
colors?: Record<string, string>;
|
|
49
|
-
rules?: Array<Record<string, unknown>>;
|
|
50
|
-
[key: string]: unknown;
|
|
51
|
-
}
|
|
52
|
-
type CodeBlockMonacoTheme = string | CodeBlockMonacoThemeObject;
|
|
53
|
-
type CodeBlockMonacoLanguage = string | ((...args: unknown[]) => unknown);
|
|
44
|
+
type CodeBlockTheme = string;
|
|
45
|
+
type CodeBlockThemes = readonly [dark: string, light: string];
|
|
54
46
|
interface CommonCodeBlockProps {
|
|
55
47
|
showHeader?: boolean;
|
|
56
48
|
showCopyButton?: boolean;
|
|
57
49
|
showExpandButton?: boolean;
|
|
58
50
|
}
|
|
59
|
-
interface ShikiCodeBlockProps extends CommonCodeBlockProps {
|
|
60
|
-
themes?: readonly string[];
|
|
61
|
-
/**
|
|
62
|
-
* Shiki language preload request forwarded to stream-markdown's registerHighlight().
|
|
63
|
-
* This is not a rendering allow-list; already available Shiki languages may still highlight.
|
|
64
|
-
*/
|
|
65
|
-
langs?: readonly string[];
|
|
66
|
-
}
|
|
67
51
|
interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
68
52
|
enabled?: boolean;
|
|
69
53
|
contextLineCount?: number;
|
|
@@ -71,67 +55,71 @@ interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
|
71
55
|
revealLineCount?: number;
|
|
72
56
|
}
|
|
73
57
|
type CodeBlockDiffHideUnchangedRegions = boolean | CodeBlockDiffHideUnchangedRegionsOptions;
|
|
74
|
-
|
|
75
|
-
type CodeBlockDiffAppearance = 'auto' | 'light' | 'dark';
|
|
76
|
-
type CodeBlockDiffUnchangedRegionStyle = 'line-info' | 'line-info-basic' | 'metadata' | 'simple';
|
|
77
|
-
type CodeBlockDiffHunkActionKind = 'revert' | 'stage';
|
|
78
|
-
type CodeBlockDiffHunkSide = 'upper' | 'lower';
|
|
79
|
-
interface CodeBlockDiffHunkActionContext {
|
|
80
|
-
action: CodeBlockDiffHunkActionKind;
|
|
81
|
-
side: CodeBlockDiffHunkSide;
|
|
82
|
-
lineChange: unknown;
|
|
83
|
-
originalModel: unknown;
|
|
84
|
-
modifiedModel: unknown;
|
|
85
|
-
}
|
|
86
|
-
interface CodeBlockMonacoOptions {
|
|
87
|
-
MAX_HEIGHT?: number | string;
|
|
58
|
+
interface CodeBlockOptions {
|
|
88
59
|
fontSize?: number;
|
|
89
60
|
lineHeight?: number;
|
|
90
61
|
fontFamily?: string;
|
|
62
|
+
maxHeight?: number;
|
|
63
|
+
padding?: number;
|
|
91
64
|
tabSize?: number;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
65
|
+
disableLineNumbers?: boolean;
|
|
66
|
+
overflow?: 'scroll' | 'wrap';
|
|
67
|
+
disableVirtualizationBuffers?: boolean;
|
|
68
|
+
preferredHighlighter?: 'shiki-js' | 'shiki-wasm';
|
|
69
|
+
useCSSClasses?: boolean;
|
|
70
|
+
useTokenTransformer?: boolean;
|
|
71
|
+
tokenizeMaxLineLength?: number;
|
|
72
|
+
tokenizeMaxLength?: number;
|
|
73
|
+
unsafeCSS?: string;
|
|
74
|
+
diffStyle?: 'unified' | 'split';
|
|
75
|
+
diffIndicators?: 'classic' | 'bars' | 'none';
|
|
76
|
+
disableBackground?: boolean;
|
|
77
|
+
hunkSeparators?: 'simple' | 'metadata' | 'line-info' | 'line-info-basic';
|
|
78
|
+
expandUnchanged?: boolean;
|
|
79
|
+
collapsedContextThreshold?: number;
|
|
80
|
+
lineDiffType?: 'word-alt' | 'word' | 'char' | 'none';
|
|
81
|
+
maxLineDiffLength?: number;
|
|
82
|
+
expansionLineCount?: number;
|
|
83
|
+
parseDiffOptions?: Record<string, unknown>;
|
|
84
|
+
lineHoverHighlight?: 'disabled' | 'both' | 'number' | 'line';
|
|
85
|
+
enableTokenInteractionsOnWhitespace?: boolean;
|
|
86
|
+
enableGutterUtility?: boolean;
|
|
87
|
+
enableLineSelection?: boolean;
|
|
88
|
+
controlledSelection?: boolean;
|
|
89
|
+
onGutterUtilityClick?: (...args: any[]) => unknown;
|
|
90
|
+
onLineClick?: (...args: any[]) => unknown;
|
|
91
|
+
onLineNumberClick?: (...args: any[]) => unknown;
|
|
92
|
+
onLineEnter?: (...args: any[]) => unknown;
|
|
93
|
+
onLineLeave?: (...args: any[]) => unknown;
|
|
94
|
+
onTokenClick?: (...args: any[]) => unknown;
|
|
95
|
+
onTokenEnter?: (...args: any[]) => unknown;
|
|
96
|
+
onTokenLeave?: (...args: any[]) => unknown;
|
|
97
|
+
onLineSelected?: (...args: any[]) => unknown;
|
|
98
|
+
onLineSelectionStart?: (...args: any[]) => unknown;
|
|
99
|
+
onLineSelectionChange?: (...args: any[]) => unknown;
|
|
100
|
+
onLineSelectionEnd?: (...args: any[]) => unknown;
|
|
101
|
+
getLineIndex?: (...args: any[]) => unknown;
|
|
102
|
+
renderAnnotation?: (...args: any[]) => unknown;
|
|
103
|
+
renderGutterUtility?: (...args: any[]) => unknown;
|
|
104
|
+
onPostRender?: (...args: any[]) => unknown;
|
|
105
|
+
mergeConflict?: boolean;
|
|
106
|
+
lineAnnotations?: unknown[];
|
|
107
|
+
onController?: (controller: any) => void;
|
|
108
|
+
workerManager?: unknown;
|
|
121
109
|
}
|
|
122
110
|
interface CodeBlockNodeProps extends CommonCodeBlockProps {
|
|
123
111
|
node: CodeBlockNode$1;
|
|
112
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
124
113
|
isDark?: boolean;
|
|
125
114
|
loading?: boolean;
|
|
126
115
|
stream?: boolean;
|
|
127
|
-
darkTheme?:
|
|
128
|
-
lightTheme?:
|
|
116
|
+
darkTheme?: CodeBlockTheme;
|
|
117
|
+
lightTheme?: CodeBlockTheme;
|
|
129
118
|
isShowPreview?: boolean;
|
|
130
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
131
119
|
enableFontSizeControl?: boolean;
|
|
132
120
|
minWidth?: string | number;
|
|
133
121
|
maxWidth?: string | number;
|
|
134
|
-
themes?:
|
|
122
|
+
themes?: CodeBlockThemes;
|
|
135
123
|
showPreviewButton?: boolean;
|
|
136
124
|
showCollapseButton?: boolean;
|
|
137
125
|
showFontSizeButtons?: boolean;
|
|
@@ -185,7 +173,6 @@ interface PreCodeNodeProps {
|
|
|
185
173
|
style?: CSSProperties;
|
|
186
174
|
showLineNumbers?: boolean;
|
|
187
175
|
diffInline?: boolean;
|
|
188
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
189
176
|
}
|
|
190
177
|
interface MermaidBlockNodeProps {
|
|
191
178
|
node: CodeBlockNode$1;
|
|
@@ -275,9 +262,10 @@ interface InfographicBlockNodeProps {
|
|
|
275
262
|
showZoomControls?: boolean;
|
|
276
263
|
}
|
|
277
264
|
|
|
278
|
-
type NodeRendererCodeBlockThemes = CodeBlockNodeProps['themes']
|
|
279
|
-
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node' | 'themes'
|
|
265
|
+
type NodeRendererCodeBlockThemes = CodeBlockNodeProps['themes'];
|
|
266
|
+
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node' | 'themes' | 'codeBlockOptions'>> & {
|
|
280
267
|
themes?: NodeRendererCodeBlockThemes;
|
|
268
|
+
codeBlockOptions?: never;
|
|
281
269
|
} & Record<string, unknown>;
|
|
282
270
|
interface NodeRendererProps<TStreamingComponents extends Record<string, ComponentType<any>> = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap> {
|
|
283
271
|
content?: string;
|
|
@@ -301,30 +289,19 @@ interface NodeRendererProps<TStreamingComponents extends Record<string, Componen
|
|
|
301
289
|
htmlPolicy?: HtmlPolicy;
|
|
302
290
|
viewportPriority?: boolean;
|
|
303
291
|
codeBlockStream?: boolean;
|
|
304
|
-
codeBlockDarkTheme?:
|
|
305
|
-
codeBlockLightTheme?:
|
|
306
|
-
codeBlockMonacoOptions?: CodeBlockMonacoOptions;
|
|
292
|
+
codeBlockDarkTheme?: CodeBlockTheme;
|
|
293
|
+
codeBlockLightTheme?: CodeBlockTheme;
|
|
307
294
|
renderCodeBlocksAsPre?: boolean;
|
|
308
295
|
codeBlockMinWidth?: string | number;
|
|
309
296
|
codeBlockMaxWidth?: string | number;
|
|
297
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
310
298
|
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
311
299
|
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
312
300
|
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
313
301
|
infographicProps?: Partial<Omit<InfographicBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
314
302
|
showTooltips?: boolean;
|
|
315
|
-
/**
|
|
316
|
-
|
|
317
|
-
* When Shiki code blocks are used, only string theme names are forwarded to
|
|
318
|
-
* MarkdownCodeBlockNode / stream-markdown; theme objects are ignored.
|
|
319
|
-
*/
|
|
320
|
-
themes?: CodeBlockMonacoTheme[];
|
|
321
|
-
/**
|
|
322
|
-
* Shiki language preload list forwarded to MarkdownCodeBlockNode.
|
|
323
|
-
*
|
|
324
|
-
* The default React code block renderer is Monaco-backed. This prop is used
|
|
325
|
-
* when a custom `code_block` or language renderer uses MarkdownCodeBlockNode.
|
|
326
|
-
*/
|
|
327
|
-
langs?: readonly string[];
|
|
303
|
+
/** Dark/light theme names used by stream-diffs backed code blocks. */
|
|
304
|
+
themes?: CodeBlockThemes;
|
|
328
305
|
isDark?: boolean;
|
|
329
306
|
customId?: string;
|
|
330
307
|
indexKey?: number | string;
|
|
@@ -372,6 +349,7 @@ interface RenderContext {
|
|
|
372
349
|
htmlComponents?: HtmlComponentMap;
|
|
373
350
|
customHtmlTags?: readonly string[];
|
|
374
351
|
htmlPolicy?: HtmlPolicy;
|
|
352
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
375
353
|
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
376
354
|
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
377
355
|
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
@@ -380,13 +358,11 @@ interface RenderContext {
|
|
|
380
358
|
codeBlockStream?: boolean;
|
|
381
359
|
renderCodeBlocksAsPre?: boolean;
|
|
382
360
|
codeBlockThemes?: {
|
|
383
|
-
themes?:
|
|
384
|
-
darkTheme?:
|
|
385
|
-
lightTheme?:
|
|
386
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
361
|
+
themes?: CodeBlockThemes;
|
|
362
|
+
darkTheme?: CodeBlockTheme;
|
|
363
|
+
lightTheme?: CodeBlockTheme;
|
|
387
364
|
minWidth?: string | number;
|
|
388
365
|
maxWidth?: string | number;
|
|
389
|
-
langs?: readonly string[];
|
|
390
366
|
};
|
|
391
367
|
events: {
|
|
392
368
|
onCopy?: (code: string) => void;
|
|
@@ -428,37 +404,6 @@ interface ListItemNodeProps extends NodeComponentProps<ListItemNodeData> {
|
|
|
428
404
|
value?: number;
|
|
429
405
|
}
|
|
430
406
|
|
|
431
|
-
interface MarkdownCodeBlockNodeProps extends ShikiCodeBlockProps {
|
|
432
|
-
node: {
|
|
433
|
-
type: 'code_block';
|
|
434
|
-
language: string;
|
|
435
|
-
code: string;
|
|
436
|
-
raw: string;
|
|
437
|
-
diff?: boolean;
|
|
438
|
-
originalCode?: string;
|
|
439
|
-
updatedCode?: string;
|
|
440
|
-
};
|
|
441
|
-
loading?: boolean;
|
|
442
|
-
stream?: boolean;
|
|
443
|
-
darkTheme?: string;
|
|
444
|
-
lightTheme?: string;
|
|
445
|
-
isDark?: boolean;
|
|
446
|
-
isShowPreview?: boolean;
|
|
447
|
-
enableFontSizeControl?: boolean;
|
|
448
|
-
minWidth?: string | number;
|
|
449
|
-
maxWidth?: string | number;
|
|
450
|
-
showPreviewButton?: boolean;
|
|
451
|
-
showCollapseButton?: boolean;
|
|
452
|
-
showFontSizeButtons?: boolean;
|
|
453
|
-
showTooltips?: boolean;
|
|
454
|
-
onCopy?: (code: string) => void;
|
|
455
|
-
onPreviewCode?: (payload: {
|
|
456
|
-
type: string;
|
|
457
|
-
content: string;
|
|
458
|
-
title: string;
|
|
459
|
-
}) => void;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
407
|
type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
463
408
|
interface TooltipProps {
|
|
464
409
|
visible: boolean;
|
|
@@ -594,7 +539,6 @@ declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']> & {
|
|
|
594
539
|
declare function ImageNode(rawProps: ImageNodeProps): React.JSX.Element;
|
|
595
540
|
declare function PreCodeNode(props: PreCodeNodeProps): React.JSX.Element;
|
|
596
541
|
declare function CodeBlockNode(props: CodeBlockNodeProps): React.JSX.Element;
|
|
597
|
-
declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): React.JSX.Element;
|
|
598
542
|
declare function MermaidBlockNode(props: MermaidBlockNodeProps): React.JSX.Element;
|
|
599
543
|
declare function D2BlockNode(props: D2BlockNodeProps): React.JSX.Element;
|
|
600
544
|
declare function InfographicBlockNode(props: InfographicBlockNodeProps): React.JSX.Element;
|
|
@@ -635,4 +579,4 @@ declare function FallbackComponent(props: NodeComponentProps<{
|
|
|
635
579
|
declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext): any;
|
|
636
580
|
declare function NodeRenderer<TStreamingComponents extends StreamingComponentMap = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap>(props: NodeRendererProps<TStreamingComponents, THtmlComponents>): React.JSX.Element;
|
|
637
581
|
|
|
638
|
-
export { AdmonitionNode, BlockquoteNode, CheckboxNode,
|
|
582
|
+
export { AdmonitionNode, BlockquoteNode, CheckboxNode, CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockNode, CodeBlockNodeProps, CodeBlockOptions, CodeBlockPreviewPayload, CodeBlockTheme, CodeBlockThemes, CommonCodeBlockProps, CustomComponentDisplayMode, D2BlockNode, D2BlockNodeProps, DefinitionListNode, EmojiNode, EmphasisNode, FallbackComponent, FootnoteAnchorNode, FootnoteNode, FootnoteReferenceNode, HardBreakNode, HeadingNode, HighlightNode, HtmlBlockNode, HtmlComponent, HtmlComponentMap, HtmlInlineNode, HtmlPreviewFrame, HtmlPreviewFrameProps, ImageNode, ImageNodeProps, InfographicBlockNode, InfographicBlockNodeProps, InlineCodeNode, InsertNode, LinkNode, LinkNodeProps, LinkNodeStyleProps, ListItemNode, ListItemNodeProps, ListNode, MarkstreamCustomComponent, MathBlockNode, MathBlockNodeProps, MathInlineNode, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNode, MermaidBlockNodeProps, NodeComponentProps, NodeRenderer, NodeRendererCodeBlockProps, NodeRendererProps, ParagraphNode, PreCodeNode, PreCodeNodeProps, CodeBlockNode as ReactCodeBlockNode, ReferenceNode, StreamingComponent, StreamingComponentMap, StrikethroughNode, StrongNode, SubscriptNode, SuperscriptNode, TableNode, TextNode, ThematicBreakNode, Tooltip, TooltipPlacement, TooltipProps, VmrContainerNode, clearGlobalCustomComponents, NodeRenderer as default, defineHtmlComponents, defineStreamingComponents, getCustomComponentDisplay, getCustomNodeComponents, removeCustomComponents, renderNode, setCustomComponents, withMarkstreamComponentDisplay };
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,e as o,f as a,j as s,l as d,
|
|
1
|
+
import{b as e,e as o,f as a,j as s,l as d,A as t,I as n,Q as N}from"./codeBlockExtraProps-C_3No_qp.js";import{A as r,B as i,C as m,a as l,D as p,b as c,E as C,c as k,F as h,d as g,e as B,f,H as u,g as I,h as H,i as b,j as x,k as F,I as S,l as j,m as D,n as L,L as M,o as P,p as R,M as T,q as A,r as E,N as v,P as w,s as y,a as q,R as G,S as V,t as z,u as J,v as K,T as O,w as Q,x as U,y as W,V as X,N as Y,z as Z}from"./index-uI922Np4.js";export{r as AdmonitionNode,i as BlockquoteNode,m as CheckboxNode,l as CodeBlockNode,p as D2BlockNode,c as DefinitionListNode,C as EmojiNode,k as EmphasisNode,h as FallbackComponent,g as FootnoteAnchorNode,B as FootnoteNode,f as FootnoteReferenceNode,u as HardBreakNode,I as HeadingNode,H as HighlightNode,b as HtmlBlockNode,x as HtmlInlineNode,F as HtmlPreviewFrame,S as ImageNode,j as InfographicBlockNode,D as InlineCodeNode,L as InsertNode,M as LinkNode,P as ListItemNode,R as ListNode,T as MathBlockNode,A as MathInlineNode,E as MermaidBlockNode,v as NodeRenderer,w as ParagraphNode,y as PreCodeNode,q as ReactCodeBlockNode,G as ReferenceNode,V as StrikethroughNode,z as StrongNode,J as SubscriptNode,K as SuperscriptNode,O as TableNode,Q as TextNode,U as ThematicBreakNode,W as Tooltip,X as VmrContainerNode,e as clearGlobalCustomComponents,Y as default,o as defineHtmlComponents,a as defineStreamingComponents,s as getCustomComponentDisplay,d as getCustomNodeComponents,t as removeCustomComponents,Z as renderNode,n as setCustomComponents,N as withMarkstreamComponentDisplay};
|
package/dist/tailwind.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents
|
|
1
|
+
const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents checkbox-node checkbox checkbox-input blockquote-node auto emoji-node note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby clsx heading-node font-semibold object emphasis-node dl definition-list indexKey mb-4 dt definition-term ctx renderNode ?? definition dd definition-desc ml-4 dependency is not install it to enable smooth footnote-reference handleScroll footnote-link cursor-pointer 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 mark highlight-node footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 footnote-anchor hover:underline ↩︎ list-item pl-1.5 my-2 valueAttr children hard-break primary fallback failed is-loaded lazy eager async image image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error currentColor load 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 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 unknown-node text-gray-500 italic node insert-node href name xlink:href markstream-d2-root-svg window.requestAnimationFrame instance.render instance missing render returned empty 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 justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 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 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 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 markstream-core plaintext data-ssr-fallback aria-busy normalizedLanguage block data-language no html_block node.type html_inline boolean mermaid infographic d2 language d2lang scroll pre-wrap configuredShowLineNumbers disableLineNumbers whitespace-pre-wrap text-node-center paragraph-node renderNodeProp paragraph child.type classAttr node.cite value void right text-right center text-center text-left table-node-wrapper table-node--loading border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] rowIdx bodyRows.length table-node__loading status polite table-node__spinner sr-only isOpen strong-node emphasis strikethrough-node strikethrough highlight 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 code_block text_special heading list_item definition_list footnote footnote_reference footnote_anchor admonition hardbreak inline_code checkbox_input emoji thematic_break math_inline math_block reference vmr_container label_open label_close server-renderer markdown-renderer dark data-custom-id node-slot data-node-index data-node-type node-content react-dom w-4 h-4 flex-shrink-0 library text-red-500 p-4">Failed instanceof error.message error hidden keydown transform ease fullscreen touches text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview min-h-[360px] transition-all duration-100 inset-0 cursor-grab isDragging containerRef w-full justify-center min-h-full markstream-react fixed z-50 bg-black/70 p-4 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing next next.type window.requestIdleCallback [data-node-index] node-spacer virtualized fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor [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] [data-stream-diffs-state] theme themes themeType 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 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 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 aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short 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 timed out hr-node thematic-break containerClass text-node pointermove pointerup pointercancel my-8 table-node colgroup table-node__resize-handle event.key in zoom 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 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 tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading [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 [mermaidWorkerClient] messageerror cleared worker inject via busy canParse findPrefix npm development process [katexWorkerClient] init cache-hit timeout waiting slot thinking htmlFor sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor 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 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 normalizedType katex mathRef rendering math-rendering role aria-describedby document math-inline--hidden math-inline__loading math-inline__spinner value?.useMonaco stream-diffs/markstream globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected °C`;
|
|
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
|
|
1
|
+
export const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents checkbox-node checkbox checkbox-input blockquote-node auto emoji-node note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby clsx heading-node font-semibold object emphasis-node dl definition-list indexKey mb-4 dt definition-term ctx renderNode ?? definition dd definition-desc ml-4 dependency is not install it to enable smooth footnote-reference handleScroll footnote-link cursor-pointer 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 mark highlight-node footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 footnote-anchor hover:underline ↩︎ list-item pl-1.5 my-2 valueAttr children hard-break primary fallback failed is-loaded lazy eager async image image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error currentColor load 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 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 unknown-node text-gray-500 italic node insert-node href name xlink:href markstream-d2-root-svg window.requestAnimationFrame instance.render instance missing render returned empty 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 justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 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 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 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 markstream-core plaintext data-ssr-fallback aria-busy normalizedLanguage block data-language no html_block node.type html_inline boolean mermaid infographic d2 language d2lang scroll pre-wrap configuredShowLineNumbers disableLineNumbers whitespace-pre-wrap text-node-center paragraph-node renderNodeProp paragraph child.type classAttr node.cite value void right text-right center text-center text-left table-node-wrapper table-node--loading border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] rowIdx bodyRows.length table-node__loading status polite table-node__spinner sr-only isOpen strong-node emphasis strikethrough-node strikethrough highlight 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 code_block text_special heading list_item definition_list footnote footnote_reference footnote_anchor admonition hardbreak inline_code checkbox_input emoji thematic_break math_inline math_block reference vmr_container label_open label_close server-renderer markdown-renderer dark data-custom-id node-slot data-node-index data-node-type node-content react-dom w-4 h-4 flex-shrink-0 library text-red-500 p-4">Failed instanceof error.message error hidden keydown transform ease fullscreen touches text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasPreview preview pending is-rendering bg-gray-800 bg-gray-50 truncate px-2.5 bg-gray-600 text-gray-200 text-gray-700 m16 isCollapsed opacity-50 cursor-not-allowed m7 m14 text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview min-h-[360px] transition-all duration-100 inset-0 cursor-grab isDragging containerRef w-full justify-center min-h-full markstream-react fixed z-50 bg-black/70 p-4 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing next next.type window.requestIdleCallback [data-node-index] node-spacer virtualized fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor [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] [data-stream-diffs-state] theme themes themeType 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 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 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 aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short 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 timed out hr-node thematic-break containerClass text-node pointermove pointerup pointercancel my-8 table-node colgroup table-node__resize-handle event.key in zoom 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 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 tag_open token.type self_closing child key ref className ms-html tag_close parse dynamic template html-inline-node html-inline-node--loading [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 [mermaidWorkerClient] messageerror cleared worker inject via busy canParse findPrefix npm development process [katexWorkerClient] init cache-hit timeout waiting slot thinking htmlFor sequencediagram classdiagram kind statediagram erdiagram flowchart graph prototype constructor 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 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 normalizedType katex mathRef rendering math-rendering role aria-describedby document math-inline--hidden math-inline__loading math-inline__spinner value?.useMonaco stream-diffs/markstream globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected °C`;
|
|
2
2
|
export default safeList;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PreCodeNodeProps } from '../../types/component-props';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
export declare function PreCodeNode({ node, className, diffInline, showLineNumbers, style
|
|
3
|
+
export declare function PreCodeNode({ node, className, diffInline, showLineNumbers, style }: PreCodeNodeProps): React.JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
type CodeBlockOptions = Record<string, unknown> | null | undefined;
|
|
2
2
|
export declare const defaultCodeFontFamily = "\"SF Mono\", Monaco, Consolas, \"Ubuntu Mono\", \"Liberation Mono\", \"Courier New\", monospace";
|
|
3
3
|
export declare const defaultCodeFontSize = 12;
|
|
4
4
|
export declare const defaultCodeLineHeight = 18;
|
|
5
5
|
export declare function readPositiveCodeMetric(value: unknown): number | undefined;
|
|
6
|
-
export declare function resolveCodePadding(options?:
|
|
6
|
+
export declare function resolveCodePadding(options?: CodeBlockOptions, defaultPadding?: number): {
|
|
7
7
|
top: number;
|
|
8
8
|
bottom: number;
|
|
9
9
|
};
|
|
10
|
-
export declare function resolveCodeTypography(options?:
|
|
10
|
+
export declare function resolveCodeTypography(options?: CodeBlockOptions, preferredFontSize?: number): {
|
|
11
11
|
fontFamily: string;
|
|
12
12
|
fontSize: number;
|
|
13
13
|
lineHeight: number;
|
|
14
14
|
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function preloadStreamDiffs(mod: any): Promise<void>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,8 +30,6 @@ export type { LinkNodeStyleProps } from './components/LinkNode/LinkNode';
|
|
|
30
30
|
export { ListItemNode } from './components/ListItemNode/ListItemNode';
|
|
31
31
|
export type { ListItemNodeProps } from './components/ListItemNode/ListItemNode';
|
|
32
32
|
export { ListNode } from './components/ListNode/ListNode';
|
|
33
|
-
export { MarkdownCodeBlockNode } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode';
|
|
34
|
-
export type { MarkdownCodeBlockNodeProps } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode';
|
|
35
33
|
export { MathBlockNode } from './components/MathBlockNode/MathBlockNode';
|
|
36
34
|
export { MathInlineNode } from './components/MathInlineNode/MathInlineNode';
|
|
37
35
|
export { MermaidBlockNode } from './components/MermaidBlockNode/MermaidBlockNode';
|
|
@@ -58,7 +56,7 @@ export type { SmoothMarkdownStreamOptions, SmoothMarkdownStreamSnapshot, } from
|
|
|
58
56
|
export * from './i18n/useSafeI18n';
|
|
59
57
|
export * from './renderers/renderNode';
|
|
60
58
|
export type { NodeRendererCodeBlockProps, NodeRendererProps } from './types';
|
|
61
|
-
export type {
|
|
59
|
+
export type { CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockNodeProps, CodeBlockOptions, CodeBlockPreviewPayload, CodeBlockTheme, CodeBlockThemes, D2BlockNodeProps, ImageNodeProps, InfographicBlockNodeProps, LinkNodeProps, MathBlockNodeProps, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNodeProps, PreCodeNodeProps, } from './types/component-props';
|
|
62
60
|
export type { NodeComponentProps } from './types/node-component';
|
|
63
61
|
export * from './utils/languageIcon';
|
|
64
62
|
export * from './workers/katexWorkerClient';
|
package/dist/types/next.d.ts
CHANGED
|
@@ -176,10 +176,6 @@ export declare const ListNode: {
|
|
|
176
176
|
}>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
177
177
|
displayName: string;
|
|
178
178
|
};
|
|
179
|
-
export declare const MarkdownCodeBlockNode: {
|
|
180
|
-
(props: import('./components/MarkdownCodeBlockNode/MarkdownCodeBlockNode').MarkdownCodeBlockNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
181
|
-
displayName: string;
|
|
182
|
-
};
|
|
183
179
|
export declare const MathBlockNode: {
|
|
184
180
|
(props: import('./types/component-props').MathBlockNodeProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
185
181
|
displayName: string;
|
|
@@ -291,7 +287,6 @@ export type { HtmlPreviewFrameProps } from './components/CodeBlockNode/HtmlPrevi
|
|
|
291
287
|
export * from './components/D2BlockNode/d2';
|
|
292
288
|
export type { LinkNodeStyleProps } from './components/LinkNode/LinkNode';
|
|
293
289
|
export type { ListItemNodeProps } from './components/ListItemNode/ListItemNode';
|
|
294
|
-
export type { MarkdownCodeBlockNodeProps } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode';
|
|
295
290
|
export type { TooltipPlacement, TooltipProps } from './components/Tooltip/Tooltip';
|
|
296
291
|
export type { CustomComponentDisplayMode, HtmlComponent, HtmlComponentMap, MarkstreamCustomComponent, StreamingComponent, StreamingComponentMap, } from './customComponents';
|
|
297
292
|
export * from './i18n/useSafeI18n';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DefinitionItemNode as DefinitionItemNodeType, ListItemNode as ListItemNodeType, ParsedNode, TableRowNode as TableRowNodeType } from 'stream-markdown-parser';
|
|
2
2
|
import { HtmlPreviewFrameProps } from '../components/CodeBlockNode/HtmlPreviewFrame';
|
|
3
|
-
import { MarkdownCodeBlockNodeProps } from '../components/MarkdownCodeBlockNode/MarkdownCodeBlockNode';
|
|
4
3
|
import { TooltipProps } from '../components/Tooltip/Tooltip';
|
|
5
4
|
import { HtmlComponentMap, StreamingComponentMap } from '../customComponents';
|
|
6
5
|
import { NodeRendererProps, RenderContext } from '../types';
|
|
@@ -129,7 +128,6 @@ export declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']
|
|
|
129
128
|
export declare function ImageNode(rawProps: ImageNodeProps): React.JSX.Element;
|
|
130
129
|
export declare function PreCodeNode(props: PreCodeNodeProps): React.JSX.Element;
|
|
131
130
|
export declare function CodeBlockNode(props: CodeBlockNodeProps): React.JSX.Element;
|
|
132
|
-
export declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): React.JSX.Element;
|
|
133
131
|
export declare function MermaidBlockNode(props: MermaidBlockNodeProps): React.JSX.Element;
|
|
134
132
|
export declare function D2BlockNode(props: D2BlockNodeProps): React.JSX.Element;
|
|
135
133
|
export declare function InfographicBlockNode(props: InfographicBlockNodeProps): React.JSX.Element;
|
package/dist/types/server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type { HtmlPreviewFrameProps } from './components/CodeBlockNode/HtmlPreviewFrame';
|
|
2
2
|
export type { LinkNodeStyleProps } from './components/LinkNode/LinkNode';
|
|
3
3
|
export type { ListItemNodeProps } from './components/ListItemNode/ListItemNode';
|
|
4
|
-
export type { MarkdownCodeBlockNodeProps } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode';
|
|
5
4
|
export type { TooltipPlacement, TooltipProps } from './components/Tooltip/Tooltip';
|
|
6
5
|
export { clearGlobalCustomComponents, defineHtmlComponents, defineStreamingComponents, getCustomComponentDisplay, getCustomNodeComponents, removeCustomComponents, setCustomComponents, withMarkstreamComponentDisplay, } from './customComponents';
|
|
7
6
|
export type { CustomComponentDisplayMode, HtmlComponent, HtmlComponentMap, MarkstreamCustomComponent, StreamingComponent, StreamingComponentMap, } from './customComponents';
|
|
@@ -30,7 +29,6 @@ export { InsertNode } from './server-renderer';
|
|
|
30
29
|
export { LinkNode } from './server-renderer';
|
|
31
30
|
export { ListItemNode } from './server-renderer';
|
|
32
31
|
export { ListNode } from './server-renderer';
|
|
33
|
-
export { MarkdownCodeBlockNode } from './server-renderer';
|
|
34
32
|
export { MathBlockNode } from './server-renderer';
|
|
35
33
|
export { MathInlineNode } from './server-renderer';
|
|
36
34
|
export { MermaidBlockNode } from './server-renderer';
|