vue-stream-markdown 0.0.0-alpha.0 → 0.1.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 +18 -19
- package/dist/{button-D8xx1WIP.js → button-DRLfKbvc.js} +1 -1
- package/dist/button-DYIERZf1.js +5 -0
- package/dist/{code-CP6mPwkq.js → code-D5-TPyJ2.js} +7 -7
- package/dist/code-block-Cs17aZ52.js +9 -0
- package/dist/{code-block-C4D_QNTq.js → code-block-fsdBN3mX.js} +5 -5
- package/dist/{composables-qhB1h_ed.js → composables-5Y9QWb9D.js} +97 -13
- package/dist/dropdown-BegRJmej.js +5 -0
- package/dist/error-component-BkdZ6n2L.js +4 -0
- package/dist/{error-component-CzarUjhh.js → error-component-DftqHZwH.js} +1 -1
- package/dist/{image-heJSlrNv.js → image-dNQ1WKcM.js} +53 -49
- package/dist/index.d.ts +45 -33
- package/dist/index.js +23 -324
- package/dist/{inline-math-B4XO1wMP.js → inline-math-D8LY9Xgq.js} +2 -2
- package/dist/{link-DOtoFtxu.js → link-Dkfv0bTE.js} +2 -2
- package/dist/{math-Byka28HI.js → math-G8p5HNSV.js} +2 -2
- package/dist/{mermaid-X0AFRzfF.js → mermaid-BAFHxaTS.js} +12 -8
- package/dist/{previewers-Drlf7IQF.js → previewers-CZxK6T54.js} +1 -1
- package/dist/{segmented-BEtO1eyl.js → segmented-CpwUFPie.js} +1 -1
- package/dist/segmented-DQFlS2_3.js +6 -0
- package/dist/{shiki-vToM7Pz1.js → shiki-CxPfBPEr.js} +1 -1
- package/dist/{table-DjkiVd9L.js → table-BSGtENN1.js} +9 -4
- package/dist/{tooltip-RiXixMIt.js → tooltip-CTUn3Ask.js} +1 -1
- package/dist/tooltip-TCy0JVGe.js +4 -0
- package/dist/{zoom-container-BfUO3Ocp.js → zoom-container-BR9gRA9_.js} +2 -2
- package/dist/zoom-container-qe4wO3zY.js +6 -0
- package/package.json +13 -9
- 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,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-5Y9QWb9D.js";
|
|
2
|
+
import "./tooltip-CTUn3Ask.js";
|
|
3
|
+
import "./button-DRLfKbvc.js";
|
|
4
|
+
import { t as error_component_default } from "./error-component-DftqHZwH.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-BR9gRA9_.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,9 @@ 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(() => getControlValue("mermaid.position"));
|
|
95
96
|
const renderFlag = ref(false);
|
|
96
97
|
const svg = ref();
|
|
97
98
|
const containerRef = ref();
|
|
@@ -184,13 +185,16 @@ var mermaid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
184
185
|
})) : (openBlock(), createBlock(resolveDynamicComponent(Error.value), mergeProps({
|
|
185
186
|
key: 1,
|
|
186
187
|
variant: "mermaid"
|
|
187
|
-
}, props), null, 16))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, {
|
|
188
|
+
}, props), null, 16))], 64)) : createCommentVNode("v-if", true), createVNode(zoom_container_default, {
|
|
189
|
+
"show-control": showControl.value,
|
|
190
|
+
position: controlPosition.value
|
|
191
|
+
}, {
|
|
188
192
|
default: withCtx(() => [createElementVNode("div", {
|
|
189
193
|
"data-stream-markdown": "mermaid",
|
|
190
194
|
innerHTML: svg.value
|
|
191
195
|
}, null, 8, _hoisted_1)]),
|
|
192
196
|
_: 1
|
|
193
|
-
}, 8, ["show-control"])], 4);
|
|
197
|
+
}, 8, ["show-control", "position"])], 4);
|
|
194
198
|
};
|
|
195
199
|
}
|
|
196
200
|
});
|
|
@@ -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-BAFHxaTS.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-DRLfKbvc.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-5Y9QWb9D.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-5Y9QWb9D.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-CTUn3Ask.js";
|
|
4
|
+
import { t as button_default } from "./button-DRLfKbvc.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-5Y9QWb9D.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-5Y9QWb9D.js";
|
|
2
|
+
import { t as button_default } from "./button-DRLfKbvc.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.0",
|
|
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.
|
|
62
|
+
"@antfu/eslint-config": "^6.4.1",
|
|
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.78",
|
|
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",
|
|
@@ -86,13 +87,14 @@
|
|
|
86
87
|
"simple-git-hooks": "^2.13.1",
|
|
87
88
|
"taze": "^19.9.2",
|
|
88
89
|
"tsdown": "^0.16.8",
|
|
89
|
-
"tsx": "^4.
|
|
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
|
-
"
|
|
95
|
+
"vite": "^7.2.6",
|
|
96
|
+
"vitepress": "^1.6.4",
|
|
97
|
+
"vitest": "^4.0.15",
|
|
96
98
|
"vue-tsc": "^3.1.5"
|
|
97
99
|
},
|
|
98
100
|
"simple-git-hooks": {
|
|
@@ -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