@leavepulse/ui 0.43.4 → 0.45.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 +121 -7
- package/dist/assets/{LpCommandPalette-B-0Est4Z.css → LpCommandPalette-nGNnzXqQ.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/{LpRollingText-CR1mb0Vt.css → LpRollingText-BGnE6q9j.css} +3 -0
- package/dist/assets/{LpShortcutsDialog-C6YoQ8_M.css → LpShortcutsDialog-CqYX3yy6.css} +28 -7
- package/dist/assets/{LpSkeleton-D7xU8IPV.css → LpSkeleton-H3Z5dEIk.css} +4 -1
- package/dist/assets/{LpTable-BgPLJOXa.css → LpTable-CPwWxTJS.css} +49 -9
- package/dist/chunks/ContextMenuItems-BtKU7074.js +124 -0
- package/dist/chunks/{LayoutCanvas-Dd20boUG.js → LayoutCanvas-BkaGXTjx.js} +26 -9
- package/dist/chunks/{LayoutNode-DGpZA9LX.js → LayoutNode-B3_9E1Xa.js} +28 -12
- package/dist/chunks/{LpActionBar-BlvtGB2P.js → LpActionBar-CnfFVIwC.js} +26 -12
- package/dist/chunks/{LpAddressInput-B-Zvxsn7.js → LpAddressInput-BwX8uo4_.js} +54 -49
- package/dist/chunks/{LpAlert-BAYHDSS1.js → LpAlert-B6ilrM7T.js} +16 -9
- package/dist/chunks/{LpAppShell-BGQVIY-3.js → LpAppShell-C53_RaGF.js} +53 -26
- package/dist/chunks/{LpAutocomplete-DExlIZe_.js → LpAutocomplete-C8IgSMsi.js} +52 -24
- package/dist/chunks/{LpAvatar-B3-xAOH3.js → LpAvatar-C1XStdOo.js} +19 -10
- package/dist/chunks/LpBreadcrumbs-CQJd73Gm.js +95 -0
- package/dist/chunks/{LpButton-5VXXCjwF.js → LpButton-CKSwC6Mu.js} +45 -15
- package/dist/chunks/{LpCalendar-B7Ko5RdR.js → LpCalendar-DrA2McTU.js} +1 -1
- package/dist/chunks/{LpCard-BhI1N_vL.js → LpCard-C2IvucmX.js} +1 -1
- package/dist/chunks/{LpCheckbox-CVccKYaH.js → LpCheckbox-Bkj13CbW.js} +8 -4
- package/dist/chunks/{LpCodeBlock-Bo0B4TFR.js → LpCodeBlock-ca7ANFyW.js} +49 -17
- package/dist/chunks/{LpColorPicker-BlXea7LM.js → LpColorPicker-zz4VGkG4.js} +75 -26
- package/dist/chunks/{LpConfirmDialog-Q-bxff8z.js → LpConfirmDialog-DCw5jR1t.js} +59 -17
- package/dist/chunks/LpConfirmHost-CbywMpMP.js +49 -0
- package/dist/chunks/LpContextMenu-BqkAYa9X.js +69 -0
- package/dist/chunks/LpDatePicker-DuusgT69.js +195 -0
- package/dist/chunks/LpDateRangePicker-DHeuznfC.js +208 -0
- package/dist/chunks/{LpDisclosure-ChQYmjlR.js → LpDisclosure-Cc23-JOT.js} +1 -1
- package/dist/chunks/{LpDrawer-BZ6k3hvo.js → LpDrawer-Dt4aB4Fr.js} +65 -28
- package/dist/chunks/{LpDropdownMenu-DJpoqRCb.js → LpDropdownMenu-DdJGQzPn.js} +2 -1
- package/dist/chunks/{LpEmptyState-Dsdqz1Wj.js → LpEmptyState-BJbZXC8D.js} +1 -1
- package/dist/chunks/LpFieldNotice-wtieLUTj.js +64 -0
- package/dist/chunks/{LpFileTree-_5vFBgaK.js → LpFileTree-CNurOvkV.js} +25 -10
- package/dist/chunks/{LpFileTreeNode-BdcIYKIE.js → LpFileTreeNode-D_qRRdsH.js} +3 -3
- package/dist/chunks/LpFormField-CtVYj6tO.js +101 -0
- package/dist/chunks/{LpIcon-CCnX5_2j.js → LpIcon-DYtaid0K.js} +20 -6
- package/dist/chunks/{LpInput-9EXWUM9B.js → LpInput-D-YGQbEv.js} +58 -20
- package/dist/chunks/{LpLightbox-2sYVMY-S.js → LpLightbox-DSDahF23.js} +148 -61
- package/dist/chunks/{LpLink-DCND-zyu.js → LpLink-Krkjhe_y.js} +15 -6
- package/dist/chunks/{LpLogViewer-CaRy5MeS.js → LpLogViewer-KypbgOyo.js} +300 -72
- package/dist/chunks/{LpMapPicker-ul4oYno6.js → LpMapPicker-Cc84LaM3.js} +39 -14
- package/dist/chunks/{LpMediaGallery-FF-NquIo.js → LpMediaGallery-YKr-cQPN.js} +7 -4
- package/dist/chunks/{LpModal-Bt0pQCI_.js → LpModal-DMMDQHAu.js} +52 -29
- package/dist/chunks/{LpModalNav-YaifHrXC.js → LpModalNav-BVPDyIup.js} +10 -7
- package/dist/chunks/{LpNotificationBell-DyGGsMAM.js → LpNotificationBell-CCwyJP5C.js} +79 -33
- package/dist/chunks/{LpNumberField-CWuX08iX.js → LpNumberField-B77O-z28.js} +21 -8
- 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-BcDlo3r_.js} +31 -20
- package/dist/chunks/{LpPasswordInput--sjYCkLS.js → LpPasswordInput-eKzQhbQP.js} +11 -8
- package/dist/chunks/LpPhoneInput-BCbrrhgE.js +336 -0
- package/dist/chunks/{LpPie-D6OnzwlJ.js → LpPie-BEJ2SfI6.js} +84 -28
- package/dist/chunks/{LpPopover-8268UmlC.js → LpPopover-DCKeqiVn.js} +5 -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/LpRangeCalendar-DZuaRV0W.js +331 -0
- package/dist/chunks/{LpRollingText-CM5gkSeF.js → LpRollingText-DB7upf-5.js} +1 -1
- package/dist/chunks/{LpScrollArea-D8xyKXcF.js → LpScrollArea-Bry1fdOM.js} +14 -2
- package/dist/chunks/{LpSection-aM6J_u51.js → LpSection-tKEH0jYf.js} +1 -1
- package/dist/chunks/{LpSegmented-fV0Sk92p.js → LpSegmented-C09EEam2.js} +8 -4
- package/dist/chunks/{LpSelect-ANIVtrpM.js → LpSelect-DNIL6MB9.js} +50 -31
- package/dist/chunks/{LpSidebar-ClBUwoEz.js → LpSidebar-CQNB0-yU.js} +30 -22
- package/dist/chunks/{LpSidebarNav-llOcs_Fn.js → LpSidebarNav-kx-LdqNU.js} +16 -11
- 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-B-7udBRP.js} +2 -2
- package/dist/chunks/{LpStepper-Bk-XaQYU.js → LpStepper-C7XiVKZj.js} +34 -19
- package/dist/chunks/{LpSwitch-Blizvqyt.js → LpSwitch-OrcOJX9m.js} +41 -27
- package/dist/chunks/LpTableFilter-BV8PpLM9.js +158 -0
- package/dist/chunks/{LpTableOfContents-CjvxPMpU.js → LpTableOfContents-BUcAfGPQ.js} +36 -41
- package/dist/chunks/{LpTabs-Cefe_lys.js → LpTabs-29iW1XOx.js} +20 -6
- package/dist/chunks/LpTagsInput-D1SuqbhB.js +300 -0
- package/dist/chunks/LpTextarea-uuScWo6-.js +77 -0
- package/dist/chunks/LpThemeProvider-Be4r2TQX.js +35 -0
- package/dist/chunks/LpThemeSwitcher-B4aVPbNC.js +166 -0
- package/dist/chunks/{LpTilt-DuyKbpkA.js → LpTilt-B7KHX1zH.js} +2 -2
- package/dist/chunks/{LpTimeField-K6nAGboX.js → LpTimeField-Cqe7fXnh.js} +14 -8
- package/dist/chunks/{LpToaster-gDB1EaU3.js → LpToaster-DpJvoCOh.js} +94 -31
- package/dist/chunks/{LpTooltip-hCLPAqMG.js → LpTooltip-CXVKcOXT.js} +14 -6
- package/dist/chunks/LpTooltipProvider-CftjV7Xc.js +25 -0
- package/dist/chunks/{LpTopologyCanvas-Cm1L39uL.js → LpTopologyCanvas-6ozNrQKh.js} +8 -2
- package/dist/chunks/{LpUptimeBar-DvAMno0S.js → LpUptimeBar-ugcv25xj.js} +44 -15
- package/dist/chunks/icons-CkA0njzm.js +43 -0
- package/dist/chunks/{LpThemeSwitcher-Cue-myST.js → useTheme-DJm1JSsY.js} +215 -260
- 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/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +47 -3
- package/dist/components/LpChart.vue.js +377 -97
- 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.d.ts +2 -2
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +14 -3
- package/dist/components/LpCommandPalette.vue.js +142 -77
- 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/LpDateRangePicker.vue.d.ts +60 -0
- package/dist/components/LpDateRangePicker.vue.js +4 -0
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDrawer.vue.d.ts +10 -0
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +23 -7
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.d.ts +8 -0
- package/dist/components/LpFieldNotice.vue.js +4 -0
- 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 +13 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpIcon.vue.d.ts +0 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +93 -58
- package/dist/components/LpInput.vue.d.ts +22 -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 +72 -3
- 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.d.ts +13 -0
- 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.d.ts +1 -1
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.d.ts +51 -0
- package/dist/components/LpRangeCalendar.vue.js +4 -0
- package/dist/components/LpRollingText.vue.d.ts +1 -1
- package/dist/components/LpRollingText.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSection.vue.d.ts +1 -1
- package/dist/components/LpSection.vue.js +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 +7 -1
- package/dist/components/LpShortcutsDialog.vue.js +60 -15
- 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/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +107 -3
- package/dist/components/LpTable.vue.js +540 -128
- package/dist/components/LpTableFilter.vue.d.ts +31 -0
- package/dist/components/LpTableFilter.vue.js +4 -0
- 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/LpTagsInput.vue.d.ts +77 -0
- package/dist/components/LpTagsInput.vue.js +4 -0
- 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 +15 -2
- 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 +42 -6
- 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.js +3 -0
- 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/dateRange.d.ts +43 -0
- package/dist/components/dateRange.js +76 -0
- package/dist/components/exportData.d.ts +58 -0
- package/dist/components/exportData.js +165 -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/logSearch.d.ts +18 -0
- package/dist/components/logSearch.js +36 -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/phone.d.ts +41 -0
- package/dist/components/phone.js +80 -0
- package/dist/components/sidebar.d.ts +7 -1
- package/dist/components/tableFilter.d.ts +36 -0
- package/dist/components/tableFilter.js +84 -0
- package/dist/components/tableSort.d.ts +8 -0
- package/dist/components/tableSort.js +31 -0
- package/dist/components/tags.d.ts +20 -0
- package/dist/components/tags.js +37 -0
- package/dist/composables/useField.d.ts +38 -0
- package/dist/composables/useField.js +45 -0
- package/dist/composables/useFieldNotice.d.ts +17 -0
- package/dist/composables/useFieldNotice.js +28 -0
- package/dist/composables/useForm.d.ts +53 -0
- package/dist/composables/useForm.js +207 -0
- package/dist/composables/useFormDraft.d.ts +10 -3
- package/dist/composables/useFormDraft.js +9 -14
- package/dist/composables/useHotkeys.d.ts +81 -5
- package/dist/composables/useHotkeys.js +223 -25
- package/dist/composables/useInputFilter.d.ts +17 -0
- package/dist/composables/useInputFilter.js +47 -10
- package/dist/composables/useInputMask.d.ts +59 -0
- package/dist/composables/useInputMask.js +170 -0
- package/dist/composables/useLpConfig.d.ts +24 -0
- package/dist/composables/useLpConfig.js +44 -0
- package/dist/composables/usePaintSelect.d.ts +22 -0
- package/dist/composables/usePaintSelect.js +169 -0
- package/dist/composables/useRovingFocus.js +7 -0
- package/dist/composables/useShift.js +7 -2
- 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/icons-all.d.ts +1 -0
- package/dist/icons-all.js +3 -0
- package/dist/icons.d.ts +14 -1
- package/dist/index.d.ts +60 -4
- package/dist/index.js +245 -141
- package/dist/kit-icons.d.ts +2 -0
- 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/backdrop.d.ts +12 -0
- package/dist/theme/presets.d.ts +0 -2
- package/dist/theme/useTheme.d.ts +32 -9
- package/package.json +18 -8
- package/src/component-names.ts +9 -7
- package/src/components/ContextMenuItems.vue +88 -0
- package/src/components/LayoutCanvas.vue +26 -6
- package/src/components/LayoutNode.vue +30 -4
- package/src/components/LpActionBar.vue +31 -8
- 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 +47 -10
- package/src/components/LpAvatar.vue +20 -6
- package/src/components/LpBreadcrumbs.vue +65 -41
- package/src/components/LpButton.vue +60 -14
- package/src/components/LpChart.vue +351 -28
- package/src/components/LpCheckbox.vue +7 -3
- package/src/components/LpCodeBlock.vue +50 -14
- package/src/components/LpColorPicker.vue +73 -10
- package/src/components/LpCommandPalette.vue +115 -20
- package/src/components/LpConfirmDialog.vue +68 -17
- package/src/components/LpConfirmHost.vue +59 -0
- package/src/components/LpContextMenu.vue +15 -116
- package/src/components/LpDatePicker.vue +104 -68
- package/src/components/LpDateRangePicker.vue +224 -0
- package/src/components/LpDrawer.vue +56 -19
- package/src/components/LpDropdownMenu.vue +1 -0
- package/src/components/LpDropzone.vue +21 -4
- package/src/components/LpFieldNotice.vue +65 -0
- package/src/components/LpFileTree.vue +33 -7
- package/src/components/LpFormField.vue +59 -7
- package/src/components/LpIcon.vue +22 -4
- package/src/components/LpImageEditor.vue +96 -57
- package/src/components/LpInput.vue +62 -11
- package/src/components/LpLightbox.vue +140 -29
- package/src/components/LpLink.vue +24 -13
- package/src/components/LpLogViewer.vue +311 -39
- package/src/components/LpMapPicker.vue +36 -13
- package/src/components/LpMediaGallery.vue +8 -2
- package/src/components/LpModal.vue +54 -28
- package/src/components/LpModalNav.vue +5 -2
- package/src/components/LpNotificationBell.vue +77 -23
- 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 +224 -39
- package/src/components/LpPie.vue +102 -20
- package/src/components/LpPopover.vue +4 -0
- package/src/components/LpProgress.vue +5 -3
- package/src/components/LpRadioGroup.vue +9 -2
- package/src/components/LpRangeCalendar.vue +365 -0
- package/src/components/LpRollingText.vue +3 -0
- package/src/components/LpScrollArea.vue +22 -2
- package/src/components/LpSegmented.vue +12 -2
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpShortcutsDialog.vue +83 -9
- 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/LpStepper.vue +23 -10
- package/src/components/LpSwitch.vue +31 -8
- package/src/components/LpTable.vue +668 -90
- package/src/components/LpTableFilter.vue +175 -0
- package/src/components/LpTableOfContents.vue +50 -32
- package/src/components/LpTabs.vue +23 -6
- package/src/components/LpTagsInput.vue +364 -0
- package/src/components/LpTextarea.vue +44 -6
- package/src/components/LpThemeProvider.vue +41 -0
- package/src/components/LpThemeSwitcher.vue +76 -33
- package/src/components/LpTilt.vue +2 -2
- package/src/components/LpTimeField.vue +14 -3
- package/src/components/LpToaster.vue +115 -27
- package/src/components/LpTooltip.vue +29 -5
- package/src/components/LpTooltipProvider.vue +24 -0
- package/src/components/LpTopologyCanvas.vue +19 -2
- package/src/components/LpUptimeBar.vue +46 -8
- package/src/components/chart.ts +82 -8
- package/src/components/codeHighlight.ts +111 -15
- package/src/components/color.ts +30 -9
- package/src/components/commandSearch.ts +6 -0
- package/src/components/confirm.ts +58 -0
- package/src/components/countries.ts +12 -0
- package/src/components/dateRange.ts +134 -0
- package/src/components/exportData.ts +228 -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/logSearch.ts +46 -0
- package/src/components/modalDepth.ts +48 -6
- package/src/components/otp.ts +16 -0
- package/src/components/phone.ts +140 -0
- package/src/components/sidebar.ts +7 -1
- package/src/components/tableFilter.ts +122 -0
- package/src/components/tableSort.ts +37 -0
- package/src/components/tags.ts +62 -0
- package/src/composables/useField.ts +83 -0
- package/src/composables/useFieldNotice.ts +59 -0
- package/src/composables/useForm.ts +314 -0
- package/src/composables/useFormDraft.ts +25 -20
- package/src/composables/useHotkeys.ts +355 -28
- package/src/composables/useInputFilter.ts +77 -14
- package/src/composables/useInputMask.ts +254 -0
- package/src/composables/useLpConfig.ts +87 -0
- package/src/composables/usePaintSelect.ts +243 -0
- package/src/composables/useRovingFocus.ts +11 -0
- package/src/composables/useShift.ts +13 -2
- package/src/composables/useTilt.ts +5 -6
- package/src/composables/useToast.ts +56 -4
- package/src/composables/useZoomPan.ts +6 -6
- package/src/iconSubset.d.mts +10 -0
- package/src/iconSubset.mjs +51 -0
- package/src/icons-all.ts +10 -0
- package/src/icons.ts +59 -8
- package/src/index.ts +73 -4
- package/src/kit-icons.ts +5 -0
- package/src/layout/tree.ts +30 -0
- package/src/layout/useLayout.ts +68 -18
- package/src/nuxt.ts +87 -17
- package/src/runtime/config.plugin.ts +14 -0
- package/src/runtime/theme.plugin.ts +43 -23
- package/src/theme/backdrop.ts +69 -0
- package/src/theme/presets.ts +6 -64
- package/src/theme/useTheme.ts +206 -100
- package/src/tokens/tokens.css +46 -0
- 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/LpPhoneInput-BDSKVl_z.js +0 -209
- package/dist/chunks/LpTextarea-t7F6gv8E.js +0 -47
|
@@ -11,6 +11,9 @@ export interface ToastAction {
|
|
|
11
11
|
|
|
12
12
|
export interface ToastItem {
|
|
13
13
|
id: number
|
|
14
|
+
/** Bumped when a toast with the same `key` replaces this one in place. */
|
|
15
|
+
rev: number
|
|
16
|
+
key?: string
|
|
14
17
|
title?: string
|
|
15
18
|
message: string
|
|
16
19
|
variant: ToastVariant
|
|
@@ -23,6 +26,12 @@ export interface ToastItem {
|
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface ToastOptions {
|
|
29
|
+
/**
|
|
30
|
+
* A toast with the same key replaces the one on screen instead of stacking
|
|
31
|
+
* beside it: "Saved" ten times is one toast, and a progress toast can turn
|
|
32
|
+
* into its result.
|
|
33
|
+
*/
|
|
34
|
+
key?: string
|
|
26
35
|
title?: string
|
|
27
36
|
duration?: number
|
|
28
37
|
actions?: ToastAction[]
|
|
@@ -48,10 +57,12 @@ function push(
|
|
|
48
57
|
message: string,
|
|
49
58
|
options: ToastOptions = {},
|
|
50
59
|
): number {
|
|
51
|
-
|
|
60
|
+
// A server render has no one to show it to, and the queue would outlive the
|
|
61
|
+
// request and surface in the next visitor's page.
|
|
62
|
+
if (typeof window === "undefined") return -1
|
|
52
63
|
const duration = options.duration ?? DEFAULT_DURATION
|
|
53
|
-
const
|
|
54
|
-
|
|
64
|
+
const fields = {
|
|
65
|
+
key: options.key,
|
|
55
66
|
title: options.title,
|
|
56
67
|
message,
|
|
57
68
|
variant,
|
|
@@ -61,14 +72,54 @@ function push(
|
|
|
61
72
|
onClick: options.onClick,
|
|
62
73
|
}
|
|
63
74
|
|
|
75
|
+
const same = options.key === undefined ? -1 : queue.findIndex((t) => t.key === options.key)
|
|
76
|
+
const existing = queue[same]
|
|
77
|
+
if (existing) {
|
|
78
|
+
queue.splice(same, 1, { ...fields, id: existing.id, rev: existing.rev + 1 })
|
|
79
|
+
return existing.id
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const id = state.nextId++
|
|
64
83
|
// Cap the active count: drop the oldest beyond the limit.
|
|
65
84
|
const overflow = queue.length - (MAX_ACTIVE - 1)
|
|
66
85
|
if (overflow > 0) queue.splice(0, overflow)
|
|
67
|
-
queue.push(
|
|
86
|
+
queue.push({ ...fields, id, rev: 0 })
|
|
68
87
|
|
|
69
88
|
return id
|
|
70
89
|
}
|
|
71
90
|
|
|
91
|
+
export interface ToastPromiseMessages<T> {
|
|
92
|
+
loading: string
|
|
93
|
+
success: string | ((value: T) => string)
|
|
94
|
+
error: string | ((error: unknown) => string)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let promiseKey = 0
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* One toast that follows a promise: a persistent "loading" toast that turns
|
|
101
|
+
* into the success or error toast when it settles. Returns the promise itself.
|
|
102
|
+
*/
|
|
103
|
+
function promise<T>(
|
|
104
|
+
task: Promise<T>,
|
|
105
|
+
messages: ToastPromiseMessages<T>,
|
|
106
|
+
options: ToastOptions = {},
|
|
107
|
+
): Promise<T> {
|
|
108
|
+
const key = options.key ?? `@leavepulse/ui:promise-${promiseKey++}`
|
|
109
|
+
push("info", messages.loading, { ...options, key, duration: 0, actions: undefined })
|
|
110
|
+
task.then(
|
|
111
|
+
(value) => {
|
|
112
|
+
const text = typeof messages.success === "function" ? messages.success(value) : messages.success
|
|
113
|
+
push("success", text, { ...options, key })
|
|
114
|
+
},
|
|
115
|
+
(error: unknown) => {
|
|
116
|
+
const text = typeof messages.error === "function" ? messages.error(error) : messages.error
|
|
117
|
+
push("error", text, { ...options, key })
|
|
118
|
+
},
|
|
119
|
+
)
|
|
120
|
+
return task
|
|
121
|
+
}
|
|
122
|
+
|
|
72
123
|
function dismiss(id: number): void {
|
|
73
124
|
const i = queue.findIndex((t) => t.id === id)
|
|
74
125
|
if (i !== -1) queue.splice(i, 1)
|
|
@@ -86,6 +137,7 @@ export function useToast() {
|
|
|
86
137
|
success: (message: string, o?: ToastOptions) => push("success", message, o),
|
|
87
138
|
warning: (message: string, o?: ToastOptions) => push("warning", message, o),
|
|
88
139
|
error: (message: string, o?: ToastOptions) => push("error", message, o),
|
|
140
|
+
promise,
|
|
89
141
|
/** Low-level push for bridges (e.g. @leavepulse/ui-sdk apiError). */
|
|
90
142
|
push,
|
|
91
143
|
dismiss,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, ref, type ComputedRef, type CSSProperties, type Ref } from "vue"
|
|
1
|
+
import { computed, ref, toValue, type ComputedRef, type CSSProperties, type MaybeRefOrGetter, type Ref } from "vue"
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* useZoomPan — zoom + pan for a single element inside a viewport, the way an
|
|
@@ -15,8 +15,8 @@ import { computed, ref, type ComputedRef, type CSSProperties, type Ref } from "v
|
|
|
15
15
|
export interface UseZoomPanOptions {
|
|
16
16
|
/** Smallest allowed scale. Default 1 (fit — never shrink past the viewport). */
|
|
17
17
|
min?: number
|
|
18
|
-
/** Largest allowed scale. Default 8. */
|
|
19
|
-
max?: number
|
|
18
|
+
/** Largest allowed scale. Default 8. Read on every change, so it may be a getter. */
|
|
19
|
+
max?: MaybeRefOrGetter<number | undefined>
|
|
20
20
|
/** Multiplier per wheel notch. Default 1.15. */
|
|
21
21
|
step?: number
|
|
22
22
|
/** Scale that a double-click/tap toggles to, from `min`. Default 2. */
|
|
@@ -62,7 +62,7 @@ export interface UseZoomPan {
|
|
|
62
62
|
|
|
63
63
|
export function useZoomPan(options: UseZoomPanOptions = {}): UseZoomPan {
|
|
64
64
|
const min = options.min ?? 1
|
|
65
|
-
const
|
|
65
|
+
const maxOf = () => toValue(options.max) ?? 8
|
|
66
66
|
const step = options.step ?? 1.15
|
|
67
67
|
const zoomedScale = options.zoomedScale ?? 2
|
|
68
68
|
|
|
@@ -104,7 +104,7 @@ export function useZoomPan(options: UseZoomPanOptions = {}): UseZoomPan {
|
|
|
104
104
|
|
|
105
105
|
/** Zoom to `next`, holding the viewport-relative point `px,py` in place. */
|
|
106
106
|
function zoomAbout(next: number, px: number, py: number) {
|
|
107
|
-
const clamped = clamp(next, min,
|
|
107
|
+
const clamped = clamp(next, min, maxOf())
|
|
108
108
|
if (clamped === scale.value) return
|
|
109
109
|
// Where the cursor sits in content space before the change; solving for the
|
|
110
110
|
// same content point after gives the translate that keeps it under the
|
|
@@ -215,7 +215,7 @@ export function useZoomPan(options: UseZoomPanOptions = {}): UseZoomPan {
|
|
|
215
215
|
|
|
216
216
|
function setView(view: { x: number; y: number; scale?: number }) {
|
|
217
217
|
if (view.scale !== undefined) {
|
|
218
|
-
scale.value = Math.min(
|
|
218
|
+
scale.value = Math.min(maxOf(), Math.max(min, view.scale))
|
|
219
219
|
}
|
|
220
220
|
x.value = view.x
|
|
221
221
|
y.value = view.y
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface IconCollection {
|
|
2
|
+
prefix: string
|
|
3
|
+
icons: Record<string, { body: string; width?: number; height?: number }>
|
|
4
|
+
aliases?: Record<string, { parent: string }>
|
|
5
|
+
width?: number
|
|
6
|
+
height?: number
|
|
7
|
+
}
|
|
8
|
+
export function namesInText(text: string): string[]
|
|
9
|
+
export function namesInDirs(dirs: string[]): Set<string>
|
|
10
|
+
export function subset(collection: IconCollection, names: Iterable<string>): IconCollection
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Shared by the kit's own icon generator and the Nuxt module's app scan: find
|
|
2
|
+
// "lucide:<name>" literals in source text and cut an iconify collection down to
|
|
3
|
+
// just those icons (aliases keep their parent).
|
|
4
|
+
import { readdirSync, readFileSync, statSync } from "node:fs"
|
|
5
|
+
import { join } from "node:path"
|
|
6
|
+
|
|
7
|
+
const NAME = /lucide:([a-z0-9]+(?:-[a-z0-9]+)*)/g
|
|
8
|
+
const SOURCE = /\.(vue|ts|tsx|js|jsx|mjs|md|html)$/
|
|
9
|
+
const SKIP = new Set(["node_modules", "dist", ".nuxt", ".output", ".git"])
|
|
10
|
+
|
|
11
|
+
export function namesInText(text) {
|
|
12
|
+
return [...text.matchAll(NAME)].map((m) => m[1])
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function namesInDirs(dirs) {
|
|
16
|
+
const names = new Set()
|
|
17
|
+
const walk = (dir) => {
|
|
18
|
+
let entries
|
|
19
|
+
try {
|
|
20
|
+
entries = readdirSync(dir)
|
|
21
|
+
} catch {
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
for (const entry of entries) {
|
|
25
|
+
if (SKIP.has(entry)) continue
|
|
26
|
+
const path = join(dir, entry)
|
|
27
|
+
if (statSync(path).isDirectory()) walk(path)
|
|
28
|
+
else if (SOURCE.test(entry)) for (const n of namesInText(readFileSync(path, "utf8"))) names.add(n)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
for (const dir of dirs) walk(dir)
|
|
32
|
+
return names
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function subset(collection, names) {
|
|
36
|
+
const icons = {}
|
|
37
|
+
const aliases = {}
|
|
38
|
+
for (const name of [...names].sort()) {
|
|
39
|
+
if (collection.icons[name]) {
|
|
40
|
+
icons[name] = collection.icons[name]
|
|
41
|
+
continue
|
|
42
|
+
}
|
|
43
|
+
const alias = collection.aliases?.[name]
|
|
44
|
+
if (!alias) continue
|
|
45
|
+
aliases[name] = alias
|
|
46
|
+
if (collection.icons[alias.parent]) icons[alias.parent] = collection.icons[alias.parent]
|
|
47
|
+
}
|
|
48
|
+
const out = { prefix: collection.prefix, icons, width: collection.width, height: collection.height }
|
|
49
|
+
if (Object.keys(aliases).length) out.aliases = aliases
|
|
50
|
+
return out
|
|
51
|
+
}
|
package/src/icons-all.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import lucide from "@iconify-json/lucide/icons.json"
|
|
2
|
+
import type { IconifyJSON } from "@iconify/vue"
|
|
3
|
+
import { registerIconCollection } from "./icons"
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Side-effect entry: `import "@leavepulse/ui/icons-all"` registers every lucide
|
|
7
|
+
* icon up front, for apps that render arbitrary icon names during SSR or want
|
|
8
|
+
* no late chunk. Costs the whole collection (~540 KB before compression).
|
|
9
|
+
*/
|
|
10
|
+
registerIconCollection(lucide as IconifyJSON)
|
package/src/icons.ts
CHANGED
|
@@ -1,11 +1,62 @@
|
|
|
1
|
-
import { addCollection } from "@iconify/vue"
|
|
2
|
-
import
|
|
1
|
+
import { addCollection, addIcon, iconLoaded, type IconifyIcon, type IconifyJSON } from "@iconify/vue"
|
|
2
|
+
import { ref } from "vue"
|
|
3
|
+
import { KIT_ICONS } from "./kit-icons"
|
|
3
4
|
|
|
4
5
|
/*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Offline icons without the whole lucide set in every bundle. The kit registers
|
|
7
|
+
* only the icons its own components render (KIT_ICONS, generated at build). Any
|
|
8
|
+
* other "lucide:*" name an app renders loads the full collection as a separate
|
|
9
|
+
* chunk on first use, from the app's own bundle, never from the iconify API, so
|
|
10
|
+
* Tauri and air-gapped apps keep working. Apps that need every icon in the
|
|
11
|
+
* server render (or no late chunk at all) register them up front: the Nuxt
|
|
12
|
+
* module's `icons` option, `registerIcons`, or `import "@leavepulse/ui/icons-all"`.
|
|
10
13
|
*/
|
|
11
|
-
addCollection(
|
|
14
|
+
addCollection(KIT_ICONS)
|
|
15
|
+
|
|
16
|
+
/** Bumped whenever icons are registered, so rendered icons re-resolve. */
|
|
17
|
+
export const iconsVersion = ref(0)
|
|
18
|
+
|
|
19
|
+
let lucide: Promise<IconifyJSON> | undefined
|
|
20
|
+
|
|
21
|
+
function loadLucide(): Promise<IconifyJSON> {
|
|
22
|
+
lucide ??= import("@iconify-json/lucide/icons.json").then((m) => (m.default ?? m) as IconifyJSON)
|
|
23
|
+
return lucide
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Register a whole iconify collection (any prefix) for offline use. */
|
|
27
|
+
export function registerIconCollection(collection: IconifyJSON): void {
|
|
28
|
+
addCollection(collection)
|
|
29
|
+
iconsVersion.value++
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Register lucide icons by name ("check" or "lucide:check") from the bundled
|
|
34
|
+
* collection. Resolves once they render offline.
|
|
35
|
+
*/
|
|
36
|
+
export async function registerIcons(names: readonly string[]): Promise<void> {
|
|
37
|
+
const wanted = names.map((n) => n.replace(/^lucide:/, ""))
|
|
38
|
+
if (wanted.every((n) => iconLoaded(`lucide:${n}`))) return
|
|
39
|
+
const all = await loadLucide()
|
|
40
|
+
for (const name of wanted) {
|
|
41
|
+
const parent = all.aliases?.[name]?.parent
|
|
42
|
+
const body = all.icons[name] ?? (parent ? all.icons[parent] : undefined)
|
|
43
|
+
if (!body) continue
|
|
44
|
+
const icon: IconifyIcon = { width: all.width, height: all.height, ...body }
|
|
45
|
+
addIcon(`lucide:${name}`, icon)
|
|
46
|
+
}
|
|
47
|
+
iconsVersion.value++
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Register the full lucide collection. */
|
|
51
|
+
export async function registerAllIcons(): Promise<void> {
|
|
52
|
+
registerIconCollection(await loadLucide())
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const pending = new Set<string>()
|
|
56
|
+
|
|
57
|
+
/** A lucide name that isn't registered yet: load it from the bundled set. */
|
|
58
|
+
export function requestIcon(name: string): void {
|
|
59
|
+
if (pending.has(name) || typeof window === "undefined") return
|
|
60
|
+
pending.add(name)
|
|
61
|
+
void registerIcons([name]).finally(() => pending.delete(name))
|
|
62
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -36,6 +36,10 @@ export { default as LpCalendar } from "./components/LpCalendar.vue"
|
|
|
36
36
|
export { default as LpCard } from "./components/LpCard.vue"
|
|
37
37
|
export { default as LpChart } from "./components/LpChart.vue"
|
|
38
38
|
export type { ChartPointEvent } from "./components/LpChart.vue"
|
|
39
|
+
export type { ChartText } from "./components/LpChart.vue"
|
|
40
|
+
export type { ChartExportOptions } from "./components/LpChart.vue"
|
|
41
|
+
export { backgroundOf, csvField, downloadFile, fileStem, inlineSvg, resolveCssColor, svgToPng, toCsv } from "./components/exportData"
|
|
42
|
+
export type { CsvColumn, CsvOptions, RasterOptions } from "./components/exportData"
|
|
39
43
|
export {
|
|
40
44
|
CHART_PALETTE,
|
|
41
45
|
axisTicks,
|
|
@@ -43,9 +47,12 @@ export {
|
|
|
43
47
|
niceScale,
|
|
44
48
|
} from "./components/chart"
|
|
45
49
|
export type { ChartAxis, ChartPoint, ChartSeries } from "./components/chart"
|
|
50
|
+
export { chartSummary, markerIndex } from "./components/chart"
|
|
51
|
+
export type { ChartMarker, ChartThreshold } from "./components/chart"
|
|
46
52
|
export { default as LpCheckbox } from "./components/LpCheckbox.vue"
|
|
47
53
|
export { default as LpCodeBlock } from "./components/LpCodeBlock.vue"
|
|
48
54
|
export type { CodeLang } from "./components/codeHighlight"
|
|
55
|
+
export { tokenizeLines } from "./components/codeHighlight"
|
|
49
56
|
export { default as LpColorPicker } from "./components/LpColorPicker.vue"
|
|
50
57
|
export type { ColorPickerLabels } from "./components/LpColorPicker.vue"
|
|
51
58
|
export {
|
|
@@ -68,9 +75,19 @@ export type { Command, PaletteLabels } from "./components/LpCommandPalette.vue"
|
|
|
68
75
|
export { parseCommandQuery, rankCommandItems } from "./components/commandSearch"
|
|
69
76
|
export type { CommandSearchTerms, SearchableCommand } from "./components/commandSearch"
|
|
70
77
|
export { default as LpConfirmDialog } from "./components/LpConfirmDialog.vue"
|
|
78
|
+
export type { ConfirmLabels } from "./components/LpConfirmDialog.vue"
|
|
79
|
+
export { default as LpConfirmHost } from "./components/LpConfirmHost.vue"
|
|
80
|
+
export { confirm, useConfirm } from "./components/confirm"
|
|
81
|
+
export type { ConfirmOptions } from "./components/confirm"
|
|
71
82
|
export { default as LpContextMenu } from "./components/LpContextMenu.vue"
|
|
72
83
|
export type { ContextMenuItemDef } from "./components/LpContextMenu.vue"
|
|
73
84
|
export { default as LpDatePicker } from "./components/LpDatePicker.vue"
|
|
85
|
+
export { default as LpDateRangePicker } from "./components/LpDateRangePicker.vue"
|
|
86
|
+
export type { DateRangePickerLabels } from "./components/LpDateRangePicker.vue"
|
|
87
|
+
export { default as LpRangeCalendar } from "./components/LpRangeCalendar.vue"
|
|
88
|
+
export type { RangeCalendarLabels } from "./components/LpRangeCalendar.vue"
|
|
89
|
+
export { clampRange, defaultRangePresets, formatRange, normalizeRange, sameRange } from "./components/dateRange"
|
|
90
|
+
export type { DateRange, DateRangePreset, DateRangePresetLabels } from "./components/dateRange"
|
|
74
91
|
export { default as LpDisclosure } from "./components/LpDisclosure.vue"
|
|
75
92
|
export { default as LpDivider } from "./components/LpDivider.vue"
|
|
76
93
|
export { default as LpDrawer } from "./components/LpDrawer.vue"
|
|
@@ -80,6 +97,7 @@ export { default as LpDropzone } from "./components/LpDropzone.vue"
|
|
|
80
97
|
export { default as LpEmptyState } from "./components/LpEmptyState.vue"
|
|
81
98
|
export { default as LpFileTree } from "./components/LpFileTree.vue"
|
|
82
99
|
export type { FileTreeSummary } from "./components/LpFileTree.vue"
|
|
100
|
+
export type { FileTreeLabels } from "./components/LpFileTree.vue"
|
|
83
101
|
export type { CheckState, FileNode, NodeStats } from "./components/fileTree"
|
|
84
102
|
export {
|
|
85
103
|
ancestorIds,
|
|
@@ -93,18 +111,23 @@ export {
|
|
|
93
111
|
subtreeIds,
|
|
94
112
|
subtreeSize,
|
|
95
113
|
} from "./components/fileTree"
|
|
114
|
+
export { default as LpFieldNotice } from "./components/LpFieldNotice.vue"
|
|
96
115
|
export { default as LpFormField } from "./components/LpFormField.vue"
|
|
97
116
|
export { default as LpIcon } from "./components/LpIcon.vue"
|
|
117
|
+
export { iconsVersion, registerAllIcons, registerIconCollection, registerIcons } from "./icons"
|
|
98
118
|
export { default as LpImageEditor } from "./components/LpImageEditor.vue"
|
|
99
119
|
export { default as LpInfraNode } from "./components/LpInfraNode.vue"
|
|
100
120
|
export type { InfraNodeData } from "./components/LpInfraNode.vue"
|
|
101
121
|
export { default as LpInput } from "./components/LpInput.vue"
|
|
102
122
|
export { default as LpLightbox } from "./components/LpLightbox.vue"
|
|
123
|
+
export type { LightboxLabels } from "./components/LpLightbox.vue"
|
|
103
124
|
export type { LightboxItem } from "./components/lightbox"
|
|
104
125
|
export { fileNameOf } from "./components/lightbox"
|
|
105
126
|
export { default as LpLink } from "./components/LpLink.vue"
|
|
106
127
|
export { default as LpLogViewer } from "./components/LpLogViewer.vue"
|
|
107
128
|
export type { LogLevel, LogLine } from "./components/LpLogViewer.vue"
|
|
129
|
+
export type { LogViewerLabels } from "./components/LpLogViewer.vue"
|
|
130
|
+
export { countLevels, matchPositions, matchesTerm, ringWindow, stepMatch } from "./components/logSearch"
|
|
108
131
|
export { default as LpMediaGallery } from "./components/LpMediaGallery.vue"
|
|
109
132
|
export { default as LpModal } from "./components/LpModal.vue"
|
|
110
133
|
export { default as LpModalNav } from "./components/LpModalNav.vue"
|
|
@@ -121,11 +144,12 @@ export { default as LpPagination } from "./components/LpPagination.vue"
|
|
|
121
144
|
export { default as LpPasswordInput } from "./components/LpPasswordInput.vue"
|
|
122
145
|
export { default as LpPie } from "./components/LpPie.vue"
|
|
123
146
|
export type { SliceEvent } from "./components/LpPie.vue"
|
|
147
|
+
export type { PieText } from "./components/LpPie.vue"
|
|
124
148
|
export { resolveSlices } from "./components/chart"
|
|
125
149
|
export type { PieSlice, ResolvedSlice } from "./components/chart"
|
|
126
150
|
export { default as LpPhoneInput } from "./components/LpPhoneInput.vue"
|
|
127
151
|
export type { PhoneDetail } from "./components/LpPhoneInput.vue"
|
|
128
|
-
export { flagEmoji, loadCountries, matchCountryByValue } from "./components/countries"
|
|
152
|
+
export { filterCountries, flagEmoji, loadCountries, matchCountryByValue } from "./components/countries"
|
|
129
153
|
export type { Country } from "./components/countries"
|
|
130
154
|
export { default as LpPopover } from "./components/LpPopover.vue"
|
|
131
155
|
export { default as LpProgress } from "./components/LpProgress.vue"
|
|
@@ -154,15 +178,23 @@ export type { Step } from "./components/LpStepper.vue"
|
|
|
154
178
|
export { default as LpSwitch } from "./components/LpSwitch.vue"
|
|
155
179
|
export { default as LpTable } from "./components/LpTable.vue"
|
|
156
180
|
export type { SortState, TableColumn, TablePage, TableQuery } from "./components/LpTable.vue"
|
|
181
|
+
export type { TableLabels } from "./components/LpTable.vue"
|
|
182
|
+
export type { TableExportOptions } from "./components/LpTable.vue"
|
|
183
|
+
export { compareValues } from "./components/tableSort"
|
|
157
184
|
export { default as LpTableOfContents } from "./components/LpTableOfContents.vue"
|
|
158
185
|
export type { TocLink } from "./components/LpTableOfContents.vue"
|
|
159
186
|
export { default as LpTabs } from "./components/LpTabs.vue"
|
|
160
187
|
export type { TabItem } from "./components/LpTabs.vue"
|
|
188
|
+
export { default as LpTagsInput } from "./components/LpTagsInput.vue"
|
|
189
|
+
export type { TagsInputLabels } from "./components/LpTagsInput.vue"
|
|
190
|
+
export { addTags, splitTags } from "./components/tags"
|
|
191
|
+
export type { AddTagsOptions, TagDuplicates, TagRejection, TagValidator } from "./components/tags"
|
|
161
192
|
export { default as LpTextarea } from "./components/LpTextarea.vue"
|
|
162
193
|
export { default as LpThemeSwitcher } from "./components/LpThemeSwitcher.vue"
|
|
163
194
|
export { default as LpTilt } from "./components/LpTilt.vue"
|
|
164
195
|
export { default as LpToaster } from "./components/LpToaster.vue"
|
|
165
196
|
export { default as LpTooltip } from "./components/LpTooltip.vue"
|
|
197
|
+
export { default as LpTooltipProvider } from "./components/LpTooltipProvider.vue"
|
|
166
198
|
export { default as LpTopologyCanvas } from "./components/LpTopologyCanvas.vue"
|
|
167
199
|
export type {
|
|
168
200
|
CanvasViewport,
|
|
@@ -210,7 +242,7 @@ export {
|
|
|
210
242
|
useTheme,
|
|
211
243
|
} from "./theme/useTheme"
|
|
212
244
|
export type { RevealOrigin } from "./theme/useTheme"
|
|
213
|
-
export { detectBackdropFilter, isBrokenBackdropEngine, NO_BACKDROP_ATTR } from "./theme/backdrop"
|
|
245
|
+
export { detectBackdropFilter, GLASS_BACKDROP_ATTR, isBrokenBackdropEngine, NO_BACKDROP_ATTR, setGlassBackdrop } from "./theme/backdrop"
|
|
214
246
|
export { DEFAULT_SURFACE } from "./theme/tokens"
|
|
215
247
|
export { defineTheme } from "./theme/define"
|
|
216
248
|
export type { ThemeOverrides } from "./theme/define"
|
|
@@ -222,7 +254,7 @@ export type {
|
|
|
222
254
|
SurfaceTokens,
|
|
223
255
|
TokenSet,
|
|
224
256
|
} from "./theme/tokens"
|
|
225
|
-
export { amber, dark,
|
|
257
|
+
export { amber, dark, light, lime, nord, presets, rose, violet } from "./theme/presets"
|
|
226
258
|
export type { PresetName } from "./theme/presets"
|
|
227
259
|
export { parseConfig, serializeConfig, UI_CONFIG_VERSION } from "./theme/config"
|
|
228
260
|
export type { UiConfig } from "./theme/config"
|
|
@@ -237,9 +269,29 @@ export {
|
|
|
237
269
|
mergeShortcutGroups,
|
|
238
270
|
} from "./composables/useHotkeys"
|
|
239
271
|
export type { HotkeyBinding, HotkeyHelp, ShortcutEntry, ShortcutGroup } from "./composables/useHotkeys"
|
|
272
|
+
export {
|
|
273
|
+
findHotkeyConflicts,
|
|
274
|
+
hotkeyConflicts,
|
|
275
|
+
hotkeySteps,
|
|
276
|
+
matchesHotkey,
|
|
277
|
+
pendingHotkey,
|
|
278
|
+
sequenceProgress,
|
|
279
|
+
useAppleKeyboard,
|
|
280
|
+
} from "./composables/useHotkeys"
|
|
281
|
+
export type { HotkeyConflict, HotkeyStep } from "./composables/useHotkeys"
|
|
282
|
+
export { anyModalOpen, topModalElement, useModalLayer } from "./components/modalDepth"
|
|
283
|
+
export type { ModalLayer, ModalLayerOptions } from "./components/modalDepth"
|
|
240
284
|
export { provideGlass, useGlass } from "./composables/useGlass"
|
|
285
|
+
export { LP_CONFIG, lpConfig, mergeConfig, provideLpConfig, useLabels, useLinkComponent, useLpConfig } from "./composables/useLpConfig"
|
|
286
|
+
export type { LabelScope, LpConfig } from "./composables/useLpConfig"
|
|
241
287
|
export { useMergedClass, useMergedAttrs, mergeClass } from "./composables/useMergedClass"
|
|
242
|
-
export { useInputFilter } from "./composables/useInputFilter"
|
|
288
|
+
export { anchorPattern, stripDisallowed, useInputFilter } from "./composables/useInputFilter"
|
|
289
|
+
export { usePaintSelect } from "./composables/usePaintSelect"
|
|
290
|
+
export type { UsePaintSelectOptions } from "./composables/usePaintSelect"
|
|
291
|
+
export { LP_FIELD, fieldMessageId, provideField, useField, useFieldControl } from "./composables/useField"
|
|
292
|
+
export { FIELD_NOTICE_MS, useFieldNotice } from "./composables/useFieldNotice"
|
|
293
|
+
export type { FieldNotice, FieldNoticeOptions, FieldNoticeTone } from "./composables/useFieldNotice"
|
|
294
|
+
export type { FieldContext, FieldControlState } from "./composables/useField"
|
|
243
295
|
export type { UseInputFilterOptions } from "./composables/useInputFilter"
|
|
244
296
|
export { easeOut, easeTravel, easingToken, prefersReducedMotion } from "./composables/easing"
|
|
245
297
|
export { useReveal } from "./composables/useReveal"
|
|
@@ -249,6 +301,10 @@ export { useRovingFocus } from "./composables/useRovingFocus"
|
|
|
249
301
|
export type { RovingItem, UseRovingFocusOptions } from "./composables/useRovingFocus"
|
|
250
302
|
export { useFormDraft } from "./composables/useFormDraft"
|
|
251
303
|
export type { UseFormDraft, UseFormDraftOptions } from "./composables/useFormDraft"
|
|
304
|
+
export { DEFAULT_MASK_TOKENS, applyMask, maskDelete, parseMask, useInputMask } from "./composables/useInputMask"
|
|
305
|
+
export type { MaskOptions, MaskResult, MaskSpec, MaskToken, MaskTokens, UseInputMaskOptions } from "./composables/useInputMask"
|
|
306
|
+
export { deepEqual, useForm } from "./composables/useForm"
|
|
307
|
+
export type { FieldBinding, FieldRule, FormErrorMessage, FormErrors, FormRules, UseForm, UseFormOptions } from "./composables/useForm"
|
|
252
308
|
|
|
253
309
|
export { useSettled } from "./composables/useSettled"
|
|
254
310
|
export type { UseSettledOptions } from "./composables/useSettled"
|
|
@@ -265,3 +321,16 @@ export type {
|
|
|
265
321
|
ToastOptions,
|
|
266
322
|
ToastVariant,
|
|
267
323
|
} from "./composables/useToast"
|
|
324
|
+
export type { ToastPromiseMessages } from "./composables/useToast"
|
|
325
|
+
export {
|
|
326
|
+
cacheSystemThemes,
|
|
327
|
+
normalizeTheme,
|
|
328
|
+
prefersDarkScheme,
|
|
329
|
+
themeEntries,
|
|
330
|
+
} from "./theme/useTheme"
|
|
331
|
+
export type { SystemThemes, UseTheme } from "./theme/useTheme"
|
|
332
|
+
export { layoutController } from "./layout/useLayout"
|
|
333
|
+
export type { LayoutController } from "./layout/useLayout"
|
|
334
|
+
export { default as LpThemeProvider } from "./components/LpThemeProvider.vue"
|
|
335
|
+
export { isInternalHref, resolveLink } from "./components/link"
|
|
336
|
+
export type { LinkTarget, ResolvedLink } from "./components/link"
|
package/src/kit-icons.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/* AUTO-GENERATED by scripts/gen-kit-icons.mjs — do not edit.
|
|
2
|
+
* The lucide icons kit components render, registered offline by icons.ts. */
|
|
3
|
+
import type { IconifyJSON } from "@iconify/vue"
|
|
4
|
+
|
|
5
|
+
export const KIT_ICONS: IconifyJSON = {"prefix":"lucide","icons":{"activity":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\"/>"},"arrow-down":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 5v14m7-7l-7 7l-7-7\"/>"},"arrow-up":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m5 12l7-7l7 7m-7 7V5\"/>"},"bell":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.268 21a2 2 0 0 0 3.464 0m-10.47-5.674A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\"/>"},"bell-off":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.268 21a2 2 0 0 0 3.464 0M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742M2 2l20 20M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05\"/>"},"calendar":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M8 2v4m8-4v4\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"/><path d=\"M3 10h18\"/></g>"},"calendar-range":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"/><path d=\"M16 2v4M3 10h18M8 2v4m9 8h-6m2 4H7m0-4h.01M17 18h.01\"/></g>"},"chart-no-axes-column":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 21v-6m7 6V3m7 18V9\"/>"},"chart-pie":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z\"/><path d=\"M21.21 15.89A10 10 0 1 1 8 2.83\"/></g>"},"check":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 6L9 17l-5-5\"/>"},"check-check":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M18 6L7 17l-5-5m20-2l-7.5 7.5L13 16\"/>"},"circle-check-big":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M21.801 10A10 10 0 1 1 17 3.335\"/><path d=\"m9 11l3 3L22 4\"/></g>"},"chevron-down":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"/>"},"chevron-left":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m15 18l-6-6l6-6\"/>"},"chevron-right":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"/>"},"chevron-up":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m18 15l-6-6l-6 6\"/>"},"chevrons-up-down":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m7 15l5 5l5-5M7 9l5-5l5 5\"/>"},"circle-alert":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 8v4m0 4h.01\"/></g>"},"circle-check":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12l2 2l4-4\"/></g>"},"circle-x":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9l-6 6m0-6l6 6\"/></g>"},"clipboard":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"/><path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"/></g>"},"clipboard-list":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"8\" height=\"4\" x=\"8\" y=\"2\" rx=\"1\" ry=\"1\"/><path d=\"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2m4 7h4m-4 5h4m-8-5h.01M8 16h.01\"/></g>"},"clock":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 6v6l4 2\"/></g>"},"code":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m16 18l6-6l-6-6M8 6l-6 6l6 6\"/>"},"columns-3":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M9 3v18m6-18v18\"/></g>"},"container":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z\"/><path d=\"M10 21.9V14L2.1 9.1M10 14l11.9-6.9M14 19.8v-8.1m4 5.8V9.4\"/></g>"},"copy":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"/></g>"},"crosshair":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M22 12h-4M6 12H2m10-6V2m0 20v-4\"/></g>"},"database":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\"/><path d=\"M3 5v14a9 3 0 0 0 18 0V5\"/><path d=\"M3 12a9 3 0 0 0 18 0\"/></g>"},"dot":{"body":"<circle cx=\"12.1\" cy=\"12.1\" r=\"1\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"/>"},"download":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><path d=\"m7 10l5 5l5-5\"/></g>"},"external-link":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/>"},"eye":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g>"},"eye-off":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242\"/><path d=\"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20\"/></g>"},"file":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5\"/></g>"},"file-archive":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5M8 12v-1m0 7v-2m0-9V6\"/><circle cx=\"8\" cy=\"20\" r=\"2\"/></g>"},"file-code":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5m-10 4.5L8 15l2 2.5m4-5l2 2.5l-2 2.5\"/></g>"},"file-cog":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8zm5 0v12a2 2 0 0 1-2 2h-4.182M3.305 19.53l.923-.382M4 10.592V4a2 2 0 0 1 2-2h8M4.228 16.852l-.924-.383m2.548-1.241l-.383-.923m.383 6.467l-.383.924m2.679-6.468l.383-.923m-.001 7.391l-.382-.924m1.625-3.92l.922-.383m-.922 2.679l.922.383\"/><circle cx=\"7\" cy=\"18\" r=\"3\"/></g>"},"file-image":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5\"/><circle cx=\"10\" cy=\"12\" r=\"2\"/><path d=\"m20 17l-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22\"/></g>"},"file-json":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4m-10 4a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1a1 1 0 0 1 1 1v1a1 1 0 0 0 1 1m4 0a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1a1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1\"/></g>","hidden":true},"file-key":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M14 2v5a1 1 0 0 0 1 1h5M4 12v6m0-4h2\"/><path d=\"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4\"/><circle cx=\"4\" cy=\"20\" r=\"2\"/></g>"},"file-lock":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M4 9.8V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5M9 17v-2a2 2 0 0 0-4 0v2\"/><rect width=\"8\" height=\"5\" x=\"3\" y=\"17\" rx=\"1\"/></g>"},"file-spreadsheet":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5M8 13h2m4 0h2m-8 4h2m4 0h2\"/></g>"},"file-terminal":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5M8 16l2-2l-2-2m4 6h4\"/></g>"},"file-text":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8\"/></g>"},"file-type":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"/><path d=\"M14 2v5a1 1 0 0 0 1 1h5m-9 10h2m-1-6v6m-3-5v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5\"/></g>"},"filter":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M22 3H2l8 9.46V19l4 2v-8.54z\"/>","hidden":true},"filter-x":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055M22 3l-5 5m0-5l5 5\"/>","hidden":true},"folder":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"/>"},"folder-open":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 14l1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\"/>"},"folder-search":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1M21 21l-1.9-1.9\"/><circle cx=\"17\" cy=\"17\" r=\"3\"/></g>"},"git-branch":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 6a9 9 0 0 0-9 9V3\"/><circle cx=\"18\" cy=\"6\" r=\"3\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/></g>"},"image-off":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m2 2l20 20M10.41 10.41a2 2 0 1 1-2.83-2.83m5.92 5.92L6 21m12-9l3 3\"/><path d=\"M3.59 3.59A2 2 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59M21 15V5a2 2 0 0 0-2-2H9\"/></g>"},"inbox":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M22 12h-6l-2 3h-4l-2-3H2\"/><path d=\"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11\"/></g>"},"info":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4m0-4h.01\"/></g>"},"link":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"/><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"/></g>"},"list":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13\"/>"},"loader-circle":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>"},"locate-fixed":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M2 12h3m14 0h3M12 2v3m0 14v3\"/><circle cx=\"12\" cy=\"12\" r=\"7\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g>"},"lock":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/></g>"},"lock-open":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 9.9-1\"/></g>"},"map":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0zm.894.211v15M9 3.236v15\"/>"},"map-pin":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0\"/><circle cx=\"12\" cy=\"10\" r=\"3\"/></g>"},"maximize-2":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6\"/>"},"menu":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"/>"},"minus":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14\"/>"},"monitor":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"20\" height=\"14\" x=\"2\" y=\"3\" rx=\"2\"/><path d=\"M8 21h8m-4-4v4\"/></g>"},"moon":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"/>"},"octagon-alert":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 16h.01M12 8v4m3.312-10a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z\"/>"},"package":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73zm1 .27V12\"/><path d=\"M3.29 7L12 12l8.71-5M7.5 4.27l9 5.15\"/></g>"},"palette":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M12 22a1 1 0 0 1 0-20a10 9 0 0 1 10 9a5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z\"/><circle cx=\"13.5\" cy=\"6.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"17.5\" cy=\"10.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"6.5\" cy=\"12.5\" r=\".5\" fill=\"currentColor\"/><circle cx=\"8.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\"/></g>"},"plus":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7v14\"/>"},"rotate-ccw":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8\"/><path d=\"M3 3v5h5\"/></g>"},"rotate-cw":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/></g>"},"scroll-text":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M15 12h-5m5-4h-5m9 9V5a2 2 0 0 0-2-2H4\"/><path d=\"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3\"/></g>"},"search":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m21 21l-4.34-4.34\"/><circle cx=\"11\" cy=\"11\" r=\"8\"/></g>"},"server":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><rect width=\"20\" height=\"8\" x=\"2\" y=\"2\" rx=\"2\" ry=\"2\"/><rect width=\"20\" height=\"8\" x=\"2\" y=\"14\" rx=\"2\" ry=\"2\"/><path d=\"M6 6h.01M6 18h.01\"/></g>"},"sun":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"/></g>"},"trash-2":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"/>"},"trending-down":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M16 17h6v-6\"/><path d=\"m22 17l-8.5-8.5l-5 5L2 7\"/></g>"},"trending-up":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M16 7h6v6\"/><path d=\"m22 7l-8.5 8.5l-5-5L2 17\"/></g>"},"triangle-alert":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01\"/>"},"undo-2":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M9 14L4 9l5-5\"/><path d=\"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11\"/></g>"},"upload":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/>"},"x":{"body":"<path fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M18 6L6 18M6 6l12 12\"/>"},"zoom-in":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21l-4.35-4.35M11 8v6m-3-3h6\"/></g>"},"zoom-out":{"body":"<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21l-4.35-4.35M8 11h6\"/></g>"}},"width":24,"height":24,"aliases":{"check-circle":{"parent":"circle-check-big"}}}
|
package/src/layout/tree.ts
CHANGED
|
@@ -37,6 +37,13 @@ export type LayoutNode = Leaf | Split
|
|
|
37
37
|
let uid = 0
|
|
38
38
|
const nid = () => `lp-n${uid++}`
|
|
39
39
|
|
|
40
|
+
// Keep fresh ids clear of ids restored from a snapshot.
|
|
41
|
+
function claimId(id: string): string {
|
|
42
|
+
const n = /^lp-n(\d+)$/.exec(id)
|
|
43
|
+
if (n) uid = Math.max(uid, Number(n[1]) + 1)
|
|
44
|
+
return id
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
function leaf(block: string): Leaf {
|
|
41
48
|
return { kind: "leaf", id: nid(), blocks: [block], active: 0, size: 1 }
|
|
42
49
|
}
|
|
@@ -286,3 +293,26 @@ export function deserializeLayout(data: SerializedNode): Split {
|
|
|
286
293
|
}
|
|
287
294
|
return reactive(hydrate(data) as Split)
|
|
288
295
|
}
|
|
296
|
+
|
|
297
|
+
// ── history snapshots ────────────────────────────────────────
|
|
298
|
+
// Like serializeLayout, but keeping node ids: restoring an undo step with
|
|
299
|
+
// fresh ids remounted every block and threw away its local state.
|
|
300
|
+
type SnapshotNode =
|
|
301
|
+
| { kind: "leaf"; id: string; blocks: string[]; active: number; size: number }
|
|
302
|
+
| { kind: "split"; id: string; dir: Dir; size: number; children: SnapshotNode[] }
|
|
303
|
+
|
|
304
|
+
export function snapshotLayout(root: Split): string {
|
|
305
|
+
const strip = (n: LayoutNode): SnapshotNode =>
|
|
306
|
+
n.kind === "leaf"
|
|
307
|
+
? { kind: "leaf", id: n.id, blocks: [...n.blocks], active: n.active, size: n.size }
|
|
308
|
+
: { kind: "split", id: n.id, dir: n.dir, size: n.size, children: n.children.map(strip) }
|
|
309
|
+
return JSON.stringify(strip(root))
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export function restoreLayout(snapshot: string): Split {
|
|
313
|
+
const hydrate = (n: SnapshotNode): LayoutNode =>
|
|
314
|
+
n.kind === "leaf"
|
|
315
|
+
? { kind: "leaf", id: claimId(n.id), blocks: [...n.blocks], active: n.active, size: n.size }
|
|
316
|
+
: { kind: "split", id: claimId(n.id), dir: n.dir, size: n.size, children: n.children.map(hydrate) }
|
|
317
|
+
return reactive(hydrate(JSON.parse(snapshot) as SnapshotNode) as Split)
|
|
318
|
+
}
|