vue-stream-markdown 0.1.4 → 0.1.6

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.
Files changed (196) hide show
  1. package/README.md +3 -1
  2. package/dist/arrow-left-DiHYz8df.js +25 -0
  3. package/dist/{blockquote-DdEg2gww.js → blockquote-CxA1dQZe.js} +4 -11
  4. package/dist/{button-jFTF378X.js → button-B2ebQt7R.js} +2 -3
  5. package/dist/button-C6zIegam.js +5 -0
  6. package/dist/{code-BxWvKFxG.js → code-CPG6B2Cw.js} +12 -20
  7. package/dist/code-block--1wFjtmu.js +9 -0
  8. package/dist/{code-block-uZcUI59D.js → code-block-I_Yd1Flg.js} +62 -67
  9. package/dist/{composables-Cx0nvyHl.js → composables-DWipZHuF.js} +1119 -840
  10. package/dist/corner-down-left-jxlwq3ox.js +24 -0
  11. package/dist/{delete-BdWzKJCy.js → delete-DQ21z5-F.js} +4 -11
  12. package/dist/dist-CYkm26BF.js +119 -0
  13. package/dist/dropdown-CtWjJiAf.js +5 -0
  14. package/dist/{emphasis-CTuGt1Ok.js → emphasis-BjLkIDQB.js} +4 -11
  15. package/dist/{en-US-Bfc50l3I.js → en-US-K7SXR3gy.js} +8 -1
  16. package/dist/{error-component-Bhl770lu.js → error-component-DSOVrE5J.js} +1 -1
  17. package/dist/error-component-DtcRn_0A.js +4 -0
  18. package/dist/flip-horizontal-CEf7aAdM.js +25 -0
  19. package/dist/footnote-definition-BmS8hchP.js +103 -0
  20. package/dist/footnote-reference-Z2tITeCE.js +86 -0
  21. package/dist/{heading-2vpQQtTH.js → heading-BwBFJB_E.js} +4 -11
  22. package/dist/{html-DL0PcUXX.js → html-DFU0myJP.js} +2 -10
  23. package/dist/image-BLlap3ce.js +242 -0
  24. package/dist/{image-BDtPwitR.js → image-IKvFWz2r.js} +43 -78
  25. package/dist/image-aT9xxnwh.js +8 -0
  26. package/dist/index.css +69 -64
  27. package/dist/index.d.ts +192 -82
  28. package/dist/index.js +291 -65
  29. package/dist/{inline-code-CBoqhfz7.js → inline-code-Bqu84Yyu.js} +2 -10
  30. package/dist/{inline-math-CAqboT7h.js → inline-math-C2Ryxm-K.js} +4 -12
  31. package/dist/{link-C8BSlPhZ.js → link-BXl7E_6o.js} +6 -14
  32. package/dist/{list-BCiFKGaz.js → list-DLcwTZns.js} +4 -11
  33. package/dist/{list-item-p-OLUR_9.js → list-item-H0eYeIdB.js} +4 -11
  34. package/dist/{math-CT1TB2pK.js → math-C-0d5PaJ.js} +4 -12
  35. package/dist/{mermaid-CYrA8rCl.js → mermaid-0x6C2MY5.js} +12 -18
  36. package/dist/modal-BDgfKnFl.js +4 -0
  37. package/dist/modal-CEqU9Ubu.js +94 -0
  38. package/dist/{node-list-CGr_EVtn.js → node-list--v2wbxOo.js} +19 -26
  39. package/dist/node-list-CHvX62Zh.js +4 -0
  40. package/dist/{paragraph-DYjqr_Sa.js → paragraph-DRPfp6DV.js} +4 -11
  41. package/dist/previewers-DsN-cTwd.js +10 -0
  42. package/dist/rotate-ccw-square-5sO65BY9.js +24 -0
  43. package/dist/segmented-DIVDGfR5.js +6 -0
  44. package/dist/{segmented-DBW9ignu.js → segmented-Drf8EBQD.js} +1 -1
  45. package/dist/{shiki-bQYWLdW3.js → shiki-CkwRD3TS.js} +6 -14
  46. package/dist/spin-DWkKEP0G.js +3 -0
  47. package/dist/{strong-CvOjLZiq.js → strong-D6V4fCRG.js} +4 -11
  48. package/dist/table-B2mghd3l.js +3 -0
  49. package/dist/{table-l_3z210v.js → table-DLUgGL5Q.js} +13 -18
  50. package/dist/{text-DuONUqRA.js → text-DoY1TIw3.js} +2 -10
  51. package/dist/{thematic-break-CcNPEI9Y.js → thematic-break-DXDZ5dcO.js} +2 -10
  52. package/dist/tooltip-Bdt9-aQx.js +68 -0
  53. package/dist/tooltip-DQ1-yPia.js +4 -0
  54. package/dist/{vanilla-CFWVwBvD.js → vanilla-BSgZTIo9.js} +1 -1
  55. package/dist/vanilla-DUbuBied.js +4 -0
  56. package/dist/{yaml-DJHrmzSe.js → yaml-3cd5rdJj.js} +3 -11
  57. package/dist/{zh-CN-CL1XGe0H.js → zh-CN-CykTNqF_.js} +9 -2
  58. package/dist/zoom-container-D2DxS8V5.js +6 -0
  59. package/dist/{zoom-container-gjQ0EMyk.js → zoom-container-f44XxzOI.js} +52 -23
  60. package/package.json +9 -10
  61. package/dist/button-D6ccVxGm.js +0 -5
  62. package/dist/code-block-B72JfFy-.js +0 -9
  63. package/dist/dropdown-oiCw8QVq.js +0 -5
  64. package/dist/error-component-8y13-fYG.js +0 -4
  65. package/dist/modal-CuQR21UD.js +0 -71
  66. package/dist/modal-DcpxxDDX.js +0 -3
  67. package/dist/node-list-lgY1wbfQ.js +0 -3
  68. package/dist/previewers-ByaS2Ksa.js +0 -10
  69. package/dist/segmented-B4IEw3wg.js +0 -6
  70. package/dist/spin-Bz4zGBEo.js +0 -3
  71. package/dist/table-CZLbUHiJ.js +0 -3
  72. package/dist/tooltip-3UDC9mw-.js +0 -71
  73. package/dist/tooltip-CAoc_U1X.js +0 -4
  74. package/dist/vanilla-De7W3PpS.js +0 -4
  75. package/dist/zoom-container-DBgGdbJS.js +0 -6
  76. /package/dist/{angular-Chs-UKBr.js → angular-CEQtRU3N.js} +0 -0
  77. /package/dist/{angular-component-Cc_FANXU.js → angular-component-QEWXDi5W.js} +0 -0
  78. /package/dist/{apache-COYnc6xR.js → apache-D1WYHuA2.js} +0 -0
  79. /package/dist/{asciidoc-BabXBDAL.js → asciidoc-BbV_Tvaj.js} +0 -0
  80. /package/dist/{assembly-CDqKhexW.js → assembly-DOdgqSeT.js} +0 -0
  81. /package/dist/{astro-C9kftzFG.js → astro-I7-Zr25r.js} +0 -0
  82. /package/dist/{bash-Ce4pNIkV.js → bash-BC7HOdMh.js} +0 -0
  83. /package/dist/{batch-CHQBRjFL.js → batch-XAv7F3kV.js} +0 -0
  84. /package/dist/{bicep-8jxWtuBF.js → bicep-B9IAZzHb.js} +0 -0
  85. /package/dist/{c-FBUef746.js → c-B3pMu4KG.js} +0 -0
  86. /package/dist/{check-C4xOk8um.js → check-BjAiKMbo.js} +0 -0
  87. /package/dist/{chevron-down-cnOJ4h1g.js → chevron-down-B4lkjpIC.js} +0 -0
  88. /package/dist/{circle-alert-CLX-h5rZ.js → circle-alert-DlAafH7h.js} +0 -0
  89. /package/dist/{clojure-BulUroSy.js → clojure-DwxK-YDX.js} +0 -0
  90. /package/dist/{cmake-CW3vz1Mo.js → cmake-DtnmI6Z6.js} +0 -0
  91. /package/dist/{cobol-CIn3oFju.js → cobol--wWeXL_f.js} +0 -0
  92. /package/dist/{code-D8LSp8rK.js → code-lfRPXNJI.js} +0 -0
  93. /package/dist/{codeowners-CJggXF_b.js → codeowners-Dtwyh-5g.js} +0 -0
  94. /package/dist/{coffeescript-CBrVvzGY.js → coffeescript-BlF7y2QG.js} +0 -0
  95. /package/dist/{copy-Cabve0xf.js → copy-BTFPPhff.js} +0 -0
  96. /package/dist/{cpp-BTKeuyd-.js → cpp-D_TbJeEH.js} +0 -0
  97. /package/dist/{crystal-DyIYvZbm.js → crystal-lJ2ZzJQu.js} +0 -0
  98. /package/dist/{csharp-NqZ1vyF9.js → csharp-D-5hlCJT.js} +0 -0
  99. /package/dist/{css-BpR5Lajb.js → css-Drykp8uH.js} +0 -0
  100. /package/dist/{csv-eCMFnKKK.js → csv-oLjD_o9N.js} +0 -0
  101. /package/dist/{cue-TY97dGOQ.js → cue-BBe_9OA4.js} +0 -0
  102. /package/dist/{d-NftUsdTd.js → d-CPNK2-3G.js} +0 -0
  103. /package/dist/{dart-DJpwZZbk.js → dart-BNaQZJdJ.js} +0 -0
  104. /package/dist/{database-aZwE71Px.js → database-DRAhifbf.js} +0 -0
  105. /package/dist/{diff-CYRzypaU.js → diff-D_vIvULL.js} +0 -0
  106. /package/dist/{docker-CxHBuukH.js → docker-BgJkkqCD.js} +0 -0
  107. /package/dist/{download-Bnn7rtYw.js → download-Bk2mYZyf.js} +0 -0
  108. /package/dist/{elixir-BKSxVc1h.js → elixir-CTx5aScS.js} +0 -0
  109. /package/dist/{elm-DScuAf3X.js → elm-nHy9iRuu.js} +0 -0
  110. /package/dist/{env-CDAKsodl.js → env-CrWzDcwP.js} +0 -0
  111. /package/dist/{erlang-D2M1ZL3m.js → erlang-CxR4-Qdt.js} +0 -0
  112. /package/dist/{eye-CdeX8PhP.js → eye-DpAj1af-.js} +0 -0
  113. /package/dist/{fortran-CORyQ0wt.js → fortran-DhUZYzo3.js} +0 -0
  114. /package/dist/{fsharp-BJz_Jgpl.js → fsharp-DyIvnsyH.js} +0 -0
  115. /package/dist/{git-DgrlTr1E.js → git-D4qjCZtd.js} +0 -0
  116. /package/dist/{gleam-t_xad9Kw.js → gleam-D-ovCBt_.js} +0 -0
  117. /package/dist/{go-Cvlh1xtL.js → go-CEH2y3pJ.js} +0 -0
  118. /package/dist/{graphql-ApIm0mDD.js → graphql-DbV-8_AJ.js} +0 -0
  119. /package/dist/{groovy-CaLnK8PV.js → groovy-B-_VVp4c.js} +0 -0
  120. /package/dist/{haml-MwijEO_6.js → haml-Cnm_v56B.js} +0 -0
  121. /package/dist/{handlebars-CKdUPI9h.js → handlebars-8EEQS0El.js} +0 -0
  122. /package/dist/{haskell-NPOXEnck.js → haskell-cLvKQFrd.js} +0 -0
  123. /package/dist/{haxe-DyKBMsDE.js → haxe-DtCGwrr1.js} +0 -0
  124. /package/dist/{html-CMgES1dE.js → html-C2NHp3i4.js} +0 -0
  125. /package/dist/{http-B9FFNmUr.js → http-DYO1Ugj7.js} +0 -0
  126. /package/dist/{image-CMZAakWu.js → image-DDiNDOKJ.js} +0 -0
  127. /package/dist/{java-iU-L9wJz.js → java-it6UCC5M.js} +0 -0
  128. /package/dist/{javascript-DtnWdTFC.js → javascript-DVxfoa-a.js} +0 -0
  129. /package/dist/{jinja-CoWszo_D.js → jinja-CUKX2CXM.js} +0 -0
  130. /package/dist/{json-C80qKCnh.js → json-O68iFOiu.js} +0 -0
  131. /package/dist/{julia-DG2BCBLx.js → julia-Dq3BwHeZ.js} +0 -0
  132. /package/dist/{kdl-7twRfIlJ.js → kdl-CFVZba8u.js} +0 -0
  133. /package/dist/{kotlin-BjrOgP7R.js → kotlin-BKhxhG0q.js} +0 -0
  134. /package/dist/{latex-DIQfUvG8.js → latex-B3hQqfJO.js} +0 -0
  135. /package/dist/{less-BJ1yEAWt.js → less-Bw2JZJkw.js} +0 -0
  136. /package/dist/{link-DeV4CQOB.js → link-DCaSecEI.js} +0 -0
  137. /package/dist/{liquid-BqKFZ1wQ.js → liquid-BsGDMxjJ.js} +0 -0
  138. /package/dist/{lisp-oekhB2ti.js → lisp-CnrazyOe.js} +0 -0
  139. /package/dist/{log-D1XEqR9q.js → log-BuRjhdbZ.js} +0 -0
  140. /package/dist/{lua-C5Q97-1D.js → lua-CA97s0xX.js} +0 -0
  141. /package/dist/{luau-BT8KwqZ2.js → luau-hq6gk9_N.js} +0 -0
  142. /package/dist/{makefile-B4a0ciG4.js → makefile-mNhrnPWo.js} +0 -0
  143. /package/dist/{markdown-DvNyKsiJ.js → markdown-El6B7b99.js} +0 -0
  144. /package/dist/{marko-BzsIf6bg.js → marko-8nTOMumd.js} +0 -0
  145. /package/dist/{matlab-cMBkmDhQ.js → matlab-DuqengFv.js} +0 -0
  146. /package/dist/{maximize-4PIqBONS.js → maximize-B1-N6kOL.js} +0 -0
  147. /package/dist/{mermaid-8JIH2gkQ.js → mermaid-Byu8TsQE.js} +0 -0
  148. /package/dist/{minimize-BJ8htyDF.js → minimize-CVVLdf2H.js} +0 -0
  149. /package/dist/{nextflow-DNmqU1xg.js → nextflow-DRCOPmGT.js} +0 -0
  150. /package/dist/{nginx-DDfYF_rj.js → nginx-DTgW--wm.js} +0 -0
  151. /package/dist/{nim-D9xEmy4k.js → nim-r-ftp-xj.js} +0 -0
  152. /package/dist/{nix-BV1Deshw.js → nix-BdWPBS1Z.js} +0 -0
  153. /package/dist/{ocaml-BkFn4LL3.js → ocaml-vXi6ujuu.js} +0 -0
  154. /package/dist/{perl-BytUHDE7.js → perl-C_g5vs30.js} +0 -0
  155. /package/dist/{php-BImJJtNM.js → php-C_b0sjdl.js} +0 -0
  156. /package/dist/{postcss-CrZ9_0sT.js → postcss-Bsz3PPjI.js} +0 -0
  157. /package/dist/{powershell-DYSGu7TM.js → powershell-D0kxdwKl.js} +0 -0
  158. /package/dist/{prisma-BhRvcOFY.js → prisma-BocqbK7a.js} +0 -0
  159. /package/dist/{prolog-DuaCKek_.js → prolog-D-zd1rzT.js} +0 -0
  160. /package/dist/{properties-BbIJwuP-.js → properties-Dds-063G.js} +0 -0
  161. /package/dist/{proto-CE0aVW11.js → proto-CzD9trm_.js} +0 -0
  162. /package/dist/{pug-B1-IC-Tc.js → pug-B1V2RxQS.js} +0 -0
  163. /package/dist/{puppet-8nYquiMG.js → puppet-BcnVd0q5.js} +0 -0
  164. /package/dist/{python-DhRyfBrD.js → python-BcZnB7mH.js} +0 -0
  165. /package/dist/{r-Cjje17IA.js → r-CxSFFuvL.js} +0 -0
  166. /package/dist/{racket-Dx0gMnpg.js → racket-DJ_82PRG.js} +0 -0
  167. /package/dist/{razor-DPht_bdD.js → razor-D7IkXHVQ.js} +0 -0
  168. /package/dist/{ruby-B8RxtCzI.js → ruby-Cidk52Rl.js} +0 -0
  169. /package/dist/{rust-Cjtli6yf.js → rust-DJvcpkbm.js} +0 -0
  170. /package/dist/{sass-Dv3DMzjs.js → sass-DTFDeixE.js} +0 -0
  171. /package/dist/{scala-B7bZGKXq.js → scala-GlHhGi5O.js} +0 -0
  172. /package/dist/{scheme-B2PsEdVN.js → scheme-rNcj5mL9.js} +0 -0
  173. /package/dist/{shader-BZzu3zGr.js → shader-Df9eByRK.js} +0 -0
  174. /package/dist/{shiki-token-renderer-D164wC7Y.js → shiki-token-renderer-BMveKuYt.js} +0 -0
  175. /package/dist/{solidity-CLieFYpL.js → solidity-CfuYjRuT.js} +0 -0
  176. /package/dist/{spin-Ds5W7qC_.js → spin-D4Oi_m7j.js} +0 -0
  177. /package/dist/{stata-C0yUiO47.js → stata-BB5c_hbh.js} +0 -0
  178. /package/dist/{svelte-rtF4yNGL.js → svelte-2ISqxu6B.js} +0 -0
  179. /package/dist/{swift-CzvYoIM0.js → swift-wpybyudn.js} +0 -0
  180. /package/dist/{table-4ec9FVB_.js → table-iNA4la0w.js} +0 -0
  181. /package/dist/{terraform-CD_BZGb-.js → terraform-CLzhaCaX.js} +0 -0
  182. /package/dist/{text-D1-vbZ7l.js → text-C0mKr3tC.js} +0 -0
  183. /package/dist/{toml-C6jUF0Xd.js → toml-DImd1uev.js} +0 -0
  184. /package/dist/{twig-C4dfP84J.js → twig-DEBVmtOq.js} +0 -0
  185. /package/dist/{typescript-Bk-pp-cK.js → typescript-Xo5tgeOd.js} +0 -0
  186. /package/dist/{typst-DPCpaVSH.js → typst-_Ui0vNYP.js} +0 -0
  187. /package/dist/{v-nRGMJ2Ki.js → v-Ch6vEAHG.js} +0 -0
  188. /package/dist/{vala-B78bKcY0.js → vala-Ds_Ad1cC.js} +0 -0
  189. /package/dist/{verilog-CRpkl76S.js → verilog-CUqRomTC.js} +0 -0
  190. /package/dist/{vim-DpKnut7b.js → vim-BFUPh6oM.js} +0 -0
  191. /package/dist/{vue-D5eadhjo.js → vue-DzgIlbJ2.js} +0 -0
  192. /package/dist/{xml-Dvx5F-hl.js → xml-CmbQxaqc.js} +0 -0
  193. /package/dist/{yaml-n1S8nAOh.js → yaml-BhwCoLnZ.js} +0 -0
  194. /package/dist/{zig-R-iFzxfW.js → zig-Bmrmp8vo.js} +0 -0
  195. /package/dist/{zoomIn-CEukuh3x.js → zoomIn-CCKcyIEv.js} +0 -0
  196. /package/dist/{zoomOut-qlzQyQli.js → zoomOut-BrSwLQZ_.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { B as useContext, t as useZoom, u as useI18n } from "./composables-Cx0nvyHl.js";
2
- import { t as button_default } from "./button-jFTF378X.js";
3
- import { computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeStyle, openBlock, ref, renderSlot, unref, withModifiers } from "vue";
1
+ import { H as useContext, P as useI18n, t as useZoom } from "./composables-DWipZHuF.js";
2
+ import { t as button_default } from "./button-B2ebQt7R.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 controlsStyle = computed(() => {
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[0] || (_cache[0] = withModifiers((...args) => unref(startDrag) && unref(startDrag)(...args), ["prevent"])),
71
- onPointermove: _cache[1] || (_cache[1] = withModifiers((...args) => unref(onDrag) && unref(onDrag)(...args), ["prevent"])),
72
- onPointerup: _cache[2] || (_cache[2] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
73
- onPointercancel: _cache[3] || (_cache[3] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"])),
74
- onPointerleave: _cache[4] || (_cache[4] = withModifiers((...args) => unref(stopDrag) && unref(stopDrag)(...args), ["prevent"]))
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(controlsStyle.value)
106
+ style: normalizeStyle(controlsPosition.value),
107
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
79
108
  }, [
80
- createVNode(button_default, {
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
- onClick: unref(zoomIn)
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
- onClick: unref(zoomOut)
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
- onClick: unref(resetZoom)
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",
4
+ "version": "0.1.6",
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
- "medium-zoom": "^1.1.0",
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.4.2",
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.1",
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
- "tsdown": "^0.17.0",
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.6",
95
+ "vite": "^7.2.7",
97
96
  "vitepress": "^1.6.4",
98
97
  "vitest": "^4.0.15",
99
- "vue-tsc": "^3.1.6"
98
+ "vue-tsc": "^3.1.8"
100
99
  },
101
100
  "simple-git-hooks": {
102
101
  "pre-commit": "pnpm lint-staged"
@@ -1,5 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import "./tooltip-3UDC9mw-.js";
3
- import { t as button_default } from "./button-jFTF378X.js";
4
-
5
- export { button_default as default };
@@ -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 };
@@ -1,5 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import "./tooltip-3UDC9mw-.js";
3
- import { n as dropdown_default } from "./button-jFTF378X.js";
4
-
5
- export { dropdown_default as default };
@@ -1,4 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import { t as error_component_default } from "./error-component-Bhl770lu.js";
3
-
4
- export { error_component_default as default };
@@ -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 };
@@ -1,3 +0,0 @@
1
- import { t as modal_default } from "./modal-CuQR21UD.js";
2
-
3
- export { modal_default as default };
@@ -1,3 +0,0 @@
1
- import { t as node_list_default } from "./node-list-CGr_EVtn.js";
2
-
3
- export { node_list_default as default };
@@ -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 };
@@ -1,6 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import "./tooltip-3UDC9mw-.js";
3
- import "./button-jFTF378X.js";
4
- import { t as segmented_default } from "./segmented-DBW9ignu.js";
5
-
6
- export { segmented_default as default };
@@ -1,3 +0,0 @@
1
- import { t as spin_default } from "./spin-Ds5W7qC_.js";
2
-
3
- export { spin_default as default };
@@ -1,3 +0,0 @@
1
- import { t as table_default } from "./table-4ec9FVB_.js";
2
-
3
- export { table_default as default };
@@ -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 };
@@ -1,4 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import { t as tooltip_default } from "./tooltip-3UDC9mw-.js";
3
-
4
- export { tooltip_default as default };
@@ -1,4 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import { t as vanilla_default } from "./vanilla-CFWVwBvD.js";
3
-
4
- export { vanilla_default as default };
@@ -1,6 +0,0 @@
1
- import "./composables-Cx0nvyHl.js";
2
- import "./tooltip-3UDC9mw-.js";
3
- import "./button-jFTF378X.js";
4
- import { t as zoom_container_default } from "./zoom-container-gjQ0EMyk.js";
5
-
6
- export { zoom_container_default as default };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes