vue-stream-markdown 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{blockquote-CVFraiyL.js → blockquote-Crr-D7fY.js} +6 -2
- package/dist/{break-CzrM3nW0.js → break-DoDPjOA0.js} +4 -0
- package/dist/{button-CWSGNZmd.js → button-DVWlhfQ9.js} +2 -2
- package/dist/button-Dw4uJRaD.js +6 -0
- package/dist/{code-DwwmPoup.js → code-Bz8LM16H.js} +14 -10
- package/dist/code-block-Bitp8x1w.js +10 -0
- package/dist/{code-block-XfHjZodV.js → code-block-CmUZxKNr.js} +14 -9
- package/dist/{composables-BMXMKLLj.js → composables-CzUVrTt_.js} +14 -2
- package/dist/{delete-BRwEUU72.js → delete-DFoiOzHW.js} +6 -2
- package/dist/dropdown-CSRjqK0u.js +6 -0
- package/dist/{emphasis-DblyP-Vp.js → emphasis-DvaBuxeK.js} +6 -2
- package/dist/{error-component-CckClFee.js → error-component-BTe-SuY7.js} +2 -2
- package/dist/error-component-DDnC0bqw.js +5 -0
- package/dist/{footnote-definition-BvZNKSLa.js → footnote-definition-ByWh1N3S.js} +9 -5
- package/dist/{footnote-reference-DvAxMjRZ.js → footnote-reference-BJ4J7BFo.js} +5 -1
- package/dist/{heading-g87txbB0.js → heading-1fssqGGO.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-DE3AzDqz.js +4 -0
- package/dist/{icon-CpKYt1dR.js → icon-DcLTFhFW.js} +1 -1
- package/dist/{image-Dwe5A7RP.js → image-DXnmoID_.js} +4 -4
- package/dist/image-Dl-r78_E.js +9 -0
- package/dist/{image-CR28eDok.js → image-xPrAKT9D.js} +12 -8
- package/dist/index.css +130 -144
- package/dist/index.d.ts +170 -144
- package/dist/index.js +334 -219
- package/dist/{inline-code-E5uGvmnx.js → inline-code-B5lfHACE.js} +4 -0
- package/dist/{inline-math-BHDNxQ5R.js → inline-math-CPkpjl8t.js} +7 -3
- package/dist/{link-BiA46FMM.js → link-BACrkxRW.js} +8 -4
- package/dist/{list-D7QyoGUy.js → list-Cu8G46hK.js} +6 -2
- package/dist/{list-item-Cv8l3Ufd.js → list-item-BMgDS1tS.js} +6 -2
- package/dist/{math-BzuYH4PG.js → math-XsZX0VMw.js} +7 -3
- package/dist/{mermaid-BoiSJ4fF.js → mermaid-CQdSlhqn.js} +22 -8
- package/dist/{modal-DHGxvCt5.js → modal-C1riNMrs.js} +8 -5
- package/dist/modal-C7O4jt5-.js +4 -0
- package/dist/{node-list-D6zJX92N.js → node-list-7H-lIfUX.js} +10 -2
- package/dist/node-list-DMwAmH_n.js +4 -0
- package/dist/{paragraph-YTqe84Bm.js → paragraph-Cfd37HUK.js} +6 -2
- package/dist/previewers-C7PKsIbc.js +10 -0
- package/dist/segmented-BRTZXoDN.js +7 -0
- package/dist/{segmented-DDQZGL7l.js → segmented-C9j-IIDc.js} +1 -1
- package/dist/{shiki-DDfRFzy0.js → shiki-BoBbCakv.js} +7 -3
- package/dist/{strong-nPwCJEKq.js → strong-BzOBAWrG.js} +6 -2
- package/dist/{table-Dtpd-MnT.js → table-YY5M01Jm.js} +9 -5
- 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-C4RiUZwy.js → tooltip-DarhJuZR.js} +3 -2
- package/dist/tooltip-vDDEbLwf.js +4 -0
- package/dist/vanilla-CzQw2_b4.js +4 -0
- package/dist/{vanilla-NR7MOE5P.js → vanilla-Z6d1vQmX.js} +1 -1
- package/dist/{yaml-DP0yfJyS.js → yaml-DL5ozHZ_.js} +4 -0
- package/dist/{zoom-container-CqZQ4X6w.js → zoom-container-DQMpHHGQ.js} +33 -9
- package/dist/zoom-container-JLbwB4gy.js +7 -0
- package/package.json +2 -1
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as useMathRenderer } from "./composables-
|
|
2
|
-
import "./icon-
|
|
3
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { g as useMathRenderer } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import "./icon-DcLTFhFW.js";
|
|
3
|
+
import { t as error_component_default } from "./error-component-BTe-SuY7.js";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/renderers/inline-math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -56,6 +56,10 @@ var inline_math_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
56
56
|
type: Object,
|
|
57
57
|
required: false
|
|
58
58
|
},
|
|
59
|
+
uiOptions: {
|
|
60
|
+
type: Object,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
59
63
|
isDark: {
|
|
60
64
|
type: Boolean,
|
|
61
65
|
required: false
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as useSanitizers } from "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
3
|
-
import "./icon-
|
|
4
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { i as useSanitizers } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
|
+
import "./icon-DcLTFhFW.js";
|
|
4
|
+
import { t as error_component_default } from "./error-component-BTe-SuY7.js";
|
|
5
5
|
import { computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref, withCtx } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/components/renderers/link.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -57,6 +57,10 @@ var link_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
57
57
|
type: Object,
|
|
58
58
|
required: false
|
|
59
59
|
},
|
|
60
|
+
uiOptions: {
|
|
61
|
+
type: Object,
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
60
64
|
isDark: {
|
|
61
65
|
type: Boolean,
|
|
62
66
|
required: false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
3
|
import { computed, createBlock, createVNode, defineComponent, mergeProps, openBlock, resolveDynamicComponent, withCtx } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/list.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -54,6 +54,10 @@ var list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
54
54
|
type: Object,
|
|
55
55
|
required: false
|
|
56
56
|
},
|
|
57
|
+
uiOptions: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
57
61
|
isDark: {
|
|
58
62
|
type: Boolean,
|
|
59
63
|
required: false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/list-item.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -60,6 +60,10 @@ var list_item_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
60
60
|
type: Object,
|
|
61
61
|
required: false
|
|
62
62
|
},
|
|
63
|
+
uiOptions: {
|
|
64
|
+
type: Object,
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
63
67
|
isDark: {
|
|
64
68
|
type: Boolean,
|
|
65
69
|
required: false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as useMathRenderer } from "./composables-
|
|
2
|
-
import "./icon-
|
|
3
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { g as useMathRenderer } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import "./icon-DcLTFhFW.js";
|
|
3
|
+
import { t as error_component_default } from "./error-component-BTe-SuY7.js";
|
|
4
4
|
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, resolveDynamicComponent, toRefs, unref } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/renderers/math.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -56,6 +56,10 @@ var math_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
56
56
|
type: Object,
|
|
57
57
|
required: false
|
|
58
58
|
},
|
|
59
|
+
uiOptions: {
|
|
60
|
+
type: Object,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
59
63
|
isDark: {
|
|
60
64
|
type: Boolean,
|
|
61
65
|
required: false
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as useControls, _ as throttle, m as useMermaid } from "./composables-
|
|
2
|
-
import "./tooltip-
|
|
3
|
-
import { t as button_default } from "./button-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { t as error_component_default } from "./error-component-
|
|
6
|
-
import { t as zoom_container_default } from "./zoom-container-
|
|
1
|
+
import { G as useControls, _ as throttle, m as useMermaid } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import "./tooltip-DarhJuZR.js";
|
|
3
|
+
import { t as button_default } from "./button-DVWlhfQ9.js";
|
|
4
|
+
import "./icon-DcLTFhFW.js";
|
|
5
|
+
import { t as error_component_default } from "./error-component-BTe-SuY7.js";
|
|
6
|
+
import { t as zoom_container_default } from "./zoom-container-DQMpHHGQ.js";
|
|
7
7
|
import { t as spin_default } from "./spin-DzERwGWy.js";
|
|
8
8
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, nextTick, normalizeStyle, openBlock, ref, renderList, resolveDynamicComponent, toRefs, watch, withCtx } from "vue";
|
|
9
9
|
import { useResizeObserver } from "@vueuse/core";
|
|
@@ -61,10 +61,19 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
61
61
|
type: Object,
|
|
62
62
|
required: false
|
|
63
63
|
},
|
|
64
|
+
uiOptions: {
|
|
65
|
+
type: Object,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
64
68
|
isDark: {
|
|
65
69
|
type: Boolean,
|
|
66
70
|
required: false
|
|
67
71
|
},
|
|
72
|
+
interactive: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
required: false,
|
|
75
|
+
default: true
|
|
76
|
+
},
|
|
68
77
|
throttle: {
|
|
69
78
|
type: Number,
|
|
70
79
|
required: false,
|
|
@@ -198,7 +207,8 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
198
207
|
"show-icon": false
|
|
199
208
|
}), null, 16, ["message"]))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, {
|
|
200
209
|
"show-control": showControl.value,
|
|
201
|
-
position: controlPosition.value
|
|
210
|
+
position: controlPosition.value,
|
|
211
|
+
interactive: __props.interactive
|
|
202
212
|
}, {
|
|
203
213
|
controls: withCtx((buttonProps) => [(openBlock(true), createElementBlock(Fragment, null, renderList(mermaidControls.value, (item) => {
|
|
204
214
|
return openBlock(), createBlock(button_default, mergeProps({ ref_for: true }, {
|
|
@@ -214,7 +224,11 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
214
224
|
innerHTML: svg.value
|
|
215
225
|
}, null, 8, _hoisted_1)]),
|
|
216
226
|
_: 1
|
|
217
|
-
}, 8, [
|
|
227
|
+
}, 8, [
|
|
228
|
+
"show-control",
|
|
229
|
+
"position",
|
|
230
|
+
"interactive"
|
|
231
|
+
])], 4);
|
|
218
232
|
};
|
|
219
233
|
}
|
|
220
234
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as useContext } from "./composables-
|
|
1
|
+
import { K as useContext, R as isClient } from "./composables-CzUVrTt_.js";
|
|
2
2
|
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useModel, useSlots, withCtx } from "vue";
|
|
3
3
|
import { createReusableTemplate, useEventListener } from "@vueuse/core";
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
14
14
|
zIndex: {
|
|
15
15
|
type: Number,
|
|
16
16
|
required: false,
|
|
17
|
-
default:
|
|
17
|
+
default: 9999
|
|
18
18
|
},
|
|
19
19
|
modalStyle: {
|
|
20
20
|
type: Object,
|
|
@@ -27,7 +27,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
27
27
|
transition: {
|
|
28
28
|
type: String,
|
|
29
29
|
required: false,
|
|
30
|
-
default: "modal"
|
|
30
|
+
default: "stream-markdown-modal"
|
|
31
31
|
},
|
|
32
32
|
close: {
|
|
33
33
|
type: Function,
|
|
@@ -47,13 +47,16 @@ var modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
47
47
|
const slots = useSlots();
|
|
48
48
|
const open = useModel(__props, "open");
|
|
49
49
|
const [DefineTemplate, ReuseTemplate] = createReusableTemplate();
|
|
50
|
-
const {
|
|
51
|
-
const container = computed(() => getContainer() || "body");
|
|
50
|
+
const { getOverlayContainer } = useContext();
|
|
52
51
|
const modalStyle = computed(() => ({
|
|
53
52
|
...props.modalStyle,
|
|
54
53
|
zIndex: props.zIndex
|
|
55
54
|
}));
|
|
56
55
|
const showHeader = computed(() => !!props.title || !!slots.title || !!slots.extra);
|
|
56
|
+
const container = computed(() => {
|
|
57
|
+
if (!isClient()) return "body";
|
|
58
|
+
return getOverlayContainer() || document.body;
|
|
59
|
+
});
|
|
57
60
|
useEventListener(document, "keyup", (event) => {
|
|
58
61
|
if (event.key === "Escape" || event.key === "Esc") if (props.close) props.close();
|
|
59
62
|
else open.value = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as useContext } from "./composables-
|
|
1
|
+
import { K as useContext } from "./composables-CzUVrTt_.js";
|
|
2
2
|
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/markdown.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -54,6 +54,10 @@ var markdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
54
54
|
type: Object,
|
|
55
55
|
required: false
|
|
56
56
|
},
|
|
57
|
+
uiOptions: {
|
|
58
|
+
type: Object,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
57
61
|
isDark: {
|
|
58
62
|
type: Boolean,
|
|
59
63
|
required: false
|
|
@@ -130,6 +134,10 @@ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
130
134
|
type: Object,
|
|
131
135
|
required: false
|
|
132
136
|
},
|
|
137
|
+
uiOptions: {
|
|
138
|
+
type: Object,
|
|
139
|
+
required: false
|
|
140
|
+
},
|
|
133
141
|
isDark: {
|
|
134
142
|
type: Boolean,
|
|
135
143
|
required: false
|
|
@@ -170,7 +178,7 @@ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
170
178
|
return openBlock(true), createElementBlock(Fragment, null, renderList(nodes.value, (item) => {
|
|
171
179
|
return openBlock(), createElementBlock(Fragment, { key: item.key }, [enableTransition.value && !excludeTransition.includes(item.node.type) ? (openBlock(), createBlock(Transition, {
|
|
172
180
|
key: 0,
|
|
173
|
-
name: "typewriter",
|
|
181
|
+
name: "stream-markdown-typewriter",
|
|
174
182
|
appear: ""
|
|
175
183
|
}, {
|
|
176
184
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(getNodeComponent(item.node)), mergeProps({ ref_for: true }, getNodeBindings(item.node), { "node-key": item.key }), null, 16, ["node-key"]))]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
3
|
import { createElementBlock, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/paragraph.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -55,6 +55,10 @@ var paragraph_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
55
55
|
type: Object,
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
|
+
uiOptions: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
58
62
|
isDark: {
|
|
59
63
|
type: Boolean,
|
|
60
64
|
required: false
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineAsyncComponent } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/components/previewers/index.ts
|
|
4
|
+
const CODE_PREVIEWERS = {
|
|
5
|
+
html: defineAsyncComponent(() => import("./html-DfTs9nEm.js")),
|
|
6
|
+
mermaid: defineAsyncComponent(() => import("./mermaid-CQdSlhqn.js"))
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CODE_PREVIEWERS as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as button_default } from "./button-
|
|
1
|
+
import { t as button_default } from "./button-DVWlhfQ9.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,5 +1,5 @@
|
|
|
1
|
-
import { q as useCodeOptions, r as useShiki } from "./composables-
|
|
2
|
-
import { t as vanilla_default } from "./vanilla-
|
|
1
|
+
import { q as useCodeOptions, r as useShiki } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as vanilla_default } from "./vanilla-Z6d1vQmX.js";
|
|
3
3
|
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineAsyncComponent, defineComponent, mergeProps, normalizeStyle, openBlock, ref, toRefs, unref, watch, withCtx } from "vue";
|
|
4
4
|
import { useResizeObserver } from "@vueuse/core";
|
|
5
5
|
|
|
@@ -55,6 +55,10 @@ var shiki_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
55
55
|
type: Object,
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
|
+
uiOptions: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
58
62
|
isDark: {
|
|
59
63
|
type: Boolean,
|
|
60
64
|
required: false
|
|
@@ -96,7 +100,7 @@ var shiki_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
96
100
|
}, { immediate: true });
|
|
97
101
|
return (_ctx, _cache) => {
|
|
98
102
|
return openBlock(), createBlock(Transition, {
|
|
99
|
-
name: "code-
|
|
103
|
+
name: "stream-markdown-code-switch",
|
|
100
104
|
mode: "out-in"
|
|
101
105
|
}, {
|
|
102
106
|
default: withCtx(() => [tokens.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
1
|
+
import "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
3
|
import { createElementBlock, createVNode, defineComponent, mergeProps, openBlock } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/renderers/strong.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -55,6 +55,10 @@ var strong_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
55
55
|
type: Object,
|
|
56
56
|
required: false
|
|
57
57
|
},
|
|
58
|
+
uiOptions: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
58
62
|
isDark: {
|
|
59
63
|
type: Boolean,
|
|
60
64
|
required: false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as tableDataToMarkdown, G as useControls, K as useContext, O as extractTableDataFromElement, V as save, b as useI18n, j as tableDataToTSV, k as tableDataToCSV } from "./composables-
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
3
|
-
import "./tooltip-
|
|
4
|
-
import { t as button_default } from "./button-
|
|
5
|
-
import "./icon-
|
|
1
|
+
import { A as tableDataToMarkdown, G as useControls, K as useContext, O as extractTableDataFromElement, V as save, b as useI18n, j as tableDataToTSV, k as tableDataToCSV } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-7H-lIfUX.js";
|
|
3
|
+
import "./tooltip-DarhJuZR.js";
|
|
4
|
+
import { t as button_default } from "./button-DVWlhfQ9.js";
|
|
5
|
+
import "./icon-DcLTFhFW.js";
|
|
6
6
|
import { t as spin_default } from "./spin-DzERwGWy.js";
|
|
7
7
|
import { t as table_default$1 } from "./table-tZ8TA3cu.js";
|
|
8
8
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, withCtx } from "vue";
|
|
@@ -63,6 +63,10 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
63
63
|
type: Object,
|
|
64
64
|
required: false
|
|
65
65
|
},
|
|
66
|
+
uiOptions: {
|
|
67
|
+
type: Object,
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
66
70
|
isDark: {
|
|
67
71
|
type: Boolean,
|
|
68
72
|
required: false
|
package/dist/theme.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.stream-markdown.light {
|
|
1
|
+
:is(.stream-markdown, .stream-markdown-overlay).light {
|
|
2
2
|
--background: oklch(1 0 0);
|
|
3
3
|
--foreground: oklch(0.141 0.005 285.823);
|
|
4
4
|
--card: oklch(1 0 0);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
--sidebar-ring: oklch(0.708 0 0);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.stream-markdown.dark {
|
|
35
|
+
:is(.stream-markdown, .stream-markdown-overlay).dark {
|
|
36
36
|
--background: oklch(0.141 0.005 285.823);
|
|
37
37
|
--foreground: oklch(0.985 0 0);
|
|
38
38
|
--card: oklch(0.21 0.006 285.885);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as useFloating, K as useContext } from "./composables-
|
|
1
|
+
import { E as useFloating, K as useContext } from "./composables-CzUVrTt_.js";
|
|
2
2
|
import { Fragment, Teleport, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderSlot, toDisplayString, toRefs, unref } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -29,8 +29,9 @@ var tooltip_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
29
29
|
},
|
|
30
30
|
setup(__props, { expose: __expose }) {
|
|
31
31
|
const { placement, delay, trigger } = toRefs(__props);
|
|
32
|
-
const { getContainer } = useContext();
|
|
32
|
+
const { hideTooltip, getContainer } = useContext();
|
|
33
33
|
const { referenceEl: _referenceEl, floatingEl: _floatingEl, open, appendTo, floatingStyle, show, hide, onMouseEnter, onMouseLeave, onClick, onFloatingEnter, onFloatingLeave } = useFloating({
|
|
34
|
+
hideTooltip,
|
|
34
35
|
placement,
|
|
35
36
|
delay,
|
|
36
37
|
trigger,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as useI18n, t as useZoom } from "./composables-
|
|
2
|
-
import { t as button_default } from "./button-
|
|
1
|
+
import { b as useI18n, t as useZoom } from "./composables-CzUVrTt_.js";
|
|
2
|
+
import { t as button_default } from "./button-DVWlhfQ9.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, normalizeStyle, openBlock, ref, renderList, renderSlot, unref, withModifiers } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/zoom-container.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -7,6 +7,11 @@ const _hoisted_1 = { "data-stream-markdown": "zoom-inner" };
|
|
|
7
7
|
var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "zoom-container",
|
|
9
9
|
props: {
|
|
10
|
+
interactive: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: false,
|
|
13
|
+
default: true
|
|
14
|
+
},
|
|
10
15
|
showControl: {
|
|
11
16
|
type: Boolean,
|
|
12
17
|
required: false,
|
|
@@ -99,13 +104,31 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
99
104
|
function onWheel(event) {
|
|
100
105
|
if (containerRef.value) handleWheel(event, containerRef.value);
|
|
101
106
|
}
|
|
107
|
+
function onPointerDown(event) {
|
|
108
|
+
if (!props.interactive) return;
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
startDrag(event);
|
|
111
|
+
}
|
|
112
|
+
function onPointerMove(event) {
|
|
113
|
+
if (!props.interactive) return;
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
onDrag(event);
|
|
116
|
+
}
|
|
117
|
+
function onPointerUp(event) {
|
|
118
|
+
if (!props.interactive) return;
|
|
119
|
+
event.preventDefault();
|
|
120
|
+
stopDrag();
|
|
121
|
+
}
|
|
102
122
|
function onTouchStart(event) {
|
|
123
|
+
if (!props.interactive) return;
|
|
103
124
|
if (containerRef.value) handleTouchStart(event, containerRef.value);
|
|
104
125
|
}
|
|
105
126
|
function onTouchMove(event) {
|
|
127
|
+
if (!props.interactive) return;
|
|
106
128
|
if (containerRef.value) handleTouchMove(event, containerRef.value);
|
|
107
129
|
}
|
|
108
130
|
function onTouchEnd(event) {
|
|
131
|
+
if (!props.interactive) return;
|
|
109
132
|
handleTouchEnd(event);
|
|
110
133
|
}
|
|
111
134
|
return (_ctx, _cache) => {
|
|
@@ -113,16 +136,17 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
113
136
|
ref_key: "containerRef",
|
|
114
137
|
ref: containerRef,
|
|
115
138
|
"data-stream-markdown": "zoom-container",
|
|
139
|
+
style: normalizeStyle({ touchAction: __props.interactive ? "none" : "auto" }),
|
|
116
140
|
onWheel,
|
|
117
141
|
onTouchstart: onTouchStart,
|
|
118
142
|
onTouchmove: onTouchMove,
|
|
119
143
|
onTouchend: onTouchEnd,
|
|
120
|
-
onPointerdown:
|
|
121
|
-
onPointermove:
|
|
122
|
-
onPointerup:
|
|
123
|
-
onPointercancel:
|
|
124
|
-
onPointerleave:
|
|
125
|
-
}, [__props.showControl ? (openBlock(), createElementBlock("div", {
|
|
144
|
+
onPointerdown: onPointerDown,
|
|
145
|
+
onPointermove: onPointerMove,
|
|
146
|
+
onPointerup: onPointerUp,
|
|
147
|
+
onPointercancel: onPointerUp,
|
|
148
|
+
onPointerleave: onPointerUp
|
|
149
|
+
}, [__props.showControl && __props.interactive ? (openBlock(), createElementBlock("div", {
|
|
126
150
|
key: 0,
|
|
127
151
|
"data-stream-markdown": "zoom-controls",
|
|
128
152
|
style: normalizeStyle(controlsPosition.value),
|
|
@@ -140,7 +164,7 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
140
164
|
cursor: unref(isDragging) ? "grabbing" : "grab"
|
|
141
165
|
}),
|
|
142
166
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
143
|
-
}, [renderSlot(_ctx.$slots, "default")], 4)])],
|
|
167
|
+
}, [renderSlot(_ctx.$slots, "default")], 4)])], 36);
|
|
144
168
|
};
|
|
145
169
|
}
|
|
146
170
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-stream-markdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"description": "Streaming markdown output, Useful for text streams like LLM outputs.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@unocss/eslint-plugin": "66.5.9",
|
|
70
70
|
"@unocss/nuxt": "^66.5.10",
|
|
71
71
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
72
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
72
73
|
"@vue/test-utils": "^2.4.6",
|
|
73
74
|
"@vueuse/nuxt": "^14.1.0",
|
|
74
75
|
"bumpp": "^10.3.2",
|
package/dist/button-BFS-gHGF.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./previewers-Cpx1Wqu8.js";
|
|
2
|
-
import "./composables-BMXMKLLj.js";
|
|
3
|
-
import "./tooltip-C4RiUZwy.js";
|
|
4
|
-
import "./button-CWSGNZmd.js";
|
|
5
|
-
import "./icon-CpKYt1dR.js";
|
|
6
|
-
import "./modal-DHGxvCt5.js";
|
|
7
|
-
import { t as code_block_default } from "./code-block-XfHjZodV.js";
|
|
8
|
-
import "./segmented-DDQZGL7l.js";
|
|
9
|
-
|
|
10
|
-
export { code_block_default as default };
|
package/dist/icon-BX3KKloR.js
DELETED
package/dist/image-BtkXhzG1.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./composables-BMXMKLLj.js";
|
|
2
|
-
import "./tooltip-C4RiUZwy.js";
|
|
3
|
-
import "./button-CWSGNZmd.js";
|
|
4
|
-
import "./icon-CpKYt1dR.js";
|
|
5
|
-
import "./modal-DHGxvCt5.js";
|
|
6
|
-
import "./zoom-container-CqZQ4X6w.js";
|
|
7
|
-
import { t as image_default } from "./image-Dwe5A7RP.js";
|
|
8
|
-
|
|
9
|
-
export { image_default as default };
|
package/dist/modal-CFOdkYNj.js
DELETED