markstream-vue 0.0.1
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 +73 -0
- package/README.zh-CN.md +74 -0
- package/dist/index.cjs +319 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +966 -0
- package/dist/index.js +13740 -0
- package/dist/index.tailwind.css +1 -0
- package/dist/tailwind.ts +0 -0
- package/dist/workers/katexRenderer.worker.js +44 -0
- package/dist/workers/mermaidParser.worker.js +92 -0
- package/license +21 -0
- package/package.json +164 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,966 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { Plugin } from 'vue';
|
|
3
|
+
import { BaseNode, ParseOptions, MarkdownIt } from 'stream-markdown-parser';
|
|
4
|
+
export * from 'stream-markdown-parser';
|
|
5
|
+
export { KATEX_COMMANDS, MathOptions, normalizeStandaloneBackslashT, setDefaultMathOptions } from 'stream-markdown-parser';
|
|
6
|
+
|
|
7
|
+
type AdmonitionKind = 'note' | 'info' | 'tip' | 'warning' | 'danger' | 'caution' | 'error';
|
|
8
|
+
interface AdmonitionNode {
|
|
9
|
+
type: 'admonition';
|
|
10
|
+
kind: AdmonitionKind;
|
|
11
|
+
title?: string;
|
|
12
|
+
children: {
|
|
13
|
+
type: string;
|
|
14
|
+
raw: string;
|
|
15
|
+
}[];
|
|
16
|
+
raw: string;
|
|
17
|
+
collapsible?: boolean;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type __VLS_Props$l = {
|
|
21
|
+
node: AdmonitionNode;
|
|
22
|
+
indexKey: number | string;
|
|
23
|
+
isDark?: boolean;
|
|
24
|
+
typewriter?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare const _default$u: vue.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
27
|
+
copy: (...args: any[]) => void;
|
|
28
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{
|
|
29
|
+
onCopy?: (...args: any[]) => any;
|
|
30
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
|
+
|
|
32
|
+
interface NodeChild$9 {
|
|
33
|
+
type: string;
|
|
34
|
+
raw: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
interface BlockquoteNode {
|
|
38
|
+
type: 'blockquote';
|
|
39
|
+
children: NodeChild$9[];
|
|
40
|
+
raw: string;
|
|
41
|
+
cite?: string;
|
|
42
|
+
}
|
|
43
|
+
type __VLS_Props$k = {
|
|
44
|
+
node: BlockquoteNode;
|
|
45
|
+
indexKey: string | number;
|
|
46
|
+
typewriter?: boolean;
|
|
47
|
+
};
|
|
48
|
+
declare const _default$t: vue.DefineComponent<__VLS_Props$k, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
49
|
+
copy: (text: string) => any;
|
|
50
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
|
|
51
|
+
onCopy?: (text: string) => any;
|
|
52
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLQuoteElement>;
|
|
53
|
+
|
|
54
|
+
type __VLS_Props$j = {
|
|
55
|
+
node: {
|
|
56
|
+
type: 'checkbox';
|
|
57
|
+
checked: boolean;
|
|
58
|
+
raw: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
declare const _default$s: vue.DefineComponent<__VLS_Props$j, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
62
|
+
|
|
63
|
+
interface CodeBlockNodeProps {
|
|
64
|
+
node: {
|
|
65
|
+
type: 'code_block';
|
|
66
|
+
language: string;
|
|
67
|
+
code: string;
|
|
68
|
+
raw: string;
|
|
69
|
+
diff?: boolean;
|
|
70
|
+
originalCode?: string;
|
|
71
|
+
updatedCode?: string;
|
|
72
|
+
};
|
|
73
|
+
isDark?: boolean;
|
|
74
|
+
loading?: boolean;
|
|
75
|
+
stream?: boolean;
|
|
76
|
+
darkTheme?: any;
|
|
77
|
+
lightTheme?: any;
|
|
78
|
+
isShowPreview?: boolean;
|
|
79
|
+
monacoOptions?: {
|
|
80
|
+
[k: string]: any;
|
|
81
|
+
};
|
|
82
|
+
enableFontSizeControl?: boolean;
|
|
83
|
+
minWidth?: string | number;
|
|
84
|
+
maxWidth?: string | number;
|
|
85
|
+
themes?: any[];
|
|
86
|
+
showHeader?: boolean;
|
|
87
|
+
showCopyButton?: boolean;
|
|
88
|
+
showExpandButton?: boolean;
|
|
89
|
+
showPreviewButton?: boolean;
|
|
90
|
+
showFontSizeButtons?: boolean;
|
|
91
|
+
customId?: string;
|
|
92
|
+
}
|
|
93
|
+
interface ImageNodeProps {
|
|
94
|
+
node: {
|
|
95
|
+
type: 'image';
|
|
96
|
+
src: string;
|
|
97
|
+
alt: string;
|
|
98
|
+
title: string | null;
|
|
99
|
+
raw: string;
|
|
100
|
+
loading?: boolean;
|
|
101
|
+
};
|
|
102
|
+
fallbackSrc?: string;
|
|
103
|
+
showCaption?: boolean;
|
|
104
|
+
lazy?: boolean;
|
|
105
|
+
svgMinHeight?: string;
|
|
106
|
+
usePlaceholder?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface LinkNodeProps {
|
|
109
|
+
node: {
|
|
110
|
+
type: 'link';
|
|
111
|
+
href: string;
|
|
112
|
+
title: string | null;
|
|
113
|
+
text: string;
|
|
114
|
+
children: {
|
|
115
|
+
type: string;
|
|
116
|
+
raw: string;
|
|
117
|
+
}[];
|
|
118
|
+
raw: string;
|
|
119
|
+
loading?: boolean;
|
|
120
|
+
};
|
|
121
|
+
indexKey: number | string;
|
|
122
|
+
customId?: string;
|
|
123
|
+
showTooltip?: boolean;
|
|
124
|
+
color?: string;
|
|
125
|
+
underlineHeight?: number;
|
|
126
|
+
underlineBottom?: number | string;
|
|
127
|
+
animationDuration?: number;
|
|
128
|
+
animationOpacity?: number;
|
|
129
|
+
animationTiming?: string;
|
|
130
|
+
animationIteration?: string | number;
|
|
131
|
+
}
|
|
132
|
+
interface PreCodeNodeProps {
|
|
133
|
+
node: any;
|
|
134
|
+
}
|
|
135
|
+
interface MermaidBlockNodeProps {
|
|
136
|
+
node: any;
|
|
137
|
+
maxHeight?: string | null;
|
|
138
|
+
loading?: boolean;
|
|
139
|
+
isDark?: boolean;
|
|
140
|
+
workerTimeoutMs?: number;
|
|
141
|
+
parseTimeoutMs?: number;
|
|
142
|
+
renderTimeoutMs?: number;
|
|
143
|
+
fullRenderTimeoutMs?: number;
|
|
144
|
+
}
|
|
145
|
+
interface MathBlockNodeProps {
|
|
146
|
+
node: {
|
|
147
|
+
type: 'math_block';
|
|
148
|
+
content: string;
|
|
149
|
+
raw: string;
|
|
150
|
+
loading?: boolean;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
interface MathInlineNodeProps {
|
|
154
|
+
node: {
|
|
155
|
+
type: 'math_inline';
|
|
156
|
+
content: string;
|
|
157
|
+
raw: string;
|
|
158
|
+
loading?: boolean;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare function __VLS_template$4(): {
|
|
163
|
+
attrs: Partial<{}>;
|
|
164
|
+
slots: {
|
|
165
|
+
'header-left'?(_: {}): any;
|
|
166
|
+
'header-right'?(_: {}): any;
|
|
167
|
+
loading?(_: {
|
|
168
|
+
loading: boolean;
|
|
169
|
+
stream: boolean;
|
|
170
|
+
}): any;
|
|
171
|
+
};
|
|
172
|
+
refs: {
|
|
173
|
+
container: HTMLDivElement;
|
|
174
|
+
codeEditor: HTMLDivElement;
|
|
175
|
+
};
|
|
176
|
+
rootEl: any;
|
|
177
|
+
};
|
|
178
|
+
type __VLS_TemplateResult$4 = ReturnType<typeof __VLS_template$4>;
|
|
179
|
+
declare const __VLS_component$4: vue.DefineComponent<CodeBlockNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
180
|
+
copy: (...args: any[]) => void;
|
|
181
|
+
previewCode: (...args: any[]) => void;
|
|
182
|
+
}, string, vue.PublicProps, Readonly<CodeBlockNodeProps> & Readonly<{
|
|
183
|
+
onCopy?: (...args: any[]) => any;
|
|
184
|
+
onPreviewCode?: (...args: any[]) => any;
|
|
185
|
+
}>, {
|
|
186
|
+
loading: boolean;
|
|
187
|
+
stream: boolean;
|
|
188
|
+
darkTheme: any;
|
|
189
|
+
lightTheme: any;
|
|
190
|
+
isShowPreview: boolean;
|
|
191
|
+
enableFontSizeControl: boolean;
|
|
192
|
+
minWidth: string | number;
|
|
193
|
+
maxWidth: string | number;
|
|
194
|
+
showHeader: boolean;
|
|
195
|
+
showCopyButton: boolean;
|
|
196
|
+
showExpandButton: boolean;
|
|
197
|
+
showPreviewButton: boolean;
|
|
198
|
+
showFontSizeButtons: boolean;
|
|
199
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
200
|
+
container: HTMLDivElement;
|
|
201
|
+
codeEditor: HTMLDivElement;
|
|
202
|
+
}, any>;
|
|
203
|
+
declare const _default$r: __VLS_WithTemplateSlots$4<typeof __VLS_component$4, __VLS_TemplateResult$4["slots"]>;
|
|
204
|
+
|
|
205
|
+
type __VLS_WithTemplateSlots$4<T, S> = T & {
|
|
206
|
+
new (): {
|
|
207
|
+
$slots: S;
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
interface DefinitionItemNode {
|
|
212
|
+
type: 'definition_item';
|
|
213
|
+
term: {
|
|
214
|
+
type: string;
|
|
215
|
+
raw: string;
|
|
216
|
+
}[];
|
|
217
|
+
definition: {
|
|
218
|
+
type: string;
|
|
219
|
+
raw: string;
|
|
220
|
+
}[];
|
|
221
|
+
raw: string;
|
|
222
|
+
}
|
|
223
|
+
interface DefinitionListNode {
|
|
224
|
+
type: 'definition_list';
|
|
225
|
+
items: DefinitionItemNode[];
|
|
226
|
+
raw: string;
|
|
227
|
+
}
|
|
228
|
+
type __VLS_Props$i = {
|
|
229
|
+
node: DefinitionListNode;
|
|
230
|
+
indexKey: string | number;
|
|
231
|
+
typewriter?: boolean;
|
|
232
|
+
};
|
|
233
|
+
declare const _default$q: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
234
|
+
copy: (...args: any[]) => void;
|
|
235
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{
|
|
236
|
+
onCopy?: (...args: any[]) => any;
|
|
237
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDListElement>;
|
|
238
|
+
|
|
239
|
+
type __VLS_Props$h = {
|
|
240
|
+
node: {
|
|
241
|
+
type: 'emoji';
|
|
242
|
+
name: string;
|
|
243
|
+
markup: string;
|
|
244
|
+
raw: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
declare const _default$p: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
248
|
+
|
|
249
|
+
interface FootnoteNode {
|
|
250
|
+
type: 'footnote';
|
|
251
|
+
id: string;
|
|
252
|
+
children: {
|
|
253
|
+
type: string;
|
|
254
|
+
raw: string;
|
|
255
|
+
}[];
|
|
256
|
+
raw: string;
|
|
257
|
+
}
|
|
258
|
+
type __VLS_Props$g = {
|
|
259
|
+
node: FootnoteNode;
|
|
260
|
+
indexKey: string | number;
|
|
261
|
+
typewriter?: boolean;
|
|
262
|
+
};
|
|
263
|
+
declare const _default$o: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
264
|
+
copy: (...args: any[]) => void;
|
|
265
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{
|
|
266
|
+
onCopy?: (...args: any[]) => any;
|
|
267
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
268
|
+
|
|
269
|
+
interface FootnoteReferenceNode {
|
|
270
|
+
type: 'footnote_reference';
|
|
271
|
+
id: string;
|
|
272
|
+
raw: string;
|
|
273
|
+
}
|
|
274
|
+
type __VLS_Props$f = {
|
|
275
|
+
node: FootnoteReferenceNode;
|
|
276
|
+
};
|
|
277
|
+
declare const _default$n: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
278
|
+
|
|
279
|
+
interface HardBreakNode {
|
|
280
|
+
type: 'hardbreak';
|
|
281
|
+
raw: string;
|
|
282
|
+
}
|
|
283
|
+
type __VLS_Props$e = {
|
|
284
|
+
node: HardBreakNode;
|
|
285
|
+
};
|
|
286
|
+
declare const _default$m: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLBRElement>;
|
|
287
|
+
|
|
288
|
+
declare const _HeadingNode: any;
|
|
289
|
+
|
|
290
|
+
interface NodeChild$8 {
|
|
291
|
+
type: string;
|
|
292
|
+
raw: string;
|
|
293
|
+
[key: string]: unknown;
|
|
294
|
+
}
|
|
295
|
+
type __VLS_Props$d = {
|
|
296
|
+
node: {
|
|
297
|
+
type: 'highlight';
|
|
298
|
+
children: NodeChild$8[];
|
|
299
|
+
raw: string;
|
|
300
|
+
};
|
|
301
|
+
customId?: string;
|
|
302
|
+
indexKey?: number | string;
|
|
303
|
+
};
|
|
304
|
+
declare const _default$l: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
305
|
+
|
|
306
|
+
declare function __VLS_template$3(): {
|
|
307
|
+
attrs: Partial<{}>;
|
|
308
|
+
slots: {
|
|
309
|
+
placeholder?(_: {
|
|
310
|
+
node: {
|
|
311
|
+
type: "image";
|
|
312
|
+
src: string;
|
|
313
|
+
alt: string;
|
|
314
|
+
title: string | null;
|
|
315
|
+
raw: string;
|
|
316
|
+
loading?: boolean;
|
|
317
|
+
};
|
|
318
|
+
displaySrc: string;
|
|
319
|
+
imageLoaded: boolean;
|
|
320
|
+
hasError: boolean;
|
|
321
|
+
fallbackSrc: string;
|
|
322
|
+
lazy: boolean;
|
|
323
|
+
isSvg: boolean;
|
|
324
|
+
}): any;
|
|
325
|
+
error?(_: {
|
|
326
|
+
node: {
|
|
327
|
+
type: "image";
|
|
328
|
+
src: string;
|
|
329
|
+
alt: string;
|
|
330
|
+
title: string | null;
|
|
331
|
+
raw: string;
|
|
332
|
+
loading?: boolean;
|
|
333
|
+
};
|
|
334
|
+
displaySrc: string;
|
|
335
|
+
imageLoaded: boolean;
|
|
336
|
+
hasError: true;
|
|
337
|
+
fallbackSrc: string;
|
|
338
|
+
lazy: boolean;
|
|
339
|
+
isSvg: boolean;
|
|
340
|
+
}): any;
|
|
341
|
+
};
|
|
342
|
+
refs: {
|
|
343
|
+
figureRef: HTMLElement;
|
|
344
|
+
};
|
|
345
|
+
rootEl: HTMLElement;
|
|
346
|
+
};
|
|
347
|
+
type __VLS_TemplateResult$3 = ReturnType<typeof __VLS_template$3>;
|
|
348
|
+
declare const __VLS_component$3: vue.DefineComponent<ImageNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
349
|
+
click: (payload: [Event, string]) => any;
|
|
350
|
+
error: (src: string) => any;
|
|
351
|
+
load: (src: string) => any;
|
|
352
|
+
}, string, vue.PublicProps, Readonly<ImageNodeProps> & Readonly<{
|
|
353
|
+
onClick?: (payload: [Event, string]) => any;
|
|
354
|
+
onError?: (src: string) => any;
|
|
355
|
+
onLoad?: (src: string) => any;
|
|
356
|
+
}>, {
|
|
357
|
+
fallbackSrc: string;
|
|
358
|
+
showCaption: boolean;
|
|
359
|
+
lazy: boolean;
|
|
360
|
+
svgMinHeight: string;
|
|
361
|
+
usePlaceholder: boolean;
|
|
362
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
363
|
+
figureRef: HTMLElement;
|
|
364
|
+
}, HTMLElement>;
|
|
365
|
+
declare const _default$k: __VLS_WithTemplateSlots$3<typeof __VLS_component$3, __VLS_TemplateResult$3["slots"]>;
|
|
366
|
+
|
|
367
|
+
type __VLS_WithTemplateSlots$3<T, S> = T & {
|
|
368
|
+
new (): {
|
|
369
|
+
$slots: S;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
type __VLS_Props$c = {
|
|
374
|
+
node: {
|
|
375
|
+
type: 'inline_code';
|
|
376
|
+
code: string;
|
|
377
|
+
raw: string;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
declare const _default$j: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
381
|
+
|
|
382
|
+
interface NodeChild$7 {
|
|
383
|
+
type: string;
|
|
384
|
+
raw: string;
|
|
385
|
+
[key: string]: unknown;
|
|
386
|
+
}
|
|
387
|
+
type __VLS_Props$b = {
|
|
388
|
+
node: {
|
|
389
|
+
type: 'insert';
|
|
390
|
+
children: NodeChild$7[];
|
|
391
|
+
raw: string;
|
|
392
|
+
};
|
|
393
|
+
customId?: string;
|
|
394
|
+
indexKey?: number | string;
|
|
395
|
+
};
|
|
396
|
+
declare const _default$i: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLModElement>;
|
|
397
|
+
|
|
398
|
+
declare const _default$h: vue.DefineComponent<LinkNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<LinkNodeProps> & Readonly<{}>, {
|
|
399
|
+
showTooltip: boolean;
|
|
400
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
401
|
+
|
|
402
|
+
interface NodeChild$6 {
|
|
403
|
+
type: string;
|
|
404
|
+
raw: string;
|
|
405
|
+
[key: string]: unknown;
|
|
406
|
+
}
|
|
407
|
+
interface ListItem$1 {
|
|
408
|
+
type: 'list_item';
|
|
409
|
+
children: NodeChild$6[];
|
|
410
|
+
raw: string;
|
|
411
|
+
}
|
|
412
|
+
type __VLS_Props$a = {
|
|
413
|
+
item: ListItem$1;
|
|
414
|
+
indexKey?: number | string;
|
|
415
|
+
value?: number;
|
|
416
|
+
/** Forwarded flag to enable/disable non-code node enter transition */
|
|
417
|
+
typewriter?: boolean;
|
|
418
|
+
};
|
|
419
|
+
declare const _default$g: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
420
|
+
copy: (text: string) => any;
|
|
421
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
|
|
422
|
+
onCopy?: (text: string) => any;
|
|
423
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLLIElement>;
|
|
424
|
+
|
|
425
|
+
interface NodeChild$5 {
|
|
426
|
+
type: string;
|
|
427
|
+
raw: string;
|
|
428
|
+
[key: string]: unknown;
|
|
429
|
+
}
|
|
430
|
+
interface ListItem {
|
|
431
|
+
type: 'list_item';
|
|
432
|
+
children: NodeChild$5[];
|
|
433
|
+
raw: string;
|
|
434
|
+
}
|
|
435
|
+
type __VLS_Props$9 = {
|
|
436
|
+
node: {
|
|
437
|
+
type: 'list';
|
|
438
|
+
ordered: boolean;
|
|
439
|
+
start?: number;
|
|
440
|
+
items: ListItem[];
|
|
441
|
+
raw: string;
|
|
442
|
+
};
|
|
443
|
+
customId?: string;
|
|
444
|
+
indexKey?: number | string;
|
|
445
|
+
typewriter?: boolean;
|
|
446
|
+
};
|
|
447
|
+
declare const _default$f: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
448
|
+
copy: (...args: any[]) => void;
|
|
449
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{
|
|
450
|
+
onCopy?: (...args: any[]) => any;
|
|
451
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
452
|
+
|
|
453
|
+
type __VLS_Props$8 = {
|
|
454
|
+
node: {
|
|
455
|
+
type: 'code_block';
|
|
456
|
+
language: string;
|
|
457
|
+
code: string;
|
|
458
|
+
raw: string;
|
|
459
|
+
diff?: boolean;
|
|
460
|
+
originalCode?: string;
|
|
461
|
+
updatedCode?: string;
|
|
462
|
+
};
|
|
463
|
+
loading?: boolean;
|
|
464
|
+
/**
|
|
465
|
+
* If true, update and render code content as it streams in.
|
|
466
|
+
* If false, keep a lightweight loading state and create the editor only when loading becomes false.
|
|
467
|
+
*/
|
|
468
|
+
stream?: boolean;
|
|
469
|
+
darkTheme?: string;
|
|
470
|
+
lightTheme?: string;
|
|
471
|
+
isDark?: boolean;
|
|
472
|
+
isShowPreview?: boolean;
|
|
473
|
+
enableFontSizeControl?: boolean;
|
|
474
|
+
/** Minimum width for the code block container (px or CSS unit string) */
|
|
475
|
+
minWidth?: string | number;
|
|
476
|
+
/** Maximum width for the code block container (px or CSS unit string) */
|
|
477
|
+
maxWidth?: string | number;
|
|
478
|
+
themes?: string[];
|
|
479
|
+
/** Header visibility and controls */
|
|
480
|
+
showHeader?: boolean;
|
|
481
|
+
showCopyButton?: boolean;
|
|
482
|
+
showExpandButton?: boolean;
|
|
483
|
+
showPreviewButton?: boolean;
|
|
484
|
+
showFontSizeButtons?: boolean;
|
|
485
|
+
};
|
|
486
|
+
declare function __VLS_template$2(): {
|
|
487
|
+
attrs: Partial<{}>;
|
|
488
|
+
slots: {
|
|
489
|
+
'header-left'?(_: {}): any;
|
|
490
|
+
'header-right'?(_: {}): any;
|
|
491
|
+
loading?(_: {
|
|
492
|
+
loading: boolean;
|
|
493
|
+
stream: boolean;
|
|
494
|
+
}): any;
|
|
495
|
+
};
|
|
496
|
+
refs: {
|
|
497
|
+
codeBlockContent: HTMLDivElement;
|
|
498
|
+
};
|
|
499
|
+
rootEl: any;
|
|
500
|
+
};
|
|
501
|
+
type __VLS_TemplateResult$2 = ReturnType<typeof __VLS_template$2>;
|
|
502
|
+
declare const __VLS_component$2: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
503
|
+
copy: (...args: any[]) => void;
|
|
504
|
+
previewCode: (...args: any[]) => void;
|
|
505
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
|
|
506
|
+
onCopy?: (...args: any[]) => any;
|
|
507
|
+
onPreviewCode?: (...args: any[]) => any;
|
|
508
|
+
}>, {
|
|
509
|
+
loading: boolean;
|
|
510
|
+
stream: boolean;
|
|
511
|
+
darkTheme: string;
|
|
512
|
+
lightTheme: string;
|
|
513
|
+
isShowPreview: boolean;
|
|
514
|
+
enableFontSizeControl: boolean;
|
|
515
|
+
minWidth: string | number;
|
|
516
|
+
maxWidth: string | number;
|
|
517
|
+
showHeader: boolean;
|
|
518
|
+
showCopyButton: boolean;
|
|
519
|
+
showExpandButton: boolean;
|
|
520
|
+
showPreviewButton: boolean;
|
|
521
|
+
showFontSizeButtons: boolean;
|
|
522
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
523
|
+
codeBlockContent: HTMLDivElement;
|
|
524
|
+
}, any>;
|
|
525
|
+
declare const _default$e: __VLS_WithTemplateSlots$2<typeof __VLS_component$2, __VLS_TemplateResult$2["slots"]>;
|
|
526
|
+
|
|
527
|
+
type __VLS_WithTemplateSlots$2<T, S> = T & {
|
|
528
|
+
new (): {
|
|
529
|
+
$slots: S;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
declare const _default$d: vue.DefineComponent<MathBlockNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MathBlockNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
534
|
+
containerEl: HTMLDivElement;
|
|
535
|
+
mathBlockElement: HTMLDivElement;
|
|
536
|
+
}, HTMLDivElement>;
|
|
537
|
+
|
|
538
|
+
declare function __VLS_template$1(): {
|
|
539
|
+
attrs: Partial<{}>;
|
|
540
|
+
slots: {
|
|
541
|
+
loading?(_: {
|
|
542
|
+
isLoading: true;
|
|
543
|
+
}): any;
|
|
544
|
+
};
|
|
545
|
+
refs: {
|
|
546
|
+
containerEl: HTMLSpanElement;
|
|
547
|
+
mathElement: HTMLSpanElement;
|
|
548
|
+
};
|
|
549
|
+
rootEl: HTMLSpanElement;
|
|
550
|
+
};
|
|
551
|
+
type __VLS_TemplateResult$1 = ReturnType<typeof __VLS_template$1>;
|
|
552
|
+
declare const __VLS_component$1: vue.DefineComponent<MathInlineNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MathInlineNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
553
|
+
containerEl: HTMLSpanElement;
|
|
554
|
+
mathElement: HTMLSpanElement;
|
|
555
|
+
}, HTMLSpanElement>;
|
|
556
|
+
declare const _default$c: __VLS_WithTemplateSlots$1<typeof __VLS_component$1, __VLS_TemplateResult$1["slots"]>;
|
|
557
|
+
|
|
558
|
+
type __VLS_WithTemplateSlots$1<T, S> = T & {
|
|
559
|
+
new (): {
|
|
560
|
+
$slots: S;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
declare const _default$b: vue.DefineComponent<MermaidBlockNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
565
|
+
copy: (...args: any[]) => void;
|
|
566
|
+
}, string, vue.PublicProps, Readonly<MermaidBlockNodeProps> & Readonly<{
|
|
567
|
+
onCopy?: (...args: any[]) => any;
|
|
568
|
+
}>, {
|
|
569
|
+
loading: boolean;
|
|
570
|
+
maxHeight: string | null;
|
|
571
|
+
workerTimeoutMs: number;
|
|
572
|
+
parseTimeoutMs: number;
|
|
573
|
+
renderTimeoutMs: number;
|
|
574
|
+
fullRenderTimeoutMs: number;
|
|
575
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
576
|
+
modeContainerRef: HTMLDivElement;
|
|
577
|
+
mermaidContainer: HTMLDivElement;
|
|
578
|
+
mermaidWrapper: HTMLDivElement;
|
|
579
|
+
mermaidContent: HTMLDivElement;
|
|
580
|
+
modalContent: HTMLDivElement;
|
|
581
|
+
}, HTMLDivElement>;
|
|
582
|
+
|
|
583
|
+
interface NodeRendererProps {
|
|
584
|
+
content?: string;
|
|
585
|
+
nodes?: BaseNode[];
|
|
586
|
+
/** Options forwarded to parseMarkdownToStructure when content is provided */
|
|
587
|
+
parseOptions?: ParseOptions;
|
|
588
|
+
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
589
|
+
/** Enable priority rendering for visible viewport area */
|
|
590
|
+
viewportPriority?: boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Whether code_block renders should stream updates.
|
|
593
|
+
* When false, code blocks stay in a loading state and render once when final content is ready.
|
|
594
|
+
* Default: true
|
|
595
|
+
*/
|
|
596
|
+
codeBlockStream?: boolean;
|
|
597
|
+
codeBlockDarkTheme?: any;
|
|
598
|
+
codeBlockLightTheme?: any;
|
|
599
|
+
codeBlockMonacoOptions?: Record<string, any>;
|
|
600
|
+
/** If true, render all `code_block` nodes as plain <pre><code> blocks instead of the full CodeBlockNode */
|
|
601
|
+
renderCodeBlocksAsPre?: boolean;
|
|
602
|
+
/** Minimum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
603
|
+
codeBlockMinWidth?: string | number;
|
|
604
|
+
/** Maximum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
605
|
+
codeBlockMaxWidth?: string | number;
|
|
606
|
+
/** Arbitrary props to forward to every CodeBlockNode */
|
|
607
|
+
codeBlockProps?: Record<string, any>;
|
|
608
|
+
themes?: string[];
|
|
609
|
+
isDark?: boolean;
|
|
610
|
+
customId?: string;
|
|
611
|
+
indexKey?: number | string;
|
|
612
|
+
/** Enable/disable the non-code-node enter transition (typewriter). Default: true */
|
|
613
|
+
typewriter?: boolean;
|
|
614
|
+
/** Enable incremental/batched rendering of nodes to avoid large single flush costs. Default: true */
|
|
615
|
+
batchRendering?: boolean;
|
|
616
|
+
/** How many nodes to render immediately before batching kicks in. Default: 40 */
|
|
617
|
+
initialRenderBatchSize?: number;
|
|
618
|
+
/** How many additional nodes to render per batch tick. Default: 80 */
|
|
619
|
+
renderBatchSize?: number;
|
|
620
|
+
/** Extra delay (ms) before each batch after rAF; helps yield to input. Default: 16 */
|
|
621
|
+
renderBatchDelay?: number;
|
|
622
|
+
/** Target budget (ms) for each batch before we shrink subsequent batch sizes. Default: 6 */
|
|
623
|
+
renderBatchBudgetMs?: number;
|
|
624
|
+
/** Timeout (ms) for requestIdleCallback slices. Default: 120 */
|
|
625
|
+
renderBatchIdleTimeoutMs?: number;
|
|
626
|
+
/** Defer rendering nodes until they are near the viewport */
|
|
627
|
+
deferNodesUntilVisible?: boolean;
|
|
628
|
+
/** Maximum number of fully rendered nodes kept in DOM. Default: 320 */
|
|
629
|
+
maxLiveNodes?: number;
|
|
630
|
+
/** Number of nodes to keep before/after focus. Default: 60 */
|
|
631
|
+
liveNodeBuffer?: number;
|
|
632
|
+
}
|
|
633
|
+
declare const _default$a: vue.DefineComponent<NodeRendererProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
634
|
+
copy: (...args: any[]) => void;
|
|
635
|
+
handleArtifactClick: (...args: any[]) => void;
|
|
636
|
+
click: (...args: any[]) => void;
|
|
637
|
+
mouseover: (...args: any[]) => void;
|
|
638
|
+
mouseout: (...args: any[]) => void;
|
|
639
|
+
}, string, vue.PublicProps, Readonly<NodeRendererProps> & Readonly<{
|
|
640
|
+
onCopy?: (...args: any[]) => any;
|
|
641
|
+
onHandleArtifactClick?: (...args: any[]) => any;
|
|
642
|
+
onClick?: (...args: any[]) => any;
|
|
643
|
+
onMouseover?: (...args: any[]) => any;
|
|
644
|
+
onMouseout?: (...args: any[]) => any;
|
|
645
|
+
}>, {
|
|
646
|
+
typewriter: boolean;
|
|
647
|
+
codeBlockStream: boolean;
|
|
648
|
+
batchRendering: boolean;
|
|
649
|
+
initialRenderBatchSize: number;
|
|
650
|
+
renderBatchSize: number;
|
|
651
|
+
renderBatchDelay: number;
|
|
652
|
+
renderBatchBudgetMs: number;
|
|
653
|
+
renderBatchIdleTimeoutMs: number;
|
|
654
|
+
deferNodesUntilVisible: boolean;
|
|
655
|
+
maxLiveNodes: number;
|
|
656
|
+
liveNodeBuffer: number;
|
|
657
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {
|
|
658
|
+
containerRef: HTMLDivElement;
|
|
659
|
+
}, HTMLDivElement>;
|
|
660
|
+
|
|
661
|
+
interface NodeChild$4 {
|
|
662
|
+
type: string;
|
|
663
|
+
raw: string;
|
|
664
|
+
[key: string]: unknown;
|
|
665
|
+
}
|
|
666
|
+
type __VLS_Props$7 = {
|
|
667
|
+
node: {
|
|
668
|
+
type: 'paragraph';
|
|
669
|
+
children: NodeChild$4[];
|
|
670
|
+
raw: string;
|
|
671
|
+
};
|
|
672
|
+
customId?: string;
|
|
673
|
+
indexKey?: number | string;
|
|
674
|
+
};
|
|
675
|
+
declare const _default$9: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLParagraphElement>;
|
|
676
|
+
|
|
677
|
+
declare const _default$8: vue.DefineComponent<PreCodeNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<PreCodeNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLPreElement>;
|
|
678
|
+
|
|
679
|
+
type __VLS_Props$6 = {
|
|
680
|
+
node: {
|
|
681
|
+
type: 'reference';
|
|
682
|
+
id: string;
|
|
683
|
+
raw: string;
|
|
684
|
+
};
|
|
685
|
+
messageId?: string;
|
|
686
|
+
threadId?: string;
|
|
687
|
+
};
|
|
688
|
+
declare const _default$7: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
689
|
+
click: (...args: any[]) => void;
|
|
690
|
+
mouseEnter: (...args: any[]) => void;
|
|
691
|
+
mouseLeave: (...args: any[]) => void;
|
|
692
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{
|
|
693
|
+
onClick?: (...args: any[]) => any;
|
|
694
|
+
onMouseEnter?: (...args: any[]) => any;
|
|
695
|
+
onMouseLeave?: (...args: any[]) => any;
|
|
696
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
697
|
+
|
|
698
|
+
interface NodeChild$3 {
|
|
699
|
+
type: string;
|
|
700
|
+
raw: string;
|
|
701
|
+
[key: string]: unknown;
|
|
702
|
+
}
|
|
703
|
+
type __VLS_Props$5 = {
|
|
704
|
+
node: {
|
|
705
|
+
type: 'strikethrough';
|
|
706
|
+
children: NodeChild$3[];
|
|
707
|
+
raw: string;
|
|
708
|
+
};
|
|
709
|
+
customId?: string;
|
|
710
|
+
indexKey?: string | number;
|
|
711
|
+
};
|
|
712
|
+
declare const _default$6: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLModElement>;
|
|
713
|
+
|
|
714
|
+
interface NodeChild$2 {
|
|
715
|
+
type: string;
|
|
716
|
+
raw: string;
|
|
717
|
+
[key: string]: unknown;
|
|
718
|
+
}
|
|
719
|
+
type __VLS_Props$4 = {
|
|
720
|
+
node: {
|
|
721
|
+
type: 'strong';
|
|
722
|
+
children: NodeChild$2[];
|
|
723
|
+
raw: string;
|
|
724
|
+
};
|
|
725
|
+
customId?: string;
|
|
726
|
+
indexKey?: number | string;
|
|
727
|
+
};
|
|
728
|
+
declare const _default$5: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
729
|
+
|
|
730
|
+
interface NodeChild$1 {
|
|
731
|
+
type: string;
|
|
732
|
+
raw: string;
|
|
733
|
+
[key: string]: unknown;
|
|
734
|
+
}
|
|
735
|
+
type __VLS_Props$3 = {
|
|
736
|
+
node: {
|
|
737
|
+
type: 'subscript';
|
|
738
|
+
children: NodeChild$1[];
|
|
739
|
+
raw: string;
|
|
740
|
+
};
|
|
741
|
+
customId?: string;
|
|
742
|
+
indexKey?: number | string;
|
|
743
|
+
};
|
|
744
|
+
declare const _default$4: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
745
|
+
|
|
746
|
+
interface NodeChild {
|
|
747
|
+
type: string;
|
|
748
|
+
raw: string;
|
|
749
|
+
[key: string]: unknown;
|
|
750
|
+
}
|
|
751
|
+
type __VLS_Props$2 = {
|
|
752
|
+
node: {
|
|
753
|
+
type: 'superscript';
|
|
754
|
+
children: NodeChild[];
|
|
755
|
+
raw: string;
|
|
756
|
+
};
|
|
757
|
+
customId?: string;
|
|
758
|
+
indexKey?: number | string;
|
|
759
|
+
};
|
|
760
|
+
declare const _default$3: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
761
|
+
|
|
762
|
+
interface TableCellNode {
|
|
763
|
+
type: 'table_cell';
|
|
764
|
+
header: boolean;
|
|
765
|
+
children: {
|
|
766
|
+
type: string;
|
|
767
|
+
raw: string;
|
|
768
|
+
}[];
|
|
769
|
+
raw: string;
|
|
770
|
+
align?: 'left' | 'right' | 'center';
|
|
771
|
+
}
|
|
772
|
+
interface TableRowNode {
|
|
773
|
+
type: 'table_row';
|
|
774
|
+
cells: TableCellNode[];
|
|
775
|
+
raw: string;
|
|
776
|
+
}
|
|
777
|
+
interface TableNode {
|
|
778
|
+
type: 'table';
|
|
779
|
+
header: TableRowNode;
|
|
780
|
+
rows: TableRowNode[];
|
|
781
|
+
raw: string;
|
|
782
|
+
loading: boolean;
|
|
783
|
+
}
|
|
784
|
+
type __VLS_Props$1 = {
|
|
785
|
+
node: TableNode;
|
|
786
|
+
indexKey: string | number;
|
|
787
|
+
isDark?: boolean;
|
|
788
|
+
typewriter?: boolean;
|
|
789
|
+
};
|
|
790
|
+
declare function __VLS_template(): {
|
|
791
|
+
attrs: Partial<{}>;
|
|
792
|
+
slots: {
|
|
793
|
+
loading?(_: {
|
|
794
|
+
isLoading: true;
|
|
795
|
+
}): any;
|
|
796
|
+
};
|
|
797
|
+
refs: {};
|
|
798
|
+
rootEl: HTMLDivElement;
|
|
799
|
+
};
|
|
800
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
801
|
+
declare const __VLS_component: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
802
|
+
copy: (...args: any[]) => void;
|
|
803
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{
|
|
804
|
+
onCopy?: (...args: any[]) => any;
|
|
805
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
806
|
+
declare const _default$2: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
807
|
+
|
|
808
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
809
|
+
new (): {
|
|
810
|
+
$slots: S;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
type __VLS_Props = {
|
|
815
|
+
node: {
|
|
816
|
+
type: 'text';
|
|
817
|
+
content: string;
|
|
818
|
+
raw: string;
|
|
819
|
+
center?: boolean;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
declare const _default$1: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
823
|
+
copy: (...args: any[]) => void;
|
|
824
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
825
|
+
onCopy?: (...args: any[]) => any;
|
|
826
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
827
|
+
|
|
828
|
+
declare const _default: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, HTMLHRElement>;
|
|
829
|
+
|
|
830
|
+
declare const defaultMap: Record<string, string>;
|
|
831
|
+
/**
|
|
832
|
+
* Replace the entire default translation map.
|
|
833
|
+
* Consumers can call this to provide their own fallback translations (e.g. Chinese).
|
|
834
|
+
*/
|
|
835
|
+
declare function setDefaultI18nMap(map: Record<keyof typeof defaultMap, string>): void;
|
|
836
|
+
|
|
837
|
+
interface CustomComponents {
|
|
838
|
+
text: any;
|
|
839
|
+
paragraph: any;
|
|
840
|
+
heading: any;
|
|
841
|
+
code_block: any;
|
|
842
|
+
list: any;
|
|
843
|
+
blockquote: any;
|
|
844
|
+
table: any;
|
|
845
|
+
definition_list: any;
|
|
846
|
+
footnote: any;
|
|
847
|
+
footnote_reference: any;
|
|
848
|
+
admonition: any;
|
|
849
|
+
hardbreak: any;
|
|
850
|
+
link: any;
|
|
851
|
+
image: any;
|
|
852
|
+
thematic_break: any;
|
|
853
|
+
math_inline: any;
|
|
854
|
+
math_block: any;
|
|
855
|
+
strong: any;
|
|
856
|
+
emphasis: any;
|
|
857
|
+
strikethrough: any;
|
|
858
|
+
highlight: any;
|
|
859
|
+
insert: any;
|
|
860
|
+
subscript: any;
|
|
861
|
+
superscript: any;
|
|
862
|
+
emoji: any;
|
|
863
|
+
checkbox: any;
|
|
864
|
+
inline_code: any;
|
|
865
|
+
reference: any;
|
|
866
|
+
mermaid: any;
|
|
867
|
+
[key: string]: any;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
declare function setCustomComponents(id: string, mapping: Partial<CustomComponents>): void;
|
|
871
|
+
declare function setCustomComponents(mapping: Partial<CustomComponents>): void;
|
|
872
|
+
/**
|
|
873
|
+
* Retrieve custom components for a given scope id.
|
|
874
|
+
* If no id is provided, returns the legacy/global mapping (if any).
|
|
875
|
+
*/
|
|
876
|
+
declare function getCustomNodeComponents(customId?: string): Partial<CustomComponents>;
|
|
877
|
+
/**
|
|
878
|
+
* Remove a scoped custom components mapping.
|
|
879
|
+
* Use this to clean up mappings for dynamic or temporary renderers.
|
|
880
|
+
*/
|
|
881
|
+
declare function removeCustomComponents(id: string): void;
|
|
882
|
+
/**
|
|
883
|
+
* Clear the legacy/global custom components mapping.
|
|
884
|
+
* Use this when you want to remove the single-argument mapping set by
|
|
885
|
+
* `setCustomComponents(mapping)`.
|
|
886
|
+
*/
|
|
887
|
+
declare function clearGlobalCustomComponents(): void;
|
|
888
|
+
|
|
889
|
+
declare function getUseMonaco(): Promise<any>;
|
|
890
|
+
|
|
891
|
+
type LanguageIconResolver = (lang: string) => string | undefined | null;
|
|
892
|
+
declare function setLanguageIconResolver(resolver?: LanguageIconResolver | null): void;
|
|
893
|
+
declare function getLanguageIcon(lang: string): string;
|
|
894
|
+
declare const languageMap: Record<string, string>;
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Allow user to inject a Worker instance, e.g. from Vite ?worker import.
|
|
898
|
+
*/
|
|
899
|
+
declare function setKaTeXWorker(w: Worker): void;
|
|
900
|
+
/**
|
|
901
|
+
* Remove the current worker instance (for cleanup or SSR).
|
|
902
|
+
*/
|
|
903
|
+
declare function clearKaTeXWorker(): void;
|
|
904
|
+
declare function setKaTeXWorkerDebug(enabled: boolean): void;
|
|
905
|
+
declare function renderKaTeXInWorker(content: string, displayMode?: boolean, timeout?: number, signal?: AbortSignal): Promise<string>;
|
|
906
|
+
declare function setKaTeXCache(content: string, displayMode: boolean, html: string): void;
|
|
907
|
+
/**
|
|
908
|
+
* Utilities for clients to inspect/adjust worker load behavior
|
|
909
|
+
*/
|
|
910
|
+
declare function getKaTeXWorkerLoad(): {
|
|
911
|
+
inFlight: number;
|
|
912
|
+
max: number;
|
|
913
|
+
};
|
|
914
|
+
declare function setKaTeXWorkerMaxConcurrency(n: number): void;
|
|
915
|
+
declare const WORKER_BUSY_CODE = "WORKER_BUSY";
|
|
916
|
+
declare function isKaTeXWorkerBusy(): boolean;
|
|
917
|
+
declare function waitForKaTeXWorkerSlot(timeout?: number, signal?: AbortSignal): Promise<void>;
|
|
918
|
+
interface BackpressureOptions {
|
|
919
|
+
timeout?: number;
|
|
920
|
+
waitTimeout?: number;
|
|
921
|
+
backoffMs?: number;
|
|
922
|
+
maxRetries?: number;
|
|
923
|
+
signal?: AbortSignal;
|
|
924
|
+
}
|
|
925
|
+
declare const defaultBackpressure: {
|
|
926
|
+
timeout: number;
|
|
927
|
+
waitTimeout: number;
|
|
928
|
+
backoffMs: number;
|
|
929
|
+
maxRetries: number;
|
|
930
|
+
};
|
|
931
|
+
declare function setKaTeXBackpressureDefaults(opts: Partial<typeof defaultBackpressure>): void;
|
|
932
|
+
declare function getKaTeXBackpressureDefaults(): {
|
|
933
|
+
timeout: number;
|
|
934
|
+
waitTimeout: number;
|
|
935
|
+
backoffMs: number;
|
|
936
|
+
maxRetries: number;
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* Convenience wrapper: when worker reports busy, wait for a slot and retry.
|
|
940
|
+
* Does not implement fallback-to-main-thread; leave that to the caller.
|
|
941
|
+
*/
|
|
942
|
+
declare function renderKaTeXWithBackpressure(content: string, displayMode?: boolean, opts?: BackpressureOptions): Promise<string>;
|
|
943
|
+
|
|
944
|
+
type Theme = 'light' | 'dark';
|
|
945
|
+
declare function setMermaidWorkerClientDebug(enabled: boolean): void;
|
|
946
|
+
declare function setMermaidWorkerMaxConcurrency(n: number): void;
|
|
947
|
+
declare function getMermaidWorkerLoad(): {
|
|
948
|
+
inFlight: number;
|
|
949
|
+
max: number;
|
|
950
|
+
};
|
|
951
|
+
declare const MERMAID_WORKER_BUSY_CODE = "WORKER_BUSY";
|
|
952
|
+
/**
|
|
953
|
+
* Allow user to inject a Worker instance, e.g. from Vite ?worker import.
|
|
954
|
+
*/
|
|
955
|
+
declare function setMermaidWorker(w: Worker): void;
|
|
956
|
+
/**
|
|
957
|
+
* Remove the current worker instance (for cleanup or SSR).
|
|
958
|
+
*/
|
|
959
|
+
declare function clearMermaidWorker(): void;
|
|
960
|
+
declare function canParseOffthread(code: string, theme: Theme, timeout?: number): Promise<boolean>;
|
|
961
|
+
declare function findPrefixOffthread(code: string, theme: Theme, timeout?: number): Promise<string>;
|
|
962
|
+
declare function terminateWorker(): void;
|
|
963
|
+
|
|
964
|
+
declare const VueRendererMarkdown: Plugin;
|
|
965
|
+
|
|
966
|
+
export { _default$u as AdmonitionNode, BackpressureOptions, _default$t as BlockquoteNode, _default$s as CheckboxNode, _default$r as CodeBlockNode, _default$q as DefinitionListNode, _default$p as EmojiNode, _default$o as FootnoteNode, _default$n as FootnoteReferenceNode, _default$m as HardBreakNode, _HeadingNode as HeadingNode, _default$l as HighlightNode, _default$k as ImageNode, _default$j as InlineCodeNode, _default$i as InsertNode, LanguageIconResolver, _default$h as LinkNode, _default$g as ListItemNode, _default$f as ListNode, MERMAID_WORKER_BUSY_CODE, _default$e as MarkdownCodeBlockNode, _default$a as MarkdownRender, _default$d as MathBlockNode, _default$c as MathInlineNode, _default$b as MermaidBlockNode, _default$9 as ParagraphNode, _default$8 as PreCodeNode, _default$7 as ReferenceNode, _default$6 as StrikethroughNode, _default$5 as StrongNode, _default$4 as SubscriptNode, _default$3 as SuperscriptNode, _default$2 as TableNode, _default$1 as TextNode, _default as ThematicBreakNode, VueRendererMarkdown, WORKER_BUSY_CODE, canParseOffthread, clearGlobalCustomComponents, clearKaTeXWorker, clearMermaidWorker, _default$a as default, findPrefixOffthread, getCustomNodeComponents, getKaTeXBackpressureDefaults, getKaTeXWorkerLoad, getLanguageIcon, getMermaidWorkerLoad, getUseMonaco, isKaTeXWorkerBusy, languageMap, removeCustomComponents, renderKaTeXInWorker, renderKaTeXWithBackpressure, setCustomComponents, setDefaultI18nMap, setKaTeXBackpressureDefaults, setKaTeXCache, setKaTeXWorker, setKaTeXWorkerDebug, setKaTeXWorkerMaxConcurrency, setLanguageIconResolver, setMermaidWorker, setMermaidWorkerClientDebug, setMermaidWorkerMaxConcurrency, terminateWorker, waitForKaTeXWorkerSlot };
|