@leavepulse/ui 0.43.3 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -7
- package/dist/assets/{LpCommandPalette-DH7sPcKP.css → LpCommandPalette-DCP5g2ik.css} +21 -21
- package/dist/assets/{LpDropzone-BBoWvi-J.css → LpDropzone-i4BdMi1H.css} +12 -12
- package/dist/assets/{LpImageEditor-Ct7Y3aNu.css → LpImageEditor-CbMA82g8.css} +6 -6
- package/dist/assets/{LpShortcutsDialog-C6YoQ8_M.css → LpShortcutsDialog-ChUyU7oV.css} +7 -7
- package/dist/assets/{LpSkeleton-D7xU8IPV.css → LpSkeleton-H3Z5dEIk.css} +4 -1
- package/dist/assets/{LpTable-BgPLJOXa.css → LpTable-DDQNdf86.css} +9 -9
- package/dist/chunks/ContextMenuItems-CrfeNPWT.js +123 -0
- package/dist/chunks/{LayoutCanvas-Dd20boUG.js → LayoutCanvas-D-jPOAvg.js} +26 -9
- package/dist/chunks/{LayoutNode-DGpZA9LX.js → LayoutNode-D8Xy9N-o.js} +20 -8
- package/dist/chunks/{LpActionBar-BlvtGB2P.js → LpActionBar-BbwCF6l5.js} +24 -10
- package/dist/chunks/{LpAddressInput-B-Zvxsn7.js → LpAddressInput-BrOqkZqg.js} +53 -48
- package/dist/chunks/{LpAlert-BAYHDSS1.js → LpAlert-DkOIjsbq.js} +15 -8
- package/dist/chunks/{LpAppShell-BGQVIY-3.js → LpAppShell-BUKPcHco.js} +51 -24
- package/dist/chunks/{LpAutocomplete-DExlIZe_.js → LpAutocomplete-DxV3Y9h4.js} +50 -23
- package/dist/chunks/{LpAvatar-B3-xAOH3.js → LpAvatar-ClBbEYZN.js} +17 -8
- package/dist/chunks/LpBreadcrumbs-B8IJgFIc.js +95 -0
- package/dist/chunks/{LpButton-5VXXCjwF.js → LpButton-kqJBHIIb.js} +44 -14
- package/dist/chunks/{LpCard-BhI1N_vL.js → LpCard-CpRByR0q.js} +1 -1
- package/dist/chunks/{LpCheckbox-CVccKYaH.js → LpCheckbox-DpqchzH4.js} +7 -3
- package/dist/chunks/{LpCodeBlock-Bo0B4TFR.js → LpCodeBlock-DeHJPq7p.js} +48 -16
- package/dist/chunks/{LpColorPicker-BlXea7LM.js → LpColorPicker-Bhf1qxhB.js} +32 -9
- package/dist/chunks/{LpConfirmDialog-Q-bxff8z.js → LpConfirmDialog-CIUOSnWo.js} +58 -16
- package/dist/chunks/LpConfirmHost-CDm0Wtpv.js +49 -0
- package/dist/chunks/LpContextMenu-DQw5dGfG.js +68 -0
- package/dist/chunks/LpDatePicker-Drirx1AK.js +191 -0
- package/dist/chunks/{LpDrawer-BZ6k3hvo.js → LpDrawer-bScx-KMO.js} +63 -26
- package/dist/chunks/{LpFileTree-_5vFBgaK.js → LpFileTree-CSI_5SK2.js} +23 -8
- package/dist/chunks/{LpFileTreeNode-BdcIYKIE.js → LpFileTreeNode-B4MiSQX2.js} +2 -2
- package/dist/chunks/LpFormField-CIk5qosh.js +87 -0
- package/dist/chunks/{LpInput-9EXWUM9B.js → LpInput-C0e8y8_d.js} +26 -11
- package/dist/chunks/{LpLightbox-2sYVMY-S.js → LpLightbox-Mr0W_6HK.js} +147 -60
- package/dist/chunks/{LpLink-DCND-zyu.js → LpLink-Krkjhe_y.js} +15 -6
- package/dist/chunks/{LpLogViewer-CaRy5MeS.js → LpLogViewer-YBOaFnc_.js} +68 -34
- package/dist/chunks/{LpMapPicker-ul4oYno6.js → LpMapPicker-NUzS9e37.js} +38 -13
- package/dist/chunks/{LpMediaGallery-FF-NquIo.js → LpMediaGallery-DfJmMW0I.js} +6 -3
- package/dist/chunks/{LpModal-Bt0pQCI_.js → LpModal-DPwGKBPv.js} +49 -26
- package/dist/chunks/{LpModalNav-YaifHrXC.js → LpModalNav-DPg5H9f3.js} +9 -6
- package/dist/chunks/{LpNotificationBell-DyGGsMAM.js → LpNotificationBell-t5yn-siX.js} +58 -24
- package/dist/chunks/{LpNumberField-CWuX08iX.js → LpNumberField-DWnQKktS.js} +20 -7
- package/dist/chunks/{LpNumberFlow-amWYaeuA.js → LpNumberFlow-z4WPZcZu.js} +22 -12
- package/dist/chunks/{LpOtpInput-y2v-pmiN.js → LpOtpInput-CziPF3Oq.js} +37 -8
- package/dist/chunks/{LpPagination-5FxjmmB5.js → LpPagination-DFngX7Xo.js} +30 -19
- package/dist/chunks/{LpPasswordInput--sjYCkLS.js → LpPasswordInput-CWVDuBJ5.js} +10 -7
- package/dist/chunks/{LpPhoneInput-BDSKVl_z.js → LpPhoneInput-CD-ZTeSd.js} +57 -33
- package/dist/chunks/{LpPie-D6OnzwlJ.js → LpPie-BLco31Nx.js} +78 -21
- package/dist/chunks/{LpPopover-8268UmlC.js → LpPopover-p_e_shN3.js} +4 -2
- package/dist/chunks/{LpProgress-Btq5W4Ut.js → LpProgress-CBU1iI69.js} +5 -4
- package/dist/chunks/{LpRadioGroup-xPIuVDO_.js → LpRadioGroup-DmEW0l78.js} +9 -2
- package/dist/chunks/{LpSegmented-fV0Sk92p.js → LpSegmented-Dejd7cIx.js} +7 -3
- package/dist/chunks/{LpSelect-ANIVtrpM.js → LpSelect-DrRD9I7L.js} +40 -18
- package/dist/chunks/{LpSidebar-ClBUwoEz.js → LpSidebar-BgwUNWpJ.js} +30 -22
- package/dist/chunks/{LpSidebarNav-llOcs_Fn.js → LpSidebarNav-Bqxz8aWT.js} +14 -9
- package/dist/chunks/{LpSkeleton-CTI-vBgW.js → LpSkeleton-BB6XIV-w.js} +1 -1
- package/dist/chunks/{LpSlider-BwNIBkAK.js → LpSlider-Cuzmrd7p.js} +7 -2
- package/dist/chunks/{LpSparkline-C6xQ2dwv.js → LpSparkline-CB80N8SJ.js} +11 -4
- package/dist/chunks/{LpStat-CQaW8R--.js → LpStat-dXtyrdX9.js} +1 -1
- package/dist/chunks/{LpSwitch-Blizvqyt.js → LpSwitch-B1aLKulj.js} +40 -26
- package/dist/chunks/{LpTableOfContents-CjvxPMpU.js → LpTableOfContents-BUcAfGPQ.js} +36 -41
- package/dist/chunks/{LpTabs-Cefe_lys.js → LpTabs-_qMVaZJ6.js} +19 -5
- package/dist/chunks/LpTextarea-yP8hGedR.js +77 -0
- package/dist/chunks/LpThemeProvider-Wjm7Tuit.js +35 -0
- package/dist/chunks/LpThemeSwitcher-CKLc10KZ.js +169 -0
- package/dist/chunks/{LpTilt-DuyKbpkA.js → LpTilt-B7KHX1zH.js} +2 -2
- package/dist/chunks/{LpTimeField-K6nAGboX.js → LpTimeField-C5HRgS5H.js} +13 -7
- package/dist/chunks/{LpToaster-gDB1EaU3.js → LpToaster--oT6lfhL.js} +57 -28
- package/dist/chunks/{LpTooltip-hCLPAqMG.js → LpTooltip-CBdzeKNf.js} +13 -6
- package/dist/chunks/LpTooltipProvider-CftjV7Xc.js +25 -0
- package/dist/chunks/{LpTopologyCanvas-Cm1L39uL.js → LpTopologyCanvas-DocsLal3.js} +6 -1
- package/dist/chunks/{LpUptimeBar-DvAMno0S.js → LpUptimeBar-DLtxOMRy.js} +43 -14
- package/dist/chunks/{LpThemeSwitcher-Cue-myST.js → useTheme-C8JHUlPM.js} +173 -215
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.d.ts +8 -0
- package/dist/components/ContextMenuItems.vue.js +4 -0
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.d.ts +4 -0
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.d.ts +3 -0
- 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 +9 -0
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +10 -0
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.d.ts +31 -6
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.d.ts +3 -3
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.d.ts +2 -2
- package/dist/components/LpBreadcrumbs.vue.d.ts +13 -9
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +35 -98
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +31 -2
- package/dist/components/LpChart.vue.js +317 -95
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.d.ts +2 -0
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +8 -10
- package/dist/components/LpCommandPalette.vue.js +88 -78
- package/dist/components/LpConfirmDialog.vue.d.ts +15 -3
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.d.ts +9 -0
- package/dist/components/LpConfirmHost.vue.js +4 -0
- package/dist/components/LpContextMenu.vue.d.ts +3 -5
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.d.ts +24 -6
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDrawer.vue.d.ts +10 -0
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +22 -6
- package/dist/components/LpFileTree.vue.d.ts +11 -2
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +9 -0
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +92 -57
- package/dist/components/LpInput.vue.d.ts +3 -3
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.d.ts +17 -0
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLink.vue.d.ts +11 -11
- package/dist/components/LpLink.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +20 -2
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.d.ts +4 -4
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.d.ts +16 -6
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.d.ts +0 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.d.ts +11 -2
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +2 -0
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpNumberFlow.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.d.ts +2 -0
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.d.ts +21 -2
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPopover.vue.d.ts +2 -0
- package/dist/components/LpPopover.vue.js +1 -1
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpSection.vue.d.ts +1 -1
- package/dist/components/LpSegmented.vue.d.ts +5 -0
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.d.ts +1 -0
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.d.ts +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +11 -8
- package/dist/components/LpSidebar.vue.d.ts +6 -2
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSkeleton.vue.js +1 -1
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpSparkline.vue.d.ts +1 -0
- package/dist/components/LpSparkline.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +23 -1
- package/dist/components/LpTable.vue.js +74 -36
- package/dist/components/LpTableOfContents.vue.d.ts +4 -2
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTabs.vue.d.ts +2 -0
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTextarea.vue.d.ts +19 -6
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeProvider.vue.d.ts +22 -0
- package/dist/components/LpThemeProvider.vue.js +4 -0
- package/dist/components/LpThemeSwitcher.vue.d.ts +13 -0
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTilt.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.d.ts +6 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.d.ts +1 -2
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTooltipProvider.vue.d.ts +22 -0
- package/dist/components/LpTooltipProvider.vue.js +4 -0
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.d.ts +4 -0
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/chart.d.ts +32 -1
- package/dist/components/chart.js +39 -4
- package/dist/components/codeHighlight.d.ts +6 -0
- package/dist/components/codeHighlight.js +92 -20
- package/dist/components/color.d.ts +1 -1
- package/dist/components/color.js +20 -9
- package/dist/components/commandSearch.d.ts +0 -1
- package/dist/components/commandSearch.js +1 -17
- package/dist/components/confirm.d.ts +25 -0
- package/dist/components/confirm.js +26 -0
- package/dist/components/countries.d.ts +6 -0
- package/dist/components/countries.js +7 -0
- package/dist/components/fileTree.js +16 -7
- package/dist/components/imageCrop.d.ts +42 -0
- package/dist/components/imageCrop.js +47 -0
- package/dist/components/link.d.ts +12 -0
- package/dist/components/link.js +19 -0
- package/dist/components/modalDepth.d.ts +18 -2
- package/dist/components/modalDepth.js +17 -5
- package/dist/components/otp.d.ts +5 -0
- package/dist/components/otp.js +10 -0
- package/dist/components/sidebar.d.ts +7 -1
- package/dist/components/tableSort.d.ts +8 -0
- package/dist/components/tableSort.js +31 -0
- package/dist/composables/useField.d.ts +34 -0
- package/dist/composables/useField.js +45 -0
- package/dist/composables/useFormDraft.d.ts +10 -3
- package/dist/composables/useFormDraft.js +9 -14
- package/dist/composables/useHotkeys.d.ts +17 -1
- package/dist/composables/useHotkeys.js +55 -18
- package/dist/composables/useInputFilter.d.ts +17 -0
- package/dist/composables/useInputFilter.js +47 -10
- package/dist/composables/useLpConfig.d.ts +24 -0
- package/dist/composables/useLpConfig.js +44 -0
- package/dist/composables/useRovingFocus.js +7 -0
- package/dist/composables/useTilt.d.ts +2 -2
- package/dist/composables/useTilt.js +5 -6
- package/dist/composables/useToast.d.ts +20 -0
- package/dist/composables/useToast.js +28 -4
- package/dist/composables/useZoomPan.d.ts +3 -3
- package/dist/composables/useZoomPan.js +4 -4
- package/dist/index.d.ts +33 -3
- package/dist/index.js +185 -139
- package/dist/layout/tree.d.ts +2 -0
- package/dist/layout/tree.js +16 -1
- package/dist/layout/useLayout.d.ts +15 -0
- package/dist/layout/useLayout.js +41 -14
- package/dist/theme/useTheme.d.ts +32 -9
- package/package.json +8 -7
- package/src/component-names.ts +5 -7
- package/src/components/ContextMenuItems.vue +88 -0
- package/src/components/LayoutCanvas.vue +26 -6
- package/src/components/LayoutNode.vue +19 -2
- package/src/components/LpActionBar.vue +30 -7
- package/src/components/LpAddressInput.vue +57 -41
- package/src/components/LpAlert.vue +16 -3
- package/src/components/LpAppShell.vue +45 -12
- package/src/components/LpAutocomplete.vue +46 -10
- package/src/components/LpAvatar.vue +19 -5
- package/src/components/LpBreadcrumbs.vue +65 -41
- package/src/components/LpButton.vue +59 -13
- package/src/components/LpChart.vue +272 -28
- package/src/components/LpCheckbox.vue +7 -3
- package/src/components/LpCodeBlock.vue +50 -14
- package/src/components/LpColorPicker.vue +39 -9
- package/src/components/LpCommandPalette.vue +36 -25
- package/src/components/LpConfirmDialog.vue +68 -17
- package/src/components/LpConfirmHost.vue +59 -0
- package/src/components/LpContextMenu.vue +14 -115
- package/src/components/LpDatePicker.vue +99 -68
- package/src/components/LpDrawer.vue +56 -19
- package/src/components/LpDropzone.vue +21 -4
- package/src/components/LpFileTree.vue +33 -7
- package/src/components/LpFormField.vue +30 -7
- package/src/components/LpImageEditor.vue +96 -57
- package/src/components/LpInput.vue +18 -7
- package/src/components/LpLightbox.vue +140 -29
- package/src/components/LpLink.vue +24 -13
- package/src/components/LpLogViewer.vue +86 -17
- package/src/components/LpMapPicker.vue +36 -13
- package/src/components/LpMediaGallery.vue +8 -2
- package/src/components/LpModal.vue +53 -27
- package/src/components/LpModalNav.vue +5 -2
- package/src/components/LpNotificationBell.vue +63 -17
- package/src/components/LpNumberField.vue +21 -6
- package/src/components/LpNumberFlow.vue +26 -10
- package/src/components/LpOtpInput.vue +43 -8
- package/src/components/LpPagination.vue +23 -7
- package/src/components/LpPasswordInput.vue +4 -1
- package/src/components/LpPhoneInput.vue +53 -27
- package/src/components/LpPie.vue +94 -15
- package/src/components/LpPopover.vue +3 -0
- package/src/components/LpProgress.vue +5 -3
- package/src/components/LpRadioGroup.vue +9 -2
- package/src/components/LpSegmented.vue +12 -2
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpShortcutsDialog.vue +8 -3
- package/src/components/LpSidebar.vue +14 -9
- package/src/components/LpSidebarNav.vue +17 -5
- package/src/components/LpSkeleton.vue +4 -1
- package/src/components/LpSlider.vue +7 -1
- package/src/components/LpSparkline.vue +11 -3
- package/src/components/LpSwitch.vue +30 -7
- package/src/components/LpTable.vue +91 -32
- package/src/components/LpTableOfContents.vue +50 -32
- package/src/components/LpTabs.vue +23 -6
- package/src/components/LpTextarea.vue +44 -6
- package/src/components/LpThemeProvider.vue +41 -0
- package/src/components/LpThemeSwitcher.vue +64 -17
- package/src/components/LpTilt.vue +2 -2
- package/src/components/LpTimeField.vue +14 -3
- package/src/components/LpToaster.vue +66 -26
- package/src/components/LpTooltip.vue +22 -5
- package/src/components/LpTooltipProvider.vue +24 -0
- package/src/components/LpTopologyCanvas.vue +12 -1
- package/src/components/LpUptimeBar.vue +46 -8
- package/src/components/chart.ts +77 -5
- package/src/components/codeHighlight.ts +111 -15
- package/src/components/color.ts +30 -9
- package/src/components/commandSearch.ts +0 -17
- package/src/components/confirm.ts +58 -0
- package/src/components/countries.ts +12 -0
- package/src/components/fileTree.ts +19 -7
- package/src/components/imageCrop.ts +107 -0
- package/src/components/link.ts +34 -0
- package/src/components/modalDepth.ts +48 -6
- package/src/components/otp.ts +16 -0
- package/src/components/sidebar.ts +7 -1
- package/src/components/tableSort.ts +37 -0
- package/src/composables/useField.ts +79 -0
- package/src/composables/useFormDraft.ts +25 -20
- package/src/composables/useHotkeys.ts +89 -18
- package/src/composables/useInputFilter.ts +77 -14
- package/src/composables/useLpConfig.ts +87 -0
- package/src/composables/useRovingFocus.ts +11 -0
- package/src/composables/useTilt.ts +5 -6
- package/src/composables/useToast.ts +56 -4
- package/src/composables/useZoomPan.ts +6 -6
- package/src/index.ts +38 -3
- package/src/layout/tree.ts +30 -0
- package/src/layout/useLayout.ts +68 -18
- package/src/nuxt.ts +59 -17
- package/src/runtime/config.plugin.ts +14 -0
- package/src/runtime/theme.plugin.ts +42 -22
- package/src/theme/useTheme.ts +206 -100
- package/dist/chunks/LpBreadcrumbs-p4jHe_V-.js +0 -62
- package/dist/chunks/LpContextMenu-CwW1QXe_.js +0 -217
- package/dist/chunks/LpDatePicker-CwOToxGq.js +0 -164
- package/dist/chunks/LpFormField-CazBc2-a.js +0 -62
- package/dist/chunks/LpTextarea-t7F6gv8E.js +0 -47
|
@@ -21,6 +21,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
21
21
|
height?: string;
|
|
22
22
|
/** Auto-collapse a leading import/package block (no markers needed). */
|
|
23
23
|
foldImports?: boolean;
|
|
24
|
+
labels?: Partial<Record<"unlock" | "lock" | "copy" | "copied" | "imports" | "details" | "lines", string>>;
|
|
24
25
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
25
26
|
"update:modelValue": (value: string) => any;
|
|
26
27
|
"update:locked": (value: boolean) => any;
|
|
@@ -44,6 +45,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
44
45
|
height?: string;
|
|
45
46
|
/** Auto-collapse a leading import/package block (no markers needed). */
|
|
46
47
|
foldImports?: boolean;
|
|
48
|
+
labels?: Partial<Record<"unlock" | "lock" | "copy" | "copied" | "imports" | "details" | "lines", string>>;
|
|
47
49
|
}> & Readonly<{
|
|
48
50
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
49
51
|
"onUpdate:locked"?: ((value: boolean) => any) | undefined;
|
|
@@ -39,7 +39,7 @@ export interface Command {
|
|
|
39
39
|
* `onSelect` still runs when the mode opens, so a command can both act and
|
|
40
40
|
* drill in.
|
|
41
41
|
*/
|
|
42
|
-
children?: Command[] | ((query: string) => Command[] | Promise<Command[]>);
|
|
42
|
+
children?: Command[] | ((query: string, signal: AbortSignal) => Command[] | Promise<Command[]>);
|
|
43
43
|
/** Placeholder while inside this command's mode. */
|
|
44
44
|
childPlaceholder?: string;
|
|
45
45
|
/**
|
|
@@ -72,7 +72,7 @@ export interface Command {
|
|
|
72
72
|
onSelect?: () => void;
|
|
73
73
|
}
|
|
74
74
|
/** Footer hints and the mode chip, spelled out so an app can translate them. */
|
|
75
|
-
export
|
|
75
|
+
export type PaletteLabels = {
|
|
76
76
|
navigate: string;
|
|
77
77
|
select: string;
|
|
78
78
|
close: string;
|
|
@@ -95,7 +95,12 @@ export interface PaletteLabels {
|
|
|
95
95
|
* text is never displayed. Kept so existing `labels` objects still type-check.
|
|
96
96
|
*/
|
|
97
97
|
noPreview?: string;
|
|
98
|
-
|
|
98
|
+
/** Accessible name and description of the dialog, read by screen readers only. */
|
|
99
|
+
title?: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
/** The key hint printed beside the box and in the footer. */
|
|
102
|
+
esc?: string;
|
|
103
|
+
};
|
|
99
104
|
type __VLS_Props = {
|
|
100
105
|
open?: boolean;
|
|
101
106
|
commands: Command[];
|
|
@@ -139,12 +144,6 @@ type __VLS_Props = {
|
|
|
139
144
|
* other group off the screen. 0 shows everything.
|
|
140
145
|
*/
|
|
141
146
|
groupLimit?: number;
|
|
142
|
-
/**
|
|
143
|
-
* When the query matches nothing, retry it as if typed in the other
|
|
144
|
-
* keyboard layout (QWERTY ↔ Cyrillic). Off for an app whose commands are
|
|
145
|
-
* meant to be typed in one layout only.
|
|
146
|
-
*/
|
|
147
|
-
layoutFallback?: boolean;
|
|
148
147
|
/**
|
|
149
148
|
* A pane beside the list showing the highlighted result in full — its
|
|
150
149
|
* `preview` text, or the `preview` slot. For palettes that search
|
|
@@ -193,7 +192,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
193
192
|
resultsLabel: string;
|
|
194
193
|
excerptLines: number;
|
|
195
194
|
groupLimit: number;
|
|
196
|
-
layoutFallback: boolean;
|
|
197
195
|
previewPane: boolean;
|
|
198
196
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
199
197
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, useId, computed, shallowRef, useSlots, watch, nextTick, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, normalizeClass, withModifiers, createTextVNode, toDisplayString, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, Transition, renderSlot } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
3
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon-CCnX5_2j.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-D8xyKXcF.js";
|
|
@@ -7,65 +7,68 @@ import { useGlass } from "../composables/useGlass.js";
|
|
|
7
7
|
import { useClipboard } from "../composables/useClipboard.js";
|
|
8
8
|
import { useHotkeys } from "../composables/useHotkeys.js";
|
|
9
9
|
import { useModalLayer } from "./modalDepth.js";
|
|
10
|
-
import {
|
|
10
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
11
|
+
import { parseCommandQuery, rankCommandItems } from "./commandSearch.js";
|
|
11
12
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
12
|
-
import '../assets/LpCommandPalette-
|
|
13
|
+
import '../assets/LpCommandPalette-DCP5g2ik.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
|
|
13
14
|
const _hoisted_2 = ["title", "onClick"];
|
|
14
15
|
const _hoisted_3 = ["aria-activedescendant", "placeholder", "onKeydown"];
|
|
15
|
-
const _hoisted_4 = {
|
|
16
|
+
const _hoisted_4 = { class: "shrink-0 rounded border border-line px-1.5 py-0.5 text-[10px] text-muted" };
|
|
17
|
+
const _hoisted_5 = {
|
|
16
18
|
key: 0,
|
|
17
19
|
class: "px-2 py-10 text-center text-sm text-muted"
|
|
18
20
|
};
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
21
|
+
const _hoisted_6 = ["aria-labelledby"];
|
|
22
|
+
const _hoisted_7 = ["id"];
|
|
23
|
+
const _hoisted_8 = { class: "min-w-0 flex-1" };
|
|
24
|
+
const _hoisted_9 = { class: "block truncate font-medium" };
|
|
25
|
+
const _hoisted_10 = {
|
|
24
26
|
key: 0,
|
|
25
27
|
class: "rounded-xs bg-brand/25 text-ink"
|
|
26
28
|
};
|
|
27
|
-
const
|
|
29
|
+
const _hoisted_11 = {
|
|
28
30
|
key: 0,
|
|
29
31
|
class: "mt-0.5 block truncate text-xs text-muted"
|
|
30
32
|
};
|
|
31
|
-
const
|
|
33
|
+
const _hoisted_12 = {
|
|
32
34
|
key: 0,
|
|
33
35
|
class: "rounded-xs bg-brand/20 text-ink"
|
|
34
36
|
};
|
|
35
|
-
const
|
|
37
|
+
const _hoisted_13 = {
|
|
36
38
|
key: 0,
|
|
37
39
|
class: "rounded-xs bg-brand/20 text-ink"
|
|
38
40
|
};
|
|
39
|
-
const
|
|
41
|
+
const _hoisted_14 = {
|
|
40
42
|
key: 1,
|
|
41
43
|
class: "shrink-0 text-xs text-muted"
|
|
42
44
|
};
|
|
43
|
-
const
|
|
45
|
+
const _hoisted_15 = {
|
|
44
46
|
key: 0,
|
|
45
47
|
class: "lp-cmd-pane hidden min-h-0 shrink-0 flex-col border-l border-line md:flex"
|
|
46
48
|
};
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const
|
|
49
|
+
const _hoisted_16 = { class: "lp-cmd-para flex items-center gap-2 text-ink" };
|
|
50
|
+
const _hoisted_17 = { class: "min-w-0 text-base font-semibold" };
|
|
51
|
+
const _hoisted_18 = {
|
|
50
52
|
key: 0,
|
|
51
53
|
class: "lp-cmd-para mt-0.5 text-xs text-muted"
|
|
52
54
|
};
|
|
53
|
-
const
|
|
55
|
+
const _hoisted_19 = {
|
|
54
56
|
key: 0,
|
|
55
57
|
class: "rounded-xs bg-brand/25 text-ink"
|
|
56
58
|
};
|
|
57
|
-
const
|
|
58
|
-
const _hoisted_20 = { class: "flex items-center gap-1" };
|
|
59
|
+
const _hoisted_20 = { class: "flex shrink-0 items-center gap-4 border-t border-line px-4 py-2.5 text-[11px] text-muted" };
|
|
59
60
|
const _hoisted_21 = { class: "flex items-center gap-1" };
|
|
60
|
-
const _hoisted_22 = {
|
|
61
|
+
const _hoisted_22 = { class: "flex items-center gap-1" };
|
|
62
|
+
const _hoisted_23 = {
|
|
61
63
|
key: 0,
|
|
62
64
|
class: "flex items-center gap-1"
|
|
63
65
|
};
|
|
64
|
-
const
|
|
66
|
+
const _hoisted_24 = {
|
|
65
67
|
key: 1,
|
|
66
68
|
class: "flex items-center gap-1"
|
|
67
69
|
};
|
|
68
|
-
const
|
|
70
|
+
const _hoisted_25 = { class: "ml-auto flex items-center gap-1" };
|
|
71
|
+
const _hoisted_26 = { class: "rounded border border-line px-1 text-[10px]" };
|
|
69
72
|
const STAGGER_MS = 45;
|
|
70
73
|
const STAGGER_MAX = 10;
|
|
71
74
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -86,7 +89,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
89
|
labels: {},
|
|
87
90
|
excerptLines: { default: 4 },
|
|
88
91
|
groupLimit: { default: 0 },
|
|
89
|
-
layoutFallback: { type: Boolean, default: true },
|
|
90
92
|
previewPane: { type: Boolean, default: false },
|
|
91
93
|
glass: { type: Boolean, default: void 0 }
|
|
92
94
|
},
|
|
@@ -94,7 +96,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
94
96
|
setup(__props, { emit: __emit }) {
|
|
95
97
|
const props = __props;
|
|
96
98
|
const frosted = useGlass(() => props.glass);
|
|
97
|
-
const
|
|
99
|
+
const contentRef = ref(null);
|
|
100
|
+
const { claim, release, layer } = useModalLayer({ element: () => contentRef.value?.$el });
|
|
98
101
|
const DEFAULT_LABELS = {
|
|
99
102
|
navigate: "navigate",
|
|
100
103
|
select: "select",
|
|
@@ -108,9 +111,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
108
111
|
openInNewTab: "Open in new tab",
|
|
109
112
|
copyLink: "Copy link",
|
|
110
113
|
linkCopied: "Link copied",
|
|
111
|
-
noPreview: "No preview"
|
|
114
|
+
noPreview: "No preview",
|
|
115
|
+
title: "Command palette",
|
|
116
|
+
description: "Search and run a command.",
|
|
117
|
+
esc: "esc"
|
|
112
118
|
};
|
|
113
|
-
const text =
|
|
119
|
+
const text = useLabels("palette", DEFAULT_LABELS, () => props.labels);
|
|
114
120
|
const emit = __emit;
|
|
115
121
|
const query = ref("");
|
|
116
122
|
const listId = `lp-cmd-${useId()}`;
|
|
@@ -151,12 +157,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
151
157
|
}
|
|
152
158
|
const selectedActions = computed(() => actionsOf(flat.value[selectedIndex.value]));
|
|
153
159
|
function onTab(event) {
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
event.stopPropagation();
|
|
156
160
|
if (event.shiftKey) return;
|
|
157
161
|
const c = flat.value[selectedIndex.value];
|
|
158
162
|
const actions = selectedActions.value;
|
|
159
163
|
if (!c || !actions.length) return;
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
event.stopPropagation();
|
|
160
166
|
enter({ id: `${c.id}:actions`, label: c.label, icon: c.icon, children: actions });
|
|
161
167
|
}
|
|
162
168
|
function enter(c) {
|
|
@@ -195,7 +201,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
195
201
|
function fetcher() {
|
|
196
202
|
const current = mode.value;
|
|
197
203
|
if (current) {
|
|
198
|
-
return typeof current.children === "function" ?
|
|
204
|
+
return typeof current.children === "function" ? current.children : null;
|
|
199
205
|
}
|
|
200
206
|
return props.search ?? null;
|
|
201
207
|
}
|
|
@@ -227,10 +233,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
227
233
|
const filtered = query.value.trim() ? source.value : source.value.filter((c) => !c.hidden);
|
|
228
234
|
if (!terms.include.length && !terms.exclude.length && !terms.groups.length) return { items: filtered, terms: [] };
|
|
229
235
|
const items = rankCommandItems(filtered, terms);
|
|
230
|
-
|
|
231
|
-
const swapped = swapCommandTerms(terms);
|
|
232
|
-
const other = rankCommandItems(filtered, swapped);
|
|
233
|
-
return other.length ? { items: other, terms: swapped.include } : { items, terms: terms.include };
|
|
236
|
+
return { items, terms: terms.include };
|
|
234
237
|
});
|
|
235
238
|
const ranked = computed(() => local.value.items);
|
|
236
239
|
const fetched = computed(() => {
|
|
@@ -304,8 +307,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
304
307
|
else viewport.scrollTop = 0;
|
|
305
308
|
}
|
|
306
309
|
);
|
|
310
|
+
const flatIndex = computed(() => new Map(flat.value.map((c, i) => [c, i])));
|
|
307
311
|
function flatIndexOf(c) {
|
|
308
|
-
return
|
|
312
|
+
return flatIndex.value.get(c) ?? -1;
|
|
309
313
|
}
|
|
310
314
|
function highlight(value, extra = []) {
|
|
311
315
|
const terms = [...new Set([...local.value.terms, ...extra.map((t) => t.toLowerCase())].filter((t) => t.length >= 2))].sort(
|
|
@@ -380,6 +384,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
380
384
|
function onPaletteKeydown(event) {
|
|
381
385
|
if (event.isComposing) return;
|
|
382
386
|
if (!["ArrowDown", "ArrowUp", "Home", "End", "PageDown", "PageUp"].includes(event.key)) return;
|
|
387
|
+
const typing = event.target instanceof HTMLInputElement && event.target.value !== "";
|
|
388
|
+
if (typing && (event.key === "Home" || event.key === "End")) return;
|
|
383
389
|
event.preventDefault();
|
|
384
390
|
event.stopPropagation();
|
|
385
391
|
if (event.key === "ArrowDown") moveDown();
|
|
@@ -476,6 +482,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
476
482
|
code: "KeyK",
|
|
477
483
|
ctrl: true,
|
|
478
484
|
allowInInput: true,
|
|
485
|
+
overLayers: true,
|
|
486
|
+
repeat: false,
|
|
479
487
|
handler: () => emit("update:open", !props.open)
|
|
480
488
|
}
|
|
481
489
|
] : []
|
|
@@ -493,6 +501,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
493
501
|
style: normalizeStyle({ zIndex: unref(layer).scrim })
|
|
494
502
|
}, null, 8, ["class", "style"]),
|
|
495
503
|
createVNode(unref(DialogContent), {
|
|
504
|
+
ref_key: "contentRef",
|
|
505
|
+
ref: contentRef,
|
|
496
506
|
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--nested" : "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-split"]]),
|
|
497
507
|
style: normalizeStyle({ zIndex: unref(layer).panel }),
|
|
498
508
|
"data-pane": paneOpen.value ? "open" : void 0,
|
|
@@ -502,15 +512,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
502
512
|
}, {
|
|
503
513
|
default: withCtx(() => [
|
|
504
514
|
createVNode(unref(DialogTitle), { class: "sr-only" }, {
|
|
505
|
-
default: withCtx(() => [
|
|
506
|
-
createTextVNode(
|
|
507
|
-
])
|
|
515
|
+
default: withCtx(() => [
|
|
516
|
+
createTextVNode(toDisplayString(unref(text).title), 1)
|
|
517
|
+
]),
|
|
508
518
|
_: 1
|
|
509
519
|
}),
|
|
510
520
|
createVNode(unref(DialogDescription), { class: "sr-only" }, {
|
|
511
|
-
default: withCtx(() => [
|
|
512
|
-
createTextVNode(
|
|
513
|
-
])
|
|
521
|
+
default: withCtx(() => [
|
|
522
|
+
createTextVNode(toDisplayString(unref(text).description), 1)
|
|
523
|
+
]),
|
|
514
524
|
_: 1
|
|
515
525
|
}),
|
|
516
526
|
createElementVNode("div", _hoisted_1, [
|
|
@@ -530,7 +540,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
530
540
|
key: step.id,
|
|
531
541
|
type: "button",
|
|
532
542
|
class: "flex shrink-0 items-center gap-1.5 rounded-md bg-brand-soft px-2 py-1 text-xs font-medium text-brand transition-opacity hover:opacity-80",
|
|
533
|
-
title: text.
|
|
543
|
+
title: unref(text).back,
|
|
534
544
|
onClick: ($event) => popTo(i)
|
|
535
545
|
}, [
|
|
536
546
|
step.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
@@ -567,7 +577,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
567
577
|
}, null, 40, _hoisted_3), [
|
|
568
578
|
[vModelText, query.value]
|
|
569
579
|
]),
|
|
570
|
-
|
|
580
|
+
createElementVNode("kbd", _hoisted_4, toDisplayString(unref(text).esc), 1)
|
|
571
581
|
]),
|
|
572
582
|
createElementVNode("div", {
|
|
573
583
|
class: "flex min-h-0 flex-1",
|
|
@@ -580,7 +590,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
580
590
|
"content-class": "p-2"
|
|
581
591
|
}, {
|
|
582
592
|
default: withCtx(() => [
|
|
583
|
-
flat.value.length === 0 && !failed.value ? (openBlock(), createElementBlock("p",
|
|
593
|
+
flat.value.length === 0 && !failed.value ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(unref(searching) ? unref(text).searching : __props.emptyText), 1)) : createCommentVNode("", true),
|
|
584
594
|
createElementVNode("div", {
|
|
585
595
|
id: listId,
|
|
586
596
|
role: "listbox"
|
|
@@ -595,7 +605,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
595
605
|
key: 0,
|
|
596
606
|
id: `${listId}-g${gi}`,
|
|
597
607
|
class: "px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted"
|
|
598
|
-
}, toDisplayString(group.name), 9,
|
|
608
|
+
}, toDisplayString(group.name), 9, _hoisted_7)) : createCommentVNode("", true),
|
|
599
609
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.items, (c) => {
|
|
600
610
|
return openBlock(), createBlock(resolveDynamicComponent(c.href ? "a" : "button"), {
|
|
601
611
|
id: optionId(flatIndexOf(c)),
|
|
@@ -622,24 +632,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
622
632
|
size: 16,
|
|
623
633
|
class: normalizeClass(["shrink-0", { "mt-0.5": c.excerpt }])
|
|
624
634
|
}, null, 8, ["name", "class"])) : createCommentVNode("", true),
|
|
625
|
-
createElementVNode("span",
|
|
626
|
-
createElementVNode("span",
|
|
635
|
+
createElementVNode("span", _hoisted_8, [
|
|
636
|
+
createElementVNode("span", _hoisted_9, [
|
|
627
637
|
(openBlock(true), createElementBlock(Fragment, null, renderList(highlight(c.label, c.highlight), (p, pi) => {
|
|
628
638
|
return openBlock(), createElementBlock(Fragment, {
|
|
629
639
|
key: `l${pi}`
|
|
630
640
|
}, [
|
|
631
|
-
p.hit ? (openBlock(), createElementBlock("mark",
|
|
641
|
+
p.hit ? (openBlock(), createElementBlock("mark", _hoisted_10, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
632
642
|
createTextVNode(toDisplayString(p.text), 1)
|
|
633
643
|
], 64))
|
|
634
644
|
], 64);
|
|
635
645
|
}), 128))
|
|
636
646
|
]),
|
|
637
|
-
c.description ? (openBlock(), createElementBlock("span",
|
|
647
|
+
c.description ? (openBlock(), createElementBlock("span", _hoisted_11, [
|
|
638
648
|
(openBlock(true), createElementBlock(Fragment, null, renderList(highlight(c.description, c.highlight), (p, pi) => {
|
|
639
649
|
return openBlock(), createElementBlock(Fragment, {
|
|
640
650
|
key: `d${pi}`
|
|
641
651
|
}, [
|
|
642
|
-
p.hit ? (openBlock(), createElementBlock("mark",
|
|
652
|
+
p.hit ? (openBlock(), createElementBlock("mark", _hoisted_12, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
643
653
|
createTextVNode(toDisplayString(p.text), 1)
|
|
644
654
|
], 64))
|
|
645
655
|
], 64);
|
|
@@ -654,14 +664,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
654
664
|
return openBlock(), createElementBlock(Fragment, {
|
|
655
665
|
key: `e${pi}`
|
|
656
666
|
}, [
|
|
657
|
-
p.hit ? (openBlock(), createElementBlock("mark",
|
|
667
|
+
p.hit ? (openBlock(), createElementBlock("mark", _hoisted_13, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
658
668
|
createTextVNode(toDisplayString(p.text), 1)
|
|
659
669
|
], 64))
|
|
660
670
|
], 64);
|
|
661
671
|
}), 128))
|
|
662
672
|
], 4)) : createCommentVNode("", true)
|
|
663
673
|
]),
|
|
664
|
-
c.shortcut ? (openBlock(), createElementBlock("kbd",
|
|
674
|
+
c.shortcut ? (openBlock(), createElementBlock("kbd", _hoisted_14, toDisplayString(c.shortcut), 1)) : c.children ? (openBlock(), createBlock(_sfc_main$1, {
|
|
665
675
|
key: 2,
|
|
666
676
|
name: "lucide:chevron-right",
|
|
667
677
|
size: 14,
|
|
@@ -671,7 +681,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
671
681
|
_: 2
|
|
672
682
|
}, 1064, ["id", "href", "type", "aria-selected", "aria-disabled", "data-cmd-index", "disabled", "class", "onClick", "onPointerenter"]);
|
|
673
683
|
}), 128))
|
|
674
|
-
], 8,
|
|
684
|
+
], 8, _hoisted_6);
|
|
675
685
|
}), 128))
|
|
676
686
|
]),
|
|
677
687
|
failed.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -684,7 +694,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
684
694
|
size: 15,
|
|
685
695
|
class: "shrink-0"
|
|
686
696
|
}),
|
|
687
|
-
createElementVNode("span", null, toDisplayString(text.
|
|
697
|
+
createElementVNode("span", null, toDisplayString(unref(text).searchFailed), 1),
|
|
688
698
|
createElementVNode("button", {
|
|
689
699
|
type: "button",
|
|
690
700
|
class: "rounded-md 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",
|
|
@@ -692,14 +702,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
692
702
|
refresh();
|
|
693
703
|
inputRef.value?.focus();
|
|
694
704
|
})
|
|
695
|
-
}, toDisplayString(text.
|
|
705
|
+
}, toDisplayString(unref(text).retry), 1)
|
|
696
706
|
], 2)) : createCommentVNode("", true)
|
|
697
707
|
]),
|
|
698
708
|
_: 1
|
|
699
709
|
}, 512),
|
|
700
710
|
createVNode(Transition, { name: "lp-cmd-pane" }, {
|
|
701
711
|
default: withCtx(() => [
|
|
702
|
-
paneOpen.value ? (openBlock(), createElementBlock("aside",
|
|
712
|
+
paneOpen.value ? (openBlock(), createElementBlock("aside", _hoisted_15, [
|
|
703
713
|
createVNode(_sfc_main$2, {
|
|
704
714
|
ref_key: "previewRef",
|
|
705
715
|
ref: previewRef,
|
|
@@ -711,16 +721,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
711
721
|
key: active.value.id
|
|
712
722
|
}, [
|
|
713
723
|
renderSlot(_ctx.$slots, "preview", { command: active.value }, () => [
|
|
714
|
-
createElementVNode("div",
|
|
724
|
+
createElementVNode("div", _hoisted_16, [
|
|
715
725
|
active.value.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
716
726
|
key: 0,
|
|
717
727
|
name: active.value.icon,
|
|
718
728
|
size: 16,
|
|
719
729
|
class: "shrink-0 text-muted"
|
|
720
730
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
721
|
-
createElementVNode("h3",
|
|
731
|
+
createElementVNode("h3", _hoisted_17, toDisplayString(active.value.label), 1)
|
|
722
732
|
]),
|
|
723
|
-
active.value.description ? (openBlock(), createElementBlock("p",
|
|
733
|
+
active.value.description ? (openBlock(), createElementBlock("p", _hoisted_18, toDisplayString(active.value.description), 1)) : createCommentVNode("", true),
|
|
724
734
|
(openBlock(true), createElementBlock(Fragment, null, renderList(paragraphs.value, (para, i) => {
|
|
725
735
|
return openBlock(), createElementBlock("p", {
|
|
726
736
|
key: i,
|
|
@@ -731,7 +741,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
731
741
|
return openBlock(), createElementBlock(Fragment, {
|
|
732
742
|
key: `p${pi}`
|
|
733
743
|
}, [
|
|
734
|
-
p.hit ? (openBlock(), createElementBlock("mark",
|
|
744
|
+
p.hit ? (openBlock(), createElementBlock("mark", _hoisted_19, toDisplayString(p.text), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
735
745
|
createTextVNode(toDisplayString(p.text), 1)
|
|
736
746
|
], 64))
|
|
737
747
|
], 64);
|
|
@@ -748,27 +758,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
748
758
|
_: 3
|
|
749
759
|
})
|
|
750
760
|
], 32),
|
|
751
|
-
createElementVNode("div",
|
|
752
|
-
createElementVNode("span", _hoisted_20, [
|
|
753
|
-
_cache[7] || (_cache[7] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "↑", -1)),
|
|
754
|
-
_cache[8] || (_cache[8] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "↓", -1)),
|
|
755
|
-
createTextVNode(" " + toDisplayString(text.value.navigate), 1)
|
|
756
|
-
]),
|
|
761
|
+
createElementVNode("div", _hoisted_20, [
|
|
757
762
|
createElementVNode("span", _hoisted_21, [
|
|
758
|
-
_cache[
|
|
759
|
-
|
|
763
|
+
_cache[4] || (_cache[4] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "↑", -1)),
|
|
764
|
+
_cache[5] || (_cache[5] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "↓", -1)),
|
|
765
|
+
createTextVNode(" " + toDisplayString(unref(text).navigate), 1)
|
|
766
|
+
]),
|
|
767
|
+
createElementVNode("span", _hoisted_22, [
|
|
768
|
+
_cache[6] || (_cache[6] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "↵", -1)),
|
|
769
|
+
createTextVNode(" " + toDisplayString(unref(text).select), 1)
|
|
760
770
|
]),
|
|
761
|
-
selectedActions.value.length ? (openBlock(), createElementBlock("span",
|
|
762
|
-
_cache[
|
|
763
|
-
createTextVNode(" " + toDisplayString(text.
|
|
771
|
+
selectedActions.value.length ? (openBlock(), createElementBlock("span", _hoisted_23, [
|
|
772
|
+
_cache[7] || (_cache[7] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "tab", -1)),
|
|
773
|
+
createTextVNode(" " + toDisplayString(unref(text).actions), 1)
|
|
764
774
|
])) : createCommentVNode("", true),
|
|
765
|
-
trail.value.length ? (openBlock(), createElementBlock("span",
|
|
766
|
-
_cache[
|
|
767
|
-
createTextVNode(" " + toDisplayString(text.
|
|
775
|
+
trail.value.length ? (openBlock(), createElementBlock("span", _hoisted_24, [
|
|
776
|
+
_cache[8] || (_cache[8] = createElementVNode("kbd", { class: "rounded border border-line px-1 text-[10px]" }, "⌫", -1)),
|
|
777
|
+
createTextVNode(" " + toDisplayString(unref(text).back), 1)
|
|
768
778
|
])) : createCommentVNode("", true),
|
|
769
|
-
createElementVNode("span",
|
|
770
|
-
|
|
771
|
-
createTextVNode(" " + toDisplayString(text.
|
|
779
|
+
createElementVNode("span", _hoisted_25, [
|
|
780
|
+
createElementVNode("kbd", _hoisted_26, toDisplayString(unref(text).esc), 1),
|
|
781
|
+
createTextVNode(" " + toDisplayString(unref(text).close), 1)
|
|
772
782
|
])
|
|
773
783
|
])
|
|
774
784
|
]),
|
|
@@ -783,7 +793,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
783
793
|
};
|
|
784
794
|
}
|
|
785
795
|
});
|
|
786
|
-
const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
796
|
+
const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7fa6825e"]]);
|
|
787
797
|
export {
|
|
788
798
|
LpCommandPalette as default
|
|
789
799
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export type ConfirmLabels = {
|
|
2
|
+
confirm: string;
|
|
3
|
+
cancel: string;
|
|
4
|
+
loading: string;
|
|
5
|
+
failed: string;
|
|
6
|
+
};
|
|
1
7
|
type __VLS_Props = {
|
|
2
8
|
open?: boolean;
|
|
3
9
|
title?: string;
|
|
@@ -25,11 +31,20 @@ type __VLS_Props = {
|
|
|
25
31
|
* The confirm action is in flight: the button disables and swaps to
|
|
26
32
|
* `loadingLabel`, and confirming no longer closes the dialog — the owner
|
|
27
33
|
* closes it once the work settles, so a failure can stay on screen.
|
|
34
|
+
* Setting it from the `confirm` handler is enough; the dialog waits a tick
|
|
35
|
+
* for it before deciding to close.
|
|
28
36
|
*/
|
|
29
37
|
loading?: boolean;
|
|
30
38
|
loadingLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The work behind the confirm button. When given, the dialog runs it,
|
|
41
|
+
* shows the loading state itself, closes once it resolves and stays open
|
|
42
|
+
* with the error's message when it rejects.
|
|
43
|
+
*/
|
|
44
|
+
action?: () => unknown;
|
|
31
45
|
/** Frosted glass panel, passed to LpModal. Follows `provideGlass` when unset. */
|
|
32
46
|
glass?: boolean;
|
|
47
|
+
labels?: Partial<ConfirmLabels>;
|
|
33
48
|
};
|
|
34
49
|
declare var __VLS_16: {};
|
|
35
50
|
type __VLS_Slots = {} & {
|
|
@@ -45,9 +60,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
45
60
|
onConfirm?: (() => any) | undefined;
|
|
46
61
|
}>, {
|
|
47
62
|
glass: boolean;
|
|
48
|
-
confirmLabel: string;
|
|
49
|
-
cancelLabel: string;
|
|
50
|
-
loadingLabel: string;
|
|
51
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
64
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
65
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Frosted glass panel. Follows `provideGlass` when unset. */
|
|
3
|
+
glass?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
glass: boolean;
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -7,7 +7,7 @@ export interface ContextMenuItemDef {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
separatorBefore?: boolean;
|
|
9
9
|
onSelect?: () => void;
|
|
10
|
-
/** Nested submenu. When present, onSelect is ignored. */
|
|
10
|
+
/** Nested submenu, to any depth. When present, onSelect is ignored. */
|
|
11
11
|
children?: ContextMenuItemDef[];
|
|
12
12
|
/**
|
|
13
13
|
* Renders as a tick-box rather than a plain item, and the menu stays open on
|
|
@@ -27,11 +27,9 @@ type __VLS_Props = {
|
|
|
27
27
|
*/
|
|
28
28
|
always?: boolean;
|
|
29
29
|
};
|
|
30
|
-
declare var
|
|
30
|
+
declare var __VLS_16: {};
|
|
31
31
|
type __VLS_Slots = {} & {
|
|
32
|
-
default?: (props: typeof
|
|
33
|
-
} & {
|
|
34
|
-
default?: (props: typeof __VLS_18) => any;
|
|
32
|
+
default?: (props: typeof __VLS_16) => any;
|
|
35
33
|
};
|
|
36
34
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|