vue-stream-markdown 0.2.2 → 0.3.0
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 +5 -1
- package/dist/{blockquote-CVFraiyL.js → blockquote-DTo6zg12.js} +6 -2
- package/dist/{break-CzrM3nW0.js → break-DoDPjOA0.js} +4 -0
- package/dist/button-1EHxh8s2.js +6 -0
- package/dist/{button-CWSGNZmd.js → button-B7H9jKmU.js} +2 -2
- package/dist/{code-DwwmPoup.js → code-DC7KVCvB.js} +14 -10
- package/dist/{code-block-XfHjZodV.js → code-block-DPC1FZT3.js} +26 -13
- package/dist/code-block-DYrPMONb.js +10 -0
- package/dist/{composables-BMXMKLLj.js → composables-BvaSMf02.js} +17 -2
- package/dist/{delete-BRwEUU72.js → delete-xkkM7TML.js} +6 -2
- package/dist/dropdown-Cv_yW4GS.js +6 -0
- package/dist/{emphasis-DblyP-Vp.js → emphasis-BmM30dZi.js} +6 -2
- package/dist/error-component-1U-JNS6o.js +5 -0
- package/dist/{error-component-CckClFee.js → error-component-DFBWdaYB.js} +2 -2
- package/dist/{footnote-definition-BvZNKSLa.js → footnote-definition-6cTbdg-J.js} +9 -5
- package/dist/{footnote-reference-DvAxMjRZ.js → footnote-reference-CxJUg8wT.js} +5 -1
- package/dist/{heading-g87txbB0.js → heading-DQ4lofbm.js} +6 -2
- package/dist/{html-BG83dEZJ.js → html-Be_6ezK6.js} +4 -0
- package/dist/{html-D7bGx0Cz.js → html-DfTs9nEm.js} +4 -0
- package/dist/{icon-CpKYt1dR.js → icon-BJa4ovUe.js} +1 -1
- package/dist/icon-CvIgAOPh.js +4 -0
- package/dist/{image-Dwe5A7RP.js → image-DXu2WF2r.js} +13 -10
- package/dist/image-Dm5xIWs7.js +9 -0
- package/dist/{image-CR28eDok.js → image-e0E51Nc3.js} +21 -12
- package/dist/index.css +130 -144
- package/dist/index.d.ts +211 -148
- package/dist/index.js +452 -247
- package/dist/{inline-code-E5uGvmnx.js → inline-code-B5lfHACE.js} +4 -0
- package/dist/{inline-math-BHDNxQ5R.js → inline-math-BuO_dWPX.js} +7 -3
- package/dist/{link-BiA46FMM.js → link-DyD59DzG.js} +8 -4
- package/dist/{list-D7QyoGUy.js → list-De0KPajx.js} +6 -2
- package/dist/{list-item-Cv8l3Ufd.js → list-item-CuUgvXRC.js} +6 -2
- package/dist/{math-BzuYH4PG.js → math-DnFOOLdz.js} +7 -3
- package/dist/{mermaid-BoiSJ4fF.js → mermaid-ZCQPlRUa.js} +22 -8
- package/dist/modal-B5jFKJL4.js +4 -0
- package/dist/{modal-DHGxvCt5.js → modal-Bhe0iSs6.js} +8 -5
- package/dist/{node-list-D6zJX92N.js → node-list-CWy--Gin.js} +7 -78
- package/dist/node-list-Doh9Z-4p.js +4 -0
- package/dist/{paragraph-YTqe84Bm.js → paragraph-D3H1qprZ.js} +6 -2
- package/dist/previewers-DB2HHDGb.js +10 -0
- package/dist/{segmented-DDQZGL7l.js → segmented-B-kjIOkd.js} +1 -1
- package/dist/segmented-fbmq_xK1.js +7 -0
- package/dist/{shiki-DDfRFzy0.js → shiki-DAu2_FTG.js} +7 -3
- package/dist/{strong-nPwCJEKq.js → strong-BlCQoXCR.js} +6 -2
- package/dist/{table-Dtpd-MnT.js → table-Co_MpK6m.js} +17 -8
- package/dist/{text-CfRWiRE0.js → text-DbHMEN3P.js} +4 -0
- package/dist/{thematic-break-DgOD2KmY.js → thematic-break-CdlhHAEZ.js} +4 -0
- package/dist/theme.css +2 -2
- package/dist/tooltip-70WIAMmC.js +4 -0
- package/dist/{tooltip-C4RiUZwy.js → tooltip-CWv9skVu.js} +3 -2
- package/dist/{vanilla-NR7MOE5P.js → vanilla-D30b-_ch.js} +1 -1
- package/dist/vanilla-DV7fYrnj.js +4 -0
- package/dist/{yaml-DP0yfJyS.js → yaml-DL5ozHZ_.js} +4 -0
- package/dist/{zoom-container-CqZQ4X6w.js → zoom-container-DbeN8U39.js} +33 -9
- package/dist/zoom-container-Dc8N-wuo.js +7 -0
- package/package.json +4 -5
- package/dist/button-BFS-gHGF.js +0 -6
- package/dist/code-block-CTM9VEwA.js +0 -10
- package/dist/dropdown-BQ3uynLf.js +0 -6
- package/dist/error-component-B_Vacrqa.js +0 -5
- package/dist/icon-BX3KKloR.js +0 -4
- package/dist/image-BtkXhzG1.js +0 -9
- package/dist/modal-CFOdkYNj.js +0 -4
- package/dist/node-list-BYDvt6bq.js +0 -4
- package/dist/previewers-Cpx1Wqu8.js +0 -10
- package/dist/segmented-CaVb5_Rp.js +0 -7
- package/dist/tooltip-BIvCaFUj.js +0 -4
- package/dist/vanilla-DfHiHWnr.js +0 -4
- package/dist/zoom-container-DtkZ07v1.js +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue210 from "vue";
|
|
2
2
|
import { CSSProperties, Component, MaybeRef, MaybeRefOrGetter } from "vue";
|
|
3
3
|
import * as _floating_ui_dom0 from "@floating-ui/dom";
|
|
4
4
|
import { Placement } from "@floating-ui/dom";
|
|
5
|
-
import { MarkdownItAsync } from "markdown-it-async";
|
|
6
5
|
import { KatexOptions as KatexOptions$1 } from "katex";
|
|
7
|
-
import remend from "remend";
|
|
8
6
|
import { BuiltinLanguage, BuiltinTheme, BundledLanguage, BundledTheme, CodeToTokensOptions, Highlighter, SpecialLanguage, TokensResult } from "shiki";
|
|
9
7
|
import { Mermaid, MermaidConfig } from "mermaid";
|
|
10
8
|
import { Extension, fromMarkdown } from "mdast-util-from-markdown";
|
|
@@ -103,6 +101,17 @@ type InlineMathNode = Extract<ParsedNode, {
|
|
|
103
101
|
type: 'inlineMath';
|
|
104
102
|
}>;
|
|
105
103
|
//#endregion
|
|
104
|
+
//#region src/types/events.d.ts
|
|
105
|
+
type DownloadEvent = UrlDownloadEvent | ContentDownloadEvent;
|
|
106
|
+
interface UrlDownloadEvent {
|
|
107
|
+
type: 'image';
|
|
108
|
+
url: string;
|
|
109
|
+
}
|
|
110
|
+
interface ContentDownloadEvent {
|
|
111
|
+
type: 'code' | 'mermaid' | 'table';
|
|
112
|
+
content: string;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
106
115
|
//#region src/types/locale.d.ts
|
|
107
116
|
interface LocaleConfig {
|
|
108
117
|
button: {
|
|
@@ -139,7 +148,6 @@ interface Options extends MarkdownParserOptions {
|
|
|
139
148
|
}
|
|
140
149
|
declare class MarkdownParser {
|
|
141
150
|
private mode;
|
|
142
|
-
private md;
|
|
143
151
|
private content;
|
|
144
152
|
private syntaxTree;
|
|
145
153
|
private options;
|
|
@@ -150,7 +158,6 @@ declare class MarkdownParser {
|
|
|
150
158
|
content: string;
|
|
151
159
|
nodes: ParsedNode[];
|
|
152
160
|
};
|
|
153
|
-
markdownToHtml(content: string): string;
|
|
154
161
|
markdownToAst(content: string, loading?: boolean): SyntaxTree;
|
|
155
162
|
astToMarkdown(data: SyntaxTree | ParsedNode): string;
|
|
156
163
|
hasLoadingNode(nodes?: ParsedNode[]): boolean;
|
|
@@ -261,24 +268,24 @@ declare const DEFAULT_HARDEN_OPTIONS: HardenOptions;
|
|
|
261
268
|
//#endregion
|
|
262
269
|
//#region src/constants/icons.d.ts
|
|
263
270
|
declare const ICONS: {
|
|
264
|
-
readonly arrowLeft:
|
|
265
|
-
readonly check:
|
|
266
|
-
readonly code:
|
|
267
|
-
readonly collapse:
|
|
268
|
-
readonly copy:
|
|
269
|
-
readonly cornerDownLeft:
|
|
270
|
-
readonly download:
|
|
271
|
-
readonly error:
|
|
272
|
-
readonly flipHorizontal:
|
|
273
|
-
readonly image:
|
|
274
|
-
readonly link:
|
|
275
|
-
readonly maximize:
|
|
276
|
-
readonly mermaid:
|
|
277
|
-
readonly minimize:
|
|
278
|
-
readonly preview:
|
|
279
|
-
readonly rotateLeft:
|
|
280
|
-
readonly zoomIn:
|
|
281
|
-
readonly zoomOut:
|
|
271
|
+
readonly arrowLeft: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
272
|
+
readonly check: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
273
|
+
readonly code: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
274
|
+
readonly collapse: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
275
|
+
readonly copy: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
276
|
+
readonly cornerDownLeft: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
277
|
+
readonly download: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
278
|
+
readonly error: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
279
|
+
readonly flipHorizontal: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
280
|
+
readonly image: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
281
|
+
readonly link: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
282
|
+
readonly maximize: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
283
|
+
readonly mermaid: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
284
|
+
readonly minimize: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
285
|
+
readonly preview: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
286
|
+
readonly rotateLeft: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
287
|
+
readonly zoomIn: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
288
|
+
readonly zoomOut: vue210.FunctionalComponent<vue210.SVGAttributes, {}, any, {}>;
|
|
282
289
|
};
|
|
283
290
|
//#endregion
|
|
284
291
|
//#region src/constants/preload.d.ts
|
|
@@ -288,6 +295,7 @@ declare const PRELOAD_NODE_RENDERER: BuiltinNodeRenderers[];
|
|
|
288
295
|
declare const SHADCN_SCHEMAS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "border", "input", "ring", "chart-1", "chart-2", "chart-3", "chart-4", "chart-5", "sidebar", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
289
296
|
//#endregion
|
|
290
297
|
//#region src/types/shared.d.ts
|
|
298
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
291
299
|
type BuiltinNodeRenderers = keyof typeof NODE_RENDERERS;
|
|
292
300
|
type BuiltinPreviewers = 'mermaid' | 'html';
|
|
293
301
|
type BuiltinUIComponents = keyof typeof UI;
|
|
@@ -327,6 +335,7 @@ interface StreamMarkdownProps extends StreamMarkdownContext, MarkdownParserOptio
|
|
|
327
335
|
preload?: PreloadConfig;
|
|
328
336
|
locale?: string | LocaleConfig;
|
|
329
337
|
enableAnimate?: boolean;
|
|
338
|
+
beforeDownload?: (event: DownloadEvent) => MaybePromise<boolean>;
|
|
330
339
|
}
|
|
331
340
|
interface PreloadConfig {
|
|
332
341
|
nodeRenderers?: BuiltinNodeRenderers[];
|
|
@@ -337,7 +346,6 @@ interface MarkdownParserOptions {
|
|
|
337
346
|
postNormalize?: (data: SyntaxTree) => SyntaxTree;
|
|
338
347
|
preprocess?: (content: string) => string;
|
|
339
348
|
postprocess?: (data: SyntaxTree) => SyntaxTree;
|
|
340
|
-
extendMarkdownIt?: (md: MarkdownItAsync) => void;
|
|
341
349
|
}
|
|
342
350
|
interface MdastOptions {
|
|
343
351
|
from?: Extension[];
|
|
@@ -353,6 +361,7 @@ interface StreamMarkdownContext {
|
|
|
353
361
|
hardenOptions?: HardenOptions;
|
|
354
362
|
codeOptions?: CodeOptions;
|
|
355
363
|
imageOptions?: ImageOptions;
|
|
364
|
+
uiOptions?: UIOptions;
|
|
356
365
|
isDark?: boolean;
|
|
357
366
|
}
|
|
358
367
|
type TableControlsConfig = boolean | {
|
|
@@ -377,6 +386,12 @@ type ImageControlsConfig = boolean | {
|
|
|
377
386
|
customize?: ControlTransformer<ImageNodeRendererProps>;
|
|
378
387
|
};
|
|
379
388
|
type MermaidControlsConfig = boolean | {
|
|
389
|
+
/**
|
|
390
|
+
* Disable drag/pan in page preview (but keep it in fullscreen preview)
|
|
391
|
+
* Useful for mobile devices where drag interactions can interfere with page scrolling
|
|
392
|
+
* @default true
|
|
393
|
+
*/
|
|
394
|
+
inlineInteractive?: boolean;
|
|
380
395
|
position?: ZoomControlPosition;
|
|
381
396
|
customize?: ControlTransformer<CodeNodeRendererProps>;
|
|
382
397
|
};
|
|
@@ -445,26 +460,34 @@ interface HardenOptions {
|
|
|
445
460
|
allowDataImages?: boolean;
|
|
446
461
|
errorComponent?: Component;
|
|
447
462
|
}
|
|
463
|
+
interface UIOptions {
|
|
464
|
+
/**
|
|
465
|
+
* Hide tooltips triggered by hover (but keep dropdowns triggered by click)
|
|
466
|
+
* Useful for mobile devices where hover interactions don't work well
|
|
467
|
+
* @default false
|
|
468
|
+
*/
|
|
469
|
+
hideTooltip?: boolean;
|
|
470
|
+
}
|
|
448
471
|
//#endregion
|
|
449
472
|
//#region src/components/renderers/index.d.ts
|
|
450
473
|
declare const NODE_RENDERERS: NodeRenderers;
|
|
451
474
|
//#endregion
|
|
452
475
|
//#region src/components/index.d.ts
|
|
453
476
|
declare const UI: {
|
|
454
|
-
readonly Button:
|
|
477
|
+
readonly Button: vue210.DefineComponent<ButtonProps, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {} & {
|
|
455
478
|
click: (event: MouseEvent, item?: SelectOption | undefined) => any;
|
|
456
|
-
}, string,
|
|
479
|
+
}, string, vue210.PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
457
480
|
onClick?: ((event: MouseEvent, item?: SelectOption | undefined) => any) | undefined;
|
|
458
481
|
}>, {
|
|
459
482
|
variant: "icon" | "text";
|
|
460
|
-
buttonStyle:
|
|
483
|
+
buttonStyle: vue210.CSSProperties;
|
|
461
484
|
iconWidth: number;
|
|
462
485
|
iconHeight: number;
|
|
463
|
-
iconStyle:
|
|
486
|
+
iconStyle: vue210.CSSProperties;
|
|
464
487
|
options: SelectOption[];
|
|
465
|
-
}, {}, {}, {}, string,
|
|
488
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
466
489
|
readonly CodeBlock: {
|
|
467
|
-
new (...args: any[]):
|
|
490
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<CodeNodeRendererProps> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, vue210.PublicProps, {}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
468
491
|
P: {};
|
|
469
492
|
B: {};
|
|
470
493
|
D: {};
|
|
@@ -475,7 +498,7 @@ declare const UI: {
|
|
|
475
498
|
__isFragment?: never;
|
|
476
499
|
__isTeleport?: never;
|
|
477
500
|
__isSuspense?: never;
|
|
478
|
-
} &
|
|
501
|
+
} & vue210.ComponentOptionsBase<Readonly<CodeNodeRendererProps> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
479
502
|
$slots: {
|
|
480
503
|
title?: (props: {}) => any;
|
|
481
504
|
} & {
|
|
@@ -487,16 +510,16 @@ declare const UI: {
|
|
|
487
510
|
};
|
|
488
511
|
});
|
|
489
512
|
readonly Dropdown: {
|
|
490
|
-
new (...args: any[]):
|
|
513
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
491
514
|
title?: string;
|
|
492
515
|
options?: SelectOption[];
|
|
493
516
|
}> & Readonly<{
|
|
494
517
|
onClick?: ((event: MouseEvent, item: SelectOption) => any) | undefined;
|
|
495
|
-
}>, {}, {}, {}, {},
|
|
518
|
+
}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {} & {
|
|
496
519
|
click: (event: MouseEvent, item: SelectOption) => any;
|
|
497
|
-
},
|
|
520
|
+
}, vue210.PublicProps, {
|
|
498
521
|
options: SelectOption[];
|
|
499
|
-
}, false, {}, {},
|
|
522
|
+
}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
500
523
|
P: {};
|
|
501
524
|
B: {};
|
|
502
525
|
D: {};
|
|
@@ -514,30 +537,30 @@ declare const UI: {
|
|
|
514
537
|
__isFragment?: never;
|
|
515
538
|
__isTeleport?: never;
|
|
516
539
|
__isSuspense?: never;
|
|
517
|
-
} &
|
|
540
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
518
541
|
title?: string;
|
|
519
542
|
options?: SelectOption[];
|
|
520
543
|
}> & Readonly<{
|
|
521
544
|
onClick?: ((event: MouseEvent, item: SelectOption) => any) | undefined;
|
|
522
|
-
}>, {}, {}, {}, {},
|
|
545
|
+
}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {} & {
|
|
523
546
|
click: (event: MouseEvent, item: SelectOption) => any;
|
|
524
547
|
}, string, {
|
|
525
548
|
options: SelectOption[];
|
|
526
|
-
}, {}, string, {},
|
|
549
|
+
}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
527
550
|
$slots: {
|
|
528
551
|
default?: (props: {}) => any;
|
|
529
552
|
};
|
|
530
553
|
});
|
|
531
554
|
readonly ErrorComponent: {
|
|
532
|
-
new (...args: any[]):
|
|
555
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
533
556
|
variant?: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
534
557
|
showIcon?: boolean;
|
|
535
|
-
icon?: string |
|
|
558
|
+
icon?: string | vue210.Component;
|
|
536
559
|
message?: string;
|
|
537
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
560
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, vue210.PublicProps, {
|
|
538
561
|
variant: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
539
562
|
showIcon: boolean;
|
|
540
|
-
}, false, {}, {},
|
|
563
|
+
}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
541
564
|
P: {};
|
|
542
565
|
B: {};
|
|
543
566
|
D: {};
|
|
@@ -547,7 +570,7 @@ declare const UI: {
|
|
|
547
570
|
}, Readonly<{
|
|
548
571
|
variant?: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
549
572
|
showIcon?: boolean;
|
|
550
|
-
icon?: string |
|
|
573
|
+
icon?: string | vue210.Component;
|
|
551
574
|
message?: string;
|
|
552
575
|
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
553
576
|
variant: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
@@ -556,36 +579,36 @@ declare const UI: {
|
|
|
556
579
|
__isFragment?: never;
|
|
557
580
|
__isTeleport?: never;
|
|
558
581
|
__isSuspense?: never;
|
|
559
|
-
} &
|
|
582
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
560
583
|
variant?: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
561
584
|
showIcon?: boolean;
|
|
562
|
-
icon?: string |
|
|
585
|
+
icon?: string | vue210.Component;
|
|
563
586
|
message?: string;
|
|
564
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
587
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, {
|
|
565
588
|
variant: "image" | "vanilla" | "mermaid" | "katex" | "harden-image" | "harden-link";
|
|
566
589
|
showIcon: boolean;
|
|
567
|
-
}, {}, string, {},
|
|
590
|
+
}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
568
591
|
$slots: {
|
|
569
592
|
default?: (props: {}) => any;
|
|
570
593
|
};
|
|
571
594
|
});
|
|
572
|
-
readonly Icon:
|
|
573
|
-
icon: string |
|
|
595
|
+
readonly Icon: vue210.DefineComponent<{
|
|
596
|
+
icon: string | vue210.Component;
|
|
574
597
|
width?: number;
|
|
575
598
|
height?: number;
|
|
576
599
|
class?: string | string[] | Record<string, unknown>;
|
|
577
|
-
style?:
|
|
578
|
-
}, {}, {}, {}, {},
|
|
579
|
-
icon: string |
|
|
600
|
+
style?: vue210.CSSProperties;
|
|
601
|
+
}, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, vue210.PublicProps, Readonly<{
|
|
602
|
+
icon: string | vue210.Component;
|
|
580
603
|
width?: number;
|
|
581
604
|
height?: number;
|
|
582
605
|
class?: string | string[] | Record<string, unknown>;
|
|
583
|
-
style?:
|
|
606
|
+
style?: vue210.CSSProperties;
|
|
584
607
|
}> & Readonly<{}>, {
|
|
585
608
|
width: number;
|
|
586
609
|
height: number;
|
|
587
|
-
}, {}, {}, {}, string,
|
|
588
|
-
readonly Image:
|
|
610
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
611
|
+
readonly Image: vue210.DefineComponent<{
|
|
589
612
|
src?: string;
|
|
590
613
|
alt?: string;
|
|
591
614
|
title?: string;
|
|
@@ -594,10 +617,11 @@ declare const UI: {
|
|
|
594
617
|
controls?: ControlsConfig;
|
|
595
618
|
transformHardenUrl?: (url: string) => string | null;
|
|
596
619
|
nodeProps: ImageNodeRendererProps;
|
|
597
|
-
|
|
620
|
+
handleDownload?: (url: string) => Promise<void>;
|
|
621
|
+
}, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {} & {
|
|
598
622
|
load: (event: Event) => any;
|
|
599
623
|
error: (event: Event) => any;
|
|
600
|
-
}, string,
|
|
624
|
+
}, string, vue210.PublicProps, Readonly<{
|
|
601
625
|
src?: string;
|
|
602
626
|
alt?: string;
|
|
603
627
|
title?: string;
|
|
@@ -606,6 +630,7 @@ declare const UI: {
|
|
|
606
630
|
controls?: ControlsConfig;
|
|
607
631
|
transformHardenUrl?: (url: string) => string | null;
|
|
608
632
|
nodeProps: ImageNodeRendererProps;
|
|
633
|
+
handleDownload?: (url: string) => Promise<void>;
|
|
609
634
|
}> & Readonly<{
|
|
610
635
|
onLoad?: ((event: Event) => any) | undefined;
|
|
611
636
|
onError?: ((event: Event) => any) | undefined;
|
|
@@ -613,25 +638,25 @@ declare const UI: {
|
|
|
613
638
|
controls: ControlsConfig;
|
|
614
639
|
preview: boolean;
|
|
615
640
|
margin: number;
|
|
616
|
-
}, {}, {}, {}, string,
|
|
641
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
617
642
|
readonly Modal: {
|
|
618
|
-
new (...args: any[]):
|
|
643
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
619
644
|
title?: string;
|
|
620
645
|
zIndex?: number;
|
|
621
|
-
modalStyle?:
|
|
622
|
-
headerStyle?:
|
|
646
|
+
modalStyle?: vue210.CSSProperties;
|
|
647
|
+
headerStyle?: vue210.CSSProperties;
|
|
623
648
|
transition?: string;
|
|
624
649
|
close?: () => void;
|
|
625
650
|
} & {
|
|
626
651
|
open?: boolean;
|
|
627
652
|
}> & Readonly<{
|
|
628
653
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
629
|
-
}>, {}, {}, {}, {},
|
|
654
|
+
}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {
|
|
630
655
|
"update:open": (value: boolean) => any;
|
|
631
|
-
},
|
|
656
|
+
}, vue210.PublicProps, {
|
|
632
657
|
zIndex: number;
|
|
633
658
|
transition: string;
|
|
634
|
-
}, false, {}, {},
|
|
659
|
+
}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
635
660
|
P: {};
|
|
636
661
|
B: {};
|
|
637
662
|
D: {};
|
|
@@ -641,8 +666,8 @@ declare const UI: {
|
|
|
641
666
|
}, Readonly<{
|
|
642
667
|
title?: string;
|
|
643
668
|
zIndex?: number;
|
|
644
|
-
modalStyle?:
|
|
645
|
-
headerStyle?:
|
|
669
|
+
modalStyle?: vue210.CSSProperties;
|
|
670
|
+
headerStyle?: vue210.CSSProperties;
|
|
646
671
|
transition?: string;
|
|
647
672
|
close?: () => void;
|
|
648
673
|
} & {
|
|
@@ -656,23 +681,23 @@ declare const UI: {
|
|
|
656
681
|
__isFragment?: never;
|
|
657
682
|
__isTeleport?: never;
|
|
658
683
|
__isSuspense?: never;
|
|
659
|
-
} &
|
|
684
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
660
685
|
title?: string;
|
|
661
686
|
zIndex?: number;
|
|
662
|
-
modalStyle?:
|
|
663
|
-
headerStyle?:
|
|
687
|
+
modalStyle?: vue210.CSSProperties;
|
|
688
|
+
headerStyle?: vue210.CSSProperties;
|
|
664
689
|
transition?: string;
|
|
665
690
|
close?: () => void;
|
|
666
691
|
} & {
|
|
667
692
|
open?: boolean;
|
|
668
693
|
}> & Readonly<{
|
|
669
694
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
670
|
-
}>, {}, {}, {}, {},
|
|
695
|
+
}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {
|
|
671
696
|
"update:open": (value: boolean) => any;
|
|
672
697
|
}, string, {
|
|
673
698
|
zIndex: number;
|
|
674
699
|
transition: string;
|
|
675
|
-
}, {}, string, {},
|
|
700
|
+
}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
676
701
|
$slots: {
|
|
677
702
|
title?: (props: {}) => any;
|
|
678
703
|
} & {
|
|
@@ -683,39 +708,39 @@ declare const UI: {
|
|
|
683
708
|
default?: (props: {}) => any;
|
|
684
709
|
};
|
|
685
710
|
});
|
|
686
|
-
readonly NodeList:
|
|
711
|
+
readonly NodeList: vue210.DefineComponent<NodeRendererListProps, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, vue210.PublicProps, Readonly<NodeRendererListProps> & Readonly<{}>, {
|
|
687
712
|
nodes: ParsedNode[];
|
|
688
|
-
}, {}, {}, {}, string,
|
|
689
|
-
readonly Segmented:
|
|
713
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
714
|
+
readonly Segmented: vue210.DefineComponent<{
|
|
690
715
|
options?: SelectOption[];
|
|
691
|
-
buttonStyle?:
|
|
716
|
+
buttonStyle?: vue210.CSSProperties;
|
|
692
717
|
} & {
|
|
693
718
|
value?: string;
|
|
694
|
-
}, {}, {}, {}, {},
|
|
719
|
+
}, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {
|
|
695
720
|
"update:value": (value: string) => any;
|
|
696
721
|
} & {
|
|
697
722
|
change: (value: string) => any;
|
|
698
|
-
}, string,
|
|
723
|
+
}, string, vue210.PublicProps, Readonly<{
|
|
699
724
|
options?: SelectOption[];
|
|
700
|
-
buttonStyle?:
|
|
725
|
+
buttonStyle?: vue210.CSSProperties;
|
|
701
726
|
} & {
|
|
702
727
|
value?: string;
|
|
703
728
|
}> & Readonly<{
|
|
704
729
|
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
705
730
|
onChange?: ((value: string) => any) | undefined;
|
|
706
731
|
}>, {
|
|
707
|
-
buttonStyle:
|
|
732
|
+
buttonStyle: vue210.CSSProperties;
|
|
708
733
|
options: SelectOption[];
|
|
709
|
-
}, {}, {}, {}, string,
|
|
710
|
-
readonly Spin:
|
|
734
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
735
|
+
readonly Spin: vue210.DefineComponent<{}, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, vue210.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue210.ComponentProvideOptions, true, {}, any>;
|
|
711
736
|
readonly Table: {
|
|
712
|
-
new (...args: any[]):
|
|
737
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
713
738
|
getAlign?: (index: number) => "left" | "center" | "right";
|
|
714
739
|
headers?: unknown[];
|
|
715
740
|
rows?: Array<{
|
|
716
741
|
children: unknown[];
|
|
717
742
|
}>;
|
|
718
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
743
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, vue210.PublicProps, {}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
719
744
|
P: {};
|
|
720
745
|
B: {};
|
|
721
746
|
D: {};
|
|
@@ -732,13 +757,13 @@ declare const UI: {
|
|
|
732
757
|
__isFragment?: never;
|
|
733
758
|
__isTeleport?: never;
|
|
734
759
|
__isSuspense?: never;
|
|
735
|
-
} &
|
|
760
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
736
761
|
getAlign?: (index: number) => "left" | "center" | "right";
|
|
737
762
|
headers?: unknown[];
|
|
738
763
|
rows?: Array<{
|
|
739
764
|
children: unknown[];
|
|
740
765
|
}>;
|
|
741
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
766
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
742
767
|
$slots: {
|
|
743
768
|
'header-cell'?: (props: {
|
|
744
769
|
cell: unknown;
|
|
@@ -753,7 +778,7 @@ declare const UI: {
|
|
|
753
778
|
};
|
|
754
779
|
});
|
|
755
780
|
readonly Tooltip: {
|
|
756
|
-
new (...args: any[]):
|
|
781
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
757
782
|
content?: string;
|
|
758
783
|
trigger?: "hover" | "click";
|
|
759
784
|
placement?: _floating_ui_dom0.Placement;
|
|
@@ -761,11 +786,11 @@ declare const UI: {
|
|
|
761
786
|
}> & Readonly<{}>, {
|
|
762
787
|
show: () => void;
|
|
763
788
|
hide: () => void;
|
|
764
|
-
}, {}, {}, {},
|
|
789
|
+
}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, vue210.PublicProps, {
|
|
765
790
|
trigger: "hover" | "click";
|
|
766
791
|
placement: _floating_ui_dom0.Placement;
|
|
767
792
|
delay: number | [number, number];
|
|
768
|
-
}, false, {}, {},
|
|
793
|
+
}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
769
794
|
P: {};
|
|
770
795
|
B: {};
|
|
771
796
|
D: {};
|
|
@@ -788,7 +813,7 @@ declare const UI: {
|
|
|
788
813
|
__isFragment?: never;
|
|
789
814
|
__isTeleport?: never;
|
|
790
815
|
__isSuspense?: never;
|
|
791
|
-
} &
|
|
816
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
792
817
|
content?: string;
|
|
793
818
|
trigger?: "hover" | "click";
|
|
794
819
|
placement?: _floating_ui_dom0.Placement;
|
|
@@ -796,11 +821,11 @@ declare const UI: {
|
|
|
796
821
|
}> & Readonly<{}>, {
|
|
797
822
|
show: () => void;
|
|
798
823
|
hide: () => void;
|
|
799
|
-
}, {}, {}, {},
|
|
824
|
+
}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, {
|
|
800
825
|
trigger: "hover" | "click";
|
|
801
826
|
placement: _floating_ui_dom0.Placement;
|
|
802
827
|
delay: number | [number, number];
|
|
803
|
-
}, {}, string, {},
|
|
828
|
+
}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
804
829
|
$slots: {
|
|
805
830
|
default?: (props: {}) => any;
|
|
806
831
|
} & {
|
|
@@ -808,17 +833,19 @@ declare const UI: {
|
|
|
808
833
|
};
|
|
809
834
|
});
|
|
810
835
|
readonly ZoomContainer: {
|
|
811
|
-
new (...args: any[]):
|
|
836
|
+
new (...args: any[]): vue210.CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
837
|
+
interactive?: boolean;
|
|
812
838
|
showControl?: boolean;
|
|
813
839
|
controlSize?: "vanilla" | "large";
|
|
814
840
|
position?: ZoomControlPosition;
|
|
815
|
-
containerStyle?:
|
|
816
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
841
|
+
containerStyle?: vue210.CSSProperties;
|
|
842
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, vue210.PublicProps, {
|
|
843
|
+
interactive: boolean;
|
|
817
844
|
showControl: boolean;
|
|
818
845
|
controlSize: "vanilla" | "large";
|
|
819
846
|
position: ZoomControlPosition;
|
|
820
|
-
containerStyle:
|
|
821
|
-
}, false, {}, {},
|
|
847
|
+
containerStyle: vue210.CSSProperties;
|
|
848
|
+
}, false, {}, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, {}, any, vue210.ComponentProvideOptions, {
|
|
822
849
|
P: {};
|
|
823
850
|
B: {};
|
|
824
851
|
D: {};
|
|
@@ -826,30 +853,34 @@ declare const UI: {
|
|
|
826
853
|
M: {};
|
|
827
854
|
Defaults: {};
|
|
828
855
|
}, Readonly<{
|
|
856
|
+
interactive?: boolean;
|
|
829
857
|
showControl?: boolean;
|
|
830
858
|
controlSize?: "vanilla" | "large";
|
|
831
859
|
position?: ZoomControlPosition;
|
|
832
|
-
containerStyle?:
|
|
860
|
+
containerStyle?: vue210.CSSProperties;
|
|
833
861
|
}> & Readonly<{}>, {}, {}, {}, {}, {
|
|
862
|
+
interactive: boolean;
|
|
834
863
|
showControl: boolean;
|
|
835
864
|
controlSize: "vanilla" | "large";
|
|
836
865
|
position: ZoomControlPosition;
|
|
837
|
-
containerStyle:
|
|
866
|
+
containerStyle: vue210.CSSProperties;
|
|
838
867
|
}>;
|
|
839
868
|
__isFragment?: never;
|
|
840
869
|
__isTeleport?: never;
|
|
841
870
|
__isSuspense?: never;
|
|
842
|
-
} &
|
|
871
|
+
} & vue210.ComponentOptionsBase<Readonly<{
|
|
872
|
+
interactive?: boolean;
|
|
843
873
|
showControl?: boolean;
|
|
844
874
|
controlSize?: "vanilla" | "large";
|
|
845
875
|
position?: ZoomControlPosition;
|
|
846
|
-
containerStyle?:
|
|
847
|
-
}> & Readonly<{}>, {}, {}, {}, {},
|
|
876
|
+
containerStyle?: vue210.CSSProperties;
|
|
877
|
+
}> & Readonly<{}>, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, {
|
|
878
|
+
interactive: boolean;
|
|
848
879
|
showControl: boolean;
|
|
849
880
|
controlSize: "vanilla" | "large";
|
|
850
881
|
position: ZoomControlPosition;
|
|
851
|
-
containerStyle:
|
|
852
|
-
}, {}, string, {},
|
|
882
|
+
containerStyle: vue210.CSSProperties;
|
|
883
|
+
}, {}, string, {}, vue210.GlobalComponents, vue210.GlobalDirectives, string, vue210.ComponentProvideOptions> & vue210.VNodeProps & vue210.AllowedComponentProps & vue210.ComponentCustomProps & (new () => {
|
|
853
884
|
$slots: {
|
|
854
885
|
controls?: (props: {
|
|
855
886
|
iconWidth?: undefined;
|
|
@@ -874,38 +905,44 @@ interface UseCodeOptionsOptions {
|
|
|
874
905
|
language?: MaybeRef<string>;
|
|
875
906
|
}
|
|
876
907
|
declare function useCodeOptions(options: UseCodeOptionsOptions): {
|
|
877
|
-
languageCodeOptions:
|
|
878
|
-
languageIcon?: boolean |
|
|
908
|
+
languageCodeOptions: vue210.ComputedRef<{
|
|
909
|
+
languageIcon?: boolean | vue210.Component | undefined;
|
|
879
910
|
language?: Record<string, CodeOptionsLanguage>;
|
|
880
911
|
languageName?: boolean;
|
|
881
912
|
lineNumbers?: boolean;
|
|
882
913
|
maxHeight?: number | string;
|
|
883
914
|
}>;
|
|
884
|
-
showLanguageIcon:
|
|
885
|
-
showLanguageName:
|
|
886
|
-
showLineNumbers:
|
|
915
|
+
showLanguageIcon: vue210.ComputedRef<boolean>;
|
|
916
|
+
showLanguageName: vue210.ComputedRef<boolean>;
|
|
917
|
+
showLineNumbers: vue210.ComputedRef<boolean>;
|
|
887
918
|
};
|
|
888
919
|
//#endregion
|
|
889
920
|
//#region src/composables/use-context.d.ts
|
|
890
921
|
interface Context {
|
|
891
922
|
mode?: MaybeRef<'static' | 'streaming'>;
|
|
892
923
|
isDark?: MaybeRef<boolean>;
|
|
924
|
+
uiOptions?: MaybeRef<UIOptions | undefined>;
|
|
893
925
|
icons?: MaybeRef<Icons>;
|
|
894
926
|
enableAnimate?: MaybeRef<boolean | undefined>;
|
|
895
927
|
parsedNodes?: MaybeRef<ParsedNode[]>;
|
|
896
928
|
getContainer?: () => HTMLElement | undefined;
|
|
929
|
+
getOverlayContainer?: () => Element | null;
|
|
930
|
+
beforeDownload?: StreamMarkdownProps['beforeDownload'];
|
|
897
931
|
onCopied?: (content: string) => void;
|
|
898
932
|
}
|
|
899
933
|
declare function useContext(): {
|
|
900
934
|
context: Context;
|
|
901
935
|
provideContext: (ctx: Partial<Context>) => void;
|
|
902
936
|
injectContext: () => Context;
|
|
903
|
-
mode:
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
937
|
+
mode: vue210.ComputedRef<"streaming" | "static">;
|
|
938
|
+
hideTooltip: vue210.ComputedRef<boolean>;
|
|
939
|
+
icons: vue210.ComputedRef<Partial<Icons>>;
|
|
940
|
+
isDark: vue210.ComputedRef<boolean>;
|
|
941
|
+
enableAnimate: vue210.ComputedRef<boolean | undefined>;
|
|
942
|
+
parsedNodes: vue210.ComputedRef<ParsedNode[]>;
|
|
908
943
|
readonly getContainer: () => HTMLElement | undefined;
|
|
944
|
+
readonly getOverlayContainer: () => Element | null;
|
|
945
|
+
readonly beforeDownload: (event: DownloadEvent) => MaybePromise<boolean>;
|
|
909
946
|
readonly onCopied: (content: string) => void;
|
|
910
947
|
};
|
|
911
948
|
//#endregion
|
|
@@ -921,17 +958,18 @@ declare function useControls(options: UseControlsOptions): {
|
|
|
921
958
|
//#endregion
|
|
922
959
|
//#region src/composables/use-floating.d.ts
|
|
923
960
|
interface UseFloatingOptions {
|
|
961
|
+
hideTooltip?: MaybeRef<boolean>;
|
|
924
962
|
trigger?: MaybeRef<'hover' | 'click'>;
|
|
925
963
|
placement?: MaybeRef<Placement>;
|
|
926
964
|
delay?: MaybeRef<number | [number, number]>;
|
|
927
965
|
getContainer?: () => HTMLElement | undefined;
|
|
928
966
|
}
|
|
929
967
|
declare function useFloating(options: UseFloatingOptions): {
|
|
930
|
-
referenceEl:
|
|
931
|
-
floatingEl:
|
|
932
|
-
open:
|
|
933
|
-
appendTo:
|
|
934
|
-
floatingStyle:
|
|
968
|
+
referenceEl: vue210.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
969
|
+
floatingEl: vue210.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
970
|
+
open: vue210.Ref<boolean, boolean>;
|
|
971
|
+
appendTo: vue210.ComputedRef<HTMLElement | "body">;
|
|
972
|
+
floatingStyle: vue210.ComputedRef<{
|
|
935
973
|
position: "absolute" | "fixed";
|
|
936
974
|
top: string;
|
|
937
975
|
left: string;
|
|
@@ -952,7 +990,7 @@ declare function useI18n(): {
|
|
|
952
990
|
//#endregion
|
|
953
991
|
//#region src/composables/use-katex.d.ts
|
|
954
992
|
declare function useKatex(): {
|
|
955
|
-
installed:
|
|
993
|
+
installed: vue210.Ref<boolean, boolean>;
|
|
956
994
|
render: (code: string, options?: KatexOptions$1) => Promise<{
|
|
957
995
|
html?: string;
|
|
958
996
|
error?: string;
|
|
@@ -968,9 +1006,9 @@ interface UseMathRendererOptions {
|
|
|
968
1006
|
throttle?: MaybeRef<number>;
|
|
969
1007
|
}
|
|
970
1008
|
declare function useMathRenderer(options: UseMathRendererOptions): {
|
|
971
|
-
html:
|
|
972
|
-
error:
|
|
973
|
-
errorMessage:
|
|
1009
|
+
html: vue210.Ref<string, string>;
|
|
1010
|
+
error: vue210.ComputedRef<boolean>;
|
|
1011
|
+
errorMessage: vue210.Ref<string, string>;
|
|
974
1012
|
};
|
|
975
1013
|
//#endregion
|
|
976
1014
|
//#region src/composables/use-medium-zoom.d.ts
|
|
@@ -980,12 +1018,12 @@ interface UseMediumZoomOptions {
|
|
|
980
1018
|
close?: () => void;
|
|
981
1019
|
}
|
|
982
1020
|
declare function useMediumZoom(options: UseMediumZoomOptions): {
|
|
983
|
-
isAnimating:
|
|
984
|
-
elementStyle:
|
|
1021
|
+
isAnimating: vue210.Ref<boolean, boolean>;
|
|
1022
|
+
elementStyle: vue210.ComputedRef<{
|
|
985
1023
|
opacity: number;
|
|
986
1024
|
}>;
|
|
987
|
-
elementRef:
|
|
988
|
-
zoomElementRef:
|
|
1025
|
+
elementRef: vue210.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
1026
|
+
zoomElementRef: vue210.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
|
989
1027
|
zoomIn: () => Promise<void>;
|
|
990
1028
|
zoomOut: () => Promise<void>;
|
|
991
1029
|
};
|
|
@@ -996,7 +1034,7 @@ interface UseMermaidOptions {
|
|
|
996
1034
|
isDark?: MaybeRef<boolean>;
|
|
997
1035
|
}
|
|
998
1036
|
declare function useMermaid(options?: UseMermaidOptions): {
|
|
999
|
-
installed:
|
|
1037
|
+
installed: vue210.Ref<boolean, boolean>;
|
|
1000
1038
|
getMermaid: () => Promise<Mermaid>;
|
|
1001
1039
|
parseMermaid: (code: string) => Promise<{
|
|
1002
1040
|
valid: boolean;
|
|
@@ -1020,10 +1058,10 @@ interface UseSanitizersOptions {
|
|
|
1020
1058
|
isImage?: MaybeRef<boolean | undefined>;
|
|
1021
1059
|
}
|
|
1022
1060
|
declare function useSanitizers(options: UseSanitizersOptions): {
|
|
1023
|
-
hardenOptions:
|
|
1061
|
+
hardenOptions: vue210.ComputedRef<HardenOptions>;
|
|
1024
1062
|
transformHardenUrl: (url: string) => string | null;
|
|
1025
|
-
transformedUrl:
|
|
1026
|
-
isHardenUrl:
|
|
1063
|
+
transformedUrl: vue210.ComputedRef<string | null>;
|
|
1064
|
+
isHardenUrl: vue210.ComputedRef<boolean>;
|
|
1027
1065
|
};
|
|
1028
1066
|
//#endregion
|
|
1029
1067
|
//#region src/composables/use-shiki.d.ts
|
|
@@ -1033,7 +1071,7 @@ interface UseShikiOptions {
|
|
|
1033
1071
|
isDark?: MaybeRef<boolean>;
|
|
1034
1072
|
}
|
|
1035
1073
|
declare function useShiki(options?: UseShikiOptions): {
|
|
1036
|
-
installed:
|
|
1074
|
+
installed: vue210.Ref<boolean, boolean>;
|
|
1037
1075
|
getHighlighter: () => Promise<Highlighter>;
|
|
1038
1076
|
codeToTokens: (code: string) => Promise<TokensResult>;
|
|
1039
1077
|
preload: () => Promise<void>;
|
|
@@ -1043,15 +1081,15 @@ declare function useShiki(options?: UseShikiOptions): {
|
|
|
1043
1081
|
//#region src/composables/use-tailwind-v3-theme.d.ts
|
|
1044
1082
|
interface UseTailwindV3ThemeOptions {
|
|
1045
1083
|
element?: MaybeRefOrGetter<HTMLElement | undefined>;
|
|
1046
|
-
styleScope?: MaybeRef<string>;
|
|
1084
|
+
styleScope?: MaybeRef<string | string[]>;
|
|
1047
1085
|
}
|
|
1048
1086
|
declare function useTailwindV3Theme(options: UseTailwindV3ThemeOptions): {
|
|
1049
|
-
element:
|
|
1087
|
+
element: vue210.ComputedRef<Element | undefined>;
|
|
1050
1088
|
id: string;
|
|
1051
|
-
css:
|
|
1089
|
+
css: vue210.ShallowRef<string>;
|
|
1052
1090
|
load: () => void;
|
|
1053
1091
|
unload: () => void;
|
|
1054
|
-
isLoaded: Readonly<
|
|
1092
|
+
isLoaded: Readonly<vue210.ShallowRef<boolean>>;
|
|
1055
1093
|
generateCSS: () => void;
|
|
1056
1094
|
};
|
|
1057
1095
|
//#endregion
|
|
@@ -1071,11 +1109,11 @@ interface ZoomState {
|
|
|
1071
1109
|
translateY: number;
|
|
1072
1110
|
}
|
|
1073
1111
|
declare function useZoom(options?: UseZoomOptions): {
|
|
1074
|
-
zoom:
|
|
1075
|
-
translateX:
|
|
1076
|
-
translateY:
|
|
1077
|
-
isDragging:
|
|
1078
|
-
transformStyle:
|
|
1112
|
+
zoom: vue210.Ref<number, number>;
|
|
1113
|
+
translateX: vue210.Ref<number, number>;
|
|
1114
|
+
translateY: vue210.Ref<number, number>;
|
|
1115
|
+
isDragging: vue210.Ref<boolean, boolean>;
|
|
1116
|
+
transformStyle: vue210.ComputedRef<{
|
|
1079
1117
|
transform: string;
|
|
1080
1118
|
}>;
|
|
1081
1119
|
zoomIn: () => void;
|
|
@@ -1094,16 +1132,16 @@ declare function useZoom(options?: UseZoomOptions): {
|
|
|
1094
1132
|
};
|
|
1095
1133
|
//#endregion
|
|
1096
1134
|
//#region src/index.vue.d.ts
|
|
1097
|
-
declare const __VLS_export:
|
|
1135
|
+
declare const __VLS_export: vue210.DefineComponent<StreamMarkdownProps, {
|
|
1098
1136
|
getMarkdownParser: () => MarkdownParser;
|
|
1099
1137
|
getParsedNodes: () => ParsedNode[];
|
|
1100
1138
|
getProcessedContent: () => string;
|
|
1101
|
-
}, {}, {}, {},
|
|
1139
|
+
}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {} & {
|
|
1102
1140
|
copied: (content: string) => any;
|
|
1103
|
-
}, string,
|
|
1141
|
+
}, string, vue210.PublicProps, Readonly<StreamMarkdownProps> & Readonly<{
|
|
1104
1142
|
onCopied?: ((content: string) => any) | undefined;
|
|
1105
1143
|
}>, {
|
|
1106
|
-
nodeRenderers: Partial<Record<"delete" | "text" | "blockquote" | "break" | "code" | "definition" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "thematicBreak" | "yaml" | "inlineMath" | "math",
|
|
1144
|
+
nodeRenderers: Partial<Record<"delete" | "text" | "blockquote" | "break" | "code" | "definition" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "thematicBreak" | "yaml" | "inlineMath" | "math", vue210.Component>>;
|
|
1107
1145
|
controls: ControlsConfig;
|
|
1108
1146
|
previewers: PreviewerConfig;
|
|
1109
1147
|
isDark: boolean;
|
|
@@ -1112,14 +1150,14 @@ declare const __VLS_export: vue209.DefineComponent<StreamMarkdownProps, {
|
|
|
1112
1150
|
icons: Partial<Icons>;
|
|
1113
1151
|
locale: string | LocaleConfig;
|
|
1114
1152
|
enableAnimate: boolean;
|
|
1115
|
-
}, {}, {}, {}, string,
|
|
1153
|
+
}, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
|
|
1116
1154
|
declare const _default: typeof __VLS_export;
|
|
1117
1155
|
//#endregion
|
|
1118
1156
|
//#region src/locales/index.d.ts
|
|
1119
1157
|
declare const SUPPORT_LANGUAGES: string[];
|
|
1120
1158
|
declare const localesGlob: Record<string, () => Promise<unknown>>;
|
|
1121
|
-
declare const localeMessages:
|
|
1122
|
-
declare const currentLocale:
|
|
1159
|
+
declare const localeMessages: vue210.Ref<LocaleConfig | undefined, LocaleConfig | undefined>;
|
|
1160
|
+
declare const currentLocale: vue210.Ref<string, string>;
|
|
1123
1161
|
declare function loadLocaleMessages(language: string | LocaleConfig): Promise<void>;
|
|
1124
1162
|
//#endregion
|
|
1125
1163
|
//#region src/postprocess/footnote.d.ts
|
|
@@ -1271,6 +1309,31 @@ declare function fixFootnote(content: string): string;
|
|
|
1271
1309
|
*/
|
|
1272
1310
|
declare function fixLink(content: string): string;
|
|
1273
1311
|
//#endregion
|
|
1312
|
+
//#region src/preprocess/math.d.ts
|
|
1313
|
+
/**
|
|
1314
|
+
* Fix unclosed block math ($$) syntax in streaming markdown
|
|
1315
|
+
*
|
|
1316
|
+
* Block math is defined as $$ delimiters on separate lines:
|
|
1317
|
+
* $$
|
|
1318
|
+
* E = mc^2
|
|
1319
|
+
* $$
|
|
1320
|
+
*
|
|
1321
|
+
* This function processes the entire content (not just last paragraph)
|
|
1322
|
+
* because block math can span multiple paragraphs.
|
|
1323
|
+
*
|
|
1324
|
+
* @param content - Markdown content (potentially incomplete in stream mode)
|
|
1325
|
+
* @returns Content with auto-completed block math if needed
|
|
1326
|
+
*
|
|
1327
|
+
* @example
|
|
1328
|
+
* fixMath('$$\nE = mc^2')
|
|
1329
|
+
* // Returns: '$$\nE = mc^2\n$$'
|
|
1330
|
+
*
|
|
1331
|
+
* @example
|
|
1332
|
+
* fixMath('$$\nE = mc^2\n$$')
|
|
1333
|
+
* // Returns: '$$\nE = mc^2\n$$' (no change)
|
|
1334
|
+
*/
|
|
1335
|
+
declare function fixMath(content: string): string;
|
|
1336
|
+
//#endregion
|
|
1274
1337
|
//#region src/preprocess/strong.d.ts
|
|
1275
1338
|
/**
|
|
1276
1339
|
* Fix unclosed strong (** or __) syntax in streaming markdown
|
|
@@ -1417,4 +1480,4 @@ declare function tableDataToTSV(data: TableData): string;
|
|
|
1417
1480
|
declare function escapeMarkdownTableCell(cell: string): string;
|
|
1418
1481
|
declare function tableDataToMarkdown(data: TableData): string;
|
|
1419
1482
|
//#endregion
|
|
1420
|
-
export { BlockquoteNode, BlockquoteNodeRendererProps, BreakNode, BreakNodeRendererProps, BuiltinNodeRenderers, BuiltinPreviewers, BuiltinUIComponents, ButtonProps, CODE_PREVIEWERS, CodeControlsConfig, CodeNode, CodeNodeRendererProps, CodeOptions, CodeOptionsLanguage, Control, ControlTransformer, ControlsConfig, DEFAULT_DARK_THEME, DEFAULT_HARDEN_OPTIONS, DEFAULT_LIGHT_THEME, DefinitionNode, DefinitionNodeRendererProps, DeleteNode, DeleteNodeRendererProps, EmphasisNode, EmphasisNodeRendererProps, FootnoteDefinitionNode, FootnoteDefinitionNodeRendererProps, FootnoteReferenceNode, FootnoteReferenceNodeRendererProps, HardenOptions, HeadingNode, HeadingNodeRendererProps, HtmlNode, HtmlNodeRendererProps, ICONS, IconName, Icons, ImageControlsConfig, ImageNode, ImageNodeRendererProps, ImageOptions, ImageReferenceNode, ImageReferenceNodeRendererProps, InlineCodeNode, InlineCodeNodeRendererProps, InlineMathNode, InlineMathNodeRendererProps, KatexOptions, LANGUAGE_ALIAS, LANGUAGE_EXTENSIONS, LANGUAGE_ICONS, LinkNode, LinkNodeRendererProps, LinkReferenceNode, LinkReferenceNodeRendererProps, ListItemNode, ListItemNodeRendererProps, ListNode, ListNodeRendererProps, LocaleConfig, _default as Markdown, MarkdownParser, MarkdownParserOptions, MathNode, MathNodeRendererProps, MdastOptions, MermaidControlsConfig, MermaidOptions, NODE_RENDERERS, NodeRendererListProps, NodeRendererProps, NodeRenderers, NodeType, OptionalIconName, Options, PRELOAD_NODE_RENDERER, ParagraphNode, ParagraphNodeRendererProps, ParsedNode, PreloadConfig, PreviewSegmentedPlacement, PreviewerConfig, SHADCN_SCHEMAS, SUPPORT_LANGUAGES, SelectOption, ShikiOptions, StreamMarkdownContext, StreamMarkdownProps, StrongNode, StrongNodeRendererProps, SyntaxTree, TableCellNode, TableCellNodeRendererProps, TableControlsConfig, TableData, TableNode, TableNodeRendererProps, TableRowNode, TableRowNodeRendererProps, TextNode, TextNodeRendererProps, ThematicBreakNode, ThematicBreakNodeRendererProps, UI, YamlNode, YamlNodeRendererProps, ZoomControlPosition, codeBlockPattern, crlfPattern, currentLocale, doubleAsteriskPattern, doubleDollarPattern, doubleTildePattern, doubleUnderscorePattern, escapeMarkdownTableCell, extractTableDataFromElement, findLastLeafNode, findNodeParent, fixCode, fixDelete, fixEmphasis, fixFootnote, fixLink, fixStrong, fixTable, fixTaskList, flow, footnoteDefLabelPattern, footnoteDefLinePattern, footnoteDefPattern, footnoteRefLabelPattern, footnoteRefPattern, hasKatex, hasMermaid, hasShiki, incompleteBracketPattern, incompleteFootnoteRefPattern, incompleteLinkTextPattern, incompleteTaskListPattern, incompleteUrlPattern, isClient, isServer, loadLocaleMessages, localeMessages, localesGlob, normalize, postFixFootnote, postFixText, postNormalize, postprocess, preloadAsyncComponents, preprocess, preprocessLaTeX, proprocessContent, quoteIncompleteTaskListPattern, quoteStandaloneDashPattern, quoteTaskListPattern,
|
|
1483
|
+
export { BlockquoteNode, BlockquoteNodeRendererProps, BreakNode, BreakNodeRendererProps, BuiltinNodeRenderers, BuiltinPreviewers, BuiltinUIComponents, ButtonProps, CODE_PREVIEWERS, CodeControlsConfig, CodeNode, CodeNodeRendererProps, CodeOptions, CodeOptionsLanguage, ContentDownloadEvent, Control, ControlTransformer, ControlsConfig, DEFAULT_DARK_THEME, DEFAULT_HARDEN_OPTIONS, DEFAULT_LIGHT_THEME, DefinitionNode, DefinitionNodeRendererProps, DeleteNode, DeleteNodeRendererProps, DownloadEvent, EmphasisNode, EmphasisNodeRendererProps, FootnoteDefinitionNode, FootnoteDefinitionNodeRendererProps, FootnoteReferenceNode, FootnoteReferenceNodeRendererProps, HardenOptions, HeadingNode, HeadingNodeRendererProps, HtmlNode, HtmlNodeRendererProps, ICONS, IconName, Icons, ImageControlsConfig, ImageNode, ImageNodeRendererProps, ImageOptions, ImageReferenceNode, ImageReferenceNodeRendererProps, InlineCodeNode, InlineCodeNodeRendererProps, InlineMathNode, InlineMathNodeRendererProps, KatexOptions, LANGUAGE_ALIAS, LANGUAGE_EXTENSIONS, LANGUAGE_ICONS, LinkNode, LinkNodeRendererProps, LinkReferenceNode, LinkReferenceNodeRendererProps, ListItemNode, ListItemNodeRendererProps, ListNode, ListNodeRendererProps, LocaleConfig, _default as Markdown, MarkdownParser, MarkdownParserOptions, MathNode, MathNodeRendererProps, MaybePromise, MdastOptions, MermaidControlsConfig, MermaidOptions, NODE_RENDERERS, NodeRendererListProps, NodeRendererProps, NodeRenderers, NodeType, OptionalIconName, Options, PRELOAD_NODE_RENDERER, ParagraphNode, ParagraphNodeRendererProps, ParsedNode, PreloadConfig, PreviewSegmentedPlacement, PreviewerConfig, SHADCN_SCHEMAS, SUPPORT_LANGUAGES, SelectOption, ShikiOptions, StreamMarkdownContext, StreamMarkdownProps, StrongNode, StrongNodeRendererProps, SyntaxTree, TableCellNode, TableCellNodeRendererProps, TableControlsConfig, TableData, TableNode, TableNodeRendererProps, TableRowNode, TableRowNodeRendererProps, TextNode, TextNodeRendererProps, ThematicBreakNode, ThematicBreakNodeRendererProps, UI, UIOptions, UrlDownloadEvent, YamlNode, YamlNodeRendererProps, ZoomControlPosition, codeBlockPattern, crlfPattern, currentLocale, doubleAsteriskPattern, doubleDollarPattern, doubleTildePattern, doubleUnderscorePattern, escapeMarkdownTableCell, extractTableDataFromElement, findLastLeafNode, findNodeParent, fixCode, fixDelete, fixEmphasis, fixFootnote, fixLink, fixMath, fixStrong, fixTable, fixTaskList, flow, footnoteDefLabelPattern, footnoteDefLinePattern, footnoteDefPattern, footnoteRefLabelPattern, footnoteRefPattern, hasKatex, hasMermaid, hasShiki, incompleteBracketPattern, incompleteFootnoteRefPattern, incompleteLinkTextPattern, incompleteTaskListPattern, incompleteUrlPattern, isClient, isServer, loadLocaleMessages, localeMessages, localesGlob, normalize, postFixFootnote, postFixText, postNormalize, postprocess, preloadAsyncComponents, preprocess, preprocessLaTeX, proprocessContent, quoteIncompleteTaskListPattern, quoteStandaloneDashPattern, quoteTaskListPattern, save, saveImage, separatorPattern, singleAsteriskPattern, singleBacktickPattern, singleUnderscorePattern, standaloneDashPattern, svgToPngBlob, tableDataToCSV, tableDataToMarkdown, tableDataToTSV, tableRowPattern, taskListPattern, trailingBackticksPattern, trailingStandaloneBracketPattern, trailingStandaloneDashWithNewlinesPattern, trailingWhitespacePattern, transformUrl, tripleBacktickPattern, useCodeOptions, useContext, useControls, useFloating, useI18n, useKatex, useMathRenderer, useMediumZoom, useMermaid, useSanitizers, useShiki, useTailwindV3Theme, useZoom };
|