@leavepulse/ui 0.43.3 → 0.44.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 (340) hide show
  1. package/README.md +75 -7
  2. package/dist/assets/{LpCommandPalette-DH7sPcKP.css → LpCommandPalette-DCP5g2ik.css} +21 -21
  3. package/dist/assets/{LpDropzone-BBoWvi-J.css → LpDropzone-i4BdMi1H.css} +12 -12
  4. package/dist/assets/{LpImageEditor-Ct7Y3aNu.css → LpImageEditor-CbMA82g8.css} +6 -6
  5. package/dist/assets/{LpShortcutsDialog-C6YoQ8_M.css → LpShortcutsDialog-ChUyU7oV.css} +7 -7
  6. package/dist/assets/{LpSkeleton-D7xU8IPV.css → LpSkeleton-H3Z5dEIk.css} +4 -1
  7. package/dist/assets/{LpTable-BgPLJOXa.css → LpTable-DDQNdf86.css} +9 -9
  8. package/dist/chunks/ContextMenuItems-CrfeNPWT.js +123 -0
  9. package/dist/chunks/{LayoutCanvas-Dd20boUG.js → LayoutCanvas-D-jPOAvg.js} +26 -9
  10. package/dist/chunks/{LayoutNode-DGpZA9LX.js → LayoutNode-D8Xy9N-o.js} +20 -8
  11. package/dist/chunks/{LpActionBar-BlvtGB2P.js → LpActionBar-BbwCF6l5.js} +24 -10
  12. package/dist/chunks/{LpAddressInput-B-Zvxsn7.js → LpAddressInput-BrOqkZqg.js} +53 -48
  13. package/dist/chunks/{LpAlert-BAYHDSS1.js → LpAlert-DkOIjsbq.js} +15 -8
  14. package/dist/chunks/{LpAppShell-BGQVIY-3.js → LpAppShell-BUKPcHco.js} +51 -24
  15. package/dist/chunks/{LpAutocomplete-DExlIZe_.js → LpAutocomplete-DxV3Y9h4.js} +50 -23
  16. package/dist/chunks/{LpAvatar-B3-xAOH3.js → LpAvatar-ClBbEYZN.js} +17 -8
  17. package/dist/chunks/LpBreadcrumbs-B8IJgFIc.js +95 -0
  18. package/dist/chunks/{LpButton-5VXXCjwF.js → LpButton-kqJBHIIb.js} +44 -14
  19. package/dist/chunks/{LpCard-BhI1N_vL.js → LpCard-CpRByR0q.js} +1 -1
  20. package/dist/chunks/{LpCheckbox-CVccKYaH.js → LpCheckbox-DpqchzH4.js} +7 -3
  21. package/dist/chunks/{LpCodeBlock-Bo0B4TFR.js → LpCodeBlock-DeHJPq7p.js} +48 -16
  22. package/dist/chunks/{LpColorPicker-BlXea7LM.js → LpColorPicker-Bhf1qxhB.js} +32 -9
  23. package/dist/chunks/{LpConfirmDialog-Q-bxff8z.js → LpConfirmDialog-CIUOSnWo.js} +58 -16
  24. package/dist/chunks/LpConfirmHost-CDm0Wtpv.js +49 -0
  25. package/dist/chunks/LpContextMenu-DQw5dGfG.js +68 -0
  26. package/dist/chunks/LpDatePicker-Drirx1AK.js +191 -0
  27. package/dist/chunks/{LpDrawer-BZ6k3hvo.js → LpDrawer-bScx-KMO.js} +63 -26
  28. package/dist/chunks/{LpFileTree-_5vFBgaK.js → LpFileTree-CSI_5SK2.js} +23 -8
  29. package/dist/chunks/{LpFileTreeNode-BdcIYKIE.js → LpFileTreeNode-B4MiSQX2.js} +2 -2
  30. package/dist/chunks/LpFormField-CIk5qosh.js +87 -0
  31. package/dist/chunks/{LpInput-9EXWUM9B.js → LpInput-C0e8y8_d.js} +26 -11
  32. package/dist/chunks/{LpLightbox-2sYVMY-S.js → LpLightbox-Mr0W_6HK.js} +147 -60
  33. package/dist/chunks/{LpLink-DCND-zyu.js → LpLink-Krkjhe_y.js} +15 -6
  34. package/dist/chunks/{LpLogViewer-CaRy5MeS.js → LpLogViewer-YBOaFnc_.js} +68 -34
  35. package/dist/chunks/{LpMapPicker-ul4oYno6.js → LpMapPicker-NUzS9e37.js} +38 -13
  36. package/dist/chunks/{LpMediaGallery-FF-NquIo.js → LpMediaGallery-DfJmMW0I.js} +6 -3
  37. package/dist/chunks/{LpModal-Bt0pQCI_.js → LpModal-DPwGKBPv.js} +49 -26
  38. package/dist/chunks/{LpModalNav-YaifHrXC.js → LpModalNav-DPg5H9f3.js} +9 -6
  39. package/dist/chunks/{LpNotificationBell-DyGGsMAM.js → LpNotificationBell-t5yn-siX.js} +58 -24
  40. package/dist/chunks/{LpNumberField-CWuX08iX.js → LpNumberField-DWnQKktS.js} +20 -7
  41. package/dist/chunks/{LpNumberFlow-amWYaeuA.js → LpNumberFlow-z4WPZcZu.js} +22 -12
  42. package/dist/chunks/{LpOtpInput-y2v-pmiN.js → LpOtpInput-CziPF3Oq.js} +37 -8
  43. package/dist/chunks/{LpPagination-5FxjmmB5.js → LpPagination-DFngX7Xo.js} +30 -19
  44. package/dist/chunks/{LpPasswordInput--sjYCkLS.js → LpPasswordInput-CWVDuBJ5.js} +10 -7
  45. package/dist/chunks/{LpPhoneInput-BDSKVl_z.js → LpPhoneInput-CD-ZTeSd.js} +57 -33
  46. package/dist/chunks/{LpPie-D6OnzwlJ.js → LpPie-BLco31Nx.js} +78 -21
  47. package/dist/chunks/{LpPopover-8268UmlC.js → LpPopover-p_e_shN3.js} +4 -2
  48. package/dist/chunks/{LpProgress-Btq5W4Ut.js → LpProgress-CBU1iI69.js} +5 -4
  49. package/dist/chunks/{LpRadioGroup-xPIuVDO_.js → LpRadioGroup-DmEW0l78.js} +9 -2
  50. package/dist/chunks/{LpSegmented-fV0Sk92p.js → LpSegmented-Dejd7cIx.js} +7 -3
  51. package/dist/chunks/{LpSelect-ANIVtrpM.js → LpSelect-DrRD9I7L.js} +40 -18
  52. package/dist/chunks/{LpSidebar-ClBUwoEz.js → LpSidebar-BgwUNWpJ.js} +30 -22
  53. package/dist/chunks/{LpSidebarNav-llOcs_Fn.js → LpSidebarNav-Bqxz8aWT.js} +14 -9
  54. package/dist/chunks/{LpSkeleton-CTI-vBgW.js → LpSkeleton-BB6XIV-w.js} +1 -1
  55. package/dist/chunks/{LpSlider-BwNIBkAK.js → LpSlider-Cuzmrd7p.js} +7 -2
  56. package/dist/chunks/{LpSparkline-C6xQ2dwv.js → LpSparkline-CB80N8SJ.js} +11 -4
  57. package/dist/chunks/{LpStat-CQaW8R--.js → LpStat-dXtyrdX9.js} +1 -1
  58. package/dist/chunks/{LpSwitch-Blizvqyt.js → LpSwitch-B1aLKulj.js} +40 -26
  59. package/dist/chunks/{LpTableOfContents-CjvxPMpU.js → LpTableOfContents-BUcAfGPQ.js} +36 -41
  60. package/dist/chunks/{LpTabs-Cefe_lys.js → LpTabs-_qMVaZJ6.js} +19 -5
  61. package/dist/chunks/LpTextarea-yP8hGedR.js +77 -0
  62. package/dist/chunks/LpThemeProvider-Wjm7Tuit.js +35 -0
  63. package/dist/chunks/LpThemeSwitcher-CKLc10KZ.js +169 -0
  64. package/dist/chunks/{LpTilt-DuyKbpkA.js → LpTilt-B7KHX1zH.js} +2 -2
  65. package/dist/chunks/{LpTimeField-K6nAGboX.js → LpTimeField-C5HRgS5H.js} +13 -7
  66. package/dist/chunks/{LpToaster-gDB1EaU3.js → LpToaster--oT6lfhL.js} +57 -28
  67. package/dist/chunks/{LpTooltip-hCLPAqMG.js → LpTooltip-CBdzeKNf.js} +13 -6
  68. package/dist/chunks/LpTooltipProvider-CftjV7Xc.js +25 -0
  69. package/dist/chunks/{LpTopologyCanvas-Cm1L39uL.js → LpTopologyCanvas-DocsLal3.js} +6 -1
  70. package/dist/chunks/{LpUptimeBar-DvAMno0S.js → LpUptimeBar-DLtxOMRy.js} +43 -14
  71. package/dist/chunks/{LpThemeSwitcher-Cue-myST.js → useTheme-C8JHUlPM.js} +173 -215
  72. package/dist/component-names.d.ts +1 -1
  73. package/dist/components/ContextMenuItems.vue.d.ts +8 -0
  74. package/dist/components/ContextMenuItems.vue.js +4 -0
  75. package/dist/components/LayoutCanvas.vue.js +1 -1
  76. package/dist/components/LayoutNode.vue.d.ts +4 -0
  77. package/dist/components/LayoutNode.vue.js +1 -1
  78. package/dist/components/LpActionBar.vue.d.ts +3 -0
  79. package/dist/components/LpActionBar.vue.js +1 -1
  80. package/dist/components/LpAddressInput.vue.d.ts +1 -1
  81. package/dist/components/LpAddressInput.vue.js +1 -1
  82. package/dist/components/LpAlert.vue.d.ts +9 -0
  83. package/dist/components/LpAlert.vue.js +1 -1
  84. package/dist/components/LpAppShell.vue.d.ts +10 -0
  85. package/dist/components/LpAppShell.vue.js +1 -1
  86. package/dist/components/LpAutocomplete.vue.d.ts +31 -6
  87. package/dist/components/LpAutocomplete.vue.js +1 -1
  88. package/dist/components/LpAvatar.vue.d.ts +3 -3
  89. package/dist/components/LpAvatar.vue.js +1 -1
  90. package/dist/components/LpBadge.vue.d.ts +2 -2
  91. package/dist/components/LpBreadcrumbs.vue.d.ts +13 -9
  92. package/dist/components/LpBreadcrumbs.vue.js +1 -1
  93. package/dist/components/LpButton.vue.d.ts +35 -98
  94. package/dist/components/LpButton.vue.js +1 -1
  95. package/dist/components/LpCard.vue.js +1 -1
  96. package/dist/components/LpChart.vue.d.ts +31 -2
  97. package/dist/components/LpChart.vue.js +317 -95
  98. package/dist/components/LpCheckbox.vue.js +1 -1
  99. package/dist/components/LpCodeBlock.vue.d.ts +2 -0
  100. package/dist/components/LpCodeBlock.vue.js +1 -1
  101. package/dist/components/LpColorPicker.vue.js +1 -1
  102. package/dist/components/LpCommandPalette.vue.d.ts +8 -10
  103. package/dist/components/LpCommandPalette.vue.js +88 -78
  104. package/dist/components/LpConfirmDialog.vue.d.ts +15 -3
  105. package/dist/components/LpConfirmDialog.vue.js +1 -1
  106. package/dist/components/LpConfirmHost.vue.d.ts +9 -0
  107. package/dist/components/LpConfirmHost.vue.js +4 -0
  108. package/dist/components/LpContextMenu.vue.d.ts +3 -5
  109. package/dist/components/LpContextMenu.vue.js +1 -1
  110. package/dist/components/LpDatePicker.vue.d.ts +24 -6
  111. package/dist/components/LpDatePicker.vue.js +1 -1
  112. package/dist/components/LpDrawer.vue.d.ts +10 -0
  113. package/dist/components/LpDrawer.vue.js +1 -1
  114. package/dist/components/LpDropzone.vue.js +22 -6
  115. package/dist/components/LpFileTree.vue.d.ts +11 -2
  116. package/dist/components/LpFileTree.vue.js +1 -1
  117. package/dist/components/LpFileTreeNode.vue.js +1 -1
  118. package/dist/components/LpFormField.vue.d.ts +9 -0
  119. package/dist/components/LpFormField.vue.js +1 -1
  120. package/dist/components/LpImageEditor.vue.js +92 -57
  121. package/dist/components/LpInput.vue.d.ts +3 -3
  122. package/dist/components/LpInput.vue.js +1 -1
  123. package/dist/components/LpLightbox.vue.d.ts +17 -0
  124. package/dist/components/LpLightbox.vue.js +1 -1
  125. package/dist/components/LpLink.vue.d.ts +11 -11
  126. package/dist/components/LpLink.vue.js +1 -1
  127. package/dist/components/LpLogViewer.vue.d.ts +20 -2
  128. package/dist/components/LpLogViewer.vue.js +1 -1
  129. package/dist/components/LpMapPicker.vue.d.ts +4 -4
  130. package/dist/components/LpMapPicker.vue.js +1 -1
  131. package/dist/components/LpMediaGallery.vue.js +1 -1
  132. package/dist/components/LpModal.vue.d.ts +16 -6
  133. package/dist/components/LpModal.vue.js +1 -1
  134. package/dist/components/LpModalNav.vue.d.ts +0 -1
  135. package/dist/components/LpModalNav.vue.js +1 -1
  136. package/dist/components/LpNotificationBell.vue.d.ts +11 -2
  137. package/dist/components/LpNotificationBell.vue.js +1 -1
  138. package/dist/components/LpNumberField.vue.d.ts +2 -0
  139. package/dist/components/LpNumberField.vue.js +1 -1
  140. package/dist/components/LpNumberFlow.vue.js +1 -1
  141. package/dist/components/LpOtpInput.vue.js +1 -1
  142. package/dist/components/LpPagination.vue.d.ts +2 -0
  143. package/dist/components/LpPagination.vue.js +1 -1
  144. package/dist/components/LpPasswordInput.vue.js +1 -1
  145. package/dist/components/LpPhoneInput.vue.js +1 -1
  146. package/dist/components/LpPie.vue.d.ts +21 -2
  147. package/dist/components/LpPie.vue.js +1 -1
  148. package/dist/components/LpPopover.vue.d.ts +2 -0
  149. package/dist/components/LpPopover.vue.js +1 -1
  150. package/dist/components/LpProgress.vue.js +1 -1
  151. package/dist/components/LpRadioGroup.vue.js +1 -1
  152. package/dist/components/LpSection.vue.d.ts +1 -1
  153. package/dist/components/LpSegmented.vue.d.ts +5 -0
  154. package/dist/components/LpSegmented.vue.js +1 -1
  155. package/dist/components/LpSelect.vue.d.ts +1 -0
  156. package/dist/components/LpSelect.vue.js +1 -1
  157. package/dist/components/LpShortcutsDialog.vue.d.ts +1 -1
  158. package/dist/components/LpShortcutsDialog.vue.js +11 -8
  159. package/dist/components/LpSidebar.vue.d.ts +6 -2
  160. package/dist/components/LpSidebar.vue.js +1 -1
  161. package/dist/components/LpSidebarNav.vue.js +1 -1
  162. package/dist/components/LpSkeleton.vue.js +1 -1
  163. package/dist/components/LpSlider.vue.js +1 -1
  164. package/dist/components/LpSparkline.vue.d.ts +1 -0
  165. package/dist/components/LpSparkline.vue.js +1 -1
  166. package/dist/components/LpStat.vue.js +1 -1
  167. package/dist/components/LpSwitch.vue.js +1 -1
  168. package/dist/components/LpTable.vue.d.ts +23 -1
  169. package/dist/components/LpTable.vue.js +74 -36
  170. package/dist/components/LpTableOfContents.vue.d.ts +4 -2
  171. package/dist/components/LpTableOfContents.vue.js +1 -1
  172. package/dist/components/LpTabs.vue.d.ts +2 -0
  173. package/dist/components/LpTabs.vue.js +1 -1
  174. package/dist/components/LpTextarea.vue.d.ts +19 -6
  175. package/dist/components/LpTextarea.vue.js +1 -1
  176. package/dist/components/LpThemeProvider.vue.d.ts +22 -0
  177. package/dist/components/LpThemeProvider.vue.js +4 -0
  178. package/dist/components/LpThemeSwitcher.vue.d.ts +13 -0
  179. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  180. package/dist/components/LpTilt.vue.js +1 -1
  181. package/dist/components/LpTimeField.vue.js +1 -1
  182. package/dist/components/LpToaster.vue.d.ts +6 -1
  183. package/dist/components/LpToaster.vue.js +1 -1
  184. package/dist/components/LpTooltip.vue.d.ts +1 -2
  185. package/dist/components/LpTooltip.vue.js +1 -1
  186. package/dist/components/LpTooltipProvider.vue.d.ts +22 -0
  187. package/dist/components/LpTooltipProvider.vue.js +4 -0
  188. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  189. package/dist/components/LpUptimeBar.vue.d.ts +4 -0
  190. package/dist/components/LpUptimeBar.vue.js +1 -1
  191. package/dist/components/chart.d.ts +32 -1
  192. package/dist/components/chart.js +39 -4
  193. package/dist/components/codeHighlight.d.ts +6 -0
  194. package/dist/components/codeHighlight.js +92 -20
  195. package/dist/components/color.d.ts +1 -1
  196. package/dist/components/color.js +20 -9
  197. package/dist/components/commandSearch.d.ts +0 -1
  198. package/dist/components/commandSearch.js +1 -17
  199. package/dist/components/confirm.d.ts +25 -0
  200. package/dist/components/confirm.js +26 -0
  201. package/dist/components/countries.d.ts +6 -0
  202. package/dist/components/countries.js +7 -0
  203. package/dist/components/fileTree.js +16 -7
  204. package/dist/components/imageCrop.d.ts +42 -0
  205. package/dist/components/imageCrop.js +47 -0
  206. package/dist/components/link.d.ts +12 -0
  207. package/dist/components/link.js +19 -0
  208. package/dist/components/modalDepth.d.ts +18 -2
  209. package/dist/components/modalDepth.js +17 -5
  210. package/dist/components/otp.d.ts +5 -0
  211. package/dist/components/otp.js +10 -0
  212. package/dist/components/sidebar.d.ts +7 -1
  213. package/dist/components/tableSort.d.ts +8 -0
  214. package/dist/components/tableSort.js +31 -0
  215. package/dist/composables/useField.d.ts +34 -0
  216. package/dist/composables/useField.js +45 -0
  217. package/dist/composables/useFormDraft.d.ts +10 -3
  218. package/dist/composables/useFormDraft.js +9 -14
  219. package/dist/composables/useHotkeys.d.ts +17 -1
  220. package/dist/composables/useHotkeys.js +55 -18
  221. package/dist/composables/useInputFilter.d.ts +17 -0
  222. package/dist/composables/useInputFilter.js +47 -10
  223. package/dist/composables/useLpConfig.d.ts +24 -0
  224. package/dist/composables/useLpConfig.js +44 -0
  225. package/dist/composables/useRovingFocus.js +7 -0
  226. package/dist/composables/useTilt.d.ts +2 -2
  227. package/dist/composables/useTilt.js +5 -6
  228. package/dist/composables/useToast.d.ts +20 -0
  229. package/dist/composables/useToast.js +28 -4
  230. package/dist/composables/useZoomPan.d.ts +3 -3
  231. package/dist/composables/useZoomPan.js +4 -4
  232. package/dist/index.d.ts +33 -3
  233. package/dist/index.js +185 -139
  234. package/dist/layout/tree.d.ts +2 -0
  235. package/dist/layout/tree.js +16 -1
  236. package/dist/layout/useLayout.d.ts +15 -0
  237. package/dist/layout/useLayout.js +41 -14
  238. package/dist/theme/useTheme.d.ts +32 -9
  239. package/package.json +8 -7
  240. package/src/component-names.ts +5 -7
  241. package/src/components/ContextMenuItems.vue +88 -0
  242. package/src/components/LayoutCanvas.vue +26 -6
  243. package/src/components/LayoutNode.vue +19 -2
  244. package/src/components/LpActionBar.vue +30 -7
  245. package/src/components/LpAddressInput.vue +57 -41
  246. package/src/components/LpAlert.vue +16 -3
  247. package/src/components/LpAppShell.vue +45 -12
  248. package/src/components/LpAutocomplete.vue +46 -10
  249. package/src/components/LpAvatar.vue +19 -5
  250. package/src/components/LpBreadcrumbs.vue +65 -41
  251. package/src/components/LpButton.vue +59 -13
  252. package/src/components/LpChart.vue +272 -28
  253. package/src/components/LpCheckbox.vue +7 -3
  254. package/src/components/LpCodeBlock.vue +50 -14
  255. package/src/components/LpColorPicker.vue +39 -9
  256. package/src/components/LpCommandPalette.vue +36 -25
  257. package/src/components/LpConfirmDialog.vue +68 -17
  258. package/src/components/LpConfirmHost.vue +59 -0
  259. package/src/components/LpContextMenu.vue +14 -115
  260. package/src/components/LpDatePicker.vue +99 -68
  261. package/src/components/LpDrawer.vue +56 -19
  262. package/src/components/LpDropzone.vue +21 -4
  263. package/src/components/LpFileTree.vue +33 -7
  264. package/src/components/LpFormField.vue +30 -7
  265. package/src/components/LpImageEditor.vue +96 -57
  266. package/src/components/LpInput.vue +18 -7
  267. package/src/components/LpLightbox.vue +140 -29
  268. package/src/components/LpLink.vue +24 -13
  269. package/src/components/LpLogViewer.vue +86 -17
  270. package/src/components/LpMapPicker.vue +36 -13
  271. package/src/components/LpMediaGallery.vue +8 -2
  272. package/src/components/LpModal.vue +53 -27
  273. package/src/components/LpModalNav.vue +5 -2
  274. package/src/components/LpNotificationBell.vue +63 -17
  275. package/src/components/LpNumberField.vue +21 -6
  276. package/src/components/LpNumberFlow.vue +26 -10
  277. package/src/components/LpOtpInput.vue +43 -8
  278. package/src/components/LpPagination.vue +23 -7
  279. package/src/components/LpPasswordInput.vue +4 -1
  280. package/src/components/LpPhoneInput.vue +53 -27
  281. package/src/components/LpPie.vue +94 -15
  282. package/src/components/LpPopover.vue +3 -0
  283. package/src/components/LpProgress.vue +5 -3
  284. package/src/components/LpRadioGroup.vue +9 -2
  285. package/src/components/LpSegmented.vue +12 -2
  286. package/src/components/LpSelect.vue +0 -0
  287. package/src/components/LpShortcutsDialog.vue +8 -3
  288. package/src/components/LpSidebar.vue +14 -9
  289. package/src/components/LpSidebarNav.vue +17 -5
  290. package/src/components/LpSkeleton.vue +4 -1
  291. package/src/components/LpSlider.vue +7 -1
  292. package/src/components/LpSparkline.vue +11 -3
  293. package/src/components/LpSwitch.vue +30 -7
  294. package/src/components/LpTable.vue +91 -32
  295. package/src/components/LpTableOfContents.vue +50 -32
  296. package/src/components/LpTabs.vue +23 -6
  297. package/src/components/LpTextarea.vue +44 -6
  298. package/src/components/LpThemeProvider.vue +41 -0
  299. package/src/components/LpThemeSwitcher.vue +64 -17
  300. package/src/components/LpTilt.vue +2 -2
  301. package/src/components/LpTimeField.vue +14 -3
  302. package/src/components/LpToaster.vue +66 -26
  303. package/src/components/LpTooltip.vue +22 -5
  304. package/src/components/LpTooltipProvider.vue +24 -0
  305. package/src/components/LpTopologyCanvas.vue +12 -1
  306. package/src/components/LpUptimeBar.vue +46 -8
  307. package/src/components/chart.ts +77 -5
  308. package/src/components/codeHighlight.ts +111 -15
  309. package/src/components/color.ts +30 -9
  310. package/src/components/commandSearch.ts +0 -17
  311. package/src/components/confirm.ts +58 -0
  312. package/src/components/countries.ts +12 -0
  313. package/src/components/fileTree.ts +19 -7
  314. package/src/components/imageCrop.ts +107 -0
  315. package/src/components/link.ts +34 -0
  316. package/src/components/modalDepth.ts +48 -6
  317. package/src/components/otp.ts +16 -0
  318. package/src/components/sidebar.ts +7 -1
  319. package/src/components/tableSort.ts +37 -0
  320. package/src/composables/useField.ts +79 -0
  321. package/src/composables/useFormDraft.ts +25 -20
  322. package/src/composables/useHotkeys.ts +89 -18
  323. package/src/composables/useInputFilter.ts +77 -14
  324. package/src/composables/useLpConfig.ts +87 -0
  325. package/src/composables/useRovingFocus.ts +11 -0
  326. package/src/composables/useTilt.ts +5 -6
  327. package/src/composables/useToast.ts +56 -4
  328. package/src/composables/useZoomPan.ts +6 -6
  329. package/src/index.ts +38 -3
  330. package/src/layout/tree.ts +30 -0
  331. package/src/layout/useLayout.ts +68 -18
  332. package/src/nuxt.ts +59 -17
  333. package/src/runtime/config.plugin.ts +14 -0
  334. package/src/runtime/theme.plugin.ts +42 -22
  335. package/src/theme/useTheme.ts +206 -100
  336. package/dist/chunks/LpBreadcrumbs-p4jHe_V-.js +0 -62
  337. package/dist/chunks/LpContextMenu-CwW1QXe_.js +0 -217
  338. package/dist/chunks/LpDatePicker-CwOToxGq.js +0 -164
  339. package/dist/chunks/LpFormField-CazBc2-a.js +0 -62
  340. package/dist/chunks/LpTextarea-t7F6gv8E.js +0 -47
@@ -1,10 +1,11 @@
1
1
  import { defineComponent, ref, computed, onMounted, onBeforeUnmount, watch, shallowRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeClass, normalizeStyle, createVNode, withCtx, withDirectives, vShow, createBlock, createTextVNode } from "vue";
2
2
  import { Motion } from "motion-v";
3
+ import { useLabels } from "../composables/useLpConfig.js";
3
4
  import { prefersReducedMotion, easeTravel } from "../composables/easing.js";
4
5
  import { usePillTransition } from "../composables/usePillTransition.js";
5
6
  import { useReveal } from "../composables/useReveal.js";
6
- import { normalise, pointCount, resolveLabels, extent, axisTicks, niceScale, plotHeight, plotWidth, xAt, yAt, areaPath, linePath, barPath, nearestIndex, formatTick } from "./chart.js";
7
- import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-CwW1QXe_.js";
7
+ import { normalise, pointCount, resolveLabels, extent, axisTicks, plotHeight, plotWidth, xAt, yAt, areaPath, linePath, barPath, markerIndex, chartSummary, niceScale, nearestIndex, formatTick } from "./chart.js";
8
+ import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-DQw5dGfG.js";
8
9
  import { _ as _sfc_main$2 } from "../chunks/LpIcon-CCnX5_2j.js";
9
10
  import { _ as _sfc_main$3 } from "../chunks/LpShift-DXNsauQZ.js";
10
11
  import { useMergedAttrs } from "../composables/useMergedClass.js";
@@ -26,44 +27,56 @@ const _hoisted_5 = {
26
27
  key: 1,
27
28
  class: "flex flex-wrap items-center gap-x-4 gap-y-1.5"
28
29
  };
29
- const _hoisted_6 = ["onClick"];
30
+ const _hoisted_6 = ["aria-pressed", "onClick"];
30
31
  const _hoisted_7 = { class: "text-muted-strong group-hover:text-ink" };
31
- const _hoisted_8 = {
32
- key: 0,
33
- class: "text-[10px] text-muted",
34
- title: "Measured on the right axis"
35
- };
36
- const _hoisted_9 = {
32
+ const _hoisted_8 = ["title"];
33
+ const _hoisted_9 = ["tabindex", "role", "aria-label"];
34
+ const _hoisted_10 = {
37
35
  key: 0,
38
36
  class: "flex size-full flex-col items-center justify-center gap-2 rounded-control border border-dashed border-line text-muted"
39
37
  };
40
- const _hoisted_10 = { class: "text-xs" };
41
- const _hoisted_11 = ["width", "height"];
42
- const _hoisted_12 = ["id"];
43
- const _hoisted_13 = ["stop-color"];
38
+ const _hoisted_11 = { class: "text-xs" };
39
+ const _hoisted_12 = ["width", "height"];
40
+ const _hoisted_13 = ["id"];
44
41
  const _hoisted_14 = ["stop-color"];
45
- const _hoisted_15 = ["id"];
46
- const _hoisted_16 = ["x", "height", "width"];
47
- const _hoisted_17 = ["to"];
48
- const _hoisted_18 = { key: 0 };
49
- const _hoisted_19 = ["x1", "x2", "y1", "y2"];
50
- const _hoisted_20 = ["x", "y"];
42
+ const _hoisted_15 = ["stop-color"];
43
+ const _hoisted_16 = ["id"];
44
+ const _hoisted_17 = ["x", "height", "width"];
45
+ const _hoisted_18 = ["to"];
46
+ const _hoisted_19 = { key: 0 };
47
+ const _hoisted_20 = ["x1", "x2", "y1", "y2"];
51
48
  const _hoisted_21 = ["x", "y"];
52
- const _hoisted_22 = ["x1", "x2", "y1", "y2"];
53
- const _hoisted_23 = ["x", "y", "width", "height"];
54
- const _hoisted_24 = ["clip-path"];
55
- const _hoisted_25 = ["d", "fill", "opacity"];
56
- const _hoisted_26 = ["d", "fill"];
57
- const _hoisted_27 = ["d", "stroke", "stroke-dasharray"];
58
- const _hoisted_28 = ["cx", "cy", "fill"];
59
- const _hoisted_29 = { key: 3 };
60
- const _hoisted_30 = ["x1", "x2", "y1", "y2"];
61
- const _hoisted_31 = ["cx", "cy", "fill"];
62
- const _hoisted_32 = ["x", "y"];
63
- const _hoisted_33 = { class: "mb-1 text-[11px] font-medium text-muted-strong" };
64
- const _hoisted_34 = { class: "flex flex-col gap-1" };
65
- const _hoisted_35 = { class: "flex items-center gap-1.5 text-muted" };
66
- const _hoisted_36 = { class: "font-mono tabular-nums text-ink" };
49
+ const _hoisted_22 = ["x", "y"];
50
+ const _hoisted_23 = ["x1", "x2", "y1", "y2"];
51
+ const _hoisted_24 = ["x", "y", "width", "height"];
52
+ const _hoisted_25 = ["x", "y", "width", "height", "fill"];
53
+ const _hoisted_26 = ["clip-path"];
54
+ const _hoisted_27 = ["d", "fill", "opacity"];
55
+ const _hoisted_28 = ["d", "fill"];
56
+ const _hoisted_29 = ["d", "stroke", "stroke-dasharray"];
57
+ const _hoisted_30 = ["cx", "cy", "fill"];
58
+ const _hoisted_31 = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray"];
59
+ const _hoisted_32 = ["x", "y", "fill"];
60
+ const _hoisted_33 = ["x1", "x2", "y1", "y2", "stroke"];
61
+ const _hoisted_34 = ["x", "y", "fill"];
62
+ const _hoisted_35 = { key: 3 };
63
+ const _hoisted_36 = ["x1", "x2", "y1", "y2"];
64
+ const _hoisted_37 = ["cx", "cy", "fill"];
65
+ const _hoisted_38 = ["x", "y"];
66
+ const _hoisted_39 = { class: "mb-1 text-[11px] font-medium text-muted-strong" };
67
+ const _hoisted_40 = { class: "flex flex-col gap-1" };
68
+ const _hoisted_41 = { class: "flex items-center gap-1.5 text-muted" };
69
+ const _hoisted_42 = { class: "font-mono tabular-nums text-ink" };
70
+ const _hoisted_43 = {
71
+ class: "sr-only",
72
+ "aria-live": "polite"
73
+ };
74
+ const _hoisted_44 = {
75
+ key: 2,
76
+ class: "sr-only"
77
+ };
78
+ const _hoisted_45 = { key: 0 };
79
+ const _hoisted_46 = { scope: "row" };
67
80
  const __default__ = { inheritAttrs: false };
68
81
  const _sfc_main = /* @__PURE__ */ defineComponent({
69
82
  ...__default__,
@@ -89,20 +102,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
89
102
  formatRightValue: {},
90
103
  stacked: { type: Boolean },
91
104
  animate: { type: Boolean, default: true },
92
- emptyLabel: { default: "No data" },
105
+ emptyLabel: {},
106
+ thresholds: { default: () => [] },
107
+ markers: { default: () => [] },
108
+ ariaLabel: {},
109
+ dataTable: { type: Boolean, default: false },
110
+ text: {},
93
111
  menuItems: {}
94
112
  },
95
113
  emits: ["pointClick", "pointContextMenu"],
96
114
  setup(__props, { emit: __emit }) {
97
115
  const props = __props;
116
+ const strings = useLabels(
117
+ "chart",
118
+ { empty: "No data", rightAxis: "Measured on the right axis", point: "Point" },
119
+ () => props.text
120
+ );
98
121
  const emit = __emit;
99
122
  const root = ref(null);
100
123
  const width = ref(0);
101
124
  let ro = null;
102
125
  const { el: revealAnchor, revealed } = useReveal({ immediate: () => !props.animate });
103
- const drawing = computed(() => props.animate && revealed.value);
126
+ const reduced = ref(false);
127
+ const still = computed(() => !props.animate || reduced.value);
128
+ const drawing = computed(() => !still.value && revealed.value);
104
129
  onMounted(() => {
105
130
  revealAnchor.value = root.value;
131
+ reduced.value = prefersReducedMotion();
106
132
  if (!root.value || typeof ResizeObserver === "undefined") return;
107
133
  ro = new ResizeObserver(([entry]) => {
108
134
  width.value = entry.contentRect.width;
@@ -119,31 +145,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
145
  if (gutterFrame) cancelAnimationFrame(gutterFrame);
120
146
  });
121
147
  const hidden = ref(/* @__PURE__ */ new Set());
122
- const toggleSeries = (name) => {
148
+ const toggleSeries = (id) => {
123
149
  const next = new Set(hidden.value);
124
- if (next.has(name)) next.delete(name);
125
- else next.add(name);
150
+ if (next.has(id)) next.delete(id);
151
+ else next.add(id);
126
152
  if (next.size < props.series.length) hidden.value = next;
127
153
  };
128
- const allSeries = computed(() => normalise(props.series));
129
- const visible = computed(() => allSeries.value.filter((s) => !hidden.value.has(s.name)));
154
+ const allSeries = computed(
155
+ () => normalise(props.series).map((s, i) => ({ ...s, id: `${i}:${s.name}` }))
156
+ );
157
+ const visible = computed(() => allSeries.value.filter((s) => !hidden.value.has(s.id)));
130
158
  const SETTLE_MS = 260;
131
159
  const presence = ref(/* @__PURE__ */ new Map());
132
160
  let presenceFrame;
133
- const presenceOf = (name) => presence.value.get(name) ?? 1;
161
+ const presenceOf = (id) => presence.value.get(id) ?? 1;
134
162
  watch(
135
163
  // A string, not the Set: `hidden` is replaced wholesale on every toggle, and a
136
164
  // watcher handed the object itself compares the new reference to the old one
137
165
  // and sees a change it cannot describe — or, with a stale copy in the array,
138
166
  // no change at all. The names that are currently off say it exactly.
139
- () => allSeries.value.map((s) => `${s.name}:${hidden.value.has(s.name) ? 0 : 1}`).join(","),
167
+ () => allSeries.value.map((s) => `${s.id}:${hidden.value.has(s.id) ? 0 : 1}`).join(","),
140
168
  () => {
141
- const targets = new Map(allSeries.value.map((s) => [s.name, hidden.value.has(s.name) ? 0 : 1]));
169
+ const targets = new Map(allSeries.value.map((s) => [s.id, hidden.value.has(s.id) ? 0 : 1]));
142
170
  if (!props.animate || prefersReducedMotion()) {
143
171
  presence.value = targets;
144
172
  return;
145
173
  }
146
- const from = new Map(allSeries.value.map((s) => [s.name, presenceOf(s.name)]));
174
+ const from = new Map(allSeries.value.map((s) => [s.id, presenceOf(s.id)]));
147
175
  if ([...targets].every(([name, to]) => from.get(name) === to)) return;
148
176
  const start = performance.now();
149
177
  if (presenceFrame) cancelAnimationFrame(presenceFrame);
@@ -196,10 +224,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
224
  const hasRightAxis = computed(
197
225
  () => declaredRight.value.length > 0 && declaredLeft.value.length > 0
198
226
  );
227
+ const withThresholds = (raw, axis) => {
228
+ let { min, max } = raw;
229
+ for (const t of props.thresholds) {
230
+ if ((t.axis ?? "left") !== axis) continue;
231
+ for (const v of [t.value, t.to]) {
232
+ if (v == null || !Number.isFinite(v)) continue;
233
+ min = Math.min(min, v);
234
+ max = Math.max(max, v);
235
+ }
236
+ }
237
+ return { min, max };
238
+ };
199
239
  const scaleFor = (members) => {
200
240
  const totals = stackTotals.value;
201
241
  const raw = totals ? { min: Math.min(0, ...totals.neg), max: Math.max(0, ...totals.pos) } : extent(members, zeroBased.value);
202
- return niceScale(raw.min, raw.max, props.yTicks);
242
+ const wide = hasData.value ? withThresholds(raw, "left") : raw;
243
+ return niceScale(wide.min, wide.max, props.yTicks);
203
244
  };
204
245
  const targetScale = computed(
205
246
  () => scaleFor(onLeft.value.length ? onLeft.value : declaredLeft.value)
@@ -231,7 +272,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
231
272
  const targetRightScale = computed(() => {
232
273
  if (!hasRightAxis.value) return null;
233
274
  const members = onRight.value.length ? onRight.value : declaredRight.value;
234
- const raw = extent(members, zeroBased.value);
275
+ const raw = withThresholds(extent(members, zeroBased.value), "right");
235
276
  const steps = Math.max(
236
277
  1,
237
278
  axisTicks(targetScale.value.min, targetScale.value.max, targetScale.value.step).length - 1
@@ -364,7 +405,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
364
405
  const lines = computed(
365
406
  () => allSeries.value.map((s) => {
366
407
  const g = geoOf(s);
367
- const p = presenceOf(s.name);
408
+ const p = presenceOf(s.id);
368
409
  const base = Math.min(Math.max(0, g.min), g.max);
369
410
  const values = p === 1 ? s.values : s.values.map((v) => v == null ? null : base + (v - base) * p);
370
411
  return {
@@ -415,7 +456,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
456
  h = Math.abs(top - base);
416
457
  }
417
458
  out.push({
418
- key: `${s.name}-${i}`,
459
+ key: `${s.id}-${i}`,
419
460
  x,
420
461
  y,
421
462
  w: Math.max(1, slot - (props.stacked ? 0 : 2)),
@@ -454,6 +495,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
454
495
  const active = ref(-1);
455
496
  const pointer = ref({ x: 0, y: 0 });
456
497
  const onMove = (e) => {
498
+ keyboard.value = false;
457
499
  const el = e.currentTarget;
458
500
  const rect = el.getBoundingClientRect();
459
501
  const x = e.clientX - rect.left;
@@ -470,6 +512,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
470
512
  originalEvent
471
513
  });
472
514
  const onClick = (e) => {
515
+ const rect = e.currentTarget.getBoundingClientRect();
516
+ active.value = nearestIndex(e.clientX - rect.left, geo.value);
473
517
  if (active.value < 0) return;
474
518
  emit("pointClick", pointEvent(e));
475
519
  };
@@ -493,6 +537,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
493
537
  const sc = scaleOf(s);
494
538
  return {
495
539
  color: s.color,
540
+ id: s.id,
496
541
  name: s.name,
497
542
  value: v,
498
543
  y: yAt(v, sc.min, sc.max, box.value)
@@ -501,6 +546,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
501
546
  });
502
547
  const tooltipRows = computed(
503
548
  () => active.value < 0 ? [] : visible.value.map((s) => ({
549
+ id: s.id,
504
550
  name: s.name,
505
551
  color: s.color,
506
552
  text: s.values[active.value] == null ? "—" : fmtSeries(s, s.values[active.value])
@@ -523,14 +569,95 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
523
569
  const floatTransition = usePillTransition("float");
524
570
  const revealKey = shallowRef(0);
525
571
  watch(
526
- () => [props.series, props.type],
572
+ () => `${props.type}|${count.value}|${allSeries.value.map((s) => s.id).join(",")}`,
527
573
  () => {
528
574
  revealKey.value++;
529
- },
530
- { deep: true }
575
+ }
531
576
  );
532
577
  const clipId = `lp-chart-${Math.random().toString(36).slice(2, 9)}`;
533
578
  const gradientId = (name, index) => `${clipId}-g-${index}-${name.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
579
+ const thresholdMarks = computed(
580
+ () => props.thresholds.flatMap((t, i) => {
581
+ if (!Number.isFinite(t.value) || width.value <= 0) return [];
582
+ const sc = t.axis === "right" && rightScale.value ? rightScale.value : scale.value;
583
+ const y = yAt(t.value, sc.min, sc.max, box.value);
584
+ const to = t.to != null && Number.isFinite(t.to) ? yAt(t.to, sc.min, sc.max, box.value) : null;
585
+ return [
586
+ {
587
+ key: i,
588
+ y,
589
+ top: to == null ? y : Math.min(y, to),
590
+ height: to == null ? 0 : Math.abs(to - y),
591
+ label: t.label,
592
+ color: t.color ?? "var(--color-line-strong)",
593
+ solid: !!t.solid
594
+ }
595
+ ];
596
+ })
597
+ );
598
+ const markerMarks = computed(
599
+ () => props.markers.flatMap((m, i) => {
600
+ const index = markerIndex(m.at, labels.value, count.value);
601
+ if (index < 0 || width.value <= 0) return [];
602
+ return [
603
+ {
604
+ key: i,
605
+ x: xAt(index, count.value, box.value, banded.value),
606
+ label: m.label,
607
+ color: m.color ?? "var(--color-line-strong)"
608
+ }
609
+ ];
610
+ })
611
+ );
612
+ const summary = computed(
613
+ () => props.ariaLabel ?? chartSummary(visible.value, labels.value, fmtSeries, props.title)
614
+ );
615
+ const keyboard = ref(false);
616
+ const onKeydown = (e) => {
617
+ if (!count.value || !hasData.value) return;
618
+ const last = count.value - 1;
619
+ let next;
620
+ switch (e.key) {
621
+ case "ArrowRight":
622
+ next = active.value < 0 ? 0 : Math.min(last, active.value + 1);
623
+ break;
624
+ case "ArrowLeft":
625
+ next = active.value < 0 ? last : Math.max(0, active.value - 1);
626
+ break;
627
+ case "Home":
628
+ next = 0;
629
+ break;
630
+ case "End":
631
+ next = last;
632
+ break;
633
+ case "Enter":
634
+ case " ":
635
+ if (active.value < 0) return;
636
+ e.preventDefault();
637
+ emit("pointClick", pointEvent(new MouseEvent("click")));
638
+ return;
639
+ case "Escape":
640
+ active.value = -1;
641
+ return;
642
+ default:
643
+ return;
644
+ }
645
+ e.preventDefault();
646
+ keyboard.value = true;
647
+ active.value = next;
648
+ const first = activePoints.value[0];
649
+ pointer.value = {
650
+ x: activeX.value,
651
+ y: first ? first.y : box.value.top + plotHeight(box.value) / 2
652
+ };
653
+ };
654
+ const onBlur = () => {
655
+ if (keyboard.value) active.value = -1;
656
+ keyboard.value = false;
657
+ };
658
+ const readout = computed(
659
+ () => keyboard.value && active.value >= 0 ? `${labels.value[active.value] ?? `${strings.value.point} ${active.value + 1}`}: ${tooltipRows.value.map((r) => `${r.name} ${r.text}`).join(", ")}` : ""
660
+ );
534
661
  const { class: rootClass, attrs: rest } = useMergedAttrs(
535
662
  "flex w-full flex-col gap-3"
536
663
  );
@@ -550,17 +677,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
550
677
  __props.showLegend && allSeries.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_5, [
551
678
  (openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
552
679
  return openBlock(), createElementBlock("button", {
553
- key: s.name,
680
+ key: s.id,
554
681
  type: "button",
555
- class: normalizeClass(["group flex cursor-pointer items-center gap-1.5 rounded-md text-xs outline-none transition-opacity duration-fast focus-visible:ring-2 focus-visible:ring-ring", hidden.value.has(s.name) ? "opacity-40" : ""]),
556
- onClick: ($event) => toggleSeries(s.name)
682
+ class: normalizeClass(["group flex cursor-pointer items-center gap-1.5 rounded-md text-xs outline-none transition-opacity duration-fast focus-visible:ring-2 focus-visible:ring-ring", hidden.value.has(s.id) ? "opacity-40" : ""]),
683
+ "aria-pressed": !hidden.value.has(s.id),
684
+ onClick: ($event) => toggleSeries(s.id)
557
685
  }, [
558
686
  createElementVNode("span", {
559
687
  class: "size-2 shrink-0 rounded-full transition-transform duration-fast group-hover:scale-125",
560
688
  style: normalizeStyle({ backgroundColor: s.color })
561
689
  }, null, 4),
562
690
  createElementVNode("span", _hoisted_7, toDisplayString(s.name), 1),
563
- hasRightAxis.value && s.axis === "right" ? (openBlock(), createElementBlock("span", _hoisted_8, " ↗ ")) : createCommentVNode("", true)
691
+ hasRightAxis.value && s.axis === "right" ? (openBlock(), createElementBlock("span", {
692
+ key: 0,
693
+ class: "text-[10px] text-muted",
694
+ title: unref(strings).rightAxis
695
+ }, " ↗ ", 8, _hoisted_8)) : createCommentVNode("", true)
564
696
  ], 10, _hoisted_6);
565
697
  }), 128))
566
698
  ])) : createCommentVNode("", true),
@@ -570,20 +702,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
570
702
  }, {
571
703
  default: withCtx(() => [
572
704
  createElementVNode("div", {
573
- class: "group/plot relative",
574
- style: normalizeStyle({ height: `${__props.height}px` })
705
+ class: "group/plot relative rounded-control outline-none focus-visible:ring-2 focus-visible:ring-ring",
706
+ style: normalizeStyle({ height: `${__props.height}px` }),
707
+ tabindex: hasData.value ? 0 : void 0,
708
+ role: hasData.value ? "group" : void 0,
709
+ "aria-roledescription": "chart",
710
+ "aria-label": hasData.value ? summary.value : void 0,
711
+ onKeydown,
712
+ onBlur
575
713
  }, [
576
- !hasData.value ? (openBlock(), createElementBlock("div", _hoisted_9, [
714
+ !hasData.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
577
715
  createVNode(_sfc_main$2, {
578
716
  name: "lucide:chart-no-axes-column",
579
717
  size: 18
580
718
  }),
581
- createElementVNode("span", _hoisted_10, toDisplayString(__props.emptyLabel), 1)
719
+ createElementVNode("span", _hoisted_11, toDisplayString(__props.emptyLabel ?? unref(strings).empty), 1)
582
720
  ])) : width.value > 0 ? (openBlock(), createElementBlock("svg", {
583
721
  key: 1,
584
722
  width: width.value,
585
723
  height: __props.height,
586
724
  class: "overflow-visible touch-none select-none",
725
+ "aria-hidden": "true",
587
726
  onPointermove: onMove,
588
727
  onPointerleave: onLeave,
589
728
  onClick,
@@ -593,7 +732,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
593
732
  (openBlock(true), createElementBlock(Fragment, null, renderList(lines.value, (s, i) => {
594
733
  return openBlock(), createElementBlock("linearGradient", {
595
734
  id: gradientId(s.name, i),
596
- key: s.name,
735
+ key: s.id,
597
736
  x1: "0",
598
737
  y1: "0",
599
738
  x2: "0",
@@ -603,13 +742,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
603
742
  offset: "0%",
604
743
  "stop-color": s.color,
605
744
  "stop-opacity": "0.28"
606
- }, null, 8, _hoisted_13),
745
+ }, null, 8, _hoisted_14),
607
746
  createElementVNode("stop", {
608
747
  offset: "100%",
609
748
  "stop-color": s.color,
610
749
  "stop-opacity": "0.02"
611
- }, null, 8, _hoisted_14)
612
- ], 8, _hoisted_12);
750
+ }, null, 8, _hoisted_15)
751
+ ], 8, _hoisted_13);
613
752
  }), 128)),
614
753
  createElementVNode("clipPath", {
615
754
  id: `${clipId}-reveal`
@@ -619,7 +758,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
619
758
  x: box.value.left,
620
759
  y: 0,
621
760
  height: __props.height,
622
- width: __props.animate ? 0 : unref(plotWidth)(box.value)
761
+ width: still.value ? unref(plotWidth)(box.value) : 0
623
762
  }, [
624
763
  drawing.value ? (openBlock(), createElementBlock("animate", {
625
764
  key: 0,
@@ -631,11 +770,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
631
770
  calcMode: "spline",
632
771
  keySplines: "0.2 0.25 0.5 0.85",
633
772
  keyTimes: "0;1"
634
- }, null, 8, _hoisted_17)) : createCommentVNode("", true)
635
- ], 8, _hoisted_16))
636
- ], 8, _hoisted_15)
773
+ }, null, 8, _hoisted_18)) : createCommentVNode("", true)
774
+ ], 8, _hoisted_17))
775
+ ], 8, _hoisted_16)
637
776
  ]),
638
- __props.showGrid || __props.showYAxis ? (openBlock(), createElementBlock("g", _hoisted_18, [
777
+ __props.showGrid || __props.showYAxis ? (openBlock(), createElementBlock("g", _hoisted_19, [
639
778
  (openBlock(true), createElementBlock(Fragment, null, renderList(gridLines.value, (g) => {
640
779
  return openBlock(), createElementBlock(Fragment, {
641
780
  key: g.key
@@ -648,7 +787,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
648
787
  y2: g.y,
649
788
  stroke: "var(--color-line)",
650
789
  "stroke-width": "1"
651
- }, null, 8, _hoisted_19)) : createCommentVNode("", true),
790
+ }, null, 8, _hoisted_20)) : createCommentVNode("", true),
652
791
  __props.showYAxis ? (openBlock(), createElementBlock("text", {
653
792
  key: 1,
654
793
  x: box.value.left - 8,
@@ -656,7 +795,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
656
795
  "text-anchor": "end",
657
796
  "dominant-baseline": "middle",
658
797
  class: "fill-[var(--color-muted)] text-[10px] tabular-nums"
659
- }, toDisplayString(g.label), 9, _hoisted_20)) : createCommentVNode("", true),
798
+ }, toDisplayString(g.label), 9, _hoisted_21)) : createCommentVNode("", true),
660
799
  __props.showYAxis && g.rightLabel ? (openBlock(), createElementBlock("text", {
661
800
  key: 2,
662
801
  x: box.value.width - box.value.right + 8,
@@ -664,7 +803,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
664
803
  "text-anchor": "start",
665
804
  "dominant-baseline": "middle",
666
805
  class: "fill-[var(--color-muted)] text-[10px] tabular-nums"
667
- }, toDisplayString(g.rightLabel), 9, _hoisted_21)) : createCommentVNode("", true)
806
+ }, toDisplayString(g.rightLabel), 9, _hoisted_22)) : createCommentVNode("", true)
668
807
  ], 64);
669
808
  }), 128))
670
809
  ])) : createCommentVNode("", true),
@@ -676,7 +815,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
676
815
  y2: baseY.value,
677
816
  stroke: "var(--color-line-strong)",
678
817
  "stroke-width": "1"
679
- }, null, 8, _hoisted_22)) : createCommentVNode("", true),
818
+ }, null, 8, _hoisted_23)) : createCommentVNode("", true),
680
819
  active.value >= 0 && banded.value ? (openBlock(), createElementBlock("rect", {
681
820
  key: 2,
682
821
  x: activeX.value - unref(plotWidth)(box.value) / count.value / 2,
@@ -685,7 +824,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
685
824
  height: unref(plotHeight)(box.value),
686
825
  fill: "var(--color-surface-soft)",
687
826
  opacity: "0.5"
688
- }, null, 8, _hoisted_23)) : createCommentVNode("", true),
827
+ }, null, 8, _hoisted_24)) : createCommentVNode("", true),
828
+ (openBlock(true), createElementBlock(Fragment, null, renderList(thresholdMarks.value.filter((m) => m.height > 0), (t) => {
829
+ return openBlock(), createElementBlock("rect", {
830
+ key: `band-${t.key}`,
831
+ x: box.value.left,
832
+ y: t.top,
833
+ width: unref(plotWidth)(box.value),
834
+ height: t.height,
835
+ fill: t.color,
836
+ opacity: "0.08"
837
+ }, null, 8, _hoisted_25);
838
+ }), 128)),
689
839
  createElementVNode("g", {
690
840
  "clip-path": `url(#${clipId}-reveal)`
691
841
  }, [
@@ -696,17 +846,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
696
846
  fill: b.color,
697
847
  class: "transition-opacity duration-fast",
698
848
  opacity: active.value < 0 || active.value === b.index ? 1 : 0.45
699
- }, null, 8, _hoisted_25);
849
+ }, null, 8, _hoisted_27);
700
850
  }), 128)),
701
851
  (openBlock(true), createElementBlock(Fragment, null, renderList(lines.value, (s, i) => {
702
852
  return openBlock(), createElementBlock("g", {
703
- key: `s-${s.name}`,
853
+ key: `s-${s.id}`,
704
854
  style: normalizeStyle({ opacity: s.alpha })
705
855
  }, [
706
856
  withDirectives(createElementVNode("path", {
707
857
  d: s.fill,
708
858
  fill: `url(#${gradientId(s.name, i)})`
709
- }, null, 8, _hoisted_26), [
859
+ }, null, 8, _hoisted_28), [
710
860
  [vShow, __props.type === "area"]
711
861
  ]),
712
862
  withDirectives(createElementVNode("path", {
@@ -717,7 +867,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
717
867
  "stroke-linecap": "round",
718
868
  "stroke-linejoin": "round",
719
869
  "stroke-dasharray": s.dashed ? "5 4" : void 0
720
- }, null, 8, _hoisted_27), [
870
+ }, null, 8, _hoisted_29), [
721
871
  [vShow, __props.type !== "bar"]
722
872
  ]),
723
873
  __props.type !== "bar" && s.points ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(s.values, (v, j) => {
@@ -727,14 +877,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
727
877
  cy: v == null ? 0 : unref(yAt)(v, s.scale.min, s.scale.max, box.value),
728
878
  r: "2.5",
729
879
  fill: s.color
730
- }, null, 8, _hoisted_28)), [
880
+ }, null, 8, _hoisted_30)), [
731
881
  [vShow, v != null]
732
882
  ]);
733
883
  }), 128)) : createCommentVNode("", true)
734
884
  ], 4);
735
885
  }), 128))
736
- ], 8, _hoisted_24),
737
- active.value >= 0 && __props.type !== "bar" ? (openBlock(), createElementBlock("g", _hoisted_29, [
886
+ ], 8, _hoisted_26),
887
+ (openBlock(true), createElementBlock(Fragment, null, renderList(thresholdMarks.value, (t) => {
888
+ return openBlock(), createElementBlock("g", {
889
+ key: `t-${t.key}`
890
+ }, [
891
+ createElementVNode("line", {
892
+ x1: box.value.left,
893
+ x2: box.value.width - box.value.right,
894
+ y1: t.y,
895
+ y2: t.y,
896
+ stroke: t.color,
897
+ "stroke-width": "1",
898
+ "stroke-dasharray": t.solid ? void 0 : "4 3"
899
+ }, null, 8, _hoisted_31),
900
+ t.label ? (openBlock(), createElementBlock("text", {
901
+ key: 0,
902
+ x: box.value.width - box.value.right - 4,
903
+ y: t.top - 4,
904
+ "text-anchor": "end",
905
+ class: "text-[10px]",
906
+ fill: t.color
907
+ }, toDisplayString(t.label), 9, _hoisted_32)) : createCommentVNode("", true)
908
+ ]);
909
+ }), 128)),
910
+ (openBlock(true), createElementBlock(Fragment, null, renderList(markerMarks.value, (m) => {
911
+ return openBlock(), createElementBlock("g", {
912
+ key: `m-${m.key}`
913
+ }, [
914
+ createElementVNode("line", {
915
+ x1: m.x,
916
+ x2: m.x,
917
+ y1: box.value.top,
918
+ y2: box.value.top + unref(plotHeight)(box.value),
919
+ stroke: m.color,
920
+ "stroke-width": "1",
921
+ "stroke-dasharray": "2 3"
922
+ }, null, 8, _hoisted_33),
923
+ m.label ? (openBlock(), createElementBlock("text", {
924
+ key: 0,
925
+ x: m.x + 4,
926
+ y: box.value.top + 9,
927
+ class: "text-[10px]",
928
+ fill: m.color
929
+ }, toDisplayString(m.label), 9, _hoisted_34)) : createCommentVNode("", true)
930
+ ]);
931
+ }), 128)),
932
+ active.value >= 0 && __props.type !== "bar" ? (openBlock(), createElementBlock("g", _hoisted_35, [
738
933
  createElementVNode("line", {
739
934
  x1: activeX.value,
740
935
  x2: activeX.value,
@@ -743,17 +938,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
743
938
  stroke: "var(--color-line-strong)",
744
939
  "stroke-width": "1",
745
940
  "stroke-dasharray": "3 3"
746
- }, null, 8, _hoisted_30),
941
+ }, null, 8, _hoisted_36),
747
942
  (openBlock(true), createElementBlock(Fragment, null, renderList(activePoints.value, (p) => {
748
943
  return openBlock(), createElementBlock("circle", {
749
- key: p.name,
944
+ key: p.id,
750
945
  cx: activeX.value,
751
946
  cy: p.y,
752
947
  r: "4",
753
948
  fill: p.color,
754
949
  stroke: "var(--color-surface)",
755
950
  "stroke-width": "2"
756
- }, null, 8, _hoisted_31);
951
+ }, null, 8, _hoisted_37);
757
952
  }), 128))
758
953
  ])) : createCommentVNode("", true),
759
954
  (openBlock(true), createElementBlock(Fragment, null, renderList(xLabels.value, (l) => {
@@ -763,11 +958,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
763
958
  y: __props.height - 8,
764
959
  "text-anchor": "middle",
765
960
  class: normalizeClass(["fill-[var(--color-muted)] text-[10px]", active.value === l.i ? "fill-[var(--color-ink)]" : ""])
766
- }, toDisplayString(l.label), 11, _hoisted_32)), [
961
+ }, toDisplayString(l.label), 11, _hoisted_38)), [
767
962
  [vShow, __props.showXAxis]
768
963
  ]);
769
964
  }), 128))
770
- ], 40, _hoisted_11)) : createCommentVNode("", true),
965
+ ], 40, _hoisted_12)) : createCommentVNode("", true),
771
966
  active.value >= 0 && hasData.value ? (openBlock(), createBlock(unref(Motion), {
772
967
  key: 2,
773
968
  as: "div",
@@ -784,21 +979,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
784
979
  default: withCtx(() => [
785
980
  createVNode(_sfc_main$3, { axis: "both" }, {
786
981
  default: withCtx(() => [
787
- createElementVNode("div", _hoisted_33, toDisplayString(labels.value[active.value]), 1),
788
- createElementVNode("div", _hoisted_34, [
982
+ createElementVNode("div", _hoisted_39, toDisplayString(labels.value[active.value]), 1),
983
+ createElementVNode("div", _hoisted_40, [
789
984
  (openBlock(true), createElementBlock(Fragment, null, renderList(tooltipRows.value, (r) => {
790
985
  return openBlock(), createElementBlock("div", {
791
- key: r.name,
986
+ key: r.id,
792
987
  class: "flex items-center justify-between gap-3 text-xs"
793
988
  }, [
794
- createElementVNode("span", _hoisted_35, [
989
+ createElementVNode("span", _hoisted_41, [
795
990
  createElementVNode("span", {
796
991
  class: "size-1.5 shrink-0 rounded-full",
797
992
  style: normalizeStyle({ backgroundColor: r.color })
798
993
  }, null, 4),
799
994
  createTextVNode(" " + toDisplayString(r.name), 1)
800
995
  ]),
801
- createElementVNode("span", _hoisted_36, toDisplayString(r.text), 1)
996
+ createElementVNode("span", _hoisted_42, toDisplayString(r.text), 1)
802
997
  ]);
803
998
  }), 128))
804
999
  ])
@@ -807,16 +1002,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
807
1002
  })
808
1003
  ]),
809
1004
  _: 1
810
- }, 8, ["animate", "transition"])) : createCommentVNode("", true)
811
- ], 4)
1005
+ }, 8, ["animate", "transition"])) : createCommentVNode("", true),
1006
+ createElementVNode("span", _hoisted_43, toDisplayString(readout.value), 1)
1007
+ ], 44, _hoisted_9)
812
1008
  ]),
813
1009
  _: 1
814
- }, 8, ["items", "always"])
1010
+ }, 8, ["items", "always"]),
1011
+ __props.dataTable && hasData.value ? (openBlock(), createElementBlock("table", _hoisted_44, [
1012
+ __props.title ? (openBlock(), createElementBlock("caption", _hoisted_45, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
1013
+ createElementVNode("thead", null, [
1014
+ createElementVNode("tr", null, [
1015
+ _cache[0] || (_cache[0] = createElementVNode("th", { scope: "col" }, null, -1)),
1016
+ (openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
1017
+ return openBlock(), createElementBlock("th", {
1018
+ key: s.id,
1019
+ scope: "col"
1020
+ }, toDisplayString(s.name), 1);
1021
+ }), 128))
1022
+ ])
1023
+ ]),
1024
+ createElementVNode("tbody", null, [
1025
+ (openBlock(true), createElementBlock(Fragment, null, renderList(labels.value, (label, i) => {
1026
+ return openBlock(), createElementBlock("tr", { key: i }, [
1027
+ createElementVNode("th", _hoisted_46, toDisplayString(label), 1),
1028
+ (openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
1029
+ return openBlock(), createElementBlock("td", {
1030
+ key: s.id
1031
+ }, toDisplayString(s.values[i] == null ? "—" : fmtSeries(s, s.values[i])), 1);
1032
+ }), 128))
1033
+ ]);
1034
+ }), 128))
1035
+ ])
1036
+ ])) : createCommentVNode("", true)
815
1037
  ], 16);
816
1038
  };
817
1039
  }
818
1040
  });
819
- const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a2e477eb"]]);
1041
+ const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bd77643a"]]);
820
1042
  export {
821
1043
  LpChart as default
822
1044
  };