@leavepulse/ui 0.70.0 → 0.71.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 (345) hide show
  1. package/README.md +103 -0
  2. package/dist/assets/{LpCommandPalette-u-zOxKWa.css → LpCommandPalette-DgPZX0us.css} +24 -17
  3. package/dist/assets/{LpPaletteFacts-B9FdVmIO.css → LpPaletteFacts-CVNh5ICn.css} +16 -16
  4. package/dist/assets/{LpPaletteStats-ClE-37MK.css → LpPaletteStats-ZiZmR6vz.css} +5 -5
  5. package/dist/assets/LpRepeater-C1Cw27hj.css +21 -0
  6. package/dist/assets/{LpRollingText-BGnE6q9j.css → LpRollingText-dyOXedGO.css} +7 -0
  7. package/dist/assets/{LpTable-DHxEQ_-3.css → LpTable-DHvorDiU.css} +19 -19
  8. package/dist/assets/LpTabs-CO3EcsNV.css +18 -0
  9. package/dist/chunks/{ContextMenuItems-B5uE8Znw.js → ContextMenuItems-eS7qx9gD.js} +11 -5
  10. package/dist/chunks/{DropzoneLinkField-Bw8Flkhk.js → DropzoneLinkField-DkFhdfEJ.js} +2 -2
  11. package/dist/chunks/{FieldWrapper-BiennROB.js → FieldWrapper-YzbvvC3M.js} +1 -1
  12. package/dist/chunks/{LayoutCanvas-BsJIzhdd.js → LayoutCanvas-Ba4A9QC5.js} +1 -1
  13. package/dist/chunks/{LayoutNode-DJVhkSGk.js → LayoutNode-CTTTLMDM.js} +1 -1
  14. package/dist/chunks/{LpActionBar-CzOFar5t.js → LpActionBar-B7anGlkI.js} +2 -2
  15. package/dist/chunks/{LpAddressInput-CNnLTDZg.js → LpAddressInput-CD0bzrt-.js} +7 -7
  16. package/dist/chunks/{LpAlert-C5igj802.js → LpAlert-BHi7ARqu.js} +1 -1
  17. package/dist/chunks/{LpAppShell-CEUAB8kK.js → LpAppShell-1RmBp6xQ.js} +3 -3
  18. package/dist/chunks/{LpAutocomplete-D92niDHE.js → LpAutocomplete-DDqe2M5g.js} +5 -2
  19. package/dist/chunks/{LpAvatar-CLPl-qOF.js → LpAvatar-DqfKCIdr.js} +1 -1
  20. package/dist/chunks/{LpBadge-HOEPBYmi.js → LpBadge-C8fKEmTF.js} +2 -2
  21. package/dist/chunks/{LpBreadcrumbs-DYoPc3P4.js → LpBreadcrumbs-DhcoStFa.js} +2 -2
  22. package/dist/chunks/{LpButton-CVxBfGjd.js → LpButton-BQDAFXBd.js} +3 -0
  23. package/dist/chunks/{LpCalendar-pVL91-Pl.js → LpCalendar-NmrA47J9.js} +1 -1
  24. package/dist/chunks/{LpCheckbox-DHc2bHDe.js → LpCheckbox-BoOuLnGB.js} +5 -2
  25. package/dist/chunks/{LpCodeBlock-BGsQhxw8.js → LpCodeBlock-Czu-fq1M.js} +2 -2
  26. package/dist/chunks/{LpCodeDisplay-CIKKT2iW.js → LpCodeDisplay-BK2FHbtM.js} +6 -6
  27. package/dist/chunks/{LpColorPicker-DFugXNUi.js → LpColorPicker-Ee1DZiRd.js} +3 -3
  28. package/dist/chunks/LpCommandScope-ubtWDMa0.js +53 -0
  29. package/dist/chunks/{LpConfirmDialog-CfGCux8m.js → LpConfirmDialog-i15pulMT.js} +3 -3
  30. package/dist/chunks/{LpConfirmHost-exB7JmcO.js → LpConfirmHost-D0oGavtd.js} +1 -1
  31. package/dist/chunks/{LpContextMenu-COwOwRgI.js → LpContextMenu-DXpFJjlO.js} +17 -6
  32. package/dist/chunks/{LpCopyButton-DzHjnFs0.js → LpCopyButton-Dmq7DmFw.js} +3 -3
  33. package/dist/chunks/{LpCountdown-Dtq1ihlJ.js → LpCountdown-DTdMF8DL.js} +2 -2
  34. package/dist/chunks/{LpDataList-B-5nHfNw.js → LpDataList-CFPtSsBB.js} +7 -6
  35. package/dist/chunks/{LpDatePicker-BUe1VUC0.js → LpDatePicker-cC9K-Pk8.js} +7 -6
  36. package/dist/chunks/{LpDateRangePicker-C_k65vGR.js → LpDateRangePicker-BVQKPbvo.js} +5 -4
  37. package/dist/chunks/{LpDisclosure-DOarzlAG.js → LpDisclosure-hRnX3FWL.js} +4 -1
  38. package/dist/chunks/{LpDrawer-DGNKRsGq.js → LpDrawer-u4rxnuR-.js} +1 -1
  39. package/dist/chunks/{LpDropdownMenu-CRgrhdAH.js → LpDropdownMenu-BgZ0Z_Im.js} +17 -4
  40. package/dist/chunks/{LpEditable-DTqLt2lT.js → LpEditable-CjxuOVh_.js} +7 -5
  41. package/dist/chunks/{LpEmptyState-KTKipws2.js → LpEmptyState-CKFTtQgJ.js} +1 -1
  42. package/dist/chunks/{LpFieldNotice-CurbNuXI.js → LpFieldNotice-CPI8EwtU.js} +1 -1
  43. package/dist/chunks/{LpFileTree-DMISXVHC.js → LpFileTree-BH0gNlSJ.js} +2 -2
  44. package/dist/chunks/{LpFileTreeNode-CPXB_Yy3.js → LpFileTreeNode-gPVB1oXM.js} +4 -4
  45. package/dist/chunks/{LpFormField-BWwgm1E4.js → LpFormField-gRASfyj2.js} +4 -1
  46. package/dist/chunks/{LpGauge-Bk8TwJj0.js → LpGauge-BdjPGnqw.js} +2 -2
  47. package/dist/chunks/{LpHintLayer-p4hqzdyA.js → LpHintLayer-C2asBIfs.js} +2 -2
  48. package/dist/chunks/{LpHints-CCrhRfy9.js → LpHints-CNZQ76JV.js} +3 -3
  49. package/dist/chunks/{LpIcon-HJP5xMz4.js → LpIcon-DkP-9mzK.js} +1 -1
  50. package/dist/chunks/{LpInfraNode-CUC3t4na.js → LpInfraNode-yTh4-5qa.js} +2 -2
  51. package/dist/chunks/{LpInput-CDuwODJG.js → LpInput-2H-5ILOB.js} +5 -2
  52. package/dist/chunks/{LpLightbox-XJ0LpTcZ.js → LpLightbox-lAt5uIfx.js} +2 -2
  53. package/dist/chunks/{LpLogViewer-elZHbj85.js → LpLogViewer-x78YfhJf.js} +5 -5
  54. package/dist/chunks/{LpMapPicker-BtIl7NOM.js → LpMapPicker-Dp5RSCi9.js} +1 -1
  55. package/dist/chunks/{LpMediaGallery-D5swlmZ_.js → LpMediaGallery-D92oJfY_.js} +3 -3
  56. package/dist/chunks/{LpModal-eBMt2Fqn.js → LpModal-CpH0bNo7.js} +1 -1
  57. package/dist/chunks/{LpModalNav-D4Z0wVHR.js → LpModalNav-BH4ANQGJ.js} +4 -4
  58. package/dist/chunks/{LpNotificationBell-DPZmP5dM.js → LpNotificationBell-BdUQqZhs.js} +8 -8
  59. package/dist/chunks/{LpNumberField-B9k-h2HE.js → LpNumberField-DZY3Z670.js} +4 -1
  60. package/dist/chunks/{LpNumberFlow-Cfyh033Q.js → LpNumberFlow-5khYxsfX.js} +6 -3
  61. package/dist/chunks/{LpPagination-VNCX6pFC.js → LpPagination-DbeACavM.js} +1 -1
  62. package/dist/chunks/LpPaletteTheme-CqWNRwHE.js +104 -0
  63. package/dist/chunks/{LpPasswordInput-DTV18FIh.js → LpPasswordInput-BzAZsf5V.js} +14 -8
  64. package/dist/chunks/{LpPhoneInput-C60tx1tC.js → LpPhoneInput-BMpd-0QR.js} +2 -2
  65. package/dist/chunks/{LpPie-CFuV7pZv.js → LpPie-DdFSTbGE.js} +5 -5
  66. package/dist/chunks/{LpPipeline-D81yh_NX.js → LpPipeline-zjEM1Lwc.js} +4 -4
  67. package/dist/chunks/{LpPopover-BEIcqb9p.js → LpPopover-DmZ3wUtP.js} +6 -5
  68. package/dist/chunks/{LpProgress-CE-m5OpD.js → LpProgress-BX33EKkN.js} +1 -1
  69. package/dist/chunks/{LpQuota-2Sw_gqcJ.js → LpQuota-DqNv1yjs.js} +3 -3
  70. package/dist/chunks/{LpRadioGroup-CGBr5nIp.js → LpRadioGroup-CsXeV9Ct.js} +4 -1
  71. package/dist/chunks/{LpRangeCalendar-c5qj7YcC.js → LpRangeCalendar-l-0nSFmY.js} +1 -1
  72. package/dist/chunks/{LpRangeSlider-Dv6lNvHY.js → LpRangeSlider-CM-0ZITZ.js} +3 -0
  73. package/dist/chunks/{LpRelativeTime-CKzVqAo9.js → LpRelativeTime-UM8EkfrN.js} +2 -2
  74. package/dist/chunks/LpRepeater-OvzByE5L.js +180 -0
  75. package/dist/chunks/{LpRollingText-DB7upf-5.js → LpRollingText-DiL717LK.js} +4 -3
  76. package/dist/chunks/{LpSecretField-DMfdJ1cQ.js → LpSecretField-DwQiPOko.js} +27 -16
  77. package/dist/chunks/{LpSection-BW4xJ-Li.js → LpSection-DcQsieHG.js} +1 -1
  78. package/dist/chunks/{LpSegmented-BO99Sr4m.js → LpSegmented-D2VST0o3.js} +4 -1
  79. package/dist/chunks/{LpSelect-B4f_yRi5.js → LpSelect-DYX2-u5A.js} +43 -18
  80. package/dist/chunks/{LpSidebar-D-M0Y_7U.js → LpSidebar-D44peKq2.js} +3 -3
  81. package/dist/chunks/{LpSidebarNav-DF-TYxOV.js → LpSidebarNav--VwkXO_a.js} +3 -3
  82. package/dist/chunks/{LpSlider-DuoRpOrH.js → LpSlider-DxYoCJJO.js} +3 -0
  83. package/dist/chunks/{LpStat-B2ix1Q7t.js → LpStat-DIsQfbeD.js} +3 -3
  84. package/dist/chunks/{LpStatus-C7kx5PKE.js → LpStatus-BQU1TUsv.js} +2 -2
  85. package/dist/chunks/{LpStepMark-DK-5BKAt.js → LpStepMark-CXa7DJy_.js} +2 -2
  86. package/dist/chunks/{LpStepper-DRFfdJaq.js → LpStepper-C9RM_yTG.js} +1 -1
  87. package/dist/chunks/{LpSwitch-DrzKrZZV.js → LpSwitch-bGZxUDSx.js} +3 -0
  88. package/dist/chunks/{LpTableFilter-DyvHGbOk.js → LpTableFilter-CTZMqFDU.js} +2 -2
  89. package/dist/chunks/{LpTableOfContents-rYvo8z5T.js → LpTableOfContents-CraicEs4.js} +2 -2
  90. package/dist/chunks/{LpTagsInput-DgpBFRV2.js → LpTagsInput-DrjmrOge.js} +8 -5
  91. package/dist/chunks/{LpTextarea-DiWjeVoJ.js → LpTextarea-BbYqmG1S.js} +4 -1
  92. package/dist/chunks/{LpThemeStudio-DguwHdGt.js → LpThemeStudio-B2nPaG-h.js} +18 -14
  93. package/dist/chunks/{LpThemeSwitcher-D5uz0MhK.js → LpThemeSwitcher-C0A5sg_E.js} +6 -4
  94. package/dist/chunks/{LpTimeField-BFQVf_PW.js → LpTimeField-DQ8WvPr2.js} +4 -1
  95. package/dist/chunks/{LpToaster-Wv9ksj4q.js → LpToaster-BTTl_wuy.js} +2 -2
  96. package/dist/chunks/{LpTooltip-Cz8SQwRt.js → LpTooltip-BcBvIx4z.js} +23 -5
  97. package/dist/chunks/{LpTopologyCanvas-ZhKthfgz.js → LpTopologyCanvas-B0wEvAoq.js} +1 -1
  98. package/dist/chunks/{LpTour-NfRJNEIP.js → LpTour-BgCfNlaW.js} +1 -1
  99. package/dist/chunks/{LpTruncate-D_5Pfv5B.js → LpTruncate-TcqfkyJM.js} +2 -2
  100. package/dist/chunks/{LpUptimeBar-DWegV2p6.js → LpUptimeBar-DRadGq4Y.js} +136 -47
  101. package/dist/chunks/{MenuTitle-BjQZX8tQ.js → MenuTitle-Dab3EGOp.js} +1 -1
  102. package/dist/chunks/{OptionContent-CmYUUeWj.js → OptionContent-DPzNsybd.js} +1 -1
  103. package/dist/chunks/PalettePreviewBoundary-B0Hhu3Yw.js +20 -0
  104. package/dist/chunks/{PickerField-CHRS1h7K.js → PickerField-DwLw7j0L.js} +26 -17
  105. package/dist/chunks/{RevealToggle-C-KzaQGJ.js → RevealToggle-BVFM_FAU.js} +3 -3
  106. package/dist/chunks/{TourCard-BXuVHsfn.js → TourCard--2IfgnUU.js} +3 -3
  107. package/dist/chunks/icons-CLu1iR1j.js +43 -0
  108. package/dist/chunks/palette-BiY7yQZL.js +29 -0
  109. package/dist/component-names.d.ts +1 -1
  110. package/dist/components/ContextMenuItems.vue.js +1 -1
  111. package/dist/components/DropzoneLinkField.vue.js +1 -1
  112. package/dist/components/FieldWrapper.vue.js +1 -1
  113. package/dist/components/LayoutCanvas.vue.js +1 -1
  114. package/dist/components/LayoutNode.vue.js +1 -1
  115. package/dist/components/LpActionBar.vue.js +1 -1
  116. package/dist/components/LpAddressInput.vue.d.ts +1 -1
  117. package/dist/components/LpAddressInput.vue.js +1 -1
  118. package/dist/components/LpAlert.vue.d.ts +3 -3
  119. package/dist/components/LpAlert.vue.js +1 -1
  120. package/dist/components/LpAppShell.vue.js +1 -1
  121. package/dist/components/LpAutocomplete.vue.d.ts +7 -1
  122. package/dist/components/LpAutocomplete.vue.js +1 -1
  123. package/dist/components/LpAvatar.vue.js +1 -1
  124. package/dist/components/LpBadge.vue.d.ts +2 -2
  125. package/dist/components/LpBadge.vue.js +1 -1
  126. package/dist/components/LpBreadcrumbs.vue.js +1 -1
  127. package/dist/components/LpButton.vue.d.ts +4 -0
  128. package/dist/components/LpButton.vue.js +1 -1
  129. package/dist/components/LpCalendar.vue.js +1 -1
  130. package/dist/components/LpChart.vue.js +27 -25
  131. package/dist/components/LpCheckbox.vue.d.ts +8 -1
  132. package/dist/components/LpCheckbox.vue.js +1 -1
  133. package/dist/components/LpCodeBlock.vue.js +1 -1
  134. package/dist/components/LpCodeDisplay.vue.js +1 -1
  135. package/dist/components/LpColorPicker.vue.d.ts +2 -2
  136. package/dist/components/LpColorPicker.vue.js +1 -1
  137. package/dist/components/LpCommandPalette.vue.d.ts +43 -7
  138. package/dist/components/LpCommandPalette.vue.js +451 -126
  139. package/dist/components/LpCommandScope.vue.d.ts +28 -0
  140. package/dist/components/LpCommandScope.vue.js +4 -0
  141. package/dist/components/LpConfirmDialog.vue.js +1 -1
  142. package/dist/components/LpConfirmHost.vue.js +1 -1
  143. package/dist/components/LpContextMenu.vue.d.ts +5 -1
  144. package/dist/components/LpContextMenu.vue.js +1 -1
  145. package/dist/components/LpCopyButton.vue.d.ts +1 -1
  146. package/dist/components/LpCopyButton.vue.js +1 -1
  147. package/dist/components/LpCountdown.vue.js +1 -1
  148. package/dist/components/LpDataList.vue.js +1 -1
  149. package/dist/components/LpDatePicker.vue.d.ts +2 -0
  150. package/dist/components/LpDatePicker.vue.js +1 -1
  151. package/dist/components/LpDateRangePicker.vue.d.ts +2 -0
  152. package/dist/components/LpDateRangePicker.vue.js +1 -1
  153. package/dist/components/LpDisclosure.vue.d.ts +4 -0
  154. package/dist/components/LpDisclosure.vue.js +1 -1
  155. package/dist/components/LpDock.vue.js +2 -2
  156. package/dist/components/LpDrawer.vue.js +1 -1
  157. package/dist/components/LpDropdownMenu.vue.d.ts +5 -1
  158. package/dist/components/LpDropdownMenu.vue.js +1 -1
  159. package/dist/components/LpDropzone.vue.js +2 -2
  160. package/dist/components/LpEditable.vue.js +1 -1
  161. package/dist/components/LpEmptyState.vue.js +1 -1
  162. package/dist/components/LpFieldNotice.vue.js +1 -1
  163. package/dist/components/LpFileTree.vue.d.ts +1 -1
  164. package/dist/components/LpFileTree.vue.js +1 -1
  165. package/dist/components/LpFileTreeNode.vue.js +1 -1
  166. package/dist/components/LpFormField.vue.js +1 -1
  167. package/dist/components/LpGauge.vue.js +1 -1
  168. package/dist/components/LpHintLayer.vue.js +1 -1
  169. package/dist/components/LpHints.vue.js +1 -1
  170. package/dist/components/LpIcon.vue.js +1 -1
  171. package/dist/components/LpImageEditor.vue.js +3 -2
  172. package/dist/components/LpInfraNode.vue.js +1 -1
  173. package/dist/components/LpInput.vue.d.ts +6 -0
  174. package/dist/components/LpInput.vue.js +1 -1
  175. package/dist/components/LpLightbox.vue.js +1 -1
  176. package/dist/components/LpLoader.vue.d.ts +1 -1
  177. package/dist/components/LpLogViewer.vue.js +1 -1
  178. package/dist/components/LpMapPicker.vue.js +1 -1
  179. package/dist/components/LpMediaGallery.vue.d.ts +2 -2
  180. package/dist/components/LpMediaGallery.vue.js +1 -1
  181. package/dist/components/LpModal.vue.js +1 -1
  182. package/dist/components/LpModalNav.vue.js +1 -1
  183. package/dist/components/LpNotificationBell.vue.js +1 -1
  184. package/dist/components/LpNumberField.vue.d.ts +6 -0
  185. package/dist/components/LpNumberField.vue.js +1 -1
  186. package/dist/components/LpNumberFlow.vue.js +1 -1
  187. package/dist/components/LpPagination.vue.js +1 -1
  188. package/dist/components/LpPaletteFacts.vue.d.ts +1 -0
  189. package/dist/components/LpPaletteFacts.vue.js +40 -26
  190. package/dist/components/LpPaletteHeader.vue.js +2 -2
  191. package/dist/components/LpPaletteStats.vue.d.ts +1 -0
  192. package/dist/components/LpPaletteStats.vue.js +45 -21
  193. package/dist/components/LpPaletteTheme.vue.d.ts +7 -0
  194. package/dist/components/LpPaletteTheme.vue.js +4 -0
  195. package/dist/components/LpPasswordInput.vue.d.ts +7 -1
  196. package/dist/components/LpPasswordInput.vue.js +1 -1
  197. package/dist/components/LpPhoneInput.vue.js +1 -1
  198. package/dist/components/LpPie.vue.js +1 -1
  199. package/dist/components/LpPipeline.vue.js +1 -1
  200. package/dist/components/LpPopover.vue.js +1 -1
  201. package/dist/components/LpProgress.vue.d.ts +1 -1
  202. package/dist/components/LpProgress.vue.js +1 -1
  203. package/dist/components/LpQuota.vue.js +1 -1
  204. package/dist/components/LpRadioGroup.vue.d.ts +6 -1
  205. package/dist/components/LpRadioGroup.vue.js +1 -1
  206. package/dist/components/LpRangeCalendar.vue.js +1 -1
  207. package/dist/components/LpRangeSlider.vue.d.ts +6 -0
  208. package/dist/components/LpRangeSlider.vue.js +1 -1
  209. package/dist/components/LpRelativeTime.vue.js +1 -1
  210. package/dist/components/LpRepeater.vue.js +1 -1
  211. package/dist/components/LpRollingText.vue.d.ts +2 -0
  212. package/dist/components/LpRollingText.vue.js +1 -1
  213. package/dist/components/LpSecretField.vue.js +1 -1
  214. package/dist/components/LpSection.vue.js +1 -1
  215. package/dist/components/LpSegmented.vue.d.ts +6 -0
  216. package/dist/components/LpSegmented.vue.js +1 -1
  217. package/dist/components/LpSelect.vue.d.ts +3 -0
  218. package/dist/components/LpSelect.vue.js +1 -1
  219. package/dist/components/LpShinyText.vue.d.ts +1 -1
  220. package/dist/components/LpShortcutsDialog.vue.js +1 -1
  221. package/dist/components/LpSidebar.vue.js +1 -1
  222. package/dist/components/LpSidebarNav.vue.js +1 -1
  223. package/dist/components/LpSlider.vue.d.ts +6 -0
  224. package/dist/components/LpSlider.vue.js +1 -1
  225. package/dist/components/LpStat.vue.js +1 -1
  226. package/dist/components/LpStatus.vue.js +1 -1
  227. package/dist/components/LpStepMark.vue.js +1 -1
  228. package/dist/components/LpStepper.vue.js +1 -1
  229. package/dist/components/LpSwitch.vue.d.ts +6 -0
  230. package/dist/components/LpSwitch.vue.js +1 -1
  231. package/dist/components/LpTable.vue.d.ts +6 -0
  232. package/dist/components/LpTable.vue.js +74 -35
  233. package/dist/components/LpTableFilter.vue.js +1 -1
  234. package/dist/components/LpTableOfContents.vue.js +1 -1
  235. package/dist/components/LpTabs.vue.d.ts +1 -1
  236. package/dist/components/LpTabs.vue.js +15 -6
  237. package/dist/components/LpTagsInput.vue.d.ts +6 -0
  238. package/dist/components/LpTagsInput.vue.js +1 -1
  239. package/dist/components/LpTextarea.vue.d.ts +8 -1
  240. package/dist/components/LpTextarea.vue.js +1 -1
  241. package/dist/components/LpThemeStudio.vue.js +1 -1
  242. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  243. package/dist/components/LpTimeField.vue.d.ts +6 -0
  244. package/dist/components/LpTimeField.vue.js +1 -1
  245. package/dist/components/LpToaster.vue.js +1 -1
  246. package/dist/components/LpTooltip.vue.js +1 -1
  247. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  248. package/dist/components/LpTour.vue.js +1 -1
  249. package/dist/components/LpTruncate.vue.js +1 -1
  250. package/dist/components/LpUptimeBar.vue.d.ts +18 -9
  251. package/dist/components/LpUptimeBar.vue.js +1 -1
  252. package/dist/components/MenuTitle.vue.js +1 -1
  253. package/dist/components/OptionContent.vue.js +1 -1
  254. package/dist/components/PalettePreviewBoundary.vue.d.ts +13 -0
  255. package/dist/components/PalettePreviewBoundary.vue.js +4 -0
  256. package/dist/components/PickerField.vue.d.ts +5 -3
  257. package/dist/components/PickerField.vue.js +1 -1
  258. package/dist/components/RevealToggle.vue.js +1 -1
  259. package/dist/components/TourCard.vue.js +1 -1
  260. package/dist/components/commandPalette.d.ts +33 -0
  261. package/dist/components/commandPalette.js +21 -1
  262. package/dist/components/commandSearch.d.ts +5 -0
  263. package/dist/components/commandSearch.js +22 -2
  264. package/dist/components/format.d.ts +7 -0
  265. package/dist/components/format.js +4 -0
  266. package/dist/components/menuWhen.js +1 -1
  267. package/dist/components/uptimeBar.d.ts +45 -0
  268. package/dist/components/uptimeBar.js +51 -0
  269. package/dist/composables/scroll.d.ts +5 -0
  270. package/dist/composables/scroll.js +7 -0
  271. package/dist/composables/useField.d.ts +9 -0
  272. package/dist/composables/useField.js +24 -1
  273. package/dist/composables/useForm.js +13 -4
  274. package/dist/composables/usePaletteCommands.d.ts +61 -0
  275. package/dist/composables/usePaletteCommands.js +220 -0
  276. package/dist/composables/useReveal.js +21 -0
  277. package/dist/composables/useView.js +9 -2
  278. package/dist/icons-all.js +1 -1
  279. package/dist/index.d.ts +14 -1
  280. package/dist/index.js +103 -87
  281. package/dist/theme/palette.d.ts +9 -0
  282. package/dist/theme/studio.d.ts +12 -1
  283. package/package.json +4 -1
  284. package/src/component-names.ts +2 -0
  285. package/src/components/ContextMenuItems.vue +5 -2
  286. package/src/components/LpAutocomplete.vue +6 -1
  287. package/src/components/LpButton.vue +5 -1
  288. package/src/components/LpChart.vue +19 -17
  289. package/src/components/LpCheckbox.vue +7 -2
  290. package/src/components/LpCommandPalette.vue +263 -29
  291. package/src/components/LpCommandScope.vue +35 -0
  292. package/src/components/LpContextMenu.vue +17 -5
  293. package/src/components/LpDataList.vue +2 -2
  294. package/src/components/LpDatePicker.vue +2 -0
  295. package/src/components/LpDateRangePicker.vue +2 -0
  296. package/src/components/LpDisclosure.vue +5 -1
  297. package/src/components/LpDropdownMenu.vue +14 -3
  298. package/src/components/LpEditable.vue +3 -1
  299. package/src/components/LpFormField.vue +3 -0
  300. package/src/components/LpInput.vue +6 -1
  301. package/src/components/LpNumberField.vue +6 -1
  302. package/src/components/LpNumberFlow.vue +12 -2
  303. package/src/components/LpPaletteFacts.vue +11 -6
  304. package/src/components/LpPaletteStats.vue +12 -5
  305. package/src/components/LpPaletteTheme.vue +48 -0
  306. package/src/components/LpPasswordInput.vue +13 -5
  307. package/src/components/LpPopover.vue +4 -0
  308. package/src/components/LpRadioGroup.vue +4 -1
  309. package/src/components/LpRangeSlider.vue +6 -1
  310. package/src/components/LpRepeater.vue +64 -13
  311. package/src/components/LpRollingText.vue +12 -1
  312. package/src/components/LpSecretField.vue +18 -8
  313. package/src/components/LpSegmented.vue +6 -1
  314. package/src/components/LpSelect.vue +44 -10
  315. package/src/components/LpSlider.vue +6 -1
  316. package/src/components/LpSwitch.vue +6 -1
  317. package/src/components/LpTable.vue +35 -2
  318. package/src/components/LpTableOfContents.vue +2 -4
  319. package/src/components/LpTabs.vue +7 -0
  320. package/src/components/LpTagsInput.vue +6 -1
  321. package/src/components/LpTextarea.vue +7 -2
  322. package/src/components/LpThemeStudio.vue +7 -5
  323. package/src/components/LpThemeSwitcher.vue +3 -0
  324. package/src/components/LpTimeField.vue +6 -1
  325. package/src/components/LpTooltip.vue +23 -1
  326. package/src/components/LpUptimeBar.vue +69 -41
  327. package/src/components/PalettePreviewBoundary.vue +5 -0
  328. package/src/components/PickerField.vue +5 -4
  329. package/src/components/commandPalette.ts +22 -1
  330. package/src/components/commandSearch.ts +23 -1
  331. package/src/components/format.ts +10 -0
  332. package/src/components/uptimeBar.ts +98 -0
  333. package/src/composables/scroll.ts +11 -0
  334. package/src/composables/useField.ts +33 -1
  335. package/src/composables/useForm.ts +14 -5
  336. package/src/composables/usePaletteCommands.ts +220 -0
  337. package/src/composables/useReveal.ts +29 -0
  338. package/src/composables/useView.ts +8 -1
  339. package/src/index.ts +18 -1
  340. package/src/kit-icons.ts +1 -1
  341. package/src/theme/palette.ts +26 -0
  342. package/src/theme/studio.ts +15 -8
  343. package/dist/assets/LpTabs-BJ-nrJuI.css +0 -18
  344. package/dist/chunks/LpRepeater-D0VjmD6y.js +0 -140
  345. package/dist/chunks/icons-4IywzkHk.js +0 -43
@@ -0,0 +1,4 @@
1
+ import { _ as _sfc_main } from "../chunks/PalettePreviewBoundary-B0Hhu3Yw.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,4 +1,4 @@
1
- import type { useFieldControl } from "../composables/useField";
1
+ import { type useFieldControl } from "../composables/useField";
2
2
  type __VLS_Props = {
3
3
  field: ReturnType<typeof useFieldControl>["value"];
4
4
  display: string;
@@ -20,14 +20,16 @@ type __VLS_ModelProps = {
20
20
  "open"?: boolean;
21
21
  };
22
22
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
- declare var __VLS_23: {};
23
+ declare var __VLS_25: {};
24
24
  type __VLS_Slots = {} & {
25
- default?: (props: typeof __VLS_23) => any;
25
+ default?: (props: typeof __VLS_25) => any;
26
26
  };
27
27
  declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
+ blur: (event: FocusEvent) => any;
28
29
  clear: () => any;
29
30
  "update:open": (value: boolean | undefined) => any;
30
31
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
32
+ onBlur?: ((event: FocusEvent) => any) | undefined;
31
33
  onClear?: (() => any) | undefined;
32
34
  "onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
33
35
  }>, {
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/PickerField-CHRS1h7K.js";
1
+ import { _ as _sfc_main } from "../chunks/PickerField-DwLw7j0L.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/RevealToggle-C-KzaQGJ.js";
1
+ import { _ as _sfc_main } from "../chunks/RevealToggle-BVFM_FAU.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/TourCard-BXuVHsfn.js";
1
+ import { _ as _sfc_main } from "../chunks/TourCard--2IfgnUU.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,6 +1,11 @@
1
1
  import { type CommandSearchTerms, type HighlightPart, type SearchableCommand } from "./commandSearch";
2
+ import type { Command } from "./LpCommandPalette.vue";
3
+ import type { ContextMenuItemDef } from "./LpContextMenu.vue";
4
+ /** The same action definitions serve a row menu and the command palette. */
5
+ export declare function menuPaletteCommands(items: ContextMenuItemDef[], prefix: string): Command[];
2
6
  /** The fields of a command that decide whether the preview pane opens for it. */
3
7
  export interface PreviewableCommand {
8
+ previewComponent?: unknown;
4
9
  preview?: string;
5
10
  excerpt?: string;
6
11
  noPreview?: boolean;
@@ -14,6 +19,34 @@ export declare function commandHasPreview<T extends PreviewableCommand>(command:
14
19
  slot: boolean;
15
20
  hasPreview?: (command: T) => boolean;
16
21
  }): boolean;
22
+ export declare const PALETTE_MODES: {
23
+ readonly people: {
24
+ readonly prefix: "@";
25
+ readonly label: "People";
26
+ readonly icon: "lucide:users";
27
+ };
28
+ readonly channels: {
29
+ readonly prefix: "#";
30
+ readonly label: "Channels";
31
+ readonly icon: "lucide:hash";
32
+ };
33
+ readonly roles: {
34
+ readonly prefix: "&";
35
+ readonly label: "Roles";
36
+ readonly icon: "lucide:shield";
37
+ };
38
+ readonly commands: {
39
+ readonly prefix: ">";
40
+ readonly label: "Commands";
41
+ readonly icon: "lucide:terminal";
42
+ };
43
+ readonly help: {
44
+ readonly prefix: "?";
45
+ readonly label: "Help";
46
+ readonly icon: "lucide:circle-help";
47
+ };
48
+ };
49
+ export type PaletteMode = keyof typeof PALETTE_MODES;
17
50
  /** One line of LpPaletteFacts: what it is, and what it is set to now. */
18
51
  export interface PaletteFact {
19
52
  /** Text, or the preview slot's `highlight(text)` to mark the query. */
@@ -1,9 +1,27 @@
1
1
  import { parsePaletteQuery, applyQueryFilters } from "./commandSearch.js";
2
+ function menuPaletteCommands(items, prefix) {
3
+ return items.map((item, index) => ({
4
+ id: `${prefix}/${index}`,
5
+ label: item.label,
6
+ icon: item.icon,
7
+ disabled: item.disabled,
8
+ onSelect: item.onSelect,
9
+ keepOpen: item.checked !== void 0,
10
+ children: item.children ? menuPaletteCommands(item.children, `${prefix}/${index}`) : void 0
11
+ }));
12
+ }
2
13
  function commandHasPreview(command, options) {
3
14
  if (!command || command.noPreview) return false;
4
15
  if (options.hasPreview) return options.hasPreview(command);
5
- return options.slot || !!(command.preview || command.excerpt);
16
+ return options.slot || !!(command.previewComponent || command.preview || command.excerpt);
6
17
  }
18
+ const PALETTE_MODES = {
19
+ people: { prefix: "@", label: "People", icon: "lucide:users" },
20
+ channels: { prefix: "#", label: "Channels", icon: "lucide:hash" },
21
+ roles: { prefix: "&", label: "Roles", icon: "lucide:shield" },
22
+ commands: { prefix: ">", label: "Commands", icon: "lucide:terminal" },
23
+ help: { prefix: "?", label: "Help", icon: "lucide:circle-help" }
24
+ };
7
25
  function matchModePrefix(query, commands) {
8
26
  const typed = query.trimStart().toLowerCase();
9
27
  let best = null;
@@ -91,9 +109,11 @@ function modeChipLabel(command) {
91
109
  return command.label.replace(/\s*["'“”«»]?\{query\}["'“”«»]?/g, "").replace(/\s+(for|in|on|:)$/i, "").trim();
92
110
  }
93
111
  export {
112
+ PALETTE_MODES,
94
113
  commandHasPreview,
95
114
  fallbackRows,
96
115
  matchModePrefix,
116
+ menuPaletteCommands,
97
117
  modeChipLabel,
98
118
  pushRecent,
99
119
  readRecent,
@@ -10,6 +10,11 @@ export interface CommandSearchTerms {
10
10
  groups: string[];
11
11
  }
12
12
  export declare function parseCommandQuery(value: string): CommandSearchTerms;
13
+ export declare function swapCommandLayout(value: string): string;
14
+ export declare function searchCommandItems<T extends SearchableCommand>(items: T[], terms: CommandSearchTerms): {
15
+ items: T[];
16
+ terms: string[];
17
+ };
13
18
  export declare function rankCommandItems<T extends SearchableCommand>(items: T[], terms: CommandSearchTerms): T[];
14
19
  /**
15
20
  * A query as a fetcher receives it. `text` is what a remote search should be
@@ -44,9 +44,27 @@ function score(command, terms) {
44
44
  else if (typed && label.startsWith(typed)) total += 2;
45
45
  return total;
46
46
  }
47
- function rankCommandItems(items, terms) {
47
+ function rankExact(items, terms) {
48
48
  return items.map((command) => ({ command, score: score(command, terms) })).filter((entry) => entry.score > 0).sort((a, b) => b.score - a.score || a.command.label.localeCompare(b.command.label)).map((entry) => entry.command);
49
49
  }
50
+ const LATIN_KEYS = "`qwertyuiop[]asdfghjkl;'zxcvbnm,.";
51
+ const CYRILLIC_KEYS = "ёйцукенгшщзхъфывапролджэячсмитьбю";
52
+ const LAYOUT_KEYS = new Map([...LATIN_KEYS].flatMap((key, i) => [[key, CYRILLIC_KEYS[i]], [CYRILLIC_KEYS[i], key]]));
53
+ function swapCommandLayout(value) {
54
+ return [...value].map((char) => {
55
+ const replacement = LAYOUT_KEYS.get(char.toLowerCase());
56
+ return replacement ? char === char.toUpperCase() ? replacement.toUpperCase() : replacement : char;
57
+ }).join("");
58
+ }
59
+ function searchCommandItems(items, terms) {
60
+ const exact = rankExact(items, terms);
61
+ if (exact.length || !terms.include.length) return { items: exact, terms: terms.include };
62
+ const alternate = { include: terms.include.map(swapCommandLayout), exclude: terms.exclude, groups: terms.groups };
63
+ return { items: rankExact(items, alternate), terms: alternate.include };
64
+ }
65
+ function rankCommandItems(items, terms) {
66
+ return searchCommandItems(items, terms).items;
67
+ }
50
68
  function parsePaletteQuery(raw) {
51
69
  const terms = parseCommandQuery(raw);
52
70
  const words = [];
@@ -97,5 +115,7 @@ export {
97
115
  highlightParts,
98
116
  parseCommandQuery,
99
117
  parsePaletteQuery,
100
- rankCommandItems
118
+ rankCommandItems,
119
+ searchCommandItems,
120
+ swapCommandLayout
101
121
  };
@@ -39,3 +39,10 @@ export interface CompactNumberOptions {
39
39
  * "1M"; 999.999 with two places would be "1000", so it becomes "1k".
40
40
  */
41
41
  export declare function compactNumber(value: number, options?: CompactNumberOptions): string;
42
+ /**
43
+ * The character a locale writes between the whole and the fractional part:
44
+ * "." in English, "," in Russian and German. A counter that splits a grouped
45
+ * figure into columns has to find the fraction by this mark, not by ".",
46
+ * because in German "." is the thousands separator.
47
+ */
48
+ export declare function decimalMark(locale?: string): string;
@@ -61,7 +61,11 @@ function compactNumber(value, options = {}) {
61
61
  }).format(scaled);
62
62
  return `${number}${COMPACT_UNITS[i][1]}`;
63
63
  }
64
+ function decimalMark(locale) {
65
+ return numberFormat(locale, {}).formatToParts(1.5).find((p) => p.type === "decimal")?.value ?? ".";
66
+ }
64
67
  export {
65
68
  compactNumber,
69
+ decimalMark,
66
70
  formatBytes
67
71
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, h } from "vue";
2
- import { _ as _sfc_main } from "../chunks/LpContextMenu-COwOwRgI.js";
2
+ import { _ as _sfc_main } from "../chunks/LpContextMenu-DXpFJjlO.js";
3
3
  const MenuWhen = defineComponent({
4
4
  name: "MenuWhen",
5
5
  inheritAttrs: false,
@@ -0,0 +1,45 @@
1
+ export type UptimeStatus = "operational" | "degraded" | "down" | "maintenance" | "empty";
2
+ export type UptimeMoment = Date | string | number;
3
+ /** Something that happened inside a slice: a restart, a deploy, an alert. */
4
+ export interface UptimeEvent {
5
+ text: string;
6
+ at?: UptimeMoment;
7
+ status?: UptimeStatus;
8
+ }
9
+ export interface UptimeSegment {
10
+ /** Health of this slice. `empty` renders a faded placeholder (no data). */
11
+ status: UptimeStatus;
12
+ /** Optional rich tooltip body; falls back to a humanised status. */
13
+ label?: string;
14
+ /** When the slice begins and ends. Shown in the tooltip, and weights the uptime figure. */
15
+ start?: UptimeMoment;
16
+ end?: UptimeMoment;
17
+ /**
18
+ * Time spent in each state inside the slice, in ms. With it the figure
19
+ * counts real time rather than slices (one bad minute in a day no longer
20
+ * costs the whole day), and the tooltip says how long each state lasted.
21
+ */
22
+ durations?: Partial<Record<Exclude<UptimeStatus, "empty">, number>>;
23
+ /** What happened in the slice, a line each in the tooltip. */
24
+ events?: UptimeEvent[];
25
+ }
26
+ /** Worst first: the order a tooltip lists the time a slice spent in each state. */
27
+ export declare const UPTIME_SEVERITY: readonly Exclude<UptimeStatus, "empty">[];
28
+ /**
29
+ * Percent of the tracked time that was up (operational or planned
30
+ * maintenance). Slices with `durations` count their real minutes; the rest
31
+ * count by their span when every one of them has a span, and as one slice
32
+ * each otherwise. Empty slices are not tracked. Null when nothing is.
33
+ */
34
+ export declare function uptimeShare(segments: readonly UptimeSegment[]): number | null;
35
+ /**
36
+ * The figure and its decimal places: trailing zeros trimmed (100, 99.9), and
37
+ * never rounded up to 100 while some time was down — 99.999 prints as 99.99,
38
+ * because "100%" over an outage reads as no outage at all.
39
+ */
40
+ export declare function uptimeFigure(pct: number): {
41
+ value: number;
42
+ decimals: number;
43
+ };
44
+ /** "26 Oct, 12:00 – 12:15", the date written once when both ends share a day. */
45
+ export declare function uptimeRange(start: UptimeMoment, end: UptimeMoment | undefined, locale?: string): string;
@@ -0,0 +1,51 @@
1
+ import { toEpoch } from "./timeSpan.js";
2
+ const UP = /* @__PURE__ */ new Set(["operational", "maintenance"]);
3
+ const UPTIME_SEVERITY = ["down", "degraded", "maintenance", "operational"];
4
+ function span(seg) {
5
+ if (seg.start === void 0 || seg.end === void 0) return null;
6
+ const ms = toEpoch(seg.end) - toEpoch(seg.start);
7
+ return Number.isFinite(ms) && ms > 0 ? ms : null;
8
+ }
9
+ function uptimeShare(segments) {
10
+ const tracked = segments.filter((s) => s.status !== "empty");
11
+ const bySpan = tracked.every((s) => s.durations || span(s) !== null);
12
+ let up = 0;
13
+ let total = 0;
14
+ for (const seg of tracked) {
15
+ if (seg.durations) {
16
+ for (const [status, ms] of Object.entries(seg.durations)) {
17
+ if (!ms || ms < 0) continue;
18
+ total += ms;
19
+ if (UP.has(status)) up += ms;
20
+ }
21
+ continue;
22
+ }
23
+ const weight = bySpan ? span(seg) ?? 0 : 1;
24
+ total += weight;
25
+ if (UP.has(seg.status)) up += weight;
26
+ }
27
+ return total > 0 ? up / total * 100 : null;
28
+ }
29
+ function uptimeFigure(pct) {
30
+ let value = Number(pct.toFixed(2));
31
+ if (pct < 100 && value >= 100) value = 99.99;
32
+ const decimals = Number.isInteger(value) ? 0 : String(value).split(".")[1].length;
33
+ return { value, decimals };
34
+ }
35
+ function uptimeRange(start, end, locale) {
36
+ const from = toEpoch(start);
37
+ if (!Number.isFinite(from)) return "";
38
+ const full = new Intl.DateTimeFormat(locale, { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" });
39
+ if (end === void 0) return full.format(from);
40
+ const to = toEpoch(end);
41
+ if (!Number.isFinite(to)) return full.format(from);
42
+ const sameDay = new Date(from).toDateString() === new Date(to).toDateString();
43
+ const tail = sameDay ? new Intl.DateTimeFormat(locale, { hour: "2-digit", minute: "2-digit" }) : full;
44
+ return `${full.format(from)} – ${tail.format(to)}`;
45
+ }
46
+ export {
47
+ UPTIME_SEVERITY,
48
+ uptimeFigure,
49
+ uptimeRange,
50
+ uptimeShare
51
+ };
@@ -6,6 +6,11 @@ export interface ScrollParentOptions {
6
6
  }
7
7
  /** The nearest ancestor that scrolls along `axis` and has something to scroll, or null. */
8
8
  export declare function scrollParent(el: Element | null | undefined, { axis, self }?: ScrollParentOptions): HTMLElement | null;
9
+ /**
10
+ * Whether `el`'s scroller (or the page) has no more room to scroll down.
11
+ * `slack` absorbs the pixel a rounded-up scrollHeight can sit above the sum.
12
+ */
13
+ export declare function atScrollEnd(el: Element | null | undefined, slack?: number): boolean;
9
14
  export interface ScrollToElementOptions {
10
15
  /** `nearest` scrolls only when the element is out of view. */
11
16
  block?: "nearest" | "center" | "start";
@@ -9,6 +9,12 @@ function scrollParent(el, { axis = "y", self = false } = {}) {
9
9
  }
10
10
  return null;
11
11
  }
12
+ function atScrollEnd(el, slack = 2) {
13
+ if (!el) return false;
14
+ const box = scrollParent(el) ?? el.ownerDocument.scrollingElement;
15
+ if (!box) return true;
16
+ return box.scrollTop + box.clientHeight >= box.scrollHeight - slack;
17
+ }
12
18
  function scrollToElement(el, { block = "nearest", behavior = "auto", margin = 0 } = {}) {
13
19
  if (!el) return;
14
20
  const doc = el.ownerDocument;
@@ -26,6 +32,7 @@ function scrollToElement(el, { block = "nearest", behavior = "auto", margin = 0
26
32
  if (target !== box.scrollTop) box.scrollTo({ top: target, behavior });
27
33
  }
28
34
  export {
35
+ atScrollEnd,
29
36
  scrollParent,
30
37
  scrollToElement
31
38
  };
@@ -2,6 +2,10 @@ import { type ComputedRef, type InjectionKey } from "vue";
2
2
  import type { FieldNoticeOptions } from "./useFieldNotice";
3
3
  export interface FieldContext {
4
4
  id: string;
5
+ /** Human-readable name shared by controls and contextual commands. */
6
+ label?: string;
7
+ hint?: string;
8
+ error?: string;
5
9
  /** Id of the visible label, for controls a `<label for>` cannot name (groups). */
6
10
  labelId?: string;
7
11
  describedBy?: string;
@@ -44,3 +48,8 @@ export declare function useFieldControl(own: () => FieldControlState): ComputedR
44
48
  * `useForm().field()` could not mark such a field touched.
45
49
  */
46
50
  export declare function focusLeft(event: FocusEvent): boolean;
51
+ /** Trigger and portalled content share a boundary for the control's public blur. */
52
+ export declare function useFieldBlur(blur: (event: FocusEvent) => void): {
53
+ partId: string;
54
+ onFocusOut: (event: FocusEvent) => void;
55
+ };
@@ -1,4 +1,4 @@
1
- import { useId, computed, provide, inject } from "vue";
1
+ import { useId, computed, provide, onScopeDispose, inject } from "vue";
2
2
  const LP_FIELD = /* @__PURE__ */ Symbol.for("lp-field");
3
3
  function provideField(context) {
4
4
  provide(LP_FIELD, context);
@@ -29,6 +29,9 @@ function useFieldControl(own) {
29
29
  return {
30
30
  id: state.id ?? field?.id,
31
31
  labelId: field?.labelId,
32
+ label: field?.label,
33
+ hint: field?.hint,
34
+ error: field?.error,
32
35
  describedBy: field?.describedBy,
33
36
  invalid: !!state.invalid || !!field?.invalid,
34
37
  required: !!state.required || !!field?.required,
@@ -40,11 +43,31 @@ function focusLeft(event) {
40
43
  const next = event.relatedTarget;
41
44
  return !(next instanceof Node && event.currentTarget?.contains(next));
42
45
  }
46
+ function useFieldBlur(blur) {
47
+ const partId = `lp-field-${useId()}`;
48
+ let cancelPending;
49
+ const inside = (target) => !!target?.closest?.(`[data-lp-field-part="${partId}"]`);
50
+ function onFocusOut(event) {
51
+ cancelPending?.();
52
+ if (inside(event.relatedTarget)) return;
53
+ if (event.relatedTarget) return blur(event);
54
+ const doc = event.target.ownerDocument;
55
+ const view = doc.defaultView;
56
+ const frame = view.requestAnimationFrame(() => {
57
+ cancelPending = void 0;
58
+ if (!inside(doc.activeElement)) blur(event);
59
+ });
60
+ cancelPending = () => view.cancelAnimationFrame(frame);
61
+ }
62
+ onScopeDispose(() => cancelPending?.());
63
+ return { partId, onFocusOut };
64
+ }
43
65
  export {
44
66
  LP_FIELD,
45
67
  fieldMessageId,
46
68
  focusLeft,
47
69
  provideField,
48
70
  useField,
71
+ useFieldBlur,
49
72
  useFieldControl
50
73
  };
@@ -30,6 +30,7 @@ function useForm(options) {
30
30
  const submitting = ref(false);
31
31
  const submitCount = ref(0);
32
32
  const runs = /* @__PURE__ */ new Map();
33
+ let validationEpoch = 0;
33
34
  const fromForm = /* @__PURE__ */ new Map();
34
35
  const baseVersion = ref(0);
35
36
  const keys = () => Object.keys(plain());
@@ -51,7 +52,7 @@ function useForm(options) {
51
52
  return void 0;
52
53
  }
53
54
  async function runField(name) {
54
- const run = (runs.get(name) ?? 0) + 1;
55
+ const run = /* @__PURE__ */ Symbol();
55
56
  runs.set(name, run);
56
57
  const found = await checkField(name);
57
58
  if (runs.get(name) !== run) return !errors[name];
@@ -61,7 +62,7 @@ function useForm(options) {
61
62
  }
62
63
  async function runForm() {
63
64
  if (!options.validate) return true;
64
- const run = (runs.get("form") ?? 0) + 1;
65
+ const run = /* @__PURE__ */ Symbol();
65
66
  runs.set("form", run);
66
67
  const found = await options.validate(plain()) ?? {};
67
68
  if (runs.get("form") !== run) return true;
@@ -78,12 +79,17 @@ function useForm(options) {
78
79
  return ok;
79
80
  }
80
81
  async function validate(name) {
82
+ const epoch = validationEpoch;
81
83
  validating.value = true;
82
84
  try {
83
- if (name !== void 0) return await runField(name);
85
+ if (name !== void 0) {
86
+ const valid2 = await runField(name);
87
+ return epoch === validationEpoch && valid2;
88
+ }
84
89
  const fields = await Promise.all(keys().map(runField));
90
+ if (epoch !== validationEpoch) return false;
85
91
  const form = await runForm();
86
- return fields.every(Boolean) && form && !Object.values(external).some(Boolean);
92
+ return epoch === validationEpoch && fields.every(Boolean) && form && !Object.values(external).some(Boolean);
87
93
  } finally {
88
94
  validating.value = false;
89
95
  }
@@ -99,6 +105,7 @@ function useForm(options) {
99
105
  for (const [k, v] of Object.entries(next)) set(k, v);
100
106
  }
101
107
  function clearState() {
108
+ validationEpoch++;
102
109
  for (const k of Object.keys(errors)) delete errors[k];
103
110
  for (const k of Object.keys(external)) delete external[k];
104
111
  for (const k of Object.keys(touched)) delete touched[k];
@@ -131,7 +138,9 @@ function useForm(options) {
131
138
  { deep: true }
132
139
  );
133
140
  async function recheck(names) {
141
+ const epoch = validationEpoch;
134
142
  await Promise.all(names.map((name) => validate(name)));
143
+ if (epoch !== validationEpoch) return;
135
144
  if (fromForm.size || submitCount.value) await runForm();
136
145
  }
137
146
  let snapshot = clone(plain());
@@ -0,0 +1,61 @@
1
+ import { type Directive, type MaybeRefOrGetter } from "vue";
2
+ import type { Command } from "../components/LpCommandPalette.vue";
3
+ export interface PaletteRegistration {
4
+ commands: () => readonly Command[];
5
+ priority: number;
6
+ /** Discovered from a component rather than written by the app: an id clash numbers it instead of hiding it. */
7
+ automatic?: boolean;
8
+ }
9
+ /** One registry per application/provider; never shared between SSR requests. */
10
+ export declare function createPaletteRegistry(): {
11
+ commands: import("vue").ComputedRef<Command[]>;
12
+ register(entry: PaletteRegistration): () => void;
13
+ };
14
+ export type PaletteRegistry = ReturnType<typeof createPaletteRegistry>;
15
+ export interface PaletteScope {
16
+ registry: PaletteRegistry;
17
+ id: string;
18
+ label: string;
19
+ depth: number;
20
+ enabled: boolean;
21
+ discover: boolean;
22
+ }
23
+ export declare function bindPaletteScopeElement(element: Element, scope: PaletteScope): void;
24
+ export declare const usePaletteScope: () => PaletteScope | null;
25
+ export declare const providePaletteScope: (scope: PaletteScope) => void;
26
+ /** Preview controls and compound controls must not discover their own implementation. */
27
+ export declare function suppressPaletteDiscovery(): void;
28
+ export declare function usePaletteCommands(commands: MaybeRefOrGetter<readonly Command[]>, options?: {
29
+ automatic?: boolean;
30
+ scope?: PaletteScope;
31
+ }): void;
32
+ /** Manual definitions override a discovered command without changing its place. */
33
+ export declare function mergePaletteCommands(discovered: readonly Command[], manual: readonly Command[]): Command[];
34
+ export type PaletteControlOptions = false | {
35
+ id?: string;
36
+ label?: string;
37
+ description?: string;
38
+ keywords?: string[];
39
+ };
40
+ export interface PaletteTargetOptions {
41
+ id: string;
42
+ label: string;
43
+ description?: string;
44
+ keywords?: string[];
45
+ action?: "click" | "focus";
46
+ }
47
+ /** Native/custom markup opt-in; editing values still goes through the component's own binding. */
48
+ export declare const vPalette: Directive<HTMLElement, PaletteTargetOptions>;
49
+ export declare function usePaletteAction(options: {
50
+ label?: () => string | undefined;
51
+ element: () => HTMLElement | null | undefined;
52
+ disabled?: () => boolean;
53
+ }): void;
54
+ export declare function usePaletteControl(options?: {
55
+ label?: () => string | undefined;
56
+ disabled?: () => boolean;
57
+ invalid?: () => boolean;
58
+ available?: () => boolean;
59
+ ownsChildren?: boolean;
60
+ editorProps?: () => Record<string, unknown>;
61
+ }): void;