vue-data-ui 3.26.5 → 3.27.1-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/A11yDataTable-DWNlWXzs.js +1 -0
- package/dist/Arrow-CJeSufxg.js +1 -0
- package/dist/BaseDraggableDialog-T1gEsQid.js +1 -0
- package/dist/BaseIcon-Cz30ODFA.js +1 -0
- package/dist/BaseLegendToggle-Dn_tNvn4.js +1 -0
- package/dist/BaseScanner-8NdoBs7B.js +1 -0
- package/dist/BaseZoomControls-xq3tWD3j.js +1 -0
- package/dist/ColorPicker-CUjEw53A.js +1 -0
- package/dist/DataTable-DSUA5M9p.js +1 -0
- package/dist/DefGrad-DKMq1REY.js +1 -0
- package/dist/HillActions-DdvXld3a.js +1 -0
- package/dist/Legend-DokTll4u.js +1 -0
- package/dist/NonSvgPenAndPaper-BLzQuIm6.js +1 -0
- package/dist/PackageVersion-D6pKL176.js +1 -0
- package/dist/PenAndPaper-DvJJaeU2.js +1 -0
- package/dist/RecursiveCircles-BftI1kwF.js +1 -0
- package/dist/RecursiveLabels-B0d04xSj.js +1 -0
- package/dist/RecursiveLinks-CZtG6uWg.js +1 -0
- package/dist/Shape-tkp65OcG.js +1 -0
- package/dist/SlicerPreview-GFRs2EWB.js +1 -0
- package/dist/SparkTooltip-BlJLvizH.js +1 -0
- package/dist/Title-BRAjxtjG.js +1 -0
- package/dist/Tooltip-BUXB0i6z.js +1 -0
- package/dist/UserOptions-D65t74CM.js +1 -0
- package/dist/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
- package/dist/annotationSlots-BRR85CqJ.js +1 -0
- package/dist/chartImage-NwZO-elv.js +1 -0
- package/dist/components/arrow.js +1 -2
- package/dist/components/vue-ui-3d-bar.js +1 -2
- package/dist/components/vue-ui-accordion.js +1 -2
- package/dist/components/vue-ui-age-pyramid.js +1 -2
- package/dist/components/vue-ui-annotator.js +1 -2
- package/dist/components/vue-ui-bullet.js +1 -2
- package/dist/components/vue-ui-bump.js +1 -2
- package/dist/components/vue-ui-candlestick.js +1 -2
- package/dist/components/vue-ui-carousel-table.js +1 -2
- package/dist/components/vue-ui-chestnut.js +1 -2
- package/dist/components/vue-ui-chord.js +1 -2
- package/dist/components/vue-ui-circle-pack.js +1 -2
- package/dist/components/vue-ui-cursor.js +1 -2
- package/dist/components/vue-ui-dag.js +1 -2
- package/dist/components/vue-ui-dashboard.js +1 -2
- package/dist/components/vue-ui-digits.js +1 -2
- package/dist/components/vue-ui-donut-evolution.js +1 -2
- package/dist/components/vue-ui-donut.js +1 -2
- package/dist/components/vue-ui-dumbbell.js +1 -2
- package/dist/components/vue-ui-flow.js +1 -2
- package/dist/components/vue-ui-funnel.js +1 -2
- package/dist/components/vue-ui-galaxy.js +1 -2
- package/dist/components/vue-ui-gauge.js +1 -2
- package/dist/components/vue-ui-geo.js +1 -2
- package/dist/components/vue-ui-gizmo.js +1 -2
- package/dist/components/vue-ui-heatmap.js +1 -2
- package/dist/components/vue-ui-hill.js +1 -2
- package/dist/components/vue-ui-history-plot.js +1 -2
- package/dist/components/vue-ui-horizontal-bar.js +1 -2
- package/dist/components/vue-ui-icon.js +1 -2
- package/dist/components/vue-ui-kpi.js +1 -2
- package/dist/components/vue-ui-label.js +1 -2
- package/dist/components/vue-ui-mini-loader.js +1 -2
- package/dist/components/vue-ui-molecule.js +1 -2
- package/dist/components/vue-ui-mood-radar.js +1 -2
- package/dist/components/vue-ui-nested-donuts.js +1 -2
- package/dist/components/vue-ui-onion.js +1 -2
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -2
- package/dist/components/vue-ui-pattern-seed.js +1 -2
- package/dist/components/vue-ui-pattern.js +1 -2
- package/dist/components/vue-ui-quadrant.js +1 -2
- package/dist/components/vue-ui-quick-chart.js +1 -2
- package/dist/components/vue-ui-radar.js +1 -2
- package/dist/components/vue-ui-rating.js +1 -2
- package/dist/components/vue-ui-relation-circle.js +1 -2
- package/dist/components/vue-ui-ridgeline.js +1 -2
- package/dist/components/vue-ui-rings.js +1 -2
- package/dist/components/vue-ui-scatter.js +1 -2
- package/dist/components/vue-ui-skeleton.js +1 -2
- package/dist/components/vue-ui-smiley.js +1 -2
- package/dist/components/vue-ui-spark-trend.js +1 -2
- package/dist/components/vue-ui-sparkbar.js +1 -2
- package/dist/components/vue-ui-sparkgauge.js +1 -2
- package/dist/components/vue-ui-sparkhistogram.js +1 -2
- package/dist/components/vue-ui-sparkline.js +1 -2
- package/dist/components/vue-ui-sparkstackbar.js +1 -2
- package/dist/components/vue-ui-stackbar.js +1 -2
- package/dist/components/vue-ui-stackline.js +1 -2
- package/dist/components/vue-ui-strip-plot.js +1 -2
- package/dist/components/vue-ui-table-heatmap.js +1 -2
- package/dist/components/vue-ui-table-sparkline.js +1 -2
- package/dist/components/vue-ui-table.js +1 -2
- package/dist/components/vue-ui-thermometer.js +1 -2
- package/dist/components/vue-ui-timer.js +1 -2
- package/dist/components/vue-ui-tiremarks.js +1 -2
- package/dist/components/vue-ui-treemap.js +1 -2
- package/dist/components/vue-ui-vertical-bar.js +1 -2
- package/dist/components/vue-ui-waffle.js +1 -2
- package/dist/components/vue-ui-wheel.js +1 -2
- package/dist/components/vue-ui-word-cloud.js +1 -2
- package/dist/components/vue-ui-world.js +1 -2
- package/dist/components/vue-ui-xy-canvas.js +1 -2
- package/dist/components/vue-ui-xy.js +1 -2
- package/dist/composables.js +1 -5
- package/dist/dom-to-png-Cp3WLHmJ.js +3 -0
- package/dist/exposedLib-CMTeSmyW.js +1 -0
- package/dist/geoProjections-Bvj-eMvq.js +1 -0
- package/dist/img-8sM3sVWU.js +1 -0
- package/dist/labelUtils-Djp5nJtN.js +1 -0
- package/dist/lib-zDxoqrgo.js +12 -0
- package/dist/package-DIR2F6AE.js +1 -0
- package/dist/patternUtils-_q3ArM3g.js +1 -0
- package/dist/pdf-Dlv_ks7R.js +1 -0
- package/dist/render-common-DOYi0f4Z.js +1 -0
- package/dist/resolveChartConfig-BSo1Oe9n.js +1 -0
- package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/dist/ssr/vue-ui-donut.js +1 -2
- package/dist/ssr/vue-ui-xy.js +1 -2
- package/dist/ssr.js +1 -3
- package/dist/style.css +1 -1
- package/dist/tableIntegration-CNoJ1CIY.js +1 -0
- package/dist/types/composables.d.ts +12 -12
- package/dist/types/ssr.d.ts +84 -84
- package/dist/types/utils.d.ts +82 -73
- package/dist/types/vue-data-ui.d.ts +17969 -17813
- package/dist/types/vue-ui-3d-bar.d.ts +24 -91
- package/dist/types/vue-ui-accordion.d.ts +2 -10
- package/dist/types/vue-ui-age-pyramid.d.ts +27 -106
- package/dist/types/vue-ui-annotator.d.ts +12 -88
- package/dist/types/vue-ui-bullet.d.ts +21 -83
- package/dist/types/vue-ui-bump.d.ts +23 -90
- package/dist/types/vue-ui-candlestick.d.ts +27 -108
- package/dist/types/vue-ui-carousel-table.d.ts +11 -57
- package/dist/types/vue-ui-chestnut.d.ts +27 -96
- package/dist/types/vue-ui-chord.d.ts +31 -108
- package/dist/types/vue-ui-circle-pack.d.ts +30 -124
- package/dist/types/vue-ui-cursor.d.ts +2 -8
- package/dist/types/vue-ui-dag.d.ts +35 -125
- package/dist/types/vue-ui-dashboard.d.ts +18 -66
- package/dist/types/vue-ui-digits.d.ts +2 -11
- package/dist/types/vue-ui-donut-evolution.d.ts +31 -100
- package/dist/types/vue-ui-donut.d.ts +31 -121
- package/dist/types/vue-ui-dumbbell.d.ts +24 -92
- package/dist/types/vue-ui-flow.d.ts +28 -104
- package/dist/types/vue-ui-funnel.d.ts +18 -77
- package/dist/types/vue-ui-galaxy.d.ts +30 -112
- package/dist/types/vue-ui-gauge.d.ts +22 -87
- package/dist/types/vue-ui-geo.d.ts +22 -92
- package/dist/types/vue-ui-gizmo.d.ts +5 -20
- package/dist/types/vue-ui-heatmap.d.ts +25 -101
- package/dist/types/vue-ui-hill.d.ts +22 -88
- package/dist/types/vue-ui-history-plot.d.ts +30 -112
- package/dist/types/vue-ui-horizontal-bar.d.ts +30 -114
- package/dist/types/vue-ui-icon.d.ts +1 -13
- package/dist/types/vue-ui-kpi.d.ts +5 -23
- package/dist/types/vue-ui-label.d.ts +11 -48
- package/dist/types/vue-ui-mini-loader.d.ts +4 -13
- package/dist/types/vue-ui-molecule.d.ts +27 -110
- package/dist/types/vue-ui-mood-radar.d.ts +23 -90
- package/dist/types/vue-ui-nested-donuts.d.ts +28 -109
- package/dist/types/vue-ui-onion.d.ts +26 -104
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +34 -123
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -14
- package/dist/types/vue-ui-pattern.d.ts +1 -13
- package/dist/types/vue-ui-quadrant.d.ts +33 -123
- package/dist/types/vue-ui-quick-chart.d.ts +30 -110
- package/dist/types/vue-ui-radar.d.ts +31 -114
- package/dist/types/vue-ui-rating.d.ts +8 -40
- package/dist/types/vue-ui-relation-circle.d.ts +26 -90
- package/dist/types/vue-ui-ridgeline.d.ts +27 -104
- package/dist/types/vue-ui-rings.d.ts +21 -96
- package/dist/types/vue-ui-scatter.d.ts +22 -95
- package/dist/types/vue-ui-skeleton.d.ts +2 -10
- package/dist/types/vue-ui-smiley.d.ts +6 -26
- package/dist/types/vue-ui-spark-trend.d.ts +2 -18
- package/dist/types/vue-ui-sparkbar.d.ts +10 -47
- package/dist/types/vue-ui-sparkgauge.d.ts +5 -26
- package/dist/types/vue-ui-sparkhistogram.d.ts +12 -44
- package/dist/types/vue-ui-sparkline.d.ts +16 -61
- package/dist/types/vue-ui-sparkstackbar.d.ts +13 -58
- package/dist/types/vue-ui-stackbar.d.ts +36 -120
- package/dist/types/vue-ui-stackline.d.ts +29 -116
- package/dist/types/vue-ui-strip-plot.d.ts +22 -96
- package/dist/types/vue-ui-table-heatmap.d.ts +14 -60
- package/dist/types/vue-ui-table-sparkline.d.ts +12 -51
- package/dist/types/vue-ui-table.d.ts +9 -36
- package/dist/types/vue-ui-thermometer.d.ts +14 -68
- package/dist/types/vue-ui-timer.d.ts +10 -47
- package/dist/types/vue-ui-tiremarks.d.ts +14 -68
- package/dist/types/vue-ui-treemap.d.ts +26 -105
- package/dist/types/vue-ui-vertical-bar.d.ts +8 -19
- package/dist/types/vue-ui-waffle.d.ts +23 -99
- package/dist/types/vue-ui-wheel.d.ts +14 -68
- package/dist/types/vue-ui-word-cloud.d.ts +20 -95
- package/dist/types/vue-ui-world.d.ts +22 -96
- package/dist/types/vue-ui-xy-canvas.d.ts +24 -101
- package/dist/types/vue-ui-xy.d.ts +42 -146
- package/dist/unpackTheme-CNsFKCeq.js +1 -0
- package/dist/useAutoSizeLabelsInsideViewbox-AIRF0PlD.js +1 -0
- package/dist/useChartAccessibility-DOMuYJfm.js +1 -0
- package/dist/useChartExport-DtPNpc9M.js +1 -0
- package/dist/useConfig-CKdzPrcf.js +1 -0
- package/dist/useFitSvgText-C1QC4P5G.js +1 -0
- package/dist/useHints-BH9r_0Vd.js +6 -0
- package/dist/useNestedProp-CT9phgWx.js +1 -0
- package/dist/useObjectBindings-DM3xDKV3.js +1 -0
- package/dist/usePanZoom-BdjP5Suc.js +1 -0
- package/dist/usePrefersMotion-XLHwega2.js +1 -0
- package/dist/usePrinter-CnyKPIFM.js +1 -0
- package/dist/useResponsive-D2CPcpda.js +1 -0
- package/dist/useStableElementSize-CegFbRlF.js +1 -0
- package/dist/useTableResponsive-uSz_qZOB.js +1 -0
- package/dist/useThemeCheck-BKNRbGeC.js +1 -0
- package/dist/useTimeLabelCollider-XQf_S7-z.js +1 -0
- package/dist/useTimeLabels-Das5O74F.js +1 -0
- package/dist/useTooltipPosition-aoV8pZZ9.js +1 -0
- package/dist/useTransitions-DfSHzsdz.js +1 -0
- package/dist/useUserOptionState-CXlFnwPv.js +1 -0
- package/dist/userOptionsSlots-DYuo-E5m.js +1 -0
- package/dist/utils.js +1 -30
- package/dist/vClickOutside-BxNzkY17.js +1 -0
- package/dist/vue-data-ui-BG41UScx.js +1 -0
- package/dist/vue-data-ui.js +1 -79
- package/dist/vue-ui-3d-bar-DiaiNy-k.js +19 -0
- package/dist/vue-ui-accordion-Dy5OVFKr.js +1 -0
- package/dist/vue-ui-age-pyramid-OeUr1yxi.js +1 -0
- package/dist/vue-ui-annotator-DA_xAFql.js +331 -0
- package/dist/vue-ui-bullet-B9lcCTVb.js +34 -0
- package/dist/vue-ui-bump-DYajIrva.js +10 -0
- package/dist/vue-ui-candlestick-CdAZuNxo.js +22 -0
- package/dist/vue-ui-carousel-table-ihGH0LDH.js +1 -0
- package/dist/vue-ui-chestnut-B2aNXFNO.js +1 -0
- package/dist/vue-ui-chord-fAckHfOW.js +21 -0
- package/dist/vue-ui-circle-pack-BWHVImkS.js +13 -0
- package/dist/vue-ui-cursor-DdXKXmhr.js +1 -0
- package/dist/vue-ui-dag-a0fNoIcJ.js +9 -0
- package/dist/vue-ui-dashboard-DkdYMB7n.js +1 -0
- package/dist/vue-ui-digits-CL9SuIEI.js +42 -0
- package/dist/vue-ui-donut-BaEodt-3.js +22 -0
- package/dist/vue-ui-donut-DaYxdQmP.js +47 -0
- package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +2 -0
- package/dist/vue-ui-dumbbell-B6HJxEZp.js +9 -0
- package/dist/vue-ui-flow-BlTCVFr3.js +3 -0
- package/dist/vue-ui-funnel-WgLFJadZ.js +1 -0
- package/dist/vue-ui-galaxy-B3nuI6E8.js +1 -0
- package/dist/vue-ui-gauge-BwTP65O4.js +1 -0
- package/dist/vue-ui-geo-CX3yH18H.js +1 -0
- package/dist/vue-ui-gizmo-CNHcBsku.js +1 -0
- package/dist/vue-ui-heatmap-CTdeoar7.js +1 -0
- package/dist/vue-ui-hill-DR5k8GWZ.js +1 -0
- package/dist/vue-ui-history-plot-C-9uH-Uj.js +2 -0
- package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +4 -0
- package/dist/vue-ui-kpi-DVcLXGqG.js +1 -0
- package/dist/vue-ui-label-D1Aog-zO.js +7 -0
- package/dist/vue-ui-mini-loader-CX0Dx9tT.js +1 -0
- package/dist/vue-ui-molecule-B13qVX71.js +1 -0
- package/dist/vue-ui-mood-radar-C1BtB8lg.js +1 -0
- package/dist/vue-ui-nested-donuts-B90yrlJG.js +19 -0
- package/dist/vue-ui-onion-UMVO2DE_.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +9 -0
- package/dist/vue-ui-pattern-DrPCu32G.js +1 -0
- package/dist/vue-ui-pattern-seed-B8YjAAEH.js +1 -0
- package/dist/vue-ui-quadrant-CPG6yAiu.js +2 -0
- package/dist/vue-ui-quick-chart-BTPb-Iz8.js +17 -0
- package/dist/vue-ui-radar-Hd-pE9ih.js +1 -0
- package/dist/vue-ui-rating-C_YxQYa_.js +1 -0
- package/dist/vue-ui-relation-circle-CHYG7ZJl.js +1 -0
- package/dist/vue-ui-ridgeline-DS1Gvljt.js +2 -0
- package/dist/vue-ui-rings-B-Hb13Uu.js +1 -0
- package/dist/vue-ui-scatter-BTgvOmuo.js +9 -0
- package/dist/vue-ui-skeleton-B-Acw3CC.js +41 -0
- package/dist/vue-ui-smiley-Ciwqt6ek.js +1 -0
- package/dist/vue-ui-spark-trend-CYqy6c0S.js +1 -0
- package/dist/vue-ui-sparkbar-CTXIgjmP.js +1 -0
- package/dist/vue-ui-sparkgauge-CObOL6s2.js +1 -0
- package/dist/vue-ui-sparkhistogram-ClFyDez-.js +1 -0
- package/dist/vue-ui-sparkline-DP_nYlW8.js +1 -0
- package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +1 -0
- package/dist/vue-ui-stackbar-nMWHZ-f0.js +29 -0
- package/dist/vue-ui-stackline-B95y6Zc5.js +39 -0
- package/dist/vue-ui-strip-plot-gFNC4r-X.js +2 -0
- package/dist/vue-ui-table-Br2JgD_L.js +14 -0
- package/dist/vue-ui-table-heatmap-Btu2ejF4.js +1 -0
- package/dist/vue-ui-table-sparkline-B9mYHAxp.js +1 -0
- package/dist/vue-ui-thermometer-C6u1eLfo.js +1 -0
- package/dist/vue-ui-timer-DLgsfB1U.js +64 -0
- package/dist/vue-ui-tiremarks-8B9uE1Bx.js +1 -0
- package/dist/vue-ui-treemap-C4Mot-Os.js +1 -0
- package/dist/vue-ui-waffle-BwcwNpf7.js +1 -0
- package/dist/vue-ui-wheel-B3OGCXg7.js +1 -0
- package/dist/vue-ui-word-cloud-BPIyMBXq.js +4 -0
- package/dist/vue-ui-world-Cp0DeauH.js +19 -0
- package/dist/vue-ui-xy-BOE1jvUS.js +31 -0
- package/dist/vue-ui-xy-DSyKSn4L.js +24 -0
- package/dist/vue-ui-xy-canvas-CaxxiKSa.js +9 -0
- package/dist/vue_ui_3d_bar-DmAve5Ri.js +1 -0
- package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +1 -0
- package/dist/vue_ui_bullet-CwVYkpjd.js +1 -0
- package/dist/vue_ui_bump-KJL9GYr4.js +1 -0
- package/dist/vue_ui_candlestick-DKvha_Ab.js +1 -0
- package/dist/vue_ui_chestnut-BxxivKN7.js +1 -0
- package/dist/vue_ui_chord-Fq6VBRT1.js +1 -0
- package/dist/vue_ui_circle_pack-CfXkXi7v.js +1 -0
- package/dist/vue_ui_dag-1b_dLSym.js +1 -0
- package/dist/vue_ui_donut-T5PeOqvf.js +1 -0
- package/dist/vue_ui_donut_evolution-nzVwNQYv.js +1 -0
- package/dist/vue_ui_dumbbell-BMcxK0N3.js +1 -0
- package/dist/vue_ui_flow-kvV56Es9.js +1 -0
- package/dist/vue_ui_funnel-CaEV5hG7.js +1 -0
- package/dist/vue_ui_galaxy-B94QInxc.js +1 -0
- package/dist/vue_ui_gauge-BJhb6yqE.js +1 -0
- package/dist/vue_ui_geo-DL1SMQHp.js +1 -0
- package/dist/vue_ui_heatmap-kh5NMmwf.js +1 -0
- package/dist/vue_ui_hill-DQi4pQCG.js +1 -0
- package/dist/vue_ui_history_plot-soyqUW4Y.js +1 -0
- package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +1 -0
- package/dist/vue_ui_label-dtPqyFsj.js +1 -0
- package/dist/vue_ui_molecule-Bw1UW1Na.js +1 -0
- package/dist/vue_ui_mood_radar-CXaBdJnv.js +1 -0
- package/dist/vue_ui_nested_donuts-CRtGsJcz.js +1 -0
- package/dist/vue_ui_onion-C9BedU_-.js +1 -0
- package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +1 -0
- package/dist/vue_ui_quadrant-BUv-SqzP.js +1 -0
- package/dist/vue_ui_quick_chart-Da1GwklM.js +1 -0
- package/dist/vue_ui_radar-68iK9Fam.js +1 -0
- package/dist/vue_ui_relation_circle-Dkv-cSB6.js +1 -0
- package/dist/vue_ui_ridgeline-Di26JtQu.js +1 -0
- package/dist/vue_ui_rings-BcDDXHpQ.js +1 -0
- package/dist/vue_ui_scatter-C50uFYQL.js +1 -0
- package/dist/vue_ui_spark_trend-BOM3zo64.js +1 -0
- package/dist/vue_ui_sparkbar-Bpx7QrFq.js +1 -0
- package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +1 -0
- package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +1 -0
- package/dist/vue_ui_sparkline-CvL_e9L8.js +1 -0
- package/dist/vue_ui_sparkstackbar-Chtog7hC.js +1 -0
- package/dist/vue_ui_stackbar-BkBIi_bL.js +1 -0
- package/dist/vue_ui_stackline-D7b63K84.js +1 -0
- package/dist/vue_ui_strip_plot-CwMowrhT.js +1 -0
- package/dist/vue_ui_table_heatmap-vfeY6r97.js +1 -0
- package/dist/vue_ui_table_sparkline-Dlfbza49.js +1 -0
- package/dist/vue_ui_thermometer-CRijq6H6.js +1 -0
- package/dist/vue_ui_tiremarks-8HFfABNF.js +1 -0
- package/dist/vue_ui_treemap-Bv4Rdl5_.js +1 -0
- package/dist/vue_ui_vertical_bar-BLyflvlz.js +1 -0
- package/dist/vue_ui_waffle-BbBLSluB.js +1 -0
- package/dist/vue_ui_wheel-C-479bvJ.js +1 -0
- package/dist/vue_ui_word_cloud-DBiJtSyL.js +1 -0
- package/dist/vue_ui_xy-CJBM9F6W.js +1 -0
- package/dist/vue_ui_xy_canvas-CT-FN9rU.js +1 -0
- package/package.json +2 -2
- package/dist/A11yDataTable-DdRsVULz.js +0 -45
- package/dist/Arrow-BQbcOtfC.js +0 -116
- package/dist/BaseDraggableDialog-BCFCiP_6.js +0 -272
- package/dist/BaseIcon-CIK6Sqo3.js +0 -484
- package/dist/BaseLegendToggle-Doa5rYP2.js +0 -56
- package/dist/BaseScanner-Dzc8VT3j.js +0 -30
- package/dist/BaseZoomControls-BGQM8B5F.js +0 -111
- package/dist/ColorPicker-Cb7qpvFt.js +0 -257
- package/dist/DataTable-B6LDCXBz.js +0 -150
- package/dist/DefGrad-DVBqDjhO.js +0 -48
- package/dist/HillActions-CwdgCb7Q.js +0 -187
- package/dist/Legend-D9FGXIbQ.js +0 -156
- package/dist/NonSvgPenAndPaper-9T4MSwXC.js +0 -577
- package/dist/PackageVersion-CslTvFsC.js +0 -12
- package/dist/PenAndPaper-C1EcBgJW.js +0 -906
- package/dist/RecursiveCircles-D6aDPmoe.js +0 -117
- package/dist/RecursiveLabels-D9rfID6q.js +0 -56
- package/dist/RecursiveLinks-BygcpDiT.js +0 -78
- package/dist/Shape-BZgQLgu5.js +0 -143
- package/dist/SlicerPreview-DyYv_G-_.js +0 -1730
- package/dist/SparkTooltip-D4cRlyuq.js +0 -93
- package/dist/Title-Bd98RysU.js +0 -87
- package/dist/Tooltip-DmQeI5WE.js +0 -312
- package/dist/UserOptions-B_yBcZ1-.js +0 -1412
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/dom-to-png-B_RJohlM.js +0 -237
- package/dist/exposedLib-C-JlvWAt.js +0 -28
- package/dist/geoProjections-BYthUA8l.js +0 -302
- package/dist/img-KURaWjZI.js +0 -129
- package/dist/labelUtils-DShv2Mbg.js +0 -19
- package/dist/lib-TWIH5fGr.js +0 -2152
- package/dist/package-DbTqd5lc.js +0 -4
- package/dist/patternUtils-CS7hn6at.js +0 -258
- package/dist/pdf-CLl24Afl.js +0 -90
- package/dist/render-common-CKv-jztN.js +0 -152
- package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
- package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +0 -122
- package/dist/useChartAccessibility-DYqac8yF.js +0 -12
- package/dist/useChartExport-iwOqiIWX.js +0 -803
- package/dist/useConfig-DObkR9Aa.js +0 -8008
- package/dist/useFitSvgText-CXTzBplU.js +0 -65
- package/dist/useHints-Dq_w2E8B.js +0 -66
- package/dist/useNestedProp-BxOdWM0c.js +0 -12
- package/dist/useObjectBindings-CPmyIJxB.js +0 -191
- package/dist/usePanZoom-CYU3B4T3.js +0 -157
- package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
- package/dist/usePrinter-8Y1Rju0Y.js +0 -49
- package/dist/useResponsive-ZtArZtUf.js +0 -97
- package/dist/useStableElementSize-C7KADDKj.js +0 -77
- package/dist/useTableResponsive-BAqJPR68.js +0 -25
- package/dist/useThemeCheck-C43Tcqmk.js +0 -24
- package/dist/useTimeLabelCollider-AEcY4Ioe.js +0 -57
- package/dist/useTimeLabels-d2f-W1L4.js +0 -270
- package/dist/useTooltipPosition-BCrtQa9H.js +0 -189
- package/dist/useTransitions-g_zBREk2.js +0 -39
- package/dist/useUserOptionState-DK-_1ddE.js +0 -15
- package/dist/vClickOutside-DUrZWttG.js +0 -13
- package/dist/vue-data-ui-C3G5Zdl5.js +0 -191
- package/dist/vue-ui-3d-bar-Cl6-fBV8.js +0 -1831
- package/dist/vue-ui-accordion-AyyZDab3.js +0 -81
- package/dist/vue-ui-age-pyramid-DOtWAL8s.js +0 -1305
- package/dist/vue-ui-annotator-BCVjlojM.js +0 -3325
- package/dist/vue-ui-bullet-B_1Ctjvq.js +0 -702
- package/dist/vue-ui-bump-kOK6x4al.js +0 -1242
- package/dist/vue-ui-candlestick-KvhjbAxt.js +0 -2144
- package/dist/vue-ui-carousel-table-ArMiO0cG.js +0 -467
- package/dist/vue-ui-chestnut-DSM0U27X.js +0 -2016
- package/dist/vue-ui-chord-64akfaem.js +0 -1347
- package/dist/vue-ui-circle-pack-CaR_aNEh.js +0 -1647
- package/dist/vue-ui-cursor-DCgqYZiz.js +0 -283
- package/dist/vue-ui-dag-8uKK0Rlp.js +0 -2931
- package/dist/vue-ui-dashboard-DeccYtSY.js +0 -522
- package/dist/vue-ui-digits-BvK7bVuJ.js +0 -217
- package/dist/vue-ui-donut-8joMj08Z.js +0 -974
- package/dist/vue-ui-donut-CvbfzzdT.js +0 -2427
- package/dist/vue-ui-donut-evolution-DgITf95R.js +0 -1869
- package/dist/vue-ui-dumbbell-U2L4ZYhB.js +0 -1533
- package/dist/vue-ui-flow-DD20fJu_.js +0 -1229
- package/dist/vue-ui-funnel-Cx8hVlZV.js +0 -749
- package/dist/vue-ui-galaxy-VZFZnHPv.js +0 -1097
- package/dist/vue-ui-gauge-Copa7G58.js +0 -934
- package/dist/vue-ui-geo-DeDQ6ubl.js +0 -1495
- package/dist/vue-ui-gizmo-D5oUKIsP.js +0 -238
- package/dist/vue-ui-heatmap-BukWtNsd.js +0 -1613
- package/dist/vue-ui-hill-DONFacXR.js +0 -1747
- package/dist/vue-ui-history-plot-BMy_y9S6.js +0 -1710
- package/dist/vue-ui-horizontal-bar-bcPSs999.js +0 -1723
- package/dist/vue-ui-kpi-Bol0OWs3.js +0 -104
- package/dist/vue-ui-label-cwjXaEDQ.js +0 -1451
- package/dist/vue-ui-mini-loader-kdpasmXb.js +0 -133
- package/dist/vue-ui-molecule-BiAI5lbh.js +0 -941
- package/dist/vue-ui-mood-radar-f4xXkiBs.js +0 -1111
- package/dist/vue-ui-nested-donuts-ZmGGEvRk.js +0 -1515
- package/dist/vue-ui-onion-D6IKPpL-.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-BbfModz3.js +0 -1444
- package/dist/vue-ui-pattern-DKozfnVn.js +0 -154
- package/dist/vue-ui-pattern-seed-BB1honLm.js +0 -61
- package/dist/vue-ui-quadrant-CueHa1Pm.js +0 -1979
- package/dist/vue-ui-quick-chart-C8ZxX1Zw.js +0 -2775
- package/dist/vue-ui-radar-BcD7Zqvb.js +0 -1386
- package/dist/vue-ui-rating-V_OnJN9Y.js +0 -359
- package/dist/vue-ui-relation-circle-DlN4r83K.js +0 -905
- package/dist/vue-ui-ridgeline-BlQnTWXi.js +0 -1630
- package/dist/vue-ui-rings-Bf9IKwDr.js +0 -1264
- package/dist/vue-ui-scatter-arPbS9MH.js +0 -2418
- package/dist/vue-ui-skeleton-dyXWT6JX.js +0 -2567
- package/dist/vue-ui-smiley-w6nH1I0E.js +0 -376
- package/dist/vue-ui-spark-trend-Bso9bwmY.js +0 -457
- package/dist/vue-ui-sparkbar-CL06Yt56.js +0 -401
- package/dist/vue-ui-sparkgauge-BHDM5Hbr.js +0 -268
- package/dist/vue-ui-sparkhistogram-3Tw8PEms.js +0 -589
- package/dist/vue-ui-sparkline-znaswFQj.js +0 -2067
- package/dist/vue-ui-sparkstackbar-BOzVoWoa.js +0 -750
- package/dist/vue-ui-stackbar-BTOvMsP8.js +0 -2755
- package/dist/vue-ui-stackline-qcLrNL09.js +0 -2829
- package/dist/vue-ui-strip-plot-BLNaCPm8.js +0 -1752
- package/dist/vue-ui-table-D295mJIf.js +0 -1352
- package/dist/vue-ui-table-heatmap-CXeMKqKz.js +0 -363
- package/dist/vue-ui-table-sparkline-BYuwQrwA.js +0 -738
- package/dist/vue-ui-thermometer-BwJ0oF-H.js +0 -758
- package/dist/vue-ui-timer-BULpjYiI.js +0 -451
- package/dist/vue-ui-tiremarks-B7bTeU8h.js +0 -540
- package/dist/vue-ui-treemap-DkqDz9W4.js +0 -1745
- package/dist/vue-ui-waffle-Cn7WBzqh.js +0 -1633
- package/dist/vue-ui-wheel-Cy7kBvEx.js +0 -873
- package/dist/vue-ui-word-cloud-tRqc2ZMR.js +0 -1723
- package/dist/vue-ui-world-B755-zji.js +0 -3021
- package/dist/vue-ui-xy-BiHIJ7rK.js +0 -1387
- package/dist/vue-ui-xy-DWYTZz_v.js +0 -5777
- package/dist/vue-ui-xy-canvas-DGuMC_Rf.js +0 -2151
- package/dist/vue_ui_3d_bar-C4R7o-yX.js +0 -185
- package/dist/vue_ui_age_pyramid-B2R66DgQ.js +0 -310
- package/dist/vue_ui_bullet-ClzdLoOv.js +0 -186
- package/dist/vue_ui_bump-Vl-zYAtG.js +0 -201
- package/dist/vue_ui_candlestick-BXSQY82k.js +0 -461
- package/dist/vue_ui_chestnut-D2oUhad6.js +0 -305
- package/dist/vue_ui_chord-DPfS1Umc.js +0 -275
- package/dist/vue_ui_circle_pack-DZC_rdfn.js +0 -172
- package/dist/vue_ui_dag-TsJ_azQq.js +0 -258
- package/dist/vue_ui_donut-BDGqG07h.js +0 -358
- package/dist/vue_ui_donut_evolution-C6951a2f.js +0 -745
- package/dist/vue_ui_dumbbell-Bfe_jFyi.js +0 -304
- package/dist/vue_ui_flow-BewZjjKG.js +0 -238
- package/dist/vue_ui_funnel-_Og4EEkO.js +0 -234
- package/dist/vue_ui_galaxy-Ig0cc1_h.js +0 -265
- package/dist/vue_ui_gauge-Cf1RZc9q.js +0 -178
- package/dist/vue_ui_geo-B8TODs-G.js +0 -248
- package/dist/vue_ui_heatmap-B2BBBSWG.js +0 -319
- package/dist/vue_ui_hill-dnltu0L-.js +0 -368
- package/dist/vue_ui_history_plot-CuN63VEc.js +0 -413
- package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +0 -341
- package/dist/vue_ui_label-B0QoxQrJ.js +0 -115
- package/dist/vue_ui_molecule-CO9L59SF.js +0 -231
- package/dist/vue_ui_mood_radar-BA6LAKhk.js +0 -281
- package/dist/vue_ui_nested_donuts-B8csIoVO.js +0 -273
- package/dist/vue_ui_onion-1FTFFS46.js +0 -293
- package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +0 -278
- package/dist/vue_ui_quadrant-CDSTKTJz.js +0 -428
- package/dist/vue_ui_quick_chart-DByCqSYE.js +0 -180
- package/dist/vue_ui_radar-jafTED5j.js +0 -306
- package/dist/vue_ui_relation_circle-D0p4mXmv.js +0 -98
- package/dist/vue_ui_ridgeline-VM8_mx4J.js +0 -767
- package/dist/vue_ui_rings-BVgD2aMn.js +0 -320
- package/dist/vue_ui_scatter-I0POnicu.js +0 -479
- package/dist/vue_ui_spark_trend-DxVmpkmC.js +0 -82
- package/dist/vue_ui_sparkbar-z6qO--Kf.js +0 -64
- package/dist/vue_ui_sparkgauge-BX1MS3bA.js +0 -90
- package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +0 -123
- package/dist/vue_ui_sparkline-b9pEUyGF.js +0 -183
- package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +0 -175
- package/dist/vue_ui_stackbar-DdjDL6aq.js +0 -491
- package/dist/vue_ui_stackline-Bh0RuInt.js +0 -539
- package/dist/vue_ui_strip_plot-BaHbnnwN.js +0 -308
- package/dist/vue_ui_table_heatmap-w8vx5k6f.js +0 -80
- package/dist/vue_ui_table_sparkline-DAbkUrNz.js +0 -124
- package/dist/vue_ui_thermometer-DxgqWKlE.js +0 -123
- package/dist/vue_ui_tiremarks-CdEPieWV.js +0 -122
- package/dist/vue_ui_treemap-DoEtkRN6.js +0 -328
- package/dist/vue_ui_vertical_bar-CP-MKz1j.js +0 -247
- package/dist/vue_ui_waffle-DE_DiSVP.js +0 -299
- package/dist/vue_ui_wheel-DZ_nR--t.js +0 -133
- package/dist/vue_ui_word_cloud-C-qIMNLu.js +0 -254
- package/dist/vue_ui_xy-CcJADijP.js +0 -614
- package/dist/vue_ui_xy_canvas-DrNSzYWq.js +0 -487
|
@@ -1,906 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { $ as t, Pt as n, X as r, t as i } from "./lib-TWIH5fGr.js";
|
|
3
|
-
import { t as a } from "./BaseIcon-CIK6Sqo3.js";
|
|
4
|
-
import { t as o } from "./ColorPicker-Cb7qpvFt.js";
|
|
5
|
-
import { computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, guardReactiveProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onBeforeUnmount as ee, onMounted as te, openBlock as ne, ref as _, renderSlot as v, toDisplayString as re, unref as ie, vModelText as ae, watch as y, withCtx as oe, withDirectives as se } from "vue";
|
|
6
|
-
//#region src/atoms/PenAndPaper.vue
|
|
7
|
-
var ce = /* @__PURE__ */ e({ default: () => b }), le = {
|
|
8
|
-
"aria-hidden": "true",
|
|
9
|
-
viewBox: "0 0 6 12",
|
|
10
|
-
style: { width: "100%" }
|
|
11
|
-
}, ue = ["fill"], de = ["fill"], fe = ["fill"], pe = ["disabled"], me = 750, he = 8, ge = 2, b = {
|
|
12
|
-
__name: "PenAndPaper",
|
|
13
|
-
props: {
|
|
14
|
-
svgRef: {
|
|
15
|
-
type: [
|
|
16
|
-
Object,
|
|
17
|
-
null,
|
|
18
|
-
void 0
|
|
19
|
-
],
|
|
20
|
-
required: !0
|
|
21
|
-
},
|
|
22
|
-
color: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: "#2D353C"
|
|
25
|
-
},
|
|
26
|
-
backgroundColor: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: "#FFFFFF"
|
|
29
|
-
},
|
|
30
|
-
active: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
scale: {
|
|
35
|
-
type: Number,
|
|
36
|
-
default: 1
|
|
37
|
-
},
|
|
38
|
-
isCursorPointer: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: !1
|
|
41
|
-
},
|
|
42
|
-
palette: {
|
|
43
|
-
type: Array,
|
|
44
|
-
default: () => [
|
|
45
|
-
"#000000",
|
|
46
|
-
"#FFFFFF",
|
|
47
|
-
"#FF5733",
|
|
48
|
-
"#33FF57",
|
|
49
|
-
"#3357FF",
|
|
50
|
-
"#FFC300",
|
|
51
|
-
"#800080",
|
|
52
|
-
"#FF1493",
|
|
53
|
-
"#00CED1"
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
emits: ["close"],
|
|
58
|
-
setup(e, { emit: ce }) {
|
|
59
|
-
let b = e, _e = ce, x = _([]), S = _([]), C = _(b.color), w = _(2), T = _(!1), ve = _(""), E = _(null), D = _(null), O = _(null), ye = _(null), k = _(null), be = _(null), A = _(!1), j = _(null), xe = _(""), M = _(""), N = _(!1), Se = _(!1), P = _(null), Ce = _(null), we = _(!1), F = _(""), Te = /* @__PURE__ */ new Map(), Ee = _(`arrow-def-${r()}`), I = _(!1), L = _(null), De = _({
|
|
60
|
-
x: 0,
|
|
61
|
-
y: 0
|
|
62
|
-
}), R = _([""]), z = _({
|
|
63
|
-
row: 0,
|
|
64
|
-
col: 0
|
|
65
|
-
}), B = _(16), Oe = _(!1), ke = _(""), Ae = _(!1), je = [
|
|
66
|
-
"arrow",
|
|
67
|
-
"text",
|
|
68
|
-
"line",
|
|
69
|
-
"draw"
|
|
70
|
-
], V = _(0), H = s(() => je[V.value]), Me = {
|
|
71
|
-
arrow: "plotArrow",
|
|
72
|
-
text: "text",
|
|
73
|
-
line: "plotLine",
|
|
74
|
-
draw: "annotator"
|
|
75
|
-
}, Ne = _("url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABg2lDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV9TpSIVh2YQcchQnSyIijhKFYtgobQVWnUwufQLmjQkKS6OgmvBwY/FqoOLs64OroIg+AHi6OSk6CIl/i8ptIjx4Lgf7+497t4BQrPKNKtnAtB020wn4lIuvyqFXhGGiAhCiMnMMpKZxSx8x9c9Any9i/Es/3N/jgG1YDEgIBHPMcO0iTeIZzZtg/M+scjKskp8Tjxu0gWJH7muePzGueSywDNFM5ueJxaJpVIXK13MyqZGPE0cVTWd8oWcxyrnLc5atc7a9+QvDBf0lQzXaY4ggSUkkYIEBXVUUIWNGK06KRbStB/38Q+7/hS5FHJVwMixgBo0yK4f/A9+d2sVpya9pHAc6H1xnI9RILQLtBqO833sOK0TIPgMXOkdf60JzH6S3uho0SNgcBu4uO5oyh5wuQMMPRmyKbtSkKZQLALvZ/RNeSByC/Sveb2193H6AGSpq+Ub4OAQGCtR9rrPu/u6e/v3TLu/H5C7crM1WjgWAAAABmJLR0QAqwB5AHWF+8OUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5gwUExIUagzGcQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAABfSURBVBjTldAxDoNQDIPhL0+q1L33P1AvAhN7xfK6WAgoLfSfrNiykpQtE+7RLzx2vgF9D3o8lWDmn1QVVMP0LZQGmNtqp1/cmou0XHdG/+sYeGZwFBqPCub8rkcvvAGvsi1VYarR8wAAAABJRU5ErkJggg==') 5 5, auto");
|
|
76
|
-
function Pe(e) {
|
|
77
|
-
let t = e?.target;
|
|
78
|
-
if (!(t instanceof Element)) return null;
|
|
79
|
-
let n = t.closest(".vue-data-ui-doodle");
|
|
80
|
-
return n && E.value?.contains(n) ? n : null;
|
|
81
|
-
}
|
|
82
|
-
function Fe(e) {
|
|
83
|
-
let t = e?.target;
|
|
84
|
-
if (!(t instanceof Element)) return null;
|
|
85
|
-
let n = t.closest(".vue-data-ui-selection-handle");
|
|
86
|
-
return n && E.value?.contains(n) ? n : null;
|
|
87
|
-
}
|
|
88
|
-
function Ie(e) {
|
|
89
|
-
let t = e?.target;
|
|
90
|
-
if (!(t instanceof Element)) return null;
|
|
91
|
-
let n = t.closest(".vue-data-ui-selection-delete");
|
|
92
|
-
return n && E.value?.contains(n) ? n : null;
|
|
93
|
-
}
|
|
94
|
-
function Le(e) {
|
|
95
|
-
if (!e) return "";
|
|
96
|
-
let t = e.getAttribute("data-doodle-id");
|
|
97
|
-
return t || (t = r(), e.setAttribute("data-doodle-id", t)), t;
|
|
98
|
-
}
|
|
99
|
-
function U() {
|
|
100
|
-
return E.value ? Array.from(E.value.children).filter((e) => e.classList?.contains("vue-data-ui-doodle")).map((e) => e.outerHTML).join("") : "";
|
|
101
|
-
}
|
|
102
|
-
function Re(e) {
|
|
103
|
-
if (!E.value) return;
|
|
104
|
-
K();
|
|
105
|
-
let t = E.value.querySelector(".vue-data-ui-svg-caret");
|
|
106
|
-
if (t && t.remove(), Array.from(E.value.children).forEach((e) => {
|
|
107
|
-
e.classList?.contains("vue-data-ui-doodle") && e.remove();
|
|
108
|
-
}), e) {
|
|
109
|
-
let t = document.createElementNS(i, "g");
|
|
110
|
-
t.innerHTML = e, Array.from(t.children).forEach((e) => E.value.appendChild(e));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function W(e, t = null) {
|
|
114
|
-
if (e === U()) return;
|
|
115
|
-
let n = Date.now(), r = x.value[x.value.length - 1];
|
|
116
|
-
t && r?.mergeKey === t && n - r.timestamp <= me ? r.timestamp = n : x.value.push({
|
|
117
|
-
state: e,
|
|
118
|
-
mergeKey: t,
|
|
119
|
-
timestamp: n
|
|
120
|
-
}), S.value = [];
|
|
121
|
-
}
|
|
122
|
-
function ze(e) {
|
|
123
|
-
let t = e.touches?.[0] || e.changedTouches?.[0];
|
|
124
|
-
return {
|
|
125
|
-
x: t ? t.clientX : e.clientX,
|
|
126
|
-
y: t ? t.clientY : e.clientY
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function Be(e, t) {
|
|
130
|
-
let n = b.svgRef;
|
|
131
|
-
if (!n || !e) return null;
|
|
132
|
-
let { x: r, y: i } = ze(t), a = n.createSVGPoint();
|
|
133
|
-
a.x = r, a.y = i;
|
|
134
|
-
let o = e.getScreenCTM()?.inverse();
|
|
135
|
-
return o ? a.matrixTransform(o) : null;
|
|
136
|
-
}
|
|
137
|
-
function Ve(e, t, n, r, i, a) {
|
|
138
|
-
let o = i - n, s = a - r, c = o * o + s * s;
|
|
139
|
-
if (!c) return Math.hypot(e - n, t - r);
|
|
140
|
-
let l = Math.max(0, Math.min(1, ((e - n) * o + (t - r) * s) / c)), u = n + l * o, d = r + l * s;
|
|
141
|
-
return Math.hypot(e - u, t - d);
|
|
142
|
-
}
|
|
143
|
-
function He(e, t) {
|
|
144
|
-
let n = Be(e, t);
|
|
145
|
-
if (!n) return !1;
|
|
146
|
-
let r = e.tagName.toLowerCase(), i = he * b.scale;
|
|
147
|
-
if (r === "line") {
|
|
148
|
-
let t = Number(e.getAttribute("x1")), r = Number(e.getAttribute("y1")), a = Number(e.getAttribute("x2")), o = Number(e.getAttribute("y2")), s = Number(e.getAttribute("stroke-width")) || 0;
|
|
149
|
-
return Ve(n.x, n.y, t, r, a, o) <= Math.max(i, s / 2);
|
|
150
|
-
}
|
|
151
|
-
if (r === "circle") {
|
|
152
|
-
let t = Number(e.getAttribute("cx")), r = Number(e.getAttribute("cy")), a = Number(e.getAttribute("r")) || 0;
|
|
153
|
-
return Math.hypot(n.x - t, n.y - r) <= a + i;
|
|
154
|
-
}
|
|
155
|
-
if (r === "text") try {
|
|
156
|
-
let t = e.getBBox();
|
|
157
|
-
return n.x >= t.x - i && n.x <= t.x + t.width + i && n.y >= t.y - i && n.y <= t.y + t.height + i;
|
|
158
|
-
} catch {
|
|
159
|
-
return !1;
|
|
160
|
-
}
|
|
161
|
-
if (r === "path") try {
|
|
162
|
-
let t = e.getBBox();
|
|
163
|
-
if (n.x < t.x - i || n.x > t.x + t.width + i || n.y < t.y - i || n.y > t.y + t.height + i) return !1;
|
|
164
|
-
if (typeof e.isPointInStroke == "function") {
|
|
165
|
-
let t = e.getAttribute("stroke-width"), r = Math.max(Number(t) || 0, i * 2);
|
|
166
|
-
e.setAttribute("stroke-width", r);
|
|
167
|
-
let a = e.isPointInStroke(n);
|
|
168
|
-
return t === null ? e.removeAttribute("stroke-width") : e.setAttribute("stroke-width", t), a;
|
|
169
|
-
}
|
|
170
|
-
let r = e.getTotalLength(), a = Math.max(2 * b.scale, 2);
|
|
171
|
-
for (let t = 0; t <= r; t += a) {
|
|
172
|
-
let r = e.getPointAtLength(t);
|
|
173
|
-
if (Math.hypot(n.x - r.x, n.y - r.y) <= i) return !0;
|
|
174
|
-
}
|
|
175
|
-
} catch {
|
|
176
|
-
return !1;
|
|
177
|
-
}
|
|
178
|
-
return !1;
|
|
179
|
-
}
|
|
180
|
-
function Ue(e) {
|
|
181
|
-
return Pe(e) || E.value && Array.from(E.value.querySelectorAll(".vue-data-ui-doodle")).reverse().find((t) => He(t, e)) || null;
|
|
182
|
-
}
|
|
183
|
-
function We() {
|
|
184
|
-
be.value?.parentNode && be.value.parentNode.removeChild(be.value), be.value = null;
|
|
185
|
-
}
|
|
186
|
-
function G() {
|
|
187
|
-
if (We(), !I.value && b.active && E.value && k.value && E.value.contains(k.value)) try {
|
|
188
|
-
let e = k.value, t = e.getBBox(), n = 4 * b.scale, r = document.createElementNS(i, "g");
|
|
189
|
-
r.setAttribute("class", "vue-data-ui-selection-overlay");
|
|
190
|
-
let a = document.createElementNS(i, "rect");
|
|
191
|
-
if (a.setAttribute("class", "vue-data-ui-selection-box"), a.setAttribute("x", t.x - n), a.setAttribute("y", t.y - n), a.setAttribute("width", Math.max(t.width + n * 2, n * 2)), a.setAttribute("height", Math.max(t.height + n * 2, n * 2)), a.setAttribute("fill", "none"), a.setAttribute("stroke", b.color), a.setAttribute("stroke-width", Math.max(1, b.scale)), a.setAttribute("stroke-dasharray", `${4 * b.scale} ${3 * b.scale}`), a.setAttribute("pointer-events", "none"), r.appendChild(a), e.tagName.toLowerCase() === "line") {
|
|
192
|
-
let t = Math.max(4, 5 * b.scale), n = Math.max(1, 1.5 * b.scale);
|
|
193
|
-
[{
|
|
194
|
-
endpoint: "start",
|
|
195
|
-
x: Number(e.getAttribute("x1")),
|
|
196
|
-
y: Number(e.getAttribute("y1"))
|
|
197
|
-
}, {
|
|
198
|
-
endpoint: "end",
|
|
199
|
-
x: Number(e.getAttribute("x2")),
|
|
200
|
-
y: Number(e.getAttribute("y2"))
|
|
201
|
-
}].forEach(({ endpoint: e, x: a, y: o }) => {
|
|
202
|
-
let s = document.createElementNS(i, "circle");
|
|
203
|
-
s.setAttribute("class", "vue-data-ui-selection-handle"), s.setAttribute("data-line-endpoint", e), s.setAttribute("cx", a), s.setAttribute("cy", o), s.setAttribute("r", t), s.setAttribute("fill", b.backgroundColor), s.setAttribute("stroke", b.color), s.setAttribute("stroke-width", n), s.setAttribute("pointer-events", "all"), r.appendChild(s);
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
let o = Math.max(20, 24 * b.scale), s = Math.max(1, b.scale), c = t.x + t.width + n + 4 * b.scale, l = t.y - n - o - 4 * b.scale, u = document.createElementNS(i, "g");
|
|
207
|
-
u.setAttribute("class", "vue-data-ui-selection-delete"), u.setAttribute("role", "button"), u.setAttribute("tabindex", "0"), u.setAttribute("aria-label", "Delete selected drawing"), u.setAttribute("pointer-events", "all");
|
|
208
|
-
let d = document.createElementNS(i, "rect");
|
|
209
|
-
d.setAttribute("x", c), d.setAttribute("y", l), d.setAttribute("width", o), d.setAttribute("height", o), d.setAttribute("rx", 4 * b.scale), d.setAttribute("fill", b.backgroundColor), d.setAttribute("stroke", J.value), d.setAttribute("stroke-width", s), d.setAttribute("vector-effect", "non-scaling-stroke");
|
|
210
|
-
let f = o / 24, p = document.createElementNS(i, "path");
|
|
211
|
-
p.setAttribute("d", "M 8 8 L 16 16 M 16 8 L 8 16"), p.setAttribute("transform", `translate(${c} ${l}) scale(${f})`), p.setAttribute("fill", "none"), p.setAttribute("stroke", b.color), p.setAttribute("stroke-width", Math.max(1.25, 1.5 * b.scale)), p.setAttribute("stroke-linecap", "round"), p.setAttribute("stroke-linejoin", "round"), p.setAttribute("vector-effect", "non-scaling-stroke"), p.setAttribute("pointer-events", "none"), u.appendChild(d), u.appendChild(p), u.addEventListener("keydown", (e) => {
|
|
212
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), Ge(e));
|
|
213
|
-
}), r.appendChild(u);
|
|
214
|
-
let m = e.getAttribute("transform");
|
|
215
|
-
m && r.setAttribute("transform", m), E.value.appendChild(r), be.value = r;
|
|
216
|
-
} catch {
|
|
217
|
-
We();
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
function K() {
|
|
221
|
-
k.value = null, A.value = !1, j.value = null, xe.value = "", M.value = "", N.value = !1, Se.value = !1, P.value = null, Ce.value = null, We(), Z();
|
|
222
|
-
}
|
|
223
|
-
function Ge(e = null) {
|
|
224
|
-
if (!b.active || !k.value || !E.value || !E.value.contains(k.value)) return;
|
|
225
|
-
e?.cancelable && e.preventDefault(), e?.stopPropagation?.(), e?.stopImmediatePropagation?.();
|
|
226
|
-
let t = U();
|
|
227
|
-
k.value.remove(), W(t), K();
|
|
228
|
-
}
|
|
229
|
-
function Ke(e) {
|
|
230
|
-
return e ? e.tagName.toLowerCase() === "text" || e.tagName.toLowerCase() === "circle" ? e.getAttribute("fill") : e.getAttribute("stroke") : null;
|
|
231
|
-
}
|
|
232
|
-
function qe(e) {
|
|
233
|
-
if (e) {
|
|
234
|
-
we.value = !0;
|
|
235
|
-
try {
|
|
236
|
-
let t = e.tagName.toLowerCase(), n = Ke(e);
|
|
237
|
-
if (n && (C.value = n), t === "text") {
|
|
238
|
-
V.value = je.indexOf("text");
|
|
239
|
-
let t = Number(e.getAttribute("font-size"));
|
|
240
|
-
Number.isFinite(t) && b.scale && (B.value = t / b.scale);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
if (t === "line" ? V.value = e.hasAttribute("marker-end") ? je.indexOf("arrow") : je.indexOf("line") : V.value = je.indexOf("draw"), t === "circle") {
|
|
244
|
-
let t = Number(e.getAttribute("r"));
|
|
245
|
-
Number.isFinite(t) && b.scale && (w.value = t * 2 / b.scale);
|
|
246
|
-
} else {
|
|
247
|
-
let t = Number(e.getAttribute("stroke-width"));
|
|
248
|
-
Number.isFinite(t) && b.scale && (w.value = t / b.scale);
|
|
249
|
-
}
|
|
250
|
-
} finally {
|
|
251
|
-
p(() => {
|
|
252
|
-
we.value = !1;
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
function Je(e) {
|
|
258
|
-
b.active && e && E.value?.contains(e) && (Le(e), k.value = e, qe(e), p(G));
|
|
259
|
-
}
|
|
260
|
-
function Ye(e) {
|
|
261
|
-
if (!b.active || !E.value || I.value) return;
|
|
262
|
-
if (Ie(e)) {
|
|
263
|
-
Ge(e);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
let t = Fe(e);
|
|
267
|
-
if (t && k.value && k.value.tagName.toLowerCase() === "line") {
|
|
268
|
-
e.cancelable && e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation?.();
|
|
269
|
-
let n = t.getAttribute("data-line-endpoint");
|
|
270
|
-
if (!["start", "end"].includes(n)) return;
|
|
271
|
-
P.value = n, Ce.value = Be(k.value, e), A.value = !1, N.value = !1, Se.value = !1, M.value = U(), Z(e);
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
let n = Ue(e);
|
|
275
|
-
if (!n) {
|
|
276
|
-
K();
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
e.cancelable && e.preventDefault(), Se.value = k.value === n, Je(n);
|
|
280
|
-
let { x: r, y: i } = Y(e);
|
|
281
|
-
A.value = !0, N.value = !1, j.value = {
|
|
282
|
-
x: r,
|
|
283
|
-
y: i
|
|
284
|
-
}, xe.value = n.getAttribute("transform") || "", M.value = U(), Z(e);
|
|
285
|
-
}
|
|
286
|
-
function Xe(e) {
|
|
287
|
-
if (!b.active || !k.value) return;
|
|
288
|
-
if (Z(e), P.value) {
|
|
289
|
-
let t = Be(k.value, e);
|
|
290
|
-
if (!t) return;
|
|
291
|
-
let n = Ce.value;
|
|
292
|
-
if (!N.value && n && Math.hypot(t.x - n.x, t.y - n.y) < ge * b.scale) return;
|
|
293
|
-
e.cancelable && e.preventDefault(), N.value = !0, P.value === "start" ? (k.value.setAttribute("x1", t.x), k.value.setAttribute("y1", t.y)) : (k.value.setAttribute("x2", t.x), k.value.setAttribute("y2", t.y)), G();
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
if (!A.value || !j.value) return;
|
|
297
|
-
let { x: t, y: n } = Y(e), r = t - j.value.x, i = n - j.value.y, a = Math.hypot(r, i);
|
|
298
|
-
if (!N.value && a < ge * b.scale) return;
|
|
299
|
-
e.cancelable && e.preventDefault(), N.value = !0;
|
|
300
|
-
let o = xe.value.trim();
|
|
301
|
-
k.value.setAttribute("transform", `${o ? `${o} ` : ""}translate(${r} ${i})`), G();
|
|
302
|
-
}
|
|
303
|
-
function q(e) {
|
|
304
|
-
let t = k.value, n = !P.value && t && t.tagName.toLowerCase() === "text" && Se.value && !N.value && !I.value;
|
|
305
|
-
if (N.value && M.value && W(M.value), A.value = !1, j.value = null, M.value = "", N.value = !1, Se.value = !1, P.value = null, Ce.value = null, xe.value = t?.getAttribute("transform") || "", t && E.value?.contains(t) && G(), n && t && E.value?.contains(t)) {
|
|
306
|
-
nt(t, e), Z(e);
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
Z(e);
|
|
310
|
-
}
|
|
311
|
-
function Ze(e) {
|
|
312
|
-
if (!b.active || !k.value || we.value) return;
|
|
313
|
-
let t = k.value, n = t.tagName.toLowerCase();
|
|
314
|
-
if (Ke(t) === e) return;
|
|
315
|
-
let r = U();
|
|
316
|
-
if (n === "text" || n === "circle") t.setAttribute("fill", e);
|
|
317
|
-
else if (t.setAttribute("stroke", e), n === "line" && t.hasAttribute("marker-end")) {
|
|
318
|
-
let n = _t(e);
|
|
319
|
-
n && t.setAttribute("marker-end", `url(#${n})`);
|
|
320
|
-
}
|
|
321
|
-
I.value && t === L.value || W(r, `color:${Le(t)}`), G(), I.value && t === L.value && ct();
|
|
322
|
-
}
|
|
323
|
-
function Qe(e) {
|
|
324
|
-
if (!b.active || !k.value || we.value) return;
|
|
325
|
-
let t = k.value, n = t.tagName.toLowerCase();
|
|
326
|
-
if (n === "text") return;
|
|
327
|
-
let r = Number(e) * b.scale;
|
|
328
|
-
if ((n === "circle" ? Number(t.getAttribute("r")) * 2 : Number(t.getAttribute("stroke-width"))) === r) return;
|
|
329
|
-
let i = U();
|
|
330
|
-
n === "circle" ? t.setAttribute("r", r / 2) : t.setAttribute("stroke-width", r), W(i, `size:${Le(t)}`), G();
|
|
331
|
-
}
|
|
332
|
-
function $e(e) {
|
|
333
|
-
if (!b.active || !k.value || we.value) return;
|
|
334
|
-
let t = k.value;
|
|
335
|
-
if (t.tagName.toLowerCase() !== "text") return;
|
|
336
|
-
let n = Number(e) * b.scale;
|
|
337
|
-
if (Number(t.getAttribute("font-size")) === n) return;
|
|
338
|
-
let r = U();
|
|
339
|
-
t.setAttribute("font-size", n), Array.from(t.children).forEach((e, t) => {
|
|
340
|
-
e.setAttribute("dy", t === 0 ? "0" : `${n * 1.2}`);
|
|
341
|
-
}), I.value && t === L.value || W(r, `font-size:${Le(t)}`), G(), I.value && t === L.value && ct();
|
|
342
|
-
}
|
|
343
|
-
y(C, Ze), y(w, Qe), y(B, $e);
|
|
344
|
-
function et() {
|
|
345
|
-
V.value + 1 >= je.length ? V.value = 0 : V.value += 1;
|
|
346
|
-
}
|
|
347
|
-
function tt(e) {
|
|
348
|
-
if (!E.value || !b.active || H.value !== "text" || I.value || Fe(e) || Ue(e)) return;
|
|
349
|
-
K();
|
|
350
|
-
let t = U(), { x: n, y: a } = Y(e);
|
|
351
|
-
De.value = {
|
|
352
|
-
x: n,
|
|
353
|
-
y: a
|
|
354
|
-
}, R.value = [""], z.value = {
|
|
355
|
-
row: 0,
|
|
356
|
-
col: 0
|
|
357
|
-
}, Oe.value = !1, ke.value = t, Ae.value = !1;
|
|
358
|
-
let o = document.createElementNS(i, "text");
|
|
359
|
-
o.setAttribute("x", n), o.setAttribute("y", a), o.setAttribute("fill", C.value), o.setAttribute("font-size", B.value * b.scale), o.setAttribute("font-family", "sans-serif"), o.setAttribute("class", "vue-data-ui-doodle"), o.setAttribute("data-doodle-id", r()), o.setAttribute("dominant-baseline", "hanging"), o.setAttribute("pointer-events", "all");
|
|
360
|
-
let s = document.createElementNS(i, "tspan");
|
|
361
|
-
s.setAttribute("x", n), s.setAttribute("dy", "0"), s.setAttribute("dominant-baseline", "hanging"), s.textContent = "", o.appendChild(s), o.style.pointerEvents = "none", o.style.userSelect = "none", E.value.appendChild(o), k.value = o, L.value = o, I.value = !0, We(), window.addEventListener("keydown", rt), window.addEventListener("mousedown", lt, !0), it(), ct();
|
|
362
|
-
}
|
|
363
|
-
function nt(e) {
|
|
364
|
-
if (!b.active || !E.value || I.value || !e || e.tagName.toLowerCase() !== "text" || !E.value.contains(e)) return;
|
|
365
|
-
let t = U();
|
|
366
|
-
k.value = e, qe(e);
|
|
367
|
-
let n = Number(e.getAttribute("x")) || 0, r = Number(e.getAttribute("y")) || 0, i = Array.from(e.children).map((e) => {
|
|
368
|
-
let t = e.textContent || "";
|
|
369
|
-
return t === "" ? "" : t.split("").join("");
|
|
370
|
-
}), a = i.length ? i : [e.textContent || ""], o = Math.max(0, a.length - 1);
|
|
371
|
-
De.value = {
|
|
372
|
-
x: n,
|
|
373
|
-
y: r
|
|
374
|
-
}, R.value = a, z.value = {
|
|
375
|
-
row: o,
|
|
376
|
-
col: a[o]?.length || 0
|
|
377
|
-
}, ke.value = t, Ae.value = !0, Oe.value = !0, L.value = e, I.value = !0, e.style.pointerEvents = "none", We(), window.addEventListener("keydown", rt), window.addEventListener("mousedown", lt, !0), it(), ct();
|
|
378
|
-
}
|
|
379
|
-
function rt(e) {
|
|
380
|
-
if (!I.value) return;
|
|
381
|
-
let { row: t, col: n } = z.value, r = R.value.slice(), i = !1;
|
|
382
|
-
if (e.key === "Enter") {
|
|
383
|
-
let a = r[t], o = a.slice(0, n), s = a.slice(n);
|
|
384
|
-
r.splice(t, 1, o, s), t += 1, n = 0, i = !0, e.preventDefault();
|
|
385
|
-
} else if (e.key === "Backspace") {
|
|
386
|
-
if (n > 0) r[t] = r[t].slice(0, n - 1) + r[t].slice(n), --n, i = !0;
|
|
387
|
-
else if (t > 0) {
|
|
388
|
-
let e = r[t - 1].length;
|
|
389
|
-
r[t - 1] += r[t], r.splice(t, 1), --t, n = e, i = !0;
|
|
390
|
-
}
|
|
391
|
-
e.preventDefault();
|
|
392
|
-
} else if (e.key === "Delete") n < r[t].length ? (r[t] = r[t].slice(0, n) + r[t].slice(n + 1), i = !0) : t < r.length - 1 && (r[t] += r[t + 1], r.splice(t + 1, 1), i = !0), e.preventDefault();
|
|
393
|
-
else if (e.key === "ArrowLeft") n > 0 ? --n : t > 0 && (--t, n = r[t].length), i = !0, e.preventDefault();
|
|
394
|
-
else if (e.key === "ArrowRight") n < r[t].length ? n += 1 : t < r.length - 1 && (t += 1, n = 0), i = !0, e.preventDefault();
|
|
395
|
-
else if (e.key === "ArrowUp") t > 0 && (--t, n = Math.min(n, r[t].length), i = !0), e.preventDefault();
|
|
396
|
-
else if (e.key === "ArrowDown") t < r.length - 1 && (t += 1, n = Math.min(n, r[t].length), i = !0), e.preventDefault();
|
|
397
|
-
else if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) r[t] = r[t].slice(0, n) + e.key + r[t].slice(n), n += 1, i = !0, e.preventDefault();
|
|
398
|
-
else if (e.key === "Escape") {
|
|
399
|
-
ut(!1, !0);
|
|
400
|
-
return;
|
|
401
|
-
} else e.key === "Tab" && e.preventDefault();
|
|
402
|
-
i && (R.value = r, z.value = {
|
|
403
|
-
row: t,
|
|
404
|
-
col: n
|
|
405
|
-
}, it(), ct());
|
|
406
|
-
}
|
|
407
|
-
function it() {
|
|
408
|
-
let e = L.value;
|
|
409
|
-
if (!e) return;
|
|
410
|
-
let { x: t } = De.value;
|
|
411
|
-
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
412
|
-
R.value.forEach((n, r) => {
|
|
413
|
-
let a = document.createElementNS(i, "tspan");
|
|
414
|
-
a.setAttribute("x", t), a.setAttribute("dominant-baseline", "hanging"), a.setAttribute("dy", r === 0 ? "0" : `${B.value * 1.2 * b.scale}`), a.textContent = n.length ? n : "", e.appendChild(a);
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
let at = _(null);
|
|
418
|
-
function ot() {
|
|
419
|
-
at.value !== null && (clearInterval(at.value), at.value = null);
|
|
420
|
-
}
|
|
421
|
-
function st(e) {
|
|
422
|
-
ot();
|
|
423
|
-
let t = !0;
|
|
424
|
-
e.style.opacity = "1", at.value = setInterval(() => {
|
|
425
|
-
if (!E.value || !e || !E.value.contains(e)) {
|
|
426
|
-
ot();
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
t = !t, e.style.opacity = t ? "1" : "0";
|
|
430
|
-
}, 500);
|
|
431
|
-
}
|
|
432
|
-
function ct() {
|
|
433
|
-
let e = E.value?.querySelector(".vue-data-ui-svg-caret");
|
|
434
|
-
e && E.value && E.value.removeChild(e);
|
|
435
|
-
let t = L.value;
|
|
436
|
-
if (!t || !E.value) return;
|
|
437
|
-
let { x: n, y: r } = De.value, { row: a, col: o } = z.value, s = B.value * b.scale, c = t.childNodes[a];
|
|
438
|
-
if (!c) return;
|
|
439
|
-
let l = c.textContent.slice(0, o);
|
|
440
|
-
l.endsWith(" ") && (l += "\xA0");
|
|
441
|
-
let u = document.createElementNS(i, "text");
|
|
442
|
-
u.setAttribute("x", n), u.setAttribute("y", r), u.setAttribute("font-size", s), u.setAttribute("font-family", "sans-serif"), u.textContent = l || "", E.value.appendChild(u);
|
|
443
|
-
let d = u.getBBox();
|
|
444
|
-
E.value.removeChild(u);
|
|
445
|
-
let f = r + a * s * 1.2, p = n + d.width, m = document.createElementNS(i, "rect");
|
|
446
|
-
m.setAttribute("x", p), m.setAttribute("y", f), m.setAttribute("rx", 1), m.setAttribute("width", 2), m.setAttribute("height", s), m.setAttribute("fill", C.value), m.setAttribute("class", "vue-data-ui-svg-caret"), m.setAttribute("pointer-events", "none");
|
|
447
|
-
let h = t.getAttribute("transform");
|
|
448
|
-
h && m.setAttribute("transform", h), E.value.appendChild(m), st(m);
|
|
449
|
-
}
|
|
450
|
-
function lt(e) {
|
|
451
|
-
L.value && (L.value.contains(e.target) || ut(!1));
|
|
452
|
-
}
|
|
453
|
-
function ut(e = !1, t = !1) {
|
|
454
|
-
window.removeEventListener("keydown", rt), window.removeEventListener("mousedown", lt, !0), ot();
|
|
455
|
-
let n = E.value?.querySelector(".vue-data-ui-svg-caret");
|
|
456
|
-
n && n.remove();
|
|
457
|
-
let r = L.value, i = ke.value, a = R.value.every((e) => !e.length);
|
|
458
|
-
if (t) {
|
|
459
|
-
I.value = !1, L.value = null, R.value = [""], z.value = {
|
|
460
|
-
row: 0,
|
|
461
|
-
col: 0
|
|
462
|
-
}, Oe.value = !1, ke.value = "", Ae.value = !1, Re(i);
|
|
463
|
-
return;
|
|
464
|
-
}
|
|
465
|
-
r && E.value?.contains(r) && (e || a ? r.remove() : r.style.pointerEvents = "all"), I.value = !1, L.value = null, R.value = [""], z.value = {
|
|
466
|
-
row: 0,
|
|
467
|
-
col: 0
|
|
468
|
-
}, Oe.value = !1, ke.value = "", Ae.value = !1, W(i), r && E.value?.contains(r) ? Je(r) : K();
|
|
469
|
-
}
|
|
470
|
-
let J = s(() => n(b.color, .6));
|
|
471
|
-
function dt() {
|
|
472
|
-
if (!E.value) return;
|
|
473
|
-
let e = E.value.querySelector(".vue-data-ui-mask");
|
|
474
|
-
if (e && E.value.removeChild(e), b.active) {
|
|
475
|
-
let e = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
476
|
-
e.setAttribute("class", "vue-data-ui-mask"), e.setAttribute("width", "100%"), e.setAttribute("height", "100%"), e.setAttribute("fill", "transparent"), e.setAttribute("pointer-events", "all"), E.value.insertBefore(e, E.value.firstChild);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
function Y(e) {
|
|
480
|
-
let t = b.svgRef;
|
|
481
|
-
if (!t) return {
|
|
482
|
-
x: 0,
|
|
483
|
-
y: 0
|
|
484
|
-
};
|
|
485
|
-
let n = t.createSVGPoint(), r = e.touches?.length || e.changedTouches?.length ? e.touches?.[0] || e.changedTouches?.[0] : null, i = r ? r.clientX : e.clientX, a = r ? r.clientY : e.clientY;
|
|
486
|
-
n.x = i, n.y = a;
|
|
487
|
-
let o = t.getScreenCTM()?.inverse();
|
|
488
|
-
return o ? n.matrixTransform(o) : {
|
|
489
|
-
x: 0,
|
|
490
|
-
y: 0
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
function ft(e) {
|
|
494
|
-
let t = e.trim().split(/\s+/);
|
|
495
|
-
if (t.length < 4) return e;
|
|
496
|
-
let n = t.slice(1).map(Number);
|
|
497
|
-
if (n.length % 2 != 0) return e;
|
|
498
|
-
let r = pt(n), i = [`M ${r[0]} ${r[1]}`];
|
|
499
|
-
for (let e = 2; e < r.length - 2; e += 2) {
|
|
500
|
-
let t = r[e - 2], n = r[e - 1], a = r[e], o = r[e + 1], s = (t + a) / 2, c = (n + o) / 2;
|
|
501
|
-
i.push(`Q ${t} ${n} ${s} ${c}`);
|
|
502
|
-
}
|
|
503
|
-
let a = r[r.length - 2], o = r[r.length - 1];
|
|
504
|
-
return i.push(`L ${a} ${o}`), i.join(" ");
|
|
505
|
-
}
|
|
506
|
-
function pt(e, t = 1) {
|
|
507
|
-
let n = [...e];
|
|
508
|
-
for (let r = 2; r < e.length - 2; r += 2) {
|
|
509
|
-
let i = e[r], a = e[r + 1], o = e[r - 2], s = e[r - 1], c = e[r + 2], l = e[r + 3];
|
|
510
|
-
n[r] = i + t * ((o + c) / 2 - i), n[r + 1] = a + t * ((s + l) / 2 - a);
|
|
511
|
-
}
|
|
512
|
-
return n;
|
|
513
|
-
}
|
|
514
|
-
function mt(e) {
|
|
515
|
-
let t = e.trim().split(/\s+/), n = "", r = "", i = null, a = null;
|
|
516
|
-
for (let e = 0; e < t.length; e += 1) {
|
|
517
|
-
let o = t[e];
|
|
518
|
-
if (isNaN(o)) {
|
|
519
|
-
if (r = o, r === "M" || r === "L") i = parseFloat(t[++e]), a = parseFloat(t[++e]), n += `${r}${i} ${a}`;
|
|
520
|
-
else if (r === "Q") {
|
|
521
|
-
let r = parseFloat(t[++e]), o = parseFloat(t[++e]), s = parseFloat(t[++e]), c = parseFloat(t[++e]);
|
|
522
|
-
n += r === i && o === a ? `t${s - i} ${c - a}` : `q${r - i} ${o - a} ${s - i} ${c - a}`, i = s, a = c;
|
|
523
|
-
}
|
|
524
|
-
} else {
|
|
525
|
-
let s = parseFloat(o), c = parseFloat(t[++e]);
|
|
526
|
-
if (r === "L") {
|
|
527
|
-
let e = s - i, t = c - a;
|
|
528
|
-
n += e === 0 ? `v${t}` : t === 0 ? `h${e}` : `l${e} ${t}`, i = s, a = c;
|
|
529
|
-
} else if (r === "Q") {
|
|
530
|
-
let r = s, o = c, l = parseFloat(t[++e]), u = parseFloat(t[++e]);
|
|
531
|
-
n += r === i && o === a ? `t${l - i} ${u - a}` : `q${r - i} ${o - a} ${l - i} ${u - a}`, i = l, a = u;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
return n;
|
|
536
|
-
}
|
|
537
|
-
function ht(e) {
|
|
538
|
-
if (H.value !== "draw" || !b.active || !E.value || Fe(e) || Ue(e)) return;
|
|
539
|
-
e.cancelable && e.preventDefault(), K(), F.value = U(), T.value = !0;
|
|
540
|
-
let { x: t, y: n } = Y(e);
|
|
541
|
-
ye.value = {
|
|
542
|
-
x: t,
|
|
543
|
-
y: n
|
|
544
|
-
}, ve.value = `M ${t} ${n}`, D.value = document.createElementNS(i, "path"), D.value.setAttribute("stroke", C.value), D.value.setAttribute("stroke-width", w.value * b.scale), D.value.setAttribute("fill", "none"), D.value.setAttribute("stroke-linecap", "round"), D.value.setAttribute("stroke-linejoin", "round"), D.value.setAttribute("class", "vue-data-ui-doodle"), D.value.setAttribute("data-doodle-id", r()), D.value.setAttribute("pointer-events", "stroke"), E.value.appendChild(D.value);
|
|
545
|
-
}
|
|
546
|
-
function gt(e) {
|
|
547
|
-
if (e.cancelable && e.preventDefault(), !T.value || !E.value || !D.value) return;
|
|
548
|
-
let { x: t, y: n } = Y(e);
|
|
549
|
-
ve.value += ` ${t} ${n}`, D.value.setAttribute("d", ve.value);
|
|
550
|
-
}
|
|
551
|
-
function _t(e) {
|
|
552
|
-
let t = b.svgRef;
|
|
553
|
-
if (!t) return null;
|
|
554
|
-
let n = t.querySelector(`defs#${Ee.value}`);
|
|
555
|
-
n || (n = document.createElementNS(i, "defs"), n.setAttribute("id", Ee.value), t.appendChild(n));
|
|
556
|
-
let a = String(e).trim();
|
|
557
|
-
if (Te.has(a)) return Te.get(a);
|
|
558
|
-
let o = `arrow-${r()}`, s = document.createElementNS(i, "marker");
|
|
559
|
-
s.setAttribute("id", o), s.setAttribute("markerUnits", "strokeWidth"), s.setAttribute("markerWidth", "6"), s.setAttribute("markerHeight", "6"), s.setAttribute("refX", "4"), s.setAttribute("refY", "3"), s.setAttribute("orient", "auto"), s.setAttribute("viewBox", "0 0 6 6");
|
|
560
|
-
let c = document.createElementNS(i, "path");
|
|
561
|
-
return c.setAttribute("d", "M 0 0 L 6 3 L 0 6 z"), c.setAttribute("fill", e), c.setAttribute("stroke", "none"), s.appendChild(c), n.appendChild(s), Te.set(a, o), o;
|
|
562
|
-
}
|
|
563
|
-
function vt(e) {
|
|
564
|
-
if (!["line", "arrow"].includes(H.value) || !b.active || !E.value || Fe(e) || Ue(e)) return;
|
|
565
|
-
e.cancelable && e.preventDefault(), K(), F.value = U(), T.value = !0;
|
|
566
|
-
let { x: t, y: n } = Y(e);
|
|
567
|
-
if (ye.value = {
|
|
568
|
-
x: t,
|
|
569
|
-
y: n
|
|
570
|
-
}, O.value = document.createElementNS(i, "line"), O.value.setAttribute("stroke", C.value), O.value.setAttribute("stroke-width", w.value * b.scale), O.value.setAttribute("stroke-linecap", "round"), O.value.setAttribute("class", "vue-data-ui-doodle"), O.value.setAttribute("data-doodle-id", r()), O.value.setAttribute("pointer-events", "stroke"), O.value.setAttribute("x1", t), O.value.setAttribute("y1", n), O.value.setAttribute("x2", t), O.value.setAttribute("y2", n), H.value === "arrow") {
|
|
571
|
-
let e = _t(C.value);
|
|
572
|
-
e && O.value.setAttribute("marker-end", `url(#${e})`);
|
|
573
|
-
}
|
|
574
|
-
E.value.appendChild(O.value);
|
|
575
|
-
}
|
|
576
|
-
function yt(e) {
|
|
577
|
-
if (e.cancelable && e.preventDefault(), !["line", "arrow"].includes(H.value) || !T.value || !E.value || !O.value) return;
|
|
578
|
-
let { x: t, y: n } = Y(e);
|
|
579
|
-
O.value.setAttribute("x2", t), O.value.setAttribute("y2", n);
|
|
580
|
-
}
|
|
581
|
-
function bt(e) {
|
|
582
|
-
if (T.value && E.value && O.value) {
|
|
583
|
-
let { x: t, y: n } = Y(e);
|
|
584
|
-
O.value.setAttribute("x2", t), O.value.setAttribute("y2", n), W(F.value), O.value = null, F.value = "";
|
|
585
|
-
}
|
|
586
|
-
T.value = !1;
|
|
587
|
-
}
|
|
588
|
-
function X(e) {
|
|
589
|
-
if (T.value && E.value && D.value) {
|
|
590
|
-
let { x: t, y: n } = Y(e);
|
|
591
|
-
if (ye.value && ye.value.x === t && ye.value.y === n) {
|
|
592
|
-
D.value.remove();
|
|
593
|
-
let e = document.createElementNS(i, "circle");
|
|
594
|
-
e.setAttribute("cx", t), e.setAttribute("cy", n), e.setAttribute("r", w.value * b.scale / 2), e.setAttribute("fill", C.value), e.setAttribute("class", "vue-data-ui-doodle"), e.setAttribute("data-doodle-id", r()), e.setAttribute("pointer-events", "all"), E.value.appendChild(e);
|
|
595
|
-
} else D.value.setAttribute("d", mt(ft(ve.value)));
|
|
596
|
-
W(F.value), F.value = "", D.value = null;
|
|
597
|
-
}
|
|
598
|
-
T.value = !1;
|
|
599
|
-
}
|
|
600
|
-
function xt() {
|
|
601
|
-
if (!x.value.length || !E.value) return;
|
|
602
|
-
let e = U(), t = x.value.pop();
|
|
603
|
-
S.value.push({
|
|
604
|
-
state: e,
|
|
605
|
-
mergeKey: null,
|
|
606
|
-
timestamp: Date.now()
|
|
607
|
-
}), Re(t.state);
|
|
608
|
-
}
|
|
609
|
-
function St() {
|
|
610
|
-
if (!S.value.length || !E.value) return;
|
|
611
|
-
let e = U(), t = S.value.pop();
|
|
612
|
-
x.value.push({
|
|
613
|
-
state: e,
|
|
614
|
-
mergeKey: null,
|
|
615
|
-
timestamp: Date.now()
|
|
616
|
-
}), Re(t.state);
|
|
617
|
-
}
|
|
618
|
-
function Ct() {
|
|
619
|
-
I.value && ut(!1), K(), E.value && (E.value.innerHTML = ""), x.value = [], S.value = [], Oe.value = !1, ke.value = "", Ae.value = !1, F.value = "", dt();
|
|
620
|
-
}
|
|
621
|
-
y(H, () => {
|
|
622
|
-
b.active && (Tt(), wt(), Z());
|
|
623
|
-
});
|
|
624
|
-
function wt() {
|
|
625
|
-
b.svgRef && b.active && (b.svgRef.addEventListener("mousedown", Ye), b.svgRef.addEventListener("mousemove", Xe), b.svgRef.addEventListener("mouseup", q), b.svgRef.addEventListener("mouseleave", q), b.svgRef.addEventListener("touchstart", Ye, { passive: !1 }), b.svgRef.addEventListener("touchmove", Xe, { passive: !1 }), b.svgRef.addEventListener("touchend", q), b.svgRef.addEventListener("touchcancel", q), H.value === "draw" ? (b.svgRef.addEventListener("mousedown", ht), b.svgRef.addEventListener("mousemove", gt), b.svgRef.addEventListener("mouseup", X), b.svgRef.addEventListener("mouseleave", X), b.svgRef.addEventListener("touchstart", ht, { passive: !1 }), b.svgRef.addEventListener("touchmove", gt, { passive: !1 }), b.svgRef.addEventListener("touchend", X), b.svgRef.addEventListener("touchcancel", X)) : ["line", "arrow"].includes(H.value) ? (b.svgRef.addEventListener("mousedown", vt), b.svgRef.addEventListener("mousemove", yt), b.svgRef.addEventListener("mouseup", bt), b.svgRef.addEventListener("touchstart", vt, { passive: !1 }), b.svgRef.addEventListener("touchmove", yt, { passive: !1 }), b.svgRef.addEventListener("touchend", bt), b.svgRef.addEventListener("touchcancel", bt)) : H.value === "text" && (b.svgRef.addEventListener("mousedown", tt), b.svgRef.addEventListener("touchstart", tt, { passive: !1 })), E.value && (E.value.style.pointerEvents = "auto"));
|
|
626
|
-
}
|
|
627
|
-
function Tt() {
|
|
628
|
-
b.svgRef && (b.svgRef.removeEventListener("mousedown", Ye), b.svgRef.removeEventListener("mousemove", Xe), b.svgRef.removeEventListener("mouseup", q), b.svgRef.removeEventListener("mouseleave", q), b.svgRef.removeEventListener("touchstart", Ye), b.svgRef.removeEventListener("touchmove", Xe), b.svgRef.removeEventListener("touchend", q), b.svgRef.removeEventListener("touchcancel", q), b.svgRef.removeEventListener("mousedown", ht), b.svgRef.removeEventListener("mousemove", gt), b.svgRef.removeEventListener("mouseup", X), b.svgRef.removeEventListener("mouseleave", X), b.svgRef.removeEventListener("touchstart", ht), b.svgRef.removeEventListener("touchmove", gt), b.svgRef.removeEventListener("touchend", X), b.svgRef.removeEventListener("touchcancel", X), b.svgRef.removeEventListener("mousedown", vt), b.svgRef.removeEventListener("mousemove", yt), b.svgRef.removeEventListener("mouseup", bt), b.svgRef.removeEventListener("touchstart", vt), b.svgRef.removeEventListener("touchmove", yt), b.svgRef.removeEventListener("touchend", bt), b.svgRef.removeEventListener("touchcancel", bt), b.svgRef.removeEventListener("mousedown", tt), b.svgRef.removeEventListener("touchstart", tt), E.value && (E.value.style.pointerEvents = "none"));
|
|
629
|
-
}
|
|
630
|
-
y(() => b.active, (e) => {
|
|
631
|
-
e ? wt() : (K(), Tt()), Z();
|
|
632
|
-
}), y(() => b.active, () => {
|
|
633
|
-
p(() => {
|
|
634
|
-
dt();
|
|
635
|
-
});
|
|
636
|
-
}), y(() => b.active, (e) => {
|
|
637
|
-
b.svgRef && (e ? b.svgRef.style.touchAction = "none" : b.svgRef.style.touchAction = "");
|
|
638
|
-
}, { immediate: !0 });
|
|
639
|
-
function Z(e = null) {
|
|
640
|
-
if (E.value) {
|
|
641
|
-
if (!b.active) {
|
|
642
|
-
E.value.style.cursor = "";
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
if (I.value) {
|
|
646
|
-
E.value.style.cursor = "text";
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
if (e && Ie(e)) {
|
|
650
|
-
E.value.style.cursor = "pointer";
|
|
651
|
-
return;
|
|
652
|
-
}
|
|
653
|
-
if (P.value || e && Fe(e)) {
|
|
654
|
-
E.value.style.cursor = "move";
|
|
655
|
-
return;
|
|
656
|
-
}
|
|
657
|
-
if (A.value && k.value) {
|
|
658
|
-
E.value.style.cursor = "grabbing";
|
|
659
|
-
return;
|
|
660
|
-
}
|
|
661
|
-
if (e && k.value && E.value.contains(k.value) && He(k.value, e)) {
|
|
662
|
-
E.value.style.cursor = "grab";
|
|
663
|
-
return;
|
|
664
|
-
}
|
|
665
|
-
H.value === "text" ? E.value.style.cursor = "text" : ["line", "arrow"].includes(H.value) ? E.value.style.cursor = "crosshair" : E.value.style.cursor = Ne.value;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
let Q = _(null), Et = _(null), Dt = _(!1), $ = _({
|
|
669
|
-
x: 0,
|
|
670
|
-
y: 0
|
|
671
|
-
}), Ot = _(null), kt = _(null), At = s(() => ({
|
|
672
|
-
backgroundColor: b.backgroundColor,
|
|
673
|
-
"--vue-ui-pen-and-paper-drag-x": `${$.value.x}px`,
|
|
674
|
-
"--vue-ui-pen-and-paper-drag-y": `${$.value.y}px`
|
|
675
|
-
}));
|
|
676
|
-
function jt() {
|
|
677
|
-
return {
|
|
678
|
-
width: document.documentElement.clientWidth || window.innerWidth,
|
|
679
|
-
height: document.documentElement.clientHeight || window.innerHeight
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
function Mt() {
|
|
683
|
-
if (!Q.value) return null;
|
|
684
|
-
let e = [
|
|
685
|
-
Q.value,
|
|
686
|
-
Q.value.querySelector(".vue-ui-pen-and-paper-drag-handle"),
|
|
687
|
-
Q.value.querySelector(".vertical-range")
|
|
688
|
-
].filter(Boolean).map((e) => e.getBoundingClientRect());
|
|
689
|
-
return {
|
|
690
|
-
left: Math.min(...e.map((e) => e.left)),
|
|
691
|
-
top: Math.min(...e.map((e) => e.top)),
|
|
692
|
-
right: Math.max(...e.map((e) => e.right)),
|
|
693
|
-
bottom: Math.max(...e.map((e) => e.bottom))
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
function Nt(e) {
|
|
697
|
-
if (e.pointerType === "mouse" && e.button !== 0 || !Q.value) return;
|
|
698
|
-
e.preventDefault(), e.stopPropagation();
|
|
699
|
-
let t = Mt();
|
|
700
|
-
t && (Dt.value = !0, kt.value = e.pointerId, Ot.value = {
|
|
701
|
-
clientX: e.clientX,
|
|
702
|
-
clientY: e.clientY,
|
|
703
|
-
offsetX: $.value.x,
|
|
704
|
-
offsetY: $.value.y,
|
|
705
|
-
rect: t
|
|
706
|
-
}, window.addEventListener("pointermove", Pt), window.addEventListener("pointerup", Ft), window.addEventListener("pointercancel", Ft));
|
|
707
|
-
}
|
|
708
|
-
function Pt(e) {
|
|
709
|
-
if (!Dt.value || !Ot.value || e.pointerId !== kt.value) return;
|
|
710
|
-
e.preventDefault();
|
|
711
|
-
let t = Ot.value, { width: n, height: r } = jt(), i = e.clientX - t.clientX, a = e.clientY - t.clientY, o = Math.min(Math.max(i, -t.rect.left), n - t.rect.right), s = Math.min(Math.max(a, -t.rect.top), r - t.rect.bottom);
|
|
712
|
-
$.value = {
|
|
713
|
-
x: t.offsetX + o,
|
|
714
|
-
y: t.offsetY + s
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function Ft(e) {
|
|
718
|
-
(e?.pointerId === void 0 || kt.value === null || e.pointerId === kt.value) && (Dt.value = !1, Ot.value = null, kt.value = null, window.removeEventListener("pointermove", Pt), window.removeEventListener("pointerup", Ft), window.removeEventListener("pointercancel", Ft));
|
|
719
|
-
}
|
|
720
|
-
function It() {
|
|
721
|
-
if (!Q.value || !b.active) return;
|
|
722
|
-
let e = Mt();
|
|
723
|
-
if (!e) return;
|
|
724
|
-
let { width: t, height: n } = jt(), r = 0, i = 0;
|
|
725
|
-
e.left < 0 ? r = -e.left : e.right > t && (r = t - e.right), e.top < 0 ? i = -e.top : e.bottom > n && (i = n - e.bottom), (r || i) && ($.value = {
|
|
726
|
-
x: $.value.x + r,
|
|
727
|
-
y: $.value.y + i
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
return te(() => {
|
|
731
|
-
window.addEventListener("resize", It), p(() => {
|
|
732
|
-
b.svgRef && (E.value = document.createElementNS("http://www.w3.org/2000/svg", "g"), E.value.setAttribute("class", "vue-data-ui-doodles"), b.svgRef.appendChild(E.value), Z(), b.active ? wt() : Tt(), dt());
|
|
733
|
-
});
|
|
734
|
-
}), y(() => b.active, async (e) => {
|
|
735
|
-
if (!e) {
|
|
736
|
-
Ft(), $.value = {
|
|
737
|
-
x: 0,
|
|
738
|
-
y: 0
|
|
739
|
-
};
|
|
740
|
-
return;
|
|
741
|
-
}
|
|
742
|
-
await p(), Et.value?.focus();
|
|
743
|
-
}, { flush: "post" }), ee(() => {
|
|
744
|
-
ot(), K(), Ft(), window.removeEventListener("resize", It), E.value && b.svgRef && (E.value.remove(), Tt());
|
|
745
|
-
}), (n, r) => e.active ? (ne(), l("div", {
|
|
746
|
-
key: 0,
|
|
747
|
-
ref_key: "menuRef",
|
|
748
|
-
ref: Q,
|
|
749
|
-
"data-dom-to-png-ignore": "",
|
|
750
|
-
class: m(["vue-ui-pen-and-paper-actions", { "vue-ui-pen-and-paper-actions-dragging": Dt.value }]),
|
|
751
|
-
style: g(At.value)
|
|
752
|
-
}, [
|
|
753
|
-
u("button", {
|
|
754
|
-
type: "button",
|
|
755
|
-
class: "vue-ui-pen-and-paper-drag-handle",
|
|
756
|
-
"aria-label": "Move drawing toolbar",
|
|
757
|
-
style: g({
|
|
758
|
-
backgroundColor: e.backgroundColor,
|
|
759
|
-
border: `1px solid ${J.value}`,
|
|
760
|
-
color: e.color
|
|
761
|
-
}),
|
|
762
|
-
onPointerdown: Nt
|
|
763
|
-
}, [(ne(), l("svg", le, [
|
|
764
|
-
u("circle", {
|
|
765
|
-
fill: e.color,
|
|
766
|
-
cx: "3",
|
|
767
|
-
cy: "3",
|
|
768
|
-
r: "0.7"
|
|
769
|
-
}, null, 8, ue),
|
|
770
|
-
u("circle", {
|
|
771
|
-
fill: e.color,
|
|
772
|
-
cx: "3",
|
|
773
|
-
cy: "6",
|
|
774
|
-
r: "0.7"
|
|
775
|
-
}, null, 8, de),
|
|
776
|
-
u("circle", {
|
|
777
|
-
fill: e.color,
|
|
778
|
-
cx: "3",
|
|
779
|
-
cy: "9",
|
|
780
|
-
r: "0.7"
|
|
781
|
-
}, null, 8, fe)
|
|
782
|
-
]))], 36),
|
|
783
|
-
u("button", {
|
|
784
|
-
ref_key: "buttonToggle",
|
|
785
|
-
ref: Et,
|
|
786
|
-
class: "vue-ui-pen-and-paper-action",
|
|
787
|
-
onClick: r[0] ||= (e) => _e("close"),
|
|
788
|
-
style: g({
|
|
789
|
-
backgroundColor: e.backgroundColor,
|
|
790
|
-
border: `1px solid ${J.value}`,
|
|
791
|
-
cursor: e.isCursorPointer ? "pointer" : "default"
|
|
792
|
-
})
|
|
793
|
-
}, [v(n.$slots, "annotator-action-close", {}, () => [d(a, {
|
|
794
|
-
name: "close",
|
|
795
|
-
stroke: e.color
|
|
796
|
-
}, null, 8, ["stroke"])])], 4),
|
|
797
|
-
u("button", {
|
|
798
|
-
class: "vue-ui-pen-and-paper-action",
|
|
799
|
-
tabindex: "-1",
|
|
800
|
-
style: g(`padding: 0 !important; cursor: ${e.isCursorPointer ? "pointer" : "default"}`)
|
|
801
|
-
}, [d(o, {
|
|
802
|
-
value: C.value,
|
|
803
|
-
"onUpdate:value": r[1] ||= (e) => C.value = e,
|
|
804
|
-
backgroundColor: e.backgroundColor,
|
|
805
|
-
buttonBorderColor: J.value,
|
|
806
|
-
isCursorPointer: e.isCursorPointer,
|
|
807
|
-
palette: e.palette
|
|
808
|
-
}, {
|
|
809
|
-
"annotator-action-color": oe(({ color: e }) => [v(n.$slots, "annotator-action-color", h(f({ color: e })))]),
|
|
810
|
-
_: 3
|
|
811
|
-
}, 8, [
|
|
812
|
-
"value",
|
|
813
|
-
"backgroundColor",
|
|
814
|
-
"buttonBorderColor",
|
|
815
|
-
"isCursorPointer",
|
|
816
|
-
"palette"
|
|
817
|
-
])], 4),
|
|
818
|
-
u("button", {
|
|
819
|
-
class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-active": H.value === "text" }]),
|
|
820
|
-
onClick: r[2] ||= (e) => et(),
|
|
821
|
-
style: g({
|
|
822
|
-
backgroundColor: e.backgroundColor,
|
|
823
|
-
border: `1px solid ${J.value}`,
|
|
824
|
-
cursor: e.isCursorPointer ? "pointer" : "default"
|
|
825
|
-
})
|
|
826
|
-
}, [v(n.$slots, "annotator-action-draw", h(f({ mode: H.value })), () => [d(a, {
|
|
827
|
-
name: Me[H.value],
|
|
828
|
-
stroke: e.color
|
|
829
|
-
}, null, 8, ["name", "stroke"])]), u("div", { style: g({
|
|
830
|
-
position: "absolute",
|
|
831
|
-
bottom: "-20px",
|
|
832
|
-
color: J.value,
|
|
833
|
-
width: "100%",
|
|
834
|
-
textAlign: "center",
|
|
835
|
-
fontSize: "12px",
|
|
836
|
-
fontVariantNumeric: "tabular-nums"
|
|
837
|
-
}) }, re(ie(t)({
|
|
838
|
-
v: H.value === "text" ? Math.round(B.value) : Math.round(w.value),
|
|
839
|
-
s: "px",
|
|
840
|
-
r: 1
|
|
841
|
-
})), 5)], 6),
|
|
842
|
-
u("button", {
|
|
843
|
-
class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !x.value.length }]),
|
|
844
|
-
disabled: !x.value.length,
|
|
845
|
-
onClick: xt,
|
|
846
|
-
style: g({
|
|
847
|
-
backgroundColor: e.backgroundColor,
|
|
848
|
-
border: `1px solid ${J.value}`,
|
|
849
|
-
marginTop: "20px",
|
|
850
|
-
cursor: e.isCursorPointer ? "pointer" : "default"
|
|
851
|
-
})
|
|
852
|
-
}, [v(n.$slots, "annotator-action-undo", h(f({ disabled: !x.value.length })), () => [d(a, {
|
|
853
|
-
name: "refresh",
|
|
854
|
-
stroke: e.color
|
|
855
|
-
}, null, 8, ["stroke"])])], 14, pe),
|
|
856
|
-
u("button", {
|
|
857
|
-
class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !S.value.length }]),
|
|
858
|
-
onClick: St,
|
|
859
|
-
style: g({
|
|
860
|
-
backgroundColor: e.backgroundColor,
|
|
861
|
-
border: `1px solid ${J.value}`,
|
|
862
|
-
cursor: e.isCursorPointer ? "pointer" : "default"
|
|
863
|
-
})
|
|
864
|
-
}, [v(n.$slots, "annotator-action-redo", h(f({ disabled: !S.value.length })), () => [d(a, {
|
|
865
|
-
name: "refresh",
|
|
866
|
-
stroke: e.color,
|
|
867
|
-
style: { transform: "scaleX(-1)" }
|
|
868
|
-
}, null, 8, ["stroke"])])], 6),
|
|
869
|
-
u("button", {
|
|
870
|
-
class: m(["vue-ui-pen-and-paper-action", { "vue-ui-pen-and-paper-action-disabled": !x.value.length }]),
|
|
871
|
-
onClick: Ct,
|
|
872
|
-
style: g({
|
|
873
|
-
backgroundColor: e.backgroundColor,
|
|
874
|
-
border: `1px solid ${J.value}`,
|
|
875
|
-
cursor: e.isCursorPointer ? "pointer" : "default"
|
|
876
|
-
})
|
|
877
|
-
}, [v(n.$slots, "annotator-action-delete", h(f({ disabled: !x.value.length })), () => [d(a, {
|
|
878
|
-
name: "trash",
|
|
879
|
-
stroke: e.color
|
|
880
|
-
}, null, 8, ["stroke"])])], 6),
|
|
881
|
-
H.value === "text" ? se((ne(), l("input", {
|
|
882
|
-
key: 0,
|
|
883
|
-
ref: "range",
|
|
884
|
-
type: "range",
|
|
885
|
-
class: "vertical-range",
|
|
886
|
-
min: 3,
|
|
887
|
-
max: 48,
|
|
888
|
-
step: 1,
|
|
889
|
-
"onUpdate:modelValue": r[3] ||= (e) => B.value = e,
|
|
890
|
-
style: g({ accentColor: e.color })
|
|
891
|
-
}, null, 4)), [[ae, B.value]]) : se((ne(), l("input", {
|
|
892
|
-
key: 1,
|
|
893
|
-
ref: "range",
|
|
894
|
-
type: "range",
|
|
895
|
-
class: "vertical-range",
|
|
896
|
-
min: .5,
|
|
897
|
-
max: 12,
|
|
898
|
-
step: .1,
|
|
899
|
-
"onUpdate:modelValue": r[4] ||= (e) => w.value = e,
|
|
900
|
-
style: g({ accentColor: e.color })
|
|
901
|
-
}, null, 4)), [[ae, w.value]])
|
|
902
|
-
], 6)) : c("", !0);
|
|
903
|
-
}
|
|
904
|
-
};
|
|
905
|
-
//#endregion
|
|
906
|
-
export { b as n, ce as t };
|