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,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-BvaSMf02.js";
|
|
2
|
+
import { t as button_default } from "./button-B7H9jKmU.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.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "Streaming markdown output, Useful for text streams like LLM outputs.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"markdown",
|
|
19
19
|
"stream",
|
|
20
20
|
"mermaid",
|
|
21
|
-
"latex",
|
|
22
21
|
"katex",
|
|
22
|
+
"latex",
|
|
23
23
|
"customizable"
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
@@ -53,9 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@floating-ui/dom": "^1.7.4",
|
|
56
|
-
"@vueuse/core": "^14.1.0"
|
|
57
|
-
"markdown-it-async": "^2.2.0",
|
|
58
|
-
"remend": "^1.0.1"
|
|
56
|
+
"@vueuse/core": "^14.1.0"
|
|
59
57
|
},
|
|
60
58
|
"devDependencies": {
|
|
61
59
|
"@antfu/eslint-config": "^6.7.1",
|
|
@@ -69,6 +67,7 @@
|
|
|
69
67
|
"@unocss/eslint-plugin": "66.5.9",
|
|
70
68
|
"@unocss/nuxt": "^66.5.10",
|
|
71
69
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
70
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
72
71
|
"@vue/test-utils": "^2.4.6",
|
|
73
72
|
"@vueuse/nuxt": "^14.1.0",
|
|
74
73
|
"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
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent } from "vue";
|
|
2
|
-
|
|
3
|
-
//#region src/components/previewers/index.ts
|
|
4
|
-
const CODE_PREVIEWERS = {
|
|
5
|
-
html: defineAsyncComponent(() => import("./html-D7bGx0Cz.js")),
|
|
6
|
-
mermaid: defineAsyncComponent(() => import("./mermaid-BoiSJ4fF.js"))
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { CODE_PREVIEWERS as t };
|
package/dist/tooltip-BIvCaFUj.js
DELETED
package/dist/vanilla-DfHiHWnr.js
DELETED