vue-stream-markdown 0.0.0-alpha.0 → 0.1.1
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 +18 -19
- package/dist/button-Bz0s_F3s.js +5 -0
- package/dist/{button-D8xx1WIP.js → button-dU2iYZBS.js} +1 -1
- package/dist/{code-CP6mPwkq.js → code-BfJ58lYO.js} +7 -7
- package/dist/code-block-BFUXyGQH.js +9 -0
- package/dist/{code-block-D2zjJAww.css → code-block-Bv8s2E8I.css} +5 -0
- package/dist/{code-block-C4D_QNTq.js → code-block-CZHD64ft.js} +5 -5
- package/dist/{composables-qhB1h_ed.js → composables-BwAY_BDJ.js} +124 -31
- package/dist/dropdown-RWgcV-8w.js +5 -0
- package/dist/error-component-CR9t-T1D.js +4 -0
- package/dist/{error-component-CzarUjhh.js → error-component-CiIR_1Cg.js} +1 -1
- package/dist/{image-heJSlrNv.js → image-BporCeem.js} +53 -49
- package/dist/index.d.ts +47 -33
- package/dist/index.js +23 -323
- package/dist/{inline-math-B4XO1wMP.js → inline-math-BfG4600m.js} +2 -2
- package/dist/{link-DOtoFtxu.js → link-D-OnakwP.js} +2 -2
- package/dist/{math-Byka28HI.js → math-CvKkCYb9.js} +2 -2
- package/dist/{mermaid-X0AFRzfF.js → mermaid-FgnWaZtT.js} +16 -8
- package/dist/{previewers-Drlf7IQF.js → previewers-CoU4RlpQ.js} +1 -1
- package/dist/{segmented-BEtO1eyl.js → segmented-Baxxk3UJ.js} +1 -1
- package/dist/segmented-C0uEAYuJ.js +6 -0
- package/dist/{shiki-vToM7Pz1.js → shiki-BHOZKGKS.js} +1 -1
- package/dist/{table-DjkiVd9L.js → table-B__TdLr7.js} +9 -4
- package/dist/{tooltip-RiXixMIt.js → tooltip-CA6Kp7Ek.js} +1 -1
- package/dist/tooltip-DoIUaZgq.js +4 -0
- package/dist/zoom-container-BPbftW_I.js +6 -0
- package/dist/{zoom-container-BfUO3Ocp.js → zoom-container-Dlqv-z-t.js} +2 -2
- package/package.json +15 -11
- package/dist/button-BClRCjnc.js +0 -5
- package/dist/code-block-Dzw63Lki.js +0 -9
- package/dist/dropdown-Ca_PKF_d.js +0 -5
- package/dist/error-component-CLEJmPmM.js +0 -4
- package/dist/segmented-CWoQcX-H.js +0 -6
- package/dist/tooltip-Ac_2x9ps.js +0 -4
- package/dist/zoom-container-BDEP09K9.js +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as error_component_default } from "./error-component-
|
|
1
|
+
import { o as useMathRenderer } from "./composables-BwAY_BDJ.js";
|
|
2
|
+
import { t as error_component_default } from "./error-component-CiIR_1Cg.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 {
|
|
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-BwAY_BDJ.js";
|
|
2
|
+
import "./tooltip-CA6Kp7Ek.js";
|
|
3
|
+
import "./button-dU2iYZBS.js";
|
|
4
|
+
import { t as error_component_default } from "./error-component-CiIR_1Cg.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-Dlqv-z-t.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
|
|
|
@@ -90,8 +90,13 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
90
90
|
setup(__props) {
|
|
91
91
|
const props = __props;
|
|
92
92
|
const { controls, mermaidOptions, isDark } = toRefs(props);
|
|
93
|
-
const { isControlEnabled } = useControls({ controls });
|
|
93
|
+
const { isControlEnabled, getControlValue } = useControls({ controls });
|
|
94
94
|
const showControl = computed(() => isControlEnabled("mermaid.position"));
|
|
95
|
+
const controlPosition = computed(() => {
|
|
96
|
+
const position = getControlValue("mermaid.position");
|
|
97
|
+
if (typeof position === "string") return position;
|
|
98
|
+
return "bottom-right";
|
|
99
|
+
});
|
|
95
100
|
const renderFlag = ref(false);
|
|
96
101
|
const svg = ref();
|
|
97
102
|
const containerRef = ref();
|
|
@@ -184,13 +189,16 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
184
189
|
})) : (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
|
|
185
190
|
key: 1,
|
|
186
191
|
variant: "mermaid"
|
|
187
|
-
}, props), null, 16))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, {
|
|
192
|
+
}, props), null, 16))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, {
|
|
193
|
+
"show-control": showControl.value,
|
|
194
|
+
position: controlPosition.value
|
|
195
|
+
}, {
|
|
188
196
|
default: withCtx(() => [createElementVNode("div", {
|
|
189
197
|
"data-stream-markdown": "mermaid",
|
|
190
198
|
innerHTML: svg.value
|
|
191
199
|
}, null, 8, _hoisted_1)]),
|
|
192
200
|
_: 1
|
|
193
|
-
}, 8, ["show-control"])], 4);
|
|
201
|
+
}, 8, ["show-control", "position"])], 4);
|
|
194
202
|
};
|
|
195
203
|
}
|
|
196
204
|
});
|
|
@@ -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-FgnWaZtT.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-dU2iYZBS.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 {
|
|
1
|
+
import { i as useShiki } from "./composables-BwAY_BDJ.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 {
|
|
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-BwAY_BDJ.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-CA6Kp7Ek.js";
|
|
4
|
+
import { t as button_default } from "./button-dU2iYZBS.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";
|
|
@@ -80,6 +80,9 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
80
80
|
const { t } = useI18n();
|
|
81
81
|
const { onCopied } = useContext();
|
|
82
82
|
const { copy, copied } = useClipboard({ legacy: true });
|
|
83
|
+
const { isControlEnabled } = useControls({ controls: props.controls });
|
|
84
|
+
const showCopy = computed(() => isControlEnabled("table.copy"));
|
|
85
|
+
const showDownload = computed(() => isControlEnabled("table.download"));
|
|
83
86
|
const tableRef = ref();
|
|
84
87
|
const align = computed(() => props.node.align || []);
|
|
85
88
|
const headerCells = computed(() => props.node.children[0].children ?? []);
|
|
@@ -129,6 +132,7 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
129
132
|
key: "copy",
|
|
130
133
|
icon: copied.value ? ICONS.check : ICONS.copy,
|
|
131
134
|
options,
|
|
135
|
+
visible: () => showCopy.value,
|
|
132
136
|
onClick: (_event, item) => {
|
|
133
137
|
const data = getTableContent((item === null || item === void 0 ? void 0 : item.value) || "csv");
|
|
134
138
|
if (!data) return;
|
|
@@ -140,12 +144,13 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
140
144
|
key: "download",
|
|
141
145
|
icon: ICONS.download,
|
|
142
146
|
options,
|
|
147
|
+
visible: () => showDownload.value,
|
|
143
148
|
onClick: (_event, item) => {
|
|
144
149
|
const data = getTableContent((item === null || item === void 0 ? void 0 : item.value) || "csv");
|
|
145
150
|
if (!data) return;
|
|
146
151
|
save(`table.${data.extension}`, data.content, data.mimeType);
|
|
147
152
|
}
|
|
148
|
-
}]);
|
|
153
|
+
}].filter((item) => item.visible()));
|
|
149
154
|
function getNodes(cell) {
|
|
150
155
|
return [cell];
|
|
151
156
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as useContext } from "./composables-BwAY_BDJ.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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as button_default } from "./button-
|
|
1
|
+
import { M as ICONS, t as useZoom, u as useI18n } from "./composables-BwAY_BDJ.js";
|
|
2
|
+
import { t as button_default } from "./button-dU2iYZBS.js";
|
|
3
3
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot, unref } from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/components/zoom-container.vue?vue&type=script&setup=true&lang.ts
|
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.1.1",
|
|
5
5
|
"description": "Streaming markdown output, Useful for text streams like LLM outputs.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -54,21 +54,22 @@
|
|
|
54
54
|
"@vueuse/core": "^14.1.0",
|
|
55
55
|
"markdown-it-async": "^2.2.0",
|
|
56
56
|
"medium-zoom": "^1.1.0",
|
|
57
|
+
"remend": "^1.0.1",
|
|
57
58
|
"tippy.js": "^6.3.7",
|
|
58
59
|
"vue-tippy": "^6.7.1"
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
|
-
"@antfu/eslint-config": "^6.2
|
|
62
|
+
"@antfu/eslint-config": "^6.4.2",
|
|
62
63
|
"@antfu/utils": "^9.3.0",
|
|
63
64
|
"@iconify-json/catppuccin": "^1.2.17",
|
|
64
|
-
"@iconify-json/lucide": "^1.2.
|
|
65
|
+
"@iconify-json/lucide": "^1.2.79",
|
|
65
66
|
"@types/node": "^24.10.1",
|
|
66
67
|
"@unocss/eslint-plugin": "66.5.9",
|
|
67
68
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
68
69
|
"@vue/test-utils": "^2.4.6",
|
|
69
70
|
"bumpp": "^10.3.2",
|
|
70
71
|
"eslint": "^9.39.1",
|
|
71
|
-
"eslint-plugin-format": "^1.0
|
|
72
|
+
"eslint-plugin-format": "^1.1.0",
|
|
72
73
|
"happy-dom": "^20.0.11",
|
|
73
74
|
"lint-staged": "^16.2.7",
|
|
74
75
|
"mdast-util-from-markdown": "^2.0.2",
|
|
@@ -85,15 +86,16 @@
|
|
|
85
86
|
"pncat": "^0.7.7",
|
|
86
87
|
"simple-git-hooks": "^2.13.1",
|
|
87
88
|
"taze": "^19.9.2",
|
|
88
|
-
"tsdown": "^0.
|
|
89
|
-
"tsx": "^4.
|
|
89
|
+
"tsdown": "^0.17.0",
|
|
90
|
+
"tsx": "^4.21.0",
|
|
90
91
|
"typescript": "^5.9.3",
|
|
91
|
-
"unocss": "^66.5.
|
|
92
|
+
"unocss": "^66.5.10",
|
|
92
93
|
"unplugin-icons": "^22.5.0",
|
|
93
94
|
"unplugin-lightningcss": "^0.4.3",
|
|
94
|
-
"vite": "^7.2.
|
|
95
|
-
"
|
|
96
|
-
"
|
|
95
|
+
"vite": "^7.2.6",
|
|
96
|
+
"vitepress": "^1.6.4",
|
|
97
|
+
"vitest": "^4.0.15",
|
|
98
|
+
"vue-tsc": "^3.1.6"
|
|
97
99
|
},
|
|
98
100
|
"simple-git-hooks": {
|
|
99
101
|
"pre-commit": "pnpm lint-staged"
|
|
@@ -103,8 +105,10 @@
|
|
|
103
105
|
},
|
|
104
106
|
"scripts": {
|
|
105
107
|
"dev": "vite",
|
|
108
|
+
"dev:docs": "pnpm --filter documentation dev",
|
|
106
109
|
"build": "tsdown",
|
|
107
|
-
"build:
|
|
110
|
+
"build:play": "vite build",
|
|
111
|
+
"build:docs": "pnpm --filter documentation build",
|
|
108
112
|
"deps": "taze major -I",
|
|
109
113
|
"lint": "eslint",
|
|
110
114
|
"typecheck": "vue-tsc --noEmit",
|
package/dist/button-BClRCjnc.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./previewers-Drlf7IQF.js";
|
|
2
|
-
import "./composables-qhB1h_ed.js";
|
|
3
|
-
import "./tooltip-RiXixMIt.js";
|
|
4
|
-
import "./button-D8xx1WIP.js";
|
|
5
|
-
import "./modal-CuQR21UD.js";
|
|
6
|
-
import { t as code_block_default } from "./code-block-C4D_QNTq.js";
|
|
7
|
-
import "./segmented-BEtO1eyl.js";
|
|
8
|
-
|
|
9
|
-
export { code_block_default as default };
|
package/dist/tooltip-Ac_2x9ps.js
DELETED