vue-stream-markdown 0.1.4 → 0.1.5
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 +3 -1
- package/dist/arrow-left-C5s0Sn8o.js +25 -0
- package/dist/{blockquote-DdEg2gww.js → blockquote-bkADuiGm.js} +1 -9
- package/dist/{button-jFTF378X.js → button-BQhuT7wh.js} +2 -3
- package/dist/button-JYC8d-B-.js +5 -0
- package/dist/{code-BxWvKFxG.js → code-DF8PTNol.js} +10 -18
- package/dist/code-block-BhMDz2ZL.js +9 -0
- package/dist/{code-block-uZcUI59D.js → code-block-Dm2wl0cb.js} +60 -65
- package/dist/{composables-Cx0nvyHl.js → composables-yny5gJo3.js} +495 -227
- package/dist/{delete-BdWzKJCy.js → delete-D17YBeI-.js} +1 -9
- package/dist/dropdown-Y5_Z4a_u.js +5 -0
- package/dist/{emphasis-CTuGt1Ok.js → emphasis-B-2R_0Q5.js} +1 -9
- package/dist/{en-US-Bfc50l3I.js → en-US-Kw2LYAMk.js} +7 -1
- package/dist/{error-component-Bhl770lu.js → error-component-Bb0gIZsx.js} +1 -1
- package/dist/error-component-DEIWb6kB.js +4 -0
- package/dist/flip-horizontal-BFWjqDbQ.js +25 -0
- package/dist/{heading-2vpQQtTH.js → heading-DyJIwNrN.js} +1 -9
- package/dist/{html-DL0PcUXX.js → html-DXNqMvt_.js} +0 -8
- package/dist/{image-BDtPwitR.js → image-BPhFn1xp.js} +38 -75
- package/dist/image-DXBD47sF.js +8 -0
- package/dist/image-DvOGBhi-.js +327 -0
- package/dist/index.css +44 -64
- package/dist/index.d.ts +115 -70
- package/dist/index.js +42 -61
- package/dist/{inline-code-CBoqhfz7.js → inline-code-C44UJ2TH.js} +0 -8
- package/dist/{inline-math-CAqboT7h.js → inline-math-wO1rMt9T.js} +2 -10
- package/dist/{link-C8BSlPhZ.js → link-sGo7CEll.js} +3 -11
- package/dist/{list-BCiFKGaz.js → list-C0I1ysSI.js} +1 -9
- package/dist/{list-item-p-OLUR_9.js → list-item-BoC2wKBL.js} +1 -9
- package/dist/{math-CT1TB2pK.js → math-BlqtUf2r.js} +2 -10
- package/dist/{mermaid-CYrA8rCl.js → mermaid-Ka1jnXrR.js} +6 -14
- package/dist/modal-Duhc-vVa.js +4 -0
- package/dist/modal-Rc_RoeYA.js +94 -0
- package/dist/node-list-C1je2nLd.js +3 -0
- package/dist/{node-list-CGr_EVtn.js → node-list-YhpHXdM_.js} +0 -16
- package/dist/{paragraph-DYjqr_Sa.js → paragraph-BN-4-Dn7.js} +1 -9
- package/dist/previewers-D0VVcdjL.js +10 -0
- package/dist/rotate-ccw-square-C2KVFUF3.js +24 -0
- package/dist/{segmented-DBW9ignu.js → segmented-CaC54iz_.js} +1 -1
- package/dist/segmented-XdoLnuuq.js +6 -0
- package/dist/{shiki-bQYWLdW3.js → shiki-sJNZTn1K.js} +4 -12
- package/dist/spin-wM2KE8mO.js +3 -0
- package/dist/{strong-CvOjLZiq.js → strong-NdAS3VjP.js} +1 -9
- package/dist/{table-l_3z210v.js → table-CWX5B2i1.js} +11 -16
- package/dist/table-R9gmCXm_.js +3 -0
- package/dist/{text-DuONUqRA.js → text-DpleLvNh.js} +0 -8
- package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-D5GvzU5S.js} +0 -8
- package/dist/tooltip-BJDs-A8d.js +4 -0
- package/dist/tooltip-Bgbzbk4Q.js +68 -0
- package/dist/{vanilla-CFWVwBvD.js → vanilla-BTOVqKl7.js} +1 -1
- package/dist/vanilla-DA5bwIkr.js +4 -0
- package/dist/{yaml-DJHrmzSe.js → yaml-y0snrPRx.js} +1 -9
- package/dist/{zh-CN-CL1XGe0H.js → zh-CN-Dfow4Yn2.js} +7 -1
- package/dist/{zoom-container-gjQ0EMyk.js → zoom-container-B1qbA-7z.js} +52 -23
- package/dist/zoom-container-KztuE4ri.js +6 -0
- package/package.json +9 -10
- package/dist/button-D6ccVxGm.js +0 -5
- package/dist/code-block-B72JfFy-.js +0 -9
- package/dist/dropdown-oiCw8QVq.js +0 -5
- package/dist/error-component-8y13-fYG.js +0 -4
- package/dist/modal-CuQR21UD.js +0 -71
- package/dist/modal-DcpxxDDX.js +0 -3
- package/dist/node-list-lgY1wbfQ.js +0 -3
- package/dist/previewers-ByaS2Ksa.js +0 -10
- package/dist/segmented-B4IEw3wg.js +0 -6
- package/dist/spin-Bz4zGBEo.js +0 -3
- package/dist/table-CZLbUHiJ.js +0 -3
- package/dist/tooltip-3UDC9mw-.js +0 -71
- package/dist/tooltip-CAoc_U1X.js +0 -4
- package/dist/vanilla-De7W3PpS.js +0 -4
- package/dist/zoom-container-DBgGdbJS.js +0 -6
- /package/dist/{angular-Chs-UKBr.js → angular-Mip1mspI.js} +0 -0
- /package/dist/{angular-component-Cc_FANXU.js → angular-component-Cq5UbX7R.js} +0 -0
- /package/dist/{apache-COYnc6xR.js → apache-BSq7fX32.js} +0 -0
- /package/dist/{asciidoc-BabXBDAL.js → asciidoc-DS-PMOLv.js} +0 -0
- /package/dist/{assembly-CDqKhexW.js → assembly-BPatlOM7.js} +0 -0
- /package/dist/{astro-C9kftzFG.js → astro-CSD_ZjXp.js} +0 -0
- /package/dist/{bash-Ce4pNIkV.js → bash-RITislE1.js} +0 -0
- /package/dist/{batch-CHQBRjFL.js → batch-DWPShYhN.js} +0 -0
- /package/dist/{bicep-8jxWtuBF.js → bicep-C6BEHfP6.js} +0 -0
- /package/dist/{c-FBUef746.js → c-DNo3tsNy.js} +0 -0
- /package/dist/{check-C4xOk8um.js → check-BfpxIITS.js} +0 -0
- /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-LeNeemjn.js} +0 -0
- /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-BjDuIzgc.js} +0 -0
- /package/dist/{clojure-BulUroSy.js → clojure-C1DEYHW0.js} +0 -0
- /package/dist/{cmake-CW3vz1Mo.js → cmake-B69mdXcH.js} +0 -0
- /package/dist/{cobol-CIn3oFju.js → cobol-qmL-zIWi.js} +0 -0
- /package/dist/{code-D8LSp8rK.js → code-D9CiymEK.js} +0 -0
- /package/dist/{codeowners-CJggXF_b.js → codeowners-Crklt5nF.js} +0 -0
- /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-k3huSp23.js} +0 -0
- /package/dist/{copy-Cabve0xf.js → copy-C4580J93.js} +0 -0
- /package/dist/{cpp-BTKeuyd-.js → cpp-Cn3MB35e.js} +0 -0
- /package/dist/{crystal-DyIYvZbm.js → crystal-D5aGETSx.js} +0 -0
- /package/dist/{csharp-NqZ1vyF9.js → csharp-CgkTkbPx.js} +0 -0
- /package/dist/{css-BpR5Lajb.js → css-DRH4n_IV.js} +0 -0
- /package/dist/{csv-eCMFnKKK.js → csv-D5nNTIzO.js} +0 -0
- /package/dist/{cue-TY97dGOQ.js → cue-B5mC88-N.js} +0 -0
- /package/dist/{d-NftUsdTd.js → d-BdQRMgma.js} +0 -0
- /package/dist/{dart-DJpwZZbk.js → dart-BGnfn0NN.js} +0 -0
- /package/dist/{database-aZwE71Px.js → database-Ca1VGX7u.js} +0 -0
- /package/dist/{diff-CYRzypaU.js → diff-DVaTsnqu.js} +0 -0
- /package/dist/{docker-CxHBuukH.js → docker-E47qYlmL.js} +0 -0
- /package/dist/{download-Bnn7rtYw.js → download-DytrK56a.js} +0 -0
- /package/dist/{elixir-BKSxVc1h.js → elixir-C-jqqu6q.js} +0 -0
- /package/dist/{elm-DScuAf3X.js → elm-CmeHvaWl.js} +0 -0
- /package/dist/{env-CDAKsodl.js → env-Ck1BHoxR.js} +0 -0
- /package/dist/{erlang-D2M1ZL3m.js → erlang-CIP8kpGJ.js} +0 -0
- /package/dist/{eye-CdeX8PhP.js → eye-TaEwQS2Z.js} +0 -0
- /package/dist/{fortran-CORyQ0wt.js → fortran-DJVP2s7V.js} +0 -0
- /package/dist/{fsharp-BJz_Jgpl.js → fsharp-Bp6mUcG0.js} +0 -0
- /package/dist/{git-DgrlTr1E.js → git-BDcqJ1Gp.js} +0 -0
- /package/dist/{gleam-t_xad9Kw.js → gleam-JLiZVlev.js} +0 -0
- /package/dist/{go-Cvlh1xtL.js → go-ClcCiS7e.js} +0 -0
- /package/dist/{graphql-ApIm0mDD.js → graphql-D2RDo-DF.js} +0 -0
- /package/dist/{groovy-CaLnK8PV.js → groovy-DLZBw8xE.js} +0 -0
- /package/dist/{haml-MwijEO_6.js → haml-Da74jRwZ.js} +0 -0
- /package/dist/{handlebars-CKdUPI9h.js → handlebars-CNgS57Sz.js} +0 -0
- /package/dist/{haskell-NPOXEnck.js → haskell-DCvfD6VB.js} +0 -0
- /package/dist/{haxe-DyKBMsDE.js → haxe-CHVK1TId.js} +0 -0
- /package/dist/{html-CMgES1dE.js → html-Du4235Z-.js} +0 -0
- /package/dist/{http-B9FFNmUr.js → http-B8VAFeQ5.js} +0 -0
- /package/dist/{image-CMZAakWu.js → image-D8MZj4W5.js} +0 -0
- /package/dist/{java-iU-L9wJz.js → java-CoSdnK1N.js} +0 -0
- /package/dist/{javascript-DtnWdTFC.js → javascript-BCDeVll0.js} +0 -0
- /package/dist/{jinja-CoWszo_D.js → jinja-DYbiqZy0.js} +0 -0
- /package/dist/{json-C80qKCnh.js → json-CdzCyWJA.js} +0 -0
- /package/dist/{julia-DG2BCBLx.js → julia-pswJGtpP.js} +0 -0
- /package/dist/{kdl-7twRfIlJ.js → kdl-M8rfQ85l.js} +0 -0
- /package/dist/{kotlin-BjrOgP7R.js → kotlin-CfCV33oB.js} +0 -0
- /package/dist/{latex-DIQfUvG8.js → latex-DK8DFhTm.js} +0 -0
- /package/dist/{less-BJ1yEAWt.js → less-BFnNZiIs.js} +0 -0
- /package/dist/{link-DeV4CQOB.js → link-C7eU_yi-.js} +0 -0
- /package/dist/{liquid-BqKFZ1wQ.js → liquid-C8h46DoX.js} +0 -0
- /package/dist/{lisp-oekhB2ti.js → lisp-C3FbGuD1.js} +0 -0
- /package/dist/{log-D1XEqR9q.js → log-D-O3FXf2.js} +0 -0
- /package/dist/{lua-C5Q97-1D.js → lua-BC_aR1_i.js} +0 -0
- /package/dist/{luau-BT8KwqZ2.js → luau-DFUOrNN7.js} +0 -0
- /package/dist/{makefile-B4a0ciG4.js → makefile-Ck67veVV.js} +0 -0
- /package/dist/{markdown-DvNyKsiJ.js → markdown-BX13X3kd.js} +0 -0
- /package/dist/{marko-BzsIf6bg.js → marko-CQE8YTCc.js} +0 -0
- /package/dist/{matlab-cMBkmDhQ.js → matlab-Bd9O2Ml3.js} +0 -0
- /package/dist/{maximize-4PIqBONS.js → maximize-CDZ9rnYF.js} +0 -0
- /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Dv-Pr0W-.js} +0 -0
- /package/dist/{minimize-BJ8htyDF.js → minimize-B9ER7p2X.js} +0 -0
- /package/dist/{nextflow-DNmqU1xg.js → nextflow-D3lDq1Yi.js} +0 -0
- /package/dist/{nginx-DDfYF_rj.js → nginx-CgsqCL4l.js} +0 -0
- /package/dist/{nim-D9xEmy4k.js → nim-BJdSu3c6.js} +0 -0
- /package/dist/{nix-BV1Deshw.js → nix-B7K_D6CN.js} +0 -0
- /package/dist/{ocaml-BkFn4LL3.js → ocaml-gYS1Y45s.js} +0 -0
- /package/dist/{perl-BytUHDE7.js → perl-DXFhFWhI.js} +0 -0
- /package/dist/{php-BImJJtNM.js → php-We35bF4E.js} +0 -0
- /package/dist/{postcss-CrZ9_0sT.js → postcss-BWovY_YV.js} +0 -0
- /package/dist/{powershell-DYSGu7TM.js → powershell-C6teiBsq.js} +0 -0
- /package/dist/{prisma-BhRvcOFY.js → prisma-UyJEg0_X.js} +0 -0
- /package/dist/{prolog-DuaCKek_.js → prolog-YZsPgdnw.js} +0 -0
- /package/dist/{properties-BbIJwuP-.js → properties-DaPbL0e2.js} +0 -0
- /package/dist/{proto-CE0aVW11.js → proto-1LIwu2O1.js} +0 -0
- /package/dist/{pug-B1-IC-Tc.js → pug-CzkUK-Ec.js} +0 -0
- /package/dist/{puppet-8nYquiMG.js → puppet-CNhB1MHb.js} +0 -0
- /package/dist/{python-DhRyfBrD.js → python-B_hgEobv.js} +0 -0
- /package/dist/{r-Cjje17IA.js → r-CVeKYmPK.js} +0 -0
- /package/dist/{racket-Dx0gMnpg.js → racket-D5UfvXuw.js} +0 -0
- /package/dist/{razor-DPht_bdD.js → razor-RIKaANTN.js} +0 -0
- /package/dist/{ruby-B8RxtCzI.js → ruby-C8wV0pMO.js} +0 -0
- /package/dist/{rust-Cjtli6yf.js → rust-75Gei1mP.js} +0 -0
- /package/dist/{sass-Dv3DMzjs.js → sass-Cq68xmQ4.js} +0 -0
- /package/dist/{scala-B7bZGKXq.js → scala-C_E5rjSc.js} +0 -0
- /package/dist/{scheme-B2PsEdVN.js → scheme-Bm-q-nLL.js} +0 -0
- /package/dist/{shader-BZzu3zGr.js → shader-DPaRkMCs.js} +0 -0
- /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-CLmUjKa3.js} +0 -0
- /package/dist/{solidity-CLieFYpL.js → solidity-DvHG_0CD.js} +0 -0
- /package/dist/{spin-Ds5W7qC_.js → spin--f5jNjBn.js} +0 -0
- /package/dist/{stata-C0yUiO47.js → stata-DoVloJLm.js} +0 -0
- /package/dist/{svelte-rtF4yNGL.js → svelte-tlbA11de.js} +0 -0
- /package/dist/{swift-CzvYoIM0.js → swift-BZn5eRnK.js} +0 -0
- /package/dist/{table-4ec9FVB_.js → table-CaUMjs4M.js} +0 -0
- /package/dist/{terraform-CD_BZGb-.js → terraform-c5-k7yB1.js} +0 -0
- /package/dist/{text-D1-vbZ7l.js → text-DPCGWvDK.js} +0 -0
- /package/dist/{toml-C6jUF0Xd.js → toml-DdLGBe1A.js} +0 -0
- /package/dist/{twig-C4dfP84J.js → twig-D_jzZxh6.js} +0 -0
- /package/dist/{typescript-Bk-pp-cK.js → typescript-B95hq2ns.js} +0 -0
- /package/dist/{typst-DPCpaVSH.js → typst-CSAEQ4yK.js} +0 -0
- /package/dist/{v-nRGMJ2Ki.js → v-BAhebuOB.js} +0 -0
- /package/dist/{vala-B78bKcY0.js → vala-RAu83-lp.js} +0 -0
- /package/dist/{verilog-CRpkl76S.js → verilog-BgmTn52U.js} +0 -0
- /package/dist/{vim-DpKnut7b.js → vim-c8oTCLkH.js} +0 -0
- /package/dist/{vue-D5eadhjo.js → vue-TGT6HTBA.js} +0 -0
- /package/dist/{xml-Dvx5F-hl.js → xml-C1HDr874.js} +0 -0
- /package/dist/{yaml-n1S8nAOh.js → yaml-BO7FjFQZ.js} +0 -0
- /package/dist/{zig-R-iFzxfW.js → zig-qANBp1SU.js} +0 -0
- /package/dist/{zoomIn-CEukuh3x.js → zoomIn-iVMAUxIz.js} +0 -0
- /package/dist/{zoomOut-qlzQyQli.js → zoomOut-Cxq1_dIQ.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as node_list_default } from "./node-list-
|
|
3
|
-
import "./tooltip-
|
|
4
|
-
import { t as button_default } from "./button-
|
|
5
|
-
import { t as spin_default } from "./spin
|
|
6
|
-
import { t as table_default$1 } from "./table-
|
|
1
|
+
import { H as useContext, O as save, V as useControls, b as tableDataToMarkdown, u as useI18n, v as extractTableDataFromElement, x as tableDataToTSV, y as tableDataToCSV } from "./composables-yny5gJo3.js";
|
|
2
|
+
import { t as node_list_default } from "./node-list-YhpHXdM_.js";
|
|
3
|
+
import "./tooltip-Bgbzbk4Q.js";
|
|
4
|
+
import { t as button_default } from "./button-BQhuT7wh.js";
|
|
5
|
+
import { t as spin_default } from "./spin--f5jNjBn.js";
|
|
6
|
+
import { t as table_default$1 } from "./table-CaUMjs4M.js";
|
|
7
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, withCtx } from "vue";
|
|
8
8
|
import { useClipboard } from "@vueuse/core";
|
|
9
9
|
|
|
@@ -26,18 +26,10 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
26
26
|
type: Object,
|
|
27
27
|
required: true
|
|
28
28
|
},
|
|
29
|
-
mediumZoom: {
|
|
30
|
-
type: Object,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
29
|
indexKey: {
|
|
34
30
|
type: [Number, String],
|
|
35
31
|
required: true
|
|
36
32
|
},
|
|
37
|
-
getContainer: {
|
|
38
|
-
type: Function,
|
|
39
|
-
required: true
|
|
40
|
-
},
|
|
41
33
|
controls: {
|
|
42
34
|
type: [Boolean, Object],
|
|
43
35
|
required: false
|
|
@@ -93,8 +85,9 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
93
85
|
return align.value[index] || "left";
|
|
94
86
|
}
|
|
95
87
|
function getTableContent(format) {
|
|
96
|
-
|
|
97
|
-
|
|
88
|
+
var _tableRef$value;
|
|
89
|
+
if (!((_tableRef$value = tableRef.value) === null || _tableRef$value === void 0 ? void 0 : _tableRef$value.$el)) return null;
|
|
90
|
+
const tableData = extractTableDataFromElement(tableRef.value.$el);
|
|
98
91
|
switch (format) {
|
|
99
92
|
case "markdown": return {
|
|
100
93
|
content: tableDataToMarkdown(tableData),
|
|
@@ -172,6 +165,8 @@ var table_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
172
165
|
]);
|
|
173
166
|
}), 128))]),
|
|
174
167
|
createElementVNode("div", _hoisted_3, [createVNode(table_default$1, {
|
|
168
|
+
ref_key: "tableRef",
|
|
169
|
+
ref: tableRef,
|
|
175
170
|
headers: headerCells.value,
|
|
176
171
|
rows: bodyRows.value,
|
|
177
172
|
"get-align": getAlign
|
|
@@ -17,18 +17,10 @@ var text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
17
17
|
type: Object,
|
|
18
18
|
required: true
|
|
19
19
|
},
|
|
20
|
-
mediumZoom: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
20
|
indexKey: {
|
|
25
21
|
type: [Number, String],
|
|
26
22
|
required: true
|
|
27
23
|
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
24
|
controls: {
|
|
33
25
|
type: [Boolean, Object],
|
|
34
26
|
required: false
|
|
@@ -17,18 +17,10 @@ var thematic_break_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
17
17
|
type: Object,
|
|
18
18
|
required: true
|
|
19
19
|
},
|
|
20
|
-
mediumZoom: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true
|
|
23
|
-
},
|
|
24
20
|
indexKey: {
|
|
25
21
|
type: [Number, String],
|
|
26
22
|
required: true
|
|
27
23
|
},
|
|
28
|
-
getContainer: {
|
|
29
|
-
type: Function,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
24
|
controls: {
|
|
33
25
|
type: [Boolean, Object],
|
|
34
26
|
required: false
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { B as useFloatingElement, H as useContext } from "./composables-yny5gJo3.js";
|
|
2
|
+
import { Fragment, Teleport, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, openBlock, renderSlot, toDisplayString, toRefs, unref } from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
const _hoisted_1 = { "data-stream-markdown": "tooltip-overlay" };
|
|
6
|
+
var tooltip_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
inheritAttrs: false,
|
|
8
|
+
__name: "tooltip",
|
|
9
|
+
props: {
|
|
10
|
+
content: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: false
|
|
13
|
+
},
|
|
14
|
+
trigger: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: false,
|
|
17
|
+
default: "hover"
|
|
18
|
+
},
|
|
19
|
+
placement: {
|
|
20
|
+
type: [String, Object],
|
|
21
|
+
required: false,
|
|
22
|
+
default: "top"
|
|
23
|
+
},
|
|
24
|
+
delay: {
|
|
25
|
+
type: [Number, Array],
|
|
26
|
+
required: false,
|
|
27
|
+
default: () => [100, 100]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(__props, { expose: __expose }) {
|
|
31
|
+
const { placement, delay, trigger } = toRefs(__props);
|
|
32
|
+
const { getContainer } = useContext();
|
|
33
|
+
const { referenceEl: _referenceEl, floatingEl: _floatingEl, open, appendTo, floatingStyle, show, hide, onMouseEnter, onMouseLeave, onClick, onFloatingEnter, onFloatingLeave } = useFloatingElement({
|
|
34
|
+
placement,
|
|
35
|
+
delay,
|
|
36
|
+
trigger,
|
|
37
|
+
getContainer
|
|
38
|
+
});
|
|
39
|
+
__expose({
|
|
40
|
+
show,
|
|
41
|
+
hide
|
|
42
|
+
});
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("span", mergeProps(_ctx.$attrs, {
|
|
45
|
+
ref_key: "_referenceEl",
|
|
46
|
+
ref: _referenceEl,
|
|
47
|
+
onMouseenter: _cache[0] || (_cache[0] = (...args) => unref(onMouseEnter) && unref(onMouseEnter)(...args)),
|
|
48
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => unref(onMouseLeave) && unref(onMouseLeave)(...args)),
|
|
49
|
+
onClick: _cache[2] || (_cache[2] = (...args) => unref(onClick) && unref(onClick)(...args))
|
|
50
|
+
}), [renderSlot(_ctx.$slots, "default")], 16), (openBlock(), createBlock(Teleport, { to: unref(appendTo) }, [unref(open) ? (openBlock(), createElementBlock("div", {
|
|
51
|
+
key: 0,
|
|
52
|
+
ref_key: "_floatingEl",
|
|
53
|
+
ref: _floatingEl,
|
|
54
|
+
style: normalizeStyle(unref(floatingStyle)),
|
|
55
|
+
"data-stream-markdown": "tooltip",
|
|
56
|
+
onMouseenter: _cache[3] || (_cache[3] = (...args) => unref(onFloatingEnter) && unref(onFloatingEnter)(...args)),
|
|
57
|
+
onMouseleave: _cache[4] || (_cache[4] = (...args) => unref(onFloatingLeave) && unref(onFloatingLeave)(...args))
|
|
58
|
+
}, [renderSlot(_ctx.$slots, "content", {}, () => [createElementVNode("pre", _hoisted_1, toDisplayString(__props.content), 1)])], 36)) : createCommentVNode("v-if", true)], 8, ["to"]))], 64);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/tooltip.vue
|
|
65
|
+
var tooltip_default = tooltip_vue_vue_type_script_setup_true_lang_default;
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { tooltip_default as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as table_default } from "./table-
|
|
1
|
+
import { t as table_default } from "./table-CaUMjs4M.js";
|
|
2
2
|
import { computed, createElementBlock, createTextVNode, createVNode, defineComponent, openBlock, toDisplayString, withCtx } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/renderers/yaml.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -18,18 +18,10 @@ var yaml_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
-
mediumZoom: {
|
|
22
|
-
type: Object,
|
|
23
|
-
required: true
|
|
24
|
-
},
|
|
25
21
|
indexKey: {
|
|
26
22
|
type: [Number, String],
|
|
27
23
|
required: true
|
|
28
24
|
},
|
|
29
|
-
getContainer: {
|
|
30
|
-
type: Function,
|
|
31
|
-
required: true
|
|
32
|
-
},
|
|
33
25
|
controls: {
|
|
34
26
|
type: [Boolean, Object],
|
|
35
27
|
required: false
|
|
@@ -9,7 +9,13 @@ var button = {
|
|
|
9
9
|
"copy": "复制",
|
|
10
10
|
"download": "下载",
|
|
11
11
|
"minimize": "最小化",
|
|
12
|
-
"maximize": "最大化"
|
|
12
|
+
"maximize": "最大化",
|
|
13
|
+
"flipY": "翻转 Y",
|
|
14
|
+
"flipX": "翻转 X",
|
|
15
|
+
"rotateLeft": "左转",
|
|
16
|
+
"rotateRight": "右转",
|
|
17
|
+
"previous": "上个",
|
|
18
|
+
"next": "下个"
|
|
13
19
|
};
|
|
14
20
|
var error = {
|
|
15
21
|
"vanilla": "错误",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as button_default } from "./button-
|
|
3
|
-
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot, unref, withModifiers } from "vue";
|
|
1
|
+
import { H as useContext, t as useZoom, u as useI18n } from "./composables-yny5gJo3.js";
|
|
2
|
+
import { t as button_default } from "./button-BQhuT7wh.js";
|
|
3
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, 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
|
|
6
6
|
const _hoisted_1 = { "data-stream-markdown": "zoom-inner" };
|
|
@@ -12,10 +12,20 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
12
12
|
required: false,
|
|
13
13
|
default: true
|
|
14
14
|
},
|
|
15
|
+
controlSize: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
default: "vanilla"
|
|
19
|
+
},
|
|
15
20
|
position: {
|
|
16
21
|
type: String,
|
|
17
22
|
required: false,
|
|
18
23
|
default: "bottom-right"
|
|
24
|
+
},
|
|
25
|
+
containerStyle: {
|
|
26
|
+
type: Object,
|
|
27
|
+
required: false,
|
|
28
|
+
default: () => ({})
|
|
19
29
|
}
|
|
20
30
|
},
|
|
21
31
|
setup(__props) {
|
|
@@ -25,7 +35,7 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
25
35
|
const { icons } = useContext();
|
|
26
36
|
const { zoom, isDragging, transformStyle, zoomIn, zoomOut, resetZoom, startDrag, onDrag, stopDrag, handleWheel, handleTouchStart, handleTouchMove, handleTouchEnd } = useZoom();
|
|
27
37
|
const zoomPercent = computed(() => `${Math.round(zoom.value * 100)}%`);
|
|
28
|
-
const
|
|
38
|
+
const controlsPosition = computed(() => {
|
|
29
39
|
switch (props.position) {
|
|
30
40
|
case "top-left": return {
|
|
31
41
|
top: "0.5rem",
|
|
@@ -35,10 +45,20 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
35
45
|
top: "0.5rem",
|
|
36
46
|
right: "0.5rem"
|
|
37
47
|
};
|
|
48
|
+
case "top-center": return {
|
|
49
|
+
top: "0.5rem",
|
|
50
|
+
left: "50%",
|
|
51
|
+
transform: "translateX(-50%)"
|
|
52
|
+
};
|
|
38
53
|
case "bottom-left": return {
|
|
39
54
|
bottom: "0.5rem",
|
|
40
55
|
left: "0.5rem"
|
|
41
56
|
};
|
|
57
|
+
case "bottom-center": return {
|
|
58
|
+
bottom: "0.5rem",
|
|
59
|
+
left: "50%",
|
|
60
|
+
transform: "translateX(-50%)"
|
|
61
|
+
};
|
|
42
62
|
case "bottom-right":
|
|
43
63
|
default: return {
|
|
44
64
|
bottom: "0.5rem",
|
|
@@ -46,6 +66,14 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
46
66
|
};
|
|
47
67
|
}
|
|
48
68
|
});
|
|
69
|
+
const controlButtonProps = computed(() => {
|
|
70
|
+
if (props.controlSize === "vanilla") return {};
|
|
71
|
+
return {
|
|
72
|
+
iconWidth: 18,
|
|
73
|
+
iconHeight: 18,
|
|
74
|
+
buttonStyle: { fontSize: "0.875rem" }
|
|
75
|
+
};
|
|
76
|
+
});
|
|
49
77
|
function onWheel(event) {
|
|
50
78
|
if (containerRef.value) handleWheel(event, containerRef.value);
|
|
51
79
|
}
|
|
@@ -67,40 +95,39 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
67
95
|
onTouchstart: onTouchStart,
|
|
68
96
|
onTouchmove: onTouchMove,
|
|
69
97
|
onTouchend: onTouchEnd,
|
|
70
|
-
onPointerdown: _cache[
|
|
71
|
-
onPointermove: _cache[
|
|
72
|
-
onPointerup: _cache[
|
|
73
|
-
onPointercancel: _cache[
|
|
74
|
-
onPointerleave: _cache[
|
|
98
|
+
onPointerdown: _cache[2] || (_cache[2] = withModifiers((...args) => unref(startDrag) && unref(startDrag)(...args), ["prevent"])),
|
|
99
|
+
onPointermove: _cache[3] || (_cache[3] = withModifiers((...args) => unref(onDrag) && unref(onDrag)(...args), ["prevent"])),
|
|
100
|
+
onPointerup: _cache[4] || (_cache[4] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
|
|
101
|
+
onPointercancel: _cache[5] || (_cache[5] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
|
|
102
|
+
onPointerleave: _cache[6] || (_cache[6] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"]))
|
|
75
103
|
}, [__props.showControl ? (openBlock(), createElementBlock("div", {
|
|
76
104
|
key: 0,
|
|
77
105
|
"data-stream-markdown": "zoom-controls",
|
|
78
|
-
style: normalizeStyle(
|
|
106
|
+
style: normalizeStyle(controlsPosition.value),
|
|
107
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
|
|
79
108
|
}, [
|
|
80
|
-
|
|
109
|
+
renderSlot(_ctx.$slots, "controls", normalizeProps(guardReactiveProps(controlButtonProps.value))),
|
|
110
|
+
createVNode(button_default, mergeProps({
|
|
81
111
|
icon: unref(icons).zoomIn,
|
|
82
|
-
name: unref(t)("button.zoomIn")
|
|
83
|
-
|
|
84
|
-
}, null, 8, [
|
|
112
|
+
name: unref(t)("button.zoomIn")
|
|
113
|
+
}, controlButtonProps.value, { onClick: unref(zoomIn) }), null, 16, [
|
|
85
114
|
"icon",
|
|
86
115
|
"name",
|
|
87
116
|
"onClick"
|
|
88
117
|
]),
|
|
89
|
-
createVNode(button_default, {
|
|
118
|
+
createVNode(button_default, mergeProps({
|
|
90
119
|
icon: unref(icons).zoomOut,
|
|
91
|
-
name: unref(t)("button.zoomOut")
|
|
92
|
-
|
|
93
|
-
}, null, 8, [
|
|
120
|
+
name: unref(t)("button.zoomOut")
|
|
121
|
+
}, controlButtonProps.value, { onClick: unref(zoomOut) }), null, 16, [
|
|
94
122
|
"icon",
|
|
95
123
|
"name",
|
|
96
124
|
"onClick"
|
|
97
125
|
]),
|
|
98
|
-
createVNode(button_default, {
|
|
126
|
+
createVNode(button_default, mergeProps({
|
|
99
127
|
title: unref(t)("button.resetZoom"),
|
|
100
128
|
name: zoomPercent.value,
|
|
101
|
-
variant: "text"
|
|
102
|
-
|
|
103
|
-
}, null, 8, [
|
|
129
|
+
variant: "text"
|
|
130
|
+
}, controlButtonProps.value, { onClick: unref(resetZoom) }), null, 16, [
|
|
104
131
|
"title",
|
|
105
132
|
"name",
|
|
106
133
|
"onClick"
|
|
@@ -109,8 +136,10 @@ var zoom_container_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
109
136
|
"data-stream-markdown": "zoom-transform-container",
|
|
110
137
|
style: normalizeStyle({
|
|
111
138
|
...unref(transformStyle),
|
|
139
|
+
...__props.containerStyle,
|
|
112
140
|
cursor: unref(isDragging) ? "grabbing" : "grab"
|
|
113
|
-
})
|
|
141
|
+
}),
|
|
142
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
114
143
|
}, [renderSlot(_ctx.$slots, "default")], 4)])], 544);
|
|
115
144
|
};
|
|
116
145
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-stream-markdown",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"description": "Streaming markdown output, Useful for text streams like LLM outputs.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
@@ -52,19 +52,17 @@
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
+
"@floating-ui/vue": "^1.1.9",
|
|
55
56
|
"@vueuse/core": "^14.1.0",
|
|
56
57
|
"markdown-it-async": "^2.2.0",
|
|
57
|
-
"
|
|
58
|
-
"remend": "^1.0.1",
|
|
59
|
-
"tippy.js": "^6.3.7",
|
|
60
|
-
"vue-tippy": "^6.7.1"
|
|
58
|
+
"remend": "^1.0.1"
|
|
61
59
|
},
|
|
62
60
|
"devDependencies": {
|
|
63
|
-
"@antfu/eslint-config": "^6.
|
|
61
|
+
"@antfu/eslint-config": "^6.6.1",
|
|
64
62
|
"@antfu/utils": "^9.3.0",
|
|
65
63
|
"@iconify-json/catppuccin": "^1.2.17",
|
|
66
64
|
"@iconify-json/lucide": "^1.2.79",
|
|
67
|
-
"@types/node": "^24.10.
|
|
65
|
+
"@types/node": "^24.10.3",
|
|
68
66
|
"@unocss/eslint-plugin": "66.5.9",
|
|
69
67
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
70
68
|
"@vue/test-utils": "^2.4.6",
|
|
@@ -87,16 +85,17 @@
|
|
|
87
85
|
"pncat": "^0.7.7",
|
|
88
86
|
"simple-git-hooks": "^2.13.1",
|
|
89
87
|
"taze": "^19.9.2",
|
|
90
|
-
"
|
|
88
|
+
"treechop": "^0.1.2",
|
|
89
|
+
"tsdown": "^0.17.2",
|
|
91
90
|
"tsx": "^4.21.0",
|
|
92
91
|
"typescript": "^5.9.3",
|
|
93
92
|
"unocss": "^66.5.10",
|
|
94
93
|
"unplugin-icons": "^22.5.0",
|
|
95
94
|
"unplugin-lightningcss": "^0.4.3",
|
|
96
|
-
"vite": "^7.2.
|
|
95
|
+
"vite": "^7.2.7",
|
|
97
96
|
"vitepress": "^1.6.4",
|
|
98
97
|
"vitest": "^4.0.15",
|
|
99
|
-
"vue-tsc": "^3.1.
|
|
98
|
+
"vue-tsc": "^3.1.8"
|
|
100
99
|
},
|
|
101
100
|
"simple-git-hooks": {
|
|
102
101
|
"pre-commit": "pnpm lint-staged"
|
package/dist/button-D6ccVxGm.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./previewers-ByaS2Ksa.js";
|
|
2
|
-
import "./composables-Cx0nvyHl.js";
|
|
3
|
-
import "./tooltip-3UDC9mw-.js";
|
|
4
|
-
import "./button-jFTF378X.js";
|
|
5
|
-
import "./modal-CuQR21UD.js";
|
|
6
|
-
import { t as code_block_default } from "./code-block-uZcUI59D.js";
|
|
7
|
-
import "./segmented-DBW9ignu.js";
|
|
8
|
-
|
|
9
|
-
export { code_block_default as default };
|
package/dist/modal-CuQR21UD.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeStyle, openBlock, renderSlot, toDisplayString, unref, useModel, useSlots, withCtx } from "vue";
|
|
2
|
-
|
|
3
|
-
//#region src/components/modal.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
const _hoisted_1 = {
|
|
5
|
-
key: 0,
|
|
6
|
-
"data-stream-markdown": "modal-header"
|
|
7
|
-
};
|
|
8
|
-
const _hoisted_2 = { "data-stream-markdown": "modal-actions" };
|
|
9
|
-
const _hoisted_3 = { "data-stream-markdown": "modal-body" };
|
|
10
|
-
var modal_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
11
|
-
__name: "modal",
|
|
12
|
-
props: /* @__PURE__ */ mergeModels({
|
|
13
|
-
title: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: false
|
|
16
|
-
},
|
|
17
|
-
closable: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
zIndex: {
|
|
22
|
-
type: Number,
|
|
23
|
-
required: false,
|
|
24
|
-
default: 1e3
|
|
25
|
-
},
|
|
26
|
-
getContainer: {
|
|
27
|
-
type: Function,
|
|
28
|
-
required: false
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
"open": {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
required: false,
|
|
34
|
-
default: false
|
|
35
|
-
},
|
|
36
|
-
"openModifiers": {}
|
|
37
|
-
}),
|
|
38
|
-
emits: ["update:open"],
|
|
39
|
-
setup(__props) {
|
|
40
|
-
const props = __props;
|
|
41
|
-
const slots = useSlots();
|
|
42
|
-
const open = useModel(__props, "open");
|
|
43
|
-
const container = props.getContainer ? props.getContainer() || "body" : "body";
|
|
44
|
-
const modalStyle = computed(() => ({ zIndex: props.zIndex }));
|
|
45
|
-
const showHeader = computed(() => !!props.title || props.closable || !!slots.title || !!slots.extra);
|
|
46
|
-
return (_ctx, _cache) => {
|
|
47
|
-
return openBlock(), createBlock(Teleport, { to: unref(container) }, [createVNode(Transition, {
|
|
48
|
-
name: "modal",
|
|
49
|
-
appear: ""
|
|
50
|
-
}, {
|
|
51
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", {
|
|
52
|
-
key: 0,
|
|
53
|
-
"data-stream-markdown": "modal",
|
|
54
|
-
style: normalizeStyle(modalStyle.value)
|
|
55
|
-
}, [showHeader.value ? (openBlock(), createElementBlock("header", _hoisted_1, [
|
|
56
|
-
renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)]),
|
|
57
|
-
renderSlot(_ctx.$slots, "header-center", {}, () => [_cache[0] || (_cache[0] = createElementVNode("div", null, null, -1))]),
|
|
58
|
-
createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "actions")])
|
|
59
|
-
])) : createCommentVNode("v-if", true), createElementVNode("main", _hoisted_3, [renderSlot(_ctx.$slots, "default")])], 4)) : createCommentVNode("v-if", true)]),
|
|
60
|
-
_: 3
|
|
61
|
-
})], 8, ["to"]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/components/modal.vue
|
|
68
|
-
var modal_default = modal_vue_vue_type_script_setup_true_lang_default;
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
export { modal_default as t };
|
package/dist/modal-DcpxxDDX.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-DL0PcUXX.js")),
|
|
6
|
-
mermaid: defineAsyncComponent(() => import("./mermaid-CYrA8rCl.js"))
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { CODE_PREVIEWERS as t };
|
package/dist/spin-Bz4zGBEo.js
DELETED
package/dist/table-CZLbUHiJ.js
DELETED
package/dist/tooltip-3UDC9mw-.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { B as useContext } from "./composables-Cx0nvyHl.js";
|
|
2
|
-
import { computed, createBlock, createElementVNode, defineComponent, openBlock, ref, renderSlot, toDisplayString, unref, withCtx } from "vue";
|
|
3
|
-
import { Tippy } from "vue-tippy";
|
|
4
|
-
|
|
5
|
-
//#region src/components/tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
const _hoisted_1 = { "data-stream-markdown": "tooltip-overlay" };
|
|
7
|
-
var tooltip_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "tooltip",
|
|
9
|
-
props: {
|
|
10
|
-
content: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: false
|
|
13
|
-
},
|
|
14
|
-
trigger: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: false
|
|
17
|
-
},
|
|
18
|
-
placement: {
|
|
19
|
-
type: null,
|
|
20
|
-
required: false
|
|
21
|
-
},
|
|
22
|
-
interactive: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
required: false
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
setup(__props, { expose: __expose }) {
|
|
28
|
-
const { isDark, getContainer } = useContext();
|
|
29
|
-
const tippyRef = ref();
|
|
30
|
-
const appendTo = computed(() => getContainer() || "parent");
|
|
31
|
-
__expose({
|
|
32
|
-
show: () => {
|
|
33
|
-
var _tippyRef$value;
|
|
34
|
-
return (_tippyRef$value = tippyRef.value) === null || _tippyRef$value === void 0 ? void 0 : _tippyRef$value.show();
|
|
35
|
-
},
|
|
36
|
-
hide: () => {
|
|
37
|
-
var _tippyRef$value2;
|
|
38
|
-
return (_tippyRef$value2 = tippyRef.value) === null || _tippyRef$value2 === void 0 ? void 0 : _tippyRef$value2.hide();
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createBlock(unref(Tippy), {
|
|
43
|
-
ref_key: "tippyRef",
|
|
44
|
-
ref: tippyRef,
|
|
45
|
-
trigger: __props.trigger,
|
|
46
|
-
placement: __props.placement,
|
|
47
|
-
interactive: __props.interactive,
|
|
48
|
-
"append-to": appendTo.value,
|
|
49
|
-
theme: unref(isDark) ? "" : "light",
|
|
50
|
-
"data-stream-markdown": "tooltip"
|
|
51
|
-
}, {
|
|
52
|
-
content: withCtx(() => [renderSlot(_ctx.$slots, "content", {}, () => [createElementVNode("pre", _hoisted_1, toDisplayString(__props.content), 1)])]),
|
|
53
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
54
|
-
_: 3
|
|
55
|
-
}, 8, [
|
|
56
|
-
"trigger",
|
|
57
|
-
"placement",
|
|
58
|
-
"interactive",
|
|
59
|
-
"append-to",
|
|
60
|
-
"theme"
|
|
61
|
-
]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/components/tooltip.vue
|
|
68
|
-
var tooltip_default = tooltip_vue_vue_type_script_setup_true_lang_default;
|
|
69
|
-
|
|
70
|
-
//#endregion
|
|
71
|
-
export { tooltip_default as t };
|
package/dist/tooltip-CAoc_U1X.js
DELETED
package/dist/vanilla-De7W3PpS.js
DELETED