vue-data-ui 2.6.52-beta.8 → 2.6.52-beta.9
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-ixzPNbwK.cjs → Arrow-Bvc0lWZf.cjs} +1 -1
- package/dist/{Arrow-C00zX8JE.js → Arrow-DMgiQZ_4.js} +1 -1
- package/dist/{BaseIcon-Dmj_TDMF.js → BaseIcon-4qX1_lK_.js} +1 -1
- package/dist/{BaseIcon-C3fbvJja.cjs → BaseIcon-D5l-ujm_.cjs} +1 -1
- package/dist/{ColorPicker-FHm8EGG5.cjs → ColorPicker-CfOcggUt.cjs} +1 -1
- package/dist/{ColorPicker-DsY6GVvR.js → ColorPicker-DSeral-H.js} +3 -3
- package/dist/{DataTable-75Q8mEKL.js → DataTable-D192lIs1.js} +2 -2
- package/dist/{DataTable-C3hniWU1.cjs → DataTable-RPRtm5dz.cjs} +1 -1
- package/dist/{Legend-BAiNUVyQ.cjs → Legend-C931uD4w.cjs} +1 -1
- package/dist/{Legend-bSp40GLk.js → Legend-t6D-CcgS.js} +2 -2
- package/dist/{PackageVersion-BgpSLaAT.js → PackageVersion-DP9T4NNf.js} +1 -1
- package/dist/{PackageVersion-D4qSM1se.cjs → PackageVersion-Dx3HlVxy.cjs} +1 -1
- package/dist/{PenAndPaper-SeG6fNqq.js → PenAndPaper-Db_wnpFu.js} +3 -3
- package/dist/{PenAndPaper-Cr-AMhUp.cjs → PenAndPaper-DxFQUt06.cjs} +1 -1
- package/dist/{Shape-Cc_e-XT6.js → Shape-B6CG6Tjf.js} +1 -1
- package/dist/{Shape-BGY-aMv_.cjs → Shape-BT10qNqK.cjs} +1 -1
- package/dist/{Slicer-C1L3wLiK.cjs → Slicer-C32r4aWq.cjs} +1 -1
- package/dist/{Slicer-Di3IBy55.js → Slicer-zUNWJ7Rt.js} +2 -2
- package/dist/{Title-CMPB3B-Y.js → Title-BNDJzlYk.js} +1 -1
- package/dist/{Title-BHs3KKCA.cjs → Title-K-KcP2WR.cjs} +1 -1
- package/dist/{Tooltip-DSvtYMC-.js → Tooltip-DQeCgEls.js} +1 -1
- package/dist/{Tooltip-Co6srAeW.cjs → Tooltip-DmYALolD.cjs} +1 -1
- package/dist/dom-to-png-CNdnROpG.js +223 -0
- package/dist/dom-to-png-CP7WJd1S.cjs +3 -0
- package/dist/{img-DQUYWy9P.js → img-CAUOYafO.js} +1 -1
- package/dist/{img-XjSrJ8sW.cjs → img-CKhJxCzz.cjs} +1 -1
- package/dist/{index-C9jn4-R2.js → index-BBwKaiVY.js} +1 -1
- package/dist/{index-BNgRt1qb.cjs → index-DdmI4IyM.cjs} +1 -1
- package/dist/{pdf-Dyo3oB3L.cjs → pdf-Bv-7Cz5O.cjs} +1 -1
- package/dist/{pdf-B-1_u2ev.js → pdf-DGsZCtrD.js} +1 -1
- package/dist/{useNestedProp-CJCesTk2.js → useNestedProp-CRcJE21n.js} +1 -1
- package/dist/{useNestedProp-Rw4Gh-Uj.cjs → useNestedProp-Dctcwxef.cjs} +1 -1
- package/dist/{usePrinter-MoXgFVyY.cjs → usePrinter-ClXx8Fo-.cjs} +1 -1
- package/dist/{usePrinter-8P2T-WVP.js → usePrinter-Csngp5T1.js} +3 -3
- package/dist/{vue-data-ui-Cs8ck5zm.cjs → vue-data-ui-B-HYjyTv.cjs} +1 -1
- package/dist/{vue-data-ui-DhgHDjTN.js → vue-data-ui-DRkvQU1Z.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-UOe9wHWa.cjs → vue-ui-3d-bar-DKTpxLQf.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-CaqdFtu5.js → vue-ui-3d-bar-Or_Pxl4f.js} +9 -9
- package/dist/{vue-ui-accordion-OwcyuAOJ.cjs → vue-ui-accordion-fsdtcWoA.cjs} +1 -1
- package/dist/{vue-ui-accordion-LJpg13C-.js → vue-ui-accordion-zwn0yEvW.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CLduI-aC.js → vue-ui-age-pyramid-CR4X9AYe.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DlXIpFMh.cjs → vue-ui-age-pyramid-CmeUQWOn.cjs} +1 -1
- package/dist/{vue-ui-annotator-BXU3Xunn.js → vue-ui-annotator-DP0d9bO-.js} +2 -2
- package/dist/{vue-ui-annotator-CTOa_s21.cjs → vue-ui-annotator-iAmIySMn.cjs} +1 -1
- package/dist/{vue-ui-bullet-kRODUXjc.js → vue-ui-bullet-BwRsLv44.js} +8 -8
- package/dist/{vue-ui-bullet-C0ntlZsS.cjs → vue-ui-bullet-NSxVF_H8.cjs} +1 -1
- package/dist/{vue-ui-candlestick-0S_V6Vzz.cjs → vue-ui-candlestick-CGDmTY9u.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CEnJsMCD.js → vue-ui-candlestick-DxvXpsyX.js} +11 -11
- package/dist/{vue-ui-carousel-table-DHqhuddo.cjs → vue-ui-carousel-table--LhcSQMy.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Ca8lhddm.js → vue-ui-carousel-table-DD5-DjT1.js} +4 -4
- package/dist/{vue-ui-chestnut-CjQe5IrW.cjs → vue-ui-chestnut-4VdU7keY.cjs} +1 -1
- package/dist/{vue-ui-chestnut--vMgSrmv.js → vue-ui-chestnut-CQJTn7fn.js} +8 -8
- package/dist/{vue-ui-circle-pack-Bvo7qnKN.js → vue-ui-circle-pack-CiQ8_5Cm.js} +9 -9
- package/dist/{vue-ui-circle-pack-C8AYBzze.cjs → vue-ui-circle-pack-DtgTkVIO.cjs} +1 -1
- package/dist/{vue-ui-cursor-CNZcwa1b.js → vue-ui-cursor-DZSRtqAI.js} +2 -2
- package/dist/{vue-ui-cursor-DgUgP4ki.cjs → vue-ui-cursor-sRVxw9VU.cjs} +1 -1
- package/dist/{vue-ui-dashboard-YXEZEfJm.cjs → vue-ui-dashboard-BC5PNjG6.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BKFk2-2r.js → vue-ui-dashboard-CgDCZgWu.js} +3 -3
- package/dist/{vue-ui-digits-COX2qJ9j.js → vue-ui-digits-BnSm6HOD.js} +2 -2
- package/dist/{vue-ui-digits-BETFkD8q.cjs → vue-ui-digits-CIPlnX4m.cjs} +1 -1
- package/dist/{vue-ui-donut-B73dltJt.js → vue-ui-donut-CGN_56A-.js} +12 -12
- package/dist/{vue-ui-donut-BGT24_8F.cjs → vue-ui-donut-Dt682HYD.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D2glEskf.js → vue-ui-donut-evolution-BUu7nOHx.js} +11 -11
- package/dist/{vue-ui-donut-evolution-CU49ZLsP.cjs → vue-ui-donut-evolution-YnZ1tQZD.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Cnx71N4o.cjs → vue-ui-dumbbell-BWZRBoK5.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BDA2Amz9.js → vue-ui-dumbbell-Cah5eNlf.js} +10 -10
- package/dist/{vue-ui-flow-_En2yd6J.js → vue-ui-flow-Cr1-IEyc.js} +9 -9
- package/dist/{vue-ui-flow-GGhoRow6.cjs → vue-ui-flow-NSqG-VJj.cjs} +1 -1
- package/dist/{vue-ui-funnel-BgNEGMJ1.js → vue-ui-funnel-CdUSmZCU.js} +9 -9
- package/dist/{vue-ui-funnel-D_M3lFow.cjs → vue-ui-funnel-FSBnYvMH.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CVqad6o-.cjs → vue-ui-galaxy-CfHSHPsj.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BVK8Nj0y.js → vue-ui-galaxy-f0Mb4bW5.js} +11 -11
- package/dist/{vue-ui-gauge-CnWF9QdC.js → vue-ui-gauge-BNBcgNxb.js} +7 -7
- package/dist/{vue-ui-gauge-DNeNFfRf.cjs → vue-ui-gauge-DiBPBBm0.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DrJpZVIE.cjs → vue-ui-gizmo-D4ntZeoD.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CscxR_lf.js → vue-ui-gizmo-D5QF_8_x.js} +3 -3
- package/dist/{vue-ui-heatmap-drcfb1T3.cjs → vue-ui-heatmap-D4OrEjjo.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CSDZEKgL.js → vue-ui-heatmap-MxSJwSDk.js} +10 -10
- package/dist/{vue-ui-history-plot-DhLSLbmd.cjs → vue-ui-history-plot-DKHvI-HZ.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CgODYHrP.js → vue-ui-history-plot-PmmDMNhU.js} +11 -11
- package/dist/{vue-ui-kpi-Dfnu4uV7.cjs → vue-ui-kpi-DGvhcEZy.cjs} +1 -1
- package/dist/{vue-ui-kpi-C7IBLq1x.js → vue-ui-kpi-DT94o6m6.js} +3 -3
- package/dist/{vue-ui-mini-loader-D3Xr73Ag.cjs → vue-ui-mini-loader-BmeR7-9f.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DYRh4Kkh.js → vue-ui-mini-loader-DLN6kXO9.js} +2 -2
- package/dist/{vue-ui-molecule-dIazQ3-8.cjs → vue-ui-molecule-D51X1kpt.cjs} +1 -1
- package/dist/{vue-ui-molecule-CafG92yJ.js → vue-ui-molecule-DypBWu0b.js} +11 -11
- package/dist/{vue-ui-mood-radar-DVQakt0e.js → vue-ui-mood-radar-D6VaT0FM.js} +11 -11
- package/dist/{vue-ui-mood-radar-Dy6y3kE8.cjs → vue-ui-mood-radar-wCI5H7Ka.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CU5dBsxV.js → vue-ui-nested-donuts-3ICSijpW.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BCp7ZfNB.cjs → vue-ui-nested-donuts-Bped69kR.cjs} +1 -1
- package/dist/{vue-ui-onion-CBWFAlLr.cjs → vue-ui-onion-75D677VV.cjs} +1 -1
- package/dist/{vue-ui-onion-TiFlxcPg.js → vue-ui-onion-gJqbUjYS.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-6asHkFPu.js → vue-ui-parallel-coordinate-plot-CAxkNqsH.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-PbbcxvWb.cjs → vue-ui-parallel-coordinate-plot-pRNEcwtp.cjs} +1 -1
- package/dist/{vue-ui-quadrant-SyaL58Pd.js → vue-ui-quadrant-BSxpUAnN.js} +12 -12
- package/dist/{vue-ui-quadrant-BPjDP3xp.cjs → vue-ui-quadrant-HPB66J-s.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BQty6dst.js → vue-ui-quick-chart-2GMvbDAA.js} +9 -9
- package/dist/{vue-ui-quick-chart-Ctk9opDN.cjs → vue-ui-quick-chart-DM5Qyur7.cjs} +1 -1
- package/dist/{vue-ui-radar-C6zWaydD.cjs → vue-ui-radar-CrrE7tgM.cjs} +1 -1
- package/dist/{vue-ui-radar-k5ZDwfqO.js → vue-ui-radar-DRbxZIfI.js} +12 -12
- package/dist/{vue-ui-rating-BQTBxQbu.cjs → vue-ui-rating-B74MvkB-.cjs} +1 -1
- package/dist/{vue-ui-rating-C8TxcV9Y.js → vue-ui-rating-BVzeHFsE.js} +2 -2
- package/dist/{vue-ui-relation-circle-BovfORoJ.js → vue-ui-relation-circle-Vb6vY4qc.js} +7 -7
- package/dist/{vue-ui-relation-circle-PYWsXiN8.cjs → vue-ui-relation-circle-bonK2Qo7.cjs} +1 -1
- package/dist/{vue-ui-rings-CfOlggfy.js → vue-ui-rings-5S7O4poi.js} +12 -12
- package/dist/{vue-ui-rings-CWnMX806.cjs → vue-ui-rings-D8vjaeiH.cjs} +1 -1
- package/dist/{vue-ui-scatter-O7i2lxi0.cjs → vue-ui-scatter-B3rdJPB7.cjs} +1 -1
- package/dist/{vue-ui-scatter-B78z-q36.js → vue-ui-scatter-BzyLf6Hr.js} +12 -12
- package/dist/{vue-ui-skeleton-BcdGGi59.js → vue-ui-skeleton-CoW0Qci5.js} +3 -3
- package/dist/{vue-ui-skeleton-C0J43Kn4.cjs → vue-ui-skeleton-DSAQr6x5.cjs} +1 -1
- package/dist/{vue-ui-smiley-CqH2mkD-.js → vue-ui-smiley-CNRok3pP.js} +2 -2
- package/dist/{vue-ui-smiley-LVV1eWbi.cjs → vue-ui-smiley-DnO-ASKu.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-MWM33ZDh.cjs → vue-ui-spark-trend-Ct1UY_MC.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DL_M5NBE.js → vue-ui-spark-trend-PplShNvM.js} +5 -5
- package/dist/{vue-ui-sparkbar-Cy0jd_oL.cjs → vue-ui-sparkbar-CYYHcuyY.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-COVqOLsS.js → vue-ui-sparkbar-I8_tYiKU.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DIK0TAtb.js → vue-ui-sparkgauge-CvxLXm7g.js} +4 -4
- package/dist/{vue-ui-sparkgauge-B4NFlAva.cjs → vue-ui-sparkgauge-DB40CpGm.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B5L4FTg8.cjs → vue-ui-sparkhistogram-COtHy-A9.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CYKueGJ6.js → vue-ui-sparkhistogram-CZRAkAG-.js} +5 -5
- package/dist/{vue-ui-sparkline-H5t3_F1r.cjs → vue-ui-sparkline-Be0XWPEe.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CAvVCAOw.js → vue-ui-sparkline-DESd7Yax.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-BstG7v1W.js → vue-ui-sparkstackbar-CzEuwnJV.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DldVkp76.cjs → vue-ui-sparkstackbar-DxdMxOFQ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CARC17Nn.cjs → vue-ui-stackbar-C9XLE8w2.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BWIzMRNo.js → vue-ui-stackbar-DNuc2OCh.js} +13 -13
- package/dist/{vue-ui-strip-plot-CUMgDKwu.js → vue-ui-strip-plot-DuM855Hq.js} +11 -11
- package/dist/{vue-ui-strip-plot-CkHggOYn.cjs → vue-ui-strip-plot-EVjIBlOg.cjs} +1 -1
- package/dist/{vue-ui-table-Cgqtlgu4.js → vue-ui-table-CobFbKRN.js} +1 -1
- package/dist/{vue-ui-table-CQM-zHp0.cjs → vue-ui-table-Dh_NnOFW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-SlAA9_ed.cjs → vue-ui-table-heatmap-CLzAaAW1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-COg_3Byw.js → vue-ui-table-heatmap-DrgPZTXL.js} +4 -4
- package/dist/{vue-ui-table-sparkline-2cfdxMoC.cjs → vue-ui-table-sparkline-BQDc_il5.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-D9eEcSVX.js → vue-ui-table-sparkline-D8_WyZeB.js} +5 -5
- package/dist/{vue-ui-thermometer-CKAhgTJE.js → vue-ui-thermometer-CUrWmL9J.js} +7 -7
- package/dist/{vue-ui-thermometer-BLJdC2GC.cjs → vue-ui-thermometer-CW1KJ1Ix.cjs} +1 -1
- package/dist/{vue-ui-timer-hvgApDHz.js → vue-ui-timer-C5HcU0qt.js} +5 -5
- package/dist/{vue-ui-timer-CfALKmV8.cjs → vue-ui-timer-CjXvzokw.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-8eAT6M3W.js → vue-ui-tiremarks-PsEoJbuf.js} +7 -7
- package/dist/{vue-ui-tiremarks-CsVjNHvC.cjs → vue-ui-tiremarks-YtX_KuXp.cjs} +1 -1
- package/dist/{vue-ui-treemap-Do9h3aTD.cjs → vue-ui-treemap-CGgRCl4E.cjs} +1 -1
- package/dist/{vue-ui-treemap-GMC7JeuR.js → vue-ui-treemap-DZ2QMQ2S.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BwVHAnGa.js → vue-ui-vertical-bar-Bg68IfRu.js} +12 -12
- package/dist/{vue-ui-vertical-bar-C5-D09WQ.cjs → vue-ui-vertical-bar-Bz-pbusQ.cjs} +1 -1
- package/dist/{vue-ui-waffle-AsBlpum0.js → vue-ui-waffle-Ci_DVsdn.js} +12 -12
- package/dist/{vue-ui-waffle-BhhTPZtZ.cjs → vue-ui-waffle-FNP844zt.cjs} +1 -1
- package/dist/{vue-ui-wheel-COQTvgsG.cjs → vue-ui-wheel-DCdliwye.cjs} +1 -1
- package/dist/{vue-ui-wheel-e_lvFNX4.js → vue-ui-wheel-avTcqygq.js} +7 -7
- package/dist/{vue-ui-word-cloud-CZYz5KSD.js → vue-ui-word-cloud-BwNVlteE.js} +10 -10
- package/dist/{vue-ui-word-cloud-COkqnjNB.cjs → vue-ui-word-cloud-DrApMsSm.cjs} +1 -1
- package/dist/{vue-ui-xy-glew9KIx.cjs → vue-ui-xy-BdfDxlX6.cjs} +2 -2
- package/dist/{vue-ui-xy-hwuJWFRy.js → vue-ui-xy-Ds8oB37Y.js} +16 -16
- package/dist/{vue-ui-xy-canvas-Ct5EKPo4.js → vue-ui-xy-canvas-B1LLzFGi.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DjdScwkd.cjs → vue-ui-xy-canvas-B7cjV0K6.cjs} +1 -1
- package/package.json +1 -1
- package/dist/dom-to-png-8dGGc19p.cjs +0 -3
- package/dist/dom-to-png-DqpDZxWl.js +0 -221
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-
|
|
2
|
-
import { D as pe } from "./DataTable-
|
|
3
|
-
import { _ as Me } from "./Title-
|
|
4
|
-
import { u as ze, _ as Te } from "./Tooltip-
|
|
5
|
-
import { U as Pe } from "./usePrinter-
|
|
6
|
-
import { _ as Ve } from "./Shape-
|
|
7
|
-
import Re from "./BaseIcon-
|
|
8
|
-
import He from "./vue-ui-table-sparkline-
|
|
9
|
-
import De from "./vue-ui-skeleton-
|
|
10
|
-
import { S as Be } from "./Slicer-
|
|
11
|
-
import Ee from "./vue-ui-accordion-
|
|
12
|
-
import { u as Z } from "./useNestedProp-
|
|
13
|
-
import { _ as Ye } from "./PackageVersion-
|
|
14
|
-
import { P as We } from "./PenAndPaper-
|
|
1
|
+
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-BBwKaiVY.js";
|
|
2
|
+
import { D as pe } from "./DataTable-D192lIs1.js";
|
|
3
|
+
import { _ as Me } from "./Title-BNDJzlYk.js";
|
|
4
|
+
import { u as ze, _ as Te } from "./Tooltip-DQeCgEls.js";
|
|
5
|
+
import { U as Pe } from "./usePrinter-Csngp5T1.js";
|
|
6
|
+
import { _ as Ve } from "./Shape-B6CG6Tjf.js";
|
|
7
|
+
import Re from "./BaseIcon-4qX1_lK_.js";
|
|
8
|
+
import He from "./vue-ui-table-sparkline-D8_WyZeB.js";
|
|
9
|
+
import De from "./vue-ui-skeleton-CoW0Qci5.js";
|
|
10
|
+
import { S as Be } from "./Slicer-zUNWJ7Rt.js";
|
|
11
|
+
import Ee from "./vue-ui-accordion-zwn0yEvW.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-CRcJE21n.js";
|
|
13
|
+
import { _ as Ye } from "./PackageVersion-DP9T4NNf.js";
|
|
14
|
+
import { P as We } from "./PenAndPaper-Db_wnpFu.js";
|
|
15
15
|
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as x, normalizeClass as B, createBlock as D, createCommentVNode as u, createVNode as W, createSlots as qe, withCtx as P, renderSlot as S, normalizeProps as E, guardReactiveProps as Y, createElementVNode as f, createTextVNode as J, Fragment as d, renderList as I, toDisplayString as T, mergeProps as Q, withDirectives as Xe, vModelCheckbox as Ue } from "vue";
|
|
16
16
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Je = X(), Qe = {
|
|
@@ -1103,7 +1103,7 @@ const Je = X(), Qe = {
|
|
|
1103
1103
|
async generatePdf() {
|
|
1104
1104
|
this.showSpinnerPdf(), clearTimeout(this.__to__), this.isPrinting = !0, this.__to__ = setTimeout(async () => {
|
|
1105
1105
|
try {
|
|
1106
|
-
const { default: t } = await import("./pdf-
|
|
1106
|
+
const { default: t } = await import("./pdf-DGsZCtrD.js");
|
|
1107
1107
|
await t({
|
|
1108
1108
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1109
1109
|
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
@@ -1126,7 +1126,7 @@ const Je = X(), Qe = {
|
|
|
1126
1126
|
async generateImage() {
|
|
1127
1127
|
this.showSpinnerImage(), clearTimeout(this.__to__), this.isImaging = !0, this.__to__ = setTimeout(async () => {
|
|
1128
1128
|
try {
|
|
1129
|
-
const { default: t } = await import("./img-
|
|
1129
|
+
const { default: t } = await import("./img-CAUOYafO.js");
|
|
1130
1130
|
await t({
|
|
1131
1131
|
domElement: document.getElementById(`vue-ui-xy_${this.uniqueId}`),
|
|
1132
1132
|
fileName: this.FINAL_CONFIG.chart.title.text || "vue-ui-xy",
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as i, computed as T, onMounted as Ge, nextTick as Ie, onBeforeUnmount as bt, watch as te, createElementBlock as X, openBlock as C, Fragment as We, createCommentVNode as le, normalizeClass as fe, createElementVNode as U, withDirectives as Ut, normalizeStyle as W, createVNode as ke, vModelText as Wt, withModifiers as dt, unref as D, renderList as Vt, useSlots as Zt, createBlock as ue, createSlots as Gt, withCtx as z, renderSlot as M, normalizeProps as ve, guardReactiveProps as de, toDisplayString as ht, createTextVNode as _t } from "vue";
|
|
2
|
-
import { l as xt, X as jt, u as qt, c as Qt, t as Jt, p as he, a as Kt, C as Ne, b as el, D as Ve, i as be, f as xe, d as ft, $ as tl, J as ll, ac as al, o as ol, e as nl, x as yt, q as rl, r as sl, y as ul, s as Me } from "./index-
|
|
2
|
+
import { l as xt, X as jt, u as qt, c as Qt, t as Jt, p as he, a as Kt, C as Ne, b as el, D as Ve, i as be, f as xe, d as ft, $ as tl, J as ll, ac as al, o as ol, e as nl, x as yt, q as rl, r as sl, y as ul, s as Me } from "./index-BBwKaiVY.js";
|
|
3
3
|
import { d as il, t as cl, u as vl, c as dl, a as gt, l as I, r as Ze, b as ee, p as pt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as hl } from "./Tooltip-
|
|
5
|
-
import { L as fl } from "./Legend-
|
|
6
|
-
import { _ as yl } from "./Title-
|
|
7
|
-
import { S as gl } from "./Slicer-
|
|
8
|
-
import { u as pl, U as ml } from "./usePrinter-
|
|
9
|
-
import bl from "./vue-ui-accordion-
|
|
10
|
-
import { D as xl } from "./DataTable-
|
|
11
|
-
import kl from "./vue-ui-skeleton-
|
|
12
|
-
import { u as mt } from "./useNestedProp-
|
|
4
|
+
import { _ as hl } from "./Tooltip-DQeCgEls.js";
|
|
5
|
+
import { L as fl } from "./Legend-t6D-CcgS.js";
|
|
6
|
+
import { _ as yl } from "./Title-BNDJzlYk.js";
|
|
7
|
+
import { S as gl } from "./Slicer-zUNWJ7Rt.js";
|
|
8
|
+
import { u as pl, U as ml } from "./usePrinter-Csngp5T1.js";
|
|
9
|
+
import bl from "./vue-ui-accordion-zwn0yEvW.js";
|
|
10
|
+
import { D as xl } from "./DataTable-D192lIs1.js";
|
|
11
|
+
import kl from "./vue-ui-skeleton-CoW0Qci5.js";
|
|
12
|
+
import { u as mt } from "./useNestedProp-CRcJE21n.js";
|
|
13
13
|
import { u as Ll } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { u as Cl } from "./useChartAccessibility-BWojgys7.js";
|
|
15
|
-
import Ye from "./BaseIcon-
|
|
16
|
-
import { C as wl } from "./ColorPicker-
|
|
15
|
+
import Ye from "./BaseIcon-4qX1_lK_.js";
|
|
16
|
+
import { C as wl } from "./ColorPicker-DSeral-H.js";
|
|
17
17
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const $l = {
|
|
19
19
|
class: /* @__PURE__ */ fe({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-BNgRt1qb.cjs"),p=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-Co6srAeW.cjs"),dt=require("./Legend-BAiNUVyQ.cjs"),ht=require("./Title-BHs3KKCA.cjs"),ft=require("./Slicer-C1L3wLiK.cjs"),Ye=require("./usePrinter-MoXgFVyY.cjs"),yt=require("./vue-ui-accordion-OwcyuAOJ.cjs"),pt=require("./DataTable-C3hniWU1.cjs"),gt=require("./vue-ui-skeleton-C0J43Kn4.cjs"),He=require("./useNestedProp-Rw4Gh-Uj.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-C3fbvJja.cjs"),xt=require("./ColorPicker-FHm8EGG5.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-6e690e62"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas",options:t.value.userOptions.print}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-DdmI4IyM.cjs"),p=require("./useResponsive-DQmBAoBf.cjs"),vt=require("./Tooltip-DmYALolD.cjs"),dt=require("./Legend-C931uD4w.cjs"),ht=require("./Title-K-KcP2WR.cjs"),ft=require("./Slicer-C32r4aWq.cjs"),Ye=require("./usePrinter-ClXx8Fo-.cjs"),yt=require("./vue-ui-accordion-fsdtcWoA.cjs"),pt=require("./DataTable-RPRtm5dz.cjs"),gt=require("./vue-ui-skeleton-DSAQr6x5.cjs"),He=require("./useNestedProp-Dctcwxef.cjs"),mt=require("./useUserOptionState-BgepsfED.cjs"),bt=require("./useChartAccessibility-Cm7nkzTG.cjs"),me=require("./BaseIcon-D5l-ujm_.cjs"),xt=require("./ColorPicker-CfOcggUt.cjs"),Xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),kt={class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},Lt=["disabled"],Ct=["xmlns","viewBox"],wt=["cx","cy","r","fill"],St=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],zt={__name:"NonSvgPenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup($,{emit:be}){const X=$,xe=be,x=l.ref([]),D=l.ref([]),Z=l.ref("0 0 0 0"),V=l.ref(X.color),c=l.ref(1),k=l.computed(()=>u.lightenHexColor(X.color,.6));function F({width:h,height:v}){Z.value=`0 0 ${h} ${v}`}const U=l.ref(null);l.onMounted(()=>{l.nextTick(()=>{if(X.parent){U.value=new ResizeObserver(s=>{for(const d of s){const{width:g,height:C}=d.contentRect;F({width:g,height:C})}}),U.value.observe(X.parent);const{width:h,height:v}=X.parent.getBoundingClientRect();F({width:h,height:v})}})}),l.onBeforeUnmount(()=>{U.value&&U.value.disconnect()}),l.watch(()=>X.parent,h=>{if(!h)return;const{width:v,height:s}=X.parent.getBoundingClientRect();F({width:v,height:s})},{immediate:!0});const f=l.ref(!1),A=l.ref(""),_=l.ref(null);function I(h){if(!_.value)return;f.value=!0;const{x:v,y:s}=re(h);A.value=`M ${v} ${s}`}function q(h){if(!f.value||!_.value)return;const{x:v,y:s}=re(h);A.value+=` ${v} ${s}`}function Y(h){const v=h.trim().split(/\s+/);if(v.length<4)return h;const s=v.slice(1).map(Number);if(s.length%2!==0)return h;const d=G(s),g=[`M ${d[0]} ${d[1]}`];for(let E=2;E<d.length-2;E+=2){const t=d[E-2],M=d[E-1],P=d[E],T=d[E+1],B=(t+P)/2,j=(M+T)/2;g.push(`Q ${t} ${M} ${B} ${j}`)}const C=d[d.length-2],S=d[d.length-1];return g.push(`L ${C} ${S}`),g.join(" ")}function G(h,v=1){const s=[...h];for(let d=2;d<h.length-2;d+=2){const g=h[d],C=h[d+1],S=h[d-2],E=h[d-1],t=h[d+2],M=h[d+3];s[d]=g+v*((S+t)/2-g),s[d+1]=C+v*((E+M)/2-C)}return s}function oe(h){const v=h.trim().split(/\s+/);let s="",d="",g=null,C=null;for(let S=0;S<v.length;S+=1){const E=v[S];if(isNaN(E)){if(d=E,d==="M"||d==="L")g=parseFloat(v[++S]),C=parseFloat(v[++S]),s+=`${d}${g} ${C}`;else if(d==="Q"){const t=parseFloat(v[++S]),M=parseFloat(v[++S]),P=parseFloat(v[++S]),T=parseFloat(v[++S]);t===g&&M===C?s+=`t${P-g} ${T-C}`:s+=`q${t-g} ${M-C} ${P-g} ${T-C}`,g=P,C=T}}else{const t=parseFloat(E),M=parseFloat(v[++S]);if(d==="L"){const P=t-g,T=M-C;P===0?s+=`v${T}`:T===0?s+=`h${P}`:s+=`l${P} ${T}`,g=t,C=M}else if(d==="Q"){const P=t,T=M,B=parseFloat(v[++S]),j=parseFloat(v[++S]);P===g&&T===C?s+=`t${B-g} ${j-C}`:s+=`q${P-g} ${T-C} ${B-g} ${j-C}`,g=B,C=j}}}return s}function ee(){f.value&&(x.value.push({strokeWidth:c.value,path:oe(Y(A.value)),color:V.value}),D.value=[],A.value=""),f.value=!1}function re(h){if(!_.value)return{x:0,y:0};const v=_.value.getBoundingClientRect();let s,d;return h.touches&&h.touches.length?(s=h.touches[0].clientX,d=h.touches[0].clientY):(s=h.clientX,d=h.clientY),{x:s-v.left,y:d-v.top}}l.ref(!1);function te(){if(x.value.length>0){const h=x.value.pop();D.value.push(h)}}function ce(){if(D.value.length>0){const h=D.value.pop();x.value.push(h)}}function ve(){x.value=[],D.value=[]}const de=l.ref(null);return(h,v)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[$.active?(l.openBlock(),l.createElementBlock("div",{key:0,"data-dom-to-png-ignore":"",class:l.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:$.active})},[l.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:v[0]||(v[0]=s=>xe("close"))},[l.createVNode(me.default,{name:"close",stroke:$.color},null,8,["stroke"])],4),l.createElementVNode("button",kt,[l.createVNode(xt.ColorPicker,{value:V.value,"onUpdate:value":v[1]||(v[1]=s=>V.value=s),backgroundColor:$.backgroundColor,buttonBorderColor:k.value},null,8,["value","backgroundColor","buttonBorderColor"])]),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length}),disabled:!x.value.length,style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:te},[l.createVNode(me.default,{name:"restart",stroke:$.color},null,8,["stroke"])],14,Lt),l.createElementVNode("button",{class:l.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!D.value.length}),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ce},[l.createVNode(me.default,{name:"restart",stroke:$.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),l.createElementVNode("button",{class:l.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!x.value.length},"vue-ui-pen-and-paper-action"]),style:l.normalizeStyle({backgroundColor:$.backgroundColor,border:`1px solid ${k.value}`}),onClick:ve},[l.createVNode(me.default,{name:"trash",stroke:$.color},null,8,["stroke"])],6),l.withDirectives(l.createElementVNode("input",{ref_key:"range",ref:de,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":v[2]||(v[2]=s=>c.value=s),style:l.normalizeStyle({accentColor:$.color})},null,4),[[l.vModelText,c.value]])],2)):l.createCommentVNode("",!0),(l.openBlock(),l.createElementBlock("svg",{ref_key:"svgElement",ref:_,xmlns:l.unref(u.XMLNS),viewBox:Z.value,class:l.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!$.active}),onMousedown:I,onMousemove:q,onMouseup:ee,onMouseleave:ee,onTouchstart:l.withModifiers(I,["prevent"]),onTouchmove:l.withModifiers(q,["prevent"]),onTouchend:ee},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(x.value,s=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:s},[s.path.replace("M","").split(" ").length===2?(l.openBlock(),l.createElementBlock("circle",{key:0,cx:s.path.replace("M","").split(" ")[0],cy:s.path.replace("M","").split(" ")[1],r:s.strokeWidth/2,fill:s.color},null,8,wt)):(l.openBlock(),l.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:s.path,stroke:s.color,"stroke-width":s.strokeWidth,fill:"none"},null,8,St))],64))),128)),f.value?(l.openBlock(),l.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:Y(A.value),stroke:V.value,"stroke-width":c.value*1.1,fill:"none"},null,8,$t)):l.createCommentVNode("",!0)],42,Ct))],64))}},Mt=Xe._export_sfc(zt,[["__scopeId","data-v-6e690e62"]]),Pt=["id"],Tt=["onClick"],Bt={key:2,class:"vue-data-ui-watermark"},It=["innerHTML"],Et={__name:"vue-ui-xy-canvas",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:["selectLegend"],setup($,{expose:be,emit:X}){const{vue_ui_xy_canvas:xe}=u.useConfig(),x=$,D=l.ref(u.createUid()),Z=l.ref(null),V=l.ref(null),c=l.ref(null),k=l.ref(1),F=l.ref(1),U=l.ref(!1),f=l.ref(null),A=l.ref(""),_=l.ref(null),I=l.ref([]),q=l.ref(1),Y=l.ref(!0),G=l.ref(!0),oe=l.ref(null),ee=l.ref(0),re=l.ref(0),te=l.ref(!1),ce=l.ref(null),ve=l.ref(null),de=l.ref(null),h=l.ref(null),v=l.ref(0),s=l.ref(0),d=l.ref(0),g=l.ref(null),C=l.computed(()=>!!x.dataset&&x.dataset.length),S=X,E=l.useSlots();l.onMounted(()=>{E["chart-background"]&&console.warn("VueUiXyCanvas does not support the #chart-background slot.")});const t=l.computed({get:()=>j(),set:e=>e}),{userOptionsVisible:M,setUserOptionsVisibility:P,keepUserOptionState:T}=mt.useUserOptionState({config:t.value}),{svgRef:B}=bt.useChartAccessibility({config:t.value.style.chart.title});function j(){const e=He.useNestedProp({userConfig:x.config,defaultConfig:xe});let o={};return e.theme?o={...He.useNestedProp({userConfig:u.themes.vue_ui_xy_canvas[e.theme]||x.config,defaultConfig:e}),customPalette:u.themePalettes[e.theme]||u.palette}:o=e,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.min")?o.style.chart.scale.min=x.config.style.chart.scale.min:o.style.chart.scale.min=null,x.config&&u.hasDeepProperty(x.config,"style.chart.scale.max")?o.style.chart.scale.max=x.config.style.chart.scale.max:o.style.chart.scale.max=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.startIndex")?o.style.chart.zoom.startIndex=x.config.style.chart.zoom.startIndex:o.style.chart.zoom.startIndex=null,x.config&&u.hasDeepProperty(x.config,"style.chart.zoom.endIndex")?o.style.chart.zoom.endIndex=x.config.style.chart.zoom.endIndex:o.style.chart.zoom.endIndex=null,o}l.watch(()=>x.config,e=>{t.value=j(),M.value=!t.value.userOptions.showOnChartHover,ke(),v.value+=1,s.value+=1,d.value+=1,i.value.showTable=t.value.table.show,i.value.showDataLabels=t.value.style.chart.dataLabels.show,i.value.stacked=t.value.style.chart.stacked,i.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),l.watch(()=>x.dataset,()=>{ke(),v.value+=1,s.value+=1,d.value+=1},{deep:!0});const Ce=l.ref(t.value.style.chart.aspectRatio),{isPrinting:we,isImaging:Se,generatePdf:$e,generateImage:ze}=Ye.usePrinter({elementId:`xy_canvas_${D.value}`,fileName:t.value.style.chart.title.text||"vue-ui-xy-canvas",options:t.value.userOptions.print}),i=l.ref({showTable:t.value.table.show,showDataLabels:t.value.style.chart.dataLabels.show,stacked:t.value.style.chart.stacked,showTooltip:t.value.style.chart.tooltip.show});function Ue(e){te.value=e,re.value+=1}const Me=l.computed(()=>u.convertCustomPalette(t.value.customPalette)),H=l.computed(()=>le.value?Math.max(...le.value.filter((e,o)=>!I.value.includes(e.absoluteIndex)).map(e=>e.series.length)):0),a=l.computed(()=>{const e=k.value-k.value*(t.value.style.chart.paddingProportions.left+t.value.style.chart.paddingProportions.right);return{canvasWidth:k.value,canvasHeight:F.value,left:k.value*t.value.style.chart.paddingProportions.left,top:F.value*t.value.style.chart.paddingProportions.top,right:k.value-k.value*t.value.style.chart.paddingProportions.right,bottom:F.value-F.value*t.value.style.chart.paddingProportions.bottom,width:e,height:F.value-F.value*(t.value.style.chart.paddingProportions.top+t.value.style.chart.paddingProportions.bottom),slot:e/(n.value.end-n.value.start)}});function Pe(e,o){return e/o}function qe({hasAutoScale:e,series:o,min:r,max:y,scale:b,yOffset:R,individualHeight:m,stackIndex:w=null}){return o.map((J,O)=>{const Q=b.min<0?Math.abs(b.min):0,K=Pe(J+Q,Q+b.max);let se,ie;e&&(se=b.min,ie=Pe(J-se,b.max-se));let W=0;return w===null?W=a.value.bottom-a.value.height*(e?ie:K):W=a.value.bottom-R-m*(e?ie:K),{x:a.value.left+a.value.slot*O+a.value.slot/2,y:W,value:J}})}const z=l.computed(()=>{const e=t.value.style.chart.scale.min!==null?t.value.style.chart.scale.min:Math.min(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),o=t.value.style.chart.scale.max!==null?t.value.style.chart.scale.max:Math.max(...le.value.filter((m,w)=>!I.value.includes(m.absoluteIndex)).flatMap(m=>m.series.slice(n.value.start,n.value.end))),r=u.calculateNiceScale(e<0?e:0,o===e?e+1<0?0:e+1:o<0?0:o,t.value.style.chart.scale.ticks),y=r.min<0?Math.abs(r.min):0,b=a.value.bottom-a.value.height*(y/(r.max+y)),R=r.ticks.map(m=>({y:a.value.bottom-a.value.height*((m+y)/(r.max+y)),x:a.value.left-8,value:m}));return{absoluteMin:y,max:o,min:e,scale:r,yLabels:R,zero:b}}),We=l.computed(()=>L.value.map(e=>`
|
|
2
2
|
<div style="display:flex;flex-direction:row;gap:6px;align-items:center;">
|
|
3
3
|
<svg viewBox="0 0 10 10" height="12" width="12">
|
|
4
4
|
<circle cx="5" cy="5" r="5" fill="${e.color}"/>
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";const x=require("./index-BNgRt1qb.cjs");async function j(e){const i=e.querySelectorAll("img"),n=[];i.forEach(t=>{t.src&&!t.src.startsWith("data:")&&n.push(new Promise(r=>{const c=new window.Image;c.crossOrigin="anonymous",c.onload=function(){try{const o=document.createElement("canvas");o.width=c.naturalWidth,o.height=c.naturalHeight,o.getContext("2d").drawImage(c,0,0),t.src=o.toDataURL()}catch{}r()},c.onerror=function(){r()},c.src=t.src}))}),await Promise.all(n)}function T(e){e.querySelectorAll("[data-dom-to-png-ignore]").forEach(n=>{n.remove()})}function v(e,i,n){const t=window.getComputedStyle(i),r=i.getBoundingClientRect(),c=t.display.includes("flex");let o={},l=e.getAttribute("style");typeof l!="string"&&(l=""),l.split(";").forEach(s=>{if(typeof s=="string"&&s.trim()){const[a,f]=s.split(":");a&&f!==void 0&&(o[a.trim()]=f.trim())}});for(let s=0;s<t.length;s+=1){const a=t[s],f=t.getPropertyValue(a);o[a]=f}o.color=t.color,o["background-color"]=t.backgroundColor,o["font-family"]=t.fontFamily||n||"",o["font-size"]=t.fontSize,o["font-weight"]=t.fontWeight,(c||t.display.includes("grid")||["inline-block","absolute","fixed"].includes(t.position))&&(r.width>0&&(o.width=r.width+"px"),r.height>0&&(o.height=r.height+"px")),c&&t.flexWrap==="nowrap"&&(o["white-space"]="nowrap"),["box-sizing","padding","margin","border"].forEach(s=>{o[s]=t.getPropertyValue(s)}),o.overflow="visible",o["overflow-x"]="visible",o["overflow-y"]="visible";let u="";for(const s in o)u+=`${s}:${o[s]};`;e.setAttribute("style",u);const d=e.children||[],y=i.children||[];for(let s=0;s<d.length;s++)d[s].nodeType===1&&y[s]&&v(d[s],y[s],n)}function q(e,i){e.querySelectorAll("text").forEach(t=>{t.setAttribute("font-family",i),t.style.fontFamily=i})}function L(e){const i=new TextEncoder().encode(e);let n="";return i.forEach(t=>n+=String.fromCharCode(t)),btoa(n)}function M(e,i,n){let r=new XMLSerializer().serializeToString(e);r.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)||(r=r.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"'));const c=window.btoa(unescape(encodeURIComponent(r))),o=new window.Image;return o.src=`data:image/svg+xml;base64,${c}`,new Promise((l,u)=>{o.onload=function(){const d=document.createElement("canvas");d.width=i,d.height=n,d.getContext("2d").drawImage(o,0,0,i,n),l(d.toDataURL("image/png",1))},o.onerror=d=>u(d)})}function A(e){if(e.nodeType!==1)return;const i=window.getComputedStyle(e);let n="";for(let t=0;t<i.length;t++){const r=i[t];n+=`${r}:${i.getPropertyValue(r)};`}e.setAttribute("style",n);for(let t=0;t<e.children.length;t++)A(e.children[t])}function $(){const e=[];for(const i of document.styleSheets)try{const n=i.cssRules;if(!n)continue;for(const t of n)(typeof CSSFontFaceRule<"u"&&t instanceof CSSFontFaceRule||t.cssText.trim().startsWith("@font-face"))&&e.push(t.cssText)}catch{continue}return e}function I(e){const i=$();if(!i.length)return;const n=document.createElement("style");n.setAttribute("type","text/css"),n.textContent=i.join(`
|
|
2
|
-
`);const t=e.querySelector("defs")||document.createElementNS(x.XMLNS,"defs");t.appendChild(n),e.querySelector("defs")||e.insertBefore(t,e.firstChild)}function z(e,i){const n=e.querySelectorAll("foreignObject"),t=i.querySelectorAll("foreignObject");n.forEach((r,c)=>{const o=t[c];if(!o)return;function l(u,d){if(!u||!d)return;if(u.nodeType===1&&d.nodeType===1){const a=window.getComputedStyle(d);let f="";for(let b=0;b<a.length;b++){const C=a[b];f+=`${C}:${a.getPropertyValue(C)};`}u.setAttribute("style",f)}const y=u.children||[],s=d.children||[];for(let a=0;a<y.length;a++)l(y[a],s[a])}l(r,o)})}function P(e){e.querySelectorAll("foreignObject").forEach(n=>{let t="";const r=Array.from(n.querySelectorAll("*"));if(r.length!==0){for(const c of document.styleSheets){let o;try{o=c.cssRules}catch{continue}if(o){for(const l of o)if(!(typeof CSSStyleRule<"u"&&!(l instanceof CSSStyleRule)))try{r.some(u=>u.matches(l.selectorText))&&(t+=l.cssText+`
|
|
3
|
-
`)}catch{continue}}}if(t){const c=document.createElement("style");c.textContent=t,n.insertBefore(c,n.firstChild)}}})}function W(e){e.querySelectorAll("foreignObject").forEach(n=>{const t=n.firstElementChild;t&&t.tagName.toLowerCase()!=="svg"&&t.setAttribute("xmlns","http://www.w3.org/1999/xhtml")})}function B(e,i){const n=e.querySelectorAll("foreignObject"),t=i.querySelectorAll("foreignObject");n.forEach((r,c)=>{const o=t[c];if(!r||!o)return;const l=r.firstElementChild,u=o.firstElementChild;l&&u&&F(l,u)})}function F(e,i){if(e.nodeType!==1||!i)return;v(e,i);const n=e.children||[],t=i.children||[];for(let r=0;r<n.length;r++)F(n[r],t[r])}async function D({container:e,scale:i=2}){if(!e)throw new Error("No container provided");await document.fonts.ready;let n=window.getComputedStyle(e).fontFamily||"Helvetica";n.toLowerCase().includes("helvetica")||(n+=", Helvetica");const t=e.cloneNode(!0),r=t.querySelectorAll("canvas"),c=e.querySelectorAll("canvas");for(let m=0;m<c.length;m+=1){const g=c[m],h=r[m];if(g&&h){const p=document.createElement("img");p.src=g.toDataURL("image/png"),p.width=g.width,p.height=g.height,p.style.width=g.style.width||g.width+"px",p.style.height=g.style.height||g.height+"px",h.replaceWith(p)}}const o=e.querySelector("svg[aria-label]"),l=t.querySelector("svg[aria-label]");if(o&&l){W(l),P(l),z(l,o),B(l,o),A(l),q(l,n);const m=o.getBoundingClientRect(),g=m.width,h=m.height,p=Math.round(g*i),R=Math.round(h*i),E=await M(l,p,R),w=document.createElement("img");w.src=E,w.width=g,w.height=h,w.style.width=g+"px",w.style.height=h+"px",l.parentNode.replaceChild(w,l)}v(t,e,n),T(t),await j(t);const{width:u,height:d}=e.getBoundingClientRect(),y=Math.round(Math.max(t.scrollWidth,u)*i),s=Math.round(Math.max(t.scrollHeight,d)*1.01*i),a=document.createElementNS(x.XMLNS,"svg");a.setAttribute("viewBox",`0 0 ${y} ${s}`),a.setAttribute("width",y),a.setAttribute("height",s),a.setAttribute("style",`font-family:${n};`);const f=document.createElementNS(x.XMLNS,"foreignObject");f.setAttribute("x",0),f.setAttribute("y",0),f.setAttribute("width",y),f.setAttribute("height",s),f.setAttribute("style",`font-family:${n};`),t.style.transform=`scale(${i})`,t.style.transformOrigin="top left",t.style.width=u+"px",t.style.height=d+"px",t.style.background=window.getComputedStyle(e).backgroundColor,f.appendChild(t),I(a),a.appendChild(f);const C=new XMLSerializer().serializeToString(a),O=L(C),S=new window.Image;return S.crossOrigin="anonymous",S.src=`data:image/svg+xml;base64,${O}`,new Promise((m,g)=>{S.onload=function(){try{const h=document.createElement("canvas");h.width=y,h.height=s,h.getContext("2d").drawImage(S,0,0,y,s),m(h.toDataURL("image/png",1))}catch(h){g("Failed to draw SVG on canvas: "+h)}},S.onerror=function(){g("Failed to load SVG image for conversion")}})}exports.domToPng=D;
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { X as x } from "./index-C9jn4-R2.js";
|
|
2
|
-
async function j(e) {
|
|
3
|
-
const i = e.querySelectorAll("img"), n = [];
|
|
4
|
-
i.forEach((t) => {
|
|
5
|
-
t.src && !t.src.startsWith("data:") && n.push(
|
|
6
|
-
new Promise((r) => {
|
|
7
|
-
const c = new window.Image();
|
|
8
|
-
c.crossOrigin = "anonymous", c.onload = function() {
|
|
9
|
-
try {
|
|
10
|
-
const o = document.createElement("canvas");
|
|
11
|
-
o.width = c.naturalWidth, o.height = c.naturalHeight, o.getContext("2d").drawImage(c, 0, 0), t.src = o.toDataURL();
|
|
12
|
-
} catch {
|
|
13
|
-
}
|
|
14
|
-
r();
|
|
15
|
-
}, c.onerror = function() {
|
|
16
|
-
r();
|
|
17
|
-
}, c.src = t.src;
|
|
18
|
-
})
|
|
19
|
-
);
|
|
20
|
-
}), await Promise.all(n);
|
|
21
|
-
}
|
|
22
|
-
function T(e) {
|
|
23
|
-
e.querySelectorAll("[data-dom-to-png-ignore]").forEach((n) => {
|
|
24
|
-
n.remove();
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function v(e, i, n) {
|
|
28
|
-
const t = window.getComputedStyle(i), r = i.getBoundingClientRect(), c = t.display.includes("flex");
|
|
29
|
-
let o = {}, l = e.getAttribute("style");
|
|
30
|
-
typeof l != "string" && (l = ""), l.split(";").forEach((s) => {
|
|
31
|
-
if (typeof s == "string" && s.trim()) {
|
|
32
|
-
const [a, u] = s.split(":");
|
|
33
|
-
a && u !== void 0 && (o[a.trim()] = u.trim());
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
for (let s = 0; s < t.length; s += 1) {
|
|
37
|
-
const a = t[s], u = t.getPropertyValue(a);
|
|
38
|
-
o[a] = u;
|
|
39
|
-
}
|
|
40
|
-
o.color = t.color, o["background-color"] = t.backgroundColor, o["font-family"] = t.fontFamily || n || "", o["font-size"] = t.fontSize, o["font-weight"] = t.fontWeight, (c || t.display.includes("grid") || ["inline-block", "absolute", "fixed"].includes(t.position)) && (r.width > 0 && (o.width = r.width + "px"), r.height > 0 && (o.height = r.height + "px")), c && t.flexWrap === "nowrap" && (o["white-space"] = "nowrap"), ["box-sizing", "padding", "margin", "border"].forEach((s) => {
|
|
41
|
-
o[s] = t.getPropertyValue(s);
|
|
42
|
-
}), o.overflow = "visible", o["overflow-x"] = "visible", o["overflow-y"] = "visible";
|
|
43
|
-
let f = "";
|
|
44
|
-
for (const s in o)
|
|
45
|
-
f += `${s}:${o[s]};`;
|
|
46
|
-
e.setAttribute("style", f);
|
|
47
|
-
const d = e.children || [], y = i.children || [];
|
|
48
|
-
for (let s = 0; s < d.length; s++)
|
|
49
|
-
d[s].nodeType === 1 && y[s] && v(d[s], y[s], n);
|
|
50
|
-
}
|
|
51
|
-
function q(e, i) {
|
|
52
|
-
e.querySelectorAll("text").forEach((t) => {
|
|
53
|
-
t.setAttribute("font-family", i), t.style.fontFamily = i;
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function $(e) {
|
|
57
|
-
const i = new TextEncoder().encode(e);
|
|
58
|
-
let n = "";
|
|
59
|
-
return i.forEach((t) => n += String.fromCharCode(t)), btoa(n);
|
|
60
|
-
}
|
|
61
|
-
function I(e, i, n) {
|
|
62
|
-
let r = new XMLSerializer().serializeToString(e);
|
|
63
|
-
r.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/) || (r = r.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"'));
|
|
64
|
-
const c = window.btoa(unescape(encodeURIComponent(r))), o = new window.Image();
|
|
65
|
-
return o.src = `data:image/svg+xml;base64,${c}`, new Promise((l, f) => {
|
|
66
|
-
o.onload = function() {
|
|
67
|
-
const d = document.createElement("canvas");
|
|
68
|
-
d.width = i, d.height = n, d.getContext("2d").drawImage(o, 0, 0, i, n), l(d.toDataURL("image/png", 1));
|
|
69
|
-
}, o.onerror = (d) => f(d);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function A(e) {
|
|
73
|
-
if (e.nodeType !== 1) return;
|
|
74
|
-
const i = window.getComputedStyle(e);
|
|
75
|
-
let n = "";
|
|
76
|
-
for (let t = 0; t < i.length; t++) {
|
|
77
|
-
const r = i[t];
|
|
78
|
-
n += `${r}:${i.getPropertyValue(r)};`;
|
|
79
|
-
}
|
|
80
|
-
e.setAttribute("style", n);
|
|
81
|
-
for (let t = 0; t < e.children.length; t++)
|
|
82
|
-
A(e.children[t]);
|
|
83
|
-
}
|
|
84
|
-
function L() {
|
|
85
|
-
const e = [];
|
|
86
|
-
for (const i of document.styleSheets)
|
|
87
|
-
try {
|
|
88
|
-
const n = i.cssRules;
|
|
89
|
-
if (!n) continue;
|
|
90
|
-
for (const t of n)
|
|
91
|
-
(typeof CSSFontFaceRule < "u" && t instanceof CSSFontFaceRule || t.cssText.trim().startsWith("@font-face")) && e.push(t.cssText);
|
|
92
|
-
} catch {
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
return e;
|
|
96
|
-
}
|
|
97
|
-
function z(e) {
|
|
98
|
-
const i = L();
|
|
99
|
-
if (!i.length) return;
|
|
100
|
-
const n = document.createElement("style");
|
|
101
|
-
n.setAttribute("type", "text/css"), n.textContent = i.join(`
|
|
102
|
-
`);
|
|
103
|
-
const t = e.querySelector("defs") || document.createElementNS(x, "defs");
|
|
104
|
-
t.appendChild(n), e.querySelector("defs") || e.insertBefore(t, e.firstChild);
|
|
105
|
-
}
|
|
106
|
-
function M(e, i) {
|
|
107
|
-
const n = e.querySelectorAll("foreignObject"), t = i.querySelectorAll("foreignObject");
|
|
108
|
-
n.forEach((r, c) => {
|
|
109
|
-
const o = t[c];
|
|
110
|
-
if (!o) return;
|
|
111
|
-
function l(f, d) {
|
|
112
|
-
if (!f || !d) return;
|
|
113
|
-
if (f.nodeType === 1 && d.nodeType === 1) {
|
|
114
|
-
const a = window.getComputedStyle(d);
|
|
115
|
-
let u = "";
|
|
116
|
-
for (let b = 0; b < a.length; b++) {
|
|
117
|
-
const C = a[b];
|
|
118
|
-
u += `${C}:${a.getPropertyValue(C)};`;
|
|
119
|
-
}
|
|
120
|
-
f.setAttribute("style", u);
|
|
121
|
-
}
|
|
122
|
-
const y = f.children || [], s = d.children || [];
|
|
123
|
-
for (let a = 0; a < y.length; a++)
|
|
124
|
-
l(y[a], s[a]);
|
|
125
|
-
}
|
|
126
|
-
l(r, o);
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
function P(e) {
|
|
130
|
-
e.querySelectorAll("foreignObject").forEach((n) => {
|
|
131
|
-
let t = "";
|
|
132
|
-
const r = Array.from(n.querySelectorAll("*"));
|
|
133
|
-
if (r.length !== 0) {
|
|
134
|
-
for (const c of document.styleSheets) {
|
|
135
|
-
let o;
|
|
136
|
-
try {
|
|
137
|
-
o = c.cssRules;
|
|
138
|
-
} catch {
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
if (o) {
|
|
142
|
-
for (const l of o)
|
|
143
|
-
if (!(typeof CSSStyleRule < "u" && !(l instanceof CSSStyleRule)))
|
|
144
|
-
try {
|
|
145
|
-
r.some((f) => f.matches(l.selectorText)) && (t += l.cssText + `
|
|
146
|
-
`);
|
|
147
|
-
} catch {
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (t) {
|
|
153
|
-
const c = document.createElement("style");
|
|
154
|
-
c.textContent = t, n.insertBefore(c, n.firstChild);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function W(e) {
|
|
160
|
-
e.querySelectorAll("foreignObject").forEach((n) => {
|
|
161
|
-
const t = n.firstElementChild;
|
|
162
|
-
t && t.tagName.toLowerCase() !== "svg" && t.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function B(e, i) {
|
|
166
|
-
const n = e.querySelectorAll("foreignObject"), t = i.querySelectorAll("foreignObject");
|
|
167
|
-
n.forEach((r, c) => {
|
|
168
|
-
const o = t[c];
|
|
169
|
-
if (!r || !o) return;
|
|
170
|
-
const l = r.firstElementChild, f = o.firstElementChild;
|
|
171
|
-
l && f && F(l, f);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
function F(e, i) {
|
|
175
|
-
if (e.nodeType !== 1 || !i) return;
|
|
176
|
-
v(e, i);
|
|
177
|
-
const n = e.children || [], t = i.children || [];
|
|
178
|
-
for (let r = 0; r < n.length; r++)
|
|
179
|
-
F(n[r], t[r]);
|
|
180
|
-
}
|
|
181
|
-
async function H({ container: e, scale: i = 2 }) {
|
|
182
|
-
if (!e) throw new Error("No container provided");
|
|
183
|
-
await document.fonts.ready;
|
|
184
|
-
let n = window.getComputedStyle(e).fontFamily || "Helvetica";
|
|
185
|
-
n.toLowerCase().includes("helvetica") || (n += ", Helvetica");
|
|
186
|
-
const t = e.cloneNode(!0), r = t.querySelectorAll("canvas"), c = e.querySelectorAll("canvas");
|
|
187
|
-
for (let m = 0; m < c.length; m += 1) {
|
|
188
|
-
const g = c[m], h = r[m];
|
|
189
|
-
if (g && h) {
|
|
190
|
-
const p = document.createElement("img");
|
|
191
|
-
p.src = g.toDataURL("image/png"), p.width = g.width, p.height = g.height, p.style.width = g.style.width || g.width + "px", p.style.height = g.style.height || g.height + "px", h.replaceWith(p);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
const o = e.querySelector("svg[aria-label]"), l = t.querySelector("svg[aria-label]");
|
|
195
|
-
if (o && l) {
|
|
196
|
-
W(l), P(l), M(l, o), B(l, o), A(l), q(l, n);
|
|
197
|
-
const m = o.getBoundingClientRect(), g = m.width, h = m.height, p = Math.round(g * i), R = Math.round(h * i), E = await I(l, p, R), w = document.createElement("img");
|
|
198
|
-
w.src = E, w.width = g, w.height = h, w.style.width = g + "px", w.style.height = h + "px", l.parentNode.replaceChild(w, l);
|
|
199
|
-
}
|
|
200
|
-
v(t, e, n), T(t), await j(t);
|
|
201
|
-
const { width: f, height: d } = e.getBoundingClientRect(), y = Math.round(Math.max(t.scrollWidth, f) * i), s = Math.round(Math.max(t.scrollHeight, d) * 1.01 * i), a = document.createElementNS(x, "svg");
|
|
202
|
-
a.setAttribute("viewBox", `0 0 ${y} ${s}`), a.setAttribute("width", y), a.setAttribute("height", s), a.setAttribute("style", `font-family:${n};`);
|
|
203
|
-
const u = document.createElementNS(x, "foreignObject");
|
|
204
|
-
u.setAttribute("x", 0), u.setAttribute("y", 0), u.setAttribute("width", y), u.setAttribute("height", s), u.setAttribute("style", `font-family:${n};`), t.style.transform = `scale(${i})`, t.style.transformOrigin = "top left", t.style.width = f + "px", t.style.height = d + "px", t.style.background = window.getComputedStyle(e).backgroundColor, u.appendChild(t), z(a), a.appendChild(u);
|
|
205
|
-
const C = new XMLSerializer().serializeToString(a), O = $(C), S = new window.Image();
|
|
206
|
-
return S.crossOrigin = "anonymous", S.src = `data:image/svg+xml;base64,${O}`, new Promise((m, g) => {
|
|
207
|
-
S.onload = function() {
|
|
208
|
-
try {
|
|
209
|
-
const h = document.createElement("canvas");
|
|
210
|
-
h.width = y, h.height = s, h.getContext("2d").drawImage(S, 0, 0, y, s), m(h.toDataURL("image/png", 1));
|
|
211
|
-
} catch (h) {
|
|
212
|
-
g("Failed to draw SVG on canvas: " + h);
|
|
213
|
-
}
|
|
214
|
-
}, S.onerror = function() {
|
|
215
|
-
g("Failed to load SVG image for conversion");
|
|
216
|
-
};
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
export {
|
|
220
|
-
H as d
|
|
221
|
-
};
|