vue-data-ui 3.23.6 → 3.23.7

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 (153) hide show
  1. package/dist/{PackageVersion-BZs_wnK5.js → PackageVersion-Dy83B80Q.js} +1 -1
  2. package/dist/PenAndPaper-C0UZ74fa.js +571 -0
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-accordion.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-annotator.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-bump.js +1 -1
  9. package/dist/components/vue-ui-candlestick.js +1 -1
  10. package/dist/components/vue-ui-carousel-table.js +1 -1
  11. package/dist/components/vue-ui-chestnut.js +1 -1
  12. package/dist/components/vue-ui-chord.js +1 -1
  13. package/dist/components/vue-ui-circle-pack.js +1 -1
  14. package/dist/components/vue-ui-cursor.js +1 -1
  15. package/dist/components/vue-ui-dag.js +1 -1
  16. package/dist/components/vue-ui-dashboard.js +1 -1
  17. package/dist/components/vue-ui-digits.js +1 -1
  18. package/dist/components/vue-ui-donut-evolution.js +1 -1
  19. package/dist/components/vue-ui-donut.js +1 -1
  20. package/dist/components/vue-ui-dumbbell.js +1 -1
  21. package/dist/components/vue-ui-flow.js +1 -1
  22. package/dist/components/vue-ui-funnel.js +1 -1
  23. package/dist/components/vue-ui-galaxy.js +1 -1
  24. package/dist/components/vue-ui-gauge.js +1 -1
  25. package/dist/components/vue-ui-geo.js +1 -1
  26. package/dist/components/vue-ui-gizmo.js +1 -1
  27. package/dist/components/vue-ui-heatmap.js +1 -1
  28. package/dist/components/vue-ui-hill.js +1 -1
  29. package/dist/components/vue-ui-history-plot.js +1 -1
  30. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  31. package/dist/components/vue-ui-kpi.js +1 -1
  32. package/dist/components/vue-ui-mini-loader.js +1 -1
  33. package/dist/components/vue-ui-molecule.js +1 -1
  34. package/dist/components/vue-ui-mood-radar.js +1 -1
  35. package/dist/components/vue-ui-nested-donuts.js +1 -1
  36. package/dist/components/vue-ui-onion.js +1 -1
  37. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  38. package/dist/components/vue-ui-quadrant.js +1 -1
  39. package/dist/components/vue-ui-quick-chart.js +1 -1
  40. package/dist/components/vue-ui-radar.js +1 -1
  41. package/dist/components/vue-ui-rating.js +1 -1
  42. package/dist/components/vue-ui-relation-circle.js +1 -1
  43. package/dist/components/vue-ui-ridgeline.js +1 -1
  44. package/dist/components/vue-ui-rings.js +1 -1
  45. package/dist/components/vue-ui-scatter.js +1 -1
  46. package/dist/components/vue-ui-skeleton.js +1 -1
  47. package/dist/components/vue-ui-smiley.js +1 -1
  48. package/dist/components/vue-ui-spark-trend.js +1 -1
  49. package/dist/components/vue-ui-sparkbar.js +1 -1
  50. package/dist/components/vue-ui-sparkgauge.js +1 -1
  51. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  52. package/dist/components/vue-ui-sparkline.js +1 -1
  53. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  54. package/dist/components/vue-ui-stackbar.js +1 -1
  55. package/dist/components/vue-ui-stackline.js +1 -1
  56. package/dist/components/vue-ui-strip-plot.js +1 -1
  57. package/dist/components/vue-ui-table-heatmap.js +1 -1
  58. package/dist/components/vue-ui-table-sparkline.js +1 -1
  59. package/dist/components/vue-ui-table.js +1 -1
  60. package/dist/components/vue-ui-thermometer.js +1 -1
  61. package/dist/components/vue-ui-timer.js +1 -1
  62. package/dist/components/vue-ui-tiremarks.js +1 -1
  63. package/dist/components/vue-ui-treemap.js +1 -1
  64. package/dist/components/vue-ui-vertical-bar.js +1 -1
  65. package/dist/components/vue-ui-waffle.js +1 -1
  66. package/dist/components/vue-ui-wheel.js +1 -1
  67. package/dist/components/vue-ui-word-cloud.js +1 -1
  68. package/dist/components/vue-ui-world.js +1 -1
  69. package/dist/components/vue-ui-xy-canvas.js +1 -1
  70. package/dist/components/vue-ui-xy.js +1 -1
  71. package/dist/{package-DpxpyR_I.js → package-CMYqMdZB.js} +1 -1
  72. package/dist/{render-common-WZ4vXtlg.js → render-common-CqzziMg4.js} +1 -1
  73. package/dist/ssr/vue-ui-donut.js +1 -1
  74. package/dist/ssr/vue-ui-xy.js +1 -1
  75. package/dist/ssr.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/types/vue-data-ui.d.ts +2 -0
  78. package/dist/{useConfig-u71vax4T.js → useConfig-DwdGsXTx.js} +2 -0
  79. package/dist/{useObjectBindings-d-C_nl0U.js → useObjectBindings-BKkmFRiI.js} +1 -1
  80. package/dist/utils.js +1 -1
  81. package/dist/{vue-data-ui-CMf1mzF1.js → vue-data-ui-C2MzofEj.js} +68 -68
  82. package/dist/vue-data-ui.js +69 -69
  83. package/dist/{vue-ui-3d-bar-BHi1QlwW.js → vue-ui-3d-bar-DbMCxsYc.js} +2 -2
  84. package/dist/{vue-ui-accordion-DNdBR3LQ.js → vue-ui-accordion-CLU_su1P.js} +1 -1
  85. package/dist/{vue-ui-age-pyramid-CivMIHO6.js → vue-ui-age-pyramid-Dmbk6rMP.js} +2 -2
  86. package/dist/{vue-ui-annotator-fCliMKNQ.js → vue-ui-annotator-QjHngrui.js} +2 -2
  87. package/dist/{vue-ui-bullet-BaRzzJfE.js → vue-ui-bullet-DBZ3n4yK.js} +2 -2
  88. package/dist/{vue-ui-bump-DhQKyCdv.js → vue-ui-bump-CirnIRZw.js} +2 -2
  89. package/dist/{vue-ui-candlestick-C_QlFw1y.js → vue-ui-candlestick-DZX6VVMs.js} +2 -2
  90. package/dist/{vue-ui-carousel-table-DER6q3au.js → vue-ui-carousel-table-CWhd8Plu.js} +2 -2
  91. package/dist/{vue-ui-chestnut-BWc5fSXS.js → vue-ui-chestnut-CMktwDOV.js} +2 -2
  92. package/dist/{vue-ui-chord-Cbp8ULG2.js → vue-ui-chord-_3zAHsdj.js} +2 -2
  93. package/dist/{vue-ui-circle-pack-RDzMeb3A.js → vue-ui-circle-pack-BhcQw1-I.js} +2 -2
  94. package/dist/{vue-ui-cursor-MRKKLhJk.js → vue-ui-cursor-Bo39SVBr.js} +2 -2
  95. package/dist/{vue-ui-dag-0Q6HiGmy.js → vue-ui-dag-DEF_uf-N.js} +2 -2
  96. package/dist/{vue-ui-dashboard-CBWYnHvU.js → vue-ui-dashboard-DFIIsh3Z.js} +66 -66
  97. package/dist/{vue-ui-digits-C3Q7fmPc.js → vue-ui-digits-BrIyw5fg.js} +2 -2
  98. package/dist/{vue-ui-donut-BMrXYTdN.js → vue-ui-donut-CpOqB9bK.js} +2 -2
  99. package/dist/{vue-ui-donut-B5DdD0_x.js → vue-ui-donut-IafNVctv.js} +2 -2
  100. package/dist/{vue-ui-donut-evolution-CEcp64yA.js → vue-ui-donut-evolution-BmNVUdQJ.js} +2 -2
  101. package/dist/{vue-ui-dumbbell-B6V-yVd7.js → vue-ui-dumbbell-Bx0yMiUm.js} +2 -2
  102. package/dist/{vue-ui-flow-Ccx4O4-m.js → vue-ui-flow-Fk99WJs7.js} +2 -2
  103. package/dist/{vue-ui-funnel-CgxQJMUU.js → vue-ui-funnel-D1TarfGe.js} +2 -2
  104. package/dist/{vue-ui-galaxy-CeaKn5Ld.js → vue-ui-galaxy-CTKKLd-F.js} +2 -2
  105. package/dist/{vue-ui-gauge-BCs7VZxY.js → vue-ui-gauge-DixSuz96.js} +2 -2
  106. package/dist/{vue-ui-geo-Djrp8LQ6.js → vue-ui-geo-BdSJqRTr.js} +2 -2
  107. package/dist/{vue-ui-gizmo-BCr3r9Z5.js → vue-ui-gizmo-BvsWv7cn.js} +2 -2
  108. package/dist/{vue-ui-heatmap-DIKxGiAH.js → vue-ui-heatmap-B2BZy3E-.js} +3 -3
  109. package/dist/{vue-ui-hill-DAavuv5-.js → vue-ui-hill-DVJJzAAy.js} +2 -2
  110. package/dist/{vue-ui-history-plot-COfZMiI7.js → vue-ui-history-plot-BmEHbHlS.js} +2 -2
  111. package/dist/{vue-ui-horizontal-bar-B4vrK1QB.js → vue-ui-horizontal-bar-BnoA1A4R.js} +3 -3
  112. package/dist/{vue-ui-kpi-Dlw9Mi3b.js → vue-ui-kpi-DOp84kGR.js} +2 -2
  113. package/dist/{vue-ui-mini-loader-DukGL2bc.js → vue-ui-mini-loader-SNMKnmMa.js} +1 -1
  114. package/dist/{vue-ui-molecule-ehZAzPqn.js → vue-ui-molecule-XDZzvX7C.js} +2 -2
  115. package/dist/{vue-ui-mood-radar-CS9qIJzX.js → vue-ui-mood-radar-D0j2W6G-.js} +2 -2
  116. package/dist/{vue-ui-nested-donuts-CwEd9CDc.js → vue-ui-nested-donuts-BZF53Z7q.js} +2 -2
  117. package/dist/{vue-ui-onion-BiffHj6v.js → vue-ui-onion-1igRoVIp.js} +2 -2
  118. package/dist/{vue-ui-parallel-coordinate-plot-DC9EjFYA.js → vue-ui-parallel-coordinate-plot-CmzCg7s7.js} +2 -2
  119. package/dist/{vue-ui-quadrant-BIpxU65Y.js → vue-ui-quadrant-CHfXIMG-.js} +2 -2
  120. package/dist/{vue-ui-quick-chart-uwVsepnf.js → vue-ui-quick-chart-9-Qnx_Kz.js} +2 -2
  121. package/dist/{vue-ui-radar-CHdxJwQ2.js → vue-ui-radar-Db7AYBVg.js} +2 -2
  122. package/dist/{vue-ui-rating-DoUFoJvB.js → vue-ui-rating-BnXrMeGg.js} +1 -1
  123. package/dist/{vue-ui-relation-circle-FGG7wCYA.js → vue-ui-relation-circle-B3edjo3F.js} +2 -2
  124. package/dist/{vue-ui-ridgeline-ClyBRJef.js → vue-ui-ridgeline-Bv-zLQ97.js} +2 -2
  125. package/dist/{vue-ui-rings-CRDcurAB.js → vue-ui-rings-B8PHv7n8.js} +2 -2
  126. package/dist/{vue-ui-scatter-DYkylqTr.js → vue-ui-scatter-Bb6KG5JD.js} +2 -2
  127. package/dist/{vue-ui-skeleton-CBtzmJiI.js → vue-ui-skeleton-CPoc6Owm.js} +2 -2
  128. package/dist/{vue-ui-smiley-BTPYPZdS.js → vue-ui-smiley-BQuXRW4o.js} +1 -1
  129. package/dist/{vue-ui-spark-trend-Cg__gAj9.js → vue-ui-spark-trend-C-84OhV_.js} +2 -2
  130. package/dist/{vue-ui-sparkbar-DSqyYcSy.js → vue-ui-sparkbar-CqAsZIv7.js} +2 -2
  131. package/dist/{vue-ui-sparkgauge-CfW6-ExF.js → vue-ui-sparkgauge-B4RzqC0W.js} +2 -2
  132. package/dist/{vue-ui-sparkhistogram-ClN9JYQF.js → vue-ui-sparkhistogram-Bfrn9PCA.js} +2 -2
  133. package/dist/{vue-ui-sparkline-CzjD9seh.js → vue-ui-sparkline-M2i8hZ-F.js} +2 -2
  134. package/dist/{vue-ui-sparkstackbar-nZ3tHm7l.js → vue-ui-sparkstackbar-Bai-Pfzu.js} +2 -2
  135. package/dist/{vue-ui-stackbar-CRP_j7bH.js → vue-ui-stackbar-DZgRubem.js} +2 -2
  136. package/dist/{vue-ui-stackline-CWBthsVq.js → vue-ui-stackline-DFZUoZvY.js} +2 -2
  137. package/dist/{vue-ui-strip-plot-CiEIA52J.js → vue-ui-strip-plot-CJacirOo.js} +394 -387
  138. package/dist/{vue-ui-table-CoGF2GWe.js → vue-ui-table-DBzvP2ym.js} +3 -3
  139. package/dist/{vue-ui-table-heatmap-DQ28DYwv.js → vue-ui-table-heatmap-DRABMw2H.js} +1 -1
  140. package/dist/{vue-ui-table-sparkline-DVpKsZd7.js → vue-ui-table-sparkline-wyjv7lH2.js} +2 -2
  141. package/dist/{vue-ui-thermometer-CyIIhi3B.js → vue-ui-thermometer-DYj19_DZ.js} +2 -2
  142. package/dist/{vue-ui-timer-DAJmVDbB.js → vue-ui-timer-BPf8xQBa.js} +2 -2
  143. package/dist/{vue-ui-tiremarks-BIdIGZ3A.js → vue-ui-tiremarks-CB2uiMTU.js} +2 -2
  144. package/dist/{vue-ui-treemap-e1dtE4yJ.js → vue-ui-treemap-MC_-L3n4.js} +2 -2
  145. package/dist/{vue-ui-waffle-CTvRwpKU.js → vue-ui-waffle-C6PGQQya.js} +296 -279
  146. package/dist/{vue-ui-wheel-L7-X1Ezl.js → vue-ui-wheel-BT7AT9NJ.js} +2 -2
  147. package/dist/{vue-ui-word-cloud-B6ytHITa.js → vue-ui-word-cloud-DIr_9Qnb.js} +2 -2
  148. package/dist/{vue-ui-world-CPWP-sZ5.js → vue-ui-world-CZOKJNuR.js} +2 -2
  149. package/dist/{vue-ui-xy-8NgsjKrE.js → vue-ui-xy-CLwh64AO.js} +3 -3
  150. package/dist/{vue-ui-xy-DmydKppa.js → vue-ui-xy-Dv_310kS.js} +2 -2
  151. package/dist/{vue-ui-xy-canvas-BMVdrH11.js → vue-ui-xy-canvas-B-KxaFGF.js} +2 -2
  152. package/package.json +1 -1
  153. package/dist/PenAndPaper-DAE-tnEQ.js +0 -461
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { Jt as t, Ot as n, Vt as r, X as i, b as a, i as o, jt as s, kt as c, q as l, t as u, tt as d } from "./lib-Bttd6u5E.js";
3
3
  import { n as f, t as p } from "./useHints-Dq_w2E8B.js";
4
- import { t as m } from "./useConfig-u71vax4T.js";
4
+ import { t as m } from "./useConfig-DwdGsXTx.js";
5
5
  import { t as h } from "./usePrinter-DN5bYhTG.js";
6
6
  import { n as g, t as _ } from "./BaseScanner-DZvpgOjM.js";
7
7
  import { t as v } from "./useNestedProp-vPNvh7rV.js";
@@ -119,7 +119,7 @@ var ve = /* @__PURE__ */ e({ default: () => ze }), ye = ["id"], be = [
119
119
  v52b4fc9f: Ft.value,
120
120
  v52b4df32: It.value
121
121
  }));
122
- let ze = le(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Be = le(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Ve = le(() => import("./PackageVersion-BZs_wnK5.js").then((e) => e.t)), { vue_ui_wheel: He } = m(), { isThemeValid: Ue, warnInvalidTheme: We } = y(), R = ie(), z = e, Ge = ve, Ke = T(() => !!z.dataset && Object.keys(z.dataset).length), B = N(l()), qe = N(null), Je = N(0), V = N(null), Ye = N(null), Xe = N(null), Ze = N(null), Qe = N(0), H = N(ot());
122
+ let ze = le(() => import("./PenAndPaper-C0UZ74fa.js").then((e) => e.t)), Be = le(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Ve = le(() => import("./PackageVersion-Dy83B80Q.js").then((e) => e.t)), { vue_ui_wheel: He } = m(), { isThemeValid: Ue, warnInvalidTheme: We } = y(), R = ie(), z = e, Ge = ve, Ke = T(() => !!z.dataset && Object.keys(z.dataset).length), B = N(l()), qe = N(null), Je = N(0), V = N(null), Ye = N(null), Xe = N(null), Ze = N(null), Qe = N(0), H = N(ot());
123
123
  f({
124
124
  config: () => H.value,
125
125
  dataset: () => z.dataset,
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { $ as t, D as n, J as r, Jt as i, Kt as a, Pt as o, S as s, X as c, b as l, jt as u, pt as d, q as f, t as p, tt as m, xt as h } from "./lib-Bttd6u5E.js";
3
3
  import { n as g, t as _ } from "./useHints-Dq_w2E8B.js";
4
- import { t as v } from "./useConfig-u71vax4T.js";
4
+ import { t as v } from "./useConfig-DwdGsXTx.js";
5
5
  import { t as y } from "./usePrinter-DN5bYhTG.js";
6
6
  import { n as ee, t as te } from "./BaseScanner-DZvpgOjM.js";
7
7
  import { t as b } from "./useNestedProp-vPNvh7rV.js";
@@ -645,7 +645,7 @@ var U = /* @__PURE__ */ e({ default: () => ut }), Ze = [
645
645
  },
646
646
  emits: ["copyAlt"],
647
647
  setup(e, { expose: T, emit: Te }) {
648
- let Ee = M(() => import("./Tooltip-DhjyfHwz.js")), De = M(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), Oe = M(() => import("./vue-ui-accordion-DNdBR3LQ.js").then((e) => e.n)), ke = M(() => import("./DataTable-BbKgJ5UI.js")), Ae = M(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), je = M(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Me = M(() => import("./PackageVersion-BZs_wnK5.js").then((e) => e.t)), Ne = M(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_word_cloud: Pe } = v(), { isThemeValid: Fe, warnInvalidTheme: Ie } = x(), B = e, Le = Te, Re = D({
648
+ let Ee = M(() => import("./Tooltip-DhjyfHwz.js")), De = M(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), Oe = M(() => import("./vue-ui-accordion-CLU_su1P.js").then((e) => e.n)), ke = M(() => import("./DataTable-BbKgJ5UI.js")), Ae = M(() => import("./PenAndPaper-C0UZ74fa.js").then((e) => e.t)), je = M(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Me = M(() => import("./PackageVersion-Dy83B80Q.js").then((e) => e.t)), Ne = M(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_word_cloud: Pe } = v(), { isThemeValid: Fe, warnInvalidTheme: Ie } = x(), B = e, Le = Te, Re = D({
649
649
  get() {
650
650
  return !!B.dataset && B.dataset.length;
651
651
  },
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { $ as t, D as n, Jt as r, Ot as ee, Pt as i, S as a, X as o, Y as s, i as c, q as l, t as te, vt as ne, w as re, xt as ie, yt as ae } from "./lib-Bttd6u5E.js";
3
3
  import { n as oe, t as se } from "./useHints-Dq_w2E8B.js";
4
- import { t as ce } from "./useConfig-u71vax4T.js";
4
+ import { t as ce } from "./useConfig-DwdGsXTx.js";
5
5
  import { t as le } from "./usePrinter-DN5bYhTG.js";
6
6
  import { n as ue, t as de } from "./BaseScanner-DZvpgOjM.js";
7
7
  import { t as fe } from "./useNestedProp-vPNvh7rV.js";
@@ -2000,7 +2000,7 @@ var Ve = {
2000
2000
  "copyAlt"
2001
2001
  ],
2002
2002
  setup(e, { expose: ge, emit: Pe }) {
2003
- let Fe = _(() => import("./Title-BE3qg9xl.js").then((e) => e.t)), Ie = _(() => import("./Legend-CQxUgOd-.js").then((e) => e.n)), Le = _(() => import("./Tooltip-DhjyfHwz.js")), Re = _(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), ze = _(() => import("./vue-ui-accordion-DNdBR3LQ.js").then((e) => e.n)), Be = _(() => import("./DataTable-BbKgJ5UI.js")), He = _(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), st = _(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), ct = _(() => import("./PackageVersion-BZs_wnK5.js").then((e) => e.t)), lt = _(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_world: ut } = ce(), O = e, dt = Pe, ft = d({
2003
+ let Fe = _(() => import("./Title-BE3qg9xl.js").then((e) => e.t)), Ie = _(() => import("./Legend-CQxUgOd-.js").then((e) => e.n)), Le = _(() => import("./Tooltip-DhjyfHwz.js")), Re = _(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), ze = _(() => import("./vue-ui-accordion-CLU_su1P.js").then((e) => e.n)), Be = _(() => import("./DataTable-BbKgJ5UI.js")), He = _(() => import("./PenAndPaper-C0UZ74fa.js").then((e) => e.t)), st = _(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), ct = _(() => import("./PackageVersion-Dy83B80Q.js").then((e) => e.t)), lt = _(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_world: ut } = ce(), O = e, dt = Pe, ft = d({
2004
2004
  get() {
2005
2005
  return !!I.value;
2006
2006
  },
@@ -2,7 +2,7 @@ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { $ as t, A as n, B as r, Bt as i, Ct as a, D as o, Et as s, G as c, Gt as l, H as u, I as d, Jt as ee, Kt as te, L as ne, Lt as f, M as p, N as re, P as ie, Pt as ae, S as oe, St as se, U as ce, V as le, Vt as ue, W as de, X as fe, _ as pe, b as m, c as h, d as g, dt as me, i as _, jt as he, k as ge, l as _e, n as ve, o as ye, ot as v, q as be, qt as xe, r as Se, tt as Ce, v as we, vt as Te, w as Ee, xt as De, z as Oe, zt as ke } from "./lib-Bttd6u5E.js";
3
3
  import { n as Ae, t as je } from "./useHints-Dq_w2E8B.js";
4
4
  import { n as Me, r as Ne, t as Pe } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as Fe } from "./useConfig-u71vax4T.js";
5
+ import { t as Fe } from "./useConfig-DwdGsXTx.js";
6
6
  import { t as Ie } from "./usePrinter-DN5bYhTG.js";
7
7
  import { n as Le, t as Re } from "./BaseScanner-DZvpgOjM.js";
8
8
  import { t as ze } from "./useNestedProp-vPNvh7rV.js";
@@ -18,7 +18,7 @@ import { t as Je } from "./Shape-C21CMlWS.js";
18
18
  import { t as Ye } from "./_plugin-vue_export-helper-B3ysoDQm.js";
19
19
  import { t as Xe } from "./DefGrad-DVBqDjhO.js";
20
20
  import { t as Ze } from "./SlicerPreview-wUw1hFwe.js";
21
- import { t as Qe } from "./vue-ui-accordion-DNdBR3LQ.js";
21
+ import { t as Qe } from "./vue-ui-accordion-CLU_su1P.js";
22
22
  import { t as $e } from "./BaseLegendToggle-DZVucLnv.js";
23
23
  import { t as et } from "./A11yDataTable-DdRsVULz.js";
24
24
  import { Fragment as y, Teleport as tt, computed as b, createBlock as nt, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as rt, createTextVNode as it, createVNode as at, defineAsyncComponent as ot, getCurrentInstance as st, guardReactiveProps as ct, mergeProps as lt, nextTick as ut, normalizeClass as w, normalizeProps as dt, normalizeStyle as T, onBeforeUnmount as ft, onMounted as pt, openBlock as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as mt, shallowRef as ht, toDisplayString as gt, toRefs as _t, unref as A, useSlots as vt, vModelCheckbox as yt, watch as bt, watchEffect as xt, withCtx as j, withDirectives as St } from "vue";
@@ -568,7 +568,7 @@ var Mt = /* @__PURE__ */ e({ default: () => M }), Nt = ["id"], Pt = ["id"], Ft =
568
568
  "copyAlt"
569
569
  ],
570
570
  setup(e, { expose: Ye, emit: Mt }) {
571
- let M = e, ui = ot(() => import("./DataTable-BbKgJ5UI.js")), di = ot(() => import("./Tooltip-DhjyfHwz.js")), fi = ot(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), pi = ot(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), mi = ot(() => import("./vue-ui-table-sparkline-DVpKsZd7.js").then((e) => e.n)), hi = ot(() => import("./PackageVersion-BZs_wnK5.js").then((e) => e.t)), gi = ot(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), _i = ot(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), vi = Mt, yi = vt(), bi = st(), { vue_ui_xy: xi } = Fe(), { isThemeValid: Si, warnInvalidTheme: Ci } = Be(), wi = D(null), Ti = D(null), Ei = D(null), Di = D(null), Oi = D(null), ki = D(null), Ai = D(null), ji = D(null), Mi = D(null), Ni = D(null), Pi = D(null), Fi = D(null), Ii = D(null), Li = D(null), Ri = D(0), N = D(null), zi = D(!0), Bi = D(600), P = D(1e3), Vi = D("0 0 1000 600"), Hi = D({
571
+ let M = e, ui = ot(() => import("./DataTable-BbKgJ5UI.js")), di = ot(() => import("./Tooltip-DhjyfHwz.js")), fi = ot(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), pi = ot(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), mi = ot(() => import("./vue-ui-table-sparkline-wyjv7lH2.js").then((e) => e.n)), hi = ot(() => import("./PackageVersion-Dy83B80Q.js").then((e) => e.t)), gi = ot(() => import("./PenAndPaper-C0UZ74fa.js").then((e) => e.t)), _i = ot(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), vi = Mt, yi = vt(), bi = st(), { vue_ui_xy: xi } = Fe(), { isThemeValid: Si, warnInvalidTheme: Ci } = Be(), wi = D(null), Ti = D(null), Ei = D(null), Di = D(null), Oi = D(null), ki = D(null), Ai = D(null), ji = D(null), Mi = D(null), Ni = D(null), Pi = D(null), Fi = D(null), Ii = D(null), Li = D(null), Ri = D(0), N = D(null), zi = D(!0), Bi = D(600), P = D(1e3), Vi = D("0 0 1000 600"), Hi = D({
572
572
  x: 0,
573
573
  y: 0
574
574
  }), Ui = D({
@@ -1,8 +1,8 @@
1
1
  import { A as e, B as t, Bt as n, G as r, H as i, I as a, Jt as o, Kt as s, L as c, N as l, P as u, Pt as d, S as f, U as p, V as m, Vt as h, X as g, _, c as v, i as y, k as b, l as x, nt as S, o as ee, q as C, t as w, v as te, vt as T, zt as E } from "./lib-Bttd6u5E.js";
2
2
  import { t as D } from "./useTimeLabels-d2f-W1L4.js";
3
- import { t as O } from "./useConfig-u71vax4T.js";
3
+ import { t as O } from "./useConfig-DwdGsXTx.js";
4
4
  import { t as ne } from "./vue_ui_xy-BA3-_LCx.js";
5
- import { _ as k, d as A, f as j, g as M, h as N, l as P, m as F, p as I, u as L, v as R } from "./render-common-WZ4vXtlg.js";
5
+ import { _ as k, d as A, f as j, g as M, h as N, l as P, m as F, p as I, u as L, v as R } from "./render-common-CqzziMg4.js";
6
6
  //#region src/svg/vue-ui-xy/create.js
7
7
  var { vue_ui_xy: z } = O();
8
8
  function re({ config: e = {}, dataset: t = [] } = {}) {
@@ -2,7 +2,7 @@ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
2
  import { $ as t, Bt as n, D as r, Et as i, Jt as a, Kt as o, Ot as s, Pt as c, Rt as l, S as u, X as d, _ as ee, ct as te, dt as ne, i as re, jt as ie, o as ae, q as oe, tt as se, vt as ce, w as le, xt as ue } from "./lib-Bttd6u5E.js";
3
3
  import { n as de, t as fe } from "./useHints-Dq_w2E8B.js";
4
4
  import { n as pe, r as me, t as he } from "./useTimeLabels-d2f-W1L4.js";
5
- import { t as ge } from "./useConfig-u71vax4T.js";
5
+ import { t as ge } from "./useConfig-DwdGsXTx.js";
6
6
  import { t as _e } from "./usePrinter-DN5bYhTG.js";
7
7
  import { n as ve, t as ye } from "./BaseScanner-DZvpgOjM.js";
8
8
  import { t as be } from "./useNestedProp-vPNvh7rV.js";
@@ -13,7 +13,7 @@ import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
13
  import { a as f, c as p, i as Te, l as Ee, n as De, o as Oe, r as ke, s as Ae, t as je } from "./useResponsive-ZtArZtUf.js";
14
14
  import { t as Me } from "./BaseIcon-BfndwIWE.js";
15
15
  import { t as Ne } from "./SlicerPreview-wUw1hFwe.js";
16
- import { t as Pe } from "./vue-ui-accordion-DNdBR3LQ.js";
16
+ import { t as Pe } from "./vue-ui-accordion-CLU_su1P.js";
17
17
  import { t as Fe } from "./BaseLegendToggle-DZVucLnv.js";
18
18
  import { t as Ie } from "./useUserOptionState-DK-_1ddE.js";
19
19
  import { t as Le } from "./useChartAccessibility-DYqac8yF.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.23.6",
4
+ "version": "3.23.7",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1,461 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { Ot as t, X as n, q as r, t as i } from "./lib-Bttd6u5E.js";
3
- import { t as a } from "./BaseIcon-BfndwIWE.js";
4
- import { t as o } from "./ColorPicker--ayG2YHf.js";
5
- import { computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, guardReactiveProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onBeforeUnmount as ee, onMounted as te, openBlock as _, ref as v, renderSlot as y, toDisplayString as ne, unref as re, vModelText as ie, watch as b, withCtx as ae, withDirectives as oe } from "vue";
6
- //#region src/atoms/PenAndPaper.vue
7
- var se = /* @__PURE__ */ e({ default: () => x }), ce = ["disabled"], x = {
8
- __name: "PenAndPaper",
9
- props: {
10
- svgRef: {
11
- type: [
12
- Object,
13
- null,
14
- void 0
15
- ],
16
- required: !0
17
- },
18
- color: {
19
- type: String,
20
- default: "#2D353C"
21
- },
22
- backgroundColor: {
23
- type: String,
24
- default: "#FFFFFF"
25
- },
26
- active: {
27
- type: Boolean,
28
- default: !1
29
- },
30
- scale: {
31
- type: Number,
32
- default: 1
33
- },
34
- isCursorPointer: {
35
- type: Boolean,
36
- default: !1
37
- }
38
- },
39
- emits: ["close"],
40
- setup(e, { emit: se }) {
41
- let x = e, le = se, S = v([]), C = v([]), w = v(x.color), T = v(2), E = v(!1), D = v(""), O = v(null), k = v(null), A = v(null), j = v(null), M = v(`arrow-${r()}`), ue = v(`arrow-def-${r()}`), N = v(!1), P = v(null), F = v({
42
- x: 0,
43
- y: 0
44
- }), I = v([""]), L = v({
45
- row: 0,
46
- col: 0
47
- }), R = v(16), z = v(!1), de = [
48
- "arrow",
49
- "text",
50
- "line",
51
- "draw"
52
- ], B = v(0), V = s(() => de[B.value]), fe = {
53
- arrow: "plotArrow",
54
- text: "text",
55
- line: "plotLine",
56
- draw: "annotator"
57
- }, pe = v("url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABg2lDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVh2YQcchQnSyIijhKFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6OSk6CIl/i8ptIjx4Lgf7+497t4BQrPKNKtnAtB020wn4lIuvyqFXhGGiAhCiMnMMpKZxSx8x9c9Any9i/Es/3N/jgG1YDEgIBHPMcO0iTeIZzZtg/M+scjKskp8Tjxu0gWJH7muePzGueSywDNFM5ueJxaJpVIXK13MyqZGPE0cVTWd8oWcxyrnLc5atc7a9+QvDBf0lQzXaY4ggSUkkYIEBXVUUIWNGK06KRbStB/38Q+7/hS5FHJVwMixgBo0yK4f/A9+d2sVpya9pHAc6H1xnI9RILQLtBqO833sOK0TIPgMXOkdf60JzH6S3uho0SNgcBu4uO5oyh5wuQMMPRmyKbtSkKZQLALvZ/RNeSByC/Sveb2193H6AGSpq+Ub4OAQGCtR9rrPu/u6e/v3TLu/H5C7crM1WjgWAAAABmJLR0QAqwB5AHWF+8OUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5gwUExIUagzGcQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAABfSURBVBjTldAxDoNQDIPhL0+q1L33P1AvAhN7xfK6WAgoLfSfrNiykpQtE+7RLzx2vgF9D3o8lWDmn1QVVMP0LZQGmNtqp1/cmou0XHdG/+sYeGZwFBqPCub8rkcvvAGvsi1VYarR8wAAAABJRU5ErkJggg==') 5 5, auto");
58
- function me() {
59
- B.value + 1 >= de.length ? B.value = 0 : B.value += 1;
60
- }
61
- function H(e) {
62
- if (!O.value || V.value !== "text" || N.value) return;
63
- let { x: t, y: n } = K(e);
64
- F.value = {
65
- x: t,
66
- y: n
67
- }, I.value = [""], L.value = {
68
- row: 0,
69
- col: 0
70
- }, z.value = !1;
71
- let r = document.createElementNS("http://www.w3.org/2000/svg", "text");
72
- r.setAttribute("x", t), r.setAttribute("y", n), r.setAttribute("fill", w.value), r.setAttribute("font-size", R.value * x.scale), r.setAttribute("font-family", "sans-serif"), r.setAttribute("class", "vue-data-ui-doodle"), r.setAttribute("dominant-baseline", "hanging"), r.setAttribute("pointer-events", "all");
73
- let i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
74
- i.setAttribute("x", t), i.setAttribute("dy", "0"), i.textContent = "", r.appendChild(i), r.style.pointerEvents = "none", r.style.userSelect = "none", O.value.appendChild(r), P.value = r, N.value = !0, window.addEventListener("keydown", he), window.addEventListener("mousedown", ye, !0), ge(), ve();
75
- }
76
- function he(e) {
77
- if (!N.value) return;
78
- let { row: t, col: n } = L.value, r = I.value.slice(), i = !1;
79
- if (e.key === "Enter") {
80
- let a = r[t], o = a.slice(0, n), s = a.slice(n);
81
- r.splice(t, 1, o, s), t += 1, n = 0, i = !0, e.preventDefault();
82
- } else if (e.key === "Backspace") {
83
- if (n > 0) r[t] = r[t].slice(0, n - 1) + r[t].slice(n), --n, i = !0;
84
- else if (t > 0) {
85
- let e = r[t - 1].length;
86
- r[t - 1] += r[t], r.splice(t, 1), --t, n = e, i = !0;
87
- }
88
- e.preventDefault();
89
- } else if (e.key === "Delete") n < r[t].length ? (r[t] = r[t].slice(0, n) + r[t].slice(n + 1), i = !0) : t < r.length - 1 && (r[t] += r[t + 1], r.splice(t + 1, 1), i = !0), e.preventDefault();
90
- else if (e.key === "ArrowLeft") n > 0 ? --n : t > 0 && (--t, n = r[t].length), i = !0, e.preventDefault();
91
- else if (e.key === "ArrowRight") n < r[t].length ? n += 1 : t < r.length - 1 && (t += 1, n = 0), i = !0, e.preventDefault();
92
- else if (e.key === "ArrowUp") t > 0 && (--t, n = Math.min(n, r[t].length), i = !0), e.preventDefault();
93
- else if (e.key === "ArrowDown") t < r.length - 1 && (t += 1, n = Math.min(n, r[t].length), i = !0), e.preventDefault();
94
- else if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) r[t] = r[t].slice(0, n) + e.key + r[t].slice(n), n += 1, i = !0, e.preventDefault();
95
- else if (e.key === "Escape") {
96
- be(!0);
97
- return;
98
- } else e.key === "Tab" && e.preventDefault();
99
- i && (I.value = r, L.value = {
100
- row: t,
101
- col: n
102
- }, r.some((e) => e.length > 0) && !z.value && P.value && (S.value.push(P.value), C.value = [], z.value = !0), ge(), ve());
103
- }
104
- function ge() {
105
- let e = P.value, { x: t } = F.value;
106
- for (; e.firstChild;) e.removeChild(e.firstChild);
107
- I.value.forEach((n, r) => {
108
- let i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
109
- i.setAttribute("x", t), i.setAttribute("dy", r === 0 ? "0" : `${R.value * 1.2 * x.scale}`), i.textContent = n.length ? n : "​", e.appendChild(i);
110
- });
111
- }
112
- let U = v(null);
113
- function W() {
114
- U.value !== null && (clearInterval(U.value), U.value = null);
115
- }
116
- function _e(e) {
117
- W();
118
- let t = !0;
119
- e.style.opacity = "1", U.value = setInterval(() => {
120
- if (!O.value || !e || !O.value.contains(e)) {
121
- W();
122
- return;
123
- }
124
- t = !t, e.style.opacity = t ? "1" : "0";
125
- }, 500);
126
- }
127
- function ve() {
128
- let e = O.value?.querySelector(".vue-data-ui-svg-caret");
129
- e && O.value && O.value.removeChild(e);
130
- let t = P.value;
131
- if (!t || !O.value) return;
132
- let { x: n, y: r } = F.value, { row: i, col: a } = L.value, o = R.value * x.scale, s = t.childNodes[i];
133
- if (!s) return;
134
- let c = s.textContent.slice(0, a);
135
- c.endsWith(" ") && (c += "\xA0");
136
- let l = document.createElementNS("http://www.w3.org/2000/svg", "text");
137
- l.setAttribute("x", n), l.setAttribute("y", r), l.setAttribute("font-size", o), l.setAttribute("font-family", "sans-serif"), l.textContent = c || "", O.value.appendChild(l);
138
- let u = l.getBBox();
139
- O.value.removeChild(l);
140
- let d = r + i * o * 1.2, f = n + u.width, p = document.createElementNS("http://www.w3.org/2000/svg", "rect");
141
- p.setAttribute("x", f), p.setAttribute("y", d), p.setAttribute("rx", 1), p.setAttribute("width", 2), p.setAttribute("height", o), p.setAttribute("fill", w.value), p.setAttribute("class", "vue-data-ui-svg-caret"), O.value.appendChild(p), _e(p);
142
- }
143
- function ye(e) {
144
- if (P.value && !P.value.contains(e.target)) {
145
- let e = P.value.children;
146
- e.length === 1 && (e[0].textContent === "" || e[0].textContent === "​") && P.value.remove(), be(!1);
147
- }
148
- }
149
- function be(e = !1) {
150
- window.removeEventListener("keydown", he), window.removeEventListener("mousedown", ye, !0), W();
151
- let t = O.value?.querySelector(".vue-data-ui-svg-caret");
152
- t && O.value && O.value.removeChild(t);
153
- let n = P.value?.children, r = !1;
154
- if (n && n.length === 1) {
155
- let e = n[0].textContent;
156
- r = !e || e === "​";
157
- }
158
- (e || r) && P.value && O.value && O.value.contains(P.value) && O.value.removeChild(P.value), N.value = !1, P.value = null, I.value = [""], L.value = {
159
- row: 0,
160
- col: 0
161
- }, z.value = !1;
162
- }
163
- let G = s(() => t(x.color, .6));
164
- function xe() {
165
- if (!O.value) return;
166
- let e = O.value.querySelector(".vue-data-ui-mask");
167
- if (e && O.value.removeChild(e), x.active) {
168
- let e = document.createElementNS("http://www.w3.org/2000/svg", "rect");
169
- e.setAttribute("class", "vue-data-ui-mask"), e.setAttribute("width", "100%"), e.setAttribute("height", "100%"), e.setAttribute("fill", "transparent"), e.setAttribute("pointer-events", "all"), O.value.insertBefore(e, O.value.firstChild);
170
- }
171
- }
172
- function K(e) {
173
- let t = x.svgRef;
174
- if (!t) return {
175
- x: 0,
176
- y: 0
177
- };
178
- let n = t.createSVGPoint(), r = e.touches?.length || e.changedTouches?.length ? e.touches?.[0] || e.changedTouches?.[0] : null, i = r ? r.clientX : e.clientX, a = r ? r.clientY : e.clientY;
179
- n.x = i, n.y = a;
180
- let o = t.getScreenCTM()?.inverse();
181
- return o ? n.matrixTransform(o) : {
182
- x: 0,
183
- y: 0
184
- };
185
- }
186
- function Se(e) {
187
- let t = e.trim().split(/\s+/);
188
- if (t.length < 4) return e;
189
- let n = t.slice(1).map(Number);
190
- if (n.length % 2 != 0) return e;
191
- let r = Ce(n), i = [`M ${r[0]} ${r[1]}`];
192
- for (let e = 2; e < r.length - 2; e += 2) {
193
- let t = r[e - 2], n = r[e - 1], a = r[e], o = r[e + 1], s = (t + a) / 2, c = (n + o) / 2;
194
- i.push(`Q ${t} ${n} ${s} ${c}`);
195
- }
196
- let a = r[r.length - 2], o = r[r.length - 1];
197
- return i.push(`L ${a} ${o}`), i.join(" ");
198
- }
199
- function Ce(e, t = 1) {
200
- let n = [...e];
201
- for (let r = 2; r < e.length - 2; r += 2) {
202
- let i = e[r], a = e[r + 1], o = e[r - 2], s = e[r - 1], c = e[r + 2], l = e[r + 3];
203
- n[r] = i + t * ((o + c) / 2 - i), n[r + 1] = a + t * ((s + l) / 2 - a);
204
- }
205
- return n;
206
- }
207
- function we(e) {
208
- let t = e.trim().split(/\s+/), n = "", r = "", i = null, a = null;
209
- for (let e = 0; e < t.length; e += 1) {
210
- let o = t[e];
211
- if (isNaN(o)) {
212
- if (r = o, r === "M" || r === "L") i = parseFloat(t[++e]), a = parseFloat(t[++e]), n += `${r}${i} ${a}`;
213
- else if (r === "Q") {
214
- let r = parseFloat(t[++e]), o = parseFloat(t[++e]), s = parseFloat(t[++e]), c = parseFloat(t[++e]);
215
- n += r === i && o === a ? `t${s - i} ${c - a}` : `q${r - i} ${o - a} ${s - i} ${c - a}`, i = s, a = c;
216
- }
217
- } else {
218
- let s = parseFloat(o), c = parseFloat(t[++e]);
219
- if (r === "L") {
220
- let e = s - i, t = c - a;
221
- n += e === 0 ? `v${t}` : t === 0 ? `h${e}` : `l${e} ${t}`, i = s, a = c;
222
- } else if (r === "Q") {
223
- let r = s, o = c, l = parseFloat(t[++e]), u = parseFloat(t[++e]);
224
- n += r === i && o === a ? `t${l - i} ${u - a}` : `q${r - i} ${o - a} ${l - i} ${u - a}`, i = l, a = u;
225
- }
226
- }
227
- }
228
- return n;
229
- }
230
- function q(e) {
231
- if (e.cancelable && e.preventDefault(), V.value !== "draw" || !x.active || !O.value) return;
232
- E.value = !0;
233
- let { x: t, y: n } = K(e);
234
- j.value = {
235
- x: t,
236
- y: n
237
- }, D.value = `M ${t} ${n}`, k.value = document.createElementNS(i, "path"), k.value.setAttribute("stroke", w.value), k.value.setAttribute("stroke-width", T.value * x.scale), k.value.setAttribute("fill", "none"), k.value.setAttribute("stroke-linecap", "round"), k.value.setAttribute("stroke-linejoin", "round"), k.value.setAttribute("class", "vue-data-ui-doodle"), O.value.appendChild(k.value);
238
- }
239
- function J(e) {
240
- if (e.cancelable && e.preventDefault(), !E.value || !O.value || !k.value) return;
241
- let { x: t, y: n } = K(e);
242
- D.value += ` ${t} ${n}`, k.value.setAttribute("d", D.value);
243
- }
244
- function Te() {
245
- let e = x.svgRef;
246
- if (!e) return;
247
- let t = e.querySelector(`defs#${ue.value}`);
248
- if (t || (t = document.createElementNS(i, "defs"), t.setAttribute("id", ue.value), e.appendChild(t)), t.querySelector(`#${M.value}`)) return;
249
- let n = document.createElementNS(i, "marker");
250
- n.setAttribute("id", M.value), n.setAttribute("markerUnits", "strokeWidth"), n.setAttribute("markerWidth", "6"), n.setAttribute("markerHeight", "6"), n.setAttribute("refX", "4"), n.setAttribute("refY", "3"), n.setAttribute("orient", "auto"), n.setAttribute("viewBox", "0 0 6 6");
251
- let r = document.createElementNS(i, "path");
252
- r.setAttribute("d", `M 0 0 L 6 ${6 / 2} L 0 6 z`), r.setAttribute("fill", "context-stroke"), r.setAttribute("stroke", "none"), n.appendChild(r), t.appendChild(n);
253
- }
254
- function Y(e) {
255
- if (e.cancelable && e.preventDefault(), !["line", "arrow"].includes(V.value) || !x.active || !O.value) return;
256
- V.value === "arrow" && Te(), E.value = !0;
257
- let { x: t, y: n } = K(e);
258
- j.value = {
259
- x: t,
260
- y: n
261
- }, A.value = document.createElementNS(i, "line"), A.value.setAttribute("stroke", w.value), A.value.setAttribute("stroke-width", T.value * x.scale), A.value.setAttribute("stroke-linecap", "round"), A.value.setAttribute("class", "vue-data-ui-doodle"), A.value.setAttribute("x1", t), A.value.setAttribute("y1", n), A.value.setAttribute("x2", t), A.value.setAttribute("y2", n), V.value === "arrow" && A.value.setAttribute("marker-end", `url(#${M.value})`), O.value.appendChild(A.value);
262
- }
263
- function X(e) {
264
- if (e.cancelable && e.preventDefault(), !["line", "arrow"].includes(V.value) || !E.value || !O.value || !A.value) return;
265
- let { x: t, y: n } = K(e);
266
- A.value.setAttribute("x2", t), A.value.setAttribute("y2", n);
267
- }
268
- function Z(e) {
269
- if (E.value && O.value && A.value) {
270
- let { x: t, y: n } = K(e);
271
- A.value.setAttribute("x2", t), A.value.setAttribute("y2", n), S.value.push(A.value), C.value = [], A.value = "";
272
- }
273
- E.value = !1;
274
- }
275
- function Q(e) {
276
- if (E.value && O.value && k.value) {
277
- let { x: t, y: n } = K(e);
278
- if (j.value && j.value.x === t && j.value.y === n) {
279
- let e = document.createElementNS("http://www.w3.org/2000/svg", "circle");
280
- e.setAttribute("cx", t), e.setAttribute("cy", n), e.setAttribute("r", T.value * x.scale / 2), e.setAttribute("fill", w.value), e.setAttribute("class", "vue-data-ui-doodle"), O.value.appendChild(e), S.value.push(e);
281
- } else {
282
- let e = k.value;
283
- e.setAttribute("d", we(Se(D.value))), S.value.push(e);
284
- }
285
- C.value = [], k.value = "";
286
- }
287
- E.value = !1;
288
- }
289
- function Ee() {
290
- if (S.value.length > 0) {
291
- let e = S.value.pop();
292
- C.value.push(e), e === P.value ? be(!0) : O.value && O.value.contains(e) && O.value.removeChild(e);
293
- }
294
- }
295
- function De() {
296
- if (C.value.length > 0) {
297
- let e = C.value.pop();
298
- S.value.push(e), O.value && O.value.appendChild(e);
299
- }
300
- }
301
- function Oe() {
302
- O.value && (O.value.innerHTML = ""), S.value = [], C.value = [], z.value = !1, xe();
303
- }
304
- b(V, (e) => {
305
- x.active && ($(), ke(), Ae());
306
- });
307
- function ke() {
308
- !x.svgRef || !x.active || (V.value === "draw" ? (x.svgRef.addEventListener("mousedown", q), x.svgRef.addEventListener("mousemove", J), x.svgRef.addEventListener("mouseup", Q), x.svgRef.addEventListener("mouseleave", Q), x.svgRef.addEventListener("touchstart", q, { passive: !1 }), x.svgRef.addEventListener("touchmove", J, { passive: !1 }), x.svgRef.addEventListener("touchend", Q), x.svgRef.addEventListener("touchcancel", Q)) : ["line", "arrow"].includes(V.value) ? (x.svgRef.addEventListener("mousedown", Y), x.svgRef.addEventListener("mousemove", X), x.svgRef.addEventListener("mouseup", Z), x.svgRef.addEventListener("touchstart", Y, { passive: !1 }), x.svgRef.addEventListener("touchmove", X, { passive: !1 }), x.svgRef.addEventListener("touchend", Z), x.svgRef.addEventListener("touchcancel", Z)) : V.value === "text" && (x.svgRef.addEventListener("mousedown", H), x.svgRef.addEventListener("touchstart", H, { passive: !1 })), O.value && (O.value.style.pointerEvents = "auto"));
309
- }
310
- function $() {
311
- x.svgRef && (x.svgRef.removeEventListener("mousedown", q), x.svgRef.removeEventListener("mousemove", J), x.svgRef.removeEventListener("mouseup", Q), x.svgRef.removeEventListener("mouseleave", Q), x.svgRef.removeEventListener("touchstart", q), x.svgRef.removeEventListener("touchmove", J), x.svgRef.removeEventListener("touchend", Q), x.svgRef.removeEventListener("touchcancel", Q), x.svgRef.removeEventListener("mousedown", Y), x.svgRef.removeEventListener("mousemove", X), x.svgRef.removeEventListener("mouseup", Z), x.svgRef.removeEventListener("touchstart", Y), x.svgRef.removeEventListener("touchmove", X), x.svgRef.removeEventListener("touchend", Z), x.svgRef.removeEventListener("touchcancel", Z), x.svgRef.removeEventListener("mousedown", H), x.svgRef.removeEventListener("touchstart", H), O.value && (O.value.style.pointerEvents = "none"));
312
- }
313
- b(() => x.active, (e) => {
314
- e ? ke() : $();
315
- }), b(() => x.active, () => {
316
- p(() => {
317
- xe();
318
- });
319
- }), b(() => x.active, (e) => {
320
- x.svgRef && (e ? x.svgRef.style.touchAction = "none" : x.svgRef.style.touchAction = "");
321
- }, { immediate: !0 });
322
- function Ae() {
323
- O.value && (V.value === "text" ? O.value.style.cursor = "text" : ["line", "arrow"].includes(V.value) ? O.value.style.cursor = "crosshair" : O.value.style.cursor = pe.value);
324
- }
325
- let je = v(null);
326
- return te(() => {
327
- p(() => {
328
- x.svgRef && (O.value = document.createElementNS("http://www.w3.org/2000/svg", "g"), O.value.setAttribute("class", "vue-data-ui-doodles"), x.svgRef.appendChild(O.value), Ae(), $());
329
- });
330
- }), b(() => x.active, async (e) => {
331
- e && (await p(), je.value?.focus());
332
- }, { flush: "post" }), ee(() => {
333
- W(), O.value && x.svgRef && (O.value.remove(), $());
334
- }), (t, r) => e.active ? (_(), l("div", {
335
- key: 0,
336
- "data-dom-to-png-ignore": "",
337
- class: "vue-ui-pen-and-paper-actions",
338
- style: g({ backgroundColor: e.backgroundColor })
339
- }, [
340
- u("button", {
341
- ref_key: "buttonToggle",
342
- ref: je,
343
- class: "vue-ui-pen-and-paper-action",
344
- onClick: r[0] ||= (e) => le("close"),
345
- style: g({
346
- backgroundColor: e.backgroundColor,
347
- border: `1px solid ${G.value}`,
348
- cursor: e.isCursorPointer ? "pointer" : "default"
349
- })
350
- }, [y(t.$slots, "annotator-action-close", {}, () => [d(a, {
351
- name: "close",
352
- stroke: e.color
353
- }, null, 8, ["stroke"])])], 4),
354
- u("button", {
355
- class: "vue-ui-pen-and-paper-action",
356
- tabindex: "-1",
357
- style: g(`padding: 0 !important; cursor: ${e.isCursorPointer ? "pointer" : "default"}`)
358
- }, [d(o, {
359
- value: w.value,
360
- "onUpdate:value": r[1] ||= (e) => w.value = e,
361
- backgroundColor: e.backgroundColor,
362
- buttonBorderColor: G.value,
363
- isCursorPointer: e.isCursorPointer
364
- }, {
365
- "annotator-action-color": ae(({ color: e }) => [y(t.$slots, "annotator-action-color", h(f({ color: e })))]),
366
- _: 3
367
- }, 8, [
368
- "value",
369
- "backgroundColor",
370
- "buttonBorderColor",
371
- "isCursorPointer"
372
- ])], 4),
373
- u("button", {
374
- class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-active": V.value === "text" }]),
375
- onClick: r[2] ||= (e) => me(),
376
- style: g({
377
- backgroundColor: e.backgroundColor,
378
- border: `1px solid ${G.value}`,
379
- cursor: e.isCursorPointer ? "pointer" : "default"
380
- })
381
- }, [y(t.$slots, "annotator-action-draw", h(f({ mode: V.value })), () => [d(a, {
382
- name: fe[V.value],
383
- stroke: e.color
384
- }, null, 8, ["name", "stroke"])]), u("div", { style: g({
385
- position: "absolute",
386
- bottom: "-20px",
387
- color: G.value,
388
- width: "100%",
389
- textAlign: "center",
390
- fontSize: "12px",
391
- fontVariantNumeric: "tabular-nums"
392
- }) }, ne(re(n)({
393
- v: V.value === "text" ? Math.round(R.value) : Math.round(T.value),
394
- s: "px",
395
- r: 1
396
- })), 5)], 6),
397
- u("button", {
398
- class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !S.value.length }]),
399
- disabled: !S.value.length,
400
- onClick: Ee,
401
- style: g({
402
- backgroundColor: e.backgroundColor,
403
- border: `1px solid ${G.value}`,
404
- marginTop: "20px",
405
- cursor: e.isCursorPointer ? "pointer" : "default"
406
- })
407
- }, [y(t.$slots, "annotator-action-undo", h(f({ disabled: !S.value.length })), () => [d(a, {
408
- name: "refresh",
409
- stroke: e.color
410
- }, null, 8, ["stroke"])])], 14, ce),
411
- u("button", {
412
- class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !C.value.length }]),
413
- onClick: De,
414
- style: g({
415
- backgroundColor: e.backgroundColor,
416
- border: `1px solid ${G.value}`,
417
- cursor: e.isCursorPointer ? "pointer" : "default"
418
- })
419
- }, [y(t.$slots, "annotator-action-redo", h(f({ disabled: !C.value.length })), () => [d(a, {
420
- name: "refresh",
421
- stroke: e.color,
422
- style: { transform: "scaleX(-1)" }
423
- }, null, 8, ["stroke"])])], 6),
424
- u("button", {
425
- class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !S.value.length }]),
426
- onClick: Oe,
427
- style: g({
428
- backgroundColor: e.backgroundColor,
429
- border: `1px solid ${G.value}`,
430
- cursor: e.isCursorPointer ? "pointer" : "default"
431
- })
432
- }, [y(t.$slots, "annotator-action-delete", h(f({ disabled: !S.value.length })), () => [d(a, {
433
- name: "trash",
434
- stroke: e.color
435
- }, null, 8, ["stroke"])])], 6),
436
- V.value === "text" ? oe((_(), l("input", {
437
- key: 0,
438
- ref: "range",
439
- type: "range",
440
- class: "vertical-range",
441
- min: 3,
442
- max: 48,
443
- step: 1,
444
- "onUpdate:modelValue": r[3] ||= (e) => R.value = e,
445
- style: g({ accentColor: e.color })
446
- }, null, 4)), [[ie, R.value]]) : oe((_(), l("input", {
447
- key: 1,
448
- ref: "range",
449
- type: "range",
450
- class: "vertical-range",
451
- min: .5,
452
- max: 12,
453
- step: .1,
454
- "onUpdate:modelValue": r[4] ||= (e) => T.value = e,
455
- style: g({ accentColor: e.color })
456
- }, null, 4)), [[ie, T.value]])
457
- ], 4)) : c("", !0);
458
- }
459
- };
460
- //#endregion
461
- export { x as n, se as t };