vue-stream-markdown 0.1.1 → 0.1.2
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 +1 -0
- package/dist/button-DBgeYAZy.js +5 -0
- package/dist/{button-dU2iYZBS.js → button-vKhxUL3C.js} +1 -1
- package/dist/{code-BfJ58lYO.js → code-_dL6Qk0F.js} +7 -7
- package/dist/code-block-DGZ48hb0.js +9 -0
- package/dist/{code-block-CZHD64ft.js → code-block-wYeMwBck.js} +5 -5
- package/dist/{composables-BwAY_BDJ.js → composables-CZ7YmjNl.js} +6 -16
- package/dist/dropdown-DR-uQ215.js +5 -0
- package/dist/error-component-CKCT9gXy.js +4 -0
- package/dist/{error-component-CiIR_1Cg.js → error-component-ChEpOmSX.js} +1 -1
- package/dist/{image-BporCeem.js → image-DB-4Sv8R.js} +4 -4
- package/dist/index.css +633 -8
- package/dist/index.d.ts +28 -28
- package/dist/index.js +15 -15
- package/dist/{inline-math-BfG4600m.js → inline-math-rChhv_1j.js} +2 -2
- package/dist/{link-D-OnakwP.js → link-CJk67Kbh.js} +2 -2
- package/dist/{math-CvKkCYb9.js → math-ZLxqHT_f.js} +2 -2
- package/dist/{mermaid-FgnWaZtT.js → mermaid-CNFU7Pg8.js} +5 -5
- package/dist/{previewers-CoU4RlpQ.js → previewers-CMreQ4TA.js} +1 -1
- package/dist/segmented-63wrfRNo.js +6 -0
- package/dist/{segmented-Baxxk3UJ.js → segmented-RoWxDIP3.js} +1 -1
- package/dist/{shiki-BHOZKGKS.js → shiki-4529WbJJ.js} +1 -1
- package/dist/{table-B__TdLr7.js → table-BmGwZIPR.js} +3 -3
- package/dist/tooltip--rusT8LZ.js +4 -0
- package/dist/{tooltip-CA6Kp7Ek.js → tooltip-KcTe6tBF.js} +1 -1
- package/dist/zoom-container-C-CB2LTY.js +6 -0
- package/dist/{zoom-container-Dlqv-z-t.js → zoom-container-D1Mys9gv.js} +8 -10
- package/package.json +2 -1
- package/dist/blockquote-DFANmQEB.css +0 -13
- package/dist/button-Bz0s_F3s.js +0 -5
- package/dist/button-C12sn_G5.css +0 -24
- package/dist/code-NAXHb0o2.css +0 -4
- package/dist/code-block-BFUXyGQH.js +0 -9
- package/dist/code-block-Bv8s2E8I.css +0 -62
- package/dist/delete-Ci7IJDoT.css +0 -4
- package/dist/dropdown-RWgcV-8w.js +0 -5
- package/dist/emphasis-BseYvUae.css +0 -4
- package/dist/error-component-BIPPxd-M.css +0 -21
- package/dist/error-component-CR9t-T1D.js +0 -4
- package/dist/heading-KxpVX3-u.css +0 -30
- package/dist/html-C5_wsY4-.css +0 -5
- package/dist/image-B77jbMUB.css +0 -46
- package/dist/inline-code-Eo65bj3F.css +0 -12
- package/dist/inline-math-DgBjIrPT.css +0 -7
- package/dist/link-BA_j8di3.css +0 -12
- package/dist/list-CcVBNIly.css +0 -11
- package/dist/list-item-Y6Cphjrp.css +0 -15
- package/dist/math-Cq89zpB6.css +0 -11
- package/dist/mermaid-C9ZUejzK.css +0 -8
- package/dist/modal-CWdgVkH_.css +0 -48
- package/dist/node-list-C9O-A1aZ.css +0 -11
- package/dist/paragraph-wRNmMYAI.css +0 -6
- package/dist/segmented-C0uEAYuJ.js +0 -6
- package/dist/segmented-DLmggl-e.css +0 -8
- package/dist/shiki-CMgjqKKu.css +0 -20
- package/dist/spin-B2FU3Sx6.css +0 -19
- package/dist/strong-DpeQmP2J.css +0 -4
- package/dist/table-BWn_kG8W.css +0 -19
- package/dist/table-CJzlDdmv.css +0 -34
- package/dist/text-D098eCyi.css +0 -5
- package/dist/thematic-break-C5zxgoE9.css +0 -6
- package/dist/tooltip-DAngu9Wp.css +0 -5
- package/dist/tooltip-DoIUaZgq.js +0 -4
- package/dist/vanilla-BZ8bn5Yz.css +0 -4
- package/dist/yaml-McBkYbxI.css +0 -5
- package/dist/zoom-container-BENM7TpV.css +0 -28
- package/dist/zoom-container-BPbftW_I.js +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as vue7 from "vue";
|
|
2
2
|
import { Component, MaybeRef, MaybeRefOrGetter } from "vue";
|
|
3
3
|
import "tippy.js/dist/tippy.css";
|
|
4
4
|
import "tippy.js/themes/light.css";
|
|
@@ -359,7 +359,7 @@ declare function useContext(): {
|
|
|
359
359
|
context: Context;
|
|
360
360
|
provideContext: (ctx: Partial<Context>) => void;
|
|
361
361
|
injectContext: () => Context;
|
|
362
|
-
isDark:
|
|
362
|
+
isDark: vue7.ComputedRef<boolean>;
|
|
363
363
|
readonly getContainer: () => HTMLElement | undefined;
|
|
364
364
|
readonly onCopied: (content: string) => void;
|
|
365
365
|
};
|
|
@@ -381,10 +381,10 @@ interface UseHardenSanitizersOptions {
|
|
|
381
381
|
isImage?: MaybeRef<boolean | undefined>;
|
|
382
382
|
}
|
|
383
383
|
declare function useHardenSanitizers(options: UseHardenSanitizersOptions): {
|
|
384
|
-
hardenOptions:
|
|
384
|
+
hardenOptions: vue7.ComputedRef<HardenOptions>;
|
|
385
385
|
transformHardenUrl: (url: string) => string | null;
|
|
386
|
-
transformedUrl:
|
|
387
|
-
isHardenUrl:
|
|
386
|
+
transformedUrl: vue7.ComputedRef<string | null>;
|
|
387
|
+
isHardenUrl: vue7.ComputedRef<boolean>;
|
|
388
388
|
};
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region src/composables/use-i18n.d.ts
|
|
@@ -394,7 +394,7 @@ declare function useI18n(): {
|
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/composables/use-katex.d.ts
|
|
396
396
|
declare function useKatex(): {
|
|
397
|
-
installed:
|
|
397
|
+
installed: vue7.Ref<boolean, boolean>;
|
|
398
398
|
render: (code: string, options?: KatexOptions$1) => Promise<{
|
|
399
399
|
html?: string;
|
|
400
400
|
error?: string;
|
|
@@ -410,9 +410,9 @@ interface UseMathRendererOptions {
|
|
|
410
410
|
throttle?: MaybeRef<number>;
|
|
411
411
|
}
|
|
412
412
|
declare function useMathRenderer(options: UseMathRendererOptions): {
|
|
413
|
-
html:
|
|
414
|
-
error:
|
|
415
|
-
errorMessage:
|
|
413
|
+
html: vue7.Ref<string, string>;
|
|
414
|
+
error: vue7.ComputedRef<boolean>;
|
|
415
|
+
errorMessage: vue7.Ref<string, string>;
|
|
416
416
|
};
|
|
417
417
|
//#endregion
|
|
418
418
|
//#region src/composables/use-mermaid.d.ts
|
|
@@ -421,7 +421,7 @@ interface UseMermaidOptions {
|
|
|
421
421
|
isDark?: MaybeRef<boolean>;
|
|
422
422
|
}
|
|
423
423
|
declare function useMermaid(options?: UseMermaidOptions): {
|
|
424
|
-
installed:
|
|
424
|
+
installed: vue7.Ref<boolean, boolean>;
|
|
425
425
|
getMermaid: () => Promise<Mermaid>;
|
|
426
426
|
parseMermaid: (code: string) => Promise<boolean>;
|
|
427
427
|
renderMermaid: (code: string) => Promise<string | null>;
|
|
@@ -437,7 +437,7 @@ interface UseShikiOptions {
|
|
|
437
437
|
isDark?: MaybeRef<boolean>;
|
|
438
438
|
}
|
|
439
439
|
declare function useShiki(options?: UseShikiOptions): {
|
|
440
|
-
installed:
|
|
440
|
+
installed: vue7.Ref<boolean, boolean>;
|
|
441
441
|
getHighlighter: () => Promise<Highlighter>;
|
|
442
442
|
codeToTokens: (code: string) => Promise<TokensResult>;
|
|
443
443
|
preload: () => Promise<void>;
|
|
@@ -450,12 +450,12 @@ interface UseTailwindV3ThemeOptions {
|
|
|
450
450
|
styleScope?: MaybeRef<string>;
|
|
451
451
|
}
|
|
452
452
|
declare function useTailwindV3Theme(options: UseTailwindV3ThemeOptions): {
|
|
453
|
-
element:
|
|
453
|
+
element: vue7.ComputedRef<Element | undefined>;
|
|
454
454
|
id: string;
|
|
455
|
-
css:
|
|
455
|
+
css: vue7.ShallowRef<string>;
|
|
456
456
|
load: () => void;
|
|
457
457
|
unload: () => void;
|
|
458
|
-
isLoaded: Readonly<
|
|
458
|
+
isLoaded: Readonly<vue7.ShallowRef<boolean>>;
|
|
459
459
|
generateCSS: () => void;
|
|
460
460
|
};
|
|
461
461
|
//#endregion
|
|
@@ -484,19 +484,19 @@ interface ZoomPanState {
|
|
|
484
484
|
translateY: number;
|
|
485
485
|
}
|
|
486
486
|
declare function useZoom(options?: UseZoomOptions): {
|
|
487
|
-
zoom:
|
|
488
|
-
translateX:
|
|
489
|
-
translateY:
|
|
490
|
-
isDragging:
|
|
491
|
-
transformStyle:
|
|
487
|
+
zoom: vue7.Ref<number, number>;
|
|
488
|
+
translateX: vue7.Ref<number, number>;
|
|
489
|
+
translateY: vue7.Ref<number, number>;
|
|
490
|
+
isDragging: vue7.Ref<boolean, boolean>;
|
|
491
|
+
transformStyle: vue7.ComputedRef<{
|
|
492
492
|
transform: string;
|
|
493
493
|
}>;
|
|
494
494
|
zoomIn: () => void;
|
|
495
495
|
zoomOut: () => void;
|
|
496
496
|
resetZoom: () => void;
|
|
497
497
|
setZoom: (value: number) => void;
|
|
498
|
-
startDrag: (e:
|
|
499
|
-
onDrag: (e:
|
|
498
|
+
startDrag: (e: PointerEvent) => void;
|
|
499
|
+
onDrag: (e: PointerEvent) => void;
|
|
500
500
|
stopDrag: () => void;
|
|
501
501
|
handleWheel: (event: WheelEvent, containerElement: HTMLElement) => void;
|
|
502
502
|
getState: () => ZoomPanState;
|
|
@@ -520,29 +520,29 @@ declare const ICONS: Record<string, Component>;
|
|
|
520
520
|
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"];
|
|
521
521
|
//#endregion
|
|
522
522
|
//#region src/index.vue.d.ts
|
|
523
|
-
declare const __VLS_export:
|
|
523
|
+
declare const __VLS_export: vue7.DefineComponent<StreamMarkdownProps, {
|
|
524
524
|
getMarkdownParser: () => MarkdownParser;
|
|
525
525
|
getParsedNodes: () => ParsedNode[];
|
|
526
|
-
}, {}, {}, {},
|
|
526
|
+
}, {}, {}, {}, vue7.ComponentOptionsMixin, vue7.ComponentOptionsMixin, {} & {
|
|
527
527
|
copied: (content: string) => any;
|
|
528
|
-
}, string,
|
|
528
|
+
}, string, vue7.PublicProps, Readonly<StreamMarkdownProps> & Readonly<{
|
|
529
529
|
onCopied?: ((content: string) => any) | undefined;
|
|
530
530
|
}>, {
|
|
531
531
|
mode: "static" | "streaming";
|
|
532
532
|
content: string;
|
|
533
|
-
nodeRenderers: Partial<Record<"blockquote" | "break" | "code" | "definition" | "delete" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "text" | "thematicBreak" | "yaml" | "inlineMath" | "math",
|
|
533
|
+
nodeRenderers: Partial<Record<"blockquote" | "break" | "code" | "definition" | "delete" | "emphasis" | "footnoteDefinition" | "footnoteReference" | "heading" | "html" | "image" | "imageReference" | "inlineCode" | "link" | "linkReference" | "list" | "listItem" | "paragraph" | "strong" | "table" | "tableCell" | "tableRow" | "text" | "thematicBreak" | "yaml" | "inlineMath" | "math", vue7.Component>>;
|
|
534
534
|
locale: string | LocaleConfig;
|
|
535
535
|
controls: ControlsConfig;
|
|
536
536
|
previewers: PreviewerConfig;
|
|
537
537
|
isDark: boolean;
|
|
538
|
-
}, {}, {}, {}, string,
|
|
538
|
+
}, {}, {}, {}, string, vue7.ComponentProvideOptions, false, {}, any>;
|
|
539
539
|
declare const _default: typeof __VLS_export;
|
|
540
540
|
//#endregion
|
|
541
541
|
//#region src/locales/index.d.ts
|
|
542
542
|
declare const SUPPORT_LANGUAGES: string[];
|
|
543
543
|
declare const localesGlob: Record<string, () => Promise<unknown>>;
|
|
544
|
-
declare const localeMessages:
|
|
545
|
-
declare const currentLocale:
|
|
544
|
+
declare const localeMessages: vue7.Ref<LocaleConfig | undefined, LocaleConfig | undefined>;
|
|
545
|
+
declare const currentLocale: vue7.Ref<string, string>;
|
|
546
546
|
declare function loadLocaleMessages(language: string | LocaleConfig): Promise<void>;
|
|
547
547
|
//#endregion
|
|
548
548
|
//#region src/postprocess/text.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as CODE_PREVIEWERS } from "./previewers-
|
|
2
|
-
import { A as transformUrl, B as useContext, C as findNodeParent, D as flow, E as hasShiki, F as DEFAULT_LIGHT_THEME, I as LANGUAGE_ALIAS, L as LANGUAGE_EXTENSIONS, M as ICONS, N as DEFAULT_HARDEN_OPTIONS, O as save, P as DEFAULT_DARK_THEME, R as LANGUAGE_ICONS, S as findLastLeafNode, T as hasMermaid, _ as escapeMarkdownTableCell, a as useMermaid, b as tableDataToMarkdown, c as _defineProperty, d as SUPPORT_LANGUAGES, f as currentLocale, g as useHardenSanitizers, h as localesGlob, i as useShiki, j as SHADCN_SCHEMAS, k as svgToPngBlob, l as useKatex, m as localeMessages, n as useTippy, o as useMathRenderer, p as loadLocaleMessages, r as useTailwindV3Theme, t as useZoom, u as useI18n, v as extractTableDataFromElement, w as hasKatex, x as tableDataToTSV, y as tableDataToCSV, z as useControls } from "./composables-
|
|
1
|
+
import { t as CODE_PREVIEWERS } from "./previewers-CMreQ4TA.js";
|
|
2
|
+
import { A as transformUrl, B as useContext, C as findNodeParent, D as flow, E as hasShiki, F as DEFAULT_LIGHT_THEME, I as LANGUAGE_ALIAS, L as LANGUAGE_EXTENSIONS, M as ICONS, N as DEFAULT_HARDEN_OPTIONS, O as save, P as DEFAULT_DARK_THEME, R as LANGUAGE_ICONS, S as findLastLeafNode, T as hasMermaid, _ as escapeMarkdownTableCell, a as useMermaid, b as tableDataToMarkdown, c as _defineProperty, d as SUPPORT_LANGUAGES, f as currentLocale, g as useHardenSanitizers, h as localesGlob, i as useShiki, j as SHADCN_SCHEMAS, k as svgToPngBlob, l as useKatex, m as localeMessages, n as useTippy, o as useMathRenderer, p as loadLocaleMessages, r as useTailwindV3Theme, t as useZoom, u as useI18n, v as extractTableDataFromElement, w as hasKatex, x as tableDataToTSV, y as tableDataToCSV, z as useControls } from "./composables-CZ7YmjNl.js";
|
|
3
3
|
import { t as node_list_default } from "./node-list-CGr_EVtn.js";
|
|
4
4
|
import { computed, createElementBlock, createVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeClass, onBeforeUnmount, openBlock, ref, toRefs, unref, watch } from "vue";
|
|
5
5
|
import mediumZoom from "medium-zoom";
|
|
@@ -51,20 +51,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
51
51
|
//#region src/components/renderers/index.ts
|
|
52
52
|
const NODE_RENDERERS = {
|
|
53
53
|
blockquote: defineAsyncComponent(() => import("./blockquote-DdEg2gww.js")),
|
|
54
|
-
code: defineAsyncComponent(() => import("./code-
|
|
54
|
+
code: defineAsyncComponent(() => import("./code-_dL6Qk0F.js")),
|
|
55
55
|
delete: defineAsyncComponent(() => import("./delete-BdWzKJCy.js")),
|
|
56
56
|
emphasis: defineAsyncComponent(() => import("./emphasis-CTuGt1Ok.js")),
|
|
57
57
|
heading: defineAsyncComponent(() => import("./heading-2vpQQtTH.js")),
|
|
58
|
-
image: defineAsyncComponent(() => import("./image-
|
|
58
|
+
image: defineAsyncComponent(() => import("./image-DB-4Sv8R.js")),
|
|
59
59
|
inlineCode: defineAsyncComponent(() => import("./inline-code-CBoqhfz7.js")),
|
|
60
|
-
inlineMath: defineAsyncComponent(() => import("./inline-math-
|
|
61
|
-
link: defineAsyncComponent(() => import("./link-
|
|
60
|
+
inlineMath: defineAsyncComponent(() => import("./inline-math-rChhv_1j.js")),
|
|
61
|
+
link: defineAsyncComponent(() => import("./link-CJk67Kbh.js")),
|
|
62
62
|
list: defineAsyncComponent(() => import("./list-BCiFKGaz.js")),
|
|
63
63
|
listItem: defineAsyncComponent(() => import("./list-item-p-OLUR_9.js")),
|
|
64
|
-
math: defineAsyncComponent(() => import("./math-
|
|
64
|
+
math: defineAsyncComponent(() => import("./math-ZLxqHT_f.js")),
|
|
65
65
|
paragraph: defineAsyncComponent(() => import("./paragraph-DYjqr_Sa.js")),
|
|
66
66
|
strong: defineAsyncComponent(() => import("./strong-CvOjLZiq.js")),
|
|
67
|
-
table: defineAsyncComponent(() => import("./table-
|
|
67
|
+
table: defineAsyncComponent(() => import("./table-BmGwZIPR.js")),
|
|
68
68
|
text: defineAsyncComponent(() => import("./text-DuONUqRA.js")),
|
|
69
69
|
thematicBreak: defineAsyncComponent(() => import("./thematic-break-CcNPEI9Y.js")),
|
|
70
70
|
yaml: defineAsyncComponent(() => import("./yaml-DJHrmzSe.js"))
|
|
@@ -73,17 +73,17 @@ const NODE_RENDERERS = {
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/components/index.ts
|
|
75
75
|
const COMMON_COMPONENTS = {
|
|
76
|
-
Button: defineAsyncComponent(() => import("./button-
|
|
77
|
-
CodeBlock: defineAsyncComponent(() => import("./code-block-
|
|
78
|
-
Dropdown: defineAsyncComponent(() => import("./dropdown-
|
|
79
|
-
ErrorComponent: defineAsyncComponent(() => import("./error-component-
|
|
76
|
+
Button: defineAsyncComponent(() => import("./button-DBgeYAZy.js")),
|
|
77
|
+
CodeBlock: defineAsyncComponent(() => import("./code-block-DGZ48hb0.js")),
|
|
78
|
+
Dropdown: defineAsyncComponent(() => import("./dropdown-DR-uQ215.js")),
|
|
79
|
+
ErrorComponent: defineAsyncComponent(() => import("./error-component-CKCT9gXy.js")),
|
|
80
80
|
Modal: defineAsyncComponent(() => import("./modal-DcpxxDDX.js")),
|
|
81
81
|
NodeList: defineAsyncComponent(() => import("./node-list-lgY1wbfQ.js")),
|
|
82
|
-
Segmented: defineAsyncComponent(() => import("./segmented-
|
|
82
|
+
Segmented: defineAsyncComponent(() => import("./segmented-63wrfRNo.js")),
|
|
83
83
|
Spin: defineAsyncComponent(() => import("./spin-Bz4zGBEo.js")),
|
|
84
84
|
Table: defineAsyncComponent(() => import("./table-CZLbUHiJ.js")),
|
|
85
|
-
Tooltip: defineAsyncComponent(() => import("./tooltip
|
|
86
|
-
ZoomContainer: defineAsyncComponent(() => import("./zoom-container-
|
|
85
|
+
Tooltip: defineAsyncComponent(() => import("./tooltip--rusT8LZ.js")),
|
|
86
|
+
ZoomContainer: defineAsyncComponent(() => import("./zoom-container-C-CB2LTY.js"))
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as useMathRenderer } from "./composables-
|
|
2
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { o as useMathRenderer } from "./composables-CZ7YmjNl.js";
|
|
2
|
+
import { t as error_component_default } from "./error-component-ChEpOmSX.js";
|
|
3
3
|
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/inline-math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as useHardenSanitizers } from "./composables-
|
|
1
|
+
import { g as useHardenSanitizers } from "./composables-CZ7YmjNl.js";
|
|
2
2
|
import { t as node_list_default } from "./node-list-CGr_EVtn.js";
|
|
3
|
-
import { t as error_component_default } from "./error-component-
|
|
3
|
+
import { t as error_component_default } from "./error-component-ChEpOmSX.js";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/renderers/link.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as useMathRenderer } from "./composables-
|
|
2
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { o as useMathRenderer } from "./composables-CZ7YmjNl.js";
|
|
2
|
+
import { t as error_component_default } from "./error-component-ChEpOmSX.js";
|
|
3
3
|
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as useMermaid, s as throttle, z as useControls } from "./composables-
|
|
2
|
-
import "./tooltip-
|
|
3
|
-
import "./button-
|
|
4
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { a as useMermaid, s as throttle, z as useControls } from "./composables-CZ7YmjNl.js";
|
|
2
|
+
import "./tooltip-KcTe6tBF.js";
|
|
3
|
+
import "./button-vKhxUL3C.js";
|
|
4
|
+
import { t as error_component_default } from "./error-component-ChEpOmSX.js";
|
|
5
5
|
import { t as spin_default } from "./spin-Ds5W7qC_.js";
|
|
6
|
-
import { t as zoom_container_default } from "./zoom-container-
|
|
6
|
+
import { t as zoom_container_default } from "./zoom-container-D1Mys9gv.js";
|
|
7
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeStyle, openBlock, ref, resolveDynamicComponent, toRefs, watch, withCtx } from "vue";
|
|
8
8
|
import { useResizeObserver } from "@vueuse/core";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import { defineAsyncComponent } from "vue";
|
|
|
3
3
|
//#region src/components/previewers/index.ts
|
|
4
4
|
const CODE_PREVIEWERS = {
|
|
5
5
|
html: defineAsyncComponent(() => import("./html-DL0PcUXX.js")),
|
|
6
|
-
mermaid: defineAsyncComponent(() => import("./mermaid-
|
|
6
|
+
mermaid: defineAsyncComponent(() => import("./mermaid-CNFU7Pg8.js"))
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as button_default } from "./button-
|
|
1
|
+
import { t as button_default } from "./button-vKhxUL3C.js";
|
|
2
2
|
import { Fragment, createBlock, createElementBlock, defineComponent, mergeModels, openBlock, renderList, useModel } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/segmented.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useShiki } from "./composables-
|
|
1
|
+
import { i as useShiki } from "./composables-CZ7YmjNl.js";
|
|
2
2
|
import { t as vanilla_default } from "./vanilla-DkX6g0dm.js";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeProps, openBlock, ref, toRefs, unref, watch } from "vue";
|
|
4
4
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as useContext, M as ICONS, O as save, b as tableDataToMarkdown, u as useI18n, v as extractTableDataFromElement, x as tableDataToTSV, y as tableDataToCSV, z as useControls } from "./composables-
|
|
1
|
+
import { B as useContext, M as ICONS, O as save, b as tableDataToMarkdown, u as useI18n, v as extractTableDataFromElement, x as tableDataToTSV, y as tableDataToCSV, z as useControls } from "./composables-CZ7YmjNl.js";
|
|
2
2
|
import { t as node_list_default } from "./node-list-CGr_EVtn.js";
|
|
3
|
-
import "./tooltip-
|
|
4
|
-
import { t as button_default } from "./button-
|
|
3
|
+
import "./tooltip-KcTe6tBF.js";
|
|
4
|
+
import { t as button_default } from "./button-vKhxUL3C.js";
|
|
5
5
|
import { t as spin_default } from "./spin-Ds5W7qC_.js";
|
|
6
6
|
import { t as table_default$1 } from "./table-4ec9FVB_.js";
|
|
7
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, withCtx } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as useContext } from "./composables-
|
|
1
|
+
import { B as useContext } from "./composables-CZ7YmjNl.js";
|
|
2
2
|
import { computed, createBlock, createElementVNode, defineComponent, openBlock, ref, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
3
3
|
import { Tippy } from "vue-tippy";
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as ICONS, t as useZoom, u as useI18n } from "./composables-
|
|
2
|
-
import { t as button_default } from "./button-
|
|
3
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot, unref } from "vue";
|
|
1
|
+
import { M as ICONS, t as useZoom, u as useI18n } from "./composables-CZ7YmjNl.js";
|
|
2
|
+
import { t as button_default } from "./button-vKhxUL3C.js";
|
|
3
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot, unref, withModifiers } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/zoom-container.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
const _hoisted_1 = { "data-stream-markdown": "zoom-inner" };
|
|
@@ -54,13 +54,11 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
54
54
|
ref: containerRef,
|
|
55
55
|
"data-stream-markdown": "zoom-container",
|
|
56
56
|
onWheel,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
onTouchmovePassive: _cache[5] || (_cache[5] = (...args) => unref(onDrag) && unref(onDrag)(...args)),
|
|
63
|
-
onTouchendPassive: _cache[6] || (_cache[6] = (...args) => unref(stopDrag) && unref(stopDrag)(...args))
|
|
57
|
+
onPointerdown: _cache[0] || (_cache[0] = withModifiers((...args) => unref(startDrag) && unref(startDrag)(...args), ["prevent"])),
|
|
58
|
+
onPointermove: _cache[1] || (_cache[1] = withModifiers((...args) => unref(onDrag) && unref(onDrag)(...args), ["prevent"])),
|
|
59
|
+
onPointerup: _cache[2] || (_cache[2] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
|
|
60
|
+
onPointercancel: _cache[3] || (_cache[3] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
|
|
61
|
+
onPointerleave: _cache[4] || (_cache[4] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"]))
|
|
64
62
|
}, [__props.showControl ? (openBlock(), createElementBlock("div", {
|
|
65
63
|
key: 0,
|
|
66
64
|
"data-stream-markdown": "zoom-controls",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-stream-markdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"description": "Streaming markdown output, Useful for text streams like LLM outputs.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
26
26
|
".": "./dist/index.js",
|
|
27
|
+
"./index.css": "./dist/index.css",
|
|
27
28
|
"./theme.css": "./dist/theme.css",
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="blockquote"] {
|
|
2
|
-
border-left: 4px solid color-mix(in oklab, var(--muted-foreground) 30%, transparent);
|
|
3
|
-
color: var(--muted-foreground);
|
|
4
|
-
margin-block: 1rem;
|
|
5
|
-
margin-inline: 0;
|
|
6
|
-
padding-left: 1rem;
|
|
7
|
-
font-style: italic;
|
|
8
|
-
position: relative;
|
|
9
|
-
}
|
|
10
|
-
.stream-markdown [data-stream-markdown="blockquote"] p {
|
|
11
|
-
margin-bottom: 0;
|
|
12
|
-
}
|
|
13
|
-
|
package/dist/button-Bz0s_F3s.js
DELETED
package/dist/button-C12sn_G5.css
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="dropdown-overlay"] {
|
|
2
|
-
padding: .25rem;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.stream-markdown [data-stream-markdown="button"] {
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
color: var(--muted-foreground);
|
|
8
|
-
transition-duration: var(--default-transition-duration);
|
|
9
|
-
background-color: #0000;
|
|
10
|
-
border: none;
|
|
11
|
-
border-radius: .375rem;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: .25rem;
|
|
15
|
-
padding: .5rem;
|
|
16
|
-
font-size: .75rem;
|
|
17
|
-
line-height: 1rem;
|
|
18
|
-
display: flex;
|
|
19
|
-
}
|
|
20
|
-
.stream-markdown [data-stream-markdown="button"]:hover {
|
|
21
|
-
color: var(--foreground);
|
|
22
|
-
background-color: var(--accent);
|
|
23
|
-
}
|
|
24
|
-
|
package/dist/code-NAXHb0o2.css
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./previewers-CoU4RlpQ.js";
|
|
2
|
-
import "./composables-BwAY_BDJ.js";
|
|
3
|
-
import "./tooltip-CA6Kp7Ek.js";
|
|
4
|
-
import "./button-dU2iYZBS.js";
|
|
5
|
-
import "./modal-CuQR21UD.js";
|
|
6
|
-
import { t as code_block_default } from "./code-block-CZHD64ft.js";
|
|
7
|
-
import "./segmented-Baxxk3UJ.js";
|
|
8
|
-
|
|
9
|
-
export { code_block_default as default };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="actions"] {
|
|
2
|
-
align-items: center;
|
|
3
|
-
gap: .25rem;
|
|
4
|
-
display: flex;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.stream-markdown [data-stream-markdown="language-title"] {
|
|
8
|
-
align-items: center;
|
|
9
|
-
gap: .5rem;
|
|
10
|
-
display: flex;
|
|
11
|
-
}
|
|
12
|
-
.stream-markdown [data-stream-markdown="language-name"] {
|
|
13
|
-
font-family: var(--font-mono);
|
|
14
|
-
text-transform: lowercase;
|
|
15
|
-
font-size: .875rem;
|
|
16
|
-
line-height: 1.25rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.stream-markdown [data-stream-markdown="code-block"] {
|
|
20
|
-
border: 1px solid var(--border);
|
|
21
|
-
border-radius: .75rem;
|
|
22
|
-
margin-block: 1rem;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
}
|
|
25
|
-
.stream-markdown [data-stream-markdown="code-block"][data-collapsed="true"] [data-stream-markdown="code-block-header"] {
|
|
26
|
-
border-bottom: none;
|
|
27
|
-
}
|
|
28
|
-
.stream-markdown [data-stream-markdown="code-block-header"] {
|
|
29
|
-
border-bottom: 1px solid var(--border);
|
|
30
|
-
background-color: color-mix(in oklab, var(--muted) 80%, transparent);
|
|
31
|
-
color: var(--muted-foreground);
|
|
32
|
-
justify-content: space-between;
|
|
33
|
-
align-items: center;
|
|
34
|
-
padding-block: .375rem;
|
|
35
|
-
padding-inline: 1rem;
|
|
36
|
-
font-size: .875rem;
|
|
37
|
-
line-height: 1.25rem;
|
|
38
|
-
display: flex;
|
|
39
|
-
position: relative;
|
|
40
|
-
}
|
|
41
|
-
@media (max-width: 1024px) {
|
|
42
|
-
.stream-markdown [data-stream-markdown="code-block-header"] {
|
|
43
|
-
padding-inline: .5rem;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.stream-markdown [data-stream-markdown="code-block-content"] {
|
|
47
|
-
overflow: auto;
|
|
48
|
-
}
|
|
49
|
-
.stream-markdown [data-stream-markdown="code-block-header"] > :first-child {
|
|
50
|
-
flex: 1;
|
|
51
|
-
}
|
|
52
|
-
.stream-markdown [data-stream-markdown="code-block-header"] > :last-child {
|
|
53
|
-
flex: 1;
|
|
54
|
-
justify-content: flex-end;
|
|
55
|
-
display: flex;
|
|
56
|
-
}
|
|
57
|
-
.stream-markdown [data-stream-markdown="code-block-header"] > :nth-child(2) {
|
|
58
|
-
position: absolute;
|
|
59
|
-
left: 50%;
|
|
60
|
-
transform: translateX(-50%);
|
|
61
|
-
}
|
|
62
|
-
|
package/dist/delete-Ci7IJDoT.css
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="error-component"] {
|
|
2
|
-
color: var(--muted-foreground);
|
|
3
|
-
font-family: var(--font-mono);
|
|
4
|
-
font-size: .875rem;
|
|
5
|
-
line-height: 1.25rem;
|
|
6
|
-
display: inline-block;
|
|
7
|
-
}
|
|
8
|
-
.stream-markdown [data-stream-markdown="error-component"] span {
|
|
9
|
-
word-break: break-word;
|
|
10
|
-
overflow-wrap: break-word;
|
|
11
|
-
flex: 1;
|
|
12
|
-
min-width: 0;
|
|
13
|
-
}
|
|
14
|
-
.stream-markdown [data-stream-markdown="error-component-icon"] {
|
|
15
|
-
vertical-align: text-bottom;
|
|
16
|
-
align-items: center;
|
|
17
|
-
margin-right: .5rem;
|
|
18
|
-
line-height: 1;
|
|
19
|
-
display: inline-flex;
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="heading-1"], .stream-markdown [data-stream-markdown="heading-2"], .stream-markdown [data-stream-markdown="heading-3"], .stream-markdown [data-stream-markdown="heading-4"], .stream-markdown [data-stream-markdown="heading-5"], .stream-markdown [data-stream-markdown="heading-6"] {
|
|
2
|
-
margin-top: 1.5rem;
|
|
3
|
-
margin-bottom: .5rem;
|
|
4
|
-
font-weight: 600;
|
|
5
|
-
}
|
|
6
|
-
.stream-markdown [data-stream-markdown="heading-1"] {
|
|
7
|
-
font-size: 1.875rem;
|
|
8
|
-
line-height: 2.25rem;
|
|
9
|
-
}
|
|
10
|
-
.stream-markdown [data-stream-markdown="heading-2"] {
|
|
11
|
-
font-size: 1.5rem;
|
|
12
|
-
line-height: 2rem;
|
|
13
|
-
}
|
|
14
|
-
.stream-markdown [data-stream-markdown="heading-3"] {
|
|
15
|
-
font-size: 1.25rem;
|
|
16
|
-
line-height: 1.75rem;
|
|
17
|
-
}
|
|
18
|
-
.stream-markdown [data-stream-markdown="heading-4"] {
|
|
19
|
-
font-size: 1.125rem;
|
|
20
|
-
line-height: 1.75rem;
|
|
21
|
-
}
|
|
22
|
-
.stream-markdown [data-stream-markdown="heading-5"] {
|
|
23
|
-
font-size: 1rem;
|
|
24
|
-
line-height: 1.5rem;
|
|
25
|
-
}
|
|
26
|
-
.stream-markdown [data-stream-markdown="heading-6"] {
|
|
27
|
-
font-size: .875rem;
|
|
28
|
-
line-height: 1.25rem;
|
|
29
|
-
}
|
|
30
|
-
|
package/dist/html-C5_wsY4-.css
DELETED
package/dist/image-B77jbMUB.css
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
.stream-markdown [data-stream-markdown="image-figure"] {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
}
|
|
4
|
-
.stream-markdown [data-stream-markdown="image-wrapper"] {
|
|
5
|
-
text-align: center;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
.stream-markdown [data-stream-markdown="image"] {
|
|
9
|
-
object-fit: contain;
|
|
10
|
-
border-radius: .5rem;
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
height: auto;
|
|
13
|
-
display: block;
|
|
14
|
-
}
|
|
15
|
-
.stream-markdown [data-stream-markdown="image-caption"] {
|
|
16
|
-
text-align: center;
|
|
17
|
-
font-size: .875rem;
|
|
18
|
-
font-style: italic;
|
|
19
|
-
line-height: 1.25rem;
|
|
20
|
-
}
|
|
21
|
-
.stream-markdown [data-stream-markdown="image-mask"] {
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
background-color: #0000001a;
|
|
24
|
-
border-radius: .5rem;
|
|
25
|
-
display: none;
|
|
26
|
-
position: absolute;
|
|
27
|
-
inset: 0;
|
|
28
|
-
}
|
|
29
|
-
.stream-markdown [data-stream-markdown="image-download-button"] {
|
|
30
|
-
pointer-events: all;
|
|
31
|
-
position: absolute;
|
|
32
|
-
bottom: .5rem;
|
|
33
|
-
right: .5rem;
|
|
34
|
-
}
|
|
35
|
-
.stream-markdown .img-switch-enter-active, .stream-markdown .img-switch-leave-active {
|
|
36
|
-
transition: opacity var(--default-transition-duration) ease, transform var(--default-transition-duration) ease;
|
|
37
|
-
}
|
|
38
|
-
.stream-markdown .img-switch-enter-from, .stream-markdown .img-switch-leave-to {
|
|
39
|
-
opacity: 0;
|
|
40
|
-
transform: translateY(6px);
|
|
41
|
-
}
|
|
42
|
-
.stream-markdown .img-switch-enter-to, .stream-markdown .img-switch-leave-from {
|
|
43
|
-
opacity: 1;
|
|
44
|
-
transform: translateY(0);
|
|
45
|
-
}
|
|
46
|
-
|