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
|
@@ -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-BvaSMf02.js";
|
|
2
|
+
import "./icon-BJa4ovUe.js";
|
|
3
|
+
import { t as error_component_default } from "./error-component-DFBWdaYB.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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.js";
|
|
3
|
+
import "./icon-BJa4ovUe.js";
|
|
4
|
+
import { t as error_component_default } from "./error-component-DFBWdaYB.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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.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-BvaSMf02.js";
|
|
2
|
+
import "./icon-BJa4ovUe.js";
|
|
3
|
+
import { t as error_component_default } from "./error-component-DFBWdaYB.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-BvaSMf02.js";
|
|
2
|
+
import "./tooltip-CWv9skVu.js";
|
|
3
|
+
import { t as button_default } from "./button-B7H9jKmU.js";
|
|
4
|
+
import "./icon-BJa4ovUe.js";
|
|
5
|
+
import { t as error_component_default } from "./error-component-DFBWdaYB.js";
|
|
6
|
+
import { t as zoom_container_default } from "./zoom-container-DbeN8U39.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-BvaSMf02.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,81 +1,6 @@
|
|
|
1
|
-
import { K as useContext } from "./composables-
|
|
1
|
+
import { K as useContext } from "./composables-BvaSMf02.js";
|
|
2
2
|
import { Fragment, Transition, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
|
|
3
3
|
|
|
4
|
-
//#region src/components/markdown.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
const _hoisted_1 = ["innerHTML"];
|
|
6
|
-
var markdown_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "markdown",
|
|
8
|
-
props: {
|
|
9
|
-
markdownParser: {
|
|
10
|
-
type: Object,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
nodeRenderers: {
|
|
14
|
-
type: Object,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
node: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
nodeKey: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
controls: {
|
|
26
|
-
type: [Boolean, Object],
|
|
27
|
-
required: false
|
|
28
|
-
},
|
|
29
|
-
previewers: {
|
|
30
|
-
type: [Boolean, Object],
|
|
31
|
-
required: false
|
|
32
|
-
},
|
|
33
|
-
shikiOptions: {
|
|
34
|
-
type: Object,
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
mermaidOptions: {
|
|
38
|
-
type: Object,
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
katexOptions: {
|
|
42
|
-
type: Object,
|
|
43
|
-
required: false
|
|
44
|
-
},
|
|
45
|
-
hardenOptions: {
|
|
46
|
-
type: Object,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
codeOptions: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
imageOptions: {
|
|
54
|
-
type: Object,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
isDark: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
required: false
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
setup(__props) {
|
|
63
|
-
const props = __props;
|
|
64
|
-
const html = computed(() => {
|
|
65
|
-
const content = props.markdownParser.astToMarkdown(props.node);
|
|
66
|
-
return props.markdownParser.markdownToHtml(content);
|
|
67
|
-
});
|
|
68
|
-
return (_ctx, _cache) => {
|
|
69
|
-
return openBlock(), createElementBlock("span", { innerHTML: html.value }, null, 8, _hoisted_1);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/components/markdown.vue
|
|
76
|
-
var markdown_default = markdown_vue_vue_type_script_setup_true_lang_default;
|
|
77
|
-
|
|
78
|
-
//#endregion
|
|
79
4
|
//#region src/components/node-list.vue?vue&type=script&setup=true&lang.ts
|
|
80
5
|
var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
81
6
|
inheritAttrs: false,
|
|
@@ -130,6 +55,10 @@ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
130
55
|
type: Object,
|
|
131
56
|
required: false
|
|
132
57
|
},
|
|
58
|
+
uiOptions: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
133
62
|
isDark: {
|
|
134
63
|
type: Boolean,
|
|
135
64
|
required: false
|
|
@@ -152,7 +81,7 @@ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
152
81
|
});
|
|
153
82
|
const excludeTransition = ["code"];
|
|
154
83
|
function getNodeComponent(node) {
|
|
155
|
-
return props.nodeRenderers[node.type] ||
|
|
84
|
+
return props.nodeRenderers[node.type] || null;
|
|
156
85
|
}
|
|
157
86
|
function getNodeBindings(node) {
|
|
158
87
|
return {
|
|
@@ -170,7 +99,7 @@ var node_list_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
170
99
|
return openBlock(true), createElementBlock(Fragment, null, renderList(nodes.value, (item) => {
|
|
171
100
|
return openBlock(), createElementBlock(Fragment, { key: item.key }, [enableTransition.value && !excludeTransition.includes(item.node.type) ? (openBlock(), createBlock(Transition, {
|
|
172
101
|
key: 0,
|
|
173
|
-
name: "typewriter",
|
|
102
|
+
name: "stream-markdown-typewriter",
|
|
174
103
|
appear: ""
|
|
175
104
|
}, {
|
|
176
105
|
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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.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-ZCQPlRUa.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-B7H9jKmU.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-BvaSMf02.js";
|
|
2
|
+
import { t as vanilla_default } from "./vanilla-D30b-_ch.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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.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-BvaSMf02.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-CWy--Gin.js";
|
|
3
|
+
import "./tooltip-CWv9skVu.js";
|
|
4
|
+
import { t as button_default } from "./button-B7H9jKmU.js";
|
|
5
|
+
import "./icon-BJa4ovUe.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
|
|
@@ -71,7 +75,7 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
71
75
|
setup(__props) {
|
|
72
76
|
const props = __props;
|
|
73
77
|
const { t } = useI18n();
|
|
74
|
-
const { onCopied } = useContext();
|
|
78
|
+
const { beforeDownload, onCopied } = useContext();
|
|
75
79
|
const { copy, copied } = useClipboard({ legacy: true });
|
|
76
80
|
const { isControlEnabled, resolveControls } = useControls({ controls: props.controls });
|
|
77
81
|
const showCopy = computed(() => isControlEnabled("table.copy"));
|
|
@@ -142,14 +146,19 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
142
146
|
icon: "download",
|
|
143
147
|
options,
|
|
144
148
|
visible: () => showDownload.value,
|
|
145
|
-
onClick: (_event, item) => {
|
|
149
|
+
onClick: async (_event, item) => {
|
|
146
150
|
const data = getTableContent((item === null || item === void 0 ? void 0 : item.value) || "csv");
|
|
147
151
|
if (!data) return;
|
|
148
|
-
|
|
152
|
+
if (await beforeDownload({
|
|
153
|
+
type: "table",
|
|
154
|
+
content: data.content
|
|
155
|
+
})) save(`table.${data.extension}`, data.content, data.mimeType);
|
|
149
156
|
}
|
|
150
157
|
}]);
|
|
151
158
|
const controls = computed(() => resolveControls("table", builtinControls.value, props));
|
|
152
159
|
function getNodes(cell) {
|
|
160
|
+
const children = cell.children;
|
|
161
|
+
if (children) return children;
|
|
153
162
|
return [cell];
|
|
154
163
|
}
|
|
155
164
|
return (_ctx, _cache) => {
|
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-BvaSMf02.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,
|