vue-data-ui 2.4.16 → 2.4.17

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 (150) hide show
  1. package/dist/{Arrow-DjLUfj3I.js → Arrow-BgooI-wc.js} +1 -1
  2. package/dist/{Arrow-D2hqxUFF.cjs → Arrow-BiEdEdKA.cjs} +1 -1
  3. package/dist/{BaseIcon-CbpX2G1z.js → BaseIcon-CEx6ctvt.js} +4 -3
  4. package/dist/{BaseIcon-Prt1oCQy.cjs → BaseIcon-CQHXoBmk.cjs} +1 -1
  5. package/dist/{DataTable-BBgny7Xn.cjs → DataTable-C74ri0a_.cjs} +1 -1
  6. package/dist/{DataTable-Dqxz-Alv.js → DataTable-DJmlLvjT.js} +2 -2
  7. package/dist/{Legend-qZAWBE89.js → Legend-0dYtOzjh.js} +1 -1
  8. package/dist/{Legend-H7RcvGcF.cjs → Legend-CUAzd-58.cjs} +1 -1
  9. package/dist/{PackageVersion-DkcHjYNR.js → PackageVersion-7ZWPzzBh.js} +1 -1
  10. package/dist/{PackageVersion-D0qCtRhG.cjs → PackageVersion-PUrYDB1r.cjs} +1 -1
  11. package/dist/PenAndPaper-BsJfhJzx.js +415 -0
  12. package/dist/PenAndPaper-DtXID4bK.cjs +1 -0
  13. package/dist/{Shape-BDC0jxZ3.js → Shape-ChZqBrYp.js} +1 -1
  14. package/dist/{Shape-eSbBghIf.cjs → Shape-hk-jLUhF.cjs} +1 -1
  15. package/dist/{Slicer-BXIEr9yc.cjs → Slicer-BaAgNYLm.cjs} +1 -1
  16. package/dist/{Slicer-C_ffaPqq.js → Slicer-brJjwFit.js} +2 -2
  17. package/dist/{Title-BXyUVn4l.cjs → Title-BNQkXAzp.cjs} +1 -1
  18. package/dist/{Title-CJxJTQnv.js → Title-Z9WyiszR.js} +1 -1
  19. package/dist/{Tooltip-Bj9mOvCn.cjs → Tooltip-Ba-UwAPn.cjs} +1 -1
  20. package/dist/{Tooltip-D3PxH9Yr.js → Tooltip-CrQVdepY.js} +1 -1
  21. package/dist/{index-DtgCF1dT.js → index-CsO-G1pF.js} +1 -1
  22. package/dist/{index-ConhUMxI.cjs → index-JhKFCmMY.cjs} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/types/vue-data-ui.d.cts +1 -1
  25. package/dist/types/vue-data-ui.d.ts +1 -1
  26. package/dist/{useNestedProp-BdDhoTT1.js → useNestedProp-25bpPEIJ.js} +1 -1
  27. package/dist/{useNestedProp-Bf_wk0w0.cjs → useNestedProp-DMCwXhe0.cjs} +1 -1
  28. package/dist/{usePrinter-B47_seIG.cjs → usePrinter-CnFnzxGv.cjs} +1 -1
  29. package/dist/{usePrinter-NpyT5xn6.js → usePrinter-CtEmFGMi.js} +3 -2
  30. package/dist/{vue-data-ui-Ddtj4Mek.js → vue-data-ui-DDgRwcAN.js} +58 -58
  31. package/dist/{vue-data-ui-DB1uyxsy.cjs → vue-data-ui-DF-QMzBK.cjs} +1 -1
  32. package/dist/vue-data-ui.cjs +1 -1
  33. package/dist/vue-data-ui.js +1 -1
  34. package/dist/{vue-ui-3d-bar-anfzldet.js → vue-ui-3d-bar-B3KrSswQ.js} +9 -9
  35. package/dist/{vue-ui-3d-bar-Ds4WyNIk.cjs → vue-ui-3d-bar-_bO04BXS.cjs} +1 -1
  36. package/dist/{vue-ui-accordion-B3F_RzZJ.js → vue-ui-accordion-BtZB8yRU.js} +3 -3
  37. package/dist/{vue-ui-accordion-EBl2EIy5.cjs → vue-ui-accordion-BzagHU05.cjs} +1 -1
  38. package/dist/{vue-ui-age-pyramid-LkSWkIF-.js → vue-ui-age-pyramid-DMH90WOX.js} +10 -10
  39. package/dist/{vue-ui-age-pyramid-BQDPzBbb.cjs → vue-ui-age-pyramid-DZE_Luus.cjs} +1 -1
  40. package/dist/{vue-ui-annotator-BWCLVaJg.cjs → vue-ui-annotator-CBRuEmOr.cjs} +1 -1
  41. package/dist/{vue-ui-annotator-hg0hrQ4M.js → vue-ui-annotator-CM4DLW56.js} +1 -1
  42. package/dist/{vue-ui-bullet-BE4BC3Lm.js → vue-ui-bullet-BMzsVdyl.js} +8 -8
  43. package/dist/{vue-ui-bullet-5Ncai2bG.cjs → vue-ui-bullet-DwikQ6ju.cjs} +1 -1
  44. package/dist/{vue-ui-candlestick-CmOe5S2a.js → vue-ui-candlestick-C4KIT4W6.js} +11 -11
  45. package/dist/{vue-ui-candlestick-CsrO2_dW.cjs → vue-ui-candlestick-ZRDcdb9z.cjs} +1 -1
  46. package/dist/{vue-ui-carousel-table-OJ-EZXBN.js → vue-ui-carousel-table-CapfJdG3.js} +4 -4
  47. package/dist/{vue-ui-carousel-table-DNFw32Re.cjs → vue-ui-carousel-table-D1rgIysD.cjs} +1 -1
  48. package/dist/{vue-ui-chestnut-BIwKV_Me.js → vue-ui-chestnut-BctCM0TL.js} +8 -8
  49. package/dist/{vue-ui-chestnut-BD5cEuau.cjs → vue-ui-chestnut-Rf6rE0bl.cjs} +1 -1
  50. package/dist/{vue-ui-cursor-6AnJw5dW.cjs → vue-ui-cursor-DusyAVsS.cjs} +1 -1
  51. package/dist/{vue-ui-cursor-Bs22kPh_.js → vue-ui-cursor-kBcjSphL.js} +2 -2
  52. package/dist/{vue-ui-dashboard-BUHKjLLQ.js → vue-ui-dashboard-BB3sVDvV.js} +2 -2
  53. package/dist/{vue-ui-dashboard-B1_ZmGck.cjs → vue-ui-dashboard-Cjb73tir.cjs} +1 -1
  54. package/dist/{vue-ui-digits-C-g6ZMiJ.cjs → vue-ui-digits-B6yFqYC9.cjs} +1 -1
  55. package/dist/{vue-ui-digits-ZRwez97T.js → vue-ui-digits-CPJa5ClB.js} +2 -2
  56. package/dist/{vue-ui-donut-bpO1nC_A.js → vue-ui-donut-DpuLbPWE.js} +11 -11
  57. package/dist/{vue-ui-donut-BEau-Lsx.cjs → vue-ui-donut-WgY1gAoH.cjs} +1 -1
  58. package/dist/{vue-ui-donut-evolution-P_70k4ZK.js → vue-ui-donut-evolution-B1bmT1Hn.js} +11 -11
  59. package/dist/{vue-ui-donut-evolution-Bhtrexhs.cjs → vue-ui-donut-evolution-Be1DcKCD.cjs} +1 -1
  60. package/dist/{vue-ui-dumbbell-BF4kFnaH.js → vue-ui-dumbbell-BJlCo1Uu.js} +10 -10
  61. package/dist/{vue-ui-dumbbell-BIhtFBfx.cjs → vue-ui-dumbbell-DS694H2W.cjs} +1 -1
  62. package/dist/{vue-ui-flow-aihghAzc.cjs → vue-ui-flow-DNkEPzD8.cjs} +1 -1
  63. package/dist/{vue-ui-flow-VejnWAwC.js → vue-ui-flow-YQQjRjZJ.js} +9 -9
  64. package/dist/{vue-ui-galaxy-BYqLQviQ.js → vue-ui-galaxy-CWBoQCBu.js} +11 -11
  65. package/dist/{vue-ui-galaxy-D9-PvHlW.cjs → vue-ui-galaxy-wXWBDBN3.cjs} +1 -1
  66. package/dist/{vue-ui-gauge-DwgxIcWn.js → vue-ui-gauge-BpMaui2R.js} +7 -7
  67. package/dist/{vue-ui-gauge-CNeT3j79.cjs → vue-ui-gauge-CkLScLiT.cjs} +1 -1
  68. package/dist/{vue-ui-gizmo-CaIENr2y.js → vue-ui-gizmo-CW3i7sGH.js} +3 -3
  69. package/dist/{vue-ui-gizmo-CI0Noh4J.cjs → vue-ui-gizmo-CW42uCmT.cjs} +1 -1
  70. package/dist/{vue-ui-heatmap-T0RZPJNi.js → vue-ui-heatmap-CmYLqA2_.js} +10 -10
  71. package/dist/{vue-ui-heatmap-Bi41PsVf.cjs → vue-ui-heatmap-CsmYL0Gt.cjs} +1 -1
  72. package/dist/{vue-ui-kpi-DzINo7qU.cjs → vue-ui-kpi-CDgSrb5w.cjs} +1 -1
  73. package/dist/{vue-ui-kpi-BjHN5ees.js → vue-ui-kpi-rbngmyhG.js} +3 -3
  74. package/dist/{vue-ui-mini-loader-KKMt90P1.cjs → vue-ui-mini-loader-CPT6mWRI.cjs} +1 -1
  75. package/dist/{vue-ui-mini-loader-Dmoycj4D.js → vue-ui-mini-loader-Xs2haGP9.js} +2 -2
  76. package/dist/{vue-ui-molecule-BuY9zPWp.cjs → vue-ui-molecule--p_0nckO.cjs} +1 -1
  77. package/dist/{vue-ui-molecule-CmqUJWcJ.js → vue-ui-molecule-CaQBNkoU.js} +11 -11
  78. package/dist/{vue-ui-mood-radar-DN6ksCAR.cjs → vue-ui-mood-radar-BrPCZMj9.cjs} +1 -1
  79. package/dist/{vue-ui-mood-radar-Bfxtfqhs.js → vue-ui-mood-radar-Bxhit8iq.js} +11 -11
  80. package/dist/{vue-ui-nested-donuts-DhuIlTFL.js → vue-ui-nested-donuts-CKtSdQxL.js} +11 -11
  81. package/dist/{vue-ui-nested-donuts-DrWv-fzC.cjs → vue-ui-nested-donuts-Db2PRZa7.cjs} +1 -1
  82. package/dist/{vue-ui-onion-DqbR_fES.js → vue-ui-onion-BcOvRLKd.js} +11 -11
  83. package/dist/{vue-ui-onion-BUn_3_0m.cjs → vue-ui-onion-BiUueMU9.cjs} +1 -1
  84. package/dist/{vue-ui-parallel-coordinate-plot-CbiA8q_i.cjs → vue-ui-parallel-coordinate-plot-BHCgCkBU.cjs} +1 -1
  85. package/dist/{vue-ui-parallel-coordinate-plot-B5J5Xgsx.js → vue-ui-parallel-coordinate-plot-DbHskdgm.js} +12 -12
  86. package/dist/{vue-ui-quadrant-Cw_4_8qY.cjs → vue-ui-quadrant-Cnq1XIho.cjs} +1 -1
  87. package/dist/{vue-ui-quadrant-D87ZPZhF.js → vue-ui-quadrant-CtuAUQHm.js} +12 -12
  88. package/dist/{vue-ui-quick-chart-B7cVyLVD.js → vue-ui-quick-chart-BCMuGPxx.js} +9 -9
  89. package/dist/{vue-ui-quick-chart-C82CfpyH.cjs → vue-ui-quick-chart-XjXvGQNl.cjs} +1 -1
  90. package/dist/{vue-ui-radar-DBvn8B7b.js → vue-ui-radar-CR5lnsBF.js} +12 -12
  91. package/dist/{vue-ui-radar-DXS6BRSk.cjs → vue-ui-radar-vd7jmG3_.cjs} +1 -1
  92. package/dist/{vue-ui-rating-DdsDvtQB.cjs → vue-ui-rating-BdrnxDIT.cjs} +1 -1
  93. package/dist/{vue-ui-rating-Dk4iTClP.js → vue-ui-rating-CQUodqSb.js} +2 -2
  94. package/dist/{vue-ui-relation-circle-CTzPZrkc.js → vue-ui-relation-circle-BdEcYARl.js} +7 -7
  95. package/dist/{vue-ui-relation-circle-B3A8jwOU.cjs → vue-ui-relation-circle-DF32fFox.cjs} +1 -1
  96. package/dist/{vue-ui-rings-Wv-ucypW.cjs → vue-ui-rings-BBLgEk93.cjs} +1 -1
  97. package/dist/{vue-ui-rings-Boi9uLxr.js → vue-ui-rings-DCBGDVf5.js} +11 -11
  98. package/dist/{vue-ui-scatter-CM4upQYq.js → vue-ui-scatter-BZLWG9bi.js} +12 -12
  99. package/dist/{vue-ui-scatter-CWcULri7.cjs → vue-ui-scatter-D_Khm-rp.cjs} +1 -1
  100. package/dist/{vue-ui-screenshot-B-bxd1nI.js → vue-ui-screenshot-Cgc1JoWv.js} +1 -1
  101. package/dist/{vue-ui-screenshot-voR3dKsx.cjs → vue-ui-screenshot-D_2j2r97.cjs} +1 -1
  102. package/dist/{vue-ui-skeleton-C3iXaL49.js → vue-ui-skeleton-3YuwK-KB.js} +3 -3
  103. package/dist/{vue-ui-skeleton-9CBMqTVb.cjs → vue-ui-skeleton-a45Gy93x.cjs} +1 -1
  104. package/dist/{vue-ui-smiley-BtDsA0Zp.js → vue-ui-smiley-BJR30dUE.js} +2 -2
  105. package/dist/{vue-ui-smiley-DZU3yvxd.cjs → vue-ui-smiley-BMV3HTk4.cjs} +1 -1
  106. package/dist/{vue-ui-spark-trend-a1Y1HAcb.js → vue-ui-spark-trend-DY_173Pe.js} +5 -5
  107. package/dist/{vue-ui-spark-trend-C0z3aQw0.cjs → vue-ui-spark-trend-o0BwOR35.cjs} +1 -1
  108. package/dist/{vue-ui-sparkbar-B0ODWAT_.cjs → vue-ui-sparkbar-DdXGpzCX.cjs} +1 -1
  109. package/dist/{vue-ui-sparkbar-n0x0Ojvl.js → vue-ui-sparkbar-f7BFoFY-.js} +4 -4
  110. package/dist/{vue-ui-sparkgauge-BwdfA6LO.js → vue-ui-sparkgauge-BqHNW_iR.js} +4 -4
  111. package/dist/{vue-ui-sparkgauge-Dsdqik7O.cjs → vue-ui-sparkgauge-C2f4RdUr.cjs} +1 -1
  112. package/dist/{vue-ui-sparkhistogram-BSlf36JQ.js → vue-ui-sparkhistogram-CI27O9Z5.js} +5 -5
  113. package/dist/{vue-ui-sparkhistogram-DCi9ehzT.cjs → vue-ui-sparkhistogram-Dpk9kLuE.cjs} +1 -1
  114. package/dist/{vue-ui-sparkline-DSWvk3uJ.js → vue-ui-sparkline-QF5hPJRY.js} +4 -4
  115. package/dist/{vue-ui-sparkline-d8aMNAFt.cjs → vue-ui-sparkline-QGxTg9Wu.cjs} +1 -1
  116. package/dist/{vue-ui-sparkstackbar-CPbd9U8E.cjs → vue-ui-sparkstackbar-DiTAymYt.cjs} +1 -1
  117. package/dist/{vue-ui-sparkstackbar-TtMuNP_L.js → vue-ui-sparkstackbar-Fv27es3Y.js} +5 -5
  118. package/dist/{vue-ui-stackbar-CYf2GKcg.cjs → vue-ui-stackbar-CmwredTQ.cjs} +1 -1
  119. package/dist/{vue-ui-stackbar-DeIWk3RT.js → vue-ui-stackbar-DXRdE9gQ.js} +12 -12
  120. package/dist/{vue-ui-strip-plot-DpAJn4ei.cjs → vue-ui-strip-plot-Cv8hjBqK.cjs} +1 -1
  121. package/dist/{vue-ui-strip-plot-CeIaBpsB.js → vue-ui-strip-plot-CwZ074tx.js} +11 -11
  122. package/dist/{vue-ui-table-utOV9nTl.js → vue-ui-table-BX0aQnsN.js} +1 -1
  123. package/dist/{vue-ui-table-CSaQrbjJ.cjs → vue-ui-table-CMx4FAti.cjs} +1 -1
  124. package/dist/{vue-ui-table-heatmap-Ccun0wVJ.cjs → vue-ui-table-heatmap-B5pfuZ06.cjs} +1 -1
  125. package/dist/{vue-ui-table-heatmap-DwHvhXeS.js → vue-ui-table-heatmap-DVTqo0gR.js} +4 -4
  126. package/dist/{vue-ui-table-sparkline-ByDSoYwt.cjs → vue-ui-table-sparkline-Dpwv04QK.cjs} +1 -1
  127. package/dist/{vue-ui-table-sparkline-c9KUfM5n.js → vue-ui-table-sparkline-HoC10pK0.js} +5 -5
  128. package/dist/{vue-ui-thermometer-D7NdF_tC.js → vue-ui-thermometer-46rBoQUT.js} +7 -7
  129. package/dist/{vue-ui-thermometer-B9QVfoF-.cjs → vue-ui-thermometer-QNAbTkmc.cjs} +1 -1
  130. package/dist/{vue-ui-timer-DRonyxd9.cjs → vue-ui-timer-CEl8k7G2.cjs} +1 -1
  131. package/dist/{vue-ui-timer-BwFyHPOk.js → vue-ui-timer-DeSsZrLI.js} +5 -5
  132. package/dist/{vue-ui-tiremarks-DlcSqk5B.cjs → vue-ui-tiremarks-BFrqRTKT.cjs} +1 -1
  133. package/dist/{vue-ui-tiremarks-urcNYqvB.js → vue-ui-tiremarks-Bkv2WZBg.js} +7 -7
  134. package/dist/{vue-ui-treemap-CjSxg60e.cjs → vue-ui-treemap-keCkHtK4.cjs} +1 -1
  135. package/dist/{vue-ui-treemap-D9FUy74E.js → vue-ui-treemap-yuPjtcVK.js} +11 -11
  136. package/dist/{vue-ui-vertical-bar-ChHa19St.js → vue-ui-vertical-bar-BbDzEQl_.js} +11 -11
  137. package/dist/{vue-ui-vertical-bar-ZbdRy4kz.cjs → vue-ui-vertical-bar-Bu6-T3E0.cjs} +1 -1
  138. package/dist/{vue-ui-waffle-BZ2oUPvu.cjs → vue-ui-waffle-B5jH5mbu.cjs} +1 -1
  139. package/dist/{vue-ui-waffle-DWZglOmM.js → vue-ui-waffle-Bal7gIMa.js} +11 -11
  140. package/dist/{vue-ui-wheel-BcEr-D-s.cjs → vue-ui-wheel-BxlqXii5.cjs} +1 -1
  141. package/dist/{vue-ui-wheel-MuAnDxyI.js → vue-ui-wheel-D9vfr7y3.js} +7 -7
  142. package/dist/{vue-ui-word-cloud-DDSWc8pR.cjs → vue-ui-word-cloud-CDMrIRV8.cjs} +1 -1
  143. package/dist/{vue-ui-word-cloud-CrTlolf3.js → vue-ui-word-cloud-Dw5BJoNZ.js} +10 -10
  144. package/dist/{vue-ui-xy-WLdlNN-D.cjs → vue-ui-xy-BtUaFSLQ.cjs} +1 -1
  145. package/dist/{vue-ui-xy-BwVbCW0Q.js → vue-ui-xy-DrQy_X9V.js} +14 -14
  146. package/dist/{vue-ui-xy-canvas-BtOoGLf9.js → vue-ui-xy-canvas-74elrp82.js} +11 -11
  147. package/dist/{vue-ui-xy-canvas-DEj9NzP-.cjs → vue-ui-xy-canvas-CZMRdBM5.cjs} +1 -1
  148. package/package.json +1 -1
  149. package/dist/PenAndPaper-DyFo40zC.cjs +0 -1
  150. package/dist/PenAndPaper-M_ZBYgJF.js +0 -347
@@ -1,347 +0,0 @@
1
- import { computed as I, ref as p, watch as q, openBlock as k, createElementBlock as y, normalizeStyle as w, createElementVNode as $, createVNode as F, onMounted as Z, nextTick as ee, onBeforeUnmount as te, Fragment as R, normalizeClass as P, withDirectives as oe, vModelText as ne, createCommentVNode as W, unref as le, withModifiers as Q, renderList as ae } from "vue";
2
- import { F as re, l as se, X as ue } from "./index-DtgCF1dT.js";
3
- import z from "./BaseIcon-CbpX2G1z.js";
4
- import { _ as A } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const ce = ["value"], ie = { class: "icon" }, de = {
6
- __name: "ColorPicker",
7
- props: {
8
- value: {
9
- type: String,
10
- default: "#ffffff"
11
- },
12
- size: {
13
- type: String,
14
- default: "50px"
15
- }
16
- },
17
- emits: ["update:value"],
18
- setup(r, { emit: Y }) {
19
- const v = r, f = I(() => ({
20
- backgroundColor: v.value,
21
- width: "100%",
22
- height: "100%",
23
- cursor: "pointer"
24
- })), m = p(null), L = () => {
25
- var u;
26
- (u = m.value) == null || u.click();
27
- }, x = (u) => {
28
- const b = u.target.value;
29
- Y("update:value", b);
30
- }, C = I(() => re(v.value));
31
- return q(
32
- () => v.value,
33
- (u) => {
34
- m.value.value = u;
35
- }
36
- ), (u, b) => (k(), y("div", {
37
- style: w(f.value),
38
- class: "color-picker-wrapper",
39
- onClick: L
40
- }, [
41
- $("input", {
42
- ref_key: "colorInput",
43
- ref: m,
44
- type: "color",
45
- value: r.value,
46
- class: "hidden-input",
47
- onInput: x
48
- }, null, 40, ce),
49
- $("div", ie, [
50
- F(z, {
51
- name: "palette",
52
- stroke: C.value,
53
- size: 22
54
- }, null, 8, ["stroke"])
55
- ])
56
- ], 4));
57
- }
58
- }, pe = /* @__PURE__ */ A(de, [["__scopeId", "data-v-d3f01240"]]), ve = {
59
- class: /* @__PURE__ */ P({
60
- "vue-ui-pen-and-paper-action": !0
61
- }),
62
- style: { padding: "0 !important" }
63
- }, fe = ["disabled"], he = ["xmlns", "viewBox", "onTouchstart", "onTouchmove"], ge = ["cx", "cy", "r", "fill"], me = ["d", "stroke", "stroke-width"], ke = ["d", "stroke", "stroke-width"], ye = {
64
- __name: "PenAndPaper",
65
- props: {
66
- parent: {
67
- type: HTMLElement
68
- },
69
- backgroundColor: {
70
- type: String,
71
- default: "#FFFFFF"
72
- },
73
- color: {
74
- type: String,
75
- default: "#2D353C"
76
- },
77
- active: {
78
- type: Boolean,
79
- default: !1
80
- }
81
- },
82
- emits: ["close"],
83
- setup(r, { emit: Y }) {
84
- const v = r, f = p([]), m = p([]), L = p("0 0 0 0"), x = p(v.color), C = p(1), u = I(() => se(v.color, 0.6));
85
- function b({ width: o, height: t }) {
86
- L.value = `0 0 ${o} ${t}`;
87
- }
88
- const N = p(null);
89
- Z(() => {
90
- ee(() => {
91
- if (v.parent) {
92
- N.value = new ResizeObserver((e) => {
93
- for (const n of e) {
94
- const { width: l, height: a } = n.contentRect;
95
- b({ width: l, height: a });
96
- }
97
- }), N.value.observe(v.parent);
98
- const { width: o, height: t } = v.parent.getBoundingClientRect();
99
- b({ width: o, height: t });
100
- }
101
- });
102
- }), te(() => {
103
- N.value && N.value.disconnect();
104
- }), q(
105
- () => v.parent,
106
- (o) => {
107
- if (!o) return;
108
- const { width: t, height: e } = v.parent.getBoundingClientRect();
109
- b({ width: t, height: e });
110
- },
111
- { immediate: !0 }
112
- );
113
- const M = p(!1), B = p(""), X = p(null);
114
- function _(o) {
115
- if (!X.value) return;
116
- M.value = !0;
117
- const { x: t, y: e } = U(o);
118
- B.value = `M ${t} ${e}`;
119
- }
120
- function E(o) {
121
- if (!M.value || !X.value) return;
122
- const { x: t, y: e } = U(o);
123
- B.value += ` ${t} ${e}`;
124
- }
125
- function V(o) {
126
- const t = o.trim().split(/\s+/);
127
- if (t.length < 4)
128
- return o;
129
- const e = t.slice(1).map(Number);
130
- if (e.length % 2 !== 0)
131
- return o;
132
- const n = H(e), l = [`M ${n[0]} ${n[1]}`];
133
- for (let c = 2; c < n.length - 2; c += 2) {
134
- const h = n[c - 2], g = n[c - 1], i = n[c], d = n[c + 1], S = (h + i) / 2, T = (g + d) / 2;
135
- l.push(`Q ${h} ${g} ${S} ${T}`);
136
- }
137
- const a = n[n.length - 2], s = n[n.length - 1];
138
- return l.push(`L ${a} ${s}`), l.join(" ");
139
- }
140
- function H(o, t = 1) {
141
- const e = [...o];
142
- for (let n = 2; n < o.length - 2; n += 2) {
143
- const l = o[n], a = o[n + 1], s = o[n - 2], c = o[n - 1], h = o[n + 2], g = o[n + 3];
144
- e[n] = l + t * ((s + h) / 2 - l), e[n + 1] = a + t * ((c + g) / 2 - a);
145
- }
146
- return e;
147
- }
148
- function O(o) {
149
- const t = o.trim().split(/\s+/);
150
- let e = "", n = "", l = null, a = null;
151
- for (let s = 0; s < t.length; s += 1) {
152
- const c = t[s];
153
- if (isNaN(c)) {
154
- if (n = c, n === "M" || n === "L")
155
- l = parseFloat(t[++s]), a = parseFloat(t[++s]), e += `${n}${l} ${a}`;
156
- else if (n === "Q") {
157
- const h = parseFloat(t[++s]), g = parseFloat(t[++s]), i = parseFloat(t[++s]), d = parseFloat(t[++s]);
158
- h === l && g === a ? e += `t${i - l} ${d - a}` : e += `q${h - l} ${g - a} ${i - l} ${d - a}`, l = i, a = d;
159
- }
160
- } else {
161
- const h = parseFloat(c), g = parseFloat(t[++s]);
162
- if (n === "L") {
163
- const i = h - l, d = g - a;
164
- i === 0 ? e += `v${d}` : d === 0 ? e += `h${i}` : e += `l${i} ${d}`, l = h, a = g;
165
- } else if (n === "Q") {
166
- const i = h, d = g, S = parseFloat(t[++s]), T = parseFloat(t[++s]);
167
- i === l && d === a ? e += `t${S - l} ${T - a}` : e += `q${i - l} ${d - a} ${S - l} ${T - a}`, l = S, a = T;
168
- }
169
- }
170
- }
171
- return e;
172
- }
173
- function D() {
174
- M.value && (f.value.push({
175
- strokeWidth: C.value,
176
- path: O(V(B.value)),
177
- color: x.value
178
- }), m.value = [], B.value = ""), M.value = !1;
179
- }
180
- function U(o) {
181
- if (!X.value) return { x: 0, y: 0 };
182
- const t = X.value.getBoundingClientRect();
183
- let e, n;
184
- return o.touches && o.touches.length ? (e = o.touches[0].clientX, n = o.touches[0].clientY) : (e = o.clientX, n = o.clientY), {
185
- x: e - t.left,
186
- y: n - t.top
187
- };
188
- }
189
- p(!1);
190
- function j() {
191
- if (f.value.length > 0) {
192
- const o = f.value.pop();
193
- m.value.push(o);
194
- }
195
- }
196
- function G() {
197
- if (m.value.length > 0) {
198
- const o = m.value.pop();
199
- f.value.push(o);
200
- }
201
- }
202
- function J() {
203
- f.value = [], m.value = [];
204
- }
205
- const K = p(null);
206
- return (o, t) => (k(), y(R, null, [
207
- r.active ? (k(), y("div", {
208
- key: 0,
209
- "data-html2canvas-ignore": "",
210
- class: P({
211
- "vue-ui-pen-and-paper-actions": !0,
212
- visible: r.active
213
- })
214
- }, [
215
- $("button", {
216
- class: "vue-ui-pen-and-paper-action",
217
- style: w({
218
- backgroundColor: r.backgroundColor,
219
- border: `1px solid ${u.value}`
220
- }),
221
- onClick: t[0] || (t[0] = (e) => Y("close"))
222
- }, [
223
- F(z, {
224
- name: "close",
225
- stroke: r.color
226
- }, null, 8, ["stroke"])
227
- ], 4),
228
- $("button", ve, [
229
- F(pe, {
230
- value: x.value,
231
- "onUpdate:value": t[1] || (t[1] = (e) => x.value = e)
232
- }, null, 8, ["value"])
233
- ]),
234
- $("button", {
235
- class: P({
236
- "vue-ui-pen-and-paper-action": !0,
237
- "vue-ui-pen-and-paper-action-disabled": !f.value.length
238
- }),
239
- disabled: !f.value.length,
240
- style: w({
241
- backgroundColor: r.backgroundColor,
242
- border: `1px solid ${u.value}`
243
- }),
244
- onClick: j
245
- }, [
246
- F(z, {
247
- name: "restart",
248
- stroke: r.color
249
- }, null, 8, ["stroke"])
250
- ], 14, fe),
251
- $("button", {
252
- class: P({
253
- "vue-ui-pen-and-paper-action": !0,
254
- "vue-ui-pen-and-paper-action-disabled": !m.value.length
255
- }),
256
- style: w({
257
- backgroundColor: r.backgroundColor,
258
- border: `1px solid ${u.value}`
259
- }),
260
- onClick: G
261
- }, [
262
- F(z, {
263
- name: "restart",
264
- stroke: r.color,
265
- style: { transform: "scaleX(-1)" }
266
- }, null, 8, ["stroke"])
267
- ], 6),
268
- $("button", {
269
- class: P([{
270
- "vue-ui-pen-and-paper-action": !0,
271
- "vue-ui-pen-and-paper-action-disabled": !f.value.length
272
- }, "vue-ui-pen-and-paper-action"]),
273
- style: w({
274
- backgroundColor: r.backgroundColor,
275
- border: `1px solid ${u.value}`
276
- }),
277
- onClick: J
278
- }, [
279
- F(z, {
280
- name: "trash",
281
- stroke: r.color
282
- }, null, 8, ["stroke"])
283
- ], 6),
284
- oe($("input", {
285
- ref_key: "range",
286
- ref: K,
287
- type: "range",
288
- class: "vertical-range",
289
- min: 0.5,
290
- max: 12,
291
- step: 0.1,
292
- "onUpdate:modelValue": t[2] || (t[2] = (e) => C.value = e),
293
- style: w({
294
- accentColor: r.color
295
- })
296
- }, null, 4), [
297
- [ne, C.value]
298
- ])
299
- ], 2)) : W("", !0),
300
- (k(), y("svg", {
301
- ref_key: "svgElement",
302
- ref: X,
303
- xmlns: le(ue),
304
- viewBox: L.value,
305
- class: P({
306
- "vue-ui-pen-and-paper": !0,
307
- inactive: !r.active
308
- }),
309
- onMousedown: _,
310
- onMousemove: E,
311
- onMouseup: D,
312
- onMouseleave: D,
313
- onTouchstart: Q(_, ["prevent"]),
314
- onTouchmove: Q(E, ["prevent"]),
315
- onTouchend: D
316
- }, [
317
- (k(!0), y(R, null, ae(f.value, (e) => (k(), y(R, { key: e }, [
318
- e.path.replace("M", "").split(" ").length === 2 ? (k(), y("circle", {
319
- key: 0,
320
- cx: e.path.replace("M", "").split(" ")[0],
321
- cy: e.path.replace("M", "").split(" ")[1],
322
- r: e.strokeWidth / 2,
323
- fill: e.color
324
- }, null, 8, ge)) : (k(), y("path", {
325
- key: 1,
326
- class: "vue-ui-pen-and-paper-path",
327
- d: e.path,
328
- stroke: e.color,
329
- "stroke-width": e.strokeWidth,
330
- fill: "none"
331
- }, null, 8, me))
332
- ], 64))), 128)),
333
- M.value ? (k(), y("path", {
334
- key: 0,
335
- class: "vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",
336
- d: V(B.value),
337
- stroke: x.value,
338
- "stroke-width": C.value * 1.1,
339
- fill: "none"
340
- }, null, 8, ke)) : W("", !0)
341
- ], 42, he))
342
- ], 64));
343
- }
344
- }, we = /* @__PURE__ */ A(ye, [["__scopeId", "data-v-a868f599"]]);
345
- export {
346
- we as P
347
- };