markstream-octane 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 +10 -3
- package/dist/client/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +68 -120
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +37 -173
- package/dist/server/index.js +1 -1
- package/dist/server.d.ts +67 -120
- package/dist/tailwind.cjs +1 -1
- package/dist/tailwind.js +1 -1
- package/dist/types/components/CodeBlockNode/monaco.d.ts +1 -1
- package/dist/types/components/CodeBlockNode/streamDiffs.d.ts +2 -0
- package/dist/types/components/NodeRenderer/preloadStreamDiffs.d.ts +2 -0
- package/dist/types/index.d.ts +1 -3
- package/dist/types/server-renderer/index.d.ts +1 -3
- package/dist/types/server.d.ts +0 -2
- package/dist/types/types/component-props.d.ts +53 -65
- package/dist/types/types.d.ts +13 -22
- package/dist/types/utils/languageIcon.d.ts +2 -1
- package/package.json +24 -30
package/dist/server.d.ts
CHANGED
|
@@ -58,29 +58,13 @@ declare function defineHtmlComponents<const T extends Record<string, ComponentBo
|
|
|
58
58
|
|
|
59
59
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
base?: string;
|
|
64
|
-
inherit?: boolean;
|
|
65
|
-
colors?: Record<string, string>;
|
|
66
|
-
rules?: Array<Record<string, unknown>>;
|
|
67
|
-
[key: string]: unknown;
|
|
68
|
-
}
|
|
69
|
-
type CodeBlockMonacoTheme = string | CodeBlockMonacoThemeObject;
|
|
70
|
-
type CodeBlockMonacoLanguage = string | ((...args: unknown[]) => unknown);
|
|
61
|
+
type CodeBlockTheme = string;
|
|
62
|
+
type CodeBlockThemes = readonly [dark: string, light: string];
|
|
71
63
|
interface CommonCodeBlockProps {
|
|
72
64
|
showHeader?: boolean;
|
|
73
65
|
showCopyButton?: boolean;
|
|
74
66
|
showExpandButton?: boolean;
|
|
75
67
|
}
|
|
76
|
-
interface ShikiCodeBlockProps extends CommonCodeBlockProps {
|
|
77
|
-
themes?: readonly string[];
|
|
78
|
-
/**
|
|
79
|
-
* Shiki language preload request forwarded to stream-markdown's registerHighlight().
|
|
80
|
-
* This is not a rendering allow-list; already available Shiki languages may still highlight.
|
|
81
|
-
*/
|
|
82
|
-
langs?: readonly string[];
|
|
83
|
-
}
|
|
84
68
|
interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
85
69
|
enabled?: boolean;
|
|
86
70
|
contextLineCount?: number;
|
|
@@ -88,67 +72,71 @@ interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
|
88
72
|
revealLineCount?: number;
|
|
89
73
|
}
|
|
90
74
|
type CodeBlockDiffHideUnchangedRegions = boolean | CodeBlockDiffHideUnchangedRegionsOptions;
|
|
91
|
-
|
|
92
|
-
type CodeBlockDiffAppearance = 'auto' | 'light' | 'dark';
|
|
93
|
-
type CodeBlockDiffUnchangedRegionStyle = 'line-info' | 'line-info-basic' | 'metadata' | 'simple';
|
|
94
|
-
type CodeBlockDiffHunkActionKind = 'revert' | 'stage';
|
|
95
|
-
type CodeBlockDiffHunkSide = 'upper' | 'lower';
|
|
96
|
-
interface CodeBlockDiffHunkActionContext {
|
|
97
|
-
action: CodeBlockDiffHunkActionKind;
|
|
98
|
-
side: CodeBlockDiffHunkSide;
|
|
99
|
-
lineChange: unknown;
|
|
100
|
-
originalModel: unknown;
|
|
101
|
-
modifiedModel: unknown;
|
|
102
|
-
}
|
|
103
|
-
interface CodeBlockMonacoOptions {
|
|
104
|
-
MAX_HEIGHT?: number | string;
|
|
75
|
+
interface CodeBlockOptions {
|
|
105
76
|
fontSize?: number;
|
|
106
77
|
lineHeight?: number;
|
|
107
78
|
fontFamily?: string;
|
|
79
|
+
maxHeight?: number;
|
|
80
|
+
padding?: number;
|
|
108
81
|
tabSize?: number;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
82
|
+
disableLineNumbers?: boolean;
|
|
83
|
+
overflow?: 'scroll' | 'wrap';
|
|
84
|
+
disableVirtualizationBuffers?: boolean;
|
|
85
|
+
preferredHighlighter?: 'shiki-js' | 'shiki-wasm';
|
|
86
|
+
useCSSClasses?: boolean;
|
|
87
|
+
useTokenTransformer?: boolean;
|
|
88
|
+
tokenizeMaxLineLength?: number;
|
|
89
|
+
tokenizeMaxLength?: number;
|
|
90
|
+
unsafeCSS?: string;
|
|
91
|
+
diffStyle?: 'unified' | 'split';
|
|
92
|
+
diffIndicators?: 'classic' | 'bars' | 'none';
|
|
93
|
+
disableBackground?: boolean;
|
|
94
|
+
hunkSeparators?: 'simple' | 'metadata' | 'line-info' | 'line-info-basic';
|
|
95
|
+
expandUnchanged?: boolean;
|
|
96
|
+
collapsedContextThreshold?: number;
|
|
97
|
+
lineDiffType?: 'word-alt' | 'word' | 'char' | 'none';
|
|
98
|
+
maxLineDiffLength?: number;
|
|
99
|
+
expansionLineCount?: number;
|
|
100
|
+
parseDiffOptions?: Record<string, unknown>;
|
|
101
|
+
lineHoverHighlight?: 'disabled' | 'both' | 'number' | 'line';
|
|
102
|
+
enableTokenInteractionsOnWhitespace?: boolean;
|
|
103
|
+
enableGutterUtility?: boolean;
|
|
104
|
+
enableLineSelection?: boolean;
|
|
105
|
+
controlledSelection?: boolean;
|
|
106
|
+
onGutterUtilityClick?: (...args: any[]) => unknown;
|
|
107
|
+
onLineClick?: (...args: any[]) => unknown;
|
|
108
|
+
onLineNumberClick?: (...args: any[]) => unknown;
|
|
109
|
+
onLineEnter?: (...args: any[]) => unknown;
|
|
110
|
+
onLineLeave?: (...args: any[]) => unknown;
|
|
111
|
+
onTokenClick?: (...args: any[]) => unknown;
|
|
112
|
+
onTokenEnter?: (...args: any[]) => unknown;
|
|
113
|
+
onTokenLeave?: (...args: any[]) => unknown;
|
|
114
|
+
onLineSelected?: (...args: any[]) => unknown;
|
|
115
|
+
onLineSelectionStart?: (...args: any[]) => unknown;
|
|
116
|
+
onLineSelectionChange?: (...args: any[]) => unknown;
|
|
117
|
+
onLineSelectionEnd?: (...args: any[]) => unknown;
|
|
118
|
+
getLineIndex?: (...args: any[]) => unknown;
|
|
119
|
+
renderAnnotation?: (...args: any[]) => unknown;
|
|
120
|
+
renderGutterUtility?: (...args: any[]) => unknown;
|
|
121
|
+
onPostRender?: (...args: any[]) => unknown;
|
|
122
|
+
mergeConflict?: boolean;
|
|
123
|
+
lineAnnotations?: unknown[];
|
|
124
|
+
onController?: (controller: any) => void;
|
|
125
|
+
workerManager?: unknown;
|
|
138
126
|
}
|
|
139
127
|
interface CodeBlockNodeProps extends CommonCodeBlockProps {
|
|
140
128
|
node: CodeBlockNode$1;
|
|
129
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
141
130
|
isDark?: boolean;
|
|
142
131
|
loading?: boolean;
|
|
143
132
|
stream?: boolean;
|
|
144
|
-
darkTheme?:
|
|
145
|
-
lightTheme?:
|
|
133
|
+
darkTheme?: CodeBlockTheme;
|
|
134
|
+
lightTheme?: CodeBlockTheme;
|
|
146
135
|
isShowPreview?: boolean;
|
|
147
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
148
136
|
enableFontSizeControl?: boolean;
|
|
149
137
|
minWidth?: string | number;
|
|
150
138
|
maxWidth?: string | number;
|
|
151
|
-
themes?:
|
|
139
|
+
themes?: CodeBlockThemes;
|
|
152
140
|
showPreviewButton?: boolean;
|
|
153
141
|
showCollapseButton?: boolean;
|
|
154
142
|
showFontSizeButtons?: boolean;
|
|
@@ -293,9 +281,10 @@ interface InfographicBlockNodeProps {
|
|
|
293
281
|
|
|
294
282
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
295
283
|
|
|
296
|
-
type NodeRendererCodeBlockThemes = CodeBlockNodeProps['themes']
|
|
297
|
-
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node' | 'themes'
|
|
284
|
+
type NodeRendererCodeBlockThemes = CodeBlockNodeProps['themes'];
|
|
285
|
+
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node' | 'themes' | 'codeBlockOptions'>> & {
|
|
298
286
|
themes?: NodeRendererCodeBlockThemes;
|
|
287
|
+
codeBlockOptions?: never;
|
|
299
288
|
} & Record<string, unknown>;
|
|
300
289
|
interface NodeRendererProps<TStreamingComponents extends Record<string, ComponentBody<any>> = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap> {
|
|
301
290
|
content?: string;
|
|
@@ -319,30 +308,21 @@ interface NodeRendererProps<TStreamingComponents extends Record<string, Componen
|
|
|
319
308
|
htmlPolicy?: HtmlPolicy;
|
|
320
309
|
viewportPriority?: boolean;
|
|
321
310
|
codeBlockStream?: boolean;
|
|
322
|
-
codeBlockDarkTheme?:
|
|
323
|
-
codeBlockLightTheme?:
|
|
324
|
-
codeBlockMonacoOptions?: CodeBlockMonacoOptions;
|
|
311
|
+
codeBlockDarkTheme?: CodeBlockTheme;
|
|
312
|
+
codeBlockLightTheme?: CodeBlockTheme;
|
|
325
313
|
renderCodeBlocksAsPre?: boolean;
|
|
326
314
|
codeBlockMinWidth?: string | number;
|
|
327
315
|
codeBlockMaxWidth?: string | number;
|
|
316
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
328
317
|
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
329
318
|
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
330
319
|
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
331
320
|
infographicProps?: Partial<Omit<InfographicBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
332
321
|
showTooltips?: boolean;
|
|
333
322
|
/**
|
|
334
|
-
*
|
|
335
|
-
* When Shiki code blocks are used, only string theme names are forwarded to
|
|
336
|
-
* MarkdownCodeBlockNode / stream-markdown; theme objects are ignored.
|
|
323
|
+
* Dark/light theme names used by stream-diffs backed code blocks.
|
|
337
324
|
*/
|
|
338
|
-
themes?:
|
|
339
|
-
/**
|
|
340
|
-
* Shiki language preload list forwarded to MarkdownCodeBlockNode.
|
|
341
|
-
*
|
|
342
|
-
* The default Octane code block renderer is Monaco-backed. This prop is used
|
|
343
|
-
* when a custom `code_block` or language renderer uses MarkdownCodeBlockNode.
|
|
344
|
-
*/
|
|
345
|
-
langs?: readonly string[];
|
|
325
|
+
themes?: CodeBlockThemes;
|
|
346
326
|
isDark?: boolean;
|
|
347
327
|
customId?: string;
|
|
348
328
|
indexKey?: number | string;
|
|
@@ -390,6 +370,7 @@ interface RenderContext {
|
|
|
390
370
|
htmlComponents?: HtmlComponentMap;
|
|
391
371
|
customHtmlTags?: readonly string[];
|
|
392
372
|
htmlPolicy?: HtmlPolicy;
|
|
373
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
393
374
|
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
394
375
|
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
395
376
|
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
@@ -398,13 +379,11 @@ interface RenderContext {
|
|
|
398
379
|
codeBlockStream?: boolean;
|
|
399
380
|
renderCodeBlocksAsPre?: boolean;
|
|
400
381
|
codeBlockThemes?: {
|
|
401
|
-
themes?:
|
|
402
|
-
darkTheme?:
|
|
403
|
-
lightTheme?:
|
|
404
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
382
|
+
themes?: CodeBlockThemes;
|
|
383
|
+
darkTheme?: CodeBlockTheme;
|
|
384
|
+
lightTheme?: CodeBlockTheme;
|
|
405
385
|
minWidth?: string | number;
|
|
406
386
|
maxWidth?: string | number;
|
|
407
|
-
langs?: readonly string[];
|
|
408
387
|
};
|
|
409
388
|
events: {
|
|
410
389
|
onCopy?: (code: string) => void;
|
|
@@ -448,37 +427,6 @@ interface ListItemNodeProps extends NodeComponentProps<ListItemNodeData> {
|
|
|
448
427
|
value?: number;
|
|
449
428
|
}
|
|
450
429
|
|
|
451
|
-
interface MarkdownCodeBlockNodeProps extends ShikiCodeBlockProps {
|
|
452
|
-
node: {
|
|
453
|
-
type: 'code_block';
|
|
454
|
-
language: string;
|
|
455
|
-
code: string;
|
|
456
|
-
raw: string;
|
|
457
|
-
diff?: boolean;
|
|
458
|
-
originalCode?: string;
|
|
459
|
-
updatedCode?: string;
|
|
460
|
-
};
|
|
461
|
-
loading?: boolean;
|
|
462
|
-
stream?: boolean;
|
|
463
|
-
darkTheme?: string;
|
|
464
|
-
lightTheme?: string;
|
|
465
|
-
isDark?: boolean;
|
|
466
|
-
isShowPreview?: boolean;
|
|
467
|
-
enableFontSizeControl?: boolean;
|
|
468
|
-
minWidth?: string | number;
|
|
469
|
-
maxWidth?: string | number;
|
|
470
|
-
showPreviewButton?: boolean;
|
|
471
|
-
showCollapseButton?: boolean;
|
|
472
|
-
showFontSizeButtons?: boolean;
|
|
473
|
-
showTooltips?: boolean;
|
|
474
|
-
onCopy?: (code: string) => void;
|
|
475
|
-
onPreviewCode?: (payload: {
|
|
476
|
-
type: string;
|
|
477
|
-
content: string;
|
|
478
|
-
title: string;
|
|
479
|
-
}) => void;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
430
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
483
431
|
|
|
484
432
|
type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
@@ -614,9 +562,8 @@ declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']> & {
|
|
|
614
562
|
animationIteration?: string | number;
|
|
615
563
|
}): octane_jsx_runtime.Octane.JSX.Element;
|
|
616
564
|
declare function ImageNode(rawProps: ImageNodeProps): octane_jsx_runtime.Octane.JSX.Element | null;
|
|
617
|
-
declare function PreCodeNode({ node }: PreCodeNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
565
|
+
declare function PreCodeNode({ node, style }: PreCodeNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
618
566
|
declare function CodeBlockNode(props: CodeBlockNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
619
|
-
declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
620
567
|
declare function MermaidBlockNode(props: MermaidBlockNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
621
568
|
declare function D2BlockNode(props: D2BlockNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
622
569
|
declare function InfographicBlockNode(props: InfographicBlockNodeProps): octane_jsx_runtime.Octane.JSX.Element;
|
|
@@ -659,4 +606,4 @@ declare function FallbackComponent(props: NodeComponentProps<{
|
|
|
659
606
|
declare function renderNode(node: ParsedNode, key: string | number | bigint, ctx: RenderContext): Octane.OctaneNode;
|
|
660
607
|
declare function NodeRenderer<TStreamingComponents extends StreamingComponentMap = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap>(props: NodeRendererProps<TStreamingComponents, THtmlComponents>): octane_jsx_runtime.Octane.JSX.Element;
|
|
661
608
|
|
|
662
|
-
export { AdmonitionNode, BlockquoteNode, CheckboxNode,
|
|
609
|
+
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, CodeBlockNode as OctaneCodeBlockNode, ParagraphNode, PreCodeNode, PreCodeNodeProps, 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/tailwind.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const safeList = `
|
|
1
|
+
const safeList = `dependency is not install it to enable octane typeof stream-markdown-parser token.type block child string name value safe ms-html text self_closing tag_open tag_close parse escape html-inline dynamic template html-inline-node html-inline-node--loading inline click class=\"footnote-anchor text-sm hover:underline cursor-pointer\">\n ↩︎\n $$click href smooth html-block-node ref className html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 class=\"unknown-node text-gray-500 italic\">\n node type:\n clsx 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 error [mermaidWorkerClient] messageerror cleared worker instance inject via busy call timed out canParse findPrefix class=\"list-item pl-1.5 list-item class=\"inline-code text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b ?? image paragraph auto paragraph-node child.type renderNode ctx primary fallback failed async placeholder image-node__placeholder image-node__spinner image-node__placeholder-text image… image-node__error aria-hidden currentColor load class=\"checkbox-node\"><input markstream-d2-root-svg number window.requestAnimationFrame d2InstanceRef.current instance.render throw new missing object render returned empty 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 font-medium gap-x-1 rounded-md mode-btn px-2 py-1 text-xs !showSource showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] aria-label w-3 h-3 none round aria-pressed m9 d2-block-body d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 mermaid loose strict hidden viewBox gantt open-modal keydown fullscreen [data-mermaid-wrapper] mermaid-action-btn text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 toggle-mode preview relative absolute top-2 right-2 z-10 gap-2 backdrop-blur common.zoomIn common.zoomOut −\n common.resetZoom min-h-[360px] transition-[height] duration-150 data-mermaid-wrapper inset-0 w-full text-center justify-center min-h-full mermaid-loading mermaid-spinner diagram… mermaid-block-header bg-gray-800 bg-gray-50 space-x-2 icon-slot h-4 w-4 flex-shrink-0 space-x-1 px-2.5 bg-gray-600 text-gray-200 text-gray-700 common.preview source common.source m16 opacity-50 common.export m7 m14 p-4 text-gray-300 whitespace-pre-wrap mermaid-error data-markstream-mermaid hasRenderedOnce markstream-octane mermaid-modal-overlay dialog aria-modal mermaid-modal-header mermaid-modal-title mermaid-modal-close common.close mermaid-modal-body mermaid-modal-content available abort library text-red-500 transform ease center touches data-markstream-infographic hasPreview cursor-not-allowed infographic-preview transition-all duration-100 isDragging fixed z-50 bg-black/70 dialog-panel h-full max-w-full max-h-full shadow-lg top-6 right-6 inline-flex !isDragging in zoom markstream-core boolean dark 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 class=\"footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2\"><div id mouseenter mouseleave class=\"reference-node cursor-pointer bg-[hsl(var(--muted))] px-1.5 mx-0.5 $$mouseenter $$mouseleave $$keydown event.key class=\"footnote-reference\"><span>\n footnote-link class=\"table-node-wrapper\"><table><!><thead class=\"border-[var(--table-border,#cbd5e1)]\"><tr font-semibold p-[calc(4/7*1em)] table-node__resize-handle rowIdx bodyRows.length data-index-key aria-busy text-left pointermove pointerup pointercancel my-8 isLoading table-node__loading status aria-live polite table-node__spinner sr-only class=\"hr-node [katexWorkerClient] init cache-hit timeout waiting slot cannot delete global clearGlobalCustomComponents was provided both streamingComponents and entry will be used parser-backed class=\"mb-4\"><dt class=\"definition-term font-semibold\"></dt><dd class=\"definition-desc definition mb-4 dt definition-term dd definition-desc ml-4 animationend $$animationend text-node node.center node.type next.maxHeight infographic language code_block html_inline text_special heading list_item definition_list footnote footnote_reference footnote_anchor admonition hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox checkbox_input emoji thematic_break math_inline math_block reference html_block vmr_container label_open label_close javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin plaintext zsh objective-c objective-cpp diff java php sql heading-node [markstream-octane] htmlPreviewSandbox contains allow-scripts this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label ×\n html-preview-frame__iframe no-referrer about:blank class=\"admonition-header\"><!><span note admonition-icon admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby document thinking class children key class=\"math-block overflow-x-auto math-rendering $$ math-inline__loading math-inline__spinner normalizedType data-language data-markstream-line-numbers !options.preserveBlankKind added context markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified removed no markstream-pre__diff-code markstream-pre__diff-line 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 viteEnv.MODE development process °C sequencediagram classdiagram kind statediagram erdiagram flowchart graph indexKey prototype constructor role aria-describedby module did expected globalThis.requestAnimationFrame globalThis.cancelAnimationFrame target rel infinite node.title link-loading items-baseline gap-1.5 link-text-wrapper leading-[normal] link-text link-loading-indicator noopener noreferrer class=\"code-editor-layer\"><div></div><div code-height-placeholder code-fallback-plain m-0 style.visibility 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 transparent visible max-height height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver record.type resolvedOptions.padding vitesse-dark vitesse-light monospace unified fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedOptions.overflow fontFamily nextOptions.unsafeCSS [data-file] [data-diff] canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container code-block-header flex-1 truncate code-action-btn evenodd code-loading-placeholder loading-skeleton skeleton-line short next next.type window.requestIdleCallback [data-node-index] node-spacer data-custom-id node-slot data-node-index data-node-type fade-node node-placeholder 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-octane][perf] markdown-renderer katex value?.useMonaco stream-diffs/markstream stream-diffs runtime cite`;
|
|
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 = `
|
|
1
|
+
export const safeList = `dependency is not install it to enable octane typeof stream-markdown-parser token.type block child string name value safe ms-html text self_closing tag_open tag_close parse escape html-inline dynamic template html-inline-node html-inline-node--loading inline click class=\"footnote-anchor text-sm hover:underline cursor-pointer\">\n ↩︎\n $$click href smooth html-block-node ref className html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 class=\"unknown-node text-gray-500 italic\">\n node type:\n clsx 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 error [mermaidWorkerClient] messageerror cleared worker instance inject via busy call timed out canParse findPrefix class=\"list-item pl-1.5 list-item class=\"inline-code text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b ?? image paragraph auto paragraph-node child.type renderNode ctx primary fallback failed async placeholder image-node__placeholder image-node__spinner image-node__placeholder-text image… image-node__error aria-hidden currentColor load class=\"checkbox-node\"><input markstream-d2-root-svg number window.requestAnimationFrame d2InstanceRef.current instance.render throw new missing object render returned empty 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 font-medium gap-x-1 rounded-md mode-btn px-2 py-1 text-xs !showSource showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] aria-label w-3 h-3 none round aria-pressed m9 d2-block-body d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 mermaid loose strict hidden viewBox gantt open-modal keydown fullscreen [data-mermaid-wrapper] mermaid-action-btn text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 toggle-mode preview relative absolute top-2 right-2 z-10 gap-2 backdrop-blur common.zoomIn common.zoomOut −\n common.resetZoom min-h-[360px] transition-[height] duration-150 data-mermaid-wrapper inset-0 w-full text-center justify-center min-h-full mermaid-loading mermaid-spinner diagram… mermaid-block-header bg-gray-800 bg-gray-50 space-x-2 icon-slot h-4 w-4 flex-shrink-0 space-x-1 px-2.5 bg-gray-600 text-gray-200 text-gray-700 common.preview source common.source m16 opacity-50 common.export m7 m14 p-4 text-gray-300 whitespace-pre-wrap mermaid-error data-markstream-mermaid hasRenderedOnce markstream-octane mermaid-modal-overlay dialog aria-modal mermaid-modal-header mermaid-modal-title mermaid-modal-close common.close mermaid-modal-body mermaid-modal-content available abort library text-red-500 transform ease center touches data-markstream-infographic hasPreview cursor-not-allowed infographic-preview transition-all duration-100 isDragging fixed z-50 bg-black/70 dialog-panel h-full max-w-full max-h-full shadow-lg top-6 right-6 inline-flex !isDragging in zoom markstream-core boolean dark 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 class=\"footnote-node leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2\"><div id mouseenter mouseleave class=\"reference-node cursor-pointer bg-[hsl(var(--muted))] px-1.5 mx-0.5 $$mouseenter $$mouseleave $$keydown event.key class=\"footnote-reference\"><span>\n footnote-link class=\"table-node-wrapper\"><table><!><thead class=\"border-[var(--table-border,#cbd5e1)]\"><tr font-semibold p-[calc(4/7*1em)] table-node__resize-handle rowIdx bodyRows.length data-index-key aria-busy text-left pointermove pointerup pointercancel my-8 isLoading table-node__loading status aria-live polite table-node__spinner sr-only class=\"hr-node [katexWorkerClient] init cache-hit timeout waiting slot cannot delete global clearGlobalCustomComponents was provided both streamingComponents and entry will be used parser-backed class=\"mb-4\"><dt class=\"definition-term font-semibold\"></dt><dd class=\"definition-desc definition mb-4 dt definition-term dd definition-desc ml-4 animationend $$animationend text-node node.center node.type next.maxHeight infographic language code_block html_inline text_special heading list_item definition_list footnote footnote_reference footnote_anchor admonition hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox checkbox_input emoji thematic_break math_inline math_block reference html_block vmr_container label_open label_close javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin plaintext zsh objective-c objective-cpp diff java php sql heading-node [markstream-octane] htmlPreviewSandbox contains allow-scripts this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label ×\n html-preview-frame__iframe no-referrer about:blank class=\"admonition-header\"><!><span note admonition-icon admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby document thinking class children key class=\"math-block overflow-x-auto math-rendering $$ math-inline__loading math-inline__spinner normalizedType data-language data-markstream-line-numbers !options.preserveBlankKind added context markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified removed no markstream-pre__diff-code markstream-pre__diff-line 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 viteEnv.MODE development process °C sequencediagram classdiagram kind statediagram erdiagram flowchart graph indexKey prototype constructor role aria-describedby module did expected globalThis.requestAnimationFrame globalThis.cancelAnimationFrame target rel infinite node.title link-loading items-baseline gap-1.5 link-text-wrapper leading-[normal] link-text link-loading-indicator noopener noreferrer class=\"code-editor-layer\"><div></div><div code-height-placeholder code-fallback-plain m-0 style.visibility 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 transparent visible max-height height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver record.type resolvedOptions.padding vitesse-dark vitesse-light monospace unified fontSize lineHeight maxHeight paddingBottom paddingTop tabSize resolvedOptions.overflow fontFamily nextOptions.unsafeCSS [data-file] [data-diff] canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-block-container code-block-header flex-1 truncate code-action-btn evenodd code-loading-placeholder loading-skeleton skeleton-line short next next.type window.requestIdleCallback [data-node-index] node-spacer data-custom-id node-slot data-node-index data-node-type fade-node node-placeholder 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-octane][perf] markdown-renderer katex value?.useMonaco stream-diffs/markstream stream-diffs runtime cite`;
|
|
2
2
|
export default safeList;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getStreamDiffsRuntime(): Promise<any>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,8 +33,6 @@ export type { LinkNodeStyleProps } from './components/LinkNode/LinkNode.js';
|
|
|
33
33
|
export { ListItemNode } from './components/ListItemNode/ListItemNode.js';
|
|
34
34
|
export type { ListItemNodeProps } from './components/ListItemNode/ListItemNode.js';
|
|
35
35
|
export { ListNode } from './components/ListNode/ListNode.js';
|
|
36
|
-
export { MarkdownCodeBlockNode } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.js';
|
|
37
|
-
export type { MarkdownCodeBlockNodeProps } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.js';
|
|
38
36
|
export { MathBlockNode } from './components/MathBlockNode/MathBlockNode.js';
|
|
39
37
|
export { MathInlineNode } from './components/MathInlineNode/MathInlineNode.js';
|
|
40
38
|
export { MermaidBlockNode } from './components/MermaidBlockNode/MermaidBlockNode.js';
|
|
@@ -61,7 +59,7 @@ export type { SmoothMarkdownStreamOptions, SmoothMarkdownStreamSnapshot, } from
|
|
|
61
59
|
export * from './i18n/useSafeI18n';
|
|
62
60
|
export * from './renderers/renderNode.js';
|
|
63
61
|
export type { NodeRendererCodeBlockProps, NodeRendererProps } from './types';
|
|
64
|
-
export type {
|
|
62
|
+
export type { CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockNodeProps, CodeBlockOptions, CodeBlockPreviewPayload, CodeBlockTheme, CodeBlockThemes, D2BlockNodeProps, ImageNodeProps, InfographicBlockNodeProps, LinkNodeProps, MathBlockNodeProps, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNodeProps, PreCodeNodeProps, } from './types/component-props';
|
|
65
63
|
export type { NodeComponentProps } from './types/node-component';
|
|
66
64
|
export * from './utils/languageIcon';
|
|
67
65
|
export * from './workers/katexWorkerClient';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
2
2
|
import type { DefinitionItemNode as DefinitionItemNodeType, ListItemNode as ListItemNodeType, ParsedNode, TableRowNode as TableRowNodeType } from 'stream-markdown-parser';
|
|
3
3
|
import type { HtmlPreviewFrameProps } from '../components/CodeBlockNode/HtmlPreviewFrame.js';
|
|
4
|
-
import type { MarkdownCodeBlockNodeProps } from '../components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.js';
|
|
5
4
|
import type { TooltipProps } from '../components/Tooltip/Tooltip.js';
|
|
6
5
|
import type { HtmlComponentMap, StreamingComponentMap } from '../customComponents';
|
|
7
6
|
import type { NodeRendererProps, RenderContext } from '../types';
|
|
@@ -128,9 +127,8 @@ export declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']
|
|
|
128
127
|
animationIteration?: string | number;
|
|
129
128
|
}): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
130
129
|
export declare function ImageNode(rawProps: ImageNodeProps): import("octane/jsx-runtime").Octane.JSX.Element | null;
|
|
131
|
-
export declare function PreCodeNode({ node }: PreCodeNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
130
|
+
export declare function PreCodeNode({ node, style }: PreCodeNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
132
131
|
export declare function CodeBlockNode(props: CodeBlockNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
133
|
-
export declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
134
132
|
export declare function MermaidBlockNode(props: MermaidBlockNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
135
133
|
export declare function D2BlockNode(props: D2BlockNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
|
136
134
|
export declare function InfographicBlockNode(props: InfographicBlockNodeProps): import("octane/jsx-runtime").Octane.JSX.Element;
|
package/dist/types/server.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
export type { HtmlPreviewFrameProps } from './components/CodeBlockNode/HtmlPreviewFrame.js';
|
|
3
3
|
export type { LinkNodeStyleProps } from './components/LinkNode/LinkNode.js';
|
|
4
4
|
export type { ListItemNodeProps } from './components/ListItemNode/ListItemNode.js';
|
|
5
|
-
export type { MarkdownCodeBlockNodeProps } from './components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.js';
|
|
6
5
|
export type { TooltipPlacement, TooltipProps } from './components/Tooltip/Tooltip.js';
|
|
7
6
|
export { clearGlobalCustomComponents, defineHtmlComponents, defineStreamingComponents, getCustomComponentDisplay, getCustomNodeComponents, removeCustomComponents, setCustomComponents, withMarkstreamComponentDisplay, } from './customComponents';
|
|
8
7
|
export type { CustomComponentDisplayMode, HtmlComponent, HtmlComponentMap, MarkstreamCustomComponent, StreamingComponent, StreamingComponentMap, } from './customComponents';
|
|
@@ -31,7 +30,6 @@ export { InsertNode } from './server-renderer/index.js';
|
|
|
31
30
|
export { LinkNode } from './server-renderer/index.js';
|
|
32
31
|
export { ListItemNode } from './server-renderer/index.js';
|
|
33
32
|
export { ListNode } from './server-renderer/index.js';
|
|
34
|
-
export { MarkdownCodeBlockNode } from './server-renderer/index.js';
|
|
35
33
|
export { MathBlockNode } from './server-renderer/index.js';
|
|
36
34
|
export { MathInlineNode } from './server-renderer/index.js';
|
|
37
35
|
export { MermaidBlockNode } from './server-renderer/index.js';
|
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
// Generated by scripts/generate-tsrx-types.mjs for the built package.
|
|
2
2
|
import type { CodeBlockNode } from 'stream-markdown-parser';
|
|
3
3
|
import type { OctaneStyle } from './octane';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
base?: string;
|
|
7
|
-
inherit?: boolean;
|
|
8
|
-
colors?: Record<string, string>;
|
|
9
|
-
rules?: Array<Record<string, unknown>>;
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
export type CodeBlockMonacoTheme = string | CodeBlockMonacoThemeObject;
|
|
13
|
-
export type CodeBlockMonacoLanguage = string | ((...args: unknown[]) => unknown);
|
|
4
|
+
export type CodeBlockTheme = string;
|
|
5
|
+
export type CodeBlockThemes = readonly [dark: string, light: string];
|
|
14
6
|
export interface CommonCodeBlockProps {
|
|
15
7
|
showHeader?: boolean;
|
|
16
8
|
showCopyButton?: boolean;
|
|
17
9
|
showExpandButton?: boolean;
|
|
18
10
|
}
|
|
19
|
-
export interface ShikiCodeBlockProps extends CommonCodeBlockProps {
|
|
20
|
-
themes?: readonly string[];
|
|
21
|
-
/**
|
|
22
|
-
* Shiki language preload request forwarded to stream-markdown's registerHighlight().
|
|
23
|
-
* This is not a rendering allow-list; already available Shiki languages may still highlight.
|
|
24
|
-
*/
|
|
25
|
-
langs?: readonly string[];
|
|
26
|
-
}
|
|
27
11
|
export interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
28
12
|
enabled?: boolean;
|
|
29
13
|
contextLineCount?: number;
|
|
@@ -31,67 +15,71 @@ export interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
|
31
15
|
revealLineCount?: number;
|
|
32
16
|
}
|
|
33
17
|
export type CodeBlockDiffHideUnchangedRegions = boolean | CodeBlockDiffHideUnchangedRegionsOptions;
|
|
34
|
-
export
|
|
35
|
-
export type CodeBlockDiffAppearance = 'auto' | 'light' | 'dark';
|
|
36
|
-
export type CodeBlockDiffUnchangedRegionStyle = 'line-info' | 'line-info-basic' | 'metadata' | 'simple';
|
|
37
|
-
export type CodeBlockDiffHunkActionKind = 'revert' | 'stage';
|
|
38
|
-
export type CodeBlockDiffHunkSide = 'upper' | 'lower';
|
|
39
|
-
export interface CodeBlockDiffHunkActionContext {
|
|
40
|
-
action: CodeBlockDiffHunkActionKind;
|
|
41
|
-
side: CodeBlockDiffHunkSide;
|
|
42
|
-
lineChange: unknown;
|
|
43
|
-
originalModel: unknown;
|
|
44
|
-
modifiedModel: unknown;
|
|
45
|
-
}
|
|
46
|
-
export interface CodeBlockMonacoOptions {
|
|
47
|
-
MAX_HEIGHT?: number | string;
|
|
18
|
+
export interface CodeBlockOptions {
|
|
48
19
|
fontSize?: number;
|
|
49
20
|
lineHeight?: number;
|
|
50
21
|
fontFamily?: string;
|
|
22
|
+
maxHeight?: number;
|
|
23
|
+
padding?: number;
|
|
51
24
|
tabSize?: number;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
25
|
+
disableLineNumbers?: boolean;
|
|
26
|
+
overflow?: 'scroll' | 'wrap';
|
|
27
|
+
disableVirtualizationBuffers?: boolean;
|
|
28
|
+
preferredHighlighter?: 'shiki-js' | 'shiki-wasm';
|
|
29
|
+
useCSSClasses?: boolean;
|
|
30
|
+
useTokenTransformer?: boolean;
|
|
31
|
+
tokenizeMaxLineLength?: number;
|
|
32
|
+
tokenizeMaxLength?: number;
|
|
33
|
+
unsafeCSS?: string;
|
|
34
|
+
diffStyle?: 'unified' | 'split';
|
|
35
|
+
diffIndicators?: 'classic' | 'bars' | 'none';
|
|
36
|
+
disableBackground?: boolean;
|
|
37
|
+
hunkSeparators?: 'simple' | 'metadata' | 'line-info' | 'line-info-basic';
|
|
38
|
+
expandUnchanged?: boolean;
|
|
39
|
+
collapsedContextThreshold?: number;
|
|
40
|
+
lineDiffType?: 'word-alt' | 'word' | 'char' | 'none';
|
|
41
|
+
maxLineDiffLength?: number;
|
|
42
|
+
expansionLineCount?: number;
|
|
43
|
+
parseDiffOptions?: Record<string, unknown>;
|
|
44
|
+
lineHoverHighlight?: 'disabled' | 'both' | 'number' | 'line';
|
|
45
|
+
enableTokenInteractionsOnWhitespace?: boolean;
|
|
46
|
+
enableGutterUtility?: boolean;
|
|
47
|
+
enableLineSelection?: boolean;
|
|
48
|
+
controlledSelection?: boolean;
|
|
49
|
+
onGutterUtilityClick?: (...args: any[]) => unknown;
|
|
50
|
+
onLineClick?: (...args: any[]) => unknown;
|
|
51
|
+
onLineNumberClick?: (...args: any[]) => unknown;
|
|
52
|
+
onLineEnter?: (...args: any[]) => unknown;
|
|
53
|
+
onLineLeave?: (...args: any[]) => unknown;
|
|
54
|
+
onTokenClick?: (...args: any[]) => unknown;
|
|
55
|
+
onTokenEnter?: (...args: any[]) => unknown;
|
|
56
|
+
onTokenLeave?: (...args: any[]) => unknown;
|
|
57
|
+
onLineSelected?: (...args: any[]) => unknown;
|
|
58
|
+
onLineSelectionStart?: (...args: any[]) => unknown;
|
|
59
|
+
onLineSelectionChange?: (...args: any[]) => unknown;
|
|
60
|
+
onLineSelectionEnd?: (...args: any[]) => unknown;
|
|
61
|
+
getLineIndex?: (...args: any[]) => unknown;
|
|
62
|
+
renderAnnotation?: (...args: any[]) => unknown;
|
|
63
|
+
renderGutterUtility?: (...args: any[]) => unknown;
|
|
64
|
+
onPostRender?: (...args: any[]) => unknown;
|
|
65
|
+
mergeConflict?: boolean;
|
|
66
|
+
lineAnnotations?: unknown[];
|
|
67
|
+
onController?: (controller: any) => void;
|
|
68
|
+
workerManager?: unknown;
|
|
81
69
|
}
|
|
82
70
|
export interface CodeBlockNodeProps extends CommonCodeBlockProps {
|
|
83
71
|
node: CodeBlockNode;
|
|
72
|
+
codeBlockOptions?: CodeBlockOptions;
|
|
84
73
|
isDark?: boolean;
|
|
85
74
|
loading?: boolean;
|
|
86
75
|
stream?: boolean;
|
|
87
|
-
darkTheme?:
|
|
88
|
-
lightTheme?:
|
|
76
|
+
darkTheme?: CodeBlockTheme;
|
|
77
|
+
lightTheme?: CodeBlockTheme;
|
|
89
78
|
isShowPreview?: boolean;
|
|
90
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
91
79
|
enableFontSizeControl?: boolean;
|
|
92
80
|
minWidth?: string | number;
|
|
93
81
|
maxWidth?: string | number;
|
|
94
|
-
themes?:
|
|
82
|
+
themes?: CodeBlockThemes;
|
|
95
83
|
showPreviewButton?: boolean;
|
|
96
84
|
showCollapseButton?: boolean;
|
|
97
85
|
showFontSizeButtons?: boolean;
|