markstream-vue 0.0.10 → 0.0.11
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 +21 -0
- package/README.zh-CN.md +21 -0
- package/dist/CodeBlockNode.js +1 -1
- package/dist/exports.js +1 -1
- package/dist/extended.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1635 -98
- package/dist/index.js +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/index5.js +1 -1
- package/dist/index6.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +2 -1
- package/dist/languageIconExtended.js +0 -1
- package/dist/types/components/AdmonitionNode/AdmonitionNode.vue.d.ts +0 -26
- package/dist/types/components/AdmonitionNode/index.d.ts +0 -2
- package/dist/types/components/BlockquoteNode/BlockquoteNode.vue.d.ts +0 -23
- package/dist/types/components/BlockquoteNode/index.d.ts +0 -2
- package/dist/types/components/CheckboxNode/CheckboxNode.vue.d.ts +0 -9
- package/dist/types/components/CheckboxNode/index.d.ts +0 -2
- package/dist/types/components/CodeBlockNode/CodeBlockNode.vue.d.ts +0 -55
- package/dist/types/components/CodeBlockNode/HtmlPreviewFrame.vue.d.ts +0 -8
- package/dist/types/components/CodeBlockNode/index.d.ts +0 -2
- package/dist/types/components/CodeBlockNode/monaco.d.ts +0 -57
- package/dist/types/components/CodeBlockNode/monacoThemeScheduler.d.ts +0 -4
- package/dist/types/components/D2BlockNode/D2BlockNode.vue.d.ts +0 -16
- package/dist/types/components/D2BlockNode/d2.d.ts +0 -6
- package/dist/types/components/D2BlockNode/index.d.ts +0 -2
- package/dist/types/components/DefinitionListNode/DefinitionListNode.vue.d.ts +0 -29
- package/dist/types/components/DefinitionListNode/index.d.ts +0 -2
- package/dist/types/components/EmojiNode/EmojiNode.vue.d.ts +0 -10
- package/dist/types/components/EmojiNode/index.d.ts +0 -2
- package/dist/types/components/EmphasisNode/EmphasisNode.vue.d.ts +0 -16
- package/dist/types/components/EmphasisNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteAnchorNode/FootnoteAnchorNode.vue.d.ts +0 -9
- package/dist/types/components/FootnoteAnchorNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteNode/FootnoteNode.vue.d.ts +0 -21
- package/dist/types/components/FootnoteNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteReferenceNode/FootnoteReferenceNode.vue.d.ts +0 -10
- package/dist/types/components/FootnoteReferenceNode/index.d.ts +0 -2
- package/dist/types/components/HardBreakNode/HardBreakNode.vue.d.ts +0 -9
- package/dist/types/components/HardBreakNode/index.d.ts +0 -2
- package/dist/types/components/HeadingNode/HeadingNode.vue.d.ts +0 -19
- package/dist/types/components/HeadingNode/index.d.ts +0 -2
- package/dist/types/components/HighlightNode/HighlightNode.vue.d.ts +0 -16
- package/dist/types/components/HighlightNode/index.d.ts +0 -2
- package/dist/types/components/HtmlBlockNode/HtmlBlockNode.vue.d.ts +0 -39
- package/dist/types/components/HtmlBlockNode/index.d.ts +0 -2
- package/dist/types/components/HtmlInlineNode/HtmlInlineNode.vue.d.ts +0 -12
- package/dist/types/components/HtmlInlineNode/index.d.ts +0 -2
- package/dist/types/components/ImageNode/ImageNode.vue.d.ts +0 -59
- package/dist/types/components/ImageNode/index.d.ts +0 -2
- package/dist/types/components/InfographicBlockNode/InfographicBlockNode.vue.d.ts +0 -46
- package/dist/types/components/InfographicBlockNode/index.d.ts +0 -2
- package/dist/types/components/InfographicBlockNode/infographic.d.ts +0 -3
- package/dist/types/components/InlineCodeNode/InlineCodeNode.vue.d.ts +0 -9
- package/dist/types/components/InlineCodeNode/index.d.ts +0 -2
- package/dist/types/components/InsertNode/InsertNode.vue.d.ts +0 -16
- package/dist/types/components/InsertNode/index.d.ts +0 -2
- package/dist/types/components/LinkNode/LinkNode.vue.d.ts +0 -5
- package/dist/types/components/LinkNode/index.d.ts +0 -2
- package/dist/types/components/ListItemNode/ListItemNode.vue.d.ts +0 -30
- package/dist/types/components/ListItemNode/index.d.ts +0 -2
- package/dist/types/components/ListNode/ListNode.vue.d.ts +0 -29
- package/dist/types/components/ListNode/index.d.ts +0 -2
- package/dist/types/components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.vue.d.ts +0 -90
- package/dist/types/components/MarkdownCodeBlockNode/index.d.ts +0 -2
- package/dist/types/components/MathBlockNode/MathBlockNode.vue.d.ts +0 -5
- package/dist/types/components/MathBlockNode/index.d.ts +0 -2
- package/dist/types/components/MathInlineNode/MathInlineNode.vue.d.ts +0 -24
- package/dist/types/components/MathInlineNode/index.d.ts +0 -2
- package/dist/types/components/MathInlineNode/katex.d.ts +0 -7
- package/dist/types/components/MermaidBlockNode/MermaidBlockNode.vue.d.ts +0 -62
- package/dist/types/components/MermaidBlockNode/index.d.ts +0 -2
- package/dist/types/components/MermaidBlockNode/mermaid.d.ts +0 -6
- package/dist/types/components/NodeRenderer/FallbackComponent.vue.d.ts +0 -7
- package/dist/types/components/NodeRenderer/NodeRenderer.vue.d.ts +0 -34
- package/dist/types/components/NodeRenderer/asyncComponent.d.ts +0 -32
- package/dist/types/components/NodeRenderer/index.d.ts +0 -2
- package/dist/types/components/NodeRenderer/preloadMonaco.d.ts +0 -1
- package/dist/types/components/ParagraphNode/ParagraphNode.vue.d.ts +0 -17
- package/dist/types/components/ParagraphNode/index.d.ts +0 -2
- package/dist/types/components/PreCodeNode/PreCodeNode.vue.d.ts +0 -3
- package/dist/types/components/PreCodeNode/index.d.ts +0 -2
- package/dist/types/components/ReferenceNode/ReferenceNode.vue.d.ts +0 -19
- package/dist/types/components/ReferenceNode/index.d.ts +0 -2
- package/dist/types/components/StrikethroughNode/StrikethroughNode.vue.d.ts +0 -16
- package/dist/types/components/StrikethroughNode/index.d.ts +0 -2
- package/dist/types/components/StrongNode/StrongNode.vue.d.ts +0 -16
- package/dist/types/components/StrongNode/index.d.ts +0 -2
- package/dist/types/components/SubscriptNode/SubscriptNode.vue.d.ts +0 -16
- package/dist/types/components/SubscriptNode/index.d.ts +0 -2
- package/dist/types/components/SuperscriptNode/SuperscriptNode.vue.d.ts +0 -16
- package/dist/types/components/SuperscriptNode/index.d.ts +0 -2
- package/dist/types/components/TableNode/TableNode.vue.d.ts +0 -52
- package/dist/types/components/TableNode/index.d.ts +0 -2
- package/dist/types/components/TextNode/TextNode.vue.d.ts +0 -14
- package/dist/types/components/TextNode/index.d.ts +0 -2
- package/dist/types/components/ThematicBreakNode/ThematicBreakNode.vue.d.ts +0 -2
- package/dist/types/components/ThematicBreakNode/index.d.ts +0 -2
- package/dist/types/components/Tooltip/Tooltip.vue.d.ts +0 -15
- package/dist/types/components/Tooltip/index.d.ts +0 -2
- package/dist/types/components/VmrContainerNode/VmrContainerNode.vue.d.ts +0 -20
- package/dist/types/components/VmrContainerNode/index.d.ts +0 -2
- package/dist/types/components/__tests__/htmlNodes.integration.test.d.ts +0 -4
- package/dist/types/composables/rendererContext.d.ts +0 -19
- package/dist/types/composables/useKatexReady.d.ts +0 -1
- package/dist/types/composables/useSafeI18n.d.ts +0 -10
- package/dist/types/composables/useSingletonTooltip.d.ts +0 -11
- package/dist/types/composables/viewportPriority.d.ts +0 -21
- package/dist/types/exports.d.ts +0 -381
- package/dist/types/internal/heightEstimationExperiment.d.ts +0 -84
- package/dist/types/types/component-props.d.ts +0 -305
- package/dist/types/types/index.d.ts +0 -272
- package/dist/types/types/node-renderer-props.d.ts +0 -81
- package/dist/types/utils/__tests__/htmlRenderer.test.d.ts +0 -4
- package/dist/types/utils/htmlRenderer.d.ts +0 -20
- package/dist/types/utils/index.d.ts +0 -6
- package/dist/types/utils/katex-threshold.d.ts +0 -20
- package/dist/types/utils/languageIcon.d.ts +0 -8
- package/dist/types/utils/languageIconExtended.d.ts +0 -1
- package/dist/types/utils/nodeComponents.d.ts +0 -20
- package/dist/types/utils/performance-monitor.d.ts +0 -121
- package/dist/types/utils/safeRaf.d.ts +0 -2
- package/dist/types/workers/katexCdnWorker.d.ts +0 -52
- package/dist/types/workers/katexRenderer.worker.d.ts +0 -0
- package/dist/types/workers/katexWorkerClient.d.ts +0 -48
- package/dist/types/workers/mermaidCdnWorker.d.ts +0 -35
- package/dist/types/workers/mermaidParser.worker.d.ts +0 -1
- package/dist/types/workers/mermaidWorkerClient.d.ts +0 -21
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { CodeBlockNode } from 'stream-markdown-parser';
|
|
2
|
-
/**
|
|
3
|
-
* Monaco theme name or a lightweight theme object accepted by `stream-monaco`.
|
|
4
|
-
*
|
|
5
|
-
* Keep this intentionally local so `markstream-vue` does not force consumers to
|
|
6
|
-
* install `stream-monaco` just to resolve exported types.
|
|
7
|
-
*/
|
|
8
|
-
export interface CodeBlockMonacoThemeObject {
|
|
9
|
-
name: string;
|
|
10
|
-
base?: string;
|
|
11
|
-
inherit?: boolean;
|
|
12
|
-
colors?: Record<string, string>;
|
|
13
|
-
rules?: Array<Record<string, unknown>>;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Theme entries forwarded to Monaco-backed code blocks.
|
|
18
|
-
*/
|
|
19
|
-
export type CodeBlockMonacoTheme = string | CodeBlockMonacoThemeObject;
|
|
20
|
-
/**
|
|
21
|
-
* Common language entry accepted by `stream-monaco`.
|
|
22
|
-
*
|
|
23
|
-
* The runtime also supports advanced lazy-loader signatures; keep the union
|
|
24
|
-
* broad here so hover remains useful without depending on `stream-monaco`.
|
|
25
|
-
*/
|
|
26
|
-
export type CodeBlockMonacoLanguage = string | ((...args: any[]) => unknown);
|
|
27
|
-
/**
|
|
28
|
-
* Object form of Monaco's unchanged-region folding settings.
|
|
29
|
-
*/
|
|
30
|
-
export interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
31
|
-
/** Enable unchanged-region folding for diff editors. */
|
|
32
|
-
enabled?: boolean;
|
|
33
|
-
/** Number of context lines to keep visible around each change. */
|
|
34
|
-
contextLineCount?: number;
|
|
35
|
-
/** Minimum unchanged span required before a region can collapse. */
|
|
36
|
-
minimumLineCount?: number;
|
|
37
|
-
/** Number of lines to reveal when the user expands a collapsed region. */
|
|
38
|
-
revealLineCount?: number;
|
|
39
|
-
}
|
|
40
|
-
export type CodeBlockDiffHideUnchangedRegions = boolean | CodeBlockDiffHideUnchangedRegionsOptions;
|
|
41
|
-
/**
|
|
42
|
-
* Visual treatment for changed diff lines.
|
|
43
|
-
*/
|
|
44
|
-
export type CodeBlockDiffLineStyle = 'background' | 'bar';
|
|
45
|
-
/**
|
|
46
|
-
* Shell appearance for the Monaco diff surface.
|
|
47
|
-
*/
|
|
48
|
-
export type CodeBlockDiffAppearance = 'auto' | 'light' | 'dark';
|
|
49
|
-
/**
|
|
50
|
-
* Rendering style for collapsed unchanged diff regions.
|
|
51
|
-
*/
|
|
52
|
-
export type CodeBlockDiffUnchangedRegionStyle = 'line-info' | 'line-info-basic' | 'metadata' | 'simple';
|
|
53
|
-
/**
|
|
54
|
-
* Action names emitted by Monaco diff hunk hover controls.
|
|
55
|
-
*/
|
|
56
|
-
export type CodeBlockDiffHunkActionKind = 'revert' | 'stage';
|
|
57
|
-
/**
|
|
58
|
-
* Which half of the diff hunk triggered the action.
|
|
59
|
-
*/
|
|
60
|
-
export type CodeBlockDiffHunkSide = 'upper' | 'lower';
|
|
61
|
-
/**
|
|
62
|
-
* Minimal action context forwarded from `stream-monaco`.
|
|
63
|
-
*
|
|
64
|
-
* Use `action` and `side` for the stable contract. The model payloads are kept
|
|
65
|
-
* intentionally loose to avoid introducing `stream-monaco` or Monaco types into
|
|
66
|
-
* `markstream-vue`'s public declarations.
|
|
67
|
-
*/
|
|
68
|
-
export interface CodeBlockDiffHunkActionContext {
|
|
69
|
-
/** The requested hunk action. */
|
|
70
|
-
action: CodeBlockDiffHunkActionKind;
|
|
71
|
-
/** Which hunk half triggered the action. */
|
|
72
|
-
side: CodeBlockDiffHunkSide;
|
|
73
|
-
/** Raw Monaco diff metadata for the current hunk. */
|
|
74
|
-
lineChange: unknown;
|
|
75
|
-
/** Original Monaco model for the diff editor. */
|
|
76
|
-
originalModel: unknown;
|
|
77
|
-
/** Modified Monaco model for the diff editor. */
|
|
78
|
-
modifiedModel: unknown;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Monaco editor options forwarded by `CodeBlockNode`.
|
|
82
|
-
*
|
|
83
|
-
* This mirrors the most common `stream-monaco` options used in markstream-vue's
|
|
84
|
-
* docs and examples while leaving the index signature available for advanced
|
|
85
|
-
* options not modeled here yet.
|
|
86
|
-
*/
|
|
87
|
-
export interface CodeBlockMonacoOptions {
|
|
88
|
-
/** Maximum editor height before the code block starts scrolling internally. */
|
|
89
|
-
MAX_HEIGHT?: number | string;
|
|
90
|
-
/** Base font size for Monaco-rendered code. */
|
|
91
|
-
fontSize?: number;
|
|
92
|
-
/** Explicit line height for the Monaco editor. */
|
|
93
|
-
lineHeight?: number;
|
|
94
|
-
/** Font family override applied to the Monaco editor surface. */
|
|
95
|
-
fontFamily?: string;
|
|
96
|
-
/** Tab width forwarded to Monaco. */
|
|
97
|
-
tabSize?: number;
|
|
98
|
-
/** Render the Monaco editor in read-only mode. */
|
|
99
|
-
readOnly?: boolean;
|
|
100
|
-
/** Monaco word-wrap mode for long lines. */
|
|
101
|
-
wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded' | string;
|
|
102
|
-
/** Indentation strategy used when wrapping long lines. */
|
|
103
|
-
wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent' | string;
|
|
104
|
-
/** Monaco theme name to apply on initial render. */
|
|
105
|
-
theme?: string;
|
|
106
|
-
/** Theme names or theme objects available for this code block. */
|
|
107
|
-
themes?: CodeBlockMonacoTheme[];
|
|
108
|
-
/**
|
|
109
|
-
* Language ids or lazy loaders to register with `stream-monaco`.
|
|
110
|
-
*
|
|
111
|
-
* Supplying this array replaces the default built-in language list.
|
|
112
|
-
*/
|
|
113
|
-
languages?: CodeBlockMonacoLanguage[];
|
|
114
|
-
/** Render diff editors side-by-side instead of inline. */
|
|
115
|
-
renderSideBySide?: boolean;
|
|
116
|
-
/** Allow resizing the split handle in side-by-side diff mode. */
|
|
117
|
-
enableSplitViewResizing?: boolean;
|
|
118
|
-
/** Keep whitespace-only changes visible in Monaco diff editors. */
|
|
119
|
-
ignoreTrimWhitespace?: boolean;
|
|
120
|
-
/** Disable Monaco's diff computation timeout for large diffs when needed. */
|
|
121
|
-
maxComputationTime?: number;
|
|
122
|
-
/** Choose Monaco's diff algorithm. */
|
|
123
|
-
diffAlgorithm?: string;
|
|
124
|
-
/** Show change indicators in the gutter. */
|
|
125
|
-
renderIndicators?: boolean;
|
|
126
|
-
/** Allow editing the original side of a diff editor. */
|
|
127
|
-
originalEditable?: boolean;
|
|
128
|
-
/** Debounce repeated reveal requests while content is streaming. */
|
|
129
|
-
revealDebounceMs?: number;
|
|
130
|
-
/** How Monaco should reveal the active line while auto-scrolling. */
|
|
131
|
-
revealStrategy?: 'bottom' | 'centerIfOutside' | 'center';
|
|
132
|
-
/** Delay a final reveal until streaming settles for this many milliseconds. */
|
|
133
|
-
revealBatchOnIdleMs?: number;
|
|
134
|
-
/** Extra throttle window for normal `updateCode` calls. */
|
|
135
|
-
updateThrottleMs?: number;
|
|
136
|
-
/** Extra throttle window for diff streaming updates. */
|
|
137
|
-
diffUpdateThrottleMs?: number;
|
|
138
|
-
/** Enable automatic scrolling on the modified side of diff editors. */
|
|
139
|
-
diffAutoScroll?: boolean;
|
|
140
|
-
/** Fold unchanged diff regions with Monaco's diff viewer. */
|
|
141
|
-
diffHideUnchangedRegions?: CodeBlockDiffHideUnchangedRegions;
|
|
142
|
-
/** Visual emphasis used for changed diff lines. */
|
|
143
|
-
diffLineStyle?: CodeBlockDiffLineStyle;
|
|
144
|
-
/** Light/dark chrome mode for Monaco's diff shell. */
|
|
145
|
-
diffAppearance?: CodeBlockDiffAppearance;
|
|
146
|
-
/** Visual style used for collapsed unchanged diff regions. */
|
|
147
|
-
diffUnchangedRegionStyle?: CodeBlockDiffUnchangedRegionStyle;
|
|
148
|
-
/** Show per-hunk hover actions such as `revert` and `stage`. */
|
|
149
|
-
diffHunkActionsOnHover?: boolean;
|
|
150
|
-
/** Delay before diff hover action widgets hide after mouse leave. */
|
|
151
|
-
diffHunkHoverHideDelayMs?: number;
|
|
152
|
-
/**
|
|
153
|
-
* Intercept diff hunk hover actions before `stream-monaco` applies its
|
|
154
|
-
* default local model edits. Return `false` to skip the built-in behavior.
|
|
155
|
-
*/
|
|
156
|
-
onDiffHunkAction?: (context: CodeBlockDiffHunkActionContext) => void | boolean | Promise<void | boolean>;
|
|
157
|
-
scrollbar?: Record<string, any>;
|
|
158
|
-
[key: string]: any;
|
|
159
|
-
}
|
|
160
|
-
export interface CodeBlockNodeProps {
|
|
161
|
-
node: CodeBlockNode;
|
|
162
|
-
isDark?: boolean;
|
|
163
|
-
loading?: boolean;
|
|
164
|
-
stream?: boolean;
|
|
165
|
-
/** Preferred dark Monaco theme for this code block instance. */
|
|
166
|
-
darkTheme?: CodeBlockMonacoTheme;
|
|
167
|
-
/** Preferred light Monaco theme for this code block instance. */
|
|
168
|
-
lightTheme?: CodeBlockMonacoTheme;
|
|
169
|
-
isShowPreview?: boolean;
|
|
170
|
-
/** Monaco editor and diff behavior forwarded to `stream-monaco`. */
|
|
171
|
-
monacoOptions?: CodeBlockMonacoOptions;
|
|
172
|
-
enableFontSizeControl?: boolean;
|
|
173
|
-
minWidth?: string | number;
|
|
174
|
-
maxWidth?: string | number;
|
|
175
|
-
/** Theme names or theme objects preloaded for this code block instance. */
|
|
176
|
-
themes?: CodeBlockMonacoTheme[];
|
|
177
|
-
showHeader?: boolean;
|
|
178
|
-
showCopyButton?: boolean;
|
|
179
|
-
showExpandButton?: boolean;
|
|
180
|
-
showPreviewButton?: boolean;
|
|
181
|
-
showCollapseButton?: boolean;
|
|
182
|
-
showFontSizeButtons?: boolean;
|
|
183
|
-
showTooltips?: boolean;
|
|
184
|
-
/** Scope key used by `setCustomComponents()` and `data-custom-id` style overrides. */
|
|
185
|
-
customId?: string;
|
|
186
|
-
}
|
|
187
|
-
export interface ImageNodeProps {
|
|
188
|
-
node: {
|
|
189
|
-
type: 'image';
|
|
190
|
-
src: string;
|
|
191
|
-
alt: string;
|
|
192
|
-
title: string | null;
|
|
193
|
-
raw: string;
|
|
194
|
-
loading?: boolean;
|
|
195
|
-
};
|
|
196
|
-
fallbackSrc?: string;
|
|
197
|
-
lazy?: boolean;
|
|
198
|
-
usePlaceholder?: boolean;
|
|
199
|
-
}
|
|
200
|
-
export interface LinkNodeProps {
|
|
201
|
-
node: {
|
|
202
|
-
type: 'link';
|
|
203
|
-
href: string;
|
|
204
|
-
title: string | null;
|
|
205
|
-
text: string;
|
|
206
|
-
attrs?: [string, string][];
|
|
207
|
-
children: {
|
|
208
|
-
type: string;
|
|
209
|
-
raw: string;
|
|
210
|
-
}[];
|
|
211
|
-
raw: string;
|
|
212
|
-
loading?: boolean;
|
|
213
|
-
};
|
|
214
|
-
indexKey: number | string;
|
|
215
|
-
customId?: string;
|
|
216
|
-
showTooltip?: boolean;
|
|
217
|
-
color?: string;
|
|
218
|
-
underlineHeight?: number;
|
|
219
|
-
underlineBottom?: number | string;
|
|
220
|
-
animationDuration?: number;
|
|
221
|
-
animationOpacity?: number;
|
|
222
|
-
animationTiming?: string;
|
|
223
|
-
animationIteration?: string | number;
|
|
224
|
-
}
|
|
225
|
-
export interface PreCodeNodeProps {
|
|
226
|
-
node: CodeBlockNode;
|
|
227
|
-
}
|
|
228
|
-
export interface MermaidBlockNodeProps {
|
|
229
|
-
node: CodeBlockNode;
|
|
230
|
-
maxHeight?: string | null;
|
|
231
|
-
loading?: boolean;
|
|
232
|
-
isDark?: boolean;
|
|
233
|
-
workerTimeoutMs?: number;
|
|
234
|
-
parseTimeoutMs?: number;
|
|
235
|
-
renderTimeoutMs?: number;
|
|
236
|
-
fullRenderTimeoutMs?: number;
|
|
237
|
-
renderDebounceMs?: number;
|
|
238
|
-
contentStableDelayMs?: number;
|
|
239
|
-
previewPollDelayMs?: number;
|
|
240
|
-
previewPollMaxDelayMs?: number;
|
|
241
|
-
previewPollMaxAttempts?: number;
|
|
242
|
-
showHeader?: boolean;
|
|
243
|
-
showModeToggle?: boolean;
|
|
244
|
-
showCopyButton?: boolean;
|
|
245
|
-
showExportButton?: boolean;
|
|
246
|
-
showFullscreenButton?: boolean;
|
|
247
|
-
showCollapseButton?: boolean;
|
|
248
|
-
showZoomControls?: boolean;
|
|
249
|
-
enableWheelZoom?: boolean;
|
|
250
|
-
isStrict?: boolean;
|
|
251
|
-
showTooltips?: boolean;
|
|
252
|
-
onRenderError?: (error: unknown, code: string, container: HTMLElement) => boolean | void;
|
|
253
|
-
}
|
|
254
|
-
export interface MermaidBlockEvent<TPayload = any> {
|
|
255
|
-
payload?: TPayload;
|
|
256
|
-
defaultPrevented: boolean;
|
|
257
|
-
preventDefault: () => void;
|
|
258
|
-
svgElement?: SVGElement | null;
|
|
259
|
-
svgString?: string | null;
|
|
260
|
-
}
|
|
261
|
-
export interface D2BlockNodeProps {
|
|
262
|
-
node: CodeBlockNode;
|
|
263
|
-
maxHeight?: string | null;
|
|
264
|
-
loading?: boolean;
|
|
265
|
-
isDark?: boolean;
|
|
266
|
-
progressiveRender?: boolean;
|
|
267
|
-
progressiveIntervalMs?: number;
|
|
268
|
-
themeId?: number | null;
|
|
269
|
-
darkThemeId?: number | null;
|
|
270
|
-
showHeader?: boolean;
|
|
271
|
-
showModeToggle?: boolean;
|
|
272
|
-
showCopyButton?: boolean;
|
|
273
|
-
showExportButton?: boolean;
|
|
274
|
-
showCollapseButton?: boolean;
|
|
275
|
-
}
|
|
276
|
-
export interface InfographicBlockNodeProps {
|
|
277
|
-
node: CodeBlockNode;
|
|
278
|
-
maxHeight?: string | null;
|
|
279
|
-
loading?: boolean;
|
|
280
|
-
isDark?: boolean;
|
|
281
|
-
showHeader?: boolean;
|
|
282
|
-
showModeToggle?: boolean;
|
|
283
|
-
showCopyButton?: boolean;
|
|
284
|
-
showCollapseButton?: boolean;
|
|
285
|
-
showExportButton?: boolean;
|
|
286
|
-
showFullscreenButton?: boolean;
|
|
287
|
-
showZoomControls?: boolean;
|
|
288
|
-
}
|
|
289
|
-
export interface MathBlockNodeProps {
|
|
290
|
-
node: {
|
|
291
|
-
type: 'math_block';
|
|
292
|
-
content: string;
|
|
293
|
-
raw: string;
|
|
294
|
-
loading?: boolean;
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
export interface MathInlineNodeProps {
|
|
298
|
-
node: {
|
|
299
|
-
type: 'math_inline';
|
|
300
|
-
content: string;
|
|
301
|
-
raw: string;
|
|
302
|
-
loading?: boolean;
|
|
303
|
-
markup?: string;
|
|
304
|
-
};
|
|
305
|
-
}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
export interface BaseNode {
|
|
3
|
-
type: string;
|
|
4
|
-
raw: string;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
code?: string;
|
|
7
|
-
diff?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A catch‑all node type for user extensions.
|
|
11
|
-
* Must still satisfy the renderer contract (`type` + `raw`), but may carry
|
|
12
|
-
* arbitrary extra fields.
|
|
13
|
-
*/
|
|
14
|
-
export type UnknownNode = BaseNode & Record<string, unknown>;
|
|
15
|
-
export interface TextNode extends BaseNode {
|
|
16
|
-
type: 'text';
|
|
17
|
-
content: string;
|
|
18
|
-
center?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface HeadingNode extends BaseNode {
|
|
21
|
-
type: 'heading';
|
|
22
|
-
level: number;
|
|
23
|
-
text: string;
|
|
24
|
-
attrs?: Record<string, string | boolean>;
|
|
25
|
-
children: ParsedNode[];
|
|
26
|
-
}
|
|
27
|
-
export interface ParagraphNode extends BaseNode {
|
|
28
|
-
type: 'paragraph';
|
|
29
|
-
children: ParsedNode[];
|
|
30
|
-
maybeCheckbox?: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface ListNode extends BaseNode {
|
|
33
|
-
type: 'list';
|
|
34
|
-
ordered: boolean;
|
|
35
|
-
start?: number;
|
|
36
|
-
items: ListItemNode[];
|
|
37
|
-
}
|
|
38
|
-
export interface ListItemNode extends BaseNode {
|
|
39
|
-
type: 'list_item';
|
|
40
|
-
children: ParsedNode[];
|
|
41
|
-
}
|
|
42
|
-
export interface CodeBlockNode extends BaseNode {
|
|
43
|
-
type: 'code_block';
|
|
44
|
-
language: string;
|
|
45
|
-
code: string;
|
|
46
|
-
startLine?: number;
|
|
47
|
-
endLine?: number;
|
|
48
|
-
loading?: boolean;
|
|
49
|
-
diff?: boolean;
|
|
50
|
-
originalCode?: string;
|
|
51
|
-
updatedCode?: string;
|
|
52
|
-
raw: string;
|
|
53
|
-
}
|
|
54
|
-
export interface InlineCodeNode extends BaseNode {
|
|
55
|
-
type: 'inline_code';
|
|
56
|
-
code: string;
|
|
57
|
-
}
|
|
58
|
-
export interface LinkNode extends BaseNode {
|
|
59
|
-
type: 'link';
|
|
60
|
-
href: string;
|
|
61
|
-
title: string | null;
|
|
62
|
-
text: string;
|
|
63
|
-
attrs?: [string, string][];
|
|
64
|
-
children: ParsedNode[];
|
|
65
|
-
}
|
|
66
|
-
export interface ImageNode extends BaseNode {
|
|
67
|
-
type: 'image';
|
|
68
|
-
src: string;
|
|
69
|
-
alt: string;
|
|
70
|
-
title: string | null;
|
|
71
|
-
}
|
|
72
|
-
export interface HtmlInlineNode extends BaseNode {
|
|
73
|
-
type: 'html_inline';
|
|
74
|
-
tag?: string;
|
|
75
|
-
content: string;
|
|
76
|
-
children: ParsedNode[];
|
|
77
|
-
autoClosed?: boolean;
|
|
78
|
-
}
|
|
79
|
-
export type CustomComponentAttrs = [string, string][] | Record<string, string | boolean> | Array<{
|
|
80
|
-
name: string;
|
|
81
|
-
value: string | boolean;
|
|
82
|
-
}> | null;
|
|
83
|
-
export interface CustomComponentNode extends BaseNode {
|
|
84
|
-
type: string;
|
|
85
|
-
tag: string;
|
|
86
|
-
content: string;
|
|
87
|
-
attrs?: CustomComponentAttrs;
|
|
88
|
-
children?: ParsedNode[];
|
|
89
|
-
autoClosed?: boolean;
|
|
90
|
-
}
|
|
91
|
-
export interface ThematicBreakNode extends BaseNode {
|
|
92
|
-
type: 'thematic_break';
|
|
93
|
-
}
|
|
94
|
-
export interface MermaidBlockNode {
|
|
95
|
-
node: {
|
|
96
|
-
type: 'code_block';
|
|
97
|
-
language: string;
|
|
98
|
-
code: string;
|
|
99
|
-
loading?: boolean;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
export type MarkdownRender = {
|
|
103
|
-
content: string;
|
|
104
|
-
nodes?: undefined;
|
|
105
|
-
} | {
|
|
106
|
-
content?: undefined;
|
|
107
|
-
nodes: BaseNode[];
|
|
108
|
-
};
|
|
109
|
-
export interface BlockquoteNode extends BaseNode {
|
|
110
|
-
type: 'blockquote';
|
|
111
|
-
children: ParsedNode[];
|
|
112
|
-
}
|
|
113
|
-
export interface TableNode extends BaseNode {
|
|
114
|
-
type: 'table';
|
|
115
|
-
header: TableRowNode;
|
|
116
|
-
rows: TableRowNode[];
|
|
117
|
-
}
|
|
118
|
-
export interface TableRowNode extends BaseNode {
|
|
119
|
-
type: 'table_row';
|
|
120
|
-
cells: TableCellNode[];
|
|
121
|
-
}
|
|
122
|
-
export interface TableCellNode extends BaseNode {
|
|
123
|
-
type: 'table_cell';
|
|
124
|
-
header: boolean;
|
|
125
|
-
children: ParsedNode[];
|
|
126
|
-
}
|
|
127
|
-
export interface DefinitionListNode extends BaseNode {
|
|
128
|
-
type: 'definition_list';
|
|
129
|
-
items: DefinitionItemNode[];
|
|
130
|
-
}
|
|
131
|
-
export interface DefinitionItemNode extends BaseNode {
|
|
132
|
-
type: 'definition_item';
|
|
133
|
-
term: ParsedNode[];
|
|
134
|
-
definition: ParsedNode[];
|
|
135
|
-
}
|
|
136
|
-
export interface FootnoteNode extends BaseNode {
|
|
137
|
-
type: 'footnote';
|
|
138
|
-
id: string;
|
|
139
|
-
children: ParsedNode[];
|
|
140
|
-
}
|
|
141
|
-
export interface FootnoteReferenceNode extends BaseNode {
|
|
142
|
-
type: 'footnote_reference';
|
|
143
|
-
id: string;
|
|
144
|
-
}
|
|
145
|
-
export interface AdmonitionNode extends BaseNode {
|
|
146
|
-
type: 'admonition';
|
|
147
|
-
kind: string;
|
|
148
|
-
title: string;
|
|
149
|
-
children: ParsedNode[];
|
|
150
|
-
}
|
|
151
|
-
export interface StrongNode extends BaseNode {
|
|
152
|
-
type: 'strong';
|
|
153
|
-
children: ParsedNode[];
|
|
154
|
-
}
|
|
155
|
-
export interface EmphasisNode extends BaseNode {
|
|
156
|
-
type: 'emphasis';
|
|
157
|
-
children: ParsedNode[];
|
|
158
|
-
}
|
|
159
|
-
export interface StrikethroughNode extends BaseNode {
|
|
160
|
-
type: 'strikethrough';
|
|
161
|
-
children: ParsedNode[];
|
|
162
|
-
}
|
|
163
|
-
export interface HighlightNode extends BaseNode {
|
|
164
|
-
type: 'highlight';
|
|
165
|
-
children: ParsedNode[];
|
|
166
|
-
}
|
|
167
|
-
export interface InsertNode extends BaseNode {
|
|
168
|
-
type: 'insert';
|
|
169
|
-
children: ParsedNode[];
|
|
170
|
-
}
|
|
171
|
-
export interface SubscriptNode extends BaseNode {
|
|
172
|
-
type: 'subscript';
|
|
173
|
-
children: ParsedNode[];
|
|
174
|
-
}
|
|
175
|
-
export interface SuperscriptNode extends BaseNode {
|
|
176
|
-
type: 'superscript';
|
|
177
|
-
children: ParsedNode[];
|
|
178
|
-
}
|
|
179
|
-
export interface CheckboxNode extends BaseNode {
|
|
180
|
-
type: 'checkbox';
|
|
181
|
-
checked: boolean;
|
|
182
|
-
}
|
|
183
|
-
export interface CheckboxInputNode extends BaseNode {
|
|
184
|
-
type: 'checkbox_input';
|
|
185
|
-
checked: boolean;
|
|
186
|
-
}
|
|
187
|
-
export interface EmojiNode extends BaseNode {
|
|
188
|
-
type: 'emoji';
|
|
189
|
-
name: string;
|
|
190
|
-
markup: string;
|
|
191
|
-
}
|
|
192
|
-
export interface HardBreakNode extends BaseNode {
|
|
193
|
-
type: 'hardbreak';
|
|
194
|
-
}
|
|
195
|
-
export interface MathInlineNode extends BaseNode {
|
|
196
|
-
type: 'math_inline';
|
|
197
|
-
content: string;
|
|
198
|
-
markup?: string;
|
|
199
|
-
}
|
|
200
|
-
export interface MathBlockNode extends BaseNode {
|
|
201
|
-
type: 'math_block';
|
|
202
|
-
content: string;
|
|
203
|
-
markup?: string;
|
|
204
|
-
}
|
|
205
|
-
export interface ReferenceNode extends BaseNode {
|
|
206
|
-
type: 'reference';
|
|
207
|
-
id: string;
|
|
208
|
-
}
|
|
209
|
-
export interface MarkdownToken {
|
|
210
|
-
type: string;
|
|
211
|
-
tag?: string;
|
|
212
|
-
content?: string;
|
|
213
|
-
info?: string;
|
|
214
|
-
loading?: boolean;
|
|
215
|
-
children?: MarkdownToken[];
|
|
216
|
-
attrs?: [string, string][];
|
|
217
|
-
markup?: string;
|
|
218
|
-
meta?: any;
|
|
219
|
-
map?: [number, number];
|
|
220
|
-
raw?: string;
|
|
221
|
-
}
|
|
222
|
-
export type ParsedNode = TextNode | HeadingNode | ParagraphNode | ListNode | ListItemNode | CodeBlockNode | InlineCodeNode | LinkNode | ImageNode | HtmlInlineNode | CustomComponentNode | ThematicBreakNode | BlockquoteNode | TableNode | TableRowNode | TableCellNode | StrongNode | EmphasisNode | StrikethroughNode | HighlightNode | InsertNode | SubscriptNode | SuperscriptNode | CheckboxNode | CheckboxInputNode | EmojiNode | DefinitionListNode | DefinitionItemNode | FootnoteNode | FootnoteReferenceNode | AdmonitionNode | HardBreakNode | MathInlineNode | MathBlockNode | ReferenceNode | UnknownNode;
|
|
223
|
-
export interface CustomComponents {
|
|
224
|
-
text?: Component;
|
|
225
|
-
paragraph?: Component;
|
|
226
|
-
heading?: Component;
|
|
227
|
-
code_block?: Component;
|
|
228
|
-
list?: Component;
|
|
229
|
-
list_item?: Component;
|
|
230
|
-
blockquote?: Component;
|
|
231
|
-
table?: Component;
|
|
232
|
-
definition_list?: Component;
|
|
233
|
-
footnote?: Component;
|
|
234
|
-
footnote_reference?: Component;
|
|
235
|
-
footnote_anchor?: Component;
|
|
236
|
-
admonition?: Component;
|
|
237
|
-
hardbreak?: Component;
|
|
238
|
-
link?: Component;
|
|
239
|
-
image?: Component;
|
|
240
|
-
thematic_break?: Component;
|
|
241
|
-
math_inline?: Component;
|
|
242
|
-
math_block?: Component;
|
|
243
|
-
strong?: Component;
|
|
244
|
-
emphasis?: Component;
|
|
245
|
-
strikethrough?: Component;
|
|
246
|
-
highlight?: Component;
|
|
247
|
-
insert?: Component;
|
|
248
|
-
subscript?: Component;
|
|
249
|
-
superscript?: Component;
|
|
250
|
-
emoji?: Component;
|
|
251
|
-
checkbox?: Component;
|
|
252
|
-
inline_code?: Component;
|
|
253
|
-
html_inline?: Component;
|
|
254
|
-
html_block?: Component;
|
|
255
|
-
reference?: Component;
|
|
256
|
-
mermaid?: Component;
|
|
257
|
-
infographic?: Component;
|
|
258
|
-
d2?: Component;
|
|
259
|
-
vmr_container?: Component;
|
|
260
|
-
[key: string]: Component | undefined;
|
|
261
|
-
}
|
|
262
|
-
export type TransformTokensHook = (tokens: MarkdownToken[]) => MarkdownToken[];
|
|
263
|
-
export interface ParseOptions {
|
|
264
|
-
preTransformTokens?: TransformTokensHook;
|
|
265
|
-
postTransformTokens?: TransformTokensHook;
|
|
266
|
-
/**
|
|
267
|
-
* Custom HTML-like tag names that should be emitted as custom nodes
|
|
268
|
-
* instead of `html_inline` when encountered (e.g. ['thinking']).
|
|
269
|
-
*/
|
|
270
|
-
customHtmlTags?: readonly string[];
|
|
271
|
-
}
|
|
272
|
-
export type PostTransformNodesHook = (nodes: ParsedNode[]) => ParsedNode[];
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { BaseNode, MarkdownIt, ParseOptions } from 'stream-markdown-parser';
|
|
2
|
-
import { CodeBlockMonacoOptions, CodeBlockMonacoTheme, CodeBlockNodeProps, D2BlockNodeProps, InfographicBlockNodeProps, MermaidBlockNodeProps } from './component-props';
|
|
3
|
-
export type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node'>> & Record<string, unknown>;
|
|
4
|
-
export interface NodeRendererProps {
|
|
5
|
-
/** Raw Markdown input. Omit this when you pass pre-parsed nodes instead. */
|
|
6
|
-
content?: string;
|
|
7
|
-
/** Pre-parsed Markdown nodes to render without running the internal parser. */
|
|
8
|
-
nodes?: BaseNode[];
|
|
9
|
-
/**
|
|
10
|
-
* Whether the input stream is complete (end-of-stream). When true, the parser
|
|
11
|
-
* will stop emitting streaming "loading" nodes for unfinished constructs.
|
|
12
|
-
*/
|
|
13
|
-
final?: boolean;
|
|
14
|
-
/** Options forwarded to parseMarkdownToStructure when content is provided */
|
|
15
|
-
parseOptions?: ParseOptions;
|
|
16
|
-
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
17
|
-
/** Log parse/render timing and virtualization stats (dev only) */
|
|
18
|
-
debugPerformance?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Custom HTML-like tags that participate in streaming mid-state handling
|
|
21
|
-
* and are emitted as custom nodes (e.g. ['thinking']). Forwarded to `getMarkdown()`.
|
|
22
|
-
*/
|
|
23
|
-
customHtmlTags?: readonly string[];
|
|
24
|
-
/** Enable priority rendering for visible viewport area */
|
|
25
|
-
viewportPriority?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Whether code_block renders should stream updates.
|
|
28
|
-
* When false, code blocks stay in a loading state and render once when final content is ready.
|
|
29
|
-
* Default: true
|
|
30
|
-
*/
|
|
31
|
-
codeBlockStream?: boolean;
|
|
32
|
-
/** Preferred dark Monaco theme forwarded to every code block renderer. */
|
|
33
|
-
codeBlockDarkTheme?: CodeBlockMonacoTheme;
|
|
34
|
-
/** Preferred light Monaco theme forwarded to every code block renderer. */
|
|
35
|
-
codeBlockLightTheme?: CodeBlockMonacoTheme;
|
|
36
|
-
/** Monaco editor options forwarded to every `CodeBlockNode`. */
|
|
37
|
-
codeBlockMonacoOptions?: CodeBlockMonacoOptions;
|
|
38
|
-
/** If true, render all `code_block` nodes as plain <pre><code> blocks instead of the full CodeBlockNode */
|
|
39
|
-
renderCodeBlocksAsPre?: boolean;
|
|
40
|
-
/** Minimum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
41
|
-
codeBlockMinWidth?: string | number;
|
|
42
|
-
/** Maximum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
43
|
-
codeBlockMaxWidth?: string | number;
|
|
44
|
-
/** Arbitrary props to forward to every CodeBlockNode */
|
|
45
|
-
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
46
|
-
/** Props forwarded to MermaidBlockNode for mermaid fences */
|
|
47
|
-
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
48
|
-
/** Props forwarded to D2BlockNode for d2/d2lang fences */
|
|
49
|
-
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
50
|
-
/** Props forwarded to InfographicBlockNode for infographic fences */
|
|
51
|
-
infographicProps?: Partial<Omit<InfographicBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
52
|
-
/** Global tooltip toggle for link/code-block renderers (default: true) */
|
|
53
|
-
showTooltips?: boolean;
|
|
54
|
-
/** Theme names or theme objects preloaded for Monaco-backed code blocks. */
|
|
55
|
-
themes?: CodeBlockMonacoTheme[];
|
|
56
|
-
/** Forces dark mode for built-in renderers such as Mermaid, D2, KaTeX, and code blocks. */
|
|
57
|
-
isDark?: boolean;
|
|
58
|
-
/** Scope key used by `setCustomComponents()` and `data-custom-id` style overrides. */
|
|
59
|
-
customId?: string;
|
|
60
|
-
indexKey?: number | string;
|
|
61
|
-
/** Enable/disable the non-code-node enter transition (typewriter). Default: true */
|
|
62
|
-
typewriter?: boolean;
|
|
63
|
-
/** Enable incremental/batched rendering of nodes to avoid large single flush costs. Default: true */
|
|
64
|
-
batchRendering?: boolean;
|
|
65
|
-
/** How many nodes to render immediately before batching kicks in. Default: 40 */
|
|
66
|
-
initialRenderBatchSize?: number;
|
|
67
|
-
/** How many additional nodes to render per batch tick. Default: 80 */
|
|
68
|
-
renderBatchSize?: number;
|
|
69
|
-
/** Extra delay (ms) before each batch after rAF; helps yield to input. Default: 16 */
|
|
70
|
-
renderBatchDelay?: number;
|
|
71
|
-
/** Target budget (ms) for each batch before we shrink subsequent batch sizes. Default: 6 */
|
|
72
|
-
renderBatchBudgetMs?: number;
|
|
73
|
-
/** Timeout (ms) for requestIdleCallback slices. Default: 120 */
|
|
74
|
-
renderBatchIdleTimeoutMs?: number;
|
|
75
|
-
/** Defer rendering nodes until they are near the viewport */
|
|
76
|
-
deferNodesUntilVisible?: boolean;
|
|
77
|
-
/** Maximum number of fully rendered nodes kept in DOM. Default: 320 */
|
|
78
|
-
maxLiveNodes?: number;
|
|
79
|
-
/** Number of nodes to keep before/after focus. Default: 60 */
|
|
80
|
-
liveNodeBuffer?: number;
|
|
81
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HtmlToken, getHtmlTagFromContent, hasCompleteHtmlTagContent, shouldRenderUnknownHtmlTagAsText, stripCustomHtmlWrapper, tokenizeHtml } from 'stream-markdown-parser';
|
|
2
|
-
import { Component } from 'vue';
|
|
3
|
-
export { getHtmlTagFromContent, hasCompleteHtmlTagContent, shouldRenderUnknownHtmlTagAsText, stripCustomHtmlWrapper, tokenizeHtml, };
|
|
4
|
-
export type { HtmlToken } from 'stream-markdown-parser';
|
|
5
|
-
export declare function isCustomComponent(tagName: string, customComponents: Record<string, Component>): boolean;
|
|
6
|
-
export declare function sanitizeAttrs(attrs: Record<string, string>): Record<string, string>;
|
|
7
|
-
export declare function convertPropValue(value: string, key: string): any;
|
|
8
|
-
export declare function convertAttrsToProps(attrs: Record<string, string>): Record<string, any>;
|
|
9
|
-
/**
|
|
10
|
-
* Build VNode tree from tokens
|
|
11
|
-
*/
|
|
12
|
-
export declare function buildVNodeTree(tokens: HtmlToken[], customComponents: Record<string, Component>): any[];
|
|
13
|
-
/**
|
|
14
|
-
* Check if HTML content contains custom components
|
|
15
|
-
*/
|
|
16
|
-
export declare function hasCustomComponents(content: string, customComponents: Record<string, Component>): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Parse HTML content to VNodes
|
|
19
|
-
*/
|
|
20
|
-
export declare function parseHtmlToVNodes(content: string, customComponents: Record<string, Component>): any[] | null;
|