vue-data-ui 3.0.0-next.56 → 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.
- package/dist/{Arrow-Dr73vXkS.js → Arrow-BdebCogi.js} +1 -1
- package/dist/{BaseDraggableDialog-C94LH2gO.js → BaseDraggableDialog-QfXlICHa.js} +2 -2
- package/dist/{BaseIcon-DVj5nedZ.js → BaseIcon-B-Zuw4hN.js} +1 -1
- package/dist/{ColorPicker-BmI1B2Ie.js → ColorPicker-DWCBREFx.js} +2 -2
- package/dist/{DataTable-DIRgYyMk.js → DataTable-9RqEr3O7.js} +2 -2
- package/dist/{Legend-Bm0VbPfX.js → Legend-BqrngbHw.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B9qj2h1N.js → NonSvgPenAndPaper-BBs_NC2x.js} +3 -3
- package/dist/{PackageVersion-CmrjjMGu.js → PackageVersion-Q84nLP1I.js} +1 -1
- package/dist/{PenAndPaper-CkxcaljP.js → PenAndPaper-DTDvVEz-.js} +3 -3
- package/dist/{Shape-PFacVGG6.js → Shape-KHCRkkSS.js} +1 -1
- package/dist/{Slicer-OzSjPeeA.js → Slicer-CUaK2ypg.js} +2 -2
- package/dist/{SparkTooltip-B5KxrXfj.js → SparkTooltip-D721EASE.js} +1 -1
- package/dist/{Title-CPlHadE3.js → Title-ENZfmjfM.js} +1 -1
- package/dist/{Tooltip-DfLg6pdN.js → Tooltip-CsLS8Tc8.js} +1 -1
- package/dist/{UserOptions-Cvao0wOJ.js → UserOptions-GxEENfvl.js} +2 -2
- package/dist/{dom-to-png-D_YDAEr8.js → dom-to-png-LQVV7IWB.js} +1 -1
- package/dist/{img-BUkzDAPW.js → img-CJNBD126.js} +1 -1
- package/dist/{index-bTtbNszd.js → index-BshAuNuP.js} +16 -2
- package/dist/{pdf-DH7vaP6J.js → pdf-BF0iuIbz.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +8 -0
- package/dist/types/vue-data-ui.d.ts +8 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-D78glQ57.js → useAutoSizeLabelsInsideViewbox-B7H3AMHf.js} +1 -1
- package/dist/{useNestedProp-CYma7CyA.js → useNestedProp-BbGfeZ8E.js} +1 -1
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-Byfy8pVl.js → usePrinter-CQBNBSp8.js} +2 -2
- package/dist/{vue-data-ui-BA5aCP0F.js → vue-data-ui-DGoTdDDK.js} +105 -100
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-D8ONqED5.js → vue-ui-3d-bar-DJfeL_-3.js} +6 -6
- package/dist/{vue-ui-accordion-CwsNjkyh.js → vue-ui-accordion-DmrWcofh.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DZ6AvPgA.js → vue-ui-age-pyramid-BODmxkHt.js} +6 -6
- package/dist/{vue-ui-annotator-BUUPzhqT.js → vue-ui-annotator-Dhfc8JyT.js} +2 -2
- package/dist/{vue-ui-bullet-DJ5o_J5c.js → vue-ui-bullet-Ca3euWoC.js} +7 -7
- package/dist/{vue-ui-candlestick-DTOpUEUO.js → vue-ui-candlestick-t7vzD0Bo.js} +7 -7
- package/dist/{vue-ui-carousel-table-D9h_e75T.js → vue-ui-carousel-table-CBLL1-2k.js} +4 -4
- package/dist/{vue-ui-chestnut-T3gxdFRJ.js → vue-ui-chestnut-Cx4bOdLO.js} +5 -5
- package/dist/{vue-ui-chord-BXgJkrMP.js → vue-ui-chord-CReroqMA.js} +8 -8
- package/dist/{vue-ui-circle-pack-CeDwV2pm.js → vue-ui-circle-pack-B8xZmTcm.js} +6 -6
- package/dist/{vue-ui-cursor-5EQyN1HC.js → vue-ui-cursor-DJ8_qBBD.js} +2 -2
- package/dist/{vue-ui-dashboard-CRy1Qs01.js → vue-ui-dashboard-bsvwPzpW.js} +62 -62
- package/dist/{vue-ui-digits-wfErkCJ_.js → vue-ui-digits-BZfnD3ez.js} +2 -2
- package/dist/{vue-ui-donut-fMNTVnoQ.js → vue-ui-donut-Be20FP2o.js} +8 -8
- package/dist/{vue-ui-donut-evolution-57R6hLc8.js → vue-ui-donut-evolution-C9trFeUZ.js} +8 -8
- package/dist/{vue-ui-dumbbell-Bb9EWdAh.js → vue-ui-dumbbell-Cd-3lAW2.js} +66 -66
- package/dist/{vue-ui-flow-ZTN_1mhN.js → vue-ui-flow-BEjXZezX.js} +7 -7
- package/dist/{vue-ui-funnel-nrLWJgh7.js → vue-ui-funnel-BdmG7svM.js} +6 -6
- package/dist/{vue-ui-galaxy-DqJRsXpE.js → vue-ui-galaxy-CZUbavYa.js} +5 -5
- package/dist/{vue-ui-gauge-DHpR-E7B.js → vue-ui-gauge-C8uIlUO6.js} +7 -7
- package/dist/{vue-ui-gizmo-6QmhvBHc.js → vue-ui-gizmo-BIdvqPj0.js} +3 -3
- package/dist/{vue-ui-heatmap-DBCm73qw.js → vue-ui-heatmap-LOmwdZli.js} +7 -7
- package/dist/{vue-ui-history-plot-qan_4GRJ.js → vue-ui-history-plot-BsXbkJKP.js} +7 -7
- package/dist/{vue-ui-kpi-B-SrOVSP.js → vue-ui-kpi-CMh4W-9S.js} +3 -3
- package/dist/{vue-ui-mini-loader-C4x-pTjm.js → vue-ui-mini-loader-D4iGH9_v.js} +2 -2
- package/dist/{vue-ui-molecule-DEd1uTxl.js → vue-ui-molecule-Re28mKit.js} +6 -6
- package/dist/{vue-ui-mood-radar-CwoHDmS7.js → vue-ui-mood-radar-DYRGx5Rl.js} +7 -7
- package/dist/{vue-ui-nested-donuts-DbFA4Z1s.js → vue-ui-nested-donuts-DbUZlrBg.js} +9 -9
- package/dist/{vue-ui-onion-CG_mZFym.js → vue-ui-onion-DmIJphbZ.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-jU6R5FJX.js → vue-ui-parallel-coordinate-plot-ChF6ulPo.js} +8 -8
- package/dist/{vue-ui-quadrant-jvc98f1Q.js → vue-ui-quadrant-CIAG3pKZ.js} +8 -8
- package/dist/{vue-ui-quick-chart-CB8cnyMU.js → vue-ui-quick-chart-Bka9tPEx.js} +6 -6
- package/dist/{vue-ui-radar-Dbf8tizc.js → vue-ui-radar-BNYr-0Me.js} +7 -7
- package/dist/{vue-ui-rating-BTD7xrCK.js → vue-ui-rating-BNUL56t4.js} +2 -2
- package/dist/{vue-ui-relation-circle-jErgm958.js → vue-ui-relation-circle-DOYkBvSY.js} +6 -6
- package/dist/{vue-ui-ridgeline-we0epqNk.js → vue-ui-ridgeline-DEn1oudN.js} +8 -8
- package/dist/{vue-ui-rings-DJWTf1uZ.js → vue-ui-rings-CSNmlblD.js} +8 -8
- package/dist/{vue-ui-scatter-C94FXact.js → vue-ui-scatter-CVKhR03G.js} +8 -8
- package/dist/{vue-ui-skeleton--VFckr1-.js → vue-ui-skeleton-C-F_6Vl8.js} +3 -3
- package/dist/{vue-ui-smiley-DNj5p6hi.js → vue-ui-smiley-9uchQGm-.js} +2 -2
- package/dist/{vue-ui-spark-trend-BUKgFMV_.js → vue-ui-spark-trend-CB3DO3a4.js} +3 -3
- package/dist/{vue-ui-sparkbar-DMjqw4dV.js → vue-ui-sparkbar-C2R03dNB.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BnWxrxBS.js → vue-ui-sparkgauge-BtW6-sLc.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-7MSKip9i.js → vue-ui-sparkhistogram-CW0N9NcQ.js} +4 -4
- package/dist/{vue-ui-sparkline-C8NiPHel.js → vue-ui-sparkline-Cz8tNNX5.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-B4OrKV2_.js → vue-ui-sparkstackbar-CnmBJnbX.js} +3 -3
- package/dist/{vue-ui-stackbar-BePLgZLL.js → vue-ui-stackbar-qIRqTunP.js} +9 -9
- package/dist/{vue-ui-strip-plot-BzVgS6vT.js → vue-ui-strip-plot-mmGIF-Kt.js} +7 -7
- package/dist/{vue-ui-table-088-wqHU.js → vue-ui-table-C1ftm37c.js} +3 -3
- package/dist/{vue-ui-table-heatmap-A8gN9NU2.js → vue-ui-table-heatmap-0AkmMtph.js} +5 -5
- package/dist/{vue-ui-table-sparkline-B5ydziP3.js → vue-ui-table-sparkline-53LdwwOX.js} +4 -4
- package/dist/{vue-ui-thermometer-DVSW7iAt.js → vue-ui-thermometer-cpmry95L.js} +7 -7
- package/dist/{vue-ui-timer-DOlZVwc0.js → vue-ui-timer-BkPmheSp.js} +5 -5
- package/dist/{vue-ui-tiremarks-BdpwJTjQ.js → vue-ui-tiremarks-0Td6rFSB.js} +6 -6
- package/dist/{vue-ui-treemap-BzRJXnWX.js → vue-ui-treemap-ClL19tZl.js} +8 -8
- package/dist/{vue-ui-vertical-bar-BWF4L-si.js → vue-ui-vertical-bar-Yigs8iR9.js} +9 -9
- package/dist/{vue-ui-waffle-YMOhYjS2.js → vue-ui-waffle-CLbJ0gNv.js} +8 -8
- package/dist/{vue-ui-wheel-C2LJqnuj.js → vue-ui-wheel-Ddr9_dsz.js} +6 -6
- package/dist/vue-ui-word-cloud-BnYr9XJt.js +765 -0
- package/dist/{vue-ui-world-BInCh1JK.js → vue-ui-world-D5iO6V_L.js} +6 -6
- package/dist/{vue-ui-xy-uE2FWrCv.js → vue-ui-xy-ByTY6gwo.js} +9 -9
- package/dist/{vue-ui-xy-canvas-DaIL6iBg.js → vue-ui-xy-canvas-B_VipV62.js} +8 -8
- package/package.json +1 -1
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-word-cloud-BqoWGzfw.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-
|
|
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-
|
|
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-
|
|
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-
|
|
10
|
-
import Ao from "./Title-
|
|
11
|
-
import { S as Co } from "./Slicer-
|
|
12
|
-
import { _ as $t } from "./Shape-
|
|
13
|
-
import zo from "./BaseIcon-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
import { u as gl } from "./usePrinter-
|
|
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-
|
|
9
|
-
import xl from "./Title-
|
|
10
|
-
import { S as Ll } from "./Slicer-
|
|
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-
|
|
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-
|
|
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,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
|
-
};
|