@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,13 +1,15 @@
1
- import { defineComponent, useAttrs, computed, ref, shallowRef, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, withCtx, createElementVNode, createCommentVNode, Fragment, renderList, normalizeStyle, createBlock, createTextVNode, toDisplayString, TransitionGroup, unref, withModifiers, renderSlot, nextTick } from "vue";
2
- import { _ as _sfc_main$3 } from "../chunks/LpCheckbox-CVccKYaH.js";
3
- import { _ as _sfc_main$2 } from "../chunks/LpContextMenu-CwW1QXe_.js";
1
+ import { defineComponent, computed, useAttrs, ref, shallowRef, watch, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, withCtx, createElementVNode, createCommentVNode, Fragment, renderList, normalizeStyle, createBlock, createTextVNode, toDisplayString, TransitionGroup, unref, withModifiers, renderSlot, nextTick } from "vue";
2
+ import { _ as _sfc_main$3 } from "../chunks/LpCheckbox-DpqchzH4.js";
3
+ import { _ as _sfc_main$2 } from "../chunks/LpContextMenu-DQw5dGfG.js";
4
4
  import { _ as _sfc_main$4 } from "../chunks/LpIcon-CCnX5_2j.js";
5
- import { _ as _sfc_main$5 } from "../chunks/LpPagination-5FxjmmB5.js";
5
+ import { _ as _sfc_main$5 } from "../chunks/LpPagination-DFngX7Xo.js";
6
6
  import { _ as _sfc_main$1 } from "../chunks/LpScrollArea-D8xyKXcF.js";
7
7
  import { useAsyncTask } from "../composables/useAsyncTask.js";
8
8
  import { useRovingFocus } from "../composables/useRovingFocus.js";
9
+ import { useLabels } from "../composables/useLpConfig.js";
10
+ import { compareValues } from "./tableSort.js";
9
11
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
10
- import '../assets/LpTable-BgPLJOXa.css';const _hoisted_1 = { class: "border-b border-line bg-surface-soft" };
12
+ import '../assets/LpTable-DDQNdf86.css';const _hoisted_1 = { class: "border-b border-line bg-surface-soft" };
11
13
  const _hoisted_2 = {
12
14
  key: 0,
13
15
  class: "w-px px-4 py-3"
@@ -30,26 +32,54 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
32
  load: {},
31
33
  pageSize: { default: 25 },
32
34
  debounce: { default: 150 },
33
- loadingLabel: { default: "Loading…" },
34
- errorLabel: { default: "Could not load" },
35
+ loadingLabel: {},
36
+ errorLabel: {},
35
37
  rowKey: {},
36
- emptyLabel: { default: "Nothing here yet" },
38
+ emptyLabel: {},
37
39
  emptyIcon: { default: "lucide:inbox" },
38
40
  selectable: { type: Boolean, default: false },
39
41
  selected: { default: () => [] },
40
- sort: { default: null },
42
+ sort: { default: void 0 },
41
43
  stickyHeader: { type: Boolean },
42
44
  rowMenu: {},
43
- sortAscLabel: { default: "Sort ascending" },
44
- sortDescLabel: { default: "Sort descending" },
45
- sortClearLabel: { default: "Clear sorting" },
46
- filterLabel: { default: "Show only" },
47
- showAllLabel: { default: "Show all" },
48
- columnsLabel: { default: "Columns" }
45
+ sortAscLabel: {},
46
+ sortDescLabel: {},
47
+ sortClearLabel: {},
48
+ filterLabel: {},
49
+ showAllLabel: {},
50
+ columnsLabel: {},
51
+ labels: {}
49
52
  },
50
53
  emits: ["update:selected", "update:sort", "rowClick"],
51
54
  setup(__props, { expose: __expose, emit: __emit }) {
52
55
  const props = __props;
56
+ const labelSet = useLabels(
57
+ "table",
58
+ {
59
+ loading: "Loading…",
60
+ error: "Could not load",
61
+ empty: "Nothing here yet",
62
+ sortAsc: "Sort ascending",
63
+ sortDesc: "Sort descending",
64
+ sortClear: "Clear sorting",
65
+ filter: "Show only",
66
+ showAll: "Show all",
67
+ columns: "Columns"
68
+ },
69
+ () => props.labels
70
+ );
71
+ const text = computed(() => ({
72
+ ...labelSet.value,
73
+ loading: props.loadingLabel ?? labelSet.value.loading,
74
+ error: props.errorLabel ?? labelSet.value.error,
75
+ empty: props.emptyLabel ?? labelSet.value.empty,
76
+ sortAsc: props.sortAscLabel ?? labelSet.value.sortAsc,
77
+ sortDesc: props.sortDescLabel ?? labelSet.value.sortDesc,
78
+ sortClear: props.sortClearLabel ?? labelSet.value.sortClear,
79
+ filter: props.filterLabel ?? labelSet.value.filter,
80
+ showAll: props.showAllLabel ?? labelSet.value.showAll,
81
+ columns: props.columnsLabel ?? labelSet.value.columns
82
+ }));
53
83
  const attrs = useAttrs();
54
84
  const rootClass = computed(() => attrs.class);
55
85
  const scrollAttrs = computed(() => {
@@ -60,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
60
90
  function keyFor(row, index) {
61
91
  if (typeof props.rowKey === "function") return props.rowKey(row);
62
92
  if (props.rowKey) return row[props.rowKey];
63
- return index;
93
+ return sourceIndex.value.get(row) ?? index;
64
94
  }
65
95
  function alignClass(align) {
66
96
  if (align === "right") return "text-right";
@@ -79,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
109
  return [...row, { ...table[0], separatorBefore: true }, ...table.slice(1)];
80
110
  });
81
111
  const ownSort = ref(null);
82
- const activeSort = computed(() => props.sort ?? ownSort.value);
112
+ const activeSort = computed(() => props.sort !== void 0 ? props.sort : ownSort.value);
83
113
  const loaded = shallowRef([]);
84
114
  const total = ref(0);
85
115
  const facets = ref({});
@@ -88,6 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
88
118
  const task = useAsyncTask();
89
119
  const loading = task.pending;
90
120
  const sourceRows = computed(() => props.load ? loaded.value : props.rows);
121
+ const sourceIndex = computed(() => new Map(sourceRows.value.map((row, i) => [row, i])));
91
122
  const tableEl = ref(null);
92
123
  const floor = ref(0);
93
124
  async function holdHeight() {
@@ -154,15 +185,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
185
  const col = props.columns.find((c) => c.key === s.key);
155
186
  if (!col?.sortable) return filteredRows.value;
156
187
  const factor = s.dir === "asc" ? 1 : -1;
157
- return [...filteredRows.value].sort((a, b) => compare(a[s.key], b[s.key]) * factor);
188
+ const own = col.compare;
189
+ const value = col.sortValue ?? ((row) => row[s.key]);
190
+ return [...filteredRows.value].sort(
191
+ (a, b) => (own ? own(a, b) : compareValues(value(a), value(b))) * factor
192
+ );
158
193
  });
159
- function compare(a, b) {
160
- if (a == null && b == null) return 0;
161
- if (a == null) return -1;
162
- if (b == null) return 1;
163
- if (typeof a === "number" && typeof b === "number") return a - b;
164
- return String(a).localeCompare(String(b), void 0, { numeric: true });
165
- }
166
194
  function toggleSort(col) {
167
195
  if (!col.sortable) return;
168
196
  const s = activeSort.value;
@@ -190,19 +218,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
190
218
  if (col.sortable) {
191
219
  items.push(
192
220
  {
193
- label: props.sortAscLabel,
221
+ label: text.value.sortAsc,
194
222
  icon: "lucide:arrow-up",
195
223
  disabled: s?.key === col.key && s.dir === "asc",
196
224
  onSelect: set({ key: col.key, dir: "asc" })
197
225
  },
198
226
  {
199
- label: props.sortDescLabel,
227
+ label: text.value.sortDesc,
200
228
  icon: "lucide:arrow-down",
201
229
  disabled: s?.key === col.key && s.dir === "desc",
202
230
  onSelect: set({ key: col.key, dir: "desc" })
203
231
  },
204
232
  {
205
- label: props.sortClearLabel,
233
+ label: text.value.sortClear,
206
234
  icon: "lucide:x",
207
235
  disabled: !s,
208
236
  onSelect: set(null)
@@ -212,7 +240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
212
240
  if (col.filterable) {
213
241
  const hidden = hiddenValues.value[col.key];
214
242
  items.push({
215
- label: props.filterLabel,
243
+ label: text.value.filter,
216
244
  icon: "lucide:filter",
217
245
  separatorBefore: items.length > 0,
218
246
  children: [
@@ -222,7 +250,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
222
250
  onSelect: () => toggleValue(col.key, value)
223
251
  })),
224
252
  {
225
- label: props.showAllLabel,
253
+ label: text.value.showAll,
226
254
  icon: "lucide:list",
227
255
  separatorBefore: true,
228
256
  disabled: !hidden?.size,
@@ -238,7 +266,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
238
266
  if (!offered.length) return [];
239
267
  return [
240
268
  {
241
- label: props.columnsLabel,
269
+ label: text.value.columns,
242
270
  icon: "lucide:columns-3",
243
271
  children: offered.map((col) => ({
244
272
  label: col.label,
@@ -261,6 +289,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
261
289
  task.run((signal) => load(query, signal), {
262
290
  delay,
263
291
  apply: (result) => {
292
+ const last = Math.max(1, Math.ceil(result.total / props.pageSize));
293
+ if (page.value > last) {
294
+ page.value = last;
295
+ return;
296
+ }
264
297
  loaded.value = result.rows;
265
298
  total.value = result.total;
266
299
  facets.value = result.facets ?? {};
@@ -281,7 +314,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
281
314
  watch(() => props.load, () => fetchPage(), { immediate: true });
282
315
  __expose({ reload: () => fetchPage() });
283
316
  const selectedSet = computed(() => new Set(props.selected));
284
- const allKeys = computed(() => sourceRows.value.map((r, i) => keyFor(r, i)));
317
+ const allKeys = computed(() => filteredRows.value.map((r, i) => keyFor(r, i)));
285
318
  const allChecked = computed(
286
319
  () => allKeys.value.length > 0 && allKeys.value.every((k) => selectedSet.value.has(k))
287
320
  );
@@ -289,7 +322,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
289
322
  () => !allChecked.value && allKeys.value.some((k) => selectedSet.value.has(k))
290
323
  );
291
324
  function toggleAll(checked) {
292
- emit("update:selected", checked ? [...allKeys.value] : []);
325
+ const next = new Set(selectedSet.value);
326
+ for (const key of allKeys.value) {
327
+ if (checked) next.add(key);
328
+ else next.delete(key);
329
+ }
330
+ emit("update:selected", [...next]);
293
331
  }
294
332
  function toggleRow(key, checked) {
295
333
  const next = new Set(selectedSet.value);
@@ -297,7 +335,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
297
335
  else next.delete(key);
298
336
  emit("update:selected", [...next]);
299
337
  }
300
- const colSpan = computed(() => props.columns.length + (props.selectable ? 1 : 0));
338
+ const colSpan = computed(() => visibleColumns.value.length + (props.selectable ? 1 : 0));
301
339
  const rovingItems = computed(
302
340
  () => displayRows.value.map((row, index) => ({
303
341
  id: String(keyFor(row, index)),
@@ -452,7 +490,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
452
490
  size: 22,
453
491
  class: normalizeClass(["mx-auto mb-2 opacity-60", unref(loading) ? "animate-spin" : ""])
454
492
  }, null, 8, ["name", "class"]),
455
- createElementVNode("div", null, toDisplayString(unref(loading) ? __props.loadingLabel : failed.value ? __props.errorLabel : __props.emptyLabel), 1)
493
+ createElementVNode("div", null, toDisplayString(unref(loading) ? text.value.loading : failed.value ? text.value.error : text.value.empty), 1)
456
494
  ], 8, _hoisted_6)
457
495
  ])) : createCommentVNode("", true),
458
496
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayRows.value, (row, index) => {
@@ -512,7 +550,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
512
550
  };
513
551
  }
514
552
  });
515
- const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e0bb036b"]]);
553
+ const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ebce6d15"]]);
516
554
  export {
517
555
  LpTable as default
518
556
  };
@@ -6,13 +6,15 @@ export interface TocLink {
6
6
  }
7
7
  type __VLS_Props = {
8
8
  links: TocLink[];
9
- /** Heading shown above the list. */
9
+ /** Heading shown above the list (defaults to the `title` label). */
10
10
  title?: string;
11
11
  /** px offset from the top used as the scroll-spy trigger line. */
12
12
  offset?: number;
13
+ labels?: Partial<{
14
+ title: string;
15
+ }>;
13
16
  };
14
17
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
- title: string;
16
18
  offset: number;
17
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
20
  declare const _default: typeof __VLS_export;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTableOfContents-CjvxPMpU.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTableOfContents-BUcAfGPQ.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -6,6 +6,8 @@ export interface TabItem {
6
6
  }
7
7
  type __VLS_Props = {
8
8
  modelValue?: string;
9
+ /** Initially active tab when `v-model` is not bound (default: the first). */
10
+ defaultValue?: string;
9
11
  items: TabItem[];
10
12
  /**
11
13
  * "contained" (default) wraps the triggers in a bordered, filled bar.
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTabs-Cefe_lys.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTabs-_qMVaZJ6.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,6 @@
1
- type __VLS_Props = {
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{
2
4
  modelValue?: string;
3
5
  placeholder?: string;
4
6
  rows?: number;
@@ -12,11 +14,22 @@ type __VLS_Props = {
12
14
  * the <textarea> for native validation.
13
15
  */
14
16
  required?: boolean;
15
- };
16
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
18
  "update:modelValue": (value: string) => any;
18
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ }, string, import("vue").PublicProps, Readonly<{
20
+ modelValue?: string;
21
+ placeholder?: string;
22
+ rows?: number;
23
+ invalid?: boolean;
24
+ disabled?: boolean;
25
+ label?: string;
26
+ hint?: string;
27
+ error?: string;
28
+ /**
29
+ * Marks the label with the required indicator; the attribute still reaches
30
+ * the <textarea> for native validation.
31
+ */
32
+ required?: boolean;
33
+ }> & Readonly<{
19
34
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
20
35
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
- declare const _default: typeof __VLS_export;
22
- export default _default;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTextarea-t7F6gv8E.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTextarea-yP8hGedR.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -0,0 +1,22 @@
1
+ import { type Component } from "vue";
2
+ import type { TokenSet } from "../theme/tokens";
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
6
+ theme: TokenSet;
7
+ /** Root element. A wrapper that should not affect layout can use `class="contents"`. */
8
+ as?: string | Component;
9
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
10
+ theme: TokenSet;
11
+ /** Root element. A wrapper that should not affect layout can use `class="contents"`. */
12
+ as?: string | Component;
13
+ }> & Readonly<{}>, {
14
+ as: string | Component;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
16
+ default?: (props: {}) => any;
17
+ }>;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as _sfc_main } from "../chunks/LpThemeProvider-Wjm7Tuit.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -31,6 +31,19 @@ type __VLS_Props = {
31
31
  transition?: boolean;
32
32
  size?: "sm" | "md" | "lg";
33
33
  "aria-label"?: string;
34
+ /**
35
+ * Offer a "System" entry in the menu that follows the OS colour scheme,
36
+ * switching between these two themes (names from `themes`, or TokenSets).
37
+ */
38
+ system?: {
39
+ light: string | TokenSet;
40
+ dark: string | TokenSet;
41
+ };
42
+ /** Text overrides. `trigger` may contain `{name}`. */
43
+ labels?: Partial<{
44
+ trigger: string;
45
+ system: string;
46
+ }>;
34
47
  };
35
48
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
36
49
  change: (theme: TokenSet) => any;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-Cue-myST.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-CKLc10KZ.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTilt-DuyKbpkA.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTilt-B7KHX1zH.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTimeField-K6nAGboX.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTimeField-C5HRgS5H.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,3 +1,8 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ type __VLS_Props = {
2
+ labels?: Partial<{
3
+ dismiss: string;
4
+ }>;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
2
7
  declare const _default: typeof __VLS_export;
3
8
  export default _default;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpToaster-gDB1EaU3.js";
1
+ import { _ as _sfc_main } from "../chunks/LpToaster--oT6lfhL.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -9,7 +9,7 @@ type __VLS_Props = {
9
9
  * adding a description.
10
10
  */
11
11
  label?: boolean;
12
- /** Milliseconds before the tip appears on hover. */
12
+ /** Milliseconds before the tip appears on hover. Unset follows the provider, else 200. */
13
13
  delay?: number;
14
14
  /**
15
15
  * Show on any focus, not just keyboard focus. Off by default: a tip that
@@ -45,7 +45,6 @@ type __VLS_Slots = {} & {
45
45
  content?: (props: typeof __VLS_38) => any;
46
46
  };
47
47
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
48
- delay: number;
49
48
  side: "top" | "right" | "bottom" | "left";
50
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
51
50
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTooltip-hCLPAqMG.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTooltip-CBdzeKNf.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ /** Milliseconds before the first tip appears on hover. */
3
+ delay?: number;
4
+ /** How long after a tip closes the next one still opens at once. */
5
+ skipDelay?: number;
6
+ };
7
+ declare var __VLS_8: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_8) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
12
+ delay: number;
13
+ skipDelay: number;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,4 @@
1
+ import { _ as _sfc_main } from "../chunks/LpTooltipProvider-CftjV7Xc.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-Cm1L39uL.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-DocsLal3.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -24,6 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
24
24
  * `{ degraded: '#ffb84d' }` to recolour just one state.
25
25
  */
26
26
  colors?: Partial<Record<UptimeStatus, string>>;
27
+ /** Status names, for the tooltip and screen readers. */
28
+ labels?: Partial<Record<UptimeStatus, string>>;
27
29
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
28
30
  /** Oldest → newest. Each entry is one slice of the timeline. */
29
31
  segments: UptimeSegment[];
@@ -41,6 +43,8 @@ declare const __VLS_export: import("vue").DefineComponent<{
41
43
  * `{ degraded: '#ffb84d' }` to recolour just one state.
42
44
  */
43
45
  colors?: Partial<Record<UptimeStatus, string>>;
46
+ /** Status names, for the tooltip and screen readers. */
47
+ labels?: Partial<Record<UptimeStatus, string>>;
44
48
  }> & Readonly<{}>, {
45
49
  showUptime: boolean;
46
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpUptimeBar-DvAMno0S.js";
1
+ import { _ as _sfc_main } from "../chunks/LpUptimeBar-DLtxOMRy.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -21,6 +21,37 @@ export interface ChartSeries {
21
21
  axis?: "left" | "right";
22
22
  }
23
23
  export type ChartAxis = "left" | "right";
24
+ /**
25
+ * A reference level drawn across the plot: a line at `value`, or a band from
26
+ * `value` to `to`. SLOs, budgets, alert thresholds.
27
+ */
28
+ export interface ChartThreshold {
29
+ value: number;
30
+ /** Upper (or lower) edge of a band. Omit for a single line. */
31
+ to?: number;
32
+ label?: string;
33
+ /** Any CSS colour. Defaults to the strong line token. */
34
+ color?: string;
35
+ axis?: ChartAxis;
36
+ /** Solid instead of the default dashed line. */
37
+ solid?: boolean;
38
+ }
39
+ /**
40
+ * A vertical marker at one x position: a deploy, an incident, a release.
41
+ * `at` is a point index or one of the x labels.
42
+ */
43
+ export interface ChartMarker {
44
+ at: number | string;
45
+ label?: string;
46
+ color?: string;
47
+ }
48
+ /** The x index a marker points at, or -1 when it names nothing on the axis. */
49
+ export declare const markerIndex: (at: number | string, labels: string[], count: number) => number;
50
+ /**
51
+ * A one-sentence reading of the chart for assistive technology: what is
52
+ * plotted, over how many points, and each series' range and latest value.
53
+ */
54
+ export declare const chartSummary: (series: NormalSeries[], labels: string[], fmt: (s: NormalSeries, v: number) => string, title?: string) => string;
24
55
  export interface NormalSeries {
25
56
  name: string;
26
57
  color: string;
@@ -175,6 +206,6 @@ elbow: number,
175
206
  run: number,
176
207
  /** Minimum vertical gap between two labels on the same side. */
177
208
  spacing: number, height: number) => CalloutLabel[];
178
- /** Compact default tick formatting: 1.2k, 3.4M — never 1200.0000001. */
209
+ /** Compact default tick formatting: 1.2k, 3.4M — never 1200.0000001 or 1000k. */
179
210
  export declare const formatTick: (v: number) => string;
180
211
  export {};
@@ -1,3 +1,21 @@
1
+ const markerIndex = (at, labels, count) => {
2
+ if (typeof at === "number") return Number.isInteger(at) && at >= 0 && at < count ? at : -1;
3
+ return labels.indexOf(at);
4
+ };
5
+ const chartSummary = (series, labels, fmt, title) => {
6
+ const parts = [];
7
+ const span = labels.length ? `${labels.length} points, ${labels[0]} to ${labels[labels.length - 1]}` : "";
8
+ parts.push([title, span].filter(Boolean).join(", "));
9
+ for (const s of series) {
10
+ const values = s.values.filter((v) => v != null);
11
+ if (!values.length) continue;
12
+ const last = values[values.length - 1];
13
+ parts.push(
14
+ `${s.name}: from ${fmt(s, Math.min(...values))} to ${fmt(s, Math.max(...values))}, latest ${fmt(s, last)}`
15
+ );
16
+ }
17
+ return parts.filter(Boolean).join(". ");
18
+ };
1
19
  const plotWidth = (b) => Math.max(0, b.width - b.left - b.right);
2
20
  const plotHeight = (b) => Math.max(0, b.height - b.top - b.bottom);
3
21
  const CHART_PALETTE = [
@@ -278,6 +296,7 @@ const calloutLabels = (angles, cx, cy, radius, elbow, run, spacing, height) => {
278
296
  return side === "right" ? a : -a;
279
297
  };
280
298
  const list = sides[side].sort((p, q) => rank(p.mid) - rank(q.mid));
299
+ if (!list.length) continue;
281
300
  const top = spacing / 2;
282
301
  const bottom = height - spacing / 2;
283
302
  for (let pass = 0; pass < 24; pass++) {
@@ -324,11 +343,25 @@ const calloutLabels = (angles, cx, cy, radius, elbow, run, spacing, height) => {
324
343
  return out;
325
344
  };
326
345
  const formatTick = (v) => {
346
+ if (!Number.isFinite(v)) return String(v);
347
+ const units = [
348
+ [1e3, "k"],
349
+ [1e6, "M"],
350
+ [1e9, "B"],
351
+ [1e12, "T"]
352
+ ];
327
353
  const abs = Math.abs(v);
328
- if (abs >= 1e9) return `${Number((v / 1e9).toFixed(1))}B`;
329
- if (abs >= 1e6) return `${Number((v / 1e6).toFixed(1))}M`;
330
- if (abs >= 1e3) return `${Number((v / 1e3).toFixed(1))}k`;
331
- return String(Number(v.toFixed(2)));
354
+ let i = units.length - 1;
355
+ while (i >= 0 && abs < units[i][0]) i--;
356
+ if (i < 0) {
357
+ const plain = Number(v.toFixed(2));
358
+ return Math.abs(plain) >= 1e3 ? formatTick(Math.sign(v) * 1e3) : String(plain);
359
+ }
360
+ const scaled = Number((v / units[i][0]).toFixed(1));
361
+ if (Math.abs(scaled) >= 1e3 && i < units.length - 1) {
362
+ return `${Number((v / units[i + 1][0]).toFixed(1))}${units[i + 1][1]}`;
363
+ }
364
+ return `${scaled}${units[i][1]}`;
332
365
  };
333
366
  export {
334
367
  CHART_PALETTE,
@@ -337,9 +370,11 @@ export {
337
370
  axisTicks,
338
371
  barPath,
339
372
  calloutLabels,
373
+ chartSummary,
340
374
  extent,
341
375
  formatTick,
342
376
  linePath,
377
+ markerIndex,
343
378
  nearestIndex,
344
379
  niceScale,
345
380
  normalise,
@@ -6,3 +6,9 @@ export interface Token {
6
6
  }
7
7
  /** Tokenize one line into coloured spans. JSON keys get the property colour. */
8
8
  export declare function tokenizeLine(line: string, lang: CodeLang): Token[];
9
+ /**
10
+ * Tokenize a whole snippet, carrying a block comment (`/* … *\/`, `<!-- … -->`)
11
+ * across the lines it spans. `tokenizeLine` alone sees each line in isolation
12
+ * and coloured the middle of a doc comment as code.
13
+ */
14
+ export declare function tokenizeLines(lines: string[], lang: CodeLang): Token[][];