@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
@@ -1,9 +1,13 @@
1
- import { defineComponent, ref, useId, computed, shallowRef, watch, useSlots, onBeforeUnmount, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, normalizeClass, withModifiers, createTextVNode, toDisplayString, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, Transition, renderSlot } from "vue";
1
+ import { defineComponent, computed, h, shallowRef, ref, watch, useId, useSlots, onBeforeUnmount, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, normalizeClass, withModifiers, createTextVNode, toDisplayString, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, vShow, Transition, renderSlot } from "vue";
2
2
  import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
3
- import { _ as _sfc_main$4 } from "../chunks/LpAvatar-CLPl-qOF.js";
4
- import { _ as _sfc_main$1 } from "../chunks/LpIcon-HJP5xMz4.js";
3
+ import { usePaletteScope, suppressPaletteDiscovery, mergePaletteCommands } from "../composables/usePaletteCommands.js";
4
+ import { useToast } from "../composables/useToast.js";
5
+ import { _ as _sfc_main$3 } from "../chunks/LpButton-BQDAFXBd.js";
6
+ import { _ as _sfc_main$6 } from "../chunks/PalettePreviewBoundary-B0Hhu3Yw.js";
7
+ import { _ as _sfc_main$5 } from "../chunks/LpAvatar-DqfKCIdr.js";
8
+ import { _ as _sfc_main$1 } from "../chunks/LpIcon-DkP-9mzK.js";
5
9
  import { _ as _sfc_main$2 } from "../chunks/LpLoader-DjJEX8hL.js";
6
- import { _ as _sfc_main$3 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
10
+ import { _ as _sfc_main$4 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
7
11
  import MenuShortcut from "./MenuShortcut.vue.js";
8
12
  import { staggerDelay } from "./reveal.js";
9
13
  import { usePersisted } from "../composables/usePersisted.js";
@@ -15,65 +19,85 @@ import { hints } from "../composables/useHints.js";
15
19
  import { runningHintSystem, HINT_SIGNALS } from "../composables/useHintSystem.js";
16
20
  import { useModalLayer } from "./modalDepth.js";
17
21
  import { useLabels } from "../composables/useLpConfig.js";
18
- import { parseCommandQuery, rankCommandItems, applyQueryFilters, parsePaletteQuery, highlightParts } from "./commandSearch.js";
19
- import { fallbackRows, readRecent, resolveRecentItems, recentVisible, commandHasPreview, matchModePrefix, modeChipLabel, toRecentItem, pushRecent } from "./commandPalette.js";
22
+ import { parseCommandQuery, searchCommandItems, applyQueryFilters, parsePaletteQuery, highlightParts } from "./commandSearch.js";
23
+ import { PALETTE_MODES, fallbackRows, readRecent, resolveRecentItems, recentVisible, commandHasPreview, matchModePrefix, modeChipLabel, pushRecent, toRecentItem } from "./commandPalette.js";
20
24
  import { usePortalTarget, useOutsideGuard } from "../composables/useView.js";
21
25
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
22
- import '../assets/LpCommandPalette-u-zOxKWa.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
26
+ import '../assets/LpCommandPalette-DgPZX0us.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
23
27
  const _hoisted_2 = ["title", "onClick"];
24
- const _hoisted_3 = ["aria-activedescendant", "placeholder", "onKeydown"];
28
+ const _hoisted_3 = ["readonly", "aria-activedescendant", "placeholder", "onKeydown"];
25
29
  const _hoisted_4 = { class: "shrink-0 rounded-small border border-line px-1.5 py-0.5 text-[10px] text-muted" };
26
30
  const _hoisted_5 = {
27
31
  key: 0,
28
- class: "px-2 py-10 text-center text-sm text-muted"
32
+ class: "flex flex-col gap-3 p-4"
33
+ };
34
+ const _hoisted_6 = { class: "text-sm font-semibold" };
35
+ const _hoisted_7 = {
36
+ key: 0,
37
+ role: "alert",
38
+ class: "text-sm text-danger"
39
+ };
40
+ const _hoisted_8 = { class: "flex gap-2" };
41
+ const _hoisted_9 = {
42
+ key: 1,
43
+ role: "alert",
44
+ class: "px-4 py-2 text-sm text-danger"
29
45
  };
30
- const _hoisted_6 = ["aria-labelledby"];
31
- const _hoisted_7 = ["id"];
32
- const _hoisted_8 = { class: "min-w-0 flex-1" };
33
- const _hoisted_9 = { class: "block truncate font-medium" };
34
46
  const _hoisted_10 = {
47
+ key: 2,
48
+ class: "flex items-center justify-end gap-2 border-b border-line px-3 py-1"
49
+ };
50
+ const _hoisted_11 = {
51
+ key: 0,
52
+ class: "px-2 py-10 text-center text-sm text-muted"
53
+ };
54
+ const _hoisted_12 = ["aria-labelledby"];
55
+ const _hoisted_13 = ["id"];
56
+ const _hoisted_14 = { class: "min-w-0 flex-1" };
57
+ const _hoisted_15 = { class: "block truncate font-medium" };
58
+ const _hoisted_16 = {
35
59
  key: 0,
36
60
  class: "rounded-xs bg-brand/25 text-ink"
37
61
  };
38
- const _hoisted_11 = {
62
+ const _hoisted_17 = {
39
63
  key: 0,
40
64
  class: "mt-0.5 block truncate text-xs text-muted"
41
65
  };
42
- const _hoisted_12 = {
66
+ const _hoisted_18 = {
43
67
  key: 0,
44
68
  class: "rounded-xs bg-brand/20 text-ink"
45
69
  };
46
- const _hoisted_13 = {
70
+ const _hoisted_19 = {
47
71
  key: 0,
48
72
  class: "rounded-xs bg-brand/20 text-ink"
49
73
  };
50
- const _hoisted_14 = {
74
+ const _hoisted_20 = {
51
75
  key: 3,
52
76
  class: "shrink-0 rounded-small border border-line px-1.5 font-mono text-[11px] whitespace-pre text-muted"
53
77
  };
54
- const _hoisted_15 = {
55
- key: 0,
56
- class: "lp-cmd-pane hidden min-h-0 shrink-0 flex-col border-l border-line md:flex"
57
- };
58
- const _hoisted_16 = { class: "lp-cmd-para flex items-center gap-2 text-ink" };
59
- const _hoisted_17 = { class: "min-w-0 text-base font-semibold" };
60
- const _hoisted_18 = {
78
+ const _hoisted_21 = { class: "lp-cmd-para flex items-center gap-2 text-ink" };
79
+ const _hoisted_22 = { class: "min-w-0 text-base font-semibold" };
80
+ const _hoisted_23 = {
61
81
  key: 0,
62
82
  class: "lp-cmd-para mt-0.5 text-xs text-muted"
63
83
  };
64
- const _hoisted_19 = {
84
+ const _hoisted_24 = {
65
85
  key: 0,
66
86
  class: "rounded-xs bg-brand/25 text-ink"
67
87
  };
68
- const _hoisted_20 = { class: "flex shrink-0 items-center gap-4 border-t border-line px-4 py-2.5 text-[11px] text-muted [@media(hover:none)_and_(pointer:coarse)]:hidden" };
69
- const _hoisted_21 = { class: "flex items-center gap-1" };
70
- const _hoisted_22 = { class: "flex items-center gap-1" };
71
- const _hoisted_23 = {
88
+ const _hoisted_25 = {
89
+ key: 1,
90
+ class: "mt-4 flex flex-wrap gap-2 border-t border-line pt-3"
91
+ };
92
+ const _hoisted_26 = { class: "flex shrink-0 items-center gap-4 border-t border-line px-4 py-2.5 text-[11px] text-muted [@media(hover:none)_and_(pointer:coarse)]:hidden" };
93
+ const _hoisted_27 = { class: "flex items-center gap-1" };
94
+ const _hoisted_28 = { class: "flex items-center gap-1" };
95
+ const _hoisted_29 = {
72
96
  key: 1,
73
97
  class: "flex items-center gap-1"
74
98
  };
75
- const _hoisted_24 = { class: "ml-auto flex items-center gap-1" };
76
- const _hoisted_25 = { class: "rounded-small border border-line px-1 text-[10px]" };
99
+ const _hoisted_30 = { class: "ml-auto flex items-center gap-1" };
100
+ const _hoisted_31 = { class: "rounded-small border border-line px-1 text-[10px]" };
77
101
  const PALETTE_ACTIONS_AFTER = 3;
78
102
  const RECENT_KEEP = 20;
79
103
  const PANE_LINGER_MS = 160;
@@ -81,7 +105,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
81
105
  __name: "LpCommandPalette",
82
106
  props: {
83
107
  open: { type: Boolean },
84
- commands: {},
108
+ commands: { default: () => [] },
109
+ context: { type: Boolean, default: true },
110
+ modes: {},
111
+ pinned: {},
112
+ pinnedKey: {},
113
+ pinnedLabel: {},
85
114
  placeholder: { default: "Type a command or search…" },
86
115
  emptyText: { default: "No results" },
87
116
  hotkey: { type: Boolean, default: true },
@@ -101,14 +130,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
101
130
  hasPreview: {},
102
131
  glass: { type: Boolean, default: void 0 }
103
132
  },
104
- emits: ["update:open", "select", "run", "remember"],
133
+ emits: ["update:open", "select", "update:pinned", "run", "remember"],
105
134
  setup(__props, { emit: __emit }) {
106
135
  const props = __props;
136
+ const paletteScope = usePaletteScope();
137
+ suppressPaletteDiscovery();
138
+ const baseCommands = computed(() => mergePaletteCommands(props.context ? paletteScope?.registry.commands.value ?? [] : [], props.commands));
139
+ const rootCommands = computed(() => mergePaletteCommands([
140
+ ...baseCommands.value,
141
+ ...Object.entries(PALETTE_MODES).flatMap(([key, definition]) => {
142
+ const name = key;
143
+ const children = props.modes?.[name] ?? (name === "commands" ? baseCommands.value.filter((c) => !c.href && !c.children && !c.editInPreview) : name === "help" ? [{ id: "palette/help/keys", label: "Keyboard navigation", editInPreview: true, previewComponent: { render: () => h("p", { class: "whitespace-pre-line text-sm leading-relaxed" }, "↑ ↓ Navigate results\nEnter Run or edit\nTab Result actions\nAlt+P Pin a result\nEscape Back or close") } }] : void 0);
144
+ return children ? [{ id: `palette/mode/${name}`, ...definition, label: text.value[name], children, group: text.value.search, remember: false }] : [];
145
+ })
146
+ ], []));
147
+ const toast = useToast();
148
+ const editing = shallowRef();
149
+ let stopEditorFocus;
150
+ const promptCommand = shallowRef();
151
+ const promptValue = ref("");
152
+ const promptError = ref("");
153
+ const promptValidation = useAsyncTask();
154
+ const validating = promptValidation.pending;
155
+ watch(promptCommand, () => promptValidation.cancel(), { flush: "sync" });
156
+ const executing = ref(false);
157
+ const actionError = ref("");
158
+ let executionEpoch = 0;
159
+ let afterClose;
160
+ const inputQuery = computed({ get: () => promptCommand.value ? promptValue.value : query.value, set: (value) => {
161
+ if (promptCommand.value) {
162
+ promptValidation.cancel();
163
+ promptValue.value = value;
164
+ promptError.value = "";
165
+ } else query.value = value;
166
+ } });
107
167
  const frosted = useGlass(() => props.glass);
108
168
  const contentRef = ref(null);
109
169
  const { claim, release, layer } = useModalLayer({ element: () => contentRef.value?.$el });
110
170
  const DEFAULT_LABELS = {
171
+ ...Object.fromEntries(Object.entries(PALETTE_MODES).map(([key, mode2]) => [key, mode2.label])),
172
+ search: "Search",
173
+ pinned: "Pinned",
111
174
  navigate: "navigate",
175
+ pin: "Pin",
176
+ unpin: "Unpin",
177
+ undo: "Undo",
178
+ backToResults: "Back to results",
179
+ actionFailed: "The action could not be completed.",
180
+ submit: "Submit",
181
+ running: "Running…",
112
182
  select: "select",
113
183
  close: "close",
114
184
  back: "back",
@@ -127,6 +197,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
127
197
  tab: "tab"
128
198
  };
129
199
  const text = useLabels("palette", DEFAULT_LABELS, () => props.labels);
200
+ const pinnedHeading = computed(() => props.pinnedLabel ?? text.value.pinned);
130
201
  const emit = __emit;
131
202
  const query = ref("");
132
203
  const listId = `lp-cmd-${useId()}`;
@@ -167,23 +238,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
238
  }
168
239
  const selectedActions = computed(() => actionsOf(flat.value[selectedIndex.value]));
169
240
  function onTab(event) {
241
+ if (promptCommand.value) return;
170
242
  if (event.shiftKey) return;
171
243
  const c = flat.value[selectedIndex.value];
172
244
  const actions = selectedActions.value;
173
245
  if (!c || !actions.length) return;
174
246
  event.preventDefault();
175
247
  event.stopPropagation();
248
+ openActions(c);
249
+ }
250
+ function openActions(c) {
251
+ const actions = actionsOf(c);
252
+ if (!actions.length) return;
176
253
  const actionsMode = { id: `${c.id}:actions`, label: c.label, icon: c.icon, children: actions };
177
254
  syntheticModes.add(actionsMode);
178
255
  hints.use(HINT_SIGNALS.paletteActions);
179
256
  enter(actionsMode);
257
+ inputRef.value?.focus();
180
258
  }
181
259
  const showActionsKey = computed(() => {
182
260
  const system = runningHintSystem();
183
261
  return !!system?.state.loaded && system.count(HINT_SIGNALS.palette) >= PALETTE_ACTIONS_AFTER && system.count(HINT_SIGNALS.paletteActions) === 0;
184
262
  });
185
263
  watch(
186
- () => props.commands,
264
+ () => rootCommands.value,
187
265
  (commands) => {
188
266
  if (!trail.value.length) return;
189
267
  let level = commands;
@@ -262,13 +340,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
262
340
  }
263
341
  });
264
342
  }
265
- const source = computed(() => mode.value ? modeItems.value : props.commands);
343
+ const source = computed(() => mode.value ? modeItems.value : rootCommands.value);
266
344
  const local = computed(() => {
267
345
  const terms = parseCommandQuery(query.value);
268
346
  const filtered = query.value.trim() ? source.value.filter((c) => !c.fallback) : source.value.filter((c) => !c.hidden && !c.fallback);
269
347
  if (!terms.include.length && !terms.exclude.length && !terms.groups.length) return { items: filtered, terms: [] };
270
- const items = rankCommandItems(filtered, terms);
271
- return { items, terms: terms.include };
348
+ return searchCommandItems(filtered, terms);
272
349
  });
273
350
  const ranked = computed(() => local.value.items);
274
351
  const fetched = computed(() => {
@@ -309,7 +386,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
309
386
  if (mode.value || !recentList.value.length) return [];
310
387
  const terms = parseCommandQuery(query.value);
311
388
  if (terms.include.length) return [];
312
- const found2 = resolveRecentItems(recentList.value, props.commands, {
389
+ const found2 = resolveRecentItems(recentList.value, rootCommands.value, {
313
390
  limit: Number.POSITIVE_INFINITY,
314
391
  resolve: props.resolveRecent,
315
392
  fromEntry
@@ -323,6 +400,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
323
400
  }
324
401
  return out;
325
402
  });
403
+ const storedPinned = usePersisted(() => props.pinnedKey ?? (props.recentKey ? `${props.recentKey}:pinned` : void 0), []);
404
+ const pinList = computed(() => props.pinned ?? readRecent(storedPinned.value));
405
+ const pinResolved = computed(() => resolveRecentItems(pinList.value, rootCommands.value, { limit: Infinity, resolve: props.resolveRecent, fromEntry }));
406
+ const pinnedItems = computed(() => {
407
+ if (mode.value || parseCommandQuery(query.value).include.length) return [];
408
+ return pinResolved.value.filter(({ command }) => recentVisible(command, parseCommandQuery(query.value), pinnedHeading.value)).map(({ command, path }) => {
409
+ recentPath.set(command, path);
410
+ return command;
411
+ });
412
+ });
413
+ function isPinned(command) {
414
+ const path = recentPath.get(command) ?? trail.value.map((step) => step.id);
415
+ return pinList.value.some((item) => typeof item === "string" ? !path.length && item === command.id : item.id === command.id && item.path.join("\0") === path.join("\0"));
416
+ }
417
+ function togglePin(command) {
418
+ if (!command || moreOf.has(command) || command.children || trail.value.some((step) => syntheticModes.has(step))) return;
419
+ const path = recentPath.get(command) ?? trail.value.map((step) => step.id);
420
+ const next = isPinned(command) ? pinList.value.filter((item) => typeof item === "string" ? item !== command.id : item.id !== command.id || item.path.join("\0") !== path.join("\0")) : pushRecent(pinList.value, toRecentItem(command, path), Infinity);
421
+ if (props.pinned === void 0) storedPinned.value = next;
422
+ emit("update:pinned", next);
423
+ }
326
424
  const grouped = computed(() => {
327
425
  const order = [];
328
426
  const map = /* @__PURE__ */ new Map();
@@ -333,9 +431,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
333
431
  }
334
432
  map.get(group).push(c);
335
433
  };
336
- const recent = recentItems.value;
434
+ const pinned = pinnedItems.value;
435
+ for (const c of pinned) push(c, pinnedHeading.value);
436
+ const recent = recentItems.value.filter((c) => !pinned.some((p) => p.id === c.id));
337
437
  for (const c of recent) push(c, props.recentLabel);
338
- for (const c of ranked.value) if (!recent.includes(c)) push(c, c.group ?? "");
438
+ for (const c of ranked.value) if (!recent.includes(c) && !pinned.some((p) => p.id === c.id)) push(c, c.group ?? "");
339
439
  for (const c of fetched.value) push(c, c.group ?? "");
340
440
  const tail = /* @__PURE__ */ new Map();
341
441
  for (const c of fallbacks.value) {
@@ -371,14 +471,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
371
471
  const c = flat.value[selectedIndex.value];
372
472
  return c && !moreOf.has(c) ? c : void 0;
373
473
  });
474
+ const canPin = computed(() => active.value && !active.value.children && !moreOf.has(active.value) && !trail.value.some((step) => syntheticModes.has(step)));
374
475
  const previewRef = ref(null);
375
476
  const previewable = computed(
376
- () => props.previewPane && commandHasPreview(active.value, { slot: !!slots.preview, hasPreview: props.hasPreview })
477
+ () => (props.previewPane || !!editing.value) && commandHasPreview(active.value, { slot: !!slots.preview, hasPreview: props.hasPreview })
377
478
  );
378
479
  const paneCommand = shallowRef();
379
480
  let lingerTimer;
380
481
  watch(
381
- [active, previewable],
482
+ [() => editing.value ?? active.value, previewable],
382
483
  ([command, show]) => {
383
484
  clearTimeout(lingerTimer);
384
485
  if (show) {
@@ -391,7 +492,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
391
492
  { immediate: true }
392
493
  );
393
494
  onBeforeUnmount(() => clearTimeout(lingerTimer));
394
- const paneOpen = computed(() => props.previewPane && !!paneCommand.value);
495
+ const paneOpen = computed(() => !promptCommand.value && (!!editing.value || props.previewPane && !!paneCommand.value));
395
496
  function paneHighlight(text2) {
396
497
  return highlight(text2, paneBody.value?.highlight);
397
498
  }
@@ -490,7 +591,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
490
591
  select(selectedIndex.value + direction * 8, true);
491
592
  }
492
593
  function onPaletteKeydown(event) {
493
- if (event.isComposing) return;
594
+ if (event.isComposing || event.target !== inputRef.value || promptCommand.value) return;
595
+ if (event.altKey && event.key.toLowerCase() === "p") {
596
+ event.preventDefault();
597
+ togglePin(active.value);
598
+ return;
599
+ }
494
600
  if (!["ArrowDown", "ArrowUp", "Home", "End", "PageDown", "PageUp"].includes(event.key)) return;
495
601
  const typing = event.target instanceof HTMLInputElement && event.target.value !== "";
496
602
  if (typing && (event.key === "Home" || event.key === "End")) return;
@@ -505,10 +611,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
505
611
  function onPointerMove() {
506
612
  keyboardSelection.value = false;
507
613
  }
614
+ function onCloseAutoFocus(event) {
615
+ if (!afterClose) return;
616
+ event.preventDefault();
617
+ const focus = afterClose;
618
+ afterClose = void 0;
619
+ requestAnimationFrame(focus);
620
+ }
621
+ async function focusEditor() {
622
+ stopEditorFocus?.();
623
+ await nextTick();
624
+ if (!editing.value) return;
625
+ const root = previewRef.value?.viewportEl;
626
+ if (!root) return;
627
+ const focus = () => {
628
+ const body = root.querySelector("[data-lp-command-preview]");
629
+ const field = body?.querySelector('input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]):not([aria-hidden="true"]),textarea:not([disabled]):not([tabindex="-1"]),select:not([disabled]),[contenteditable="true"]') ?? body?.querySelector('button:not([disabled]):not([tabindex="-1"]),[tabindex="0"]');
630
+ field?.focus();
631
+ return !!field;
632
+ };
633
+ if (focus()) return;
634
+ const observer = new MutationObserver(() => {
635
+ if (focus()) {
636
+ observer.disconnect();
637
+ stopEditorFocus = void 0;
638
+ }
639
+ });
640
+ observer.observe(root, { childList: true, subtree: true });
641
+ stopEditorFocus = () => {
642
+ observer.disconnect();
643
+ stopEditorFocus = void 0;
644
+ };
645
+ }
646
+ watch([editing, () => props.open], () => {
647
+ if (!editing.value || !props.open) stopEditorFocus?.();
648
+ });
649
+ onBeforeUnmount(() => stopEditorFocus?.());
508
650
  function onPointerEnter(c) {
509
651
  if (!keyboardSelection.value) select(flatIndexOf(c));
510
652
  }
511
653
  function runSelected(event) {
654
+ if (promptCommand.value) {
655
+ void submitPrompt();
656
+ return;
657
+ }
512
658
  const c = flat.value[selectedIndex.value];
513
659
  if (c?.href && !c.disabled && (event?.ctrlKey || event?.metaKey)) {
514
660
  openInNewTab(c);
@@ -528,8 +674,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
528
674
  event.preventDefault();
529
675
  run(c);
530
676
  }
531
- function run(row) {
532
- if (!row || row.disabled) return;
677
+ async function run(row) {
678
+ if (!row || row.disabled || executing.value) return;
533
679
  const c = fallbackOf.get(row) ?? row;
534
680
  const group = moreOf.get(row);
535
681
  if (group !== void 0) {
@@ -538,8 +684,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
538
684
  inputRef.value?.focus();
539
685
  return;
540
686
  }
541
- emit("select", c);
542
- c.onSelect?.();
687
+ if (c.editInPreview && c.previewComponent) {
688
+ editing.value = c;
689
+ paneCommand.value = c;
690
+ await focusEditor();
691
+ return;
692
+ }
693
+ if (c.prompt) {
694
+ promptCommand.value = c;
695
+ promptValue.value = c.prompt.initial ?? "";
696
+ promptError.value = "";
697
+ inputRef.value?.focus();
698
+ return;
699
+ }
700
+ if (!await execute(c, () => c.onSelect?.())) return;
543
701
  if (!c.onSelect && c.href && !c.children) window.location.assign(c.href);
544
702
  if (c.children) {
545
703
  const carried = query.value;
@@ -556,13 +714,65 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
556
714
  inputRef.value?.focus();
557
715
  return;
558
716
  }
717
+ afterClose = c.afterClose;
559
718
  emit("update:open", false);
560
719
  }
720
+ async function execute(command, action) {
721
+ if (executing.value) return false;
722
+ executing.value = true;
723
+ actionError.value = "";
724
+ const epoch = executionEpoch;
725
+ try {
726
+ emit("select", command);
727
+ const result = await action();
728
+ if (command.undo) toast.success(command.label, { duration: 8e3, actions: [{ label: text.value.undo, onClick: async () => {
729
+ await command.undo(result);
730
+ } }] });
731
+ return epoch === executionEpoch;
732
+ } catch (error) {
733
+ if (epoch === executionEpoch) actionError.value = error instanceof Error ? error.message : text.value.actionFailed;
734
+ return false;
735
+ } finally {
736
+ executing.value = false;
737
+ }
738
+ }
739
+ function submitPrompt() {
740
+ const command = promptCommand.value;
741
+ if (!command?.prompt || executing.value || validating.value) return;
742
+ const value = promptValue.value;
743
+ promptValidation.run(() => command.prompt.validate?.(value), {
744
+ apply: (error) => {
745
+ void completePrompt(command, value, error);
746
+ },
747
+ fail: (error) => {
748
+ promptError.value = error instanceof Error ? error.message : text.value.actionFailed;
749
+ }
750
+ });
751
+ }
752
+ async function completePrompt(command, value, error) {
753
+ if (promptCommand.value !== command || promptValue.value !== value) return;
754
+ promptError.value = error ?? "";
755
+ if (promptError.value || !await execute(command, () => command.prompt.submit(value))) return;
756
+ remember(command);
757
+ emit("run", command.id, command);
758
+ if (promptCommand.value !== command) return;
759
+ promptCommand.value = void 0;
760
+ afterClose = command.afterClose;
761
+ if (!command.keepOpen) emit("update:open", false);
762
+ }
561
763
  function onBackspace(event) {
562
- if (query.value) return;
764
+ if (promptCommand.value || query.value) return;
563
765
  if (back()) event.preventDefault();
564
766
  }
565
767
  function onEscape(event) {
768
+ if (promptCommand.value || editing.value) {
769
+ event.preventDefault();
770
+ event.stopPropagation();
771
+ promptCommand.value = void 0;
772
+ editing.value = void 0;
773
+ inputRef.value?.focus();
774
+ return;
775
+ }
566
776
  if (!trail.value.length) return;
567
777
  event.preventDefault();
568
778
  event.stopPropagation();
@@ -575,6 +785,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
575
785
  claim();
576
786
  hints.use(HINT_SIGNALS.palette);
577
787
  } else release();
788
+ executionEpoch++;
789
+ editing.value = void 0;
790
+ promptCommand.value = void 0;
791
+ promptError.value = "";
792
+ actionError.value = "";
578
793
  cancel();
579
794
  query.value = "";
580
795
  select(0);
@@ -610,7 +825,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
610
825
  return (_ctx, _cache) => {
611
826
  return openBlock(), createBlock(unref(DialogRoot), {
612
827
  open: __props.open,
613
- "onUpdate:open": _cache[3] || (_cache[3] = (v) => emit("update:open", v))
828
+ "onUpdate:open": _cache[9] || (_cache[9] = (v) => emit("update:open", v))
614
829
  }, {
615
830
  default: withCtx(() => [
616
831
  createVNode(unref(DialogPortal), { to: unref(portalTo) }, {
@@ -621,13 +836,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
621
836
  }, null, 8, ["class", "style"]),
622
837
  createVNode(unref(DialogContent), {
623
838
  onInteractOutside: unref(guardOutside),
624
- onEscapeKeyDown: unref(guardOutside),
839
+ onEscapeKeyDown: _cache[7] || (_cache[7] = (event) => {
840
+ unref(guardOutside)(event);
841
+ if (!event.defaultPrevented) onEscape(event);
842
+ }),
843
+ onCloseAutoFocus,
625
844
  ref_key: "contentRef",
626
845
  ref: contentRef,
627
846
  class: normalizeClass(["lp-cmd-dialog fixed left-1/2 top-[12vh] flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]", [unref(frosted) ? unref(layer).nested ? "lp-glass-overlay lp-glass-overlay--nested" : "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-split"]]),
628
847
  style: normalizeStyle({ zIndex: unref(layer).panel }),
629
848
  "data-pane": paneOpen.value ? "open" : void 0,
630
- onOpenAutoFocus: _cache[2] || (_cache[2] = withModifiers(() => {
849
+ "data-editing": editing.value ? "" : void 0,
850
+ onOpenAutoFocus: _cache[8] || (_cache[8] = withModifiers(() => {
631
851
  }, ["prevent"])),
632
852
  onKeydownCapture: onPaletteKeydown
633
853
  }, {
@@ -645,7 +865,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
645
865
  _: 1
646
866
  }),
647
867
  createElementVNode("div", _hoisted_1, [
648
- !unref(searching) ? (openBlock(), createBlock(_sfc_main$1, {
868
+ !unref(searching) && !executing.value && !unref(validating) ? (openBlock(), createBlock(_sfc_main$1, {
649
869
  key: 0,
650
870
  name: "lucide:search",
651
871
  size: 18,
@@ -654,7 +874,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
654
874
  key: 1,
655
875
  size: "inline",
656
876
  delay: 0,
657
- labels: { loading: unref(text).searching },
877
+ labels: { loading: executing.value || unref(validating) ? unref(text).running : unref(text).searching },
658
878
  class: "shrink-0 text-[18px] text-muted"
659
879
  }, null, 8, ["labels"])),
660
880
  (openBlock(true), createElementBlock(Fragment, null, renderList(trail.value, (step, i) => {
@@ -681,14 +901,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
681
901
  withDirectives(createElementVNode("input", {
682
902
  ref_key: "inputRef",
683
903
  ref: inputRef,
684
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
904
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputQuery.value = $event),
905
+ readonly: executing.value && !!promptCommand.value,
906
+ onFocus: _cache[1] || (_cache[1] = ($event) => editing.value = void 0),
685
907
  type: "text",
686
908
  role: "combobox",
687
909
  "aria-autocomplete": "list",
688
910
  "aria-expanded": "true",
689
911
  "aria-controls": listId,
690
912
  "aria-activedescendant": activeId.value,
691
- placeholder: mode.value?.childPlaceholder ?? __props.placeholder,
913
+ placeholder: promptCommand.value?.prompt?.placeholder ?? mode.value?.childPlaceholder ?? __props.placeholder,
692
914
  class: "h-12 min-w-0 flex-1 bg-transparent text-sm text-ink outline-none placeholder:text-muted",
693
915
  onKeydown: [
694
916
  withKeys(withModifiers(runSelected, ["prevent"]), ["enter"]),
@@ -697,22 +919,82 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
697
919
  withKeys(onTab, ["tab"])
698
920
  ]
699
921
  }, null, 40, _hoisted_3), [
700
- [vModelText, query.value]
922
+ [vModelText, inputQuery.value]
701
923
  ]),
702
924
  createElementVNode("kbd", _hoisted_4, toDisplayString(unref(text).esc), 1)
703
925
  ]),
926
+ promptCommand.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
927
+ createElementVNode("p", _hoisted_6, toDisplayString(promptCommand.value.label), 1),
928
+ promptError.value ? (openBlock(), createElementBlock("p", _hoisted_7, toDisplayString(promptError.value), 1)) : createCommentVNode("", true),
929
+ createElementVNode("div", _hoisted_8, [
930
+ createVNode(_sfc_main$3, {
931
+ loading: executing.value || unref(validating),
932
+ onClick: submitPrompt
933
+ }, {
934
+ default: withCtx(() => [
935
+ createTextVNode(toDisplayString(unref(text).submit), 1)
936
+ ]),
937
+ _: 1
938
+ }, 8, ["loading"]),
939
+ createVNode(_sfc_main$3, {
940
+ variant: "ghost",
941
+ onClick: _cache[2] || (_cache[2] = ($event) => {
942
+ promptCommand.value = void 0;
943
+ inputRef.value?.focus();
944
+ })
945
+ }, {
946
+ default: withCtx(() => [
947
+ createTextVNode(toDisplayString(unref(text).backToResults), 1)
948
+ ]),
949
+ _: 1
950
+ })
951
+ ])
952
+ ])) : createCommentVNode("", true),
953
+ actionError.value ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(actionError.value), 1)) : createCommentVNode("", true),
954
+ active.value && (canPin.value || selectedActions.value.length) && !promptCommand.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
955
+ selectedActions.value.length ? (openBlock(), createBlock(_sfc_main$3, {
956
+ key: 0,
957
+ size: "xs",
958
+ variant: "ghost",
959
+ onClick: _cache[3] || (_cache[3] = ($event) => openActions(active.value))
960
+ }, {
961
+ default: withCtx(() => [
962
+ createTextVNode(toDisplayString(unref(text).actions) + " ", 1),
963
+ _cache[10] || (_cache[10] = createElementVNode("span", { class: "text-muted" }, "Tab", -1))
964
+ ]),
965
+ _: 1
966
+ })) : createCommentVNode("", true),
967
+ canPin.value ? (openBlock(), createBlock(_sfc_main$3, {
968
+ key: 1,
969
+ size: "xs",
970
+ variant: "ghost",
971
+ "aria-label": isPinned(active.value) ? unref(text).unpin : unref(text).pin,
972
+ "aria-pressed": isPinned(active.value),
973
+ onClick: _cache[4] || (_cache[4] = ($event) => togglePin(active.value))
974
+ }, {
975
+ default: withCtx(() => [
976
+ createVNode(_sfc_main$1, {
977
+ name: "lucide:star",
978
+ size: 14
979
+ }),
980
+ createTextVNode(toDisplayString(isPinned(active.value) ? unref(text).unpin : unref(text).pin) + " ", 1),
981
+ _cache[11] || (_cache[11] = createElementVNode("span", { class: "text-muted" }, "Alt+P", -1))
982
+ ]),
983
+ _: 1
984
+ }, 8, ["aria-label", "aria-pressed"])) : createCommentVNode("", true)
985
+ ])) : createCommentVNode("", true),
704
986
  createElementVNode("div", {
705
987
  class: "flex min-h-0 flex-1",
706
988
  onPointermove: onPointerMove
707
989
  }, [
708
- createVNode(_sfc_main$3, {
990
+ withDirectives(createVNode(_sfc_main$4, {
709
991
  ref_key: "scrollRef",
710
992
  ref: scrollRef,
711
993
  class: "lp-cmd-list min-h-0 min-w-0 flex-1",
712
994
  "content-class": "p-2"
713
995
  }, {
714
996
  default: withCtx(() => [
715
- flat.value.length === 0 && !failed.value ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(unref(searching) ? unref(text).searching : __props.emptyText), 1)) : createCommentVNode("", true),
997
+ flat.value.length === 0 && !failed.value ? (openBlock(), createElementBlock("p", _hoisted_11, toDisplayString(unref(searching) ? unref(text).searching : __props.emptyText), 1)) : createCommentVNode("", true),
716
998
  createElementVNode("div", {
717
999
  id: listId,
718
1000
  role: "listbox"
@@ -727,7 +1009,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
727
1009
  key: 0,
728
1010
  id: `${listId}-g${gi}`,
729
1011
  class: "px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted"
730
- }, toDisplayString(group.name), 9, _hoisted_7)) : createCommentVNode("", true),
1012
+ }, toDisplayString(group.name), 9, _hoisted_13)) : createCommentVNode("", true),
731
1013
  (openBlock(true), createElementBlock(Fragment, null, renderList(group.items, (c) => {
732
1014
  return openBlock(), createBlock(resolveDynamicComponent(c.href ? "a" : "button"), {
733
1015
  id: optionId(flatIndexOf(c)),
@@ -748,7 +1030,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
748
1030
  onPointerenter: ($event) => onPointerEnter(c)
749
1031
  }, {
750
1032
  default: withCtx(() => [
751
- imageOf(c) ? (openBlock(), createBlock(_sfc_main$4, {
1033
+ imageOf(c) ? (openBlock(), createBlock(_sfc_main$5, {
752
1034
  key: 0,
753
1035
  src: imageOf(c).src ?? void 0,
754
1036
  alt: imageOf(c).alt ?? "",
@@ -763,24 +1045,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
763
1045
  size: 16,
764
1046
  class: normalizeClass(["shrink-0", { "mt-0.5": c.excerpt }])
765
1047
  }, null, 8, ["name", "class"])) : createCommentVNode("", true),
766
- createElementVNode("span", _hoisted_8, [
767
- createElementVNode("span", _hoisted_9, [
1048
+ createElementVNode("span", _hoisted_14, [
1049
+ createElementVNode("span", _hoisted_15, [
768
1050
  (openBlock(true), createElementBlock(Fragment, null, renderList(highlight(c.label, c.highlight), (p, pi) => {
769
1051
  return openBlock(), createElementBlock(Fragment, {
770
1052
  key: `l${pi}`
771
1053
  }, [
772
- p.hit ? (openBlock(), createElementBlock("mark", _hoisted_10, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1054
+ p.hit ? (openBlock(), createElementBlock("mark", _hoisted_16, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
773
1055
  createTextVNode(toDisplayString(p.text), 1)
774
1056
  ], 64))
775
1057
  ], 64);
776
1058
  }), 128))
777
1059
  ]),
778
- c.description ? (openBlock(), createElementBlock("span", _hoisted_11, [
1060
+ c.description ? (openBlock(), createElementBlock("span", _hoisted_17, [
779
1061
  (openBlock(true), createElementBlock(Fragment, null, renderList(highlight(c.description, c.highlight), (p, pi) => {
780
1062
  return openBlock(), createElementBlock(Fragment, {
781
1063
  key: `d${pi}`
782
1064
  }, [
783
- p.hit ? (openBlock(), createElementBlock("mark", _hoisted_12, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1065
+ p.hit ? (openBlock(), createElementBlock("mark", _hoisted_18, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
784
1066
  createTextVNode(toDisplayString(p.text), 1)
785
1067
  ], 64))
786
1068
  ], 64);
@@ -795,7 +1077,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
795
1077
  return openBlock(), createElementBlock(Fragment, {
796
1078
  key: `e${pi}`
797
1079
  }, [
798
- p.hit ? (openBlock(), createElementBlock("mark", _hoisted_13, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1080
+ p.hit ? (openBlock(), createElementBlock("mark", _hoisted_19, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
799
1081
  createTextVNode(toDisplayString(p.text), 1)
800
1082
  ], 64))
801
1083
  ], 64);
@@ -805,7 +1087,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
805
1087
  c.shortcut ? (openBlock(), createBlock(MenuShortcut, {
806
1088
  key: 2,
807
1089
  combo: c.shortcut
808
- }, null, 8, ["combo"])) : c.prefix && c.children ? (openBlock(), createElementBlock("kbd", _hoisted_14, toDisplayString(c.prefix), 1)) : c.children ? (openBlock(), createBlock(_sfc_main$1, {
1090
+ }, null, 8, ["combo"])) : c.prefix && c.children ? (openBlock(), createElementBlock("kbd", _hoisted_20, toDisplayString(c.prefix), 1)) : c.children ? (openBlock(), createBlock(_sfc_main$1, {
809
1091
  key: 4,
810
1092
  name: "lucide:chevron-right",
811
1093
  size: 14,
@@ -815,7 +1097,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
815
1097
  _: 2
816
1098
  }, 1064, ["id", "href", "type", "aria-selected", "aria-disabled", "data-cmd-index", "disabled", "class", "onClick", "onPointerenter"]);
817
1099
  }), 128))
818
- ], 8, _hoisted_6);
1100
+ ], 8, _hoisted_12);
819
1101
  }), 128))
820
1102
  ]),
821
1103
  failed.value ? (openBlock(), createElementBlock("div", {
@@ -832,7 +1114,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
832
1114
  createElementVNode("button", {
833
1115
  type: "button",
834
1116
  class: "rounded-inner px-1.5 py-0.5 font-medium text-brand outline-none transition-colors hover:bg-brand-soft focus-visible:ring-2 focus-visible:ring-ring",
835
- onClick: _cache[1] || (_cache[1] = ($event) => {
1117
+ onClick: _cache[5] || (_cache[5] = ($event) => {
836
1118
  refresh();
837
1119
  inputRef.value?.focus();
838
1120
  })
@@ -840,11 +1122,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
840
1122
  ], 2)) : createCommentVNode("", true)
841
1123
  ]),
842
1124
  _: 1
843
- }, 512),
1125
+ }, 512), [
1126
+ [vShow, !editing.value && !promptCommand.value]
1127
+ ]),
844
1128
  createVNode(Transition, { name: "lp-cmd-pane" }, {
845
1129
  default: withCtx(() => [
846
- paneOpen.value ? (openBlock(), createElementBlock("aside", _hoisted_15, [
847
- createVNode(_sfc_main$3, {
1130
+ paneOpen.value ? (openBlock(), createElementBlock("aside", {
1131
+ key: 0,
1132
+ class: normalizeClass(["lp-cmd-pane min-h-0 flex-col", editing.value ? "flex min-w-0 flex-1" : "hidden shrink-0 border-l border-line md:flex"])
1133
+ }, [
1134
+ createVNode(_sfc_main$4, {
848
1135
  ref_key: "previewRef",
849
1136
  ref: previewRef,
850
1137
  class: "min-h-0 flex-1",
@@ -854,65 +1141,103 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
854
1141
  paneBody.value ? (openBlock(), createElementBlock("div", {
855
1142
  key: paneBody.value.id
856
1143
  }, [
857
- renderSlot(_ctx.$slots, "preview", {
858
- command: paneBody.value,
859
- highlight: paneHighlight,
860
- query: paneQuery.value
861
- }, () => [
862
- createElementVNode("div", _hoisted_16, [
863
- imageOf(paneBody.value) ? (openBlock(), createBlock(_sfc_main$4, {
864
- key: 0,
865
- src: imageOf(paneBody.value).src ?? void 0,
866
- alt: imageOf(paneBody.value).alt ?? "",
867
- fallback: imageOf(paneBody.value).fallback,
868
- icon: imageOf(paneBody.value).icon,
869
- shape: imageOf(paneBody.value).shape ?? "soft",
870
- "pixel-size": 28,
871
- class: normalizeClass(["shrink-0", IMAGE_RADIUS[imageOf(paneBody.value).shape ?? "soft"]])
872
- }, null, 8, ["src", "alt", "fallback", "icon", "shape", "class"])) : paneBody.value.icon ? (openBlock(), createBlock(_sfc_main$1, {
873
- key: 1,
874
- name: paneBody.value.icon,
875
- size: 16,
876
- class: "shrink-0 text-muted"
877
- }, null, 8, ["name"])) : createCommentVNode("", true),
878
- createElementVNode("h3", _hoisted_17, toDisplayString(paneBody.value.label), 1)
1144
+ editing.value ? (openBlock(), createBlock(_sfc_main$3, {
1145
+ key: 0,
1146
+ size: "sm",
1147
+ variant: "ghost",
1148
+ class: "mb-3",
1149
+ onClick: _cache[6] || (_cache[6] = ($event) => {
1150
+ editing.value = void 0;
1151
+ inputRef.value?.focus();
1152
+ })
1153
+ }, {
1154
+ default: withCtx(() => [
1155
+ createTextVNode(toDisplayString(unref(text).backToResults), 1)
1156
+ ]),
1157
+ _: 1
1158
+ })) : createCommentVNode("", true),
1159
+ createVNode(_sfc_main$6, null, {
1160
+ default: withCtx(() => [
1161
+ renderSlot(_ctx.$slots, "preview", {
1162
+ command: paneBody.value,
1163
+ highlight: paneHighlight,
1164
+ query: paneQuery.value
1165
+ }, () => [
1166
+ paneBody.value.previewComponent ? (openBlock(), createBlock(resolveDynamicComponent(paneBody.value.previewComponent), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1167
+ createElementVNode("div", _hoisted_21, [
1168
+ imageOf(paneBody.value) ? (openBlock(), createBlock(_sfc_main$5, {
1169
+ key: 0,
1170
+ src: imageOf(paneBody.value).src ?? void 0,
1171
+ alt: imageOf(paneBody.value).alt ?? "",
1172
+ fallback: imageOf(paneBody.value).fallback,
1173
+ icon: imageOf(paneBody.value).icon,
1174
+ shape: imageOf(paneBody.value).shape ?? "soft",
1175
+ "pixel-size": 28,
1176
+ class: normalizeClass(["shrink-0", IMAGE_RADIUS[imageOf(paneBody.value).shape ?? "soft"]])
1177
+ }, null, 8, ["src", "alt", "fallback", "icon", "shape", "class"])) : paneBody.value.icon ? (openBlock(), createBlock(_sfc_main$1, {
1178
+ key: 1,
1179
+ name: paneBody.value.icon,
1180
+ size: 16,
1181
+ class: "shrink-0 text-muted"
1182
+ }, null, 8, ["name"])) : createCommentVNode("", true),
1183
+ createElementVNode("h3", _hoisted_22, toDisplayString(paneBody.value.label), 1)
1184
+ ]),
1185
+ paneDescription.value ? (openBlock(), createElementBlock("p", _hoisted_23, toDisplayString(paneDescription.value), 1)) : createCommentVNode("", true),
1186
+ (openBlock(true), createElementBlock(Fragment, null, renderList(paragraphs.value, (para, i) => {
1187
+ return openBlock(), createElementBlock("p", {
1188
+ key: i,
1189
+ class: "lp-cmd-para mt-3 whitespace-pre-line text-sm leading-relaxed text-ink/90",
1190
+ style: normalizeStyle({ animationDelay: paraDelay(i) })
1191
+ }, [
1192
+ (openBlock(true), createElementBlock(Fragment, null, renderList(highlight(para, paneBody.value.highlight), (p, pi) => {
1193
+ return openBlock(), createElementBlock(Fragment, {
1194
+ key: `p${pi}`
1195
+ }, [
1196
+ p.hit ? (openBlock(), createElementBlock("mark", _hoisted_24, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1197
+ createTextVNode(toDisplayString(p.text), 1)
1198
+ ], 64))
1199
+ ], 64);
1200
+ }), 128))
1201
+ ], 4);
1202
+ }), 128))
1203
+ ], 64))
1204
+ ], true)
879
1205
  ]),
880
- paneDescription.value ? (openBlock(), createElementBlock("p", _hoisted_18, toDisplayString(paneDescription.value), 1)) : createCommentVNode("", true),
881
- (openBlock(true), createElementBlock(Fragment, null, renderList(paragraphs.value, (para, i) => {
882
- return openBlock(), createElementBlock("p", {
883
- key: i,
884
- class: "lp-cmd-para mt-3 whitespace-pre-line text-sm leading-relaxed text-ink/90",
885
- style: normalizeStyle({ animationDelay: paraDelay(i) })
886
- }, [
887
- (openBlock(true), createElementBlock(Fragment, null, renderList(highlight(para, paneBody.value.highlight), (p, pi) => {
888
- return openBlock(), createElementBlock(Fragment, {
889
- key: `p${pi}`
890
- }, [
891
- p.hit ? (openBlock(), createElementBlock("mark", _hoisted_19, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
892
- createTextVNode(toDisplayString(p.text), 1)
893
- ], 64))
894
- ], 64);
895
- }), 128))
896
- ], 4);
1206
+ _: 3
1207
+ }),
1208
+ actionsOf(paneBody.value).length ? (openBlock(), createElementBlock("div", _hoisted_25, [
1209
+ (openBlock(true), createElementBlock(Fragment, null, renderList(actionsOf(paneBody.value), (action) => {
1210
+ return openBlock(), createBlock(_sfc_main$3, {
1211
+ key: action.id,
1212
+ size: "sm",
1213
+ variant: "outline",
1214
+ disabled: action.disabled || executing.value,
1215
+ onClick: ($event) => run({ ...action, remember: false })
1216
+ }, {
1217
+ default: withCtx(() => [
1218
+ createTextVNode(toDisplayString(action.label), 1)
1219
+ ]),
1220
+ _: 2
1221
+ }, 1032, ["disabled", "onClick"]);
897
1222
  }), 128))
898
- ], true)
1223
+ ])) : createCommentVNode("", true)
899
1224
  ])) : createCommentVNode("", true)
900
1225
  ]),
901
1226
  _: 3
902
1227
  }, 512)
903
- ])) : createCommentVNode("", true)
1228
+ ], 2)) : createCommentVNode("", true)
904
1229
  ]),
905
1230
  _: 3
906
1231
  })
907
1232
  ], 32),
908
- createElementVNode("div", _hoisted_20, [
909
- createElementVNode("span", _hoisted_21, [
910
- _cache[4] || (_cache[4] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↑", -1)),
911
- _cache[5] || (_cache[5] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↓", -1)),
1233
+ createElementVNode("div", _hoisted_26, [
1234
+ createElementVNode("span", _hoisted_27, [
1235
+ _cache[12] || (_cache[12] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↑", -1)),
1236
+ _cache[13] || (_cache[13] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↓", -1)),
912
1237
  createTextVNode(" " + toDisplayString(unref(text).navigate), 1)
913
1238
  ]),
914
- createElementVNode("span", _hoisted_22, [
915
- _cache[6] || (_cache[6] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↵", -1)),
1239
+ createElementVNode("span", _hoisted_28, [
1240
+ _cache[14] || (_cache[14] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "↵", -1)),
916
1241
  createTextVNode(" " + toDisplayString(unref(text).select), 1)
917
1242
  ]),
918
1243
  selectedActions.value.length ? (openBlock(), createElementBlock("span", {
@@ -924,18 +1249,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
924
1249
  }, toDisplayString(unref(text).tab), 3),
925
1250
  createTextVNode(" " + toDisplayString(unref(text).actions), 1)
926
1251
  ], 2)) : createCommentVNode("", true),
927
- trail.value.length ? (openBlock(), createElementBlock("span", _hoisted_23, [
928
- _cache[7] || (_cache[7] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "⌫", -1)),
1252
+ trail.value.length ? (openBlock(), createElementBlock("span", _hoisted_29, [
1253
+ _cache[15] || (_cache[15] = createElementVNode("kbd", { class: "rounded-small border border-line px-1 text-[10px]" }, "⌫", -1)),
929
1254
  createTextVNode(" " + toDisplayString(unref(text).back), 1)
930
1255
  ])) : createCommentVNode("", true),
931
- createElementVNode("span", _hoisted_24, [
932
- createElementVNode("kbd", _hoisted_25, toDisplayString(unref(text).esc), 1),
1256
+ createElementVNode("span", _hoisted_30, [
1257
+ createElementVNode("kbd", _hoisted_31, toDisplayString(unref(text).esc), 1),
933
1258
  createTextVNode(" " + toDisplayString(unref(text).close), 1)
934
1259
  ])
935
1260
  ])
936
1261
  ]),
937
1262
  _: 3
938
- }, 8, ["onInteractOutside", "onEscapeKeyDown", "class", "style", "data-pane"])
1263
+ }, 8, ["onInteractOutside", "class", "style", "data-pane", "data-editing"])
939
1264
  ]),
940
1265
  _: 3
941
1266
  }, 8, ["to"])
@@ -945,7 +1270,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
945
1270
  };
946
1271
  }
947
1272
  });
948
- const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9c48e89a"]]);
1273
+ const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9366efe"]]);
949
1274
  export {
950
1275
  LpCommandPalette as default
951
1276
  };