vue-data-ui 3.0.0-next.57 → 3.0.0-next.58

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 (93) hide show
  1. package/dist/{Arrow-D6qi05Xe.js → Arrow-BdebCogi.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CQyUv5Af.js → BaseDraggableDialog-QfXlICHa.js} +2 -2
  3. package/dist/{BaseIcon-3PL8sPji.js → BaseIcon-B-Zuw4hN.js} +1 -1
  4. package/dist/{ColorPicker-VyJUgPOO.js → ColorPicker-DWCBREFx.js} +2 -2
  5. package/dist/{DataTable-B4_im8hi.js → DataTable-9RqEr3O7.js} +2 -2
  6. package/dist/{Legend-Clb_m4Rb.js → Legend-BqrngbHw.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-D3B8A264.js → NonSvgPenAndPaper-BBs_NC2x.js} +3 -3
  8. package/dist/{PackageVersion-DibkYC-M.js → PackageVersion-Q84nLP1I.js} +1 -1
  9. package/dist/{PenAndPaper-DwEs21-8.js → PenAndPaper-DTDvVEz-.js} +3 -3
  10. package/dist/{Shape-BNM3sYvz.js → Shape-KHCRkkSS.js} +1 -1
  11. package/dist/{Slicer-CxfK8Ooe.js → Slicer-CUaK2ypg.js} +2 -2
  12. package/dist/{SparkTooltip-Cz6oxVUe.js → SparkTooltip-D721EASE.js} +1 -1
  13. package/dist/{Title-9W8vYOTf.js → Title-ENZfmjfM.js} +1 -1
  14. package/dist/{Tooltip-BsvF9Fzt.js → Tooltip-CsLS8Tc8.js} +1 -1
  15. package/dist/{UserOptions-BsuG6h2S.js → UserOptions-GxEENfvl.js} +2 -2
  16. package/dist/{dom-to-png-CHstuqXx.js → dom-to-png-LQVV7IWB.js} +1 -1
  17. package/dist/{img-C2UO2LmT.js → img-CJNBD126.js} +1 -1
  18. package/dist/{index-Dyu8fp8E.js → index-BshAuNuP.js} +16 -2
  19. package/dist/{pdf-D-6h1v42.js → pdf-BF0iuIbz.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +8 -0
  22. package/dist/types/vue-data-ui.d.ts +8 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-Bwp5Va3D.js → useAutoSizeLabelsInsideViewbox-B7H3AMHf.js} +1 -1
  24. package/dist/{useNestedProp-DQ1VA96r.js → useNestedProp-BbGfeZ8E.js} +1 -1
  25. package/dist/usePanZoom-BVca3eMk.js +122 -0
  26. package/dist/{usePrinter-BXgpLrO7.js → usePrinter-CQBNBSp8.js} +2 -2
  27. package/dist/{vue-data-ui-BcGZE1NF.js → vue-data-ui-DGoTdDDK.js} +105 -100
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/{vue-ui-3d-bar-DBV9xXzw.js → vue-ui-3d-bar-DJfeL_-3.js} +6 -6
  30. package/dist/{vue-ui-accordion-CYSqT9wk.js → vue-ui-accordion-DmrWcofh.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-Bt_VI_8S.js → vue-ui-age-pyramid-BODmxkHt.js} +6 -6
  32. package/dist/{vue-ui-annotator-CGxQiP9g.js → vue-ui-annotator-Dhfc8JyT.js} +2 -2
  33. package/dist/{vue-ui-bullet-CCuyAayk.js → vue-ui-bullet-Ca3euWoC.js} +7 -7
  34. package/dist/{vue-ui-candlestick-CP-aj92I.js → vue-ui-candlestick-t7vzD0Bo.js} +7 -7
  35. package/dist/{vue-ui-carousel-table-Ex0jv_6m.js → vue-ui-carousel-table-CBLL1-2k.js} +4 -4
  36. package/dist/{vue-ui-chestnut-CaZecahE.js → vue-ui-chestnut-Cx4bOdLO.js} +5 -5
  37. package/dist/{vue-ui-chord-iGGuwS7b.js → vue-ui-chord-CReroqMA.js} +8 -8
  38. package/dist/{vue-ui-circle-pack-BgV0RWhP.js → vue-ui-circle-pack-B8xZmTcm.js} +6 -6
  39. package/dist/{vue-ui-cursor-xOs-TnqL.js → vue-ui-cursor-DJ8_qBBD.js} +2 -2
  40. package/dist/{vue-ui-dashboard-DzcY4hbK.js → vue-ui-dashboard-bsvwPzpW.js} +62 -62
  41. package/dist/{vue-ui-digits-B80NHDW4.js → vue-ui-digits-BZfnD3ez.js} +2 -2
  42. package/dist/{vue-ui-donut-kET9X3KC.js → vue-ui-donut-Be20FP2o.js} +8 -8
  43. package/dist/{vue-ui-donut-evolution-NAhqQJBq.js → vue-ui-donut-evolution-C9trFeUZ.js} +8 -8
  44. package/dist/{vue-ui-dumbbell-BOUbsZjz.js → vue-ui-dumbbell-Cd-3lAW2.js} +7 -7
  45. package/dist/{vue-ui-flow-CVqTTlL7.js → vue-ui-flow-BEjXZezX.js} +7 -7
  46. package/dist/{vue-ui-funnel-JWgW9aXa.js → vue-ui-funnel-BdmG7svM.js} +6 -6
  47. package/dist/{vue-ui-galaxy-CNTGks21.js → vue-ui-galaxy-CZUbavYa.js} +5 -5
  48. package/dist/{vue-ui-gauge-DfEfHCii.js → vue-ui-gauge-C8uIlUO6.js} +7 -7
  49. package/dist/{vue-ui-gizmo-B2gTveWE.js → vue-ui-gizmo-BIdvqPj0.js} +3 -3
  50. package/dist/{vue-ui-heatmap-CSPCmw07.js → vue-ui-heatmap-LOmwdZli.js} +7 -7
  51. package/dist/{vue-ui-history-plot-BJCl3rcg.js → vue-ui-history-plot-BsXbkJKP.js} +7 -7
  52. package/dist/{vue-ui-kpi-BKYRlE0D.js → vue-ui-kpi-CMh4W-9S.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-BWURIXU2.js → vue-ui-mini-loader-D4iGH9_v.js} +2 -2
  54. package/dist/{vue-ui-molecule-DvtojfS8.js → vue-ui-molecule-Re28mKit.js} +6 -6
  55. package/dist/{vue-ui-mood-radar-kRYl1mlL.js → vue-ui-mood-radar-DYRGx5Rl.js} +7 -7
  56. package/dist/{vue-ui-nested-donuts-BfQYcOge.js → vue-ui-nested-donuts-DbUZlrBg.js} +9 -9
  57. package/dist/{vue-ui-onion-aLDBwsee.js → vue-ui-onion-DmIJphbZ.js} +8 -8
  58. package/dist/{vue-ui-parallel-coordinate-plot-D0fVIT8m.js → vue-ui-parallel-coordinate-plot-ChF6ulPo.js} +8 -8
  59. package/dist/{vue-ui-quadrant-CKrLowD8.js → vue-ui-quadrant-CIAG3pKZ.js} +8 -8
  60. package/dist/{vue-ui-quick-chart-76IrbNQV.js → vue-ui-quick-chart-Bka9tPEx.js} +6 -6
  61. package/dist/{vue-ui-radar-DHrkAutJ.js → vue-ui-radar-BNYr-0Me.js} +7 -7
  62. package/dist/{vue-ui-rating-DWBdOyTl.js → vue-ui-rating-BNUL56t4.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-CjZzfe3p.js → vue-ui-relation-circle-DOYkBvSY.js} +6 -6
  64. package/dist/{vue-ui-ridgeline-BkbB0t3y.js → vue-ui-ridgeline-DEn1oudN.js} +8 -8
  65. package/dist/{vue-ui-rings-B8TYCohi.js → vue-ui-rings-CSNmlblD.js} +8 -8
  66. package/dist/{vue-ui-scatter-DxqxLSoK.js → vue-ui-scatter-CVKhR03G.js} +8 -8
  67. package/dist/{vue-ui-skeleton-D0jRJnYr.js → vue-ui-skeleton-C-F_6Vl8.js} +3 -3
  68. package/dist/{vue-ui-smiley-5WAirs-Y.js → vue-ui-smiley-9uchQGm-.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-B0iaLZgG.js → vue-ui-spark-trend-CB3DO3a4.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-CGPhKrdn.js → vue-ui-sparkbar-C2R03dNB.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-BrmviQdq.js → vue-ui-sparkgauge-BtW6-sLc.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-mQcXsCgr.js → vue-ui-sparkhistogram-CW0N9NcQ.js} +4 -4
  73. package/dist/{vue-ui-sparkline-i5YBzZm-.js → vue-ui-sparkline-Cz8tNNX5.js} +3 -3
  74. package/dist/{vue-ui-sparkstackbar-Dfziml1d.js → vue-ui-sparkstackbar-CnmBJnbX.js} +3 -3
  75. package/dist/{vue-ui-stackbar-DNXJScbf.js → vue-ui-stackbar-qIRqTunP.js} +9 -9
  76. package/dist/{vue-ui-strip-plot-Bdenoo21.js → vue-ui-strip-plot-mmGIF-Kt.js} +7 -7
  77. package/dist/{vue-ui-table-BmsE_-AB.js → vue-ui-table-C1ftm37c.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-TMZpd9nw.js → vue-ui-table-heatmap-0AkmMtph.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-DDP0Zqh6.js → vue-ui-table-sparkline-53LdwwOX.js} +4 -4
  80. package/dist/{vue-ui-thermometer-BI5VkftQ.js → vue-ui-thermometer-cpmry95L.js} +7 -7
  81. package/dist/{vue-ui-timer-NptMB21z.js → vue-ui-timer-BkPmheSp.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-BV7fbbN4.js → vue-ui-tiremarks-0Td6rFSB.js} +6 -6
  83. package/dist/{vue-ui-treemap-UPMVTEwz.js → vue-ui-treemap-ClL19tZl.js} +8 -8
  84. package/dist/{vue-ui-vertical-bar-Cxx8GGKW.js → vue-ui-vertical-bar-Yigs8iR9.js} +9 -9
  85. package/dist/{vue-ui-waffle-CUbeYnnT.js → vue-ui-waffle-CLbJ0gNv.js} +8 -8
  86. package/dist/{vue-ui-wheel-D8FqSx-P.js → vue-ui-wheel-Ddr9_dsz.js} +6 -6
  87. package/dist/vue-ui-word-cloud-BnYr9XJt.js +765 -0
  88. package/dist/{vue-ui-world-Daog4Afo.js → vue-ui-world-D5iO6V_L.js} +6 -6
  89. package/dist/{vue-ui-xy-SradgwzX.js → vue-ui-xy-ByTY6gwo.js} +9 -9
  90. package/dist/{vue-ui-xy-canvas-BPIlcbK3.js → vue-ui-xy-canvas-B_VipV62.js} +8 -8
  91. package/package.json +1 -1
  92. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  93. package/dist/vue-ui-word-cloud-dGsJ8VGE.js +0 -661
@@ -1,16 +1,16 @@
1
1
  import { useCssVars as Ja, computed as y, ref as p, onMounted as Lt, onBeforeUnmount as nt, watch as sl, nextTick as Zl, onUpdated as Ka, createElementBlock as s, openBlock as u, createElementVNode as m, createCommentVNode as h, renderSlot as K, normalizeStyle as $, createVNode as Ul, withDirectives as Bt, unref as v, Fragment as f, renderList as L, normalizeClass as Re, vModelText as ba, toDisplayString as ae, defineAsyncComponent as yl, useSlots as Qa, getCurrentInstance as ja, toRefs as eo, watchEffect as lo, createBlock as Ke, createSlots as to, withCtx as pe, normalizeProps as vl, guardReactiveProps as kl, mergeProps as kt, vModelCheckbox as ao, createTextVNode as oo } from "vue";
2
- import { c as _t, V as Mt, U as At, X as uo, F as je, u as io, f as Vt, t as so, a5 as ul, d as no, D as st, ad as Nl, e as ro, p as co, ae as wt, aa as Y, af as vo, h as V, ag as pa, ah as ya, ai as ho, aj as ka, ak as wa, k as we, y as fo, z as go, _ as Sa, R as il, i as De, x as Rl, s as Qe, a8 as ee, L as mo, al as St, I as xo, am as wl, C as Xe, a as bo, b as po, o as $a, v as yo, w as ko, E as Gl } from "./index-Dyu8fp8E.js";
2
+ import { c as _t, V as Mt, U as At, X as uo, F as je, u as io, f as Vt, t as so, a5 as ul, d as no, D as st, ad as Nl, e as ro, p as co, ae as wt, aa as Y, af as vo, h as V, ag as pa, ah as ya, ai as ho, aj as ka, ak as wa, k as we, y as fo, z as go, _ as Sa, R as il, i as De, x as Rl, s as Qe, a8 as ee, L as mo, al as St, I as xo, am as wl, C as Xe, a as bo, b as po, o as $a, v as yo, w as ko, E as Gl } from "./index-BshAuNuP.js";
3
3
  import { t as Ft, u as wo } from "./useResponsive-DfdjqQps.js";
4
- import { u as So } from "./usePrinter-BXgpLrO7.js";
4
+ import { u as So } from "./usePrinter-CQBNBSp8.js";
5
5
  import { u as $o, B as _o } from "./useLoading-Bt5Doa8m.js";
6
- import { u as Et } from "./useNestedProp-DQ1VA96r.js";
6
+ import { u as Et } from "./useNestedProp-BbGfeZ8E.js";
7
7
  import { u as _a } from "./useTimeLabels-DkzmKfZn.js";
8
8
  import { u as Lo } from "./useTimeLabelCollider-CIsgDrl9.js";
9
- import Mo from "./img-C2UO2LmT.js";
10
- import Ao from "./Title-9W8vYOTf.js";
11
- import { S as Co } from "./Slicer-CxfK8Ooe.js";
12
- import { _ as $t } from "./Shape-BNM3sYvz.js";
13
- import zo from "./BaseIcon-3PL8sPji.js";
9
+ import Mo from "./img-CJNBD126.js";
10
+ import Ao from "./Title-ENZfmjfM.js";
11
+ import { S as Co } from "./Slicer-CUaK2ypg.js";
12
+ import { _ as $t } from "./Shape-KHCRkkSS.js";
13
+ import zo from "./BaseIcon-B-Zuw4hN.js";
14
14
  import { _ as La } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
15
  const To = {
16
16
  class: "vue-data-ui-slicer-labels",
@@ -709,7 +709,7 @@ const To = {
709
709
  },
710
710
  emits: ["selectTimeLabel", "selectX", "selectLegend"],
711
711
  setup(C, { expose: Ct, emit: zt }) {
712
- const d = C, Pe = yl(() => import("./DataTable-B4_im8hi.js")), ie = yl(() => import("./Tooltip-BsvF9Fzt.js")), re = yl(() => import("./UserOptions-BsuG6h2S.js")), Sl = yl(() => import("./BaseIcon-3PL8sPji.js")), ql = yl(() => import("./vue-ui-table-sparkline-DDP0Zqh6.js")), Pl = yl(() => import("./vue-ui-accordion-CYSqT9wk.js")), $l = yl(() => import("./PackageVersion-DibkYC-M.js")), _l = yl(() => import("./PenAndPaper-DwEs21-8.js")), dl = zt, Jl = Qa(), Kl = ja(), { vue_ui_xy: Ql } = io(), fe = p(null), ye = p(null), ze = p(null), el = p(null), Ll = p(null), Ml = p(null), Tt = p(null), He = p(null), Hl = p(null), nl = p(null), Al = p(null), D = p(null), ll = p(null), ge = p(0), M = p(null), Ve = p(!0), se = p(600), ne = p(1e3), Vl = p("0 0 1000 600"), Cl = p({ x: 0, y: 0 }), Ge = p({ line: "line", bar: "bar", plot: "plot" }), hl = p(!1), rl = p(!1), El = p(!1), Te = p(null), oe = p([]), Q = p(_t()), rt = p(0), ct = p(0), jl = p(0), Me = p(!0), Ee = p(0), O = p(null), Ue = p(!1), Bl = p(!0), Fl = p(!0), Se = p(null), Be = p({}), Wl = p(null), S = p(null), vt = y(() => ({
712
+ const d = C, Pe = yl(() => import("./DataTable-9RqEr3O7.js")), ie = yl(() => import("./Tooltip-CsLS8Tc8.js")), re = yl(() => import("./UserOptions-GxEENfvl.js")), Sl = yl(() => import("./BaseIcon-B-Zuw4hN.js")), ql = yl(() => import("./vue-ui-table-sparkline-53LdwwOX.js")), Pl = yl(() => import("./vue-ui-accordion-DmrWcofh.js")), $l = yl(() => import("./PackageVersion-Q84nLP1I.js")), _l = yl(() => import("./PenAndPaper-DTDvVEz-.js")), dl = zt, Jl = Qa(), Kl = ja(), { vue_ui_xy: Ql } = io(), fe = p(null), ye = p(null), ze = p(null), el = p(null), Ll = p(null), Ml = p(null), Tt = p(null), He = p(null), Hl = p(null), nl = p(null), Al = p(null), D = p(null), ll = p(null), ge = p(0), M = p(null), Ve = p(!0), se = p(600), ne = p(1e3), Vl = p("0 0 1000 600"), Cl = p({ x: 0, y: 0 }), Ge = p({ line: "line", bar: "bar", plot: "plot" }), hl = p(!1), rl = p(!1), El = p(!1), Te = p(null), oe = p([]), Q = p(_t()), rt = p(0), ct = p(0), jl = p(0), Me = p(!0), Ee = p(0), O = p(null), Ue = p(!1), Bl = p(!0), Fl = p(!0), Se = p(null), Be = p({}), Wl = p(null), S = p(null), vt = y(() => ({
713
713
  height: se.value,
714
714
  width: ne.value
715
715
  })), fl = d.config.downsample && d.config.downsample.threshold ? d.config.downsample.threshold : 500, b = p({
@@ -1,15 +1,15 @@
1
1
  import { defineAsyncComponent as K, ref as d, computed as L, useSlots as Va, onMounted as ua, watch as D, nextTick as sa, shallowRef as ze, onBeforeUnmount as Ga, createElementBlock as se, openBlock as S, unref as p, normalizeClass as Za, normalizeStyle as Q, createCommentVNode as X, createBlock as N, createElementVNode as ne, createSlots as ja, withCtx as x, renderSlot as k, normalizeProps as B, guardReactiveProps as _, createVNode as qa, toDisplayString as na, createTextVNode as Ja } from "vue";
2
- import { u as Ka, c as Qa, a as el, p as V, b as al, C as ge, d as ll, D as $e, k as ee, i as ae, e as ia, a5 as tl, G as ol, af as rl, o as ul, f as sl, y as va, v as nl, w as il, z as vl, s as ie, l as cl } from "./index-Dyu8fp8E.js";
2
+ import { u as Ka, c as Qa, a as el, p as V, b as al, C as ge, d as ll, D as $e, k as ee, i as ae, e as ia, a5 as tl, G as ol, af as rl, o as ul, f as sl, y as va, v as nl, w as il, z as vl, s as ie, l as cl } from "./index-BshAuNuP.js";
3
3
  import { d as dl, t as hl, u as yl, c as fl, a as ca, l as C, r as Ie, b as R, p as da } from "./useResponsive-DfdjqQps.js";
4
- import { u as ha } from "./useNestedProp-DQ1VA96r.js";
5
- import { u as gl } from "./usePrinter-BXgpLrO7.js";
4
+ import { u as ha } from "./useNestedProp-BbGfeZ8E.js";
5
+ import { u as gl } from "./usePrinter-CQBNBSp8.js";
6
6
  import { u as pl } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { u as ml } from "./useChartAccessibility-9icAAmYg.js";
8
- import bl from "./Legend-Clb_m4Rb.js";
9
- import xl from "./Title-9W8vYOTf.js";
10
- import { S as Ll } from "./Slicer-CxfK8Ooe.js";
8
+ import bl from "./Legend-BqrngbHw.js";
9
+ import xl from "./Title-ENZfmjfM.js";
10
+ import { S as Ll } from "./Slicer-CUaK2ypg.js";
11
11
  import { u as kl } from "./useTimeLabels-DkzmKfZn.js";
12
- import Cl from "./img-C2UO2LmT.js";
12
+ import Cl from "./img-CJNBD126.js";
13
13
  import { _ as wl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const Sl = ["id"], zl = ["onClick"], $l = {
15
15
  key: 2,
@@ -32,7 +32,7 @@ const Sl = ["id"], zl = ["onClick"], $l = {
32
32
  },
33
33
  emits: ["selectLegend"],
34
34
  setup(Me, { expose: ya, emit: fa }) {
35
- const ga = K(() => import("./vue-ui-accordion-CYSqT9wk.js")), pa = K(() => import("./DataTable-B4_im8hi.js")), ma = K(() => import("./NonSvgPenAndPaper-D3B8A264.js")), ba = K(() => import("./vue-ui-skeleton-D0jRJnYr.js")), xa = K(() => import("./Tooltip-BsvF9Fzt.js")), La = K(() => import("./UserOptions-BsuG6h2S.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
35
+ const ga = K(() => import("./vue-ui-accordion-DmrWcofh.js")), pa = K(() => import("./DataTable-9RqEr3O7.js")), ma = K(() => import("./NonSvgPenAndPaper-BBs_NC2x.js")), ba = K(() => import("./vue-ui-skeleton-C-F_6Vl8.js")), xa = K(() => import("./Tooltip-CsLS8Tc8.js")), La = K(() => import("./UserOptions-GxEENfvl.js")), { vue_ui_xy_canvas: ka } = Ka(), g = Me, pe = d(Qa()), P = d(null), le = d(null), n = d(null), y = d(1), F = d(1), ve = d(!1), c = d(null), ce = d(""), Te = d(null), $ = d([]), G = d(1), H = d(!0), Z = d(!0), me = d(null), Oe = d(0), Re = d(0), de = d(!1), Pe = d(null), Fe = d(null), Ee = d(null), Ae = d(null), be = d(0), xe = d(0), Le = d(0), M = d(null), ke = L(() => !!g.dataset && g.dataset.length), Ca = fa, wa = Va();
36
36
  ua(() => {
37
37
  wa["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
38
38
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.0.0-next.57",
4
+ "version": "3.0.0-next.58",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1,115 +0,0 @@
1
- import { ref as h, computed as O, onMounted as Q, onUnmounted as U, watchEffect as W } from "vue";
2
- function J(f, s = { x: 0, y: 0, width: 100, height: 100 }, q = 1, z) {
3
- const o = h({ ...s }), l = h(1), E = h(!1), y = h({ x: 0, y: 0 }), x = h(0), D = h(null), L = h(!1), k = O(() => o.value.x !== s.x || o.value.y !== s.y || o.value.width !== s.width || o.value.height !== s.height);
4
- let v = { x: 0, y: 0 }, F = null, g = null;
5
- function M(e) {
6
- if (e.length < 2) return 0;
7
- const t = e[0].clientX - e[1].clientX, n = e[0].clientY - e[1].clientY;
8
- return Math.sqrt(t * t + n * n);
9
- }
10
- function d(e) {
11
- const t = f.value;
12
- if (!t) return { x: 0, y: 0 };
13
- const n = t.createSVGPoint();
14
- n.x = e.clientX, n.y = e.clientY;
15
- const a = t.getScreenCTM()?.inverse();
16
- return a ? n.matrixTransform(a) : { x: 0, y: 0 };
17
- }
18
- function P(e) {
19
- E.value = !0;
20
- const t = d(e.touches ? e.touches[0] : e);
21
- y.value = { x: t.x, y: t.y }, v = { x: 0, y: 0 };
22
- }
23
- function S(e) {
24
- if (!E.value) return;
25
- const t = d(e.touches ? e.touches[0] : e);
26
- let n = t.x - y.value.x, a = t.y - y.value.y;
27
- Math.abs(n) < 0.3 && Math.abs(a) < 0.3 || (v.x = n * 0.8 + v.x * 0.2, v.y = a * 0.8 + v.y * 0.2, y.value = t, F || (F = requestAnimationFrame(C)));
28
- }
29
- function C() {
30
- o.value.x -= v.x, o.value.y -= v.y, F = null;
31
- }
32
- function m() {
33
- E.value = !1;
34
- }
35
- function G(e = !1) {
36
- if (!e) {
37
- o.value = { ...s }, l.value = 1;
38
- return;
39
- }
40
- const t = { ...o.value }, n = l.value, a = 300;
41
- let u = null;
42
- function r(i) {
43
- u || (u = i);
44
- const c = Math.min((i - u) / a, 1);
45
- o.value = {
46
- x: t.x + (s.x - t.x) * c,
47
- y: t.y + (s.y - t.y) * c,
48
- width: t.width + (s.width - t.width) * c,
49
- height: t.height + (s.height - t.height) * c
50
- }, l.value = n + (1 - n) * c, c < 1 ? requestAnimationFrame(r) : (o.value = { ...s }, l.value = 1);
51
- }
52
- requestAnimationFrame(r);
53
- }
54
- function X(e) {
55
- e.preventDefault();
56
- const t = e.deltaY > 0 ? 0.9 : 1.1;
57
- w(t, d(e));
58
- }
59
- function A(e) {
60
- e.preventDefault();
61
- const t = d(e), n = 1.02 * (1 + q / 100);
62
- H(n, t);
63
- }
64
- function H(e, t) {
65
- g && cancelAnimationFrame(g);
66
- let n = l.value, a = n * e, u = 0;
67
- const r = () => {
68
- u += 0.02;
69
- let i = n + (a - n) * I(u);
70
- if (u >= 1) {
71
- l.value = a, g = null;
72
- return;
73
- }
74
- w(i / n, t), g = requestAnimationFrame(r);
75
- };
76
- r();
77
- }
78
- const I = (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e;
79
- function w(e, t) {
80
- const n = l.value * e, a = n / l.value, u = o.value.width / a, r = o.value.height / a, i = (t.x - o.value.x) * (1 - 1 / a), c = (t.y - o.value.y) * (1 - 1 / a);
81
- o.value.x += i, o.value.y += c, o.value.width = u, o.value.height = r, l.value = n;
82
- }
83
- function T(e) {
84
- e.touches.length === 2 ? (L.value = !0, x.value = M(e.touches), D.value = { ...o.value }) : (e.preventDefault(), P(e));
85
- }
86
- function Z(e) {
87
- if (L.value && e.touches.length === 2) {
88
- e.preventDefault();
89
- const t = M(e.touches);
90
- if (x.value) {
91
- const n = t / x.value, u = f.value.getBoundingClientRect(), r = (e.touches[0].clientX + e.touches[1].clientX) / 2 - u.left, i = (e.touches[0].clientY + e.touches[1].clientY) / 2 - u.top, c = d({ clientX: r + u.left, clientY: i + u.top });
92
- o.value = { ...D.value }, w(n, c);
93
- }
94
- } else
95
- e.preventDefault(), S(e);
96
- }
97
- function p(e) {
98
- e.touches.length < 2 && (L.value = !1), m();
99
- }
100
- Q(b), U(Y);
101
- function b() {
102
- const e = f.value;
103
- e && (e.addEventListener("mousedown", P), e.addEventListener("mousemove", S), e.addEventListener("mouseup", m), e.addEventListener("mouseleave", m), e.addEventListener("wheel", X, { passive: !1 }), e.addEventListener("dblclick", A), e.addEventListener("touchstart", T, { passive: !1 }), e.addEventListener("touchmove", Z, { passive: !1 }), e.addEventListener("touchend", p), e.addEventListener("touchcancel", p));
104
- }
105
- function Y() {
106
- const e = f.value;
107
- e && (e.removeEventListener("mousedown", P), e.removeEventListener("mousemove", S), e.removeEventListener("mouseup", m), e.removeEventListener("mouseleave", m), e.removeEventListener("wheel", X), e.removeEventListener("dblclick", A), e.removeEventListener("touchstart", T), e.removeEventListener("touchmove", Z), e.removeEventListener("touchend", p), e.removeEventListener("touchcancel", p));
108
- }
109
- return W(() => (z.value ? b() : Y(), () => {
110
- Y();
111
- })), { viewBox: o, resetZoom: G, isZoom: k };
112
- }
113
- export {
114
- J as u
115
- };