vue-data-ui 2.10.11 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +7 -1
  2. package/dist/{Arrow-B0YRTzCj.js → Arrow-BSsIs5Aj.js} +1 -1
  3. package/dist/{Arrow-C6ETniRR.cjs → Arrow-BfdnOsct.cjs} +1 -1
  4. package/dist/{BaseIcon-V0HD2AAD.js → BaseIcon-BPehVcsN.js} +4 -3
  5. package/dist/{BaseIcon-CObkWSlF.cjs → BaseIcon-dtfVrHa7.cjs} +1 -1
  6. package/dist/{ColorPicker-BMSFl1XZ.js → ColorPicker-ByaQGf5i.js} +3 -3
  7. package/dist/{ColorPicker-Czm9Mx_k.cjs → ColorPicker-C-nhrZ-J.cjs} +1 -1
  8. package/dist/{DataTable-CVSajw4G.js → DataTable-BdekL1Hc.js} +55 -53
  9. package/dist/DataTable-pT39kn0W.cjs +1 -0
  10. package/dist/{Legend-DUZ-tBhF.cjs → Legend-C8PTNFsH.cjs} +1 -1
  11. package/dist/{Legend-B61dtd8W.js → Legend-HckkoJBL.js} +2 -2
  12. package/dist/PackageVersion-B6nxekEz.cjs +1 -0
  13. package/dist/{PackageVersion-DqsC6J9R.js → PackageVersion-BPCzY_N5.js} +1 -1
  14. package/dist/{PenAndPaper-Bqjmruhh.js → PenAndPaper-B3KDT2of.js} +3 -3
  15. package/dist/{PenAndPaper-CU0ABvzv.cjs → PenAndPaper-BC1d2zL5.cjs} +1 -1
  16. package/dist/{Shape-CWSam3QO.js → Shape-B0OqBXWl.js} +1 -1
  17. package/dist/{Shape-x9QWqySR.cjs → Shape-Cr-Qt6IO.cjs} +1 -1
  18. package/dist/{Slicer-VF0Mi4Gp.cjs → Slicer-BWr1nt8v.cjs} +1 -1
  19. package/dist/{Slicer-BbMNT2AI.js → Slicer-BXBqgQau.js} +3 -3
  20. package/dist/{Title-CxubvuEh.js → Title-Cq5kGGhS.js} +1 -1
  21. package/dist/{Title-LLvOAGEi.cjs → Title-GpO-QNhg.cjs} +1 -1
  22. package/dist/{Tooltip-C0W6IWVK.js → Tooltip-CxzDtoXn.js} +1 -1
  23. package/dist/{Tooltip-B1xW8AQT.cjs → Tooltip-eL97y6Ym.cjs} +1 -1
  24. package/dist/documentation/installation.md +1 -0
  25. package/dist/{dom-to-png-CNF-s1oi.cjs → dom-to-png-BeN7LHfC.cjs} +1 -1
  26. package/dist/{dom-to-png-D2P_vWEM.js → dom-to-png-G_nLlvER.js} +1 -1
  27. package/dist/{img-BDamDFQb.cjs → img-08K-Su3g.cjs} +1 -1
  28. package/dist/{img-DacIcr83.js → img-BzMFujbd.js} +1 -1
  29. package/dist/{index-CO-5OgQA.js → index-BMcwUsiG.js} +541 -457
  30. package/dist/{index-B7zOq_yO.cjs → index-CG-euAJp.cjs} +5 -5
  31. package/dist/{pdf-DflC6mtT.js → pdf-BJNBeUWV.js} +1 -1
  32. package/dist/{pdf-D6wHFpvv.cjs → pdf-achyloML.cjs} +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/types/vue-data-ui.d.cts +92 -5
  35. package/dist/types/vue-data-ui.d.ts +92 -5
  36. package/dist/{useNestedProp-DUH233CH.cjs → useNestedProp-DYDoE86w.cjs} +1 -1
  37. package/dist/{useNestedProp-D8sa_wYF.js → useNestedProp-DwQWwt5e.js} +1 -1
  38. package/dist/{usePrinter-u4erwqXt.cjs → usePrinter-BBqldIVF.cjs} +1 -1
  39. package/dist/{usePrinter-DldU0tBx.js → usePrinter-BpCNa5RW.js} +3 -3
  40. package/dist/{useResponsive-DQmBAoBf.cjs → useResponsive-BBkmXXaa.cjs} +1 -1
  41. package/dist/{useResponsive-Cw4oZ8sQ.js → useResponsive-JZ9xq-JV.js} +4 -1
  42. package/dist/vue-data-ui-BTz28Upr.cjs +9 -0
  43. package/dist/{vue-data-ui-DaG_fJyV.js → vue-data-ui-DXciuF6V.js} +115 -107
  44. package/dist/vue-data-ui.cjs +1 -1
  45. package/dist/vue-data-ui.js +60 -59
  46. package/dist/{vue-ui-3d-bar-1L_FJakQ.cjs → vue-ui-3d-bar-Cv0XQSLU.cjs} +1 -1
  47. package/dist/{vue-ui-3d-bar-CKaPvMis.js → vue-ui-3d-bar-D-x0k_IG.js} +9 -9
  48. package/dist/{vue-ui-accordion-RRHvINsj.js → vue-ui-accordion-DKw3ZQgh.js} +3 -3
  49. package/dist/{vue-ui-accordion-DkOSgEPp.cjs → vue-ui-accordion-dJGHfrMl.cjs} +1 -1
  50. package/dist/{vue-ui-age-pyramid-BsfpBP5o.js → vue-ui-age-pyramid-BKOh2L3c.js} +11 -11
  51. package/dist/{vue-ui-age-pyramid-BX5nAmcR.cjs → vue-ui-age-pyramid-DzQ9EYPB.cjs} +1 -1
  52. package/dist/{vue-ui-annotator-CSSRY4KB.js → vue-ui-annotator-BSGf2Uh1.js} +2 -2
  53. package/dist/{vue-ui-annotator-BCfRHpTL.cjs → vue-ui-annotator-DJDY5xOf.cjs} +1 -1
  54. package/dist/{vue-ui-bullet-BuoFM_Qt.cjs → vue-ui-bullet-BHaeMobd.cjs} +1 -1
  55. package/dist/{vue-ui-bullet-wcXiBQsu.js → vue-ui-bullet-CJLZA5Lf.js} +8 -8
  56. package/dist/{vue-ui-candlestick-DLPBk-z0.js → vue-ui-candlestick-BLqrtK2S.js} +12 -12
  57. package/dist/{vue-ui-candlestick-D_UWn-gv.cjs → vue-ui-candlestick-D5aSctEq.cjs} +1 -1
  58. package/dist/{vue-ui-carousel-table-B-FxYow7.js → vue-ui-carousel-table-CvDic9rq.js} +4 -4
  59. package/dist/{vue-ui-carousel-table-DZWUAetO.cjs → vue-ui-carousel-table-DoQSiBlh.cjs} +1 -1
  60. package/dist/{vue-ui-chestnut-Ds2IXobn.cjs → vue-ui-chestnut-BW9_1uRo.cjs} +1 -1
  61. package/dist/{vue-ui-chestnut-D_GtQRUL.js → vue-ui-chestnut-Co3ZtHYQ.js} +8 -8
  62. package/dist/vue-ui-chord-CUREQYhU.cjs +16 -0
  63. package/dist/vue-ui-chord-XU2pSfEx.js +924 -0
  64. package/dist/{vue-ui-circle-pack-DZjwCJfn.cjs → vue-ui-circle-pack-Bdtr6z4Z.cjs} +1 -1
  65. package/dist/{vue-ui-circle-pack-IFKy_EXs.js → vue-ui-circle-pack-DpbWAZFC.js} +10 -10
  66. package/dist/{vue-ui-cursor-CFcWzQ_a.cjs → vue-ui-cursor-BAMt5dcz.cjs} +1 -1
  67. package/dist/{vue-ui-cursor-CpXWkh96.js → vue-ui-cursor-CuvyoiLa.js} +2 -2
  68. package/dist/{vue-ui-dashboard-BMVLKe5Z.cjs → vue-ui-dashboard-Bvrpw4EQ.cjs} +1 -1
  69. package/dist/{vue-ui-dashboard-CLULzCgo.js → vue-ui-dashboard-_LJuvqRE.js} +62 -62
  70. package/dist/{vue-ui-digits-VMbRXMfP.cjs → vue-ui-digits-CGzSArOS.cjs} +1 -1
  71. package/dist/{vue-ui-digits-B3J16TA3.js → vue-ui-digits-CeLZoNoA.js} +2 -2
  72. package/dist/{vue-ui-donut-BjGbzLsC.cjs → vue-ui-donut-BV_QLVp2.cjs} +1 -1
  73. package/dist/{vue-ui-donut-DUAbkhZV.js → vue-ui-donut-BegwljuG.js} +13 -13
  74. package/dist/{vue-ui-donut-evolution-BlMjAI3c.js → vue-ui-donut-evolution-CQ-1_Xak.js} +11 -11
  75. package/dist/{vue-ui-donut-evolution-B2MMB7lY.cjs → vue-ui-donut-evolution-euIDGiH3.cjs} +1 -1
  76. package/dist/{vue-ui-dumbbell-DgizrVYM.cjs → vue-ui-dumbbell-BO0h5wGp.cjs} +1 -1
  77. package/dist/{vue-ui-dumbbell-B_88Pzkq.js → vue-ui-dumbbell-CPylAaR8.js} +11 -11
  78. package/dist/{vue-ui-flow-CGYd2Iko.js → vue-ui-flow-B8fyDK8A.js} +11 -11
  79. package/dist/{vue-ui-flow-v5zjc5i3.cjs → vue-ui-flow-DWiA9yFS.cjs} +1 -1
  80. package/dist/{vue-ui-funnel-D8Ql3Fu9.js → vue-ui-funnel-BAa1OwMy.js} +10 -10
  81. package/dist/{vue-ui-funnel-AOnxjmTY.cjs → vue-ui-funnel-yRS_OJcF.cjs} +1 -1
  82. package/dist/{vue-ui-galaxy-C5XKP863.js → vue-ui-galaxy-DEZ-rfXE.js} +11 -11
  83. package/dist/{vue-ui-galaxy-qIl1Sp2I.cjs → vue-ui-galaxy-DF41DbY7.cjs} +1 -1
  84. package/dist/{vue-ui-gauge-BzmlwkZO.cjs → vue-ui-gauge-CCGMpnvM.cjs} +1 -1
  85. package/dist/{vue-ui-gauge-CnS0ZVac.js → vue-ui-gauge-k3ejBVZj.js} +8 -8
  86. package/dist/{vue-ui-gizmo-oMF4Uxgv.cjs → vue-ui-gizmo-DGRDcoNW.cjs} +1 -1
  87. package/dist/{vue-ui-gizmo-w7f-RuqD.js → vue-ui-gizmo-uSaL0tgk.js} +3 -3
  88. package/dist/{vue-ui-heatmap-DdbtuK1j.js → vue-ui-heatmap-WgeuA6rb.js} +10 -10
  89. package/dist/{vue-ui-heatmap-CjUYm6Y8.cjs → vue-ui-heatmap-dKn60iwF.cjs} +1 -1
  90. package/dist/{vue-ui-history-plot-CPEbWJv-.cjs → vue-ui-history-plot-Dnb4txKX.cjs} +1 -1
  91. package/dist/{vue-ui-history-plot-DJ5eSSra.js → vue-ui-history-plot-jBlXPR4I.js} +12 -12
  92. package/dist/{vue-ui-kpi-BBpWvss7.cjs → vue-ui-kpi-C13Zgi4k.cjs} +1 -1
  93. package/dist/{vue-ui-kpi-T-hxtGRX.js → vue-ui-kpi-N3ugHMNs.js} +3 -3
  94. package/dist/{vue-ui-mini-loader-CnEXcdzr.cjs → vue-ui-mini-loader-BnblpH8s.cjs} +1 -1
  95. package/dist/{vue-ui-mini-loader-BUdcns7l.js → vue-ui-mini-loader-BukHpIuC.js} +2 -2
  96. package/dist/{vue-ui-molecule-9zI34I22.js → vue-ui-molecule-DQADG59C.js} +11 -11
  97. package/dist/{vue-ui-molecule-CXda1TRy.cjs → vue-ui-molecule-zkjb68lX.cjs} +1 -1
  98. package/dist/{vue-ui-mood-radar-3FsJtJ1q.js → vue-ui-mood-radar-BdpZWnM1.js} +11 -11
  99. package/dist/{vue-ui-mood-radar-DCz7WxHl.cjs → vue-ui-mood-radar-oO1NjJsj.cjs} +1 -1
  100. package/dist/{vue-ui-nested-donuts-D5-RAGOC.js → vue-ui-nested-donuts-6EYydl-l.js} +12 -12
  101. package/dist/{vue-ui-nested-donuts-CQHTFClA.cjs → vue-ui-nested-donuts-8PBCRUKI.cjs} +1 -1
  102. package/dist/{vue-ui-onion-C3tsgeYq.cjs → vue-ui-onion-D0Y-pJox.cjs} +1 -1
  103. package/dist/{vue-ui-onion-DyNY3aLe.js → vue-ui-onion-Dqfii-y3.js} +12 -12
  104. package/dist/{vue-ui-parallel-coordinate-plot-tnKZr6bC.cjs → vue-ui-parallel-coordinate-plot-cETB0SSp.cjs} +1 -1
  105. package/dist/{vue-ui-parallel-coordinate-plot-D3C5xDkx.js → vue-ui-parallel-coordinate-plot-yUVuNHbG.js} +13 -13
  106. package/dist/{vue-ui-quadrant-Oyf18Bj4.js → vue-ui-quadrant-Bk24QzXW.js} +13 -13
  107. package/dist/{vue-ui-quadrant-CF7YSzrp.cjs → vue-ui-quadrant-C2Z9igq-.cjs} +1 -1
  108. package/dist/{vue-ui-quick-chart-Y8-adLxE.cjs → vue-ui-quick-chart-BNYO7nMz.cjs} +1 -1
  109. package/dist/{vue-ui-quick-chart-TbLTi-d3.js → vue-ui-quick-chart-BTBzFVVt.js} +10 -10
  110. package/dist/{vue-ui-radar-BvNWx4a8.cjs → vue-ui-radar-DpJ6BjWE.cjs} +1 -1
  111. package/dist/{vue-ui-radar-BfHQxjpG.js → vue-ui-radar-d5WGxBWb.js} +13 -13
  112. package/dist/{vue-ui-rating-BDM0NHP6.js → vue-ui-rating-DHP9cn7v.js} +2 -2
  113. package/dist/{vue-ui-rating-DitReQ9n.cjs → vue-ui-rating-DlpuX8_4.cjs} +1 -1
  114. package/dist/{vue-ui-relation-circle-DcZyVpqG.cjs → vue-ui-relation-circle-C9r2L_By.cjs} +1 -1
  115. package/dist/{vue-ui-relation-circle-DpwaksSx.js → vue-ui-relation-circle-DFFnj0G-.js} +8 -8
  116. package/dist/{vue-ui-ridgeline-BXEg60Vj.js → vue-ui-ridgeline-B6SmiN8e.js} +13 -13
  117. package/dist/{vue-ui-ridgeline-DgzMstgJ.cjs → vue-ui-ridgeline-CWcW0CKH.cjs} +1 -1
  118. package/dist/{vue-ui-rings-Bsvdt8jo.js → vue-ui-rings-07YzKS3V.js} +13 -13
  119. package/dist/{vue-ui-rings-DqF707hp.cjs → vue-ui-rings-BZ6huPcE.cjs} +1 -1
  120. package/dist/{vue-ui-scatter-D9sIS4Dp.cjs → vue-ui-scatter-DYRw6p9i.cjs} +1 -1
  121. package/dist/{vue-ui-scatter-qQ-795VY.js → vue-ui-scatter-DZZtUBuf.js} +13 -13
  122. package/dist/{vue-ui-skeleton-BeEBd4CC.js → vue-ui-skeleton-BoZyBfQF.js} +503 -467
  123. package/dist/vue-ui-skeleton-LYOlEoA_.cjs +41 -0
  124. package/dist/{vue-ui-smiley-B3JFedE5.cjs → vue-ui-smiley-C9Au0iXl.cjs} +1 -1
  125. package/dist/{vue-ui-smiley-Bba04Gln.js → vue-ui-smiley-D3A8OqM8.js} +2 -2
  126. package/dist/{vue-ui-spark-trend-DB2vKJ0m.js → vue-ui-spark-trend-BfR_RtZy.js} +5 -5
  127. package/dist/{vue-ui-spark-trend-DiZvQzSb.cjs → vue-ui-spark-trend-DnoxMeF3.cjs} +1 -1
  128. package/dist/{vue-ui-sparkbar-B1pBe2b4.cjs → vue-ui-sparkbar-CAHDM61K.cjs} +1 -1
  129. package/dist/{vue-ui-sparkbar-DjsNBWGs.js → vue-ui-sparkbar-CJUkmhnj.js} +4 -4
  130. package/dist/{vue-ui-sparkgauge-BJ0vTnKL.js → vue-ui-sparkgauge-CXt_UXa0.js} +4 -4
  131. package/dist/{vue-ui-sparkgauge-ByMA0D5w.cjs → vue-ui-sparkgauge-DngkG6ub.cjs} +1 -1
  132. package/dist/{vue-ui-sparkhistogram-WxGpd0TA.cjs → vue-ui-sparkhistogram-BGSXZdYJ.cjs} +1 -1
  133. package/dist/{vue-ui-sparkhistogram-Cv-hyUbF.js → vue-ui-sparkhistogram-e1KLP3lx.js} +5 -5
  134. package/dist/{vue-ui-sparkline-DPlkEVV6.cjs → vue-ui-sparkline-4HHF_g27.cjs} +1 -1
  135. package/dist/{vue-ui-sparkline-tnMT43CD.js → vue-ui-sparkline-C1c0gnoE.js} +5 -5
  136. package/dist/{vue-ui-sparkstackbar-BFkweUWm.cjs → vue-ui-sparkstackbar-CYI8Q-A7.cjs} +1 -1
  137. package/dist/{vue-ui-sparkstackbar-8WSy0M8S.js → vue-ui-sparkstackbar-WWHBMDoc.js} +5 -5
  138. package/dist/{vue-ui-stackbar-BfkOVox7.js → vue-ui-stackbar-Dswh_YhD.js} +14 -14
  139. package/dist/{vue-ui-stackbar-BFgWt2oG.cjs → vue-ui-stackbar-LROMB081.cjs} +1 -1
  140. package/dist/{vue-ui-strip-plot-BKsixkUU.cjs → vue-ui-strip-plot-BHLCEMtE.cjs} +1 -1
  141. package/dist/{vue-ui-strip-plot-CN06Oh8m.js → vue-ui-strip-plot-CkTMHioN.js} +12 -12
  142. package/dist/{vue-ui-table-B-sy0kOZ.js → vue-ui-table-BQLFbWJu.js} +3 -3
  143. package/dist/{vue-ui-table-o_zUZsUz.cjs → vue-ui-table-ClPvrWk1.cjs} +1 -1
  144. package/dist/{vue-ui-table-heatmap-Dur8rhk6.js → vue-ui-table-heatmap-Cq0Ayqw9.js} +4 -4
  145. package/dist/{vue-ui-table-heatmap-BidbeObz.cjs → vue-ui-table-heatmap-CzXQ_Jyj.cjs} +1 -1
  146. package/dist/{vue-ui-table-sparkline-BeWSYBle.cjs → vue-ui-table-sparkline-CrWRDJhv.cjs} +1 -1
  147. package/dist/{vue-ui-table-sparkline-Ccw_ekS8.js → vue-ui-table-sparkline-kApN7-VK.js} +5 -5
  148. package/dist/{vue-ui-thermometer-BOw4FvGD.js → vue-ui-thermometer-BqtB3WF_.js} +7 -7
  149. package/dist/{vue-ui-thermometer-Ds9lWEE_.cjs → vue-ui-thermometer-DYo8ZTAM.cjs} +1 -1
  150. package/dist/{vue-ui-timer-B2gMYwCj.js → vue-ui-timer-DcHNiJK0.js} +6 -6
  151. package/dist/{vue-ui-timer-OAHpNcTb.cjs → vue-ui-timer-DprIzsAY.cjs} +1 -1
  152. package/dist/{vue-ui-tiremarks-B8dltsA4.cjs → vue-ui-tiremarks-Dpn0SavO.cjs} +1 -1
  153. package/dist/{vue-ui-tiremarks-BlfDeAAZ.js → vue-ui-tiremarks-fEn67LmT.js} +7 -7
  154. package/dist/{vue-ui-treemap-BjWTRcbW.cjs → vue-ui-treemap-C8uX5Ilw.cjs} +1 -1
  155. package/dist/{vue-ui-treemap-meoOt_AQ.js → vue-ui-treemap-Cq5QKrAX.js} +13 -13
  156. package/dist/{vue-ui-vertical-bar-8EaYa2I2.js → vue-ui-vertical-bar-BctpxL75.js} +13 -13
  157. package/dist/{vue-ui-vertical-bar-kRBUbvs6.cjs → vue-ui-vertical-bar-Bj-tNmvd.cjs} +1 -1
  158. package/dist/{vue-ui-waffle-XM92kEwZ.cjs → vue-ui-waffle-B3XGM76l.cjs} +1 -1
  159. package/dist/{vue-ui-waffle-ThNptuVQ.js → vue-ui-waffle-inmP6xJa.js} +13 -13
  160. package/dist/{vue-ui-wheel-B_DSO7Ko.js → vue-ui-wheel-BExyiteC.js} +8 -8
  161. package/dist/{vue-ui-wheel-DMiRno4r.cjs → vue-ui-wheel-D4quM69U.cjs} +1 -1
  162. package/dist/{vue-ui-word-cloud-tsIW_o0M.js → vue-ui-word-cloud-CO6OX7uL.js} +11 -11
  163. package/dist/{vue-ui-word-cloud-8-CU7ACz.cjs → vue-ui-word-cloud-D3O3LDR0.cjs} +1 -1
  164. package/dist/{vue-ui-world-C-TO7n_r.cjs → vue-ui-world-BWv7KvDY.cjs} +1 -1
  165. package/dist/{vue-ui-world-DizUMTdP.js → vue-ui-world-j_aAVyB8.js} +11 -11
  166. package/dist/{vue-ui-xy-CKNq6i3B.js → vue-ui-xy-BLnXnpd-.js} +16 -16
  167. package/dist/{vue-ui-xy-CHcCU9pB.cjs → vue-ui-xy-CnLejNy1.cjs} +2 -2
  168. package/dist/{vue-ui-xy-canvas-DgLV6VWJ.js → vue-ui-xy-canvas-2hhjtxZN.js} +13 -13
  169. package/dist/{vue-ui-xy-canvas-Cmax9zNa.cjs → vue-ui-xy-canvas-t3XI0Z_d.cjs} +1 -1
  170. package/package.json +1 -1
  171. package/dist/DataTable-DypMcnH2.cjs +0 -1
  172. package/dist/PackageVersion-BS7Jybcw.cjs +0 -1
  173. package/dist/vue-data-ui-C3o_PUJM.cjs +0 -9
  174. package/dist/vue-ui-skeleton-Br6xw2QW.cjs +0 -41
@@ -1,23 +1,23 @@
1
- import { useCssVars as V, unref as e, computed as A, ref as k, onMounted as E, createElementBlock as l, openBlock as n, normalizeClass as w, createElementVNode as a, withKeys as R, normalizeStyle as i, createVNode as C, toDisplayString as I, Fragment as f, renderList as g, createCommentVNode as N, renderSlot as $ } from "vue";
2
- import { _ as K } from "./Shape-CWSam3QO.js";
3
- import O from "./BaseIcon-V0HD2AAD.js";
1
+ import { useCssVars as V, unref as e, computed as A, ref as w, onMounted as E, createElementBlock as n, openBlock as a, normalizeClass as k, createElementVNode as t, withKeys as R, normalizeStyle as i, createVNode as C, toDisplayString as I, Fragment as m, renderList as f, renderSlot as N, createCommentVNode as $ } from "vue";
2
+ import { _ as K } from "./Shape-B0OqBXWl.js";
3
+ import O from "./BaseIcon-BPehVcsN.js";
4
4
  import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const j = { class: "vue-ui-data-table" }, F = { style: { display: "flex", "align-items": "center", "justify-content": "flex-end", "padding-right": "3px", gap: "3px" } }, L = {
5
+ const j = { class: "vue-ui-data-table" }, F = { style: { display: "flex", "align-items": "center", "justify-content": "flex-end", "padding-right": "3px", gap: "3px" } }, L = { style: { width: "12px", height: "12px" } }, M = {
6
6
  key: 0,
7
7
  height: "12",
8
8
  width: "12",
9
9
  viewBox: "0 0 20 20",
10
10
  style: { background: "none" }
11
- }, M = ["fill"], q = ["data-cell"], G = {
11
+ }, q = ["fill"], G = ["data-cell"], H = {
12
12
  dir: "auto",
13
13
  style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" }
14
- }, H = {
14
+ }, J = {
15
15
  key: 0,
16
16
  height: "12",
17
17
  width: "12",
18
18
  viewBox: "0 0 20 20",
19
19
  style: { background: "none", overflow: "visible" }
20
- }, J = {
20
+ }, P = {
21
21
  __name: "DataTable",
22
22
  props: {
23
23
  colNames: {
@@ -32,100 +32,102 @@ const j = { class: "vue-ui-data-table" }, F = { style: { display: "flex", "align
32
32
  config: Object
33
33
  },
34
34
  emits: ["close"],
35
- setup(t, { emit: B }) {
35
+ setup(o, { emit: B }) {
36
36
  V((s) => ({
37
- "92e22452": e(v)
37
+ "2908e47d": e(v)
38
38
  }));
39
- const b = t, { backgroundColor: m, color: y, outline: h } = b.config.th, { backgroundColor: z, color: D, outline: v } = b.config.td, S = A(() => b.config.breakpoint), p = k(null), _ = k(!1);
39
+ const b = o, { backgroundColor: h, color: p, outline: g } = b.config.th, { backgroundColor: z, color: D, outline: v } = b.config.td, S = A(() => b.config.breakpoint), y = w(null), _ = w(!1);
40
40
  E(() => {
41
41
  const s = new ResizeObserver((r) => {
42
- r.forEach((o) => {
43
- _.value = o.contentRect.width < S.value;
42
+ r.forEach((l) => {
43
+ _.value = l.contentRect.width < S.value;
44
44
  });
45
45
  });
46
- p.value && s.observe(p.value);
46
+ y.value && s.observe(y.value);
47
47
  });
48
48
  const x = B;
49
- return (s, r) => (n(), l("div", {
49
+ return (s, r) => (a(), n("div", {
50
50
  ref_key: "tableContainer",
51
- ref: p,
51
+ ref: y,
52
52
  style: { width: "100%", "container-type": "inline-size", position: "relative", "padding-top": "36px", overflow: "auto" },
53
- class: w({ "atom-data-table": !0, "vue-ui-responsive": _.value })
53
+ class: k({ "atom-data-table": !0, "vue-ui-responsive": _.value })
54
54
  }, [
55
- a("div", {
55
+ t("div", {
56
56
  "data-dom-to-png-ignore": "",
57
57
  role: "button",
58
58
  tabindex: "0",
59
- style: i(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e(m)};`),
60
- onClick: r[0] || (r[0] = (o) => x("close")),
61
- onKeypress: r[1] || (r[1] = R((o) => x("close"), ["enter"]))
59
+ style: i(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e(h)};`),
60
+ onClick: r[0] || (r[0] = (l) => x("close")),
61
+ onKeypress: r[1] || (r[1] = R((l) => x("close"), ["enter"]))
62
62
  }, [
63
63
  C(O, {
64
64
  name: "close",
65
- stroke: e(y),
65
+ stroke: e(p),
66
66
  "stroke-width": 2
67
67
  }, null, 8, ["stroke"])
68
68
  ], 36),
69
- a("table", j, [
70
- a("caption", {
71
- style: i({ backgroundColor: e(m), color: e(y), outline: e(h) }),
69
+ t("table", j, [
70
+ t("caption", {
71
+ style: i({ backgroundColor: e(h), color: e(p), outline: e(g) }),
72
72
  class: "vue-ui-data-table__caption"
73
- }, I(t.title), 5),
74
- a("thead", null, [
75
- a("tr", {
73
+ }, I(o.title), 5),
74
+ t("thead", null, [
75
+ t("tr", {
76
76
  role: "row",
77
- style: i([{ "font-variant-numeric": "tabular-nums" }, { backgroundColor: e(m), color: e(y) }]),
77
+ style: i([{ "font-variant-numeric": "tabular-nums" }, { backgroundColor: e(h), color: e(p) }]),
78
78
  class: "vue-ui-data-table__thead-row"
79
79
  }, [
80
- (n(!0), l(f, null, g(t.head, (o, c) => (n(), l("th", {
80
+ (a(!0), n(m, null, f(o.head, (l, c) => (a(), n("th", {
81
81
  role: "cell",
82
- style: i({ outline: e(h) }),
82
+ style: i({ outline: e(g) }),
83
83
  key: `th_${c}`
84
84
  }, [
85
- a("div", F, [
86
- o.color ? (n(), l("svg", L, [
87
- a("circle", {
88
- cx: "10",
89
- cy: "10",
90
- r: "10",
91
- fill: o.color
92
- }, null, 8, M)
93
- ])) : N("", !0),
94
- $(s.$slots, "th", { th: o }, void 0, !0)
85
+ t("div", F, [
86
+ t("div", L, [
87
+ l.color ? (a(), n("svg", M, [
88
+ t("circle", {
89
+ cx: "10",
90
+ cy: "10",
91
+ r: "10",
92
+ fill: l.color
93
+ }, null, 8, q)
94
+ ])) : $("", !0)
95
+ ]),
96
+ N(s.$slots, "th", { th: l }, void 0, !0)
95
97
  ])
96
98
  ], 4))), 128))
97
99
  ], 4)
98
100
  ]),
99
- a("tbody", null, [
100
- (n(!0), l(f, null, g(t.body, (o, c) => (n(), l("tr", {
101
+ t("tbody", null, [
102
+ (a(!0), n(m, null, f(o.body, (l, c) => (a(), n("tr", {
101
103
  role: "row",
102
104
  style: i([{ "font-variant-numeric": "tabular-nums" }, { backgroundColor: e(z), color: e(D) }]),
103
- class: w({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": c % 2 === 0, "vue-ui-data-table__tbody__row-odd": c % 2 !== 0 })
105
+ class: k({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": c % 2 === 0, "vue-ui-data-table__tbody__row-odd": c % 2 !== 0 })
104
106
  }, [
105
- (n(!0), l(f, null, g(o, (d, u) => (n(), l("td", {
107
+ (a(!0), n(m, null, f(l, (d, u) => (a(), n("td", {
106
108
  role: "cell",
107
- "data-cell": (t.colNames[u] && t.colNames[u].name ? t.colNames[u].name : "") || t.colNames[u] || "",
109
+ "data-cell": (o.colNames[u] && o.colNames[u].name ? o.colNames[u].name : "") || o.colNames[u] || "",
108
110
  style: i({ outline: e(v) }),
109
111
  class: "vue-ui-data-table__tbody__td"
110
112
  }, [
111
- a("div", G, [
112
- d.color ? (n(), l("svg", H, [
113
+ t("div", H, [
114
+ d.color ? (a(), n("svg", J, [
113
115
  C(K, {
114
116
  plot: { x: 10, y: 10 },
115
117
  color: d.color,
116
118
  radius: 9,
117
- shape: t.config.shape || d.shape || "circle"
119
+ shape: o.config.shape || d.shape || "circle"
118
120
  }, null, 8, ["color", "shape"])
119
- ])) : N("", !0),
120
- $(s.$slots, "td", { td: d }, void 0, !0)
121
+ ])) : $("", !0),
122
+ N(s.$slots, "td", { td: d }, void 0, !0)
121
123
  ])
122
- ], 12, q))), 256))
124
+ ], 12, G))), 256))
123
125
  ], 6))), 256))
124
126
  ])
125
127
  ])
126
128
  ], 2));
127
129
  }
128
- }, X = /* @__PURE__ */ T(J, [["__scopeId", "data-v-6d52f0eb"]]);
130
+ }, Y = /* @__PURE__ */ T(P, [["__scopeId", "data-v-4afbd65f"]]);
129
131
  export {
130
- X as D
132
+ Y as D
131
133
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),k=require("./Shape-Cr-Qt6IO.cjs"),_=require("./BaseIcon-dtfVrHa7.cjs"),x=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w={class:"vue-ui-data-table"},B={style:{display:"flex","align-items":"center","justify-content":"flex-end","padding-right":"3px",gap:"3px"}},E={style:{width:"12px",height:"12px"}},N={key:0,height:"12",width:"12",viewBox:"0 0 20 20",style:{background:"none"}},V=["fill"],C=["data-cell"],S={dir:"auto",style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},z={key:0,height:"12",width:"12",viewBox:"0 0 20 20",style:{background:"none",overflow:"visible"}},$={__name:"DataTable",props:{colNames:{type:Array,default(){return[]}},head:Array,body:Array,title:String,config:Object},emits:["close"],setup(t,{emit:b}){e.useCssVars(l=>({"2908e47d":e.unref(f)}));const i=t,{backgroundColor:s,color:d,outline:m}=i.config.th,{backgroundColor:h,color:g,outline:f}=i.config.td,v=e.computed(()=>i.config.breakpoint),u=e.ref(null),p=e.ref(!1);e.onMounted(()=>{const l=new ResizeObserver(n=>{n.forEach(o=>{p.value=o.contentRect.width<v.value})});u.value&&l.observe(u.value)});const y=b;return(l,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tableContainer",ref:u,style:{width:"100%","container-type":"inline-size",position:"relative","padding-top":"36px",overflow:"auto"},class:e.normalizeClass({"atom-data-table":!0,"vue-ui-responsive":p.value})},[e.createElementVNode("div",{"data-dom-to-png-ignore":"",role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.unref(s)};`),onClick:n[0]||(n[0]=o=>y("close")),onKeypress:n[1]||(n[1]=e.withKeys(o=>y("close"),["enter"]))},[e.createVNode(_.default,{name:"close",stroke:e.unref(d),"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",w,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:e.unref(s),color:e.unref(d),outline:e.unref(m)}),class:"vue-ui-data-table__caption"},e.toDisplayString(t.title),5),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle([{"font-variant-numeric":"tabular-nums"},{backgroundColor:e.unref(s),color:e.unref(d)}]),class:"vue-ui-data-table__thead-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.head,(o,r)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",style:e.normalizeStyle({outline:e.unref(m)}),key:`th_${r}`},[e.createElementVNode("div",B,[e.createElementVNode("div",E,[o.color?(e.openBlock(),e.createElementBlock("svg",N,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:o.color},null,8,V)])):e.createCommentVNode("",!0)]),e.renderSlot(l.$slots,"th",{th:o},void 0,!0)])],4))),128))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.body,(o,r)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",style:e.normalizeStyle([{"font-variant-numeric":"tabular-nums"},{backgroundColor:e.unref(h),color:e.unref(g)}]),class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(a,c)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":(t.colNames[c]&&t.colNames[c].name?t.colNames[c].name:"")||t.colNames[c]||"",style:e.normalizeStyle({outline:e.unref(f)}),class:"vue-ui-data-table__tbody__td"},[e.createElementVNode("div",S,[a.color?(e.openBlock(),e.createElementBlock("svg",z,[e.createVNode(k._sfc_main,{plot:{x:10,y:10},color:a.color,radius:9,shape:t.config.shape||a.shape||"circle"},null,8,["color","shape"])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"td",{td:a},void 0,!0)])],12,C))),256))],6))),256))])])],2))}},q=x._export_sfc($,[["__scopeId","data-v-4afbd65f"]]);exports.DataTable=q;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),d=require("./index-B7zOq_yO.cjs"),u=require("./Shape-x9QWqySR.cjs"),s=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f=["id"],g=["onClick","height","width"],k={__name:"Legend",props:{legendSet:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}},id:{type:String,default:""},clickable:{type:Boolean,default:!0}},emits:["clickMarker"],setup(t,{emit:c}){const r=c;function a(i,l){r("clickMarker",{legend:i,i:l})}return(i,l)=>(e.openBlock(),e.createElementBlock("div",{id:t.id,class:"vue-data-ui-legend",style:e.normalizeStyle(`background:${t.config.backgroundColor};font-size:${t.config.fontSize}px;color:${t.config.color};padding-bottom:${t.config.paddingBottom}px;padding-top:${t.config.paddingTop||12}px;font-weight:${t.config.fontWeight}`)},[e.renderSlot(i.$slots,"legendTitle",{titleSet:t.legendSet},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.legendSet,(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"vue-data-ui-legend-item":!0,active:t.clickable})},[n.shape?(e.openBlock(),e.createElementBlock("svg",{key:0,onClick:h=>a(n,o),height:t.config.fontSize,width:t.config.fontSize,viewBox:"0 0 60 60",style:e.normalizeStyle(`overflow: visible;opacity:${n.opacity}`)},[e.createVNode(u._sfc_main,{shape:n.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:n.color},null,8,["shape","fill"]),e.renderSlot(i.$slots,"legend-pattern",e.mergeProps({ref_for:!0},{legend:n,index:e.unref(d.isValidUserValue)(n.absoluteIndex)?n.absoluteIndex:o}),void 0,!0)],12,g)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"item",{legend:n,index:o},void 0,!0)],2))),256))],12,f))}},m=s._export_sfc(k,[["__scopeId","data-v-f1db6c9f"]]);exports.Legend=m;
1
+ "use strict";const e=require("vue"),d=require("./index-CG-euAJp.cjs"),u=require("./Shape-Cr-Qt6IO.cjs"),s=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f=["id"],g=["onClick","height","width"],k={__name:"Legend",props:{legendSet:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}},id:{type:String,default:""},clickable:{type:Boolean,default:!0}},emits:["clickMarker"],setup(t,{emit:c}){const r=c;function a(i,l){r("clickMarker",{legend:i,i:l})}return(i,l)=>(e.openBlock(),e.createElementBlock("div",{id:t.id,class:"vue-data-ui-legend",style:e.normalizeStyle(`background:${t.config.backgroundColor};font-size:${t.config.fontSize}px;color:${t.config.color};padding-bottom:${t.config.paddingBottom}px;padding-top:${t.config.paddingTop||12}px;font-weight:${t.config.fontWeight}`)},[e.renderSlot(i.$slots,"legendTitle",{titleSet:t.legendSet},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.legendSet,(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"vue-data-ui-legend-item":!0,active:t.clickable})},[n.shape?(e.openBlock(),e.createElementBlock("svg",{key:0,onClick:h=>a(n,o),height:t.config.fontSize,width:t.config.fontSize,viewBox:"0 0 60 60",style:e.normalizeStyle(`overflow: visible;opacity:${n.opacity}`)},[e.createVNode(u._sfc_main,{shape:n.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:n.color},null,8,["shape","fill"]),e.renderSlot(i.$slots,"legend-pattern",e.mergeProps({ref_for:!0},{legend:n,index:e.unref(d.isValidUserValue)(n.absoluteIndex)?n.absoluteIndex:o}),void 0,!0)],12,g)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"item",{legend:n,index:o},void 0,!0)],2))),256))],12,f))}},m=s._export_sfc(k,[["__scopeId","data-v-f1db6c9f"]]);exports.Legend=m;
@@ -1,6 +1,6 @@
1
1
  import { createElementBlock as n, openBlock as o, normalizeStyle as d, renderSlot as l, Fragment as u, renderList as g, normalizeClass as m, createCommentVNode as h, createVNode as k, mergeProps as y, unref as $ } from "vue";
2
- import { _ as p } from "./index-CO-5OgQA.js";
3
- import { _ as v } from "./Shape-CWSam3QO.js";
2
+ import { _ as p } from "./index-BMcwUsiG.js";
3
+ import { _ as v } from "./Shape-B0OqBXWl.js";
4
4
  import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const S = ["id"], x = ["onClick", "height", "width"], z = {
6
6
  __name: "Legend",
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),t="2.11.0",n={"aria-hidden":"true"},s={__name:"PackageVersion",setup(c){return(r,o)=>(e.openBlock(),e.createElementBlock("desc",n,"Composed with Vue Data UI "+e.toDisplayString(e.unref(t)),1))}};exports._sfc_main=s;
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as t, toDisplayString as o, unref as r } from "vue";
2
- const n = "2.10.11", s = { "aria-hidden": "true" }, p = {
2
+ const n = "2.11.0", s = { "aria-hidden": "true" }, p = {
3
3
  __name: "PackageVersion",
4
4
  setup(a) {
5
5
  return (c, _) => (t(), e("desc", s, "Composed with Vue Data UI " + o(r(n)), 1));
@@ -1,7 +1,7 @@
1
1
  import { ref as c, computed as ge, watch as X, nextTick as le, onMounted as pe, onBeforeUnmount as me, createElementBlock as Y, createCommentVNode as q, openBlock as z, normalizeStyle as x, createElementVNode as k, withDirectives as ae, createVNode as R, normalizeClass as G, toDisplayString as Ae, unref as he, vModelText as oe } from "vue";
2
- import T from "./BaseIcon-V0HD2AAD.js";
3
- import { C as we } from "./ColorPicker-BMSFl1XZ.js";
4
- import { l as be, f as xe } from "./index-CO-5OgQA.js";
2
+ import T from "./BaseIcon-BPehVcsN.js";
3
+ import { C as we } from "./ColorPicker-ByaQGf5i.js";
4
+ import { l as be, f as xe } from "./index-BMcwUsiG.js";
5
5
  const ye = {
6
6
  class: "vue-ui-pen-and-paper-action",
7
7
  style: { padding: "0 !important" }
@@ -1 +1 @@
1
- "use strict";const a=require("vue"),R=require("./BaseIcon-CObkWSlF.cjs"),ae=require("./ColorPicker-Czm9Mx_k.cjs"),O=require("./index-B7zOq_yO.cjs"),oe={class:"vue-ui-pen-and-paper-action",style:{padding:"0 !important"}},re=["disabled"],se={__name:"PenAndPaper",props:{svgRef:{type:[Object,null],required:!0},color:{type:String,default:"#2D353C"},backgroundColor:{type:String,default:"#FFFFFF"},active:{type:Boolean,default:!1},scale:{type:Number,default:1}},emits:["close"],setup(d,{emit:j}){const s=d,J=j,x=a.ref([]),k=a.ref([]),C=a.ref(s.color),N=a.ref(2),$=a.ref(!1),V=a.ref(""),r=a.ref(null),h=a.ref(null),D=a.ref(null),A=a.ref("draw"),T=a.ref(!1),f=a.ref(null),z=a.ref({x:0,y:0}),B=a.ref([""]),L=a.ref({row:0,col:0}),E=a.ref(16),I=a.ref("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");function K(l){if(!r.value||A.value!=="text"||T.value)return;const{x:e,y:n}=M(l);z.value={x:e,y:n},B.value=[""],L.value={row:0,col:0};const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("x",e),t.setAttribute("y",n),t.setAttribute("fill",C.value),t.setAttribute("font-size",E.value*s.scale),t.setAttribute("font-family","sans-serif"),t.setAttribute("class","vue-data-ui-doodle"),t.setAttribute("dominant-baseline","hanging"),t.setAttribute("pointer-events","all");const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("x",e),o.setAttribute("dy","0"),o.textContent="",t.appendChild(o),t.style.pointerEvents="none",t.style.userSelect="none",r.value.appendChild(t),f.value=t,T.value=!0,window.addEventListener("keydown",U),window.addEventListener("mousedown",H,!0),q(),G()}function U(l){if(!T.value)return;let{row:e,col:n}=L.value,t=B.value.slice(),o=!1;if(l.key==="Enter"){const u=t[e],i=u.slice(0,n),v=u.slice(n);t.splice(e,1,i,v),e+=1,n=0,o=!0,l.preventDefault()}else if(l.key==="Backspace"){if(n>0)t[e]=t[e].slice(0,n-1)+t[e].slice(n),n-=1,o=!0;else if(e>0){const u=t[e-1].length;t[e-1]+=t[e],t.splice(e,1),e-=1,n=u,o=!0}l.preventDefault()}else if(l.key==="Delete")n<t[e].length?(t[e]=t[e].slice(0,n)+t[e].slice(n+1),o=!0):e<t.length-1&&(t[e]+=t[e+1],t.splice(e+1,1),o=!0),l.preventDefault();else if(l.key==="ArrowLeft")n>0?n-=1:e>0&&(e-=1,n=t[e].length),o=!0,l.preventDefault();else if(l.key==="ArrowRight")n<t[e].length?n+=1:e<t.length-1&&(e+=1,n=0),o=!0,l.preventDefault();else if(l.key==="ArrowUp")e>0&&(e-=1,n=Math.min(n,t[e].length),o=!0),l.preventDefault();else if(l.key==="ArrowDown")e<t.length-1&&(e+=1,n=Math.min(n,t[e].length),o=!0),l.preventDefault();else if(l.key.length===1&&!l.ctrlKey&&!l.metaKey&&!l.altKey)t[e]=t[e].slice(0,n)+l.key+t[e].slice(n),n+=1,o=!0,l.preventDefault();else if(l.key==="Escape"){X(!0);return}else l.key==="Tab"&&l.preventDefault();o&&(B.value=t,L.value={row:e,col:n},q(),G())}function q(){const l=f.value,{x:e}=z.value;for(;l.firstChild;)l.removeChild(l.firstChild);B.value.forEach((n,t)=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("x",e),o.setAttribute("dy",t===0?"0":`${E.value*1.2*s.scale}`),o.textContent=n.length?n:"​",l.appendChild(o)})}function G(){const l=r.value.querySelector(".vue-data-ui-svg-caret");l&&r.value.removeChild(l);const e=f.value;if(!e)return;const{x:n,y:t}=z.value,{row:o,col:u}=L.value,i=E.value*s.scale,v=e.childNodes[o];if(!v)return;let g=v.textContent.slice(0,u);g.endsWith(" ")&&(g+=" ");const c=document.createElementNS("http://www.w3.org/2000/svg","text");c.setAttribute("x",n),c.setAttribute("y",t),c.setAttribute("font-size",i),c.setAttribute("font-family","sans-serif"),c.textContent=g||"",r.value.appendChild(c);const m=c.getBBox();r.value.removeChild(c);let p=t+o*i*1.2,b=n+m.width;const w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",b),w.setAttribute("y",p),w.setAttribute("width",2),w.setAttribute("height",i),w.setAttribute("fill",C.value),w.setAttribute("class","vue-data-ui-svg-caret"),r.value.appendChild(w)}function H(l){if(f.value&&!f.value.contains(l.target)){const e=f.value.children;e.length===1&&(e[0].textContent===""||e[0].textContent==="​")&&f.value.remove(),X(!1)}}function X(l=!1){var o;window.removeEventListener("keydown",U),window.removeEventListener("mousedown",H,!0);const e=r.value.querySelector(".vue-data-ui-svg-caret");e&&r.value.removeChild(e);const n=(o=f.value)==null?void 0:o.children;let t=!1;if(n&&n.length===1){const u=n[0].textContent;t=!u||u==="​"}l||t?f.value&&r.value.contains(f.value)&&r.value.removeChild(f.value):f.value&&r.value.contains(f.value)&&x.value.push(f.value),T.value=!1,f.value=null,B.value=[""],L.value={row:0,col:0}}const y=a.computed(()=>O.lightenHexColor(s.color,.6));function Y(){if(!r.value)return;const l=r.value.querySelector(".vue-data-ui-mask");if(l&&r.value.removeChild(l),s.active){const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("class","vue-data-ui-mask"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill","transparent"),e.setAttribute("pointer-events","all"),r.value.insertBefore(e,r.value.firstChild)}}function M(l){var o;const e=s.svgRef;if(!e)return{x:0,y:0};const n=e.createSVGPoint();n.x=l.clientX,n.y=l.clientY;const t=(o=e.getScreenCTM())==null?void 0:o.inverse();return t?n.matrixTransform(t):{x:0,y:0}}function Z(l){const e=l.trim().split(/\s+/);if(e.length<4)return l;const n=e.slice(1).map(Number);if(n.length%2!==0)return l;const t=_(n),o=[`M ${t[0]} ${t[1]}`];for(let v=2;v<t.length-2;v+=2){const g=t[v-2],c=t[v-1],m=t[v],p=t[v+1],b=(g+m)/2,w=(c+p)/2;o.push(`Q ${g} ${c} ${b} ${w}`)}const u=t[t.length-2],i=t[t.length-1];return o.push(`L ${u} ${i}`),o.join(" ")}function _(l,e=1){const n=[...l];for(let t=2;t<l.length-2;t+=2){const o=l[t],u=l[t+1],i=l[t-2],v=l[t-1],g=l[t+2],c=l[t+3];n[t]=o+e*((i+g)/2-o),n[t+1]=u+e*((v+c)/2-u)}return n}function ee(l){const e=l.trim().split(/\s+/);let n="",t="",o=null,u=null;for(let i=0;i<e.length;i+=1){const v=e[i];if(isNaN(v)){if(t=v,t==="M"||t==="L")o=parseFloat(e[++i]),u=parseFloat(e[++i]),n+=`${t}${o} ${u}`;else if(t==="Q"){const g=parseFloat(e[++i]),c=parseFloat(e[++i]),m=parseFloat(e[++i]),p=parseFloat(e[++i]);g===o&&c===u?n+=`t${m-o} ${p-u}`:n+=`q${g-o} ${c-u} ${m-o} ${p-u}`,o=m,u=p}}else{const g=parseFloat(v),c=parseFloat(e[++i]);if(t==="L"){const m=g-o,p=c-u;m===0?n+=`v${p}`:p===0?n+=`h${m}`:n+=`l${m} ${p}`,o=g,u=c}else if(t==="Q"){const m=g,p=c,b=parseFloat(e[++i]),w=parseFloat(e[++i]);m===o&&p===u?n+=`t${b-o} ${w-u}`:n+=`q${m-o} ${p-u} ${b-o} ${w-u}`,o=b,u=w}}}return n}function P(l){if(A.value!=="draw"||!s.active||!r.value)return;$.value=!0;const{x:e,y:n}=M(l);D.value={x:e,y:n},V.value=`M ${e} ${n}`,h.value=document.createElementNS("http://www.w3.org/2000/svg","path"),h.value.setAttribute("stroke",C.value),h.value.setAttribute("stroke-width",N.value*s.scale),h.value.setAttribute("fill","none"),h.value.setAttribute("stroke-linecap","round"),h.value.setAttribute("stroke-linejoin","round"),h.value.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(h.value)}function F(l){if(!$.value||!r.value||!h.value)return;const{x:e,y:n}=M(l);V.value+=` ${e} ${n}`,h.value.setAttribute("d",V.value)}function S(l){if($.value&&r.value&&h.value){const{x:e,y:n}=M(l);if(D.value&&D.value.x===e&&D.value.y===n){const t=document.createElementNS("http://www.w3.org/2000/svg","circle");t.setAttribute("cx",e),t.setAttribute("cy",n),t.setAttribute("r",N.value*s.scale/2),t.setAttribute("fill",C.value),t.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(t),x.value.push(t)}else{const t=h.value;t.setAttribute("d",ee(Z(V.value))),x.value.push(t)}k.value=[],h.value=""}$.value=!1}function te(){if(x.value.length>0){const l=x.value.pop();k.value.push(l),r.value&&r.value.removeChild(l)}}function ne(){if(k.value.length>0){const l=k.value.pop();x.value.push(l),r.value&&r.value.appendChild(l)}}function le(){r.value&&(r.value.innerHTML=""),x.value=[],k.value=[],Y()}a.watch(A,()=>{s.active&&(Q(),W(),A.value==="text"?r.value.style.cursor="text":r.value.style.cursor=I.value)});function W(){!s.svgRef||!s.active||(A.value==="draw"?(s.svgRef.addEventListener("mousedown",P),s.svgRef.addEventListener("mousemove",F),s.svgRef.addEventListener("mouseup",S),s.svgRef.addEventListener("mouseleave",S),s.svgRef.addEventListener("touchstart",P,{passive:!1}),s.svgRef.addEventListener("touchmove",F,{passive:!1}),s.svgRef.addEventListener("touchend",S)):A.value==="text"&&s.svgRef.addEventListener("mousedown",K),r.value&&(r.value.style.pointerEvents="auto"))}function Q(){s.svgRef&&(s.svgRef.removeEventListener("mousedown",P),s.svgRef.removeEventListener("mousemove",F),s.svgRef.removeEventListener("mouseup",S),s.svgRef.removeEventListener("mouseleave",S),s.svgRef.removeEventListener("touchstart",P),s.svgRef.removeEventListener("touchmove",F),s.svgRef.removeEventListener("touchend",S),s.svgRef.removeEventListener("mousedown",K),r.value&&(r.value.style.pointerEvents="none"))}return a.watch(()=>s.active,l=>{l?W():Q()}),a.watch(()=>s.active,()=>{a.nextTick(()=>{Y()})}),a.onMounted(()=>{a.nextTick(()=>{s.svgRef&&(r.value=document.createElementNS("http://www.w3.org/2000/svg","g"),r.value.setAttribute("class","vue-data-ui-doodles"),r.value.style.cursor=I.value,s.svgRef.appendChild(r.value),Q())})}),a.onBeforeUnmount(()=>{r.value&&s.svgRef&&(s.svgRef.removeChild(r.value),Q())}),(l,e)=>d.active?(a.openBlock(),a.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:"vue-ui-pen-and-paper-actions",style:a.normalizeStyle({backgroundColor:d.backgroundColor})},[a.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",onClick:e[0]||(e[0]=n=>J("close")),style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"close",stroke:d.color},null,8,["stroke"])],4),a.createElementVNode("button",oe,[a.createVNode(ae.ColorPicker,{value:C.value,"onUpdate:value":e[1]||(e[1]=n=>C.value=n),backgroundColor:d.backgroundColor,buttonBorderColor:y.value},null,8,["value","backgroundColor","buttonBorderColor"])]),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-active":A.value==="text"}]),onClick:e[2]||(e[2]=n=>A.value=A.value==="text"?"draw":"text"),style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:A.value==="draw"?"annotator":"text",stroke:d.color},null,8,["name","stroke"]),a.createElementVNode("div",{style:a.normalizeStyle({position:"absolute",bottom:"-20px",color:y.value,width:"100%",textAlign:"center",fontSize:"12px",fontVariantNumeric:"tabular-nums"})},a.toDisplayString(a.unref(O.dataLabel)({v:A.value==="draw"?N.value:E.value,s:"px",r:1})),5)],6),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!x.value.length}]),disabled:!x.value.length,onClick:te,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`,marginTop:"20px"})},[a.createVNode(R.default,{name:"restart",stroke:d.color},null,8,["stroke"])],14,re),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!k.value.length}]),onClick:ne,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"restart",stroke:d.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!x.value.length}]),onClick:le,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"trash",stroke:d.color},null,8,["stroke"])],6),A.value==="draw"?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,ref:"range",type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":e[3]||(e[3]=n=>N.value=n),style:a.normalizeStyle({accentColor:d.color})},null,4)),[[a.vModelText,N.value]]):a.createCommentVNode("",!0),A.value==="text"?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,ref:"range",type:"range",class:"vertical-range",min:3,max:48,step:.1,"onUpdate:modelValue":e[4]||(e[4]=n=>E.value=n),style:a.normalizeStyle({accentColor:d.color})},null,4)),[[a.vModelText,E.value]]):a.createCommentVNode("",!0)],4)):a.createCommentVNode("",!0)}};exports._sfc_main=se;
1
+ "use strict";const a=require("vue"),R=require("./BaseIcon-dtfVrHa7.cjs"),ae=require("./ColorPicker-C-nhrZ-J.cjs"),O=require("./index-CG-euAJp.cjs"),oe={class:"vue-ui-pen-and-paper-action",style:{padding:"0 !important"}},re=["disabled"],se={__name:"PenAndPaper",props:{svgRef:{type:[Object,null],required:!0},color:{type:String,default:"#2D353C"},backgroundColor:{type:String,default:"#FFFFFF"},active:{type:Boolean,default:!1},scale:{type:Number,default:1}},emits:["close"],setup(d,{emit:j}){const s=d,J=j,x=a.ref([]),k=a.ref([]),C=a.ref(s.color),N=a.ref(2),$=a.ref(!1),V=a.ref(""),r=a.ref(null),h=a.ref(null),D=a.ref(null),A=a.ref("draw"),T=a.ref(!1),f=a.ref(null),z=a.ref({x:0,y:0}),B=a.ref([""]),L=a.ref({row:0,col:0}),E=a.ref(16),I=a.ref("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");function K(l){if(!r.value||A.value!=="text"||T.value)return;const{x:e,y:n}=M(l);z.value={x:e,y:n},B.value=[""],L.value={row:0,col:0};const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("x",e),t.setAttribute("y",n),t.setAttribute("fill",C.value),t.setAttribute("font-size",E.value*s.scale),t.setAttribute("font-family","sans-serif"),t.setAttribute("class","vue-data-ui-doodle"),t.setAttribute("dominant-baseline","hanging"),t.setAttribute("pointer-events","all");const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("x",e),o.setAttribute("dy","0"),o.textContent="",t.appendChild(o),t.style.pointerEvents="none",t.style.userSelect="none",r.value.appendChild(t),f.value=t,T.value=!0,window.addEventListener("keydown",U),window.addEventListener("mousedown",H,!0),q(),G()}function U(l){if(!T.value)return;let{row:e,col:n}=L.value,t=B.value.slice(),o=!1;if(l.key==="Enter"){const u=t[e],i=u.slice(0,n),v=u.slice(n);t.splice(e,1,i,v),e+=1,n=0,o=!0,l.preventDefault()}else if(l.key==="Backspace"){if(n>0)t[e]=t[e].slice(0,n-1)+t[e].slice(n),n-=1,o=!0;else if(e>0){const u=t[e-1].length;t[e-1]+=t[e],t.splice(e,1),e-=1,n=u,o=!0}l.preventDefault()}else if(l.key==="Delete")n<t[e].length?(t[e]=t[e].slice(0,n)+t[e].slice(n+1),o=!0):e<t.length-1&&(t[e]+=t[e+1],t.splice(e+1,1),o=!0),l.preventDefault();else if(l.key==="ArrowLeft")n>0?n-=1:e>0&&(e-=1,n=t[e].length),o=!0,l.preventDefault();else if(l.key==="ArrowRight")n<t[e].length?n+=1:e<t.length-1&&(e+=1,n=0),o=!0,l.preventDefault();else if(l.key==="ArrowUp")e>0&&(e-=1,n=Math.min(n,t[e].length),o=!0),l.preventDefault();else if(l.key==="ArrowDown")e<t.length-1&&(e+=1,n=Math.min(n,t[e].length),o=!0),l.preventDefault();else if(l.key.length===1&&!l.ctrlKey&&!l.metaKey&&!l.altKey)t[e]=t[e].slice(0,n)+l.key+t[e].slice(n),n+=1,o=!0,l.preventDefault();else if(l.key==="Escape"){X(!0);return}else l.key==="Tab"&&l.preventDefault();o&&(B.value=t,L.value={row:e,col:n},q(),G())}function q(){const l=f.value,{x:e}=z.value;for(;l.firstChild;)l.removeChild(l.firstChild);B.value.forEach((n,t)=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("x",e),o.setAttribute("dy",t===0?"0":`${E.value*1.2*s.scale}`),o.textContent=n.length?n:"​",l.appendChild(o)})}function G(){const l=r.value.querySelector(".vue-data-ui-svg-caret");l&&r.value.removeChild(l);const e=f.value;if(!e)return;const{x:n,y:t}=z.value,{row:o,col:u}=L.value,i=E.value*s.scale,v=e.childNodes[o];if(!v)return;let g=v.textContent.slice(0,u);g.endsWith(" ")&&(g+=" ");const c=document.createElementNS("http://www.w3.org/2000/svg","text");c.setAttribute("x",n),c.setAttribute("y",t),c.setAttribute("font-size",i),c.setAttribute("font-family","sans-serif"),c.textContent=g||"",r.value.appendChild(c);const m=c.getBBox();r.value.removeChild(c);let p=t+o*i*1.2,b=n+m.width;const w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",b),w.setAttribute("y",p),w.setAttribute("width",2),w.setAttribute("height",i),w.setAttribute("fill",C.value),w.setAttribute("class","vue-data-ui-svg-caret"),r.value.appendChild(w)}function H(l){if(f.value&&!f.value.contains(l.target)){const e=f.value.children;e.length===1&&(e[0].textContent===""||e[0].textContent==="​")&&f.value.remove(),X(!1)}}function X(l=!1){var o;window.removeEventListener("keydown",U),window.removeEventListener("mousedown",H,!0);const e=r.value.querySelector(".vue-data-ui-svg-caret");e&&r.value.removeChild(e);const n=(o=f.value)==null?void 0:o.children;let t=!1;if(n&&n.length===1){const u=n[0].textContent;t=!u||u==="​"}l||t?f.value&&r.value.contains(f.value)&&r.value.removeChild(f.value):f.value&&r.value.contains(f.value)&&x.value.push(f.value),T.value=!1,f.value=null,B.value=[""],L.value={row:0,col:0}}const y=a.computed(()=>O.lightenHexColor(s.color,.6));function Y(){if(!r.value)return;const l=r.value.querySelector(".vue-data-ui-mask");if(l&&r.value.removeChild(l),s.active){const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("class","vue-data-ui-mask"),e.setAttribute("width","100%"),e.setAttribute("height","100%"),e.setAttribute("fill","transparent"),e.setAttribute("pointer-events","all"),r.value.insertBefore(e,r.value.firstChild)}}function M(l){var o;const e=s.svgRef;if(!e)return{x:0,y:0};const n=e.createSVGPoint();n.x=l.clientX,n.y=l.clientY;const t=(o=e.getScreenCTM())==null?void 0:o.inverse();return t?n.matrixTransform(t):{x:0,y:0}}function Z(l){const e=l.trim().split(/\s+/);if(e.length<4)return l;const n=e.slice(1).map(Number);if(n.length%2!==0)return l;const t=_(n),o=[`M ${t[0]} ${t[1]}`];for(let v=2;v<t.length-2;v+=2){const g=t[v-2],c=t[v-1],m=t[v],p=t[v+1],b=(g+m)/2,w=(c+p)/2;o.push(`Q ${g} ${c} ${b} ${w}`)}const u=t[t.length-2],i=t[t.length-1];return o.push(`L ${u} ${i}`),o.join(" ")}function _(l,e=1){const n=[...l];for(let t=2;t<l.length-2;t+=2){const o=l[t],u=l[t+1],i=l[t-2],v=l[t-1],g=l[t+2],c=l[t+3];n[t]=o+e*((i+g)/2-o),n[t+1]=u+e*((v+c)/2-u)}return n}function ee(l){const e=l.trim().split(/\s+/);let n="",t="",o=null,u=null;for(let i=0;i<e.length;i+=1){const v=e[i];if(isNaN(v)){if(t=v,t==="M"||t==="L")o=parseFloat(e[++i]),u=parseFloat(e[++i]),n+=`${t}${o} ${u}`;else if(t==="Q"){const g=parseFloat(e[++i]),c=parseFloat(e[++i]),m=parseFloat(e[++i]),p=parseFloat(e[++i]);g===o&&c===u?n+=`t${m-o} ${p-u}`:n+=`q${g-o} ${c-u} ${m-o} ${p-u}`,o=m,u=p}}else{const g=parseFloat(v),c=parseFloat(e[++i]);if(t==="L"){const m=g-o,p=c-u;m===0?n+=`v${p}`:p===0?n+=`h${m}`:n+=`l${m} ${p}`,o=g,u=c}else if(t==="Q"){const m=g,p=c,b=parseFloat(e[++i]),w=parseFloat(e[++i]);m===o&&p===u?n+=`t${b-o} ${w-u}`:n+=`q${m-o} ${p-u} ${b-o} ${w-u}`,o=b,u=w}}}return n}function P(l){if(A.value!=="draw"||!s.active||!r.value)return;$.value=!0;const{x:e,y:n}=M(l);D.value={x:e,y:n},V.value=`M ${e} ${n}`,h.value=document.createElementNS("http://www.w3.org/2000/svg","path"),h.value.setAttribute("stroke",C.value),h.value.setAttribute("stroke-width",N.value*s.scale),h.value.setAttribute("fill","none"),h.value.setAttribute("stroke-linecap","round"),h.value.setAttribute("stroke-linejoin","round"),h.value.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(h.value)}function F(l){if(!$.value||!r.value||!h.value)return;const{x:e,y:n}=M(l);V.value+=` ${e} ${n}`,h.value.setAttribute("d",V.value)}function S(l){if($.value&&r.value&&h.value){const{x:e,y:n}=M(l);if(D.value&&D.value.x===e&&D.value.y===n){const t=document.createElementNS("http://www.w3.org/2000/svg","circle");t.setAttribute("cx",e),t.setAttribute("cy",n),t.setAttribute("r",N.value*s.scale/2),t.setAttribute("fill",C.value),t.setAttribute("class","vue-data-ui-doodle"),r.value.appendChild(t),x.value.push(t)}else{const t=h.value;t.setAttribute("d",ee(Z(V.value))),x.value.push(t)}k.value=[],h.value=""}$.value=!1}function te(){if(x.value.length>0){const l=x.value.pop();k.value.push(l),r.value&&r.value.removeChild(l)}}function ne(){if(k.value.length>0){const l=k.value.pop();x.value.push(l),r.value&&r.value.appendChild(l)}}function le(){r.value&&(r.value.innerHTML=""),x.value=[],k.value=[],Y()}a.watch(A,()=>{s.active&&(Q(),W(),A.value==="text"?r.value.style.cursor="text":r.value.style.cursor=I.value)});function W(){!s.svgRef||!s.active||(A.value==="draw"?(s.svgRef.addEventListener("mousedown",P),s.svgRef.addEventListener("mousemove",F),s.svgRef.addEventListener("mouseup",S),s.svgRef.addEventListener("mouseleave",S),s.svgRef.addEventListener("touchstart",P,{passive:!1}),s.svgRef.addEventListener("touchmove",F,{passive:!1}),s.svgRef.addEventListener("touchend",S)):A.value==="text"&&s.svgRef.addEventListener("mousedown",K),r.value&&(r.value.style.pointerEvents="auto"))}function Q(){s.svgRef&&(s.svgRef.removeEventListener("mousedown",P),s.svgRef.removeEventListener("mousemove",F),s.svgRef.removeEventListener("mouseup",S),s.svgRef.removeEventListener("mouseleave",S),s.svgRef.removeEventListener("touchstart",P),s.svgRef.removeEventListener("touchmove",F),s.svgRef.removeEventListener("touchend",S),s.svgRef.removeEventListener("mousedown",K),r.value&&(r.value.style.pointerEvents="none"))}return a.watch(()=>s.active,l=>{l?W():Q()}),a.watch(()=>s.active,()=>{a.nextTick(()=>{Y()})}),a.onMounted(()=>{a.nextTick(()=>{s.svgRef&&(r.value=document.createElementNS("http://www.w3.org/2000/svg","g"),r.value.setAttribute("class","vue-data-ui-doodles"),r.value.style.cursor=I.value,s.svgRef.appendChild(r.value),Q())})}),a.onBeforeUnmount(()=>{r.value&&s.svgRef&&(s.svgRef.removeChild(r.value),Q())}),(l,e)=>d.active?(a.openBlock(),a.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:"vue-ui-pen-and-paper-actions",style:a.normalizeStyle({backgroundColor:d.backgroundColor})},[a.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",onClick:e[0]||(e[0]=n=>J("close")),style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"close",stroke:d.color},null,8,["stroke"])],4),a.createElementVNode("button",oe,[a.createVNode(ae.ColorPicker,{value:C.value,"onUpdate:value":e[1]||(e[1]=n=>C.value=n),backgroundColor:d.backgroundColor,buttonBorderColor:y.value},null,8,["value","backgroundColor","buttonBorderColor"])]),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-active":A.value==="text"}]),onClick:e[2]||(e[2]=n=>A.value=A.value==="text"?"draw":"text"),style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:A.value==="draw"?"annotator":"text",stroke:d.color},null,8,["name","stroke"]),a.createElementVNode("div",{style:a.normalizeStyle({position:"absolute",bottom:"-20px",color:y.value,width:"100%",textAlign:"center",fontSize:"12px",fontVariantNumeric:"tabular-nums"})},a.toDisplayString(a.unref(O.dataLabel)({v:A.value==="draw"?N.value:E.value,s:"px",r:1})),5)],6),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!x.value.length}]),disabled:!x.value.length,onClick:te,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`,marginTop:"20px"})},[a.createVNode(R.default,{name:"restart",stroke:d.color},null,8,["stroke"])],14,re),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!k.value.length}]),onClick:ne,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"restart",stroke:d.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),a.createElementVNode("button",{class:a.normalizeClass(["vue-ui-pen-and-paper-action",{"vue-ui-pen-and-paper-action-disabled":!x.value.length}]),onClick:le,style:a.normalizeStyle({backgroundColor:d.backgroundColor,border:`1px solid ${y.value}`})},[a.createVNode(R.default,{name:"trash",stroke:d.color},null,8,["stroke"])],6),A.value==="draw"?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,ref:"range",type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":e[3]||(e[3]=n=>N.value=n),style:a.normalizeStyle({accentColor:d.color})},null,4)),[[a.vModelText,N.value]]):a.createCommentVNode("",!0),A.value==="text"?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,ref:"range",type:"range",class:"vertical-range",min:3,max:48,step:.1,"onUpdate:modelValue":e[4]||(e[4]=n=>E.value=n),style:a.normalizeStyle({accentColor:d.color})},null,4)),[[a.vModelText,E.value]]):a.createCommentVNode("",!0)],4)):a.createCommentVNode("",!0)}};exports._sfc_main=se;
@@ -1,5 +1,5 @@
1
1
  import { computed as u, createElementBlock as r, openBlock as l, createCommentVNode as a } from "vue";
2
- import { Y as c, P as f } from "./index-CO-5OgQA.js";
2
+ import { Y as c, P as f } from "./index-BMcwUsiG.js";
3
3
  const y = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], g = ["d", "fill", "stroke", "stroke-width"], x = ["points", "fill", "stroke", "stroke-width"], h = {
4
4
  __name: "Shape",
5
5
  props: {
@@ -1 +1 @@
1
- "use strict";const o=require("vue"),a=require("./index-B7zOq_yO.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],v=["d","fill","stroke","stroke-width"],p=["points","fill","stroke","stroke-width"],y={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:d}){const e=n,i=d;function m(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const r=o.computed(()=>m(e.shape)),s=o.computed(()=>e.shape!=="star"?null:a.createStar({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1)})),k=o.computed(()=>a.createPolygonPath({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1),sides:r.value.points,rotation:r.value.rotation}).path);return(u,t)=>(o.openBlock(),o.createElementBlock("g",null,[r.value&&r.value.points===1?(o.openBlock(),o.createElementBlock("circle",{key:0,class:"vdui-shape-circle",cx:n.plot.x,cy:n.plot.y,r:e.radius*(e.isSelected?e.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[0]||(t[0]=l=>i("mouseover")),onMouseout:t[1]||(t[1]=l=>i("mouseout")),onClick:t[2]||(t[2]=l=>i("click"))},null,40,c)):o.createCommentVNode("",!0),r.value&&r.value.points>=n.limit?(o.openBlock(),o.createElementBlock("path",{key:1,class:"vdui-shape-polygon",d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[3]||(t[3]=l=>i("mouseover")),onMouseout:t[4]||(t[4]=l=>i("mouseout")),onClick:t[5]||(t[5]=l=>i("click"))},null,40,v)):o.createCommentVNode("",!0),s.value?(o.openBlock(),o.createElementBlock("polygon",{key:2,class:"vdui-shape-star",points:s.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[6]||(t[6]=l=>i("mouseover")),onMouseout:t[7]||(t[7]=l=>i("mouseout")),onClick:t[8]||(t[8]=l=>i("click"))},null,40,p)):o.createCommentVNode("",!0)]))}};exports._sfc_main=y;
1
+ "use strict";const o=require("vue"),a=require("./index-CG-euAJp.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],v=["d","fill","stroke","stroke-width"],p=["points","fill","stroke","stroke-width"],y={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:d}){const e=n,i=d;function m(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const r=o.computed(()=>m(e.shape)),s=o.computed(()=>e.shape!=="star"?null:a.createStar({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1)})),k=o.computed(()=>a.createPolygonPath({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1),sides:r.value.points,rotation:r.value.rotation}).path);return(u,t)=>(o.openBlock(),o.createElementBlock("g",null,[r.value&&r.value.points===1?(o.openBlock(),o.createElementBlock("circle",{key:0,class:"vdui-shape-circle",cx:n.plot.x,cy:n.plot.y,r:e.radius*(e.isSelected?e.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[0]||(t[0]=l=>i("mouseover")),onMouseout:t[1]||(t[1]=l=>i("mouseout")),onClick:t[2]||(t[2]=l=>i("click"))},null,40,c)):o.createCommentVNode("",!0),r.value&&r.value.points>=n.limit?(o.openBlock(),o.createElementBlock("path",{key:1,class:"vdui-shape-polygon",d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[3]||(t[3]=l=>i("mouseover")),onMouseout:t[4]||(t[4]=l=>i("mouseout")),onClick:t[5]||(t[5]=l=>i("click"))},null,40,v)):o.createCommentVNode("",!0),s.value?(o.openBlock(),o.createElementBlock("polygon",{key:2,class:"vdui-shape-star",points:s.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[6]||(t[6]=l=>i("mouseover")),onMouseout:t[7]||(t[7]=l=>i("mouseout")),onClick:t[8]||(t[8]=l=>i("click"))},null,40,p)):o.createCommentVNode("",!0)]))}};exports._sfc_main=y;
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),xe=require("./BaseIcon-CObkWSlF.cjs"),Y=require("./useResponsive-DQmBAoBf.cjs"),f=require("./index-B7zOq_yO.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be={class:"vue-data-ui-slicer-labels",style:{position:"relative","z-index":"1","pointer-events":"none"}},ke={key:0,style:{width:"100%",position:"relative"}},we={key:0,class:"minimap",style:{width:"100%"}},Se=["xmlns","viewBox"],Ne=["id"],Ce=["stop-color"],Ee=["d","stroke"],Be=["x","width","height","fill","rx"],Me=["d","fill"],$e=["x","width","height","rx","fill"],Re=["x","width","height","fill","rx"],Le=["d","fill"],Ve=["d","stroke"],ze=["cx","cy","stroke","fill"],De=["cx","cy","stroke","fill"],Te=["x1","x2","y2","stroke"],Pe=["x","height","width","onMouseenter"],Ie=["min","max"],Fe=["min","max"],Ae={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0},minimap:{type:Array,default:[]},smoothMinimap:{type:Boolean,default:!1},minimapSelectedColor:{type:String,default:"#1f77b4"},minimapSelectionRadius:{type:Number,default:12},minimapLineColor:{type:String,default:"#2D353C"},minimapSelectedColorOpacity:{type:Number,default:.2},minimapSelectedIndex:{type:Number,default:null},minimapIndicatorColor:{type:String,default:"#2D353C"},refreshStartPoint:{type:Number,default:0},refreshEndPoint:{type:Number,default:null},enableRangeHandles:{type:Boolean,default:!1},enableSelectionDrag:{type:Boolean,default:!0},verticalHandles:{type:Boolean,default:!1}},emits:["update:start","update:end","reset","trapMouse"],setup(n,{expose:_,emit:ee}){e.useCssVars(t=>({"05c06dde":le.value,d5d55cf6:p.value,"1783e736":ne.value,"754a92b5":n.selectColor,"6a46ca7a":ae.value}));const l=n,c=e.ref(null),u=e.ref(l.min),r=e.ref(l.max),k=e.computed(()=>!!l.minimap.length),C=e.ref(f.createUid()),te=e.computed(()=>l.refreshEndPoint===null?l.max:l.refreshEndPoint),h=ee,g=e.computed(()=>{const t=l.max-l.min,a=(u.value-l.min)/t*100,o=(r.value-l.min)/t*100;return{left:`${a}%`,width:`${o-a}%`,background:l.selectColor,tooltipLeft:`calc(${a}% - ${F.value?0:P.value/2}px)`,tooltipRight:`calc(${o}% - ${A.value?N.value:N.value/2}px)`,arrowLeft:!F.value,arrowRight:!A.value}}),F=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((u.value-l.min)/(l.max-l.min))-P.value/2<0:!1),A=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((r.value-l.min)/(l.max-l.min))+N.value/2>c.value.getBoundingClientRect().width:!1),le=e.computed(()=>l.inputColor),ae=e.computed(()=>l.background),ne=e.computed(()=>`${l.selectColor}33`),p=e.computed(()=>l.borderColor),H=e.computed(()=>{let t=[];for(let a=0;a<l.minimap.length;a+=1)t.push(a);return t});function W(){h("reset")}function oe(){Number(u.value)>Number(r.value)-1&&(u.value=Number(r.value)-1),h("update:start",Number(u.value))}function ie(){Number(r.value)<Number(u.value)+1&&(r.value=Number(u.value)+1),h("update:end",Number(r.value))}e.watch(()=>l.min,t=>{Number(u.value)<Number(t)&&(u.value=Number(t)),Number(r.value)<Number(t)&&(r.value=Number(t))}),e.watch(()=>l.max,t=>{Number(u.value)>Number(t)&&(u.value=Number(t)),Number(r.value)>Number(t)&&(r.value=Number(t))});const E=e.ref(null),i=e.ref({width:1,height:1}),S=e.ref(null);e.onMounted(()=>{if(k.value){const t=Y.throttle(()=>{const{width:a,height:o}=Y.useResponsive({chart:E.value});i.value.width=a,i.value.height=o-47});S.value=new ResizeObserver(t),S.value.observe(E.value)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const s=e.computed(()=>l.minimap.length?i.value.width/l.minimap.length:0),m=e.computed(()=>{if(!l.minimap.length)return[];const t=Math.max(...l.minimap),a=Math.min(...l.minimap)-10,o=t-(a>0?0:a),d=l.minimap.map((he,ge)=>{const pe=he-a;return{x:i.value.width/l.minimap.length*ge+s.value/2,y:i.value.height-pe/o*(i.value.height*.9)}}),x=l.smoothMinimap?f.createSmoothPath(d):f.createStraightPath(d),I=[...d].slice(l.valueStart,l.valueEnd),fe=l.smoothMinimap?f.createSmoothPath(I):f.createStraightPath(I);return{fullSet:x,selectionSet:fe,sliced:I,firstPlot:d[l.valueStart],lastPlot:d[l.valueEnd-1]}}),v=e.computed(()=>({x:s.value*u.value+s.value/2,width:i.value.width*((r.value-u.value)/l.max)-s.value})),w=e.ref(l.minimapSelectedIndex);e.watch(()=>l.minimapSelectedIndex,t=>{w.value=t+l.valueStart},{immediate:!0});function ue(t){w.value=t,t>=l.valueStart&&t<l.valueEnd&&h("trapMouse",t-l.valueStart)}const re=e.ref(0),B=e.ref(null),M=e.ref(null);function $(t){u.value=t,B.value&&(B.value.value=t),h("update:start",Number(u.value))}function R(t){r.value=t,M.value&&(M.value.value=t),h("update:end",Number(r.value))}const L=e.computed(()=>l.valueEnd-l.valueStart),V=e.ref(!1);let z=e.ref(null);const se=e.computed(()=>c.value?(c.value.getBoundingClientRect().width-48)/(l.max-l.min):20),de=e.computed(()=>(c.value.getBoundingClientRect().width-48)/(l.max-l.min)*L.value),ce=e.ref(2.5),X=e.computed(()=>{const t=c.value.getBoundingClientRect().width-48;return Math.ceil((l.max-l.min)/((t-de.value)/ce.value))}),q=t=>{if(b.value=!0,!l.enableSelectionDrag)return;const a=t.type==="touchstart";if((a?t.targetTouches[0].target:t.target).classList.contains("range-handle"))return;V.value=!0,z.value=a?t.targetTouches[0].clientX:t.clientX;const d=a?me:U,x=a?ve:Z;window.addEventListener(a?"touchmove":"mousemove",d,{passive:!1}),window.addEventListener(a?"touchend":"mouseup",x)};function U(t){O(t.clientX)}function me(t){c.value.contains(t.target)&&(t.target.classList.contains("range-handle")||(t.preventDefault(),O(t.targetTouches[0].clientX)))}function O(t){if(!V.value)return;const a=t-z.value;if(Math.abs(a)>se.value){if(a>0){if(Number(r.value)+1<=l.max){const o=Math.min(l.max,Number(r.value)+X.value);R(o),$(o-L.value)}}else if(Number(u.value)-1>=l.min){const o=Math.max(0,Number(u.value)-X.value);$(o),R(o+L.value)}z.value=t}}function Z(){j("mousemove","mouseup")}function ve(){j("touchmove","touchend")}function j(t,a){V.value=!1,window.removeEventListener(t,U),window.removeEventListener(a,Z)}const y=e.ref(!1),D=e.ref(null),T=e.ref(null),P=e.ref(1),N=e.ref(1),b=e.ref(!1);function G(){D.value&&(P.value=D.value.getBoundingClientRect().width)}function J(){T.value&&(N.value=T.value.getBoundingClientRect().width)}const K=e.ref(0);function Q(t){K.value=t==="start"?1:0}return e.onUpdated(()=>{G(),J()}),e.watch(()=>l.labelLeft,()=>{e.nextTick(G)},{deep:!0}),e.watch(()=>l.labelRight,()=>{e.nextTick(J)},{deep:!0}),_({setStartValue:$,setEndValue:R}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{"data-dom-to-png-ignore":"",style:{padding:"0 24px"},class:"vue-data-ui-zoom",ref_key:"zoomWrapper",ref:c,onMousedown:q,onTouchstart:q,onTouchend:a[11]||(a[11]=o=>b.value=!1)},[e.createElementVNode("div",be,[n.valueStart!==n.refreshStartPoint||n.valueEnd!==te.value?(e.openBlock(),e.createElementBlock("div",ke,[n.useResetSlot?e.renderSlot(t.$slots,"reset-action",{key:1,reset:W},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({top:k.value?"36px":"-16px",pointerEvents:"all !important"}),onClick:W},[e.createVNode(xe.default,{name:"refresh",stroke:n.textColor},null,8,["stroke"])],4))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"double-range-slider",ref_key:"minimapWrapper",ref:E,style:{"z-index":"0"},onMouseenter:a[9]||(a[9]=o=>b.value=!0),onMouseleave:a[10]||(a[10]=o=>b.value=!1)},[k.value?(e.openBlock(),e.createElementBlock("div",we,[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(f.XMLNS),viewBox:`0 0 ${i.value.width<0?0:i.value.width} ${i.value.height<0?0:i.value.height}`},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:C.value,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${n.minimapLineColor}50`},null,8,Ce),a[12]||(a[12]=e.createElementVNode("stop",{offset:"100%","stop-color":"transparent"},null,-1))],8,Ne)]),e.createElementVNode("path",{d:`M${m.value.fullSet}`,stroke:`${n.minimapLineColor}`,fill:"none","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"1"}},null,8,Ee),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:p.value,rx:n.minimapSelectionRadius,stroke:"none"},null,8,Be),e.createElementVNode("path",{d:`M${s.value/2},${Math.max(i.value.height,0)} ${m.value.fullSet} L${i.value.width-s.value/2},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Me),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,rx:n.minimapSelectionRadius,fill:p.value},null,8,$e),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:n.minimapSelectedColor,rx:n.minimapSelectionRadius,style:e.normalizeStyle({opacity:n.minimapSelectedColorOpacity})},null,12,Re),e.createElementVNode("path",{d:`M${m.value.sliced[0].x},${Math.max(i.value.height,0)} ${m.value.selectionSet} L${m.value.sliced.at(-1).x},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Le),e.createElementVNode("path",{d:`M ${m.value.selectionSet}`,stroke:`${n.minimapLineColor}`,fill:"transparent","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ve),e.createElementVNode("circle",{cx:m.value.firstPlot.x,cy:m.value.firstPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,ze),e.createElementVNode("circle",{cx:m.value.lastPlot.x,cy:m.value.lastPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,De),w.value!==null?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("g",null,[w.value===o&&o>=n.valueStart&&o<n.valueEnd?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value*d+s.value/2,x2:s.value*d+s.value/2,y1:0,y2:Math.max(i.value.height,0),stroke:n.minimapIndicatorColor,"stroke-linecap":"round","stroke-dasharray":"2","stroke-width":"1"},null,8,Te)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value*d,y:0,height:Math.max(i.value.height,0),width:s.value<0?0:s.value,fill:"transparent",style:e.normalizeStyle([{"pointer-events":"all !important"},{cursor:o>=n.valueStart&&o<n.valueEnd&&n.enableSelectionDrag?y.value?"grabbing":"grab":"default"}]),onMousedown:a[0]||(a[0]=x=>y.value=!0),onMouseup:a[1]||(a[1]=x=>y.value=!1),onMouseenter:x=>ue(o),onMouseleave:a[2]||(a[2]=x=>{w.value=null,h("trapMouse",null)})},null,44,Pe))),256))],8,Se))])):e.createCommentVNode("",!0),a[13]||(a[13]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass({"range-highlight":!0,move:n.enableSelectionDrag}),onMousedown:a[3]||(a[3]=o=>y.value=!0),onMouseup:a[4]||(a[4]=o=>y.value=!1),style:e.normalizeStyle({...g.value,cursor:y.value?"grabbing":"grab"})},null,38),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{ref_key:"rangeStart",ref:B,key:`range-min${re.value}`,type:"range",class:e.normalizeClass({"range-left":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[5]||(a[5]=o=>u.value=o),onInput:oe,onMouseenter:a[6]||(a[6]=o=>Q("start"))},null,42,Ie)),[[e.vModelText,u.value]]):e.createCommentVNode("",!0),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"rangeEnd",ref:M,type:"range",class:e.normalizeClass({"range-right":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[7]||(a[7]=o=>r.value=o),onInput:ie,onMouseenter:a[8]||(a[8]=o=>Q("end"))},null,42,Fe)),[[e.vModelText,r.value]]):e.createCommentVNode("",!0),n.labelLeft?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"tooltipLeft",ref:D,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowLeft&&!n.verticalHandles,"range-tooltip-arrow-left":!g.value.arrowLeft&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipLeft,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:`${K.value+4}`})},e.toDisplayString(n.labelLeft),7)):e.createCommentVNode("",!0),n.labelRight?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"tooltipRight",ref:T,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowRight&&!n.verticalHandles,"range-tooltip-arrow-right":!g.value.arrowRight&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipRight,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:"4"})},e.toDisplayString(n.labelRight),7)):e.createCommentVNode("",!0)],544)],544))}},He=ye._export_sfc(Ae,[["__scopeId","data-v-8948b724"]]);exports.Slicer=He;
1
+ "use strict";const e=require("vue"),xe=require("./BaseIcon-dtfVrHa7.cjs"),Y=require("./useResponsive-BBkmXXaa.cjs"),f=require("./index-CG-euAJp.cjs"),ye=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),be={class:"vue-data-ui-slicer-labels",style:{position:"relative","z-index":"1","pointer-events":"none"}},ke={key:0,style:{width:"100%",position:"relative"}},we={key:0,class:"minimap",style:{width:"100%"}},Se=["xmlns","viewBox"],Ne=["id"],Ce=["stop-color"],Ee=["d","stroke"],Be=["x","width","height","fill","rx"],Me=["d","fill"],$e=["x","width","height","rx","fill"],Re=["x","width","height","fill","rx"],Le=["d","fill"],Ve=["d","stroke"],ze=["cx","cy","stroke","fill"],De=["cx","cy","stroke","fill"],Te=["x1","x2","y2","stroke"],Pe=["x","height","width","onMouseenter"],Ie=["min","max"],Fe=["min","max"],Ae={__name:"Slicer",props:{background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:Number,default:14},labelLeft:{type:String,default:""},labelRight:{type:String,default:""},textColor:{type:String,default:"#1A1A1A"},inputColor:{type:String,default:"#1A1A1A"},max:{type:Number,default:0},min:{type:Number,default:0},selectColor:{type:String,default:"#4A4A4A"},useResetSlot:{type:Boolean,default:!1},valueStart:{type:[Number,String],default:0},valueEnd:{type:[Number,String],default:0},minimap:{type:Array,default:[]},smoothMinimap:{type:Boolean,default:!1},minimapSelectedColor:{type:String,default:"#1f77b4"},minimapSelectionRadius:{type:Number,default:12},minimapLineColor:{type:String,default:"#2D353C"},minimapSelectedColorOpacity:{type:Number,default:.2},minimapSelectedIndex:{type:Number,default:null},minimapIndicatorColor:{type:String,default:"#2D353C"},refreshStartPoint:{type:Number,default:0},refreshEndPoint:{type:Number,default:null},enableRangeHandles:{type:Boolean,default:!1},enableSelectionDrag:{type:Boolean,default:!0},verticalHandles:{type:Boolean,default:!1}},emits:["update:start","update:end","reset","trapMouse"],setup(n,{expose:_,emit:ee}){e.useCssVars(t=>({"05c06dde":le.value,d5d55cf6:p.value,"1783e736":ne.value,"754a92b5":n.selectColor,"6a46ca7a":ae.value}));const l=n,c=e.ref(null),u=e.ref(l.min),r=e.ref(l.max),k=e.computed(()=>!!l.minimap.length),C=e.ref(f.createUid()),te=e.computed(()=>l.refreshEndPoint===null?l.max:l.refreshEndPoint),h=ee,g=e.computed(()=>{const t=l.max-l.min,a=(u.value-l.min)/t*100,o=(r.value-l.min)/t*100;return{left:`${a}%`,width:`${o-a}%`,background:l.selectColor,tooltipLeft:`calc(${a}% - ${F.value?0:P.value/2}px)`,tooltipRight:`calc(${o}% - ${A.value?N.value:N.value/2}px)`,arrowLeft:!F.value,arrowRight:!A.value}}),F=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((u.value-l.min)/(l.max-l.min))-P.value/2<0:!1),A=e.computed(()=>c.value?c.value.getBoundingClientRect().width*((r.value-l.min)/(l.max-l.min))+N.value/2>c.value.getBoundingClientRect().width:!1),le=e.computed(()=>l.inputColor),ae=e.computed(()=>l.background),ne=e.computed(()=>`${l.selectColor}33`),p=e.computed(()=>l.borderColor),H=e.computed(()=>{let t=[];for(let a=0;a<l.minimap.length;a+=1)t.push(a);return t});function W(){h("reset")}function oe(){Number(u.value)>Number(r.value)-1&&(u.value=Number(r.value)-1),h("update:start",Number(u.value))}function ie(){Number(r.value)<Number(u.value)+1&&(r.value=Number(u.value)+1),h("update:end",Number(r.value))}e.watch(()=>l.min,t=>{Number(u.value)<Number(t)&&(u.value=Number(t)),Number(r.value)<Number(t)&&(r.value=Number(t))}),e.watch(()=>l.max,t=>{Number(u.value)>Number(t)&&(u.value=Number(t)),Number(r.value)>Number(t)&&(r.value=Number(t))});const E=e.ref(null),i=e.ref({width:1,height:1}),S=e.ref(null);e.onMounted(()=>{if(k.value){const t=Y.throttle(()=>{const{width:a,height:o}=Y.useResponsive({chart:E.value});i.value.width=a,i.value.height=o-47});S.value=new ResizeObserver(t),S.value.observe(E.value)}}),e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const s=e.computed(()=>l.minimap.length?i.value.width/l.minimap.length:0),m=e.computed(()=>{if(!l.minimap.length)return[];const t=Math.max(...l.minimap),a=Math.min(...l.minimap)-10,o=t-(a>0?0:a),d=l.minimap.map((he,ge)=>{const pe=he-a;return{x:i.value.width/l.minimap.length*ge+s.value/2,y:i.value.height-pe/o*(i.value.height*.9)}}),x=l.smoothMinimap?f.createSmoothPath(d):f.createStraightPath(d),I=[...d].slice(l.valueStart,l.valueEnd),fe=l.smoothMinimap?f.createSmoothPath(I):f.createStraightPath(I);return{fullSet:x,selectionSet:fe,sliced:I,firstPlot:d[l.valueStart],lastPlot:d[l.valueEnd-1]}}),v=e.computed(()=>({x:s.value*u.value+s.value/2,width:i.value.width*((r.value-u.value)/l.max)-s.value})),w=e.ref(l.minimapSelectedIndex);e.watch(()=>l.minimapSelectedIndex,t=>{w.value=t+l.valueStart},{immediate:!0});function ue(t){w.value=t,t>=l.valueStart&&t<l.valueEnd&&h("trapMouse",t-l.valueStart)}const re=e.ref(0),B=e.ref(null),M=e.ref(null);function $(t){u.value=t,B.value&&(B.value.value=t),h("update:start",Number(u.value))}function R(t){r.value=t,M.value&&(M.value.value=t),h("update:end",Number(r.value))}const L=e.computed(()=>l.valueEnd-l.valueStart),V=e.ref(!1);let z=e.ref(null);const se=e.computed(()=>c.value?(c.value.getBoundingClientRect().width-48)/(l.max-l.min):20),de=e.computed(()=>(c.value.getBoundingClientRect().width-48)/(l.max-l.min)*L.value),ce=e.ref(2.5),X=e.computed(()=>{const t=c.value.getBoundingClientRect().width-48;return Math.ceil((l.max-l.min)/((t-de.value)/ce.value))}),q=t=>{if(b.value=!0,!l.enableSelectionDrag)return;const a=t.type==="touchstart";if((a?t.targetTouches[0].target:t.target).classList.contains("range-handle"))return;V.value=!0,z.value=a?t.targetTouches[0].clientX:t.clientX;const d=a?me:U,x=a?ve:Z;window.addEventListener(a?"touchmove":"mousemove",d,{passive:!1}),window.addEventListener(a?"touchend":"mouseup",x)};function U(t){O(t.clientX)}function me(t){c.value.contains(t.target)&&(t.target.classList.contains("range-handle")||(t.preventDefault(),O(t.targetTouches[0].clientX)))}function O(t){if(!V.value)return;const a=t-z.value;if(Math.abs(a)>se.value){if(a>0){if(Number(r.value)+1<=l.max){const o=Math.min(l.max,Number(r.value)+X.value);R(o),$(o-L.value)}}else if(Number(u.value)-1>=l.min){const o=Math.max(0,Number(u.value)-X.value);$(o),R(o+L.value)}z.value=t}}function Z(){j("mousemove","mouseup")}function ve(){j("touchmove","touchend")}function j(t,a){V.value=!1,window.removeEventListener(t,U),window.removeEventListener(a,Z)}const y=e.ref(!1),D=e.ref(null),T=e.ref(null),P=e.ref(1),N=e.ref(1),b=e.ref(!1);function G(){D.value&&(P.value=D.value.getBoundingClientRect().width)}function J(){T.value&&(N.value=T.value.getBoundingClientRect().width)}const K=e.ref(0);function Q(t){K.value=t==="start"?1:0}return e.onUpdated(()=>{G(),J()}),e.watch(()=>l.labelLeft,()=>{e.nextTick(G)},{deep:!0}),e.watch(()=>l.labelRight,()=>{e.nextTick(J)},{deep:!0}),_({setStartValue:$,setEndValue:R}),(t,a)=>(e.openBlock(),e.createElementBlock("div",{"data-dom-to-png-ignore":"",style:{padding:"0 24px"},class:"vue-data-ui-zoom",ref_key:"zoomWrapper",ref:c,onMousedown:q,onTouchstart:q,onTouchend:a[11]||(a[11]=o=>b.value=!1)},[e.createElementVNode("div",be,[n.valueStart!==n.refreshStartPoint||n.valueEnd!==te.value?(e.openBlock(),e.createElementBlock("div",ke,[n.useResetSlot?e.renderSlot(t.$slots,"reset-action",{key:1,reset:W},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({top:k.value?"36px":"-16px",pointerEvents:"all !important"}),onClick:W},[e.createVNode(xe.default,{name:"refresh",stroke:n.textColor},null,8,["stroke"])],4))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"double-range-slider",ref_key:"minimapWrapper",ref:E,style:{"z-index":"0"},onMouseenter:a[9]||(a[9]=o=>b.value=!0),onMouseleave:a[10]||(a[10]=o=>b.value=!1)},[k.value?(e.openBlock(),e.createElementBlock("div",we,[(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(f.XMLNS),viewBox:`0 0 ${i.value.width<0?0:i.value.width} ${i.value.height<0?0:i.value.height}`},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:C.value,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${n.minimapLineColor}50`},null,8,Ce),a[12]||(a[12]=e.createElementVNode("stop",{offset:"100%","stop-color":"transparent"},null,-1))],8,Ne)]),e.createElementVNode("path",{d:`M${m.value.fullSet}`,stroke:`${n.minimapLineColor}`,fill:"none","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",style:{opacity:"1"}},null,8,Ee),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:p.value,rx:n.minimapSelectionRadius,stroke:"none"},null,8,Be),e.createElementVNode("path",{d:`M${s.value/2},${Math.max(i.value.height,0)} ${m.value.fullSet} L${i.value.width-s.value/2},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Me),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,rx:n.minimapSelectionRadius,fill:p.value},null,8,$e),e.createElementVNode("rect",{x:v.value.x,width:v.value.width<0?0:v.value.width,height:Math.max(i.value.height,0),y:0,fill:n.minimapSelectedColor,rx:n.minimapSelectionRadius,style:e.normalizeStyle({opacity:n.minimapSelectedColorOpacity})},null,12,Re),e.createElementVNode("path",{d:`M${m.value.sliced[0].x},${Math.max(i.value.height,0)} ${m.value.selectionSet} L${m.value.sliced.at(-1).x},${Math.max(i.value.height,0)}Z`,fill:`url(#${C.value})`,stroke:"none",style:{opacity:"1"}},null,8,Le),e.createElementVNode("path",{d:`M ${m.value.selectionSet}`,stroke:`${n.minimapLineColor}`,fill:"transparent","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Ve),e.createElementVNode("circle",{cx:m.value.firstPlot.x,cy:m.value.firstPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,ze),e.createElementVNode("circle",{cx:m.value.lastPlot.x,cy:m.value.lastPlot.y,"stroke-width":"0.5",stroke:p.value,r:"3",fill:n.minimapLineColor},null,8,De),w.value!==null?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("g",null,[w.value===o&&o>=n.valueStart&&o<n.valueEnd?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value*d+s.value/2,x2:s.value*d+s.value/2,y1:0,y2:Math.max(i.value.height,0),stroke:n.minimapIndicatorColor,"stroke-linecap":"round","stroke-dasharray":"2","stroke-width":"1"},null,8,Te)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value,(o,d)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value*d,y:0,height:Math.max(i.value.height,0),width:s.value<0?0:s.value,fill:"transparent",style:e.normalizeStyle([{"pointer-events":"all !important"},{cursor:o>=n.valueStart&&o<n.valueEnd&&n.enableSelectionDrag?y.value?"grabbing":"grab":"default"}]),onMousedown:a[0]||(a[0]=x=>y.value=!0),onMouseup:a[1]||(a[1]=x=>y.value=!1),onMouseenter:x=>ue(o),onMouseleave:a[2]||(a[2]=x=>{w.value=null,h("trapMouse",null)})},null,44,Pe))),256))],8,Se))])):e.createCommentVNode("",!0),a[13]||(a[13]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass({"range-highlight":!0,move:n.enableSelectionDrag}),onMousedown:a[3]||(a[3]=o=>y.value=!0),onMouseup:a[4]||(a[4]=o=>y.value=!1),style:e.normalizeStyle({...g.value,cursor:y.value?"grabbing":"grab"})},null,38),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{ref_key:"rangeStart",ref:B,key:`range-min${re.value}`,type:"range",class:e.normalizeClass({"range-left":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[5]||(a[5]=o=>u.value=o),onInput:oe,onMouseenter:a[6]||(a[6]=o=>Q("start"))},null,42,Ie)),[[e.vModelText,u.value]]):e.createCommentVNode("",!0),n.enableRangeHandles?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:2,ref_key:"rangeEnd",ref:M,type:"range",class:e.normalizeClass({"range-right":!0,"range-handle":!0,"range-minimap":k.value&&n.verticalHandles}),min:n.min,max:n.max,"onUpdate:modelValue":a[7]||(a[7]=o=>r.value=o),onInput:ie,onMouseenter:a[8]||(a[8]=o=>Q("end"))},null,42,Fe)),[[e.vModelText,r.value]]):e.createCommentVNode("",!0),n.labelLeft?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"tooltipLeft",ref:D,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowLeft&&!n.verticalHandles,"range-tooltip-arrow-left":!g.value.arrowLeft&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipLeft,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:`${K.value+4}`})},e.toDisplayString(n.labelLeft),7)):e.createCommentVNode("",!0),n.labelRight?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"tooltipRight",ref:T,class:e.normalizeClass({"range-tooltip":!0,"range-tooltip-visible":b.value,"range-tooltip-arrow":g.value.arrowRight&&!n.verticalHandles,"range-tooltip-arrow-right":!g.value.arrowRight&&!n.verticalHandles}),style:e.normalizeStyle({left:g.value.tooltipRight,color:e.unref(f.adaptColorToBackground)(n.selectColor),backgroundColor:n.selectColor,border:`1px solid ${p.value}`,zIndex:"4"})},e.toDisplayString(n.labelRight),7)):e.createCommentVNode("",!0)],544)],544))}},He=ye._export_sfc(Ae,[["__scopeId","data-v-8948b724"]]);exports.Slicer=He;
@@ -1,7 +1,7 @@
1
1
  import { useCssVars as Ie, computed as s, ref as u, watch as R, onMounted as Pe, onBeforeUnmount as ze, onUpdated as Ae, nextTick as ue, createElementBlock as v, openBlock as m, createElementVNode as d, createCommentVNode as x, renderSlot as Fe, normalizeStyle as $, createVNode as He, withDirectives as oe, unref as Z, Fragment as re, renderList as se, normalizeClass as L, vModelText as de, toDisplayString as ve } from "vue";
2
- import Ve from "./BaseIcon-V0HD2AAD.js";
3
- import { t as We, u as Xe } from "./useResponsive-Cw4oZ8sQ.js";
4
- import { c as Ue, T as me, S as ce, X as Oe, G as he } from "./index-CO-5OgQA.js";
2
+ import Ve from "./BaseIcon-BPehVcsN.js";
3
+ import { t as We, u as Xe } from "./useResponsive-JZ9xq-JV.js";
4
+ import { c as Ue, T as me, S as ce, X as Oe, G as he } from "./index-BMcwUsiG.js";
5
5
  import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const Ge = {
7
7
  class: "vue-data-ui-slicer-labels",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as l, openBlock as n, Fragment as f, createElementVNode as p, createCommentVNode as o, normalizeStyle as d, unref as e, toDisplayString as g, renderSlot as r } from "vue";
2
- import { u as c } from "./useNestedProp-D8sa_wYF.js";
2
+ import { u as c } from "./useNestedProp-DwQWwt5e.js";
3
3
  const x = {
4
4
  __name: "Title",
5
5
  props: {
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),r=require("./useNestedProp-DUH233CH.cjs"),o={__name:"Title",props:{config:{type:Object,default(){return{}}},lineHeight:{type:[String,Boolean],default:!1}},setup(i){const n=i,t=r.useNestedProp({userConfig:n.config,defaultConfig:{title:{cy:"",text:"",color:"",fontSize:20,bold:!0,textAlign:"center",paddingLeft:0,paddingRight:0},subtitle:{cy:"",text:"",color:"",fontSize:14,bold:!1}}});return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).title.color};font-size:${e.unref(t).title.fontSize}px;font-weight:${e.unref(t).title.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).title.text),5),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).subtitle.text),5)):e.createCommentVNode("",!0),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},[e.renderSlot(l.$slots,"default")],4)):e.createCommentVNode("",!0)],64))}};exports._sfc_main=o;
1
+ "use strict";const e=require("vue"),r=require("./useNestedProp-DYDoE86w.cjs"),o={__name:"Title",props:{config:{type:Object,default(){return{}}},lineHeight:{type:[String,Boolean],default:!1}},setup(i){const n=i,t=r.useNestedProp({userConfig:n.config,defaultConfig:{title:{cy:"",text:"",color:"",fontSize:20,bold:!0,textAlign:"center",paddingLeft:0,paddingRight:0},subtitle:{cy:"",text:"",color:"",fontSize:14,bold:!1}}});return(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:"atom-title",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).title.color};font-size:${e.unref(t).title.fontSize}px;font-weight:${e.unref(t).title.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).title.text),5),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"atom-subtitle",style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},e.toDisplayString(e.unref(t).subtitle.text),5)):e.createCommentVNode("",!0),e.unref(t).subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width: calc(100% - ${e.unref(t).title.paddingLeft+e.unref(t).title.paddingRight}px); text-align:${e.unref(t).title.textAlign};color:${e.unref(t).subtitle.color};font-size:${e.unref(t).subtitle.fontSize}px;font-weight:${e.unref(t).subtitle.bold?"bold":""};padding-left:${e.unref(t).title.paddingLeft}px;padding-right:${e.unref(t).title.paddingRight}px;${i.lineHeight?`line-height:${i.lineHeight}`:""}`)},[e.renderSlot(l.$slots,"default")],4)):e.createCommentVNode("",!0)],64))}};exports._sfc_main=o;
@@ -1,5 +1,5 @@
1
1
  import { ref as s, onMounted as S, onUnmounted as g, watch as p, nextTick as k, computed as x, createBlock as $, openBlock as h, Teleport as C, createElementBlock as F, createCommentVNode as B, normalizeStyle as w, normalizeClass as N, renderSlot as m, createElementVNode as Y } from "vue";
2
- import { s as z } from "./index-CO-5OgQA.js";
2
+ import { s as z } from "./index-BMcwUsiG.js";
3
3
  function M({ tooltip: e, chart: a, clientPosition: t, positionPreference: d = "center", defaultOffsetY: c = 24, blockShiftY: u = !1 }) {
4
4
  const o = s(0), i = s(c);
5
5
  if (e && a) {
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("vue"),p=require("./index-B7zOq_yO.cjs");function h({tooltip:t,chart:a,clientPosition:o,positionPreference:d="center",defaultOffsetY:c=24,blockShiftY:i=!1}){const l=e.ref(0),r=e.ref(c);if(t&&a){const{width:u,height:v}=t.getBoundingClientRect(),{right:f,left:n,bottom:s}=a.getBoundingClientRect();d==="center"&&(o.x+u/2>f?l.value=-u+(f-o.x):o.x-u/2<n?l.value=-u+(u-(o.x-n)):l.value=-u/2),d==="right"&&(o.x+u>f?l.value=-u+(f-o.x):l.value=0),d==="left"&&(o.x<n+u?l.value=-u+(u-(o.x-n)):l.value=-u),o.y+v>s&&!i&&(r.value=-v-c)}return{top:o.y+r.value,left:o.x+l.value}}function b(t,a,o){e.onMounted(()=>t.addEventListener(a,o)),e.onUnmounted(()=>t.removeEventListener(a,o))}function x(){const t=e.ref(0),a=e.ref(0);return b(window,"mousemove",o=>{t.value=o.clientX,a.value=o.clientY}),{x:t,y:a}}const g=["aria-hidden"],S=["innerHTML"],y=.18,k={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100},position:{type:String,default:"center"},offsetY:{type:Number,default:24},blockShiftY:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},disableSmoothing:{type:Boolean,default:!1}},setup(t){const a=t,o=e.ref(null),{x:d,y:c}=x(a.parent),i=e.ref({x:0,y:0}),l=e.ref({x:0,y:0});let r=null;function u(){if(a.disableSmoothing){l.value.x=i.value.x,l.value.y=i.value.y;return}l.value.x+=(i.value.x-l.value.x)*y,l.value.y+=(i.value.y-l.value.y)*y,r=requestAnimationFrame(u)}e.watch([d,c],([n,s])=>{i.value.x=n,i.value.y=s,a.disableSmoothing&&(l.value.x=n,l.value.y=s)}),e.watch(()=>a.show,async n=>{if(n){const s=d.value,m=c.value;i.value.x=s,i.value.y=m,l.value.x=s,l.value.y=m,await e.nextTick(),r||u()}else r&&(cancelAnimationFrame(r),r=null)}),e.onUnmounted(()=>{r&&cancelAnimationFrame(r)});const v=e.computed(()=>{const n=h({tooltip:o.value,chart:a.parent,clientPosition:l.value,positionPreference:a.position,defaultOffsetY:a.offsetY,blockShiftY:a.blockShiftY});return{top:Math.round(n.top),left:Math.round(n.left)}}),f=e.computed(()=>p.setOpacity(a.backgroundColor,a.backgroundOpacity));return(n,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.isFullscreen?t.parent:"body"},[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltip",ref:o,role:"tooltip","aria-hidden":!t.show,"aria-live":"polite",class:e.normalizeClass({"vue-data-ui-custom-tooltip":t.isCustom,"vue-data-ui-tooltip":!t.isCustom}),style:e.normalizeStyle(`
1
+ "use strict";const e=require("vue"),p=require("./index-CG-euAJp.cjs");function h({tooltip:t,chart:a,clientPosition:o,positionPreference:d="center",defaultOffsetY:c=24,blockShiftY:i=!1}){const l=e.ref(0),r=e.ref(c);if(t&&a){const{width:u,height:v}=t.getBoundingClientRect(),{right:f,left:n,bottom:s}=a.getBoundingClientRect();d==="center"&&(o.x+u/2>f?l.value=-u+(f-o.x):o.x-u/2<n?l.value=-u+(u-(o.x-n)):l.value=-u/2),d==="right"&&(o.x+u>f?l.value=-u+(f-o.x):l.value=0),d==="left"&&(o.x<n+u?l.value=-u+(u-(o.x-n)):l.value=-u),o.y+v>s&&!i&&(r.value=-v-c)}return{top:o.y+r.value,left:o.x+l.value}}function b(t,a,o){e.onMounted(()=>t.addEventListener(a,o)),e.onUnmounted(()=>t.removeEventListener(a,o))}function x(){const t=e.ref(0),a=e.ref(0);return b(window,"mousemove",o=>{t.value=o.clientX,a.value=o.clientY}),{x:t,y:a}}const g=["aria-hidden"],S=["innerHTML"],y=.18,k={__name:"Tooltip",props:{backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#000000"},content:String,maxWidth:{type:String,default:"300px"},parent:{type:Object},show:{type:Boolean,default:!1},isCustom:{type:Boolean,default:!1},fontSize:{type:[Number,String],default:14},borderRadius:{type:Number,default:4},borderColor:{type:String,default:"#e1e5e8"},borderWidth:{type:Number,default:1},backgroundOpacity:{type:Number,default:100},position:{type:String,default:"center"},offsetY:{type:Number,default:24},blockShiftY:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1},disableSmoothing:{type:Boolean,default:!1}},setup(t){const a=t,o=e.ref(null),{x:d,y:c}=x(a.parent),i=e.ref({x:0,y:0}),l=e.ref({x:0,y:0});let r=null;function u(){if(a.disableSmoothing){l.value.x=i.value.x,l.value.y=i.value.y;return}l.value.x+=(i.value.x-l.value.x)*y,l.value.y+=(i.value.y-l.value.y)*y,r=requestAnimationFrame(u)}e.watch([d,c],([n,s])=>{i.value.x=n,i.value.y=s,a.disableSmoothing&&(l.value.x=n,l.value.y=s)}),e.watch(()=>a.show,async n=>{if(n){const s=d.value,m=c.value;i.value.x=s,i.value.y=m,l.value.x=s,l.value.y=m,await e.nextTick(),r||u()}else r&&(cancelAnimationFrame(r),r=null)}),e.onUnmounted(()=>{r&&cancelAnimationFrame(r)});const v=e.computed(()=>{const n=h({tooltip:o.value,chart:a.parent,clientPosition:l.value,positionPreference:a.position,defaultOffsetY:a.offsetY,blockShiftY:a.blockShiftY});return{top:Math.round(n.top),left:Math.round(n.left)}}),f=e.computed(()=>p.setOpacity(a.backgroundColor,a.backgroundOpacity));return(n,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:t.isFullscreen?t.parent:"body"},[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"tooltip",ref:o,role:"tooltip","aria-hidden":!t.show,"aria-live":"polite",class:e.normalizeClass({"vue-data-ui-custom-tooltip":t.isCustom,"vue-data-ui-tooltip":!t.isCustom}),style:e.normalizeStyle(`
2
2
  pointer-events:none;
3
3
  top:${v.value.top}px;
4
4
  left:${v.value.left}px;
@@ -147,6 +147,7 @@ From the dataset you pass into the props, this component will produce the most a
147
147
  | `VueUiAgePyramid` | `Array<Array<string / number>>` | `VueUiSparklineConfig` | `generatePdf`, `generateImage`, `generateCsv`, `toggleTable`, `toggleTooltip` | `#svg`, `#legend`, `#tooltip-before`, `#tooltip-after`, `#watermark`, `#chart-background` | ✅ | ✅ |
148
148
  | `VueUiCandlestick` | `Array<Array<string / number>>` | `VueUiCandlestickConfig` | `generatePdf`, `generateImage`, `generateCsv`, `toggleTable`, `toggleTooltip` | `#svg`, `#legend`, `#tooltip-before`, `#tooltip-after`, `#reset-action`, `#watermark`, `#chart-background` | ✅ | ✅ |
149
149
  | `VueUiChestnut` | `VueUiChestnutDatasetRoot[]` | `VueUiChestnutConfig` | `@selectRoot`, `@selectBranch`, `@selectNut`, `getData`, `generatePdf`, `generateCsv`, `generateImage`, `toggleTable` | `#svg`, `#legend`, `#watermark`, `#chart-background` | ❌ | ✅ |
150
+ | `VueUiChord` | `VueUiChordDataset` | `VueUiChordConfig` | `@selectLegend`, `@selectGroup`, `@selectRibbon`, `getData`, `generatePdf`, `generateCsv`, `generateImage`, `toggleTable` | `#svg`, `#legend`, `#watermark`, `#chart-background`, `#pattern` | ❌ | ✅ |
150
151
  | `VueUiCirclePack` | `VueUiCirclePackDatasetItem[]` | `VueUiCirclePackConfig` | `@selectDatapoint`, `getData`, `generatePdf`, `generateImage`, `generateCsv`, `toggleTable` | `#svg`, `#legend`, `#watermark`, `#chart-background` , `#pattern`, `#zoom-label`, `#data-label` | ✅ | ✅ |
151
152
  | `VueUiDonutEvolution` | `VueUiDonutEvolutionDatasetItem[]` | `VueUiDonutEvolutionConfig` | `@selectLegend`, `getData`, `generatePdf`, `generateCsv`, `generateImage`, `toggleTable` | `#svg`, `#legend`, `#reset-action`, `#watermark`, `#chart-background` | ❌ | ✅ |
152
153
  | `VueUiDonut` | `VueUiDonutDatasetItem[]` | `VueUiDonutConfig` | `@selectDatapoint`, `@selectLegend`, `getData`, `generatePdf`, `generateCsv`, `generateImage`, `toggleTable`, `toggleLabels`, `toggleTooltip` | `#svg`, `#legend`, `#dataLabel`, `#tooltip-before`, `#tooltip-after`, `#plot-comment`, `#watermark`, `#chart-background`, `#pattern` | ✅ | ✅ |
@@ -1,3 +1,3 @@
1
- "use strict";const x=require("./index-B7zOq_yO.cjs");async function A(n){const i=n.querySelectorAll("img"),o=Array.from(i).map(t=>new Promise(s=>{if(!t.src||t.src.startsWith("data:"))return s();if(t.complete&&t.naturalWidth!==0){try{const e=document.createElement("canvas");e.width=t.naturalWidth,e.height=t.naturalHeight,e.getContext("2d").drawImage(t,0,0),t.src=e.toDataURL()}catch{}return s()}const a=new window.Image;a.crossOrigin="anonymous",a.onload=function(){try{const e=document.createElement("canvas");e.width=a.naturalWidth,e.height=a.naturalHeight,e.getContext("2d").drawImage(a,0,0),t.src=e.toDataURL()}catch{}s()},a.onerror=function(){s()},a.src=t.src}));await Promise.all(o)}function T(n){n.querySelectorAll("[data-dom-to-png-ignore]").forEach(o=>{o.remove()})}function v(n,i,o){const t=window.getComputedStyle(i),s=i.getBoundingClientRect(),a=t.display.includes("flex");let e={},c=n.getAttribute("style");typeof c!="string"&&(c=""),c.split(";").forEach(r=>{if(typeof r=="string"&&r.trim()){const[d,m]=r.split(":");d&&m!==void 0&&(e[d.trim()]=m.trim())}});for(let r=0;r<t.length;r+=1){const d=t[r],m=t.getPropertyValue(d);e[d]=m}e.color=t.color,e["background-color"]=t.backgroundColor;let l=t.fontFamily||o||"";(!l||l.trim()===""||l==="inherit"||l==="initial"||l.toLowerCase().startsWith("system-ui")||l.toLowerCase()==="sans-serif"||l.toLowerCase()==="serif"||l.toLowerCase()==="monospace")&&(l="Helvetica, Arial, sans-serif"),e["font-family"]=l,e["font-size"]=t.fontSize,e["font-weight"]=t.fontWeight,(a||t.display.includes("grid")||["inline-block","absolute","fixed"].includes(t.position))&&(s.width>0&&(e.width=s.width+"px"),s.height>0&&(e.height=s.height+"px")),a&&t.flexWrap==="nowrap"&&(e["white-space"]="nowrap"),["box-sizing","padding","margin","border"].forEach(r=>{e[r]=t.getPropertyValue(r)}),e.overflow="visible",e["overflow-x"]="visible",e["overflow-y"]="visible";let u="";for(const r in e)u+=`${r}:${e[r]};`;n.setAttribute("style",u);const g=n.children||[],y=i.children||[];for(let r=0;r<g.length;r++)g[r].nodeType===1&&y[r]&&v(g[r],y[r],l)}function I(n,i){n.querySelectorAll("text").forEach(t=>{t.setAttribute("font-family",i),t.style.fontFamily=i})}function E(n){const i=new TextEncoder().encode(n);let o="";return i.forEach(t=>o+=String.fromCharCode(t)),btoa(o)}function $(n,i,o){let s=new XMLSerializer().serializeToString(n);s.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)||(s=s.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"'));const a=window.btoa(unescape(encodeURIComponent(s))),e=new window.Image;return e.src=`data:image/svg+xml;base64,${a}`,new Promise((c,l)=>{e.onload=function(){const u=document.createElement("canvas");u.width=i,u.height=o,u.getContext("2d").drawImage(e,0,0,i,o),c(u.toDataURL("image/png",1))},e.onerror=u=>l(u)})}function O(n){if(n.nodeType!==1)return;const i=window.getComputedStyle(n);let o="";for(let t=0;t<i.length;t++){const s=i[t];o+=`${s}:${i.getPropertyValue(s)};`}n.setAttribute("style",o);for(let t=0;t<n.children.length;t++)O(n.children[t])}function M(){const n=[];for(const i of document.styleSheets)try{const o=i.cssRules;if(!o)continue;for(const t of o)(typeof CSSFontFaceRule<"u"&&t instanceof CSSFontFaceRule||t.cssText.trim().startsWith("@font-face"))&&n.push(t.cssText)}catch{continue}return n}function W(n){const i=M();if(!i.length)return;const o=document.createElement("style");o.setAttribute("type","text/css"),o.textContent=i.join(`
1
+ "use strict";const x=require("./index-CG-euAJp.cjs");async function A(n){const i=n.querySelectorAll("img"),o=Array.from(i).map(t=>new Promise(s=>{if(!t.src||t.src.startsWith("data:"))return s();if(t.complete&&t.naturalWidth!==0){try{const e=document.createElement("canvas");e.width=t.naturalWidth,e.height=t.naturalHeight,e.getContext("2d").drawImage(t,0,0),t.src=e.toDataURL()}catch{}return s()}const a=new window.Image;a.crossOrigin="anonymous",a.onload=function(){try{const e=document.createElement("canvas");e.width=a.naturalWidth,e.height=a.naturalHeight,e.getContext("2d").drawImage(a,0,0),t.src=e.toDataURL()}catch{}s()},a.onerror=function(){s()},a.src=t.src}));await Promise.all(o)}function T(n){n.querySelectorAll("[data-dom-to-png-ignore]").forEach(o=>{o.remove()})}function v(n,i,o){const t=window.getComputedStyle(i),s=i.getBoundingClientRect(),a=t.display.includes("flex");let e={},c=n.getAttribute("style");typeof c!="string"&&(c=""),c.split(";").forEach(r=>{if(typeof r=="string"&&r.trim()){const[d,m]=r.split(":");d&&m!==void 0&&(e[d.trim()]=m.trim())}});for(let r=0;r<t.length;r+=1){const d=t[r],m=t.getPropertyValue(d);e[d]=m}e.color=t.color,e["background-color"]=t.backgroundColor;let l=t.fontFamily||o||"";(!l||l.trim()===""||l==="inherit"||l==="initial"||l.toLowerCase().startsWith("system-ui")||l.toLowerCase()==="sans-serif"||l.toLowerCase()==="serif"||l.toLowerCase()==="monospace")&&(l="Helvetica, Arial, sans-serif"),e["font-family"]=l,e["font-size"]=t.fontSize,e["font-weight"]=t.fontWeight,(a||t.display.includes("grid")||["inline-block","absolute","fixed"].includes(t.position))&&(s.width>0&&(e.width=s.width+"px"),s.height>0&&(e.height=s.height+"px")),a&&t.flexWrap==="nowrap"&&(e["white-space"]="nowrap"),["box-sizing","padding","margin","border"].forEach(r=>{e[r]=t.getPropertyValue(r)}),e.overflow="visible",e["overflow-x"]="visible",e["overflow-y"]="visible";let u="";for(const r in e)u+=`${r}:${e[r]};`;n.setAttribute("style",u);const g=n.children||[],y=i.children||[];for(let r=0;r<g.length;r++)g[r].nodeType===1&&y[r]&&v(g[r],y[r],l)}function I(n,i){n.querySelectorAll("text").forEach(t=>{t.setAttribute("font-family",i),t.style.fontFamily=i})}function E(n){const i=new TextEncoder().encode(n);let o="";return i.forEach(t=>o+=String.fromCharCode(t)),btoa(o)}function $(n,i,o){let s=new XMLSerializer().serializeToString(n);s.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)||(s=s.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"'));const a=window.btoa(unescape(encodeURIComponent(s))),e=new window.Image;return e.src=`data:image/svg+xml;base64,${a}`,new Promise((c,l)=>{e.onload=function(){const u=document.createElement("canvas");u.width=i,u.height=o,u.getContext("2d").drawImage(e,0,0,i,o),c(u.toDataURL("image/png",1))},e.onerror=u=>l(u)})}function O(n){if(n.nodeType!==1)return;const i=window.getComputedStyle(n);let o="";for(let t=0;t<i.length;t++){const s=i[t];o+=`${s}:${i.getPropertyValue(s)};`}n.setAttribute("style",o);for(let t=0;t<n.children.length;t++)O(n.children[t])}function M(){const n=[];for(const i of document.styleSheets)try{const o=i.cssRules;if(!o)continue;for(const t of o)(typeof CSSFontFaceRule<"u"&&t instanceof CSSFontFaceRule||t.cssText.trim().startsWith("@font-face"))&&n.push(t.cssText)}catch{continue}return n}function W(n){const i=M();if(!i.length)return;const o=document.createElement("style");o.setAttribute("type","text/css"),o.textContent=i.join(`
2
2
  `);const t=n.querySelector("defs")||document.createElementNS(x.XMLNS,"defs");t.appendChild(o),n.querySelector("defs")||n.insertBefore(t,n.firstChild)}function P(n,i){const o=n.querySelectorAll("foreignObject"),t=i.querySelectorAll("foreignObject");o.forEach((s,a)=>{const e=t[a];if(!e)return;function c(l,u){if(!l||!u)return;if(l.nodeType===1&&u.nodeType===1){const r=window.getComputedStyle(u);let d="";for(let m=0;m<r.length;m++){const C=r[m];d+=`${C}:${r.getPropertyValue(C)};`}l.setAttribute("style",d)}const g=l.children||[],y=u.children||[];for(let r=0;r<g.length;r++)c(g[r],y[r])}c(s,e)})}function z(n){n.querySelectorAll("foreignObject").forEach(o=>{let t="";const s=Array.from(o.querySelectorAll("*"));if(s.length!==0){for(const a of document.styleSheets){let e;try{e=a.cssRules}catch{continue}if(e){for(const c of e)if(!(typeof CSSStyleRule<"u"&&!(c instanceof CSSStyleRule)))try{s.some(l=>l.matches(c.selectorText))&&(t+=c.cssText+`
3
3
  `)}catch{continue}}}if(t){const a=document.createElement("style");a.textContent=t,o.insertBefore(a,o.firstChild)}}})}function H(n){n.querySelectorAll("foreignObject").forEach(o=>{const t=o.firstElementChild;t&&t.tagName.toLowerCase()!=="svg"&&t.setAttribute("xmlns","http://www.w3.org/1999/xhtml")})}function D(n,i){const o=n.querySelectorAll("foreignObject"),t=i.querySelectorAll("foreignObject");o.forEach((s,a)=>{const e=t[a];if(!s||!e)return;const c=s.firstElementChild,l=e.firstElementChild;c&&l&&R(c,l)})}function R(n,i){if(n.nodeType!==1||!i)return;v(n,i);const o=n.children||[],t=i.children||[];for(let s=0;s<o.length;s++)R(o[s],t[s])}function F(n,i){const o=Array.from(i.querySelectorAll("img"));n.querySelectorAll("img").forEach(t=>{const s=t.getAttribute("src"),a=o.find(e=>e.getAttribute("src")===s);if(a){const e=window.getComputedStyle(a);let c="";for(let l=0;l<e.length;l++){const u=e[l];c+=`${u}:${e.getPropertyValue(u)};`}t.setAttribute("style",c)}})}async function U({container:n,scale:i=2}){if(!n)throw new Error("No container provided");await document.fonts.ready;let o=window.getComputedStyle(n).fontFamily||"Helvetica";o.toLowerCase().includes("helvetica")||(o+=", Helvetica");const t=n.cloneNode(!0),s=t.querySelectorAll("canvas"),a=n.querySelectorAll("canvas");for(let p=0;p<a.length;p+=1){const f=a[p],h=s[p];if(f&&h){const w=document.createElement("img");w.src=f.toDataURL("image/png"),w.width=f.width,w.height=f.height,w.style.width=f.style.width||f.width+"px",w.style.height=f.style.height||f.height+"px",h.replaceWith(w)}}const e=n.querySelector("svg[aria-label]"),c=t.querySelector("svg[aria-label]");if(e&&c){H(c),z(c),P(c,e),D(c,e),O(c),I(c,o),F(c,e),await A(c);const p=e.getBoundingClientRect(),f=p.width,h=p.height,w=Math.round(f*i),q=Math.round(h*i),L=await $(c,w,q),S=document.createElement("img");S.src=L,S.width=f,S.height=h,S.style.width=f+"px",S.style.height=h+"px",c.parentNode.replaceChild(S,c)}v(t,n,o),F(t,n),T(t),await A(t);const{width:l,height:u}=n.getBoundingClientRect(),g=Math.round(Math.max(t.scrollWidth,l)*i),y=Math.round(Math.max(t.scrollHeight,u)*1.01*i),r=document.createElementNS(x.XMLNS,"svg");r.setAttribute("viewBox",`0 0 ${g} ${y}`),r.setAttribute("width",g),r.setAttribute("height",y),r.setAttribute("style",`font-family:${o};`);const d=document.createElementNS(x.XMLNS,"foreignObject");d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width",g),d.setAttribute("height",y),d.setAttribute("style",`font-family:${o};`),t.style.transform=`scale(${i})`,t.style.transformOrigin="top left",t.style.width=l+"px",t.style.height=u+"px",t.style.background=window.getComputedStyle(n).backgroundColor,d.appendChild(t),W(r),r.appendChild(d);const C=new XMLSerializer().serializeToString(r),j=E(C),b=new window.Image;return b.crossOrigin="anonymous",b.src=`data:image/svg+xml;base64,${j}`,new Promise((p,f)=>{b.onload=function(){try{const h=document.createElement("canvas");h.width=g,h.height=y,h.getContext("2d").drawImage(b,0,0,g,y),p(h.toDataURL("image/png",1))}catch(h){f("Failed to draw SVG on canvas: "+h)}},b.onerror=function(){f("Failed to load SVG image for conversion")}})}exports.domToPng=U;
@@ -1,4 +1,4 @@
1
- import { X as x } from "./index-CO-5OgQA.js";
1
+ import { X as x } from "./index-BMcwUsiG.js";
2
2
  async function A(n) {
3
3
  const i = n.querySelectorAll("img"), o = Array.from(i).map((t) => new Promise((s) => {
4
4
  if (!t.src || t.src.startsWith("data:")) return s();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./dom-to-png-CNF-s1oi.cjs");async function d({domElement:r,fileName:n,format:t="png",scale:c=2}){if(!r)return Promise.reject("No element provided");if(t==="svg"){const o=converter.convertToImg({container:r,scale:c});if(!o)return Promise.reject("Could not create SVG image");const e=document.createElement("a");return e.href=o.src,e.download=`${n}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e),Promise.resolve()}try{const o=await i.domToPng({container:r,scale:c}),e=document.createElement("a");e.href=o,e.download=`${n}.${t}`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(o){throw console.error("Error generating image:",o),o}}exports.default=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./dom-to-png-BeN7LHfC.cjs");async function d({domElement:r,fileName:n,format:t="png",scale:c=2}){if(!r)return Promise.reject("No element provided");if(t==="svg"){const o=converter.convertToImg({container:r,scale:c});if(!o)return Promise.reject("Could not create SVG image");const e=document.createElement("a");return e.href=o.src,e.download=`${n}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e),Promise.resolve()}try{const o=await i.domToPng({container:r,scale:c}),e=document.createElement("a");e.href=o,e.download=`${n}.${t}`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(o){throw console.error("Error generating image:",o),o}}exports.default=d;
@@ -1,4 +1,4 @@
1
- import { d as i } from "./dom-to-png-D2P_vWEM.js";
1
+ import { d as i } from "./dom-to-png-G_nLlvER.js";
2
2
  async function a({ domElement: r, fileName: n, format: t = "png", scale: c = 2 }) {
3
3
  if (!r) return Promise.reject("No element provided");
4
4
  if (t === "svg") {