@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
|
@@ -6,10 +6,10 @@ const g = globalThis;
|
|
|
6
6
|
const state = g[STATE_KEY] ??= { queue: reactive([]), nextId: 0 };
|
|
7
7
|
const queue = state.queue;
|
|
8
8
|
function push(variant, message, options = {}) {
|
|
9
|
-
|
|
9
|
+
if (typeof window === "undefined") return -1;
|
|
10
10
|
const duration = options.duration ?? DEFAULT_DURATION;
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const fields = {
|
|
12
|
+
key: options.key,
|
|
13
13
|
title: options.title,
|
|
14
14
|
message,
|
|
15
15
|
variant,
|
|
@@ -18,11 +18,34 @@ function push(variant, message, options = {}) {
|
|
|
18
18
|
actions: options.actions,
|
|
19
19
|
onClick: options.onClick
|
|
20
20
|
};
|
|
21
|
+
const same = options.key === void 0 ? -1 : queue.findIndex((t) => t.key === options.key);
|
|
22
|
+
const existing = queue[same];
|
|
23
|
+
if (existing) {
|
|
24
|
+
queue.splice(same, 1, { ...fields, id: existing.id, rev: existing.rev + 1 });
|
|
25
|
+
return existing.id;
|
|
26
|
+
}
|
|
27
|
+
const id = state.nextId++;
|
|
21
28
|
const overflow = queue.length - (MAX_ACTIVE - 1);
|
|
22
29
|
if (overflow > 0) queue.splice(0, overflow);
|
|
23
|
-
queue.push(
|
|
30
|
+
queue.push({ ...fields, id, rev: 0 });
|
|
24
31
|
return id;
|
|
25
32
|
}
|
|
33
|
+
let promiseKey = 0;
|
|
34
|
+
function promise(task, messages, options = {}) {
|
|
35
|
+
const key = options.key ?? `@leavepulse/ui:promise-${promiseKey++}`;
|
|
36
|
+
push("info", messages.loading, { ...options, key, duration: 0, actions: void 0 });
|
|
37
|
+
task.then(
|
|
38
|
+
(value) => {
|
|
39
|
+
const text = typeof messages.success === "function" ? messages.success(value) : messages.success;
|
|
40
|
+
push("success", text, { ...options, key });
|
|
41
|
+
},
|
|
42
|
+
(error) => {
|
|
43
|
+
const text = typeof messages.error === "function" ? messages.error(error) : messages.error;
|
|
44
|
+
push("error", text, { ...options, key });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
return task;
|
|
48
|
+
}
|
|
26
49
|
function dismiss(id) {
|
|
27
50
|
const i = queue.findIndex((t) => t.id === id);
|
|
28
51
|
if (i !== -1) queue.splice(i, 1);
|
|
@@ -38,6 +61,7 @@ function useToast() {
|
|
|
38
61
|
success: (message, o) => push("success", message, o),
|
|
39
62
|
warning: (message, o) => push("warning", message, o),
|
|
40
63
|
error: (message, o) => push("error", message, o),
|
|
64
|
+
promise,
|
|
41
65
|
/** Low-level push for bridges (e.g. @leavepulse/ui-sdk apiError). */
|
|
42
66
|
push,
|
|
43
67
|
dismiss,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ComputedRef, type CSSProperties, type Ref } from "vue";
|
|
1
|
+
import { type ComputedRef, type CSSProperties, type MaybeRefOrGetter, type Ref } from "vue";
|
|
2
2
|
export interface UseZoomPanOptions {
|
|
3
3
|
/** Smallest allowed scale. Default 1 (fit — never shrink past the viewport). */
|
|
4
4
|
min?: number;
|
|
5
|
-
/** Largest allowed scale. Default 8. */
|
|
6
|
-
max?: number
|
|
5
|
+
/** Largest allowed scale. Default 8. Read on every change, so it may be a getter. */
|
|
6
|
+
max?: MaybeRefOrGetter<number | undefined>;
|
|
7
7
|
/** Multiplier per wheel notch. Default 1.15. */
|
|
8
8
|
step?: number;
|
|
9
9
|
/** Scale that a double-click/tap toggles to, from `min`. Default 2. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref, computed } from "vue";
|
|
1
|
+
import { ref, computed, toValue } from "vue";
|
|
2
2
|
function useZoomPan(options = {}) {
|
|
3
3
|
const min = options.min ?? 1;
|
|
4
|
-
const
|
|
4
|
+
const maxOf = () => toValue(options.max) ?? 8;
|
|
5
5
|
const step = options.step ?? 1.15;
|
|
6
6
|
const zoomedScale = options.zoomedScale ?? 2;
|
|
7
7
|
const scale = ref(min);
|
|
@@ -29,7 +29,7 @@ function useZoomPan(options = {}) {
|
|
|
29
29
|
y.value = clamp(y.value, -slackY, slackY);
|
|
30
30
|
}
|
|
31
31
|
function zoomAbout(next, px, py) {
|
|
32
|
-
const clamped = clamp(next, min,
|
|
32
|
+
const clamped = clamp(next, min, maxOf());
|
|
33
33
|
if (clamped === scale.value) return;
|
|
34
34
|
const contentX = px / scale.value - x.value;
|
|
35
35
|
const contentY = py / scale.value - y.value;
|
|
@@ -116,7 +116,7 @@ function useZoomPan(options = {}) {
|
|
|
116
116
|
const offset = computed(() => ({ x: x.value, y: y.value }));
|
|
117
117
|
function setView(view) {
|
|
118
118
|
if (view.scale !== void 0) {
|
|
119
|
-
scale.value = Math.min(
|
|
119
|
+
scale.value = Math.min(maxOf(), Math.max(min, view.scale));
|
|
120
120
|
}
|
|
121
121
|
x.value = view.x;
|
|
122
122
|
y.value = view.y;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,20 +18,28 @@ export { default as LpCalendar } from "./components/LpCalendar.vue";
|
|
|
18
18
|
export { default as LpCard } from "./components/LpCard.vue";
|
|
19
19
|
export { default as LpChart } from "./components/LpChart.vue";
|
|
20
20
|
export type { ChartPointEvent } from "./components/LpChart.vue";
|
|
21
|
+
export type { ChartText } from "./components/LpChart.vue";
|
|
21
22
|
export { CHART_PALETTE, axisTicks, formatTick, niceScale, } from "./components/chart";
|
|
22
23
|
export type { ChartAxis, ChartPoint, ChartSeries } from "./components/chart";
|
|
24
|
+
export { chartSummary, markerIndex } from "./components/chart";
|
|
25
|
+
export type { ChartMarker, ChartThreshold } from "./components/chart";
|
|
23
26
|
export { default as LpCheckbox } from "./components/LpCheckbox.vue";
|
|
24
27
|
export { default as LpCodeBlock } from "./components/LpCodeBlock.vue";
|
|
25
28
|
export type { CodeLang } from "./components/codeHighlight";
|
|
29
|
+
export { tokenizeLines } from "./components/codeHighlight";
|
|
26
30
|
export { default as LpColorPicker } from "./components/LpColorPicker.vue";
|
|
27
31
|
export type { ColorPickerLabels } from "./components/LpColorPicker.vue";
|
|
28
32
|
export { clampHsv, DEFAULT_SWATCHES, formatColor, hsvToHsl, hsvToRgb, isLight, normalizeHue, opaqueCss, parseColor, parseHex, rgbToHex, rgbToHsv, } from "./components/color";
|
|
29
33
|
export type { ColorFormat, Hsv, Rgb } from "./components/color";
|
|
30
34
|
export { default as LpCommandPalette } from "./components/LpCommandPalette.vue";
|
|
31
35
|
export type { Command, PaletteLabels } from "./components/LpCommandPalette.vue";
|
|
32
|
-
export { parseCommandQuery, rankCommandItems
|
|
36
|
+
export { parseCommandQuery, rankCommandItems } from "./components/commandSearch";
|
|
33
37
|
export type { CommandSearchTerms, SearchableCommand } from "./components/commandSearch";
|
|
34
38
|
export { default as LpConfirmDialog } from "./components/LpConfirmDialog.vue";
|
|
39
|
+
export type { ConfirmLabels } from "./components/LpConfirmDialog.vue";
|
|
40
|
+
export { default as LpConfirmHost } from "./components/LpConfirmHost.vue";
|
|
41
|
+
export { confirm, useConfirm } from "./components/confirm";
|
|
42
|
+
export type { ConfirmOptions } from "./components/confirm";
|
|
35
43
|
export { default as LpContextMenu } from "./components/LpContextMenu.vue";
|
|
36
44
|
export type { ContextMenuItemDef } from "./components/LpContextMenu.vue";
|
|
37
45
|
export { default as LpDatePicker } from "./components/LpDatePicker.vue";
|
|
@@ -44,6 +52,7 @@ export { default as LpDropzone } from "./components/LpDropzone.vue";
|
|
|
44
52
|
export { default as LpEmptyState } from "./components/LpEmptyState.vue";
|
|
45
53
|
export { default as LpFileTree } from "./components/LpFileTree.vue";
|
|
46
54
|
export type { FileTreeSummary } from "./components/LpFileTree.vue";
|
|
55
|
+
export type { FileTreeLabels } from "./components/LpFileTree.vue";
|
|
47
56
|
export type { CheckState, FileNode, NodeStats } from "./components/fileTree";
|
|
48
57
|
export { ancestorIds, checkedCount, checkStateOf, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize, } from "./components/fileTree";
|
|
49
58
|
export { default as LpFormField } from "./components/LpFormField.vue";
|
|
@@ -53,11 +62,13 @@ export { default as LpInfraNode } from "./components/LpInfraNode.vue";
|
|
|
53
62
|
export type { InfraNodeData } from "./components/LpInfraNode.vue";
|
|
54
63
|
export { default as LpInput } from "./components/LpInput.vue";
|
|
55
64
|
export { default as LpLightbox } from "./components/LpLightbox.vue";
|
|
65
|
+
export type { LightboxLabels } from "./components/LpLightbox.vue";
|
|
56
66
|
export type { LightboxItem } from "./components/lightbox";
|
|
57
67
|
export { fileNameOf } from "./components/lightbox";
|
|
58
68
|
export { default as LpLink } from "./components/LpLink.vue";
|
|
59
69
|
export { default as LpLogViewer } from "./components/LpLogViewer.vue";
|
|
60
70
|
export type { LogLevel, LogLine } from "./components/LpLogViewer.vue";
|
|
71
|
+
export type { LogViewerLabels } from "./components/LpLogViewer.vue";
|
|
61
72
|
export { default as LpMediaGallery } from "./components/LpMediaGallery.vue";
|
|
62
73
|
export { default as LpModal } from "./components/LpModal.vue";
|
|
63
74
|
export { default as LpModalNav } from "./components/LpModalNav.vue";
|
|
@@ -71,11 +82,12 @@ export { default as LpPagination } from "./components/LpPagination.vue";
|
|
|
71
82
|
export { default as LpPasswordInput } from "./components/LpPasswordInput.vue";
|
|
72
83
|
export { default as LpPie } from "./components/LpPie.vue";
|
|
73
84
|
export type { SliceEvent } from "./components/LpPie.vue";
|
|
85
|
+
export type { PieText } from "./components/LpPie.vue";
|
|
74
86
|
export { resolveSlices } from "./components/chart";
|
|
75
87
|
export type { PieSlice, ResolvedSlice } from "./components/chart";
|
|
76
88
|
export { default as LpPhoneInput } from "./components/LpPhoneInput.vue";
|
|
77
89
|
export type { PhoneDetail } from "./components/LpPhoneInput.vue";
|
|
78
|
-
export { flagEmoji, loadCountries, matchCountryByValue } from "./components/countries";
|
|
90
|
+
export { filterCountries, flagEmoji, loadCountries, matchCountryByValue } from "./components/countries";
|
|
79
91
|
export type { Country } from "./components/countries";
|
|
80
92
|
export { default as LpPopover } from "./components/LpPopover.vue";
|
|
81
93
|
export { default as LpProgress } from "./components/LpProgress.vue";
|
|
@@ -104,6 +116,8 @@ export type { Step } from "./components/LpStepper.vue";
|
|
|
104
116
|
export { default as LpSwitch } from "./components/LpSwitch.vue";
|
|
105
117
|
export { default as LpTable } from "./components/LpTable.vue";
|
|
106
118
|
export type { SortState, TableColumn, TablePage, TableQuery } from "./components/LpTable.vue";
|
|
119
|
+
export type { TableLabels } from "./components/LpTable.vue";
|
|
120
|
+
export { compareValues } from "./components/tableSort";
|
|
107
121
|
export { default as LpTableOfContents } from "./components/LpTableOfContents.vue";
|
|
108
122
|
export type { TocLink } from "./components/LpTableOfContents.vue";
|
|
109
123
|
export { default as LpTabs } from "./components/LpTabs.vue";
|
|
@@ -113,6 +127,7 @@ export { default as LpThemeSwitcher } from "./components/LpThemeSwitcher.vue";
|
|
|
113
127
|
export { default as LpTilt } from "./components/LpTilt.vue";
|
|
114
128
|
export { default as LpToaster } from "./components/LpToaster.vue";
|
|
115
129
|
export { default as LpTooltip } from "./components/LpTooltip.vue";
|
|
130
|
+
export { default as LpTooltipProvider } from "./components/LpTooltipProvider.vue";
|
|
116
131
|
export { default as LpTopologyCanvas } from "./components/LpTopologyCanvas.vue";
|
|
117
132
|
export type { CanvasViewport, EdgeCategory, EdgeObserved, TopologyEdge, TopologyLane, TopologyNode, } from "./components/LpTopologyCanvas.vue";
|
|
118
133
|
export { default as LpUptimeBar } from "./components/LpUptimeBar.vue";
|
|
@@ -138,9 +153,16 @@ export { useClipboard } from "./composables/useClipboard";
|
|
|
138
153
|
export type { CopyOptions, UseClipboard } from "./composables/useClipboard";
|
|
139
154
|
export { useHotkeys, isAppleKeyboard, appleModifierLabel, activeShortcuts, mergeShortcutGroups, } from "./composables/useHotkeys";
|
|
140
155
|
export type { HotkeyBinding, HotkeyHelp, ShortcutEntry, ShortcutGroup } from "./composables/useHotkeys";
|
|
156
|
+
export { matchesHotkey, useAppleKeyboard } from "./composables/useHotkeys";
|
|
157
|
+
export { anyModalOpen, topModalElement, useModalLayer } from "./components/modalDepth";
|
|
158
|
+
export type { ModalLayer, ModalLayerOptions } from "./components/modalDepth";
|
|
141
159
|
export { provideGlass, useGlass } from "./composables/useGlass";
|
|
160
|
+
export { LP_CONFIG, lpConfig, mergeConfig, provideLpConfig, useLabels, useLinkComponent, useLpConfig } from "./composables/useLpConfig";
|
|
161
|
+
export type { LabelScope, LpConfig } from "./composables/useLpConfig";
|
|
142
162
|
export { useMergedClass, useMergedAttrs, mergeClass } from "./composables/useMergedClass";
|
|
143
|
-
export { useInputFilter } from "./composables/useInputFilter";
|
|
163
|
+
export { anchorPattern, stripDisallowed, useInputFilter } from "./composables/useInputFilter";
|
|
164
|
+
export { LP_FIELD, fieldMessageId, provideField, useField, useFieldControl } from "./composables/useField";
|
|
165
|
+
export type { FieldContext, FieldControlState } from "./composables/useField";
|
|
144
166
|
export type { UseInputFilterOptions } from "./composables/useInputFilter";
|
|
145
167
|
export { easeOut, easeTravel, easingToken, prefersReducedMotion } from "./composables/easing";
|
|
146
168
|
export { useReveal } from "./composables/useReveal";
|
|
@@ -160,3 +182,11 @@ export { useZoomPan } from "./composables/useZoomPan";
|
|
|
160
182
|
export type { UseZoomPan, UseZoomPanOptions } from "./composables/useZoomPan";
|
|
161
183
|
export { useToast } from "./composables/useToast";
|
|
162
184
|
export type { ToastAction, ToastItem, ToastOptions, ToastVariant, } from "./composables/useToast";
|
|
185
|
+
export type { ToastPromiseMessages } from "./composables/useToast";
|
|
186
|
+
export { cacheSystemThemes, normalizeTheme, prefersDarkScheme, themeEntries, } from "./theme/useTheme";
|
|
187
|
+
export type { SystemThemes, UseTheme } from "./theme/useTheme";
|
|
188
|
+
export { layoutController } from "./layout/useLayout";
|
|
189
|
+
export type { LayoutController } from "./layout/useLayout";
|
|
190
|
+
export { default as LpThemeProvider } from "./components/LpThemeProvider.vue";
|
|
191
|
+
export { isInternalHref, resolveLink } from "./components/link";
|
|
192
|
+
export type { LinkTarget, ResolvedLink } from "./components/link";
|