@leavepulse/ui 0.70.1 → 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.
- package/README.md +91 -0
- package/dist/assets/{LpCommandPalette-u-zOxKWa.css → LpCommandPalette-DgPZX0us.css} +24 -17
- package/dist/assets/{LpPaletteFacts-B9FdVmIO.css → LpPaletteFacts-CVNh5ICn.css} +16 -16
- package/dist/assets/{LpPaletteStats-ClE-37MK.css → LpPaletteStats-ZiZmR6vz.css} +5 -5
- package/dist/assets/{LpTable-DHxEQ_-3.css → LpTable-DHvorDiU.css} +19 -19
- package/dist/assets/LpTabs-CO3EcsNV.css +18 -0
- package/dist/chunks/{ContextMenuItems-6kxEivBI.js → ContextMenuItems-eS7qx9gD.js} +1 -1
- package/dist/chunks/{DropzoneLinkField-Bw8Flkhk.js → DropzoneLinkField-DkFhdfEJ.js} +2 -2
- package/dist/chunks/{FieldWrapper-BiennROB.js → FieldWrapper-YzbvvC3M.js} +1 -1
- package/dist/chunks/{LayoutCanvas-BsJIzhdd.js → LayoutCanvas-Ba4A9QC5.js} +1 -1
- package/dist/chunks/{LayoutNode-DJVhkSGk.js → LayoutNode-CTTTLMDM.js} +1 -1
- package/dist/chunks/{LpActionBar-CzOFar5t.js → LpActionBar-B7anGlkI.js} +2 -2
- package/dist/chunks/{LpAddressInput-Chv_Xf8q.js → LpAddressInput-CD0bzrt-.js} +7 -7
- package/dist/chunks/{LpAlert-C5igj802.js → LpAlert-BHi7ARqu.js} +1 -1
- package/dist/chunks/{LpAppShell-BiWByLmt.js → LpAppShell-1RmBp6xQ.js} +3 -3
- package/dist/chunks/{LpAutocomplete-D92niDHE.js → LpAutocomplete-DDqe2M5g.js} +5 -2
- package/dist/chunks/{LpAvatar-CLPl-qOF.js → LpAvatar-DqfKCIdr.js} +1 -1
- package/dist/chunks/{LpBadge-BBq1Er9T.js → LpBadge-C8fKEmTF.js} +1 -1
- package/dist/chunks/{LpBreadcrumbs-JKEi_yFF.js → LpBreadcrumbs-DhcoStFa.js} +1 -1
- package/dist/chunks/{LpButton-CVxBfGjd.js → LpButton-BQDAFXBd.js} +3 -0
- package/dist/chunks/{LpCalendar-pVL91-Pl.js → LpCalendar-NmrA47J9.js} +1 -1
- package/dist/chunks/{LpCheckbox-DHc2bHDe.js → LpCheckbox-BoOuLnGB.js} +5 -2
- package/dist/chunks/{LpCodeBlock-BGsQhxw8.js → LpCodeBlock-Czu-fq1M.js} +2 -2
- package/dist/chunks/{LpCodeDisplay-CbJMs-IK.js → LpCodeDisplay-BK2FHbtM.js} +5 -5
- package/dist/chunks/{LpColorPicker-B7HSIFmn.js → LpColorPicker-Ee1DZiRd.js} +2 -2
- package/dist/chunks/LpCommandScope-ubtWDMa0.js +53 -0
- package/dist/chunks/{LpConfirmDialog-CfGCux8m.js → LpConfirmDialog-i15pulMT.js} +3 -3
- package/dist/chunks/{LpConfirmHost-exB7JmcO.js → LpConfirmHost-D0oGavtd.js} +1 -1
- package/dist/chunks/{LpContextMenu-Cj96ENDC.js → LpContextMenu-DXpFJjlO.js} +13 -3
- package/dist/chunks/{LpCopyButton-DzHjnFs0.js → LpCopyButton-Dmq7DmFw.js} +3 -3
- package/dist/chunks/{LpCountdown-BQnmB4gq.js → LpCountdown-DTdMF8DL.js} +1 -1
- package/dist/chunks/{LpDataList-CHNYQw7h.js → LpDataList-CFPtSsBB.js} +3 -3
- package/dist/chunks/{LpDatePicker-ac1_6o5P.js → LpDatePicker-cC9K-Pk8.js} +4 -4
- package/dist/chunks/{LpDateRangePicker-B15gYrZJ.js → LpDateRangePicker-BVQKPbvo.js} +2 -2
- package/dist/chunks/{LpDisclosure-DOarzlAG.js → LpDisclosure-hRnX3FWL.js} +4 -1
- package/dist/chunks/{LpDrawer-DGNKRsGq.js → LpDrawer-u4rxnuR-.js} +1 -1
- package/dist/chunks/{LpDropdownMenu-R4aYVtVV.js → LpDropdownMenu-BgZ0Z_Im.js} +13 -3
- package/dist/chunks/{LpEditable-Ws3DNQHn.js → LpEditable-CjxuOVh_.js} +2 -2
- package/dist/chunks/{LpEmptyState-KTKipws2.js → LpEmptyState-CKFTtQgJ.js} +1 -1
- package/dist/chunks/{LpFieldNotice-CurbNuXI.js → LpFieldNotice-CPI8EwtU.js} +1 -1
- package/dist/chunks/{LpFileTree-DDNg34tJ.js → LpFileTree-BH0gNlSJ.js} +2 -2
- package/dist/chunks/{LpFileTreeNode-DmPuYNZ_.js → LpFileTreeNode-gPVB1oXM.js} +4 -4
- package/dist/chunks/{LpFormField-BWwgm1E4.js → LpFormField-gRASfyj2.js} +4 -1
- package/dist/chunks/{LpGauge-C14Z9503.js → LpGauge-BdjPGnqw.js} +1 -1
- package/dist/chunks/{LpHintLayer-HvwUA5Ec.js → LpHintLayer-C2asBIfs.js} +2 -2
- package/dist/chunks/{LpHints-DxbPKOzQ.js → LpHints-CNZQ76JV.js} +3 -3
- package/dist/chunks/{LpIcon-HJP5xMz4.js → LpIcon-DkP-9mzK.js} +1 -1
- package/dist/chunks/{LpInfraNode-D64hywJI.js → LpInfraNode-yTh4-5qa.js} +2 -2
- package/dist/chunks/{LpInput-CDuwODJG.js → LpInput-2H-5ILOB.js} +5 -2
- package/dist/chunks/{LpLightbox-XJ0LpTcZ.js → LpLightbox-lAt5uIfx.js} +2 -2
- package/dist/chunks/{LpLogViewer-DKK4ySZl.js → LpLogViewer-x78YfhJf.js} +5 -5
- package/dist/chunks/{LpMapPicker-BtIl7NOM.js → LpMapPicker-Dp5RSCi9.js} +1 -1
- package/dist/chunks/{LpMediaGallery-rmI1DjKN.js → LpMediaGallery-D92oJfY_.js} +3 -3
- package/dist/chunks/{LpModal-eBMt2Fqn.js → LpModal-CpH0bNo7.js} +1 -1
- package/dist/chunks/{LpModalNav-DiyFCHiZ.js → LpModalNav-BH4ANQGJ.js} +4 -4
- package/dist/chunks/{LpNotificationBell-D-WhE5m2.js → LpNotificationBell-BdUQqZhs.js} +6 -6
- package/dist/chunks/{LpNumberField-B9k-h2HE.js → LpNumberField-DZY3Z670.js} +4 -1
- package/dist/chunks/{LpNumberFlow-Cfyh033Q.js → LpNumberFlow-5khYxsfX.js} +6 -3
- package/dist/chunks/{LpPagination-VNCX6pFC.js → LpPagination-DbeACavM.js} +1 -1
- package/dist/chunks/LpPaletteTheme-CqWNRwHE.js +104 -0
- package/dist/chunks/{LpPasswordInput-GL2KOFK8.js → LpPasswordInput-BzAZsf5V.js} +4 -2
- package/dist/chunks/{LpPhoneInput-C60tx1tC.js → LpPhoneInput-BMpd-0QR.js} +2 -2
- package/dist/chunks/{LpPie-BgXZ3xmm.js → LpPie-DdFSTbGE.js} +4 -4
- package/dist/chunks/{LpPipeline-B31h41Mu.js → LpPipeline-zjEM1Lwc.js} +3 -3
- package/dist/chunks/{LpProgress-CE-m5OpD.js → LpProgress-BX33EKkN.js} +1 -1
- package/dist/chunks/{LpQuota-DaL8TgNe.js → LpQuota-DqNv1yjs.js} +2 -2
- package/dist/chunks/{LpRadioGroup-CGBr5nIp.js → LpRadioGroup-CsXeV9Ct.js} +4 -1
- package/dist/chunks/{LpRangeCalendar-c5qj7YcC.js → LpRangeCalendar-l-0nSFmY.js} +1 -1
- package/dist/chunks/{LpRangeSlider-Dv6lNvHY.js → LpRangeSlider-CM-0ZITZ.js} +3 -0
- package/dist/chunks/{LpRelativeTime-yin9uQP7.js → LpRelativeTime-UM8EkfrN.js} +1 -1
- package/dist/chunks/{LpRepeater-D0S7jjwr.js → LpRepeater-OvzByE5L.js} +2 -2
- package/dist/chunks/{LpSecretField-CfWyHv9m.js → LpSecretField-DwQiPOko.js} +9 -7
- package/dist/chunks/{LpSection-BW4xJ-Li.js → LpSection-DcQsieHG.js} +1 -1
- package/dist/chunks/{LpSegmented-BO99Sr4m.js → LpSegmented-D2VST0o3.js} +4 -1
- package/dist/chunks/{LpSelect-C_8cJtj6.js → LpSelect-DYX2-u5A.js} +36 -6
- package/dist/chunks/{LpSidebar-CZRXtvem.js → LpSidebar-D44peKq2.js} +3 -3
- package/dist/chunks/{LpSidebarNav-DBg1U1oW.js → LpSidebarNav--VwkXO_a.js} +3 -3
- package/dist/chunks/{LpSlider-DuoRpOrH.js → LpSlider-DxYoCJJO.js} +3 -0
- package/dist/chunks/{LpStat-DFKlPJgy.js → LpStat-DIsQfbeD.js} +3 -3
- package/dist/chunks/{LpStatus-BsGLrpor.js → LpStatus-BQU1TUsv.js} +1 -1
- package/dist/chunks/{LpStepMark-TrzOioa9.js → LpStepMark-CXa7DJy_.js} +1 -1
- package/dist/chunks/{LpStepper-BbnS5jUr.js → LpStepper-C9RM_yTG.js} +1 -1
- package/dist/chunks/{LpSwitch-DrzKrZZV.js → LpSwitch-bGZxUDSx.js} +3 -0
- package/dist/chunks/{LpTableFilter-DyvHGbOk.js → LpTableFilter-CTZMqFDU.js} +2 -2
- package/dist/chunks/{LpTableOfContents-rYvo8z5T.js → LpTableOfContents-CraicEs4.js} +2 -2
- package/dist/chunks/{LpTagsInput-DZg80W-B.js → LpTagsInput-DrjmrOge.js} +8 -5
- package/dist/chunks/{LpTextarea-DiWjeVoJ.js → LpTextarea-BbYqmG1S.js} +4 -1
- package/dist/chunks/{LpThemeStudio-DxVZMtzN.js → LpThemeStudio-B2nPaG-h.js} +18 -14
- package/dist/chunks/{LpThemeSwitcher-CadVBTBn.js → LpThemeSwitcher-C0A5sg_E.js} +5 -3
- package/dist/chunks/{LpTimeField-BFQVf_PW.js → LpTimeField-DQ8WvPr2.js} +4 -1
- package/dist/chunks/{LpToaster-Wv9ksj4q.js → LpToaster-BTTl_wuy.js} +2 -2
- package/dist/chunks/{LpTooltip-Cz8SQwRt.js → LpTooltip-BcBvIx4z.js} +23 -5
- package/dist/chunks/{LpTopologyCanvas-C17A1XCb.js → LpTopologyCanvas-B0wEvAoq.js} +1 -1
- package/dist/chunks/{LpTour-CY2bFXge.js → LpTour-BgCfNlaW.js} +1 -1
- package/dist/chunks/{LpTruncate-D_5Pfv5B.js → LpTruncate-TcqfkyJM.js} +2 -2
- package/dist/chunks/{LpUptimeBar-Tew1Ykx4.js → LpUptimeBar-DRadGq4Y.js} +136 -47
- package/dist/chunks/{MenuTitle-BjQZX8tQ.js → MenuTitle-Dab3EGOp.js} +1 -1
- package/dist/chunks/{OptionContent-CmYUUeWj.js → OptionContent-DPzNsybd.js} +1 -1
- package/dist/chunks/PalettePreviewBoundary-B0Hhu3Yw.js +20 -0
- package/dist/chunks/{PickerField-DoHv0WMH.js → PickerField-DwLw7j0L.js} +1 -1
- package/dist/chunks/{RevealToggle-C-KzaQGJ.js → RevealToggle-BVFM_FAU.js} +3 -3
- package/dist/chunks/{TourCard-BJ8i7dk0.js → TourCard--2IfgnUU.js} +2 -2
- package/dist/chunks/icons-CLu1iR1j.js +43 -0
- package/dist/chunks/palette-BiY7yQZL.js +29 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.js +1 -1
- package/dist/components/DropzoneLinkField.vue.js +1 -1
- package/dist/components/FieldWrapper.vue.js +1 -1
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.d.ts +3 -3
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.d.ts +7 -1
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.d.ts +2 -2
- package/dist/components/LpBadge.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +4 -0
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpChart.vue.js +2 -2
- package/dist/components/LpCheckbox.vue.d.ts +8 -1
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpCodeDisplay.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.d.ts +2 -2
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +43 -7
- package/dist/components/LpCommandPalette.vue.js +451 -126
- package/dist/components/LpCommandScope.vue.d.ts +28 -0
- package/dist/components/LpCommandScope.vue.js +4 -0
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.d.ts +5 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpCopyButton.vue.d.ts +1 -1
- package/dist/components/LpCopyButton.vue.js +1 -1
- package/dist/components/LpCountdown.vue.js +1 -1
- package/dist/components/LpDataList.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.js +1 -1
- package/dist/components/LpDisclosure.vue.d.ts +4 -0
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDock.vue.js +2 -2
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.d.ts +5 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +2 -2
- package/dist/components/LpEditable.vue.js +1 -1
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.js +1 -1
- package/dist/components/LpFileTree.vue.d.ts +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpGauge.vue.js +1 -1
- package/dist/components/LpHintLayer.vue.js +1 -1
- package/dist/components/LpHints.vue.js +1 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +3 -2
- package/dist/components/LpInfraNode.vue.js +1 -1
- package/dist/components/LpInput.vue.d.ts +6 -0
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLoader.vue.d.ts +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.d.ts +2 -2
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +6 -0
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpNumberFlow.vue.js +1 -1
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPaletteFacts.vue.d.ts +1 -0
- package/dist/components/LpPaletteFacts.vue.js +40 -26
- package/dist/components/LpPaletteHeader.vue.js +2 -2
- package/dist/components/LpPaletteStats.vue.d.ts +1 -0
- package/dist/components/LpPaletteStats.vue.js +45 -21
- package/dist/components/LpPaletteTheme.vue.d.ts +7 -0
- package/dist/components/LpPaletteTheme.vue.js +4 -0
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPipeline.vue.js +1 -1
- package/dist/components/LpProgress.vue.d.ts +1 -1
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpQuota.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.d.ts +6 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.js +1 -1
- package/dist/components/LpRangeSlider.vue.d.ts +6 -0
- package/dist/components/LpRangeSlider.vue.js +1 -1
- package/dist/components/LpRelativeTime.vue.js +1 -1
- package/dist/components/LpRepeater.vue.js +1 -1
- package/dist/components/LpSecretField.vue.js +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.d.ts +6 -0
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.d.ts +3 -0
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShinyText.vue.d.ts +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSlider.vue.d.ts +6 -0
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStatus.vue.js +1 -1
- package/dist/components/LpStepMark.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.d.ts +6 -0
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +6 -0
- package/dist/components/LpTable.vue.js +74 -35
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTabs.vue.d.ts +1 -1
- package/dist/components/LpTabs.vue.js +14 -5
- package/dist/components/LpTagsInput.vue.d.ts +6 -0
- package/dist/components/LpTagsInput.vue.js +1 -1
- package/dist/components/LpTextarea.vue.d.ts +8 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeStudio.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTimeField.vue.d.ts +6 -0
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpTour.vue.js +1 -1
- package/dist/components/LpTruncate.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.d.ts +18 -9
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/MenuTitle.vue.js +1 -1
- package/dist/components/OptionContent.vue.js +1 -1
- package/dist/components/PalettePreviewBoundary.vue.d.ts +13 -0
- package/dist/components/PalettePreviewBoundary.vue.js +4 -0
- package/dist/components/PickerField.vue.js +1 -1
- package/dist/components/RevealToggle.vue.js +1 -1
- package/dist/components/TourCard.vue.js +1 -1
- package/dist/components/commandPalette.d.ts +33 -0
- package/dist/components/commandPalette.js +21 -1
- package/dist/components/commandSearch.d.ts +5 -0
- package/dist/components/commandSearch.js +22 -2
- package/dist/components/format.d.ts +7 -0
- package/dist/components/format.js +4 -0
- package/dist/components/menuWhen.js +1 -1
- package/dist/components/uptimeBar.d.ts +45 -0
- package/dist/components/uptimeBar.js +51 -0
- package/dist/composables/scroll.d.ts +5 -0
- package/dist/composables/scroll.js +7 -0
- package/dist/composables/useField.d.ts +4 -0
- package/dist/composables/useField.js +3 -0
- package/dist/composables/usePaletteCommands.d.ts +61 -0
- package/dist/composables/usePaletteCommands.js +220 -0
- package/dist/composables/useReveal.js +21 -0
- package/dist/composables/useView.js +5 -1
- package/dist/icons-all.js +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +101 -85
- package/dist/theme/palette.d.ts +9 -0
- package/dist/theme/studio.d.ts +12 -1
- package/package.json +1 -1
- package/src/component-names.ts +2 -0
- package/src/components/LpAutocomplete.vue +6 -1
- package/src/components/LpButton.vue +5 -1
- package/src/components/LpCheckbox.vue +7 -2
- package/src/components/LpCommandPalette.vue +263 -29
- package/src/components/LpCommandScope.vue +35 -0
- package/src/components/LpContextMenu.vue +13 -2
- package/src/components/LpDisclosure.vue +5 -1
- package/src/components/LpDropdownMenu.vue +13 -2
- package/src/components/LpFormField.vue +3 -0
- package/src/components/LpInput.vue +6 -1
- package/src/components/LpNumberField.vue +6 -1
- package/src/components/LpNumberFlow.vue +12 -2
- package/src/components/LpPaletteFacts.vue +11 -6
- package/src/components/LpPaletteStats.vue +12 -5
- package/src/components/LpPaletteTheme.vue +48 -0
- package/src/components/LpPasswordInput.vue +3 -0
- package/src/components/LpRadioGroup.vue +4 -1
- package/src/components/LpRangeSlider.vue +6 -1
- package/src/components/LpSecretField.vue +3 -0
- package/src/components/LpSegmented.vue +6 -1
- package/src/components/LpSelect.vue +41 -2
- package/src/components/LpSlider.vue +6 -1
- package/src/components/LpSwitch.vue +6 -1
- package/src/components/LpTable.vue +35 -2
- package/src/components/LpTableOfContents.vue +2 -4
- package/src/components/LpTabs.vue +7 -0
- package/src/components/LpTagsInput.vue +6 -1
- package/src/components/LpTextarea.vue +7 -2
- package/src/components/LpThemeStudio.vue +7 -5
- package/src/components/LpThemeSwitcher.vue +3 -0
- package/src/components/LpTimeField.vue +6 -1
- package/src/components/LpTooltip.vue +23 -1
- package/src/components/LpUptimeBar.vue +69 -41
- package/src/components/PalettePreviewBoundary.vue +5 -0
- package/src/components/commandPalette.ts +22 -1
- package/src/components/commandSearch.ts +23 -1
- package/src/components/format.ts +10 -0
- package/src/components/uptimeBar.ts +98 -0
- package/src/composables/scroll.ts +11 -0
- package/src/composables/useField.ts +7 -0
- package/src/composables/usePaletteCommands.ts +220 -0
- package/src/composables/useReveal.ts +29 -0
- package/src/composables/useView.ts +5 -1
- package/src/index.ts +18 -1
- package/src/kit-icons.ts +1 -1
- package/src/theme/palette.ts +26 -0
- package/src/theme/studio.ts +15 -8
- package/dist/assets/LpTabs-BJ-nrJuI.css +0 -18
- package/dist/chunks/icons-4IywzkHk.js +0 -43
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { defineComponent,
|
|
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 {
|
|
4
|
-
import {
|
|
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$
|
|
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,
|
|
19
|
-
import { fallbackRows, readRecent, resolveRecentItems, recentVisible, commandHasPreview, matchModePrefix, modeChipLabel,
|
|
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-
|
|
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: "
|
|
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
|
|
62
|
+
const _hoisted_17 = {
|
|
39
63
|
key: 0,
|
|
40
64
|
class: "mt-0.5 block truncate text-xs text-muted"
|
|
41
65
|
};
|
|
42
|
-
const
|
|
66
|
+
const _hoisted_18 = {
|
|
43
67
|
key: 0,
|
|
44
68
|
class: "rounded-xs bg-brand/20 text-ink"
|
|
45
69
|
};
|
|
46
|
-
const
|
|
70
|
+
const _hoisted_19 = {
|
|
47
71
|
key: 0,
|
|
48
72
|
class: "rounded-xs bg-brand/20 text-ink"
|
|
49
73
|
};
|
|
50
|
-
const
|
|
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
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
84
|
+
const _hoisted_24 = {
|
|
65
85
|
key: 0,
|
|
66
86
|
class: "rounded-xs bg-brand/25 text-ink"
|
|
67
87
|
};
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
|
76
|
-
const
|
|
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
|
-
() =>
|
|
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 :
|
|
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
|
-
|
|
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,
|
|
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
|
|
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
|
-
|
|
542
|
-
|
|
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[
|
|
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:
|
|
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
|
-
|
|
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) =>
|
|
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,
|
|
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$
|
|
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",
|
|
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,
|
|
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$
|
|
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",
|
|
767
|
-
createElementVNode("span",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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",
|
|
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,
|
|
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[
|
|
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",
|
|
847
|
-
|
|
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
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
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
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
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",
|
|
909
|
-
createElementVNode("span",
|
|
910
|
-
_cache[
|
|
911
|
-
_cache[
|
|
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",
|
|
915
|
-
_cache[
|
|
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",
|
|
928
|
-
_cache[
|
|
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",
|
|
932
|
-
createElementVNode("kbd",
|
|
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", "
|
|
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-
|
|
1273
|
+
const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9366efe"]]);
|
|
949
1274
|
export {
|
|
950
1275
|
LpCommandPalette as default
|
|
951
1276
|
};
|