vue-stream-markdown 0.1.2 → 0.1.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 +8 -0
- package/dist/button-2wMU7qkH.js +5 -0
- package/dist/{button-vKhxUL3C.js → button-CJyeXWq2.js} +1 -1
- package/dist/{code-_dL6Qk0F.js → code-CJ4tMt6L.js} +8 -8
- package/dist/code-block-BucFZooo.js +9 -0
- package/dist/{code-block-wYeMwBck.js → code-block-CQ4lgva1.js} +13 -17
- package/dist/{composables-CZ7YmjNl.js → composables-Cj6_jbwr.js} +48 -17
- package/dist/dropdown-dsCfq0Hl.js +5 -0
- package/dist/error-component-B0mmLhh6.js +4 -0
- package/dist/{error-component-ChEpOmSX.js → error-component-ClGLfmwy.js} +1 -1
- package/dist/{image-DB-4Sv8R.js → image-xeiC5YFM.js} +4 -4
- package/dist/index.css +58 -73
- package/dist/index.d.ts +58 -28
- package/dist/index.js +63 -17
- package/dist/{inline-math-rChhv_1j.js → inline-math-C2NUSasr.js} +12 -15
- package/dist/{link-CJk67Kbh.js → link-BceXudNH.js} +2 -2
- package/dist/{math-ZLxqHT_f.js → math-DXOLG3Xg.js} +12 -15
- package/dist/{mermaid-CNFU7Pg8.js → mermaid-CU4hpB6S.js} +5 -5
- package/dist/{previewers-CMreQ4TA.js → previewers-qHMi6xZ3.js} +1 -1
- package/dist/segmented-BeHqXuFx.js +6 -0
- package/dist/{segmented-RoWxDIP3.js → segmented-CF6exjdD.js} +1 -1
- package/dist/{shiki-4529WbJJ.js → shiki-BlfngIRi.js} +9 -14
- package/dist/{renderer-CZ41eK_V.js → shiki-token-renderer-D164wC7Y.js} +10 -23
- package/dist/{table-BmGwZIPR.js → table-C5VHgkTQ.js} +3 -3
- package/dist/tooltip-BzVZqo7w.js +4 -0
- package/dist/{tooltip-KcTe6tBF.js → tooltip-gxsqaBNg.js} +1 -1
- package/dist/vanilla-CKj7EQLx.js +4 -0
- package/dist/vanilla-D5DzB31q.js +39 -0
- package/dist/zoom-container-CwEDlKRx.js +6 -0
- package/dist/{zoom-container-D1Mys9gv.js → zoom-container-D_fBClW2.js} +2 -2
- package/package.json +1 -1
- package/dist/button-DBgeYAZy.js +0 -5
- package/dist/code-block-DGZ48hb0.js +0 -9
- package/dist/dropdown-DR-uQ215.js +0 -5
- package/dist/error-component-CKCT9gXy.js +0 -4
- package/dist/segmented-63wrfRNo.js +0 -6
- package/dist/tooltip--rusT8LZ.js +0 -4
- package/dist/vanilla-CA9QO96X.js +0 -3
- package/dist/vanilla-DkX6g0dm.js +0 -87
- package/dist/zoom-container-C-CB2LTY.js +0 -6
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { V as useCodeOptions } from "./composables-Cj6_jbwr.js";
|
|
2
|
+
import { computed, defineComponent, h, renderList, toRefs } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/renderers/code/vanilla.ts
|
|
5
|
+
var vanilla_default = defineComponent({
|
|
6
|
+
name: "VanillaRenderer",
|
|
7
|
+
props: {
|
|
8
|
+
node: {
|
|
9
|
+
type: Object,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
codeOptions: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: void 0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props) {
|
|
18
|
+
const { codeOptions } = toRefs(props);
|
|
19
|
+
const code = computed(() => props.node.value.trim());
|
|
20
|
+
const lang = computed(() => props.node.lang || "");
|
|
21
|
+
const { showLineNumbers } = useCodeOptions({
|
|
22
|
+
codeOptions,
|
|
23
|
+
language: lang
|
|
24
|
+
});
|
|
25
|
+
const lines = computed(() => code.value.split("\n"));
|
|
26
|
+
return () => h("pre", {
|
|
27
|
+
"data-stream-markdown": "code",
|
|
28
|
+
"data-show-line-numbers": showLineNumbers.value,
|
|
29
|
+
"data-lang": lang.value,
|
|
30
|
+
"style": { counterReset: "line" }
|
|
31
|
+
}, h("code", { translate: "no" }, renderList(lines.value, (line, index) => h("div", {
|
|
32
|
+
"data-stream-markdown": "code-line",
|
|
33
|
+
"key": index
|
|
34
|
+
}, line))));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { vanilla_default as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as ICONS, t as useZoom, u as useI18n } from "./composables-
|
|
2
|
-
import { t as button_default } from "./button-
|
|
1
|
+
import { M as ICONS, t as useZoom, u as useI18n } from "./composables-Cj6_jbwr.js";
|
|
2
|
+
import { t as button_default } from "./button-CJyeXWq2.js";
|
|
3
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
|
package/package.json
CHANGED
package/dist/button-DBgeYAZy.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./previewers-CMreQ4TA.js";
|
|
2
|
-
import "./composables-CZ7YmjNl.js";
|
|
3
|
-
import "./tooltip-KcTe6tBF.js";
|
|
4
|
-
import "./button-vKhxUL3C.js";
|
|
5
|
-
import "./modal-CuQR21UD.js";
|
|
6
|
-
import { t as code_block_default } from "./code-block-wYeMwBck.js";
|
|
7
|
-
import "./segmented-RoWxDIP3.js";
|
|
8
|
-
|
|
9
|
-
export { code_block_default as default };
|
package/dist/tooltip--rusT8LZ.js
DELETED
package/dist/vanilla-CA9QO96X.js
DELETED
package/dist/vanilla-DkX6g0dm.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { computed, createElementBlock, createElementVNode, defineComponent, openBlock, toDisplayString } from "vue";
|
|
2
|
-
|
|
3
|
-
//#region src/components/renderers/code/vanilla.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
const _hoisted_1 = { "data-stream-markdown": "code" };
|
|
5
|
-
const _hoisted_2 = ["textContent"];
|
|
6
|
-
var vanilla_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
-
__name: "vanilla",
|
|
8
|
-
props: {
|
|
9
|
-
node: {
|
|
10
|
-
type: Object,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
markdownParser: {
|
|
14
|
-
type: Object,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
nodeRenderers: {
|
|
18
|
-
type: Object,
|
|
19
|
-
required: true
|
|
20
|
-
},
|
|
21
|
-
mediumZoom: {
|
|
22
|
-
type: Object,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
|
-
indexKey: {
|
|
26
|
-
type: [Number, String],
|
|
27
|
-
required: true
|
|
28
|
-
},
|
|
29
|
-
getContainer: {
|
|
30
|
-
type: Function,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
|
-
controls: {
|
|
34
|
-
type: [Boolean, Object],
|
|
35
|
-
required: false
|
|
36
|
-
},
|
|
37
|
-
previewers: {
|
|
38
|
-
type: [Boolean, Object],
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
shikiOptions: {
|
|
42
|
-
type: Object,
|
|
43
|
-
required: false
|
|
44
|
-
},
|
|
45
|
-
mermaidOptions: {
|
|
46
|
-
type: Object,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
katexOptions: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
hardenOptions: {
|
|
54
|
-
type: Object,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
codeOptions: {
|
|
58
|
-
type: Object,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
imageOptions: {
|
|
62
|
-
type: Object,
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
isDark: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
required: false
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
setup(__props) {
|
|
71
|
-
const props = __props;
|
|
72
|
-
const code = computed(() => props.node.value.trim());
|
|
73
|
-
return (_ctx, _cache) => {
|
|
74
|
-
return openBlock(), createElementBlock("pre", _hoisted_1, [createElementVNode("code", {
|
|
75
|
-
translate: "no",
|
|
76
|
-
textContent: toDisplayString(code.value)
|
|
77
|
-
}, null, 8, _hoisted_2)]);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/components/renderers/code/vanilla.vue
|
|
84
|
-
var vanilla_default = vanilla_vue_vue_type_script_setup_true_lang_default;
|
|
85
|
-
|
|
86
|
-
//#endregion
|
|
87
|
-
export { vanilla_default as t };
|