vue-data-ui 3.27.0 → 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.
Files changed (531) hide show
  1. package/dist/A11yDataTable-DWNlWXzs.js +1 -0
  2. package/dist/Arrow-CJeSufxg.js +1 -0
  3. package/dist/BaseDraggableDialog-T1gEsQid.js +1 -0
  4. package/dist/BaseIcon-Cz30ODFA.js +1 -0
  5. package/dist/BaseLegendToggle-Dn_tNvn4.js +1 -0
  6. package/dist/BaseScanner-8NdoBs7B.js +1 -0
  7. package/dist/BaseZoomControls-xq3tWD3j.js +1 -0
  8. package/dist/ColorPicker-CUjEw53A.js +1 -0
  9. package/dist/DataTable-DSUA5M9p.js +1 -0
  10. package/dist/DefGrad-DKMq1REY.js +1 -0
  11. package/dist/HillActions-DdvXld3a.js +1 -0
  12. package/dist/Legend-DokTll4u.js +1 -0
  13. package/dist/NonSvgPenAndPaper-BLzQuIm6.js +1 -0
  14. package/dist/PackageVersion-D6pKL176.js +1 -0
  15. package/dist/PenAndPaper-DvJJaeU2.js +1 -0
  16. package/dist/RecursiveCircles-BftI1kwF.js +1 -0
  17. package/dist/RecursiveLabels-B0d04xSj.js +1 -0
  18. package/dist/RecursiveLinks-CZtG6uWg.js +1 -0
  19. package/dist/Shape-tkp65OcG.js +1 -0
  20. package/dist/SlicerPreview-GFRs2EWB.js +1 -0
  21. package/dist/SparkTooltip-BlJLvizH.js +1 -0
  22. package/dist/Title-BRAjxtjG.js +1 -0
  23. package/dist/Tooltip-BUXB0i6z.js +1 -0
  24. package/dist/UserOptions-D65t74CM.js +1 -0
  25. package/dist/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
  26. package/dist/annotationSlots-BRR85CqJ.js +1 -0
  27. package/dist/chartImage-NwZO-elv.js +1 -0
  28. package/dist/components/arrow.js +1 -2
  29. package/dist/components/vue-ui-3d-bar.js +1 -2
  30. package/dist/components/vue-ui-accordion.js +1 -2
  31. package/dist/components/vue-ui-age-pyramid.js +1 -2
  32. package/dist/components/vue-ui-annotator.js +1 -2
  33. package/dist/components/vue-ui-bullet.js +1 -2
  34. package/dist/components/vue-ui-bump.js +1 -2
  35. package/dist/components/vue-ui-candlestick.js +1 -2
  36. package/dist/components/vue-ui-carousel-table.js +1 -2
  37. package/dist/components/vue-ui-chestnut.js +1 -2
  38. package/dist/components/vue-ui-chord.js +1 -2
  39. package/dist/components/vue-ui-circle-pack.js +1 -2
  40. package/dist/components/vue-ui-cursor.js +1 -2
  41. package/dist/components/vue-ui-dag.js +1 -2
  42. package/dist/components/vue-ui-dashboard.js +1 -2
  43. package/dist/components/vue-ui-digits.js +1 -2
  44. package/dist/components/vue-ui-donut-evolution.js +1 -2
  45. package/dist/components/vue-ui-donut.js +1 -2
  46. package/dist/components/vue-ui-dumbbell.js +1 -2
  47. package/dist/components/vue-ui-flow.js +1 -2
  48. package/dist/components/vue-ui-funnel.js +1 -2
  49. package/dist/components/vue-ui-galaxy.js +1 -2
  50. package/dist/components/vue-ui-gauge.js +1 -2
  51. package/dist/components/vue-ui-geo.js +1 -2
  52. package/dist/components/vue-ui-gizmo.js +1 -2
  53. package/dist/components/vue-ui-heatmap.js +1 -2
  54. package/dist/components/vue-ui-hill.js +1 -2
  55. package/dist/components/vue-ui-history-plot.js +1 -2
  56. package/dist/components/vue-ui-horizontal-bar.js +1 -2
  57. package/dist/components/vue-ui-icon.js +1 -2
  58. package/dist/components/vue-ui-kpi.js +1 -2
  59. package/dist/components/vue-ui-label.js +1 -2
  60. package/dist/components/vue-ui-mini-loader.js +1 -2
  61. package/dist/components/vue-ui-molecule.js +1 -2
  62. package/dist/components/vue-ui-mood-radar.js +1 -2
  63. package/dist/components/vue-ui-nested-donuts.js +1 -2
  64. package/dist/components/vue-ui-onion.js +1 -2
  65. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -2
  66. package/dist/components/vue-ui-pattern-seed.js +1 -2
  67. package/dist/components/vue-ui-pattern.js +1 -2
  68. package/dist/components/vue-ui-quadrant.js +1 -2
  69. package/dist/components/vue-ui-quick-chart.js +1 -2
  70. package/dist/components/vue-ui-radar.js +1 -2
  71. package/dist/components/vue-ui-rating.js +1 -2
  72. package/dist/components/vue-ui-relation-circle.js +1 -2
  73. package/dist/components/vue-ui-ridgeline.js +1 -2
  74. package/dist/components/vue-ui-rings.js +1 -2
  75. package/dist/components/vue-ui-scatter.js +1 -2
  76. package/dist/components/vue-ui-skeleton.js +1 -2
  77. package/dist/components/vue-ui-smiley.js +1 -2
  78. package/dist/components/vue-ui-spark-trend.js +1 -2
  79. package/dist/components/vue-ui-sparkbar.js +1 -2
  80. package/dist/components/vue-ui-sparkgauge.js +1 -2
  81. package/dist/components/vue-ui-sparkhistogram.js +1 -2
  82. package/dist/components/vue-ui-sparkline.js +1 -2
  83. package/dist/components/vue-ui-sparkstackbar.js +1 -2
  84. package/dist/components/vue-ui-stackbar.js +1 -2
  85. package/dist/components/vue-ui-stackline.js +1 -2
  86. package/dist/components/vue-ui-strip-plot.js +1 -2
  87. package/dist/components/vue-ui-table-heatmap.js +1 -2
  88. package/dist/components/vue-ui-table-sparkline.js +1 -2
  89. package/dist/components/vue-ui-table.js +1 -2
  90. package/dist/components/vue-ui-thermometer.js +1 -2
  91. package/dist/components/vue-ui-timer.js +1 -2
  92. package/dist/components/vue-ui-tiremarks.js +1 -2
  93. package/dist/components/vue-ui-treemap.js +1 -2
  94. package/dist/components/vue-ui-vertical-bar.js +1 -2
  95. package/dist/components/vue-ui-waffle.js +1 -2
  96. package/dist/components/vue-ui-wheel.js +1 -2
  97. package/dist/components/vue-ui-word-cloud.js +1 -2
  98. package/dist/components/vue-ui-world.js +1 -2
  99. package/dist/components/vue-ui-xy-canvas.js +1 -2
  100. package/dist/components/vue-ui-xy.js +1 -2
  101. package/dist/composables.js +1 -5
  102. package/dist/dom-to-png-Cp3WLHmJ.js +3 -0
  103. package/dist/exposedLib-CMTeSmyW.js +1 -0
  104. package/dist/geoProjections-Bvj-eMvq.js +1 -0
  105. package/dist/img-8sM3sVWU.js +1 -0
  106. package/dist/labelUtils-Djp5nJtN.js +1 -0
  107. package/dist/lib-zDxoqrgo.js +12 -0
  108. package/dist/package-DIR2F6AE.js +1 -0
  109. package/dist/patternUtils-_q3ArM3g.js +1 -0
  110. package/dist/pdf-Dlv_ks7R.js +1 -0
  111. package/dist/render-common-DOYi0f4Z.js +1 -0
  112. package/dist/resolveChartConfig-BSo1Oe9n.js +1 -0
  113. package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
  114. package/dist/ssr/vue-ui-donut.js +1 -2
  115. package/dist/ssr/vue-ui-xy.js +1 -2
  116. package/dist/ssr.js +1 -3
  117. package/dist/style.css +1 -1
  118. package/dist/tableIntegration-CNoJ1CIY.js +1 -0
  119. package/dist/types/composables.d.ts +12 -12
  120. package/dist/types/ssr.d.ts +84 -84
  121. package/dist/types/utils.d.ts +82 -73
  122. package/dist/types/vue-data-ui.d.ts +17961 -17958
  123. package/dist/types/vue-ui-3d-bar.d.ts +24 -91
  124. package/dist/types/vue-ui-accordion.d.ts +2 -10
  125. package/dist/types/vue-ui-age-pyramid.d.ts +27 -106
  126. package/dist/types/vue-ui-annotator.d.ts +12 -88
  127. package/dist/types/vue-ui-bullet.d.ts +21 -83
  128. package/dist/types/vue-ui-bump.d.ts +23 -90
  129. package/dist/types/vue-ui-candlestick.d.ts +27 -108
  130. package/dist/types/vue-ui-carousel-table.d.ts +11 -57
  131. package/dist/types/vue-ui-chestnut.d.ts +27 -96
  132. package/dist/types/vue-ui-chord.d.ts +31 -108
  133. package/dist/types/vue-ui-circle-pack.d.ts +30 -124
  134. package/dist/types/vue-ui-cursor.d.ts +2 -8
  135. package/dist/types/vue-ui-dag.d.ts +35 -125
  136. package/dist/types/vue-ui-dashboard.d.ts +18 -66
  137. package/dist/types/vue-ui-digits.d.ts +2 -11
  138. package/dist/types/vue-ui-donut-evolution.d.ts +31 -100
  139. package/dist/types/vue-ui-donut.d.ts +31 -121
  140. package/dist/types/vue-ui-dumbbell.d.ts +24 -92
  141. package/dist/types/vue-ui-flow.d.ts +28 -104
  142. package/dist/types/vue-ui-funnel.d.ts +18 -77
  143. package/dist/types/vue-ui-galaxy.d.ts +30 -112
  144. package/dist/types/vue-ui-gauge.d.ts +22 -87
  145. package/dist/types/vue-ui-geo.d.ts +22 -92
  146. package/dist/types/vue-ui-gizmo.d.ts +5 -20
  147. package/dist/types/vue-ui-heatmap.d.ts +25 -101
  148. package/dist/types/vue-ui-hill.d.ts +22 -88
  149. package/dist/types/vue-ui-history-plot.d.ts +30 -112
  150. package/dist/types/vue-ui-horizontal-bar.d.ts +30 -114
  151. package/dist/types/vue-ui-icon.d.ts +1 -13
  152. package/dist/types/vue-ui-kpi.d.ts +5 -23
  153. package/dist/types/vue-ui-label.d.ts +11 -48
  154. package/dist/types/vue-ui-mini-loader.d.ts +4 -13
  155. package/dist/types/vue-ui-molecule.d.ts +27 -110
  156. package/dist/types/vue-ui-mood-radar.d.ts +23 -90
  157. package/dist/types/vue-ui-nested-donuts.d.ts +28 -109
  158. package/dist/types/vue-ui-onion.d.ts +26 -104
  159. package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +34 -123
  160. package/dist/types/vue-ui-pattern-seed.d.ts +1 -14
  161. package/dist/types/vue-ui-pattern.d.ts +1 -13
  162. package/dist/types/vue-ui-quadrant.d.ts +33 -123
  163. package/dist/types/vue-ui-quick-chart.d.ts +30 -110
  164. package/dist/types/vue-ui-radar.d.ts +31 -114
  165. package/dist/types/vue-ui-rating.d.ts +8 -40
  166. package/dist/types/vue-ui-relation-circle.d.ts +26 -90
  167. package/dist/types/vue-ui-ridgeline.d.ts +27 -104
  168. package/dist/types/vue-ui-rings.d.ts +21 -96
  169. package/dist/types/vue-ui-scatter.d.ts +22 -95
  170. package/dist/types/vue-ui-skeleton.d.ts +2 -10
  171. package/dist/types/vue-ui-smiley.d.ts +6 -26
  172. package/dist/types/vue-ui-spark-trend.d.ts +2 -18
  173. package/dist/types/vue-ui-sparkbar.d.ts +10 -47
  174. package/dist/types/vue-ui-sparkgauge.d.ts +5 -26
  175. package/dist/types/vue-ui-sparkhistogram.d.ts +12 -44
  176. package/dist/types/vue-ui-sparkline.d.ts +16 -61
  177. package/dist/types/vue-ui-sparkstackbar.d.ts +13 -58
  178. package/dist/types/vue-ui-stackbar.d.ts +36 -130
  179. package/dist/types/vue-ui-stackline.d.ts +29 -116
  180. package/dist/types/vue-ui-strip-plot.d.ts +22 -96
  181. package/dist/types/vue-ui-table-heatmap.d.ts +14 -60
  182. package/dist/types/vue-ui-table-sparkline.d.ts +12 -51
  183. package/dist/types/vue-ui-table.d.ts +9 -36
  184. package/dist/types/vue-ui-thermometer.d.ts +14 -68
  185. package/dist/types/vue-ui-timer.d.ts +10 -47
  186. package/dist/types/vue-ui-tiremarks.d.ts +14 -68
  187. package/dist/types/vue-ui-treemap.d.ts +26 -105
  188. package/dist/types/vue-ui-vertical-bar.d.ts +8 -19
  189. package/dist/types/vue-ui-waffle.d.ts +23 -99
  190. package/dist/types/vue-ui-wheel.d.ts +14 -68
  191. package/dist/types/vue-ui-word-cloud.d.ts +20 -95
  192. package/dist/types/vue-ui-world.d.ts +22 -96
  193. package/dist/types/vue-ui-xy-canvas.d.ts +24 -101
  194. package/dist/types/vue-ui-xy.d.ts +42 -146
  195. package/dist/unpackTheme-CNsFKCeq.js +1 -0
  196. package/dist/useAutoSizeLabelsInsideViewbox-AIRF0PlD.js +1 -0
  197. package/dist/useChartAccessibility-DOMuYJfm.js +1 -0
  198. package/dist/useChartExport-DtPNpc9M.js +1 -0
  199. package/dist/useConfig-CKdzPrcf.js +1 -0
  200. package/dist/useFitSvgText-C1QC4P5G.js +1 -0
  201. package/dist/useHints-BH9r_0Vd.js +6 -0
  202. package/dist/useNestedProp-CT9phgWx.js +1 -0
  203. package/dist/useObjectBindings-DM3xDKV3.js +1 -0
  204. package/dist/usePanZoom-BdjP5Suc.js +1 -0
  205. package/dist/usePrefersMotion-XLHwega2.js +1 -0
  206. package/dist/usePrinter-CnyKPIFM.js +1 -0
  207. package/dist/useResponsive-D2CPcpda.js +1 -0
  208. package/dist/useStableElementSize-CegFbRlF.js +1 -0
  209. package/dist/useTableResponsive-uSz_qZOB.js +1 -0
  210. package/dist/useThemeCheck-BKNRbGeC.js +1 -0
  211. package/dist/useTimeLabelCollider-XQf_S7-z.js +1 -0
  212. package/dist/useTimeLabels-Das5O74F.js +1 -0
  213. package/dist/useTooltipPosition-aoV8pZZ9.js +1 -0
  214. package/dist/useTransitions-DfSHzsdz.js +1 -0
  215. package/dist/useUserOptionState-CXlFnwPv.js +1 -0
  216. package/dist/userOptionsSlots-DYuo-E5m.js +1 -0
  217. package/dist/utils.js +1 -30
  218. package/dist/vClickOutside-BxNzkY17.js +1 -0
  219. package/dist/vue-data-ui-BG41UScx.js +1 -0
  220. package/dist/vue-data-ui.js +1 -79
  221. package/dist/vue-ui-3d-bar-DiaiNy-k.js +19 -0
  222. package/dist/vue-ui-accordion-Dy5OVFKr.js +1 -0
  223. package/dist/vue-ui-age-pyramid-OeUr1yxi.js +1 -0
  224. package/dist/vue-ui-annotator-DA_xAFql.js +331 -0
  225. package/dist/vue-ui-bullet-B9lcCTVb.js +34 -0
  226. package/dist/vue-ui-bump-DYajIrva.js +10 -0
  227. package/dist/vue-ui-candlestick-CdAZuNxo.js +22 -0
  228. package/dist/vue-ui-carousel-table-ihGH0LDH.js +1 -0
  229. package/dist/vue-ui-chestnut-B2aNXFNO.js +1 -0
  230. package/dist/vue-ui-chord-fAckHfOW.js +21 -0
  231. package/dist/vue-ui-circle-pack-BWHVImkS.js +13 -0
  232. package/dist/vue-ui-cursor-DdXKXmhr.js +1 -0
  233. package/dist/vue-ui-dag-a0fNoIcJ.js +9 -0
  234. package/dist/vue-ui-dashboard-DkdYMB7n.js +1 -0
  235. package/dist/vue-ui-digits-CL9SuIEI.js +42 -0
  236. package/dist/vue-ui-donut-BaEodt-3.js +22 -0
  237. package/dist/vue-ui-donut-DaYxdQmP.js +47 -0
  238. package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +2 -0
  239. package/dist/vue-ui-dumbbell-B6HJxEZp.js +9 -0
  240. package/dist/vue-ui-flow-BlTCVFr3.js +3 -0
  241. package/dist/vue-ui-funnel-WgLFJadZ.js +1 -0
  242. package/dist/vue-ui-galaxy-B3nuI6E8.js +1 -0
  243. package/dist/vue-ui-gauge-BwTP65O4.js +1 -0
  244. package/dist/vue-ui-geo-CX3yH18H.js +1 -0
  245. package/dist/vue-ui-gizmo-CNHcBsku.js +1 -0
  246. package/dist/vue-ui-heatmap-CTdeoar7.js +1 -0
  247. package/dist/vue-ui-hill-DR5k8GWZ.js +1 -0
  248. package/dist/vue-ui-history-plot-C-9uH-Uj.js +2 -0
  249. package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +4 -0
  250. package/dist/vue-ui-kpi-DVcLXGqG.js +1 -0
  251. package/dist/vue-ui-label-D1Aog-zO.js +7 -0
  252. package/dist/vue-ui-mini-loader-CX0Dx9tT.js +1 -0
  253. package/dist/vue-ui-molecule-B13qVX71.js +1 -0
  254. package/dist/vue-ui-mood-radar-C1BtB8lg.js +1 -0
  255. package/dist/vue-ui-nested-donuts-B90yrlJG.js +19 -0
  256. package/dist/vue-ui-onion-UMVO2DE_.js +5 -0
  257. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +9 -0
  258. package/dist/vue-ui-pattern-DrPCu32G.js +1 -0
  259. package/dist/vue-ui-pattern-seed-B8YjAAEH.js +1 -0
  260. package/dist/vue-ui-quadrant-CPG6yAiu.js +2 -0
  261. package/dist/vue-ui-quick-chart-BTPb-Iz8.js +17 -0
  262. package/dist/vue-ui-radar-Hd-pE9ih.js +1 -0
  263. package/dist/vue-ui-rating-C_YxQYa_.js +1 -0
  264. package/dist/vue-ui-relation-circle-CHYG7ZJl.js +1 -0
  265. package/dist/vue-ui-ridgeline-DS1Gvljt.js +2 -0
  266. package/dist/vue-ui-rings-B-Hb13Uu.js +1 -0
  267. package/dist/vue-ui-scatter-BTgvOmuo.js +9 -0
  268. package/dist/vue-ui-skeleton-B-Acw3CC.js +41 -0
  269. package/dist/vue-ui-smiley-Ciwqt6ek.js +1 -0
  270. package/dist/vue-ui-spark-trend-CYqy6c0S.js +1 -0
  271. package/dist/vue-ui-sparkbar-CTXIgjmP.js +1 -0
  272. package/dist/vue-ui-sparkgauge-CObOL6s2.js +1 -0
  273. package/dist/vue-ui-sparkhistogram-ClFyDez-.js +1 -0
  274. package/dist/vue-ui-sparkline-DP_nYlW8.js +1 -0
  275. package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +1 -0
  276. package/dist/vue-ui-stackbar-nMWHZ-f0.js +29 -0
  277. package/dist/vue-ui-stackline-B95y6Zc5.js +39 -0
  278. package/dist/vue-ui-strip-plot-gFNC4r-X.js +2 -0
  279. package/dist/vue-ui-table-Br2JgD_L.js +14 -0
  280. package/dist/vue-ui-table-heatmap-Btu2ejF4.js +1 -0
  281. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +1 -0
  282. package/dist/vue-ui-thermometer-C6u1eLfo.js +1 -0
  283. package/dist/vue-ui-timer-DLgsfB1U.js +64 -0
  284. package/dist/vue-ui-tiremarks-8B9uE1Bx.js +1 -0
  285. package/dist/vue-ui-treemap-C4Mot-Os.js +1 -0
  286. package/dist/vue-ui-waffle-BwcwNpf7.js +1 -0
  287. package/dist/vue-ui-wheel-B3OGCXg7.js +1 -0
  288. package/dist/vue-ui-word-cloud-BPIyMBXq.js +4 -0
  289. package/dist/vue-ui-world-Cp0DeauH.js +19 -0
  290. package/dist/vue-ui-xy-BOE1jvUS.js +31 -0
  291. package/dist/vue-ui-xy-DSyKSn4L.js +24 -0
  292. package/dist/vue-ui-xy-canvas-CaxxiKSa.js +9 -0
  293. package/dist/vue_ui_3d_bar-DmAve5Ri.js +1 -0
  294. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +1 -0
  295. package/dist/vue_ui_bullet-CwVYkpjd.js +1 -0
  296. package/dist/vue_ui_bump-KJL9GYr4.js +1 -0
  297. package/dist/vue_ui_candlestick-DKvha_Ab.js +1 -0
  298. package/dist/vue_ui_chestnut-BxxivKN7.js +1 -0
  299. package/dist/vue_ui_chord-Fq6VBRT1.js +1 -0
  300. package/dist/vue_ui_circle_pack-CfXkXi7v.js +1 -0
  301. package/dist/vue_ui_dag-1b_dLSym.js +1 -0
  302. package/dist/vue_ui_donut-T5PeOqvf.js +1 -0
  303. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +1 -0
  304. package/dist/vue_ui_dumbbell-BMcxK0N3.js +1 -0
  305. package/dist/vue_ui_flow-kvV56Es9.js +1 -0
  306. package/dist/vue_ui_funnel-CaEV5hG7.js +1 -0
  307. package/dist/vue_ui_galaxy-B94QInxc.js +1 -0
  308. package/dist/vue_ui_gauge-BJhb6yqE.js +1 -0
  309. package/dist/vue_ui_geo-DL1SMQHp.js +1 -0
  310. package/dist/vue_ui_heatmap-kh5NMmwf.js +1 -0
  311. package/dist/vue_ui_hill-DQi4pQCG.js +1 -0
  312. package/dist/vue_ui_history_plot-soyqUW4Y.js +1 -0
  313. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +1 -0
  314. package/dist/vue_ui_label-dtPqyFsj.js +1 -0
  315. package/dist/vue_ui_molecule-Bw1UW1Na.js +1 -0
  316. package/dist/vue_ui_mood_radar-CXaBdJnv.js +1 -0
  317. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +1 -0
  318. package/dist/vue_ui_onion-C9BedU_-.js +1 -0
  319. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +1 -0
  320. package/dist/vue_ui_quadrant-BUv-SqzP.js +1 -0
  321. package/dist/vue_ui_quick_chart-Da1GwklM.js +1 -0
  322. package/dist/vue_ui_radar-68iK9Fam.js +1 -0
  323. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +1 -0
  324. package/dist/vue_ui_ridgeline-Di26JtQu.js +1 -0
  325. package/dist/vue_ui_rings-BcDDXHpQ.js +1 -0
  326. package/dist/vue_ui_scatter-C50uFYQL.js +1 -0
  327. package/dist/vue_ui_spark_trend-BOM3zo64.js +1 -0
  328. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +1 -0
  329. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +1 -0
  330. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +1 -0
  331. package/dist/vue_ui_sparkline-CvL_e9L8.js +1 -0
  332. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +1 -0
  333. package/dist/vue_ui_stackbar-BkBIi_bL.js +1 -0
  334. package/dist/vue_ui_stackline-D7b63K84.js +1 -0
  335. package/dist/vue_ui_strip_plot-CwMowrhT.js +1 -0
  336. package/dist/vue_ui_table_heatmap-vfeY6r97.js +1 -0
  337. package/dist/vue_ui_table_sparkline-Dlfbza49.js +1 -0
  338. package/dist/vue_ui_thermometer-CRijq6H6.js +1 -0
  339. package/dist/vue_ui_tiremarks-8HFfABNF.js +1 -0
  340. package/dist/vue_ui_treemap-Bv4Rdl5_.js +1 -0
  341. package/dist/vue_ui_vertical_bar-BLyflvlz.js +1 -0
  342. package/dist/vue_ui_waffle-BbBLSluB.js +1 -0
  343. package/dist/vue_ui_wheel-C-479bvJ.js +1 -0
  344. package/dist/vue_ui_word_cloud-DBiJtSyL.js +1 -0
  345. package/dist/vue_ui_xy-CJBM9F6W.js +1 -0
  346. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +1 -0
  347. package/package.json +2 -2
  348. package/dist/A11yDataTable-DdRsVULz.js +0 -45
  349. package/dist/Arrow-DKO1l8oR.js +0 -116
  350. package/dist/BaseDraggableDialog-C50TEJFv.js +0 -272
  351. package/dist/BaseIcon-Cx9FD751.js +0 -484
  352. package/dist/BaseLegendToggle-CP3sddwv.js +0 -56
  353. package/dist/BaseScanner-Dzc8VT3j.js +0 -30
  354. package/dist/BaseZoomControls-vNi8YykO.js +0 -111
  355. package/dist/ColorPicker-hmC2bvwS.js +0 -257
  356. package/dist/DataTable-CjF_An2h.js +0 -150
  357. package/dist/DefGrad-DVBqDjhO.js +0 -48
  358. package/dist/HillActions-DqqGB33u.js +0 -187
  359. package/dist/Legend-CulFgjUY.js +0 -156
  360. package/dist/NonSvgPenAndPaper-BK1v_MfW.js +0 -577
  361. package/dist/PackageVersion-D7H9nfK0.js +0 -12
  362. package/dist/PenAndPaper-CNiuGw6k.js +0 -906
  363. package/dist/RecursiveCircles-D6aDPmoe.js +0 -117
  364. package/dist/RecursiveLabels-D9rfID6q.js +0 -56
  365. package/dist/RecursiveLinks-BygcpDiT.js +0 -78
  366. package/dist/Shape-DSwamtmO.js +0 -143
  367. package/dist/SlicerPreview-k5YerMA9.js +0 -1730
  368. package/dist/SparkTooltip-D35KVv6N.js +0 -93
  369. package/dist/Title-BMCuINbv.js +0 -87
  370. package/dist/Tooltip-C4ZTwkLF.js +0 -312
  371. package/dist/UserOptions-CORYQiif.js +0 -1412
  372. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  373. package/dist/dom-to-png-CBusMkua.js +0 -237
  374. package/dist/exposedLib-UNxZlnAS.js +0 -28
  375. package/dist/geoProjections-BYthUA8l.js +0 -302
  376. package/dist/img-Bb5rHcpO.js +0 -129
  377. package/dist/labelUtils-Ccn9kK7T.js +0 -19
  378. package/dist/lib-D4wK6ljP.js +0 -2146
  379. package/dist/package-DmQufM0G.js +0 -4
  380. package/dist/patternUtils-CS7hn6at.js +0 -258
  381. package/dist/pdf-BzIQHx-F.js +0 -90
  382. package/dist/render-common-BtfjXdkJ.js +0 -152
  383. package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
  384. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +0 -122
  385. package/dist/useChartAccessibility-DYqac8yF.js +0 -12
  386. package/dist/useChartExport-iwOqiIWX.js +0 -803
  387. package/dist/useConfig-D_6ZrPMD.js +0 -8090
  388. package/dist/useFitSvgText-CXTzBplU.js +0 -65
  389. package/dist/useHints-Dq_w2E8B.js +0 -66
  390. package/dist/useNestedProp-DR_8JPol.js +0 -12
  391. package/dist/useObjectBindings-DvasYMGu.js +0 -191
  392. package/dist/usePanZoom-CYU3B4T3.js +0 -157
  393. package/dist/usePrefersMotion-BC-CsqR1.js +0 -15
  394. package/dist/usePrinter-DdW2GSm0.js +0 -49
  395. package/dist/useResponsive-ZtArZtUf.js +0 -97
  396. package/dist/useStableElementSize-C7KADDKj.js +0 -77
  397. package/dist/useTableResponsive-BAqJPR68.js +0 -25
  398. package/dist/useThemeCheck-C43Tcqmk.js +0 -24
  399. package/dist/useTimeLabelCollider-AEcY4Ioe.js +0 -57
  400. package/dist/useTimeLabels-d2f-W1L4.js +0 -270
  401. package/dist/useTooltipPosition-BCrtQa9H.js +0 -189
  402. package/dist/useTransitions-g_zBREk2.js +0 -39
  403. package/dist/useUserOptionState-DK-_1ddE.js +0 -15
  404. package/dist/vClickOutside-DUrZWttG.js +0 -13
  405. package/dist/vue-data-ui-Df7WV80w.js +0 -191
  406. package/dist/vue-ui-3d-bar-CJjNPwhG.js +0 -1831
  407. package/dist/vue-ui-accordion-CaoNWreI.js +0 -81
  408. package/dist/vue-ui-age-pyramid-BYcM0uIP.js +0 -1305
  409. package/dist/vue-ui-annotator-BmqjDjRF.js +0 -3325
  410. package/dist/vue-ui-bullet-DBOAvpBB.js +0 -702
  411. package/dist/vue-ui-bump-rPYwDJ4o.js +0 -1242
  412. package/dist/vue-ui-candlestick-WQHIQNv_.js +0 -2144
  413. package/dist/vue-ui-carousel-table-Dojcvt49.js +0 -467
  414. package/dist/vue-ui-chestnut-BdhEByUf.js +0 -2016
  415. package/dist/vue-ui-chord-MF4xF5az.js +0 -1347
  416. package/dist/vue-ui-circle-pack-BwDim7G8.js +0 -1647
  417. package/dist/vue-ui-cursor-w_5cbpSb.js +0 -283
  418. package/dist/vue-ui-dag-D2EUqeDN.js +0 -2931
  419. package/dist/vue-ui-dashboard-BLnVXosj.js +0 -522
  420. package/dist/vue-ui-digits-zSqwYWHm.js +0 -217
  421. package/dist/vue-ui-donut-ZYZfqIhi.js +0 -974
  422. package/dist/vue-ui-donut-evolution-DtLbWi3h.js +0 -1869
  423. package/dist/vue-ui-donut-nLDLZwig.js +0 -2427
  424. package/dist/vue-ui-dumbbell-Qgn3wRyI.js +0 -1533
  425. package/dist/vue-ui-flow-iSH6dyGw.js +0 -1229
  426. package/dist/vue-ui-funnel-Cc2z2zS5.js +0 -749
  427. package/dist/vue-ui-galaxy-GhuBSU0o.js +0 -1097
  428. package/dist/vue-ui-gauge-BAjBO13a.js +0 -934
  429. package/dist/vue-ui-geo-mwTtvIHY.js +0 -1495
  430. package/dist/vue-ui-gizmo-B5vOOrZX.js +0 -238
  431. package/dist/vue-ui-heatmap-fimkY1nN.js +0 -1613
  432. package/dist/vue-ui-hill-DPfTt3UE.js +0 -1747
  433. package/dist/vue-ui-history-plot-B1WgzqTb.js +0 -1710
  434. package/dist/vue-ui-horizontal-bar-Bkp5HQdt.js +0 -1723
  435. package/dist/vue-ui-kpi-D-p0CSQh.js +0 -104
  436. package/dist/vue-ui-label-r3-QloJL.js +0 -1451
  437. package/dist/vue-ui-mini-loader-CnrBGAtM.js +0 -133
  438. package/dist/vue-ui-molecule-BhdAYX_H.js +0 -941
  439. package/dist/vue-ui-mood-radar-CdlnPrQf.js +0 -1111
  440. package/dist/vue-ui-nested-donuts-DceVEyUc.js +0 -1515
  441. package/dist/vue-ui-onion-_L0uEATI.js +0 -1247
  442. package/dist/vue-ui-parallel-coordinate-plot-CbXwIM47.js +0 -1444
  443. package/dist/vue-ui-pattern-DKozfnVn.js +0 -154
  444. package/dist/vue-ui-pattern-seed-BB1honLm.js +0 -61
  445. package/dist/vue-ui-quadrant-CDDFLRcX.js +0 -1979
  446. package/dist/vue-ui-quick-chart-Dom257hl.js +0 -2775
  447. package/dist/vue-ui-radar-BLdri1bA.js +0 -1386
  448. package/dist/vue-ui-rating-C_iTttXB.js +0 -359
  449. package/dist/vue-ui-relation-circle-BmxTSgjd.js +0 -905
  450. package/dist/vue-ui-ridgeline-CsUrcVmL.js +0 -1630
  451. package/dist/vue-ui-rings-D_GPkgbD.js +0 -1264
  452. package/dist/vue-ui-scatter-D_C-IhnW.js +0 -2418
  453. package/dist/vue-ui-skeleton-t7e6KEZ2.js +0 -2567
  454. package/dist/vue-ui-smiley-Dl95YWVo.js +0 -376
  455. package/dist/vue-ui-spark-trend-pkZA7u5V.js +0 -457
  456. package/dist/vue-ui-sparkbar-Ds7OJjhG.js +0 -401
  457. package/dist/vue-ui-sparkgauge-US1M88qc.js +0 -268
  458. package/dist/vue-ui-sparkhistogram-FISVpSvv.js +0 -589
  459. package/dist/vue-ui-sparkline-DvE1dHcs.js +0 -2067
  460. package/dist/vue-ui-sparkstackbar-CWtF9eG-.js +0 -750
  461. package/dist/vue-ui-stackbar-fMgrHzZe.js +0 -3273
  462. package/dist/vue-ui-stackline-CSMuUup2.js +0 -2829
  463. package/dist/vue-ui-strip-plot-TGD2UFHS.js +0 -1752
  464. package/dist/vue-ui-table-BCEIbg8-.js +0 -1352
  465. package/dist/vue-ui-table-heatmap-CvUcFWMf.js +0 -363
  466. package/dist/vue-ui-table-sparkline-CoVQ1qGY.js +0 -738
  467. package/dist/vue-ui-thermometer-BYFAZCzh.js +0 -758
  468. package/dist/vue-ui-timer-BKr8RVnn.js +0 -451
  469. package/dist/vue-ui-tiremarks-BYu3cEoy.js +0 -540
  470. package/dist/vue-ui-treemap-BR3rX5_L.js +0 -1745
  471. package/dist/vue-ui-waffle-mP8g5aQk.js +0 -1633
  472. package/dist/vue-ui-wheel-CZsSO2R6.js +0 -873
  473. package/dist/vue-ui-word-cloud-CJ30onqy.js +0 -1723
  474. package/dist/vue-ui-world-BZ09DOiF.js +0 -3021
  475. package/dist/vue-ui-xy-C3h54loZ.js +0 -1387
  476. package/dist/vue-ui-xy-canvas-BwgK8drp.js +0 -2151
  477. package/dist/vue-ui-xy-jemv5dsf.js +0 -5777
  478. package/dist/vue_ui_3d_bar-C4R7o-yX.js +0 -185
  479. package/dist/vue_ui_age_pyramid-B2R66DgQ.js +0 -310
  480. package/dist/vue_ui_bullet-ClzdLoOv.js +0 -186
  481. package/dist/vue_ui_bump-Vl-zYAtG.js +0 -201
  482. package/dist/vue_ui_candlestick-BXSQY82k.js +0 -461
  483. package/dist/vue_ui_chestnut-D2oUhad6.js +0 -305
  484. package/dist/vue_ui_chord-DPfS1Umc.js +0 -275
  485. package/dist/vue_ui_circle_pack-DZC_rdfn.js +0 -172
  486. package/dist/vue_ui_dag-TsJ_azQq.js +0 -258
  487. package/dist/vue_ui_donut-BDGqG07h.js +0 -358
  488. package/dist/vue_ui_donut_evolution-C6951a2f.js +0 -745
  489. package/dist/vue_ui_dumbbell-Bfe_jFyi.js +0 -304
  490. package/dist/vue_ui_flow-BewZjjKG.js +0 -238
  491. package/dist/vue_ui_funnel-_Og4EEkO.js +0 -234
  492. package/dist/vue_ui_galaxy-Ig0cc1_h.js +0 -265
  493. package/dist/vue_ui_gauge-Cf1RZc9q.js +0 -178
  494. package/dist/vue_ui_geo-B8TODs-G.js +0 -248
  495. package/dist/vue_ui_heatmap-B2BBBSWG.js +0 -319
  496. package/dist/vue_ui_hill-dnltu0L-.js +0 -368
  497. package/dist/vue_ui_history_plot-CuN63VEc.js +0 -413
  498. package/dist/vue_ui_horizontal_bar-C4J4QzXf.js +0 -341
  499. package/dist/vue_ui_label-B0QoxQrJ.js +0 -115
  500. package/dist/vue_ui_molecule-CO9L59SF.js +0 -231
  501. package/dist/vue_ui_mood_radar-BA6LAKhk.js +0 -281
  502. package/dist/vue_ui_nested_donuts-B8csIoVO.js +0 -273
  503. package/dist/vue_ui_onion-1FTFFS46.js +0 -293
  504. package/dist/vue_ui_parallel_coordinate_plot-CBiOBira.js +0 -278
  505. package/dist/vue_ui_quadrant-CDSTKTJz.js +0 -428
  506. package/dist/vue_ui_quick_chart-DByCqSYE.js +0 -180
  507. package/dist/vue_ui_radar-jafTED5j.js +0 -306
  508. package/dist/vue_ui_relation_circle-D0p4mXmv.js +0 -98
  509. package/dist/vue_ui_ridgeline-VM8_mx4J.js +0 -767
  510. package/dist/vue_ui_rings-BVgD2aMn.js +0 -320
  511. package/dist/vue_ui_scatter-I0POnicu.js +0 -479
  512. package/dist/vue_ui_spark_trend-DxVmpkmC.js +0 -82
  513. package/dist/vue_ui_sparkbar-z6qO--Kf.js +0 -64
  514. package/dist/vue_ui_sparkgauge-BX1MS3bA.js +0 -90
  515. package/dist/vue_ui_sparkhistogram-BRgvKUH6.js +0 -123
  516. package/dist/vue_ui_sparkline-b9pEUyGF.js +0 -183
  517. package/dist/vue_ui_sparkstackbar-BOjuQnZd.js +0 -175
  518. package/dist/vue_ui_stackbar-yQyvT4Su.js +0 -537
  519. package/dist/vue_ui_stackline-Bh0RuInt.js +0 -539
  520. package/dist/vue_ui_strip_plot-BaHbnnwN.js +0 -308
  521. package/dist/vue_ui_table_heatmap-w8vx5k6f.js +0 -80
  522. package/dist/vue_ui_table_sparkline-DAbkUrNz.js +0 -124
  523. package/dist/vue_ui_thermometer-DxgqWKlE.js +0 -123
  524. package/dist/vue_ui_tiremarks-CdEPieWV.js +0 -122
  525. package/dist/vue_ui_treemap-DoEtkRN6.js +0 -328
  526. package/dist/vue_ui_vertical_bar-CP-MKz1j.js +0 -247
  527. package/dist/vue_ui_waffle-DE_DiSVP.js +0 -299
  528. package/dist/vue_ui_wheel-DZ_nR--t.js +0 -133
  529. package/dist/vue_ui_word_cloud-C-qIMNLu.js +0 -254
  530. package/dist/vue_ui_xy-CcJADijP.js +0 -614
  531. 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, Ft as n, X as r, t as i } from "./lib-D4wK6ljP.js";
3
- import { t as a } from "./BaseIcon-Cx9FD751.js";
4
- import { t as o } from "./ColorPicker-hmC2bvwS.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 };