vue-data-ui 2.6.3 → 2.6.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CUx3sy0R.cjs → Arrow-BxhrO7GM.cjs} +1 -1
- package/dist/{Arrow-CaNCmIG1.js → Arrow-DnRkz3cJ.js} +1 -1
- package/dist/{BaseIcon-DEUnx0Km.cjs → BaseIcon-BJi2tdtl.cjs} +1 -1
- package/dist/{BaseIcon-CFtrFJk8.js → BaseIcon-BhXkDb2X.js} +1 -1
- package/dist/DataTable-DN61toQQ.cjs +1 -0
- package/dist/{DataTable-g-vVSX5e.js → DataTable-HDq8aOyj.js} +16 -16
- package/dist/{Legend-D3s69_UE.js → Legend-Be3l-GsN.js} +2 -2
- package/dist/{Legend-14o6ysPB.cjs → Legend-CxDZJIS9.cjs} +1 -1
- package/dist/PackageVersion-Cg_0Xov6.cjs +1 -0
- package/dist/{PackageVersion-koLOUagZ.js → PackageVersion-DL-70o6h.js} +3 -3
- package/dist/{PenAndPaper-NARoVmb-.js → PenAndPaper-C1v_7F2S.js} +161 -152
- package/dist/PenAndPaper-DpBM14U6.cjs +1 -0
- package/dist/{Shape-DQcajuPX.cjs → Shape-BeLBzUjm.cjs} +1 -1
- package/dist/{Shape-BQwPhaQ2.js → Shape-DBqyaB9e.js} +1 -1
- package/dist/{Slicer-BHKjr5Ta.js → Slicer-BLv_S96I.js} +27 -28
- package/dist/Slicer-CvS2n5RR.cjs +1 -0
- package/dist/Title-CUoXs-XJ.cjs +1 -0
- package/dist/{Title-BrlBOQMX.js → Title-rp5eHDVc.js} +8 -6
- package/dist/{Tooltip-2BVEpShN.js → Tooltip-3XUFn6mK.js} +1 -1
- package/dist/{Tooltip-Ce3-d-Jl.cjs → Tooltip-TqkUkWoH.cjs} +1 -1
- package/dist/{index-TsXfF4RW.cjs → index-BfKO0mWG.cjs} +1 -1
- package/dist/{index-Sq6_Z5Ol.js → index-GSCW0GhW.js} +1 -1
- package/dist/{index.es-BPcAjoFs.cjs → index.es-BvQiZh48.cjs} +6 -6
- package/dist/{index.es-7iEFeLUn.js → index.es-CsuAZrEh.js} +156 -157
- package/dist/jspdf.es.min-BJ0rgkUJ.cjs +243 -0
- package/dist/{jspdf.es.min-BnFm7Kpu.js → jspdf.es.min-af-Xj86b.js} +3834 -3784
- package/dist/{pdf-BoHS1PAA.cjs → pdf-DV2jHb_u.cjs} +1 -1
- package/dist/{pdf-FHG-_t_f.js → pdf-d7kl0_wm.js} +1 -1
- package/dist/{purify.es-BwOkayRK.js → purify.es-CKk_t3XZ.js} +72 -72
- package/dist/purify.es-CYVvLED6.cjs +3 -0
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-AmCRQ0Mq.cjs → useNestedProp-D9fZbCk6.cjs} +1 -1
- package/dist/{useNestedProp-BmjPdxME.js → useNestedProp-Da-DNb_v.js} +1 -1
- package/dist/{usePrinter-DqLdu0d8.cjs → usePrinter-B3WcbJUK.cjs} +1 -1
- package/dist/{usePrinter-KhQnrZzM.js → usePrinter-BBNI0jHz.js} +3 -3
- package/dist/{vue-data-ui-BDtCPTUD.js → vue-data-ui-BMhjdzlo.js} +62 -63
- package/dist/{vue-data-ui-W8pd2Z-N.cjs → vue-data-ui-CFwQh6Nq.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CQarDWrH.cjs → vue-ui-3d-bar-CsS9ZcR3.cjs} +2 -2
- package/dist/{vue-ui-3d-bar-BSNWr70h.js → vue-ui-3d-bar-DDrynTng.js} +10 -10
- package/dist/{vue-ui-accordion-Cs3dJ86t.js → vue-ui-accordion-CON_m6tj.js} +3 -3
- package/dist/{vue-ui-accordion-DQr01ula.cjs → vue-ui-accordion-CmsJv79_.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CXRisfK0.cjs → vue-ui-age-pyramid-DgMe9Sqk.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-nfG0pqCk.js → vue-ui-age-pyramid-vU0sQoum.js} +11 -11
- package/dist/{vue-ui-annotator-D4f8pjvy.cjs → vue-ui-annotator-CtH1hYMx.cjs} +1 -1
- package/dist/{vue-ui-annotator-qbVoTl_7.js → vue-ui-annotator-DDRpeWP1.js} +2 -2
- package/dist/{vue-ui-bullet-tNkxVPL6.cjs → vue-ui-bullet-BPul6l6-.cjs} +2 -2
- package/dist/{vue-ui-bullet-C7O_SGrf.js → vue-ui-bullet-DE7BmFGO.js} +31 -31
- package/dist/{vue-ui-candlestick-C5w6Q5tA.js → vue-ui-candlestick-BGfV1DZA.js} +12 -12
- package/dist/{vue-ui-candlestick-CHWTbUPr.cjs → vue-ui-candlestick-D15TN1B5.cjs} +2 -2
- package/dist/vue-ui-carousel-table-BSa3YZb-.cjs +1 -0
- package/dist/{vue-ui-carousel-table-DhlknuHM.js → vue-ui-carousel-table-Bf9taWM2.js} +6 -5
- package/dist/{vue-ui-chestnut-DXSCCzCc.cjs → vue-ui-chestnut-8xbioUz3.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CxDFoe_1.js → vue-ui-chestnut-DxRlK4Ay.js} +8 -8
- package/dist/{vue-ui-circle-pack-8GcO3_Mk.js → vue-ui-circle-pack-CyDslseR.js} +12 -12
- package/dist/{vue-ui-circle-pack-DCVBrNSm.cjs → vue-ui-circle-pack-muRA6J_Y.cjs} +1 -1
- package/dist/{vue-ui-cursor-DqTG5Bkn.js → vue-ui-cursor-BHY7dRog.js} +3 -3
- package/dist/{vue-ui-cursor-ZG_l61-u.cjs → vue-ui-cursor-D4yJTLt5.cjs} +1 -1
- package/dist/vue-ui-dashboard-DE0dhNVo.cjs +1 -0
- package/dist/{vue-ui-dashboard-BUA1xet-.js → vue-ui-dashboard-Det8LJYN.js} +48 -48
- package/dist/{vue-ui-digits-BTw7SVPJ.cjs → vue-ui-digits-BzhR0Mcn.cjs} +1 -1
- package/dist/{vue-ui-digits-NaC5TAtZ.js → vue-ui-digits-Dt0qid-W.js} +3 -2
- package/dist/{vue-ui-donut-CxRlW3Wf.cjs → vue-ui-donut-DaL830Ey.cjs} +1 -1
- package/dist/{vue-ui-donut-BNUwbtTK.js → vue-ui-donut-DaZEHulO.js} +12 -12
- package/dist/{vue-ui-donut-evolution-CAmcyYYg.js → vue-ui-donut-evolution-DV83Qhft.js} +11 -11
- package/dist/{vue-ui-donut-evolution-MrRKOI1i.cjs → vue-ui-donut-evolution-Do_yzP73.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C6Lgic0q.cjs → vue-ui-dumbbell-D6RVlN16.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-B-HdfY_j.js → vue-ui-dumbbell-_iB2kwjj.js} +187 -187
- package/dist/{vue-ui-flow-BrQovUAh.js → vue-ui-flow-Dj9hwrL4.js} +31 -31
- package/dist/{vue-ui-flow-VBP_6WA8.cjs → vue-ui-flow-sPkKbG2Q.cjs} +1 -1
- package/dist/vue-ui-funnel-CPbO8wzf.cjs +1 -0
- package/dist/{vue-ui-funnel-B8-Uj9S3.js → vue-ui-funnel-vsQxjwYY.js} +11 -11
- package/dist/{vue-ui-galaxy-hElQRBl6.js → vue-ui-galaxy-CK0YM3XM.js} +12 -12
- package/dist/{vue-ui-galaxy-BbysRccu.cjs → vue-ui-galaxy-CbP6ke1z.cjs} +1 -1
- package/dist/{vue-ui-gauge-CgUeFE-O.cjs → vue-ui-gauge-Czyxfawo.cjs} +1 -1
- package/dist/{vue-ui-gauge-BxavhokI.js → vue-ui-gauge-yJY1BsSw.js} +7 -7
- package/dist/{vue-ui-gizmo-DSLh6fXp.cjs → vue-ui-gizmo-2asc_BoL.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Ci0pE9Nw.js → vue-ui-gizmo-Csxmw_4Z.js} +3 -3
- package/dist/{vue-ui-heatmap-D5QJROY5.cjs → vue-ui-heatmap-BoVcNorO.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BN1FdDqM.js → vue-ui-heatmap-DvtEgwd7.js} +10 -10
- package/dist/{vue-ui-history-plot-DqnirTGv.cjs → vue-ui-history-plot-DClZa2Vh.cjs} +1 -1
- package/dist/{vue-ui-history-plot-D8Y08JYH.js → vue-ui-history-plot-jXu_grNZ.js} +12 -12
- package/dist/{vue-ui-kpi-DbbXD09A.js → vue-ui-kpi-B9srgPYW.js} +3 -3
- package/dist/{vue-ui-kpi-DbKHOVxZ.cjs → vue-ui-kpi-BmLtKTLO.cjs} +1 -1
- package/dist/vue-ui-mini-loader-BRg64vUC.cjs +1 -0
- package/dist/{vue-ui-mini-loader-BbQzMsAO.js → vue-ui-mini-loader-BwE1E9sj.js} +7 -6
- package/dist/{vue-ui-molecule-CCPkPyjT.cjs → vue-ui-molecule-BmriFNB0.cjs} +1 -1
- package/dist/{vue-ui-molecule-DmZCUvJq.js → vue-ui-molecule-ZvqDoyQn.js} +50 -50
- package/dist/{vue-ui-mood-radar-CReqB6g6.js → vue-ui-mood-radar-CF_CFAho.js} +47 -46
- package/dist/vue-ui-mood-radar-CGhu07bI.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BwCtd7TA.js → vue-ui-nested-donuts-Co3gUruy.js} +12 -13
- package/dist/{vue-ui-nested-donuts-D93rQwDR.cjs → vue-ui-nested-donuts-TQhesJpT.cjs} +2 -2
- package/dist/{vue-ui-onion-Bts6tMCc.cjs → vue-ui-onion-BPTDTiWh.cjs} +1 -1
- package/dist/{vue-ui-onion-BMUjoxS_.js → vue-ui-onion-D5fU3bvZ.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CgujndZr.cjs → vue-ui-parallel-coordinate-plot-BDQK9tcd.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-Ce2wd0f5.js → vue-ui-parallel-coordinate-plot-S6Ru7Se6.js} +12 -12
- package/dist/{vue-ui-quadrant-CGSLYSYL.cjs → vue-ui-quadrant-CaWYkjaC.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C-jarCHF.js → vue-ui-quadrant-iUoaNCjW.js} +12 -12
- package/dist/{vue-ui-quick-chart-BJz8KURA.js → vue-ui-quick-chart-Bi37MmKx.js} +9 -9
- package/dist/{vue-ui-quick-chart-B0SVk7ry.cjs → vue-ui-quick-chart-C-RgDysS.cjs} +1 -1
- package/dist/{vue-ui-radar-BNi9EFmX.js → vue-ui-radar-CopgFTuf.js} +12 -12
- package/dist/{vue-ui-radar-Bn_j-SA4.cjs → vue-ui-radar-vLsuc2uC.cjs} +1 -1
- package/dist/{vue-ui-rating-H6zv15BL.cjs → vue-ui-rating-B5hwtW5c.cjs} +1 -1
- package/dist/{vue-ui-rating-ykC0fTg_.js → vue-ui-rating-DLpcRbMZ.js} +2 -2
- package/dist/{vue-ui-relation-circle-DeILJwJP.js → vue-ui-relation-circle-9JR989rq.js} +7 -7
- package/dist/{vue-ui-relation-circle-CcYVlwwi.cjs → vue-ui-relation-circle-DXtlx7Lb.cjs} +1 -1
- package/dist/{vue-ui-rings-DfFzFEA6.cjs → vue-ui-rings-BcsA17T9.cjs} +1 -1
- package/dist/{vue-ui-rings-CM4Yh4K7.js → vue-ui-rings-aF4qo-1b.js} +12 -12
- package/dist/{vue-ui-scatter-9l9U12tf.js → vue-ui-scatter-BKPsLeSZ.js} +12 -12
- package/dist/{vue-ui-scatter-CZBufI8b.cjs → vue-ui-scatter-CsrRv5Fs.cjs} +1 -1
- package/dist/{vue-ui-screenshot-BHMuQw8r.cjs → vue-ui-screenshot-CseUdcVu.cjs} +1 -1
- package/dist/{vue-ui-screenshot-lygBinT2.js → vue-ui-screenshot-D7IGq1jh.js} +1 -1
- package/dist/{vue-ui-skeleton-DhEZVP4j.js → vue-ui-skeleton-C0nuwFlf.js} +3 -3
- package/dist/{vue-ui-skeleton-D3N7upHq.cjs → vue-ui-skeleton-C9gd5UnC.cjs} +1 -1
- package/dist/{vue-ui-smiley-QyjA0TcO.js → vue-ui-smiley-BE7j-VIB.js} +74 -73
- package/dist/{vue-ui-smiley-ctSWt0nv.cjs → vue-ui-smiley-DTJ3ccy1.cjs} +2 -2
- package/dist/{vue-ui-spark-trend-C9mK9gsJ.cjs → vue-ui-spark-trend-D90EITXN.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CQu8fJyp.js → vue-ui-spark-trend-vfSFcF96.js} +5 -5
- package/dist/vue-ui-sparkbar-B58Oyi3V.cjs +1 -0
- package/dist/{vue-ui-sparkbar-1nTJch0Z.js → vue-ui-sparkbar-DIjx229h.js} +37 -36
- package/dist/vue-ui-sparkgauge-Cz_40HEF.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-Df4RaQL4.js → vue-ui-sparkgauge-DeshRwS5.js} +5 -4
- package/dist/{vue-ui-sparkhistogram-D2RUQcAo.js → vue-ui-sparkhistogram-ncgZ4wZw.js} +8 -7
- package/dist/vue-ui-sparkhistogram-r0bo1TVB.cjs +1 -0
- package/dist/{vue-ui-sparkline-ZWCxuBSn.js → vue-ui-sparkline-DkisQakm.js} +4 -4
- package/dist/{vue-ui-sparkline-CYIZ1DFh.cjs → vue-ui-sparkline-v244B9Zh.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DZWMi8IY.js → vue-ui-sparkstackbar-C1iw9bm9.js} +7 -6
- package/dist/vue-ui-sparkstackbar-DXGhRt_y.cjs +1 -0
- package/dist/{vue-ui-stackbar-CohW8Lni.js → vue-ui-stackbar-BJVWyXjW.js} +14 -14
- package/dist/{vue-ui-stackbar-DxA3vG2f.cjs → vue-ui-stackbar-BwLjbytq.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-CfKGbLE-.js → vue-ui-strip-plot-BfqGpkmV.js} +11 -11
- package/dist/{vue-ui-strip-plot-CUJtddMq.cjs → vue-ui-strip-plot-DyKHX-kX.cjs} +1 -1
- package/dist/{vue-ui-table-Di_YIf-o.cjs → vue-ui-table-DVxvUAL_.cjs} +1 -1
- package/dist/{vue-ui-table-CyewBxeG.js → vue-ui-table-DciQKFtv.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CgFby9Fm.cjs → vue-ui-table-heatmap-BAhB_Cgh.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-U735dVB7.js → vue-ui-table-heatmap-BFmXRCdL.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CI6fVXqD.js → vue-ui-table-sparkline-79PG8n93.js} +8 -8
- package/dist/vue-ui-table-sparkline-BateR2Nz.cjs +1 -0
- package/dist/{vue-ui-thermometer-3x4w5Bzf.cjs → vue-ui-thermometer-Bf5S9d7h.cjs} +1 -1
- package/dist/{vue-ui-thermometer-vg0OAZ-r.js → vue-ui-thermometer-Cv2PMArr.js} +7 -7
- package/dist/{vue-ui-timer-DH2x_4wH.cjs → vue-ui-timer-DPqbrtc0.cjs} +1 -1
- package/dist/{vue-ui-timer-u18zWozG.js → vue-ui-timer-p0-7GCR6.js} +5 -5
- package/dist/{vue-ui-tiremarks-CxKWI2fp.cjs → vue-ui-tiremarks-CnevyfMg.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DktQB0KM.js → vue-ui-tiremarks-DQg85vxU.js} +7 -7
- package/dist/{vue-ui-treemap-DlsJqd0C.cjs → vue-ui-treemap-CBRiSqHG.cjs} +1 -1
- package/dist/{vue-ui-treemap-CVOhnvNh.js → vue-ui-treemap-DYf1uva6.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BwOZxjR-.cjs → vue-ui-vertical-bar-BmevaDcu.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CdoSGi-B.js → vue-ui-vertical-bar-CRs5V3rk.js} +12 -12
- package/dist/{vue-ui-waffle-D4yjRBba.cjs → vue-ui-waffle-VI2f9E3q.cjs} +1 -1
- package/dist/{vue-ui-waffle-CajquWJE.js → vue-ui-waffle-mwsZ_eXx.js} +12 -12
- package/dist/{vue-ui-wheel-fTjcexDm.cjs → vue-ui-wheel-BA5MJUFr.cjs} +1 -1
- package/dist/{vue-ui-wheel-BlMIG6cZ.js → vue-ui-wheel-BrG1edQA.js} +7 -7
- package/dist/{vue-ui-word-cloud-BqqXPBt-.cjs → vue-ui-word-cloud-D0UHYoi6.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DL7Qnl9r.js → vue-ui-word-cloud-Z9GyNMNG.js} +10 -10
- package/dist/{vue-ui-xy-BA50z2Qp.js → vue-ui-xy-9bRzt40K.js} +15 -15
- package/dist/{vue-ui-xy-BrL3AnU6.cjs → vue-ui-xy-CAMdsd6U.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-kRxLPOUB.cjs → vue-ui-xy-canvas-BPxSRcBh.cjs} +3 -3
- package/dist/{vue-ui-xy-canvas-BL2xqLMH.js → vue-ui-xy-canvas-Bfhn01pO.js} +13 -13
- package/package.json +3 -3
- package/dist/DataTable-o267EcsS.cjs +0 -1
- package/dist/PackageVersion-GUCKUltM.cjs +0 -1
- package/dist/PenAndPaper-BFxCZMe_.cjs +0 -1
- package/dist/Slicer-D2-FPJ8d.cjs +0 -1
- package/dist/Title-IEvHjzFX.cjs +0 -1
- package/dist/jspdf.es.min-D9E1Pwzv.cjs +0 -243
- package/dist/purify.es-BJHiDXdY.cjs +0 -3
- package/dist/vue-ui-carousel-table-BnyQxoK_.cjs +0 -1
- package/dist/vue-ui-dashboard-CM_JWUb1.cjs +0 -1
- package/dist/vue-ui-funnel-BIupy22h.cjs +0 -1
- package/dist/vue-ui-mini-loader-FNEOkheZ.cjs +0 -1
- package/dist/vue-ui-mood-radar-Bqv_OukZ.cjs +0 -1
- package/dist/vue-ui-sparkbar-BlXSG_u8.cjs +0 -1
- package/dist/vue-ui-sparkgauge-Cu5HQYtA.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CbGVLioY.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-CkiTTddK.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DMo-8Xvd.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { G as
|
|
3
|
-
import
|
|
4
|
-
import { v as
|
|
1
|
+
import { ref as u, computed as W, watch as H, withDirectives as K, createElementBlock as p, openBlock as f, withKeys as ne, createElementVNode as C, createCommentVNode as Q, normalizeStyle as b, createVNode as M, Fragment as O, renderList as j, unref as G, onMounted as le, nextTick as re, onBeforeUnmount as ae, normalizeClass as z, vModelText as se, withModifiers as A } from "vue";
|
|
2
|
+
import { G as ue, l as ce, X as ie } from "./index-GSCW0GhW.js";
|
|
3
|
+
import D from "./BaseIcon-BhXkDb2X.js";
|
|
4
|
+
import { v as de } from "./usePrinter-BBNI0jHz.js";
|
|
5
5
|
import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
const
|
|
6
|
+
const ve = ["onClick"], pe = { style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -46%)" } }, fe = ["value"], ke = {
|
|
7
7
|
__name: "ColorPicker",
|
|
8
8
|
props: {
|
|
9
9
|
value: {
|
|
@@ -24,36 +24,39 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
emits: ["update:value"],
|
|
27
|
-
setup(r, { emit:
|
|
28
|
-
const k = r, R =
|
|
27
|
+
setup(r, { emit: V }) {
|
|
28
|
+
const k = r, R = V, g = u(null), F = W(() => ({
|
|
29
29
|
backgroundColor: k.value,
|
|
30
30
|
width: "100%",
|
|
31
31
|
height: "100%",
|
|
32
32
|
cursor: "pointer"
|
|
33
|
-
})),
|
|
34
|
-
var
|
|
35
|
-
(
|
|
33
|
+
})), S = u(null), h = u(!1), X = () => {
|
|
34
|
+
var c;
|
|
35
|
+
(c = S.value) == null || c.click();
|
|
36
36
|
};
|
|
37
|
-
function
|
|
38
|
-
R("update:value",
|
|
37
|
+
function x(c) {
|
|
38
|
+
R("update:value", c), h.value = !1;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
40
|
+
function L() {
|
|
41
|
+
h.value = !1;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function w() {
|
|
44
|
+
h.value && L();
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
R("update:value",
|
|
49
|
-
},
|
|
50
|
-
|
|
46
|
+
const B = (c) => {
|
|
47
|
+
const N = c.target.value;
|
|
48
|
+
R("update:value", N);
|
|
49
|
+
}, $ = W(() => ue(k.value));
|
|
50
|
+
async function P() {
|
|
51
|
+
h.value = !h.value;
|
|
52
|
+
}
|
|
53
|
+
H(
|
|
51
54
|
() => k.value,
|
|
52
|
-
(
|
|
53
|
-
|
|
55
|
+
(c) => {
|
|
56
|
+
S.value.value = c;
|
|
54
57
|
}
|
|
55
58
|
);
|
|
56
|
-
const
|
|
59
|
+
const T = u([
|
|
57
60
|
"#000000",
|
|
58
61
|
"#FFFFFF",
|
|
59
62
|
"#FF5733",
|
|
@@ -64,69 +67,75 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
64
67
|
"#FF1493",
|
|
65
68
|
"#00CED1"
|
|
66
69
|
]);
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
return (c, N) => K((f(), p("div", {
|
|
71
|
+
onKeydown: ne(w, ["esc"]),
|
|
72
|
+
style: { height: "100%", width: "100%", position: "relative" }
|
|
73
|
+
}, [
|
|
74
|
+
C("button", {
|
|
75
|
+
class: "icon",
|
|
76
|
+
onClick: P,
|
|
77
|
+
style: b(F.value)
|
|
71
78
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, null, 8, ["stroke"])
|
|
78
|
-
])
|
|
79
|
+
M(D, {
|
|
80
|
+
name: "palette",
|
|
81
|
+
stroke: $.value,
|
|
82
|
+
size: 22
|
|
83
|
+
}, null, 8, ["stroke"])
|
|
79
84
|
], 4),
|
|
80
|
-
|
|
85
|
+
h.value ? (f(), p("div", {
|
|
81
86
|
key: 0,
|
|
87
|
+
ref_key: "picker",
|
|
88
|
+
ref: g,
|
|
89
|
+
tabindex: "0",
|
|
82
90
|
class: "vue-ui-color-picker",
|
|
83
91
|
style: b({
|
|
84
92
|
backgroundColor: r.backgroundColor
|
|
85
93
|
})
|
|
86
94
|
}, [
|
|
87
|
-
(f(!0), p(
|
|
95
|
+
(f(!0), p(O, null, j(T.value, (E) => (f(), p("button", {
|
|
96
|
+
tabindex: "0",
|
|
88
97
|
class: "vue-ui-color-picker-option",
|
|
89
98
|
style: b({
|
|
90
|
-
backgroundColor:
|
|
99
|
+
backgroundColor: E,
|
|
91
100
|
outline: `1px solid ${r.buttonBorderColor}`
|
|
92
101
|
}),
|
|
93
|
-
onClick: () =>
|
|
94
|
-
}, null, 12,
|
|
95
|
-
C("
|
|
102
|
+
onClick: () => x(E)
|
|
103
|
+
}, null, 12, ve))), 256)),
|
|
104
|
+
C("button", {
|
|
96
105
|
class: "vue-ui-color-picker-option",
|
|
97
|
-
onClick:
|
|
106
|
+
onClick: X,
|
|
98
107
|
style: b({
|
|
99
108
|
backgroundColor: r.value,
|
|
100
109
|
outline: `1px solid ${r.buttonBorderColor}`
|
|
101
110
|
})
|
|
102
111
|
}, [
|
|
103
|
-
C("div",
|
|
104
|
-
|
|
112
|
+
C("div", pe, [
|
|
113
|
+
M(D, {
|
|
105
114
|
name: "colorPicker",
|
|
106
|
-
stroke:
|
|
115
|
+
stroke: $.value,
|
|
107
116
|
size: 22
|
|
108
117
|
}, null, 8, ["stroke"])
|
|
109
118
|
]),
|
|
110
119
|
C("input", {
|
|
111
120
|
ref_key: "colorInput",
|
|
112
|
-
ref:
|
|
121
|
+
ref: S,
|
|
113
122
|
type: "color",
|
|
114
123
|
value: r.value,
|
|
115
124
|
class: "hidden-input",
|
|
116
|
-
onInput:
|
|
117
|
-
}, null, 40,
|
|
125
|
+
onInput: B
|
|
126
|
+
}, null, 40, fe)
|
|
118
127
|
], 4)
|
|
119
|
-
], 4)) :
|
|
120
|
-
])), [
|
|
121
|
-
[G(
|
|
128
|
+
], 4)) : Q("", !0)
|
|
129
|
+
], 32)), [
|
|
130
|
+
[G(de), w]
|
|
122
131
|
]);
|
|
123
132
|
}
|
|
124
|
-
}, ge = /* @__PURE__ */ J(
|
|
125
|
-
class: /* @__PURE__ */
|
|
133
|
+
}, ge = /* @__PURE__ */ J(ke, [["__scopeId", "data-v-f6dd9192"]]), he = {
|
|
134
|
+
class: /* @__PURE__ */ z({
|
|
126
135
|
"vue-ui-pen-and-paper-action": !0
|
|
127
136
|
}),
|
|
128
137
|
style: { padding: "0 !important" }
|
|
129
|
-
},
|
|
138
|
+
}, me = ["disabled"], ye = ["xmlns", "viewBox"], Ce = ["cx", "cy", "r", "fill"], be = ["d", "stroke", "stroke-width"], Fe = ["d", "stroke", "stroke-width"], $e = {
|
|
130
139
|
__name: "PenAndPaper",
|
|
131
140
|
props: {
|
|
132
141
|
parent: {
|
|
@@ -146,68 +155,68 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
146
155
|
}
|
|
147
156
|
},
|
|
148
157
|
emits: ["close"],
|
|
149
|
-
setup(r, { emit:
|
|
150
|
-
const k = r, R =
|
|
151
|
-
function
|
|
152
|
-
|
|
158
|
+
setup(r, { emit: V }) {
|
|
159
|
+
const k = r, R = V, g = u([]), F = u([]), S = u("0 0 0 0"), h = u(k.color), X = u(1), x = W(() => ce(k.color, 0.6));
|
|
160
|
+
function L({ width: o, height: t }) {
|
|
161
|
+
S.value = `0 0 ${o} ${t}`;
|
|
153
162
|
}
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
163
|
+
const w = u(null);
|
|
164
|
+
le(() => {
|
|
165
|
+
re(() => {
|
|
157
166
|
if (k.parent) {
|
|
158
|
-
|
|
167
|
+
w.value = new ResizeObserver((e) => {
|
|
159
168
|
for (const n of e) {
|
|
160
169
|
const { width: l, height: a } = n.contentRect;
|
|
161
|
-
|
|
170
|
+
L({ width: l, height: a });
|
|
162
171
|
}
|
|
163
|
-
}),
|
|
172
|
+
}), w.value.observe(k.parent);
|
|
164
173
|
const { width: o, height: t } = k.parent.getBoundingClientRect();
|
|
165
|
-
|
|
174
|
+
L({ width: o, height: t });
|
|
166
175
|
}
|
|
167
176
|
});
|
|
168
|
-
}),
|
|
169
|
-
|
|
170
|
-
}),
|
|
177
|
+
}), ae(() => {
|
|
178
|
+
w.value && w.value.disconnect();
|
|
179
|
+
}), H(
|
|
171
180
|
() => k.parent,
|
|
172
181
|
(o) => {
|
|
173
182
|
if (!o) return;
|
|
174
183
|
const { width: t, height: e } = k.parent.getBoundingClientRect();
|
|
175
|
-
|
|
184
|
+
L({ width: t, height: e });
|
|
176
185
|
},
|
|
177
186
|
{ immediate: !0 }
|
|
178
187
|
);
|
|
179
|
-
const
|
|
180
|
-
function
|
|
181
|
-
if (!
|
|
182
|
-
|
|
183
|
-
const { x: t, y: e } =
|
|
184
|
-
|
|
188
|
+
const B = u(!1), $ = u(""), P = u(null);
|
|
189
|
+
function T(o) {
|
|
190
|
+
if (!P.value) return;
|
|
191
|
+
B.value = !0;
|
|
192
|
+
const { x: t, y: e } = q(o);
|
|
193
|
+
$.value = `M ${t} ${e}`;
|
|
185
194
|
}
|
|
186
|
-
function
|
|
187
|
-
if (!
|
|
188
|
-
const { x: t, y: e } =
|
|
189
|
-
|
|
195
|
+
function c(o) {
|
|
196
|
+
if (!B.value || !P.value) return;
|
|
197
|
+
const { x: t, y: e } = q(o);
|
|
198
|
+
$.value += ` ${t} ${e}`;
|
|
190
199
|
}
|
|
191
|
-
function
|
|
200
|
+
function N(o) {
|
|
192
201
|
const t = o.trim().split(/\s+/);
|
|
193
202
|
if (t.length < 4)
|
|
194
203
|
return o;
|
|
195
204
|
const e = t.slice(1).map(Number);
|
|
196
205
|
if (e.length % 2 !== 0)
|
|
197
206
|
return o;
|
|
198
|
-
const n =
|
|
207
|
+
const n = E(e), l = [`M ${n[0]} ${n[1]}`];
|
|
199
208
|
for (let i = 2; i < n.length - 2; i += 2) {
|
|
200
|
-
const
|
|
201
|
-
l.push(`Q ${
|
|
209
|
+
const m = n[i - 2], y = n[i - 1], d = n[i], v = n[i + 1], Y = (m + d) / 2, I = (y + v) / 2;
|
|
210
|
+
l.push(`Q ${m} ${y} ${Y} ${I}`);
|
|
202
211
|
}
|
|
203
212
|
const a = n[n.length - 2], s = n[n.length - 1];
|
|
204
213
|
return l.push(`L ${a} ${s}`), l.join(" ");
|
|
205
214
|
}
|
|
206
|
-
function
|
|
215
|
+
function E(o, t = 1) {
|
|
207
216
|
const e = [...o];
|
|
208
217
|
for (let n = 2; n < o.length - 2; n += 2) {
|
|
209
|
-
const l = o[n], a = o[n + 1], s = o[n - 2], i = o[n - 1],
|
|
210
|
-
e[n] = l + t * ((s +
|
|
218
|
+
const l = o[n], a = o[n + 1], s = o[n - 2], i = o[n - 1], m = o[n + 2], y = o[n + 3];
|
|
219
|
+
e[n] = l + t * ((s + m) / 2 - l), e[n + 1] = a + t * ((i + y) / 2 - a);
|
|
211
220
|
}
|
|
212
221
|
return e;
|
|
213
222
|
}
|
|
@@ -220,60 +229,60 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
220
229
|
if (n = i, n === "M" || n === "L")
|
|
221
230
|
l = parseFloat(t[++s]), a = parseFloat(t[++s]), e += `${n}${l} ${a}`;
|
|
222
231
|
else if (n === "Q") {
|
|
223
|
-
const
|
|
224
|
-
|
|
232
|
+
const m = parseFloat(t[++s]), y = parseFloat(t[++s]), d = parseFloat(t[++s]), v = parseFloat(t[++s]);
|
|
233
|
+
m === l && y === a ? e += `t${d - l} ${v - a}` : e += `q${m - l} ${y - a} ${d - l} ${v - a}`, l = d, a = v;
|
|
225
234
|
}
|
|
226
235
|
} else {
|
|
227
|
-
const
|
|
236
|
+
const m = parseFloat(i), y = parseFloat(t[++s]);
|
|
228
237
|
if (n === "L") {
|
|
229
|
-
const d =
|
|
230
|
-
d === 0 ? e += `v${v}` : v === 0 ? e += `h${d}` : e += `l${d} ${v}`, l =
|
|
238
|
+
const d = m - l, v = y - a;
|
|
239
|
+
d === 0 ? e += `v${v}` : v === 0 ? e += `h${d}` : e += `l${d} ${v}`, l = m, a = y;
|
|
231
240
|
} else if (n === "Q") {
|
|
232
|
-
const d =
|
|
241
|
+
const d = m, v = y, Y = parseFloat(t[++s]), I = parseFloat(t[++s]);
|
|
233
242
|
d === l && v === a ? e += `t${Y - l} ${I - a}` : e += `q${d - l} ${v - a} ${Y - l} ${I - a}`, l = Y, a = I;
|
|
234
243
|
}
|
|
235
244
|
}
|
|
236
245
|
}
|
|
237
246
|
return e;
|
|
238
247
|
}
|
|
239
|
-
function
|
|
240
|
-
|
|
241
|
-
strokeWidth:
|
|
242
|
-
path: Z(
|
|
243
|
-
color:
|
|
244
|
-
}),
|
|
248
|
+
function U() {
|
|
249
|
+
B.value && (g.value.push({
|
|
250
|
+
strokeWidth: X.value,
|
|
251
|
+
path: Z(N($.value)),
|
|
252
|
+
color: h.value
|
|
253
|
+
}), F.value = [], $.value = ""), B.value = !1;
|
|
245
254
|
}
|
|
246
|
-
function
|
|
247
|
-
if (!
|
|
248
|
-
const t =
|
|
255
|
+
function q(o) {
|
|
256
|
+
if (!P.value) return { x: 0, y: 0 };
|
|
257
|
+
const t = P.value.getBoundingClientRect();
|
|
249
258
|
let e, n;
|
|
250
259
|
return o.touches && o.touches.length ? (e = o.touches[0].clientX, n = o.touches[0].clientY) : (e = o.clientX, n = o.clientY), {
|
|
251
260
|
x: e - t.left,
|
|
252
261
|
y: n - t.top
|
|
253
262
|
};
|
|
254
263
|
}
|
|
255
|
-
|
|
264
|
+
u(!1);
|
|
256
265
|
function _() {
|
|
257
|
-
if (
|
|
258
|
-
const o =
|
|
259
|
-
|
|
266
|
+
if (g.value.length > 0) {
|
|
267
|
+
const o = g.value.pop();
|
|
268
|
+
F.value.push(o);
|
|
260
269
|
}
|
|
261
270
|
}
|
|
262
271
|
function ee() {
|
|
263
|
-
if (
|
|
264
|
-
const o =
|
|
265
|
-
|
|
272
|
+
if (F.value.length > 0) {
|
|
273
|
+
const o = F.value.pop();
|
|
274
|
+
g.value.push(o);
|
|
266
275
|
}
|
|
267
276
|
}
|
|
268
277
|
function te() {
|
|
269
|
-
|
|
278
|
+
g.value = [], F.value = [];
|
|
270
279
|
}
|
|
271
|
-
const oe =
|
|
272
|
-
return (o, t) => (f(), p(
|
|
280
|
+
const oe = u(null);
|
|
281
|
+
return (o, t) => (f(), p(O, null, [
|
|
273
282
|
r.active ? (f(), p("div", {
|
|
274
283
|
key: 0,
|
|
275
284
|
"data-html2canvas-ignore": "",
|
|
276
|
-
class:
|
|
285
|
+
class: z({
|
|
277
286
|
"vue-ui-pen-and-paper-actions": !0,
|
|
278
287
|
visible: r.active
|
|
279
288
|
})
|
|
@@ -286,40 +295,40 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
286
295
|
}),
|
|
287
296
|
onClick: t[0] || (t[0] = (e) => R("close"))
|
|
288
297
|
}, [
|
|
289
|
-
|
|
298
|
+
M(D, {
|
|
290
299
|
name: "close",
|
|
291
300
|
stroke: r.color
|
|
292
301
|
}, null, 8, ["stroke"])
|
|
293
302
|
], 4),
|
|
294
|
-
C("button",
|
|
295
|
-
|
|
296
|
-
value:
|
|
297
|
-
"onUpdate:value": t[1] || (t[1] = (e) =>
|
|
303
|
+
C("button", he, [
|
|
304
|
+
M(ge, {
|
|
305
|
+
value: h.value,
|
|
306
|
+
"onUpdate:value": t[1] || (t[1] = (e) => h.value = e),
|
|
298
307
|
backgroundColor: r.backgroundColor,
|
|
299
308
|
buttonBorderColor: x.value
|
|
300
309
|
}, null, 8, ["value", "backgroundColor", "buttonBorderColor"])
|
|
301
310
|
]),
|
|
302
311
|
C("button", {
|
|
303
|
-
class:
|
|
312
|
+
class: z({
|
|
304
313
|
"vue-ui-pen-and-paper-action": !0,
|
|
305
|
-
"vue-ui-pen-and-paper-action-disabled": !
|
|
314
|
+
"vue-ui-pen-and-paper-action-disabled": !g.value.length
|
|
306
315
|
}),
|
|
307
|
-
disabled: !
|
|
316
|
+
disabled: !g.value.length,
|
|
308
317
|
style: b({
|
|
309
318
|
backgroundColor: r.backgroundColor,
|
|
310
319
|
border: `1px solid ${x.value}`
|
|
311
320
|
}),
|
|
312
321
|
onClick: _
|
|
313
322
|
}, [
|
|
314
|
-
|
|
323
|
+
M(D, {
|
|
315
324
|
name: "restart",
|
|
316
325
|
stroke: r.color
|
|
317
326
|
}, null, 8, ["stroke"])
|
|
318
|
-
], 14,
|
|
327
|
+
], 14, me),
|
|
319
328
|
C("button", {
|
|
320
|
-
class:
|
|
329
|
+
class: z({
|
|
321
330
|
"vue-ui-pen-and-paper-action": !0,
|
|
322
|
-
"vue-ui-pen-and-paper-action-disabled": !
|
|
331
|
+
"vue-ui-pen-and-paper-action-disabled": !F.value.length
|
|
323
332
|
}),
|
|
324
333
|
style: b({
|
|
325
334
|
backgroundColor: r.backgroundColor,
|
|
@@ -327,16 +336,16 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
327
336
|
}),
|
|
328
337
|
onClick: ee
|
|
329
338
|
}, [
|
|
330
|
-
|
|
339
|
+
M(D, {
|
|
331
340
|
name: "restart",
|
|
332
341
|
stroke: r.color,
|
|
333
342
|
style: { transform: "scaleX(-1)" }
|
|
334
343
|
}, null, 8, ["stroke"])
|
|
335
344
|
], 6),
|
|
336
345
|
C("button", {
|
|
337
|
-
class:
|
|
346
|
+
class: z([{
|
|
338
347
|
"vue-ui-pen-and-paper-action": !0,
|
|
339
|
-
"vue-ui-pen-and-paper-action-disabled": !
|
|
348
|
+
"vue-ui-pen-and-paper-action-disabled": !g.value.length
|
|
340
349
|
}, "vue-ui-pen-and-paper-action"]),
|
|
341
350
|
style: b({
|
|
342
351
|
backgroundColor: r.backgroundColor,
|
|
@@ -344,12 +353,12 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
344
353
|
}),
|
|
345
354
|
onClick: te
|
|
346
355
|
}, [
|
|
347
|
-
|
|
356
|
+
M(D, {
|
|
348
357
|
name: "trash",
|
|
349
358
|
stroke: r.color
|
|
350
359
|
}, null, 8, ["stroke"])
|
|
351
360
|
], 6),
|
|
352
|
-
|
|
361
|
+
K(C("input", {
|
|
353
362
|
ref_key: "range",
|
|
354
363
|
ref: oe,
|
|
355
364
|
type: "range",
|
|
@@ -357,39 +366,39 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
357
366
|
min: 0.5,
|
|
358
367
|
max: 12,
|
|
359
368
|
step: 0.1,
|
|
360
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) =>
|
|
369
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => X.value = e),
|
|
361
370
|
style: b({
|
|
362
371
|
accentColor: r.color
|
|
363
372
|
})
|
|
364
373
|
}, null, 4), [
|
|
365
|
-
[
|
|
374
|
+
[se, X.value]
|
|
366
375
|
])
|
|
367
|
-
], 2)) :
|
|
376
|
+
], 2)) : Q("", !0),
|
|
368
377
|
(f(), p("svg", {
|
|
369
378
|
ref_key: "svgElement",
|
|
370
|
-
ref:
|
|
371
|
-
xmlns: G(
|
|
372
|
-
viewBox:
|
|
373
|
-
class:
|
|
379
|
+
ref: P,
|
|
380
|
+
xmlns: G(ie),
|
|
381
|
+
viewBox: S.value,
|
|
382
|
+
class: z({
|
|
374
383
|
"vue-ui-pen-and-paper": !0,
|
|
375
384
|
inactive: !r.active
|
|
376
385
|
}),
|
|
377
|
-
onMousedown:
|
|
378
|
-
onMousemove:
|
|
379
|
-
onMouseup:
|
|
380
|
-
onMouseleave:
|
|
381
|
-
onTouchstart:
|
|
382
|
-
onTouchmove:
|
|
383
|
-
onTouchend:
|
|
386
|
+
onMousedown: T,
|
|
387
|
+
onMousemove: c,
|
|
388
|
+
onMouseup: U,
|
|
389
|
+
onMouseleave: U,
|
|
390
|
+
onTouchstart: A(T, ["prevent"]),
|
|
391
|
+
onTouchmove: A(c, ["prevent"]),
|
|
392
|
+
onTouchend: U
|
|
384
393
|
}, [
|
|
385
|
-
(f(!0), p(
|
|
394
|
+
(f(!0), p(O, null, j(g.value, (e) => (f(), p(O, { key: e }, [
|
|
386
395
|
e.path.replace("M", "").split(" ").length === 2 ? (f(), p("circle", {
|
|
387
396
|
key: 0,
|
|
388
397
|
cx: e.path.replace("M", "").split(" ")[0],
|
|
389
398
|
cy: e.path.replace("M", "").split(" ")[1],
|
|
390
399
|
r: e.strokeWidth / 2,
|
|
391
400
|
fill: e.color
|
|
392
|
-
}, null, 8,
|
|
401
|
+
}, null, 8, Ce)) : (f(), p("path", {
|
|
393
402
|
key: 1,
|
|
394
403
|
class: "vue-ui-pen-and-paper-path",
|
|
395
404
|
d: e.path,
|
|
@@ -398,18 +407,18 @@ const de = { style: { height: "100%", width: "100%", position: "relative" } }, v
|
|
|
398
407
|
fill: "none"
|
|
399
408
|
}, null, 8, be))
|
|
400
409
|
], 64))), 128)),
|
|
401
|
-
|
|
410
|
+
B.value ? (f(), p("path", {
|
|
402
411
|
key: 0,
|
|
403
412
|
class: "vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",
|
|
404
|
-
d:
|
|
405
|
-
stroke:
|
|
406
|
-
"stroke-width":
|
|
413
|
+
d: N($.value),
|
|
414
|
+
stroke: h.value,
|
|
415
|
+
"stroke-width": X.value * 1.1,
|
|
407
416
|
fill: "none"
|
|
408
|
-
}, null, 8, Fe)) :
|
|
417
|
+
}, null, 8, Fe)) : Q("", !0)
|
|
409
418
|
], 42, ye))
|
|
410
419
|
], 64));
|
|
411
420
|
}
|
|
412
|
-
},
|
|
421
|
+
}, Se = /* @__PURE__ */ J($e, [["__scopeId", "data-v-7395a3bf"]]);
|
|
413
422
|
export {
|
|
414
|
-
|
|
423
|
+
Se as P
|
|
415
424
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),L=require("./index-BfKO0mWG.cjs"),w=require("./BaseIcon-BJi2tdtl.cjs"),W=require("./usePrinter-B3WcbJUK.cjs"),q=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),A=["onClick"],H={style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -46%)"}},Q=["value"],K={__name:"ColorPicker",props:{value:{type:String,default:"#ffffff"},size:{type:String,default:"50px"},backgroundColor:{type:String,default:"#FFFFFF"},buttonBorderColor:{type:String,default:"#FFFFFF"}},emits:["update:value"],setup(a,{emit:X}){const v=a,P=X,f=e.ref(null),h=e.computed(()=>({backgroundColor:v.value,width:"100%",height:"100%",cursor:"pointer"})),x=e.ref(null),k=e.ref(!1),B=()=>{var u;(u=x.value)==null||u.click()};function C(u){P("update:value",u),k.value=!1}function E(){k.value=!1}function b(){k.value&&E()}const F=u=>{const N=u.target.value;P("update:value",N)},y=e.computed(()=>L.adaptColorToBackground(v.value));async function $(){k.value=!k.value}e.watch(()=>v.value,u=>{x.value.value=u});const S=e.ref(["#000000","#FFFFFF","#FF5733","#33FF57","#3357FF","#FFC300","#800080","#FF1493","#00CED1"]);return(u,N)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{onKeydown:e.withKeys(b,["esc"]),style:{height:"100%",width:"100%",position:"relative"}},[e.createElementVNode("button",{class:"icon",onClick:$,style:e.normalizeStyle(h.value)},[e.createVNode(w.default,{name:"palette",stroke:y.value,size:22},null,8,["stroke"])],4),k.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"picker",ref:f,tabindex:"0",class:"vue-ui-color-picker",style:e.normalizeStyle({backgroundColor:a.backgroundColor})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,M=>(e.openBlock(),e.createElementBlock("button",{tabindex:"0",class:"vue-ui-color-picker-option",style:e.normalizeStyle({backgroundColor:M,outline:`1px solid ${a.buttonBorderColor}`}),onClick:()=>C(M)},null,12,A))),256)),e.createElementVNode("button",{class:"vue-ui-color-picker-option",onClick:B,style:e.normalizeStyle({backgroundColor:a.value,outline:`1px solid ${a.buttonBorderColor}`})},[e.createElementVNode("div",H,[e.createVNode(w.default,{name:"colorPicker",stroke:y.value,size:22},null,8,["stroke"])]),e.createElementVNode("input",{ref_key:"colorInput",ref:x,type:"color",value:a.value,class:"hidden-input",onInput:F},null,40,Q)],4)],4)):e.createCommentVNode("",!0)],32)),[[e.unref(W.vClickOutside),b]])}},_=q._export_sfc(K,[["__scopeId","data-v-f6dd9192"]]),j={class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0}),style:{padding:"0 !important"}},G=["disabled"],J=["xmlns","viewBox"],Z=["cx","cy","r","fill"],ee=["d","stroke","stroke-width"],te=["d","stroke","stroke-width"],oe={__name:"PenAndPaper",props:{parent:{type:HTMLElement},backgroundColor:{type:String,default:"#FFFFFF"},color:{type:String,default:"#2D353C"},active:{type:Boolean,default:!1}},emits:["close"],setup(a,{emit:X}){const v=a,P=X,f=e.ref([]),h=e.ref([]),x=e.ref("0 0 0 0"),k=e.ref(v.color),B=e.ref(1),C=e.computed(()=>L.lightenHexColor(v.color,.6));function E({width:n,height:o}){x.value=`0 0 ${n} ${o}`}const b=e.ref(null);e.onMounted(()=>{e.nextTick(()=>{if(v.parent){b.value=new ResizeObserver(t=>{for(const l of t){const{width:r,height:c}=l.contentRect;E({width:r,height:c})}}),b.value.observe(v.parent);const{width:n,height:o}=v.parent.getBoundingClientRect();E({width:n,height:o})}})}),e.onBeforeUnmount(()=>{b.value&&b.value.disconnect()}),e.watch(()=>v.parent,n=>{if(!n)return;const{width:o,height:t}=v.parent.getBoundingClientRect();E({width:o,height:t})},{immediate:!0});const F=e.ref(!1),y=e.ref(""),$=e.ref(null);function S(n){if(!$.value)return;F.value=!0;const{x:o,y:t}=Y(n);y.value=`M ${o} ${t}`}function u(n){if(!F.value||!$.value)return;const{x:o,y:t}=Y(n);y.value+=` ${o} ${t}`}function N(n){const o=n.trim().split(/\s+/);if(o.length<4)return n;const t=o.slice(1).map(Number);if(t.length%2!==0)return n;const l=M(t),r=[`M ${l[0]} ${l[1]}`];for(let i=2;i<l.length-2;i+=2){const m=l[i-2],g=l[i-1],d=l[i],p=l[i+1],V=(m+d)/2,z=(g+p)/2;r.push(`Q ${m} ${g} ${V} ${z}`)}const c=l[l.length-2],s=l[l.length-1];return r.push(`L ${c} ${s}`),r.join(" ")}function M(n,o=1){const t=[...n];for(let l=2;l<n.length-2;l+=2){const r=n[l],c=n[l+1],s=n[l-2],i=n[l-1],m=n[l+2],g=n[l+3];t[l]=r+o*((s+m)/2-r),t[l+1]=c+o*((i+g)/2-c)}return t}function I(n){const o=n.trim().split(/\s+/);let t="",l="",r=null,c=null;for(let s=0;s<o.length;s+=1){const i=o[s];if(isNaN(i)){if(l=i,l==="M"||l==="L")r=parseFloat(o[++s]),c=parseFloat(o[++s]),t+=`${l}${r} ${c}`;else if(l==="Q"){const m=parseFloat(o[++s]),g=parseFloat(o[++s]),d=parseFloat(o[++s]),p=parseFloat(o[++s]);m===r&&g===c?t+=`t${d-r} ${p-c}`:t+=`q${m-r} ${g-c} ${d-r} ${p-c}`,r=d,c=p}}else{const m=parseFloat(i),g=parseFloat(o[++s]);if(l==="L"){const d=m-r,p=g-c;d===0?t+=`v${p}`:p===0?t+=`h${d}`:t+=`l${d} ${p}`,r=m,c=g}else if(l==="Q"){const d=m,p=g,V=parseFloat(o[++s]),z=parseFloat(o[++s]);d===r&&p===c?t+=`t${V-r} ${z-c}`:t+=`q${d-r} ${p-c} ${V-r} ${z-c}`,r=V,c=z}}}return t}function D(){F.value&&(f.value.push({strokeWidth:B.value,path:I(N(y.value)),color:k.value}),h.value=[],y.value=""),F.value=!1}function Y(n){if(!$.value)return{x:0,y:0};const o=$.value.getBoundingClientRect();let t,l;return n.touches&&n.touches.length?(t=n.touches[0].clientX,l=n.touches[0].clientY):(t=n.clientX,l=n.clientY),{x:t-o.left,y:l-o.top}}e.ref(!1);function R(){if(f.value.length>0){const n=f.value.pop();h.value.push(n)}}function T(){if(h.value.length>0){const n=h.value.pop();f.value.push(n)}}function O(){f.value=[],h.value=[]}const U=e.ref(null);return(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.active?(e.openBlock(),e.createElementBlock("div",{key:0,"data-html2canvas-ignore":"",class:e.normalizeClass({"vue-ui-pen-and-paper-actions":!0,visible:a.active})},[e.createElementVNode("button",{class:"vue-ui-pen-and-paper-action",style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${C.value}`}),onClick:o[0]||(o[0]=t=>P("close"))},[e.createVNode(w.default,{name:"close",stroke:a.color},null,8,["stroke"])],4),e.createElementVNode("button",j,[e.createVNode(_,{value:k.value,"onUpdate:value":o[1]||(o[1]=t=>k.value=t),backgroundColor:a.backgroundColor,buttonBorderColor:C.value},null,8,["value","backgroundColor","buttonBorderColor"])]),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!f.value.length}),disabled:!f.value.length,style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${C.value}`}),onClick:R},[e.createVNode(w.default,{name:"restart",stroke:a.color},null,8,["stroke"])],14,G),e.createElementVNode("button",{class:e.normalizeClass({"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!h.value.length}),style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${C.value}`}),onClick:T},[e.createVNode(w.default,{name:"restart",stroke:a.color,style:{transform:"scaleX(-1)"}},null,8,["stroke"])],6),e.createElementVNode("button",{class:e.normalizeClass([{"vue-ui-pen-and-paper-action":!0,"vue-ui-pen-and-paper-action-disabled":!f.value.length},"vue-ui-pen-and-paper-action"]),style:e.normalizeStyle({backgroundColor:a.backgroundColor,border:`1px solid ${C.value}`}),onClick:O},[e.createVNode(w.default,{name:"trash",stroke:a.color},null,8,["stroke"])],6),e.withDirectives(e.createElementVNode("input",{ref_key:"range",ref:U,type:"range",class:"vertical-range",min:.5,max:12,step:.1,"onUpdate:modelValue":o[2]||(o[2]=t=>B.value=t),style:e.normalizeStyle({accentColor:a.color})},null,4),[[e.vModelText,B.value]])],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{ref_key:"svgElement",ref:$,xmlns:e.unref(L.XMLNS),viewBox:x.value,class:e.normalizeClass({"vue-ui-pen-and-paper":!0,inactive:!a.active}),onMousedown:S,onMousemove:u,onMouseup:D,onMouseleave:D,onTouchstart:e.withModifiers(S,["prevent"]),onTouchmove:e.withModifiers(u,["prevent"]),onTouchend:D},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,t=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:t},[t.path.replace("M","").split(" ").length===2?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:t.path.replace("M","").split(" ")[0],cy:t.path.replace("M","").split(" ")[1],r:t.strokeWidth/2,fill:t.color},null,8,Z)):(e.openBlock(),e.createElementBlock("path",{key:1,class:"vue-ui-pen-and-paper-path",d:t.path,stroke:t.color,"stroke-width":t.strokeWidth,fill:"none"},null,8,ee))],64))),128)),F.value?(e.openBlock(),e.createElementBlock("path",{key:0,class:"vue-ui-pen-and-paper-path vue-ui-pen-and-paper-path-drawing",d:N(y.value),stroke:k.value,"stroke-width":B.value*1.1,fill:"none"},null,8,te)):e.createCommentVNode("",!0)],42,J))],64))}},ne=q._export_sfc(oe,[["__scopeId","data-v-7395a3bf"]]);exports.PenAndPaper=ne;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("vue"),a=require("./index-
|
|
1
|
+
"use strict";const o=require("vue"),a=require("./index-BfKO0mWG.cjs"),c=["cx","cy","r","fill","stroke","stroke-width"],v=["d","fill","stroke","stroke-width"],p=["points","fill","stroke","stroke-width"],f={__name:"Shape",props:{color:String,isSelected:{type:Boolean,default:!1},limit:{type:Number,default:3},plot:Object,radius:Number,shape:String,stroke:String,strokeWidth:Number,zoom:{type:Number,default:1.3}},emits:["mouseover","mouseout","click"],setup(n,{emit:m}){const e=n,i=m;function d(u){return{circle:{points:1,rotation:0},line:{points:2,rotation:0},triangle:{points:3,rotation:.52},square:{points:4,rotation:.783},diamond:{points:4,rotation:0},pentagon:{points:5,rotation:.95},hexagon:{points:6,rotation:0}}[u]}const l=o.computed(()=>d(e.shape)),s=o.computed(()=>e.shape!=="star"?null:a.createStar({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1)})),k=o.computed(()=>a.createPolygonPath({plot:{x:e.plot.x,y:e.plot.y},radius:e.radius*(e.isSelected?e.zoom:1),sides:l.value.points,rotation:l.value.rotation}).path);return(u,t)=>(o.openBlock(),o.createElementBlock("g",null,[l.value&&l.value.points===1?(o.openBlock(),o.createElementBlock("circle",{key:0,cx:n.plot.x,cy:n.plot.y,r:e.radius*(e.isSelected?e.zoom:1),fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[0]||(t[0]=r=>i("mouseover")),onMouseout:t[1]||(t[1]=r=>i("mouseout")),onClick:t[2]||(t[2]=r=>i("click"))},null,40,c)):o.createCommentVNode("",!0),l.value&&l.value.points>=n.limit?(o.openBlock(),o.createElementBlock("path",{key:1,d:k.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[3]||(t[3]=r=>i("mouseover")),onMouseout:t[4]||(t[4]=r=>i("mouseout")),onClick:t[5]||(t[5]=r=>i("click"))},null,40,v)):o.createCommentVNode("",!0),s.value?(o.openBlock(),o.createElementBlock("polygon",{key:2,points:s.value,fill:n.color,stroke:n.stroke,"stroke-width":n.strokeWidth,onMouseover:t[6]||(t[6]=r=>i("mouseover")),onMouseout:t[7]||(t[7]=r=>i("mouseout")),onClick:t[8]||(t[8]=r=>i("click"))},null,40,p)):o.createCommentVNode("",!0)]))}};exports._sfc_main=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed as u, createElementBlock as s, openBlock as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { W as f, P as y } from "./index-
|
|
2
|
+
import { W as f, P as y } from "./index-GSCW0GhW.js";
|
|
3
3
|
const c = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], g = ["d", "fill", "stroke", "stroke-width"], x = ["points", "fill", "stroke", "stroke-width"], w = {
|
|
4
4
|
__name: "Shape",
|
|
5
5
|
props: {
|