@bevelo/solid 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/dist/accordion-7jt3BPeM.js +101 -0
- package/dist/accordion-BZw6wfXC.cjs +142 -0
- package/dist/accordion-CbEiLZg1.d.ts +65 -0
- package/dist/accordion-D96X2Dfn.d.cts +65 -0
- package/dist/accordion.cjs +9 -0
- package/dist/accordion.d.cts +2 -0
- package/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +1 -0
- package/dist/agent.cjs +74 -0
- package/dist/agent.d.cts +2 -0
- package/dist/agent.d.ts +2 -0
- package/dist/agent.js +1 -0
- package/dist/alert-dialog-5MyAE281.d.cts +41 -0
- package/dist/alert-dialog-BJ83l4Yr.d.ts +41 -0
- package/dist/alert-dialog-__fU1AaI.cjs +150 -0
- package/dist/alert-dialog-dDX-88oC.js +121 -0
- package/dist/alert-dialog.cjs +7 -0
- package/dist/alert-dialog.d.cts +2 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +1 -0
- package/dist/alert.cjs +73 -0
- package/dist/alert.d.cts +19 -0
- package/dist/alert.d.ts +19 -0
- package/dist/alert.js +72 -0
- package/dist/aspect-ratio.cjs +25 -0
- package/dist/aspect-ratio.d.cts +13 -0
- package/dist/aspect-ratio.d.ts +13 -0
- package/dist/aspect-ratio.js +24 -0
- package/dist/async-options.cjs +93 -0
- package/dist/async-options.d.cts +50 -0
- package/dist/async-options.d.ts +50 -0
- package/dist/async-options.js +92 -0
- package/dist/autocomplete.cjs +320 -0
- package/dist/autocomplete.d.cts +135 -0
- package/dist/autocomplete.d.ts +135 -0
- package/dist/autocomplete.js +318 -0
- package/dist/avatar.cjs +113 -0
- package/dist/avatar.d.cts +46 -0
- package/dist/avatar.d.ts +46 -0
- package/dist/avatar.js +110 -0
- package/dist/badge.cjs +50 -0
- package/dist/badge.d.cts +21 -0
- package/dist/badge.d.ts +21 -0
- package/dist/badge.js +49 -0
- package/dist/breadcrumb.cjs +62 -0
- package/dist/breadcrumb.d.cts +22 -0
- package/dist/breadcrumb.d.ts +22 -0
- package/dist/breadcrumb.js +61 -0
- package/dist/button.cjs +44 -0
- package/dist/button.d.cts +35 -0
- package/dist/button.d.ts +35 -0
- package/dist/button.js +43 -0
- package/dist/calendar-DHg328Wh.cjs +915 -0
- package/dist/calendar-DeAf96cJ.js +838 -0
- package/dist/calendar.cjs +4 -0
- package/dist/calendar.d.cts +88 -0
- package/dist/calendar.d.ts +88 -0
- package/dist/calendar.js +1 -0
- package/dist/card-BTasFPAi.cjs +128 -0
- package/dist/card-Bl_qvP9O.d.ts +42 -0
- package/dist/card-GTyhk9cq.js +87 -0
- package/dist/card-s7z9AgPW.d.cts +42 -0
- package/dist/card.cjs +9 -0
- package/dist/card.d.cts +2 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +1 -0
- package/dist/carousel.cjs +220 -0
- package/dist/carousel.d.cts +68 -0
- package/dist/carousel.d.ts +68 -0
- package/dist/carousel.js +218 -0
- package/dist/checkbox-group.cjs +81 -0
- package/dist/checkbox-group.d.cts +44 -0
- package/dist/checkbox-group.d.ts +44 -0
- package/dist/checkbox-group.js +79 -0
- package/dist/checkbox.cjs +104 -0
- package/dist/checkbox.d.cts +50 -0
- package/dist/checkbox.d.ts +50 -0
- package/dist/checkbox.js +103 -0
- package/dist/collapsible-BnSkwTni.cjs +106 -0
- package/dist/collapsible-CpDUzooq.d.ts +57 -0
- package/dist/collapsible-DyHC_FGP.js +71 -0
- package/dist/collapsible-O9hUWgJA.d.cts +57 -0
- package/dist/collapsible.cjs +8 -0
- package/dist/collapsible.d.cts +2 -0
- package/dist/collapsible.d.ts +2 -0
- package/dist/collapsible.js +1 -0
- package/dist/color-picker.cjs +300 -0
- package/dist/color-picker.d.cts +151 -0
- package/dist/color-picker.d.ts +151 -0
- package/dist/color-picker.js +286 -0
- package/dist/combobox-BE_Ofnla.d.cts +263 -0
- package/dist/combobox-DLlN9OA1.js +922 -0
- package/dist/combobox-EPlhNIDM.d.ts +263 -0
- package/dist/combobox-s2YZXpzm.cjs +1119 -0
- package/dist/combobox.cjs +35 -0
- package/dist/combobox.d.cts +2 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.js +1 -0
- package/dist/command-CL-Yr9xn.cjs +856 -0
- package/dist/command-D1obN_-I.js +707 -0
- package/dist/command-Dl9njwVq.d.cts +198 -0
- package/dist/command-M3-krsPS.d.ts +198 -0
- package/dist/command.cjs +16 -0
- package/dist/command.d.cts +2 -0
- package/dist/command.d.ts +2 -0
- package/dist/command.js +1 -0
- package/dist/context-menu-BlBg_gSG.js +166 -0
- package/dist/context-menu-CJ9UfOP7.d.cts +47 -0
- package/dist/context-menu-CYJ3zH5X.cjs +189 -0
- package/dist/context-menu-KR3kfesV.d.ts +47 -0
- package/dist/context-menu.cjs +6 -0
- package/dist/context-menu.d.cts +2 -0
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +1 -0
- package/dist/controller-BqMwv5AS.cjs +64 -0
- package/dist/controller-C8Z-wsos.d.cts +5 -0
- package/dist/controller-C8Z-wsos.d.ts +5 -0
- package/dist/controller-D9qJwhBF.js +53 -0
- package/dist/date-input.cjs +274 -0
- package/dist/date-input.d.cts +83 -0
- package/dist/date-input.d.ts +83 -0
- package/dist/date-input.js +271 -0
- package/dist/date-picker-B5FO4aeT.d.cts +153 -0
- package/dist/date-picker-Ba4QQARc.cjs +888 -0
- package/dist/date-picker-CALdRWyJ.js +841 -0
- package/dist/date-picker-D1WyqdXf.d.ts +153 -0
- package/dist/date-picker.cjs +4 -0
- package/dist/date-picker.d.cts +2 -0
- package/dist/date-picker.d.ts +2 -0
- package/dist/date-picker.js +1 -0
- package/dist/description-content-BLuIA4Pb.cjs +91 -0
- package/dist/description-content-BWxZuDXC.js +56 -0
- package/dist/dialog-BeQDFmmz.cjs +165 -0
- package/dist/dialog-DjzR1RON.d.ts +56 -0
- package/dist/dialog-LT5bRUot.js +135 -0
- package/dist/dialog-qAhmbIqQ.d.cts +56 -0
- package/dist/dialog-view-DbygGXef.js +118 -0
- package/dist/dialog-view-DfsNxRN7.cjs +147 -0
- package/dist/dialog.cjs +7 -0
- package/dist/dialog.d.cts +2 -0
- package/dist/dialog.d.ts +2 -0
- package/dist/dialog.js +1 -0
- package/dist/direction.cjs +25 -0
- package/dist/direction.d.cts +14 -0
- package/dist/direction.d.ts +14 -0
- package/dist/direction.js +24 -0
- package/dist/dnd.cjs +124 -0
- package/dist/dnd.d.cts +64 -0
- package/dist/dnd.d.ts +64 -0
- package/dist/dnd.js +119 -0
- package/dist/drawer.cjs +114 -0
- package/dist/drawer.d.cts +65 -0
- package/dist/drawer.d.ts +65 -0
- package/dist/drawer.js +111 -0
- package/dist/empty-state.cjs +70 -0
- package/dist/empty-state.d.cts +20 -0
- package/dist/empty-state.d.ts +20 -0
- package/dist/empty-state.js +69 -0
- package/dist/engine-signal-1bLbbRhE.js +9 -0
- package/dist/engine-signal-6pShphhv.cjs +14 -0
- package/dist/error-state.cjs +81 -0
- package/dist/error-state.d.cts +23 -0
- package/dist/error-state.d.ts +23 -0
- package/dist/error-state.js +80 -0
- package/dist/field-api-BW0JlKyA.cjs +18 -0
- package/dist/field-api-D5RjQPB3.js +13 -0
- package/dist/field.cjs +238 -0
- package/dist/field.d.cts +61 -0
- package/dist/field.d.ts +61 -0
- package/dist/field.js +232 -0
- package/dist/file-input.cjs +103 -0
- package/dist/file-input.d.cts +69 -0
- package/dist/file-input.d.ts +69 -0
- package/dist/file-input.js +101 -0
- package/dist/gauge-parts-B3P8g6bU.d.cts +29 -0
- package/dist/gauge-parts-Ca1FaLmF.js +84 -0
- package/dist/gauge-parts-Da9Dvvym.d.ts +29 -0
- package/dist/gauge-parts-DybADezg.cjs +95 -0
- package/dist/headless-BQH7sRXk.cjs +646 -0
- package/dist/headless-CoFdY0wl.d.cts +143 -0
- package/dist/headless-DYGhuD8h.js +623 -0
- package/dist/headless-kqnA1wix.d.ts +143 -0
- package/dist/headless-props-BE1RQfyU.d.cts +4 -0
- package/dist/headless-props-CBYucfR5.js +66 -0
- package/dist/headless-props-Cf7LwO5W.cjs +107 -0
- package/dist/headless-props-bnSQ57kj.d.ts +4 -0
- package/dist/headless.cjs +5 -0
- package/dist/headless.d.cts +2 -0
- package/dist/headless.d.ts +2 -0
- package/dist/headless.js +1 -0
- package/dist/hover-card.cjs +77 -0
- package/dist/hover-card.d.cts +49 -0
- package/dist/hover-card.d.ts +49 -0
- package/dist/hover-card.js +75 -0
- package/dist/icon-button.cjs +45 -0
- package/dist/icon-button.d.cts +21 -0
- package/dist/icon-button.d.ts +21 -0
- package/dist/icon-button.js +43 -0
- package/dist/image-cropper-BTboNMMN.d.ts +43 -0
- package/dist/image-cropper-ChThsl2E.cjs +113 -0
- package/dist/image-cropper-Q749T_mI.js +84 -0
- package/dist/image-cropper-Sw4GRMtW.d.cts +43 -0
- package/dist/image-cropper.cjs +6 -0
- package/dist/image-cropper.d.cts +2 -0
- package/dist/image-cropper.d.ts +2 -0
- package/dist/image-cropper.js +1 -0
- package/dist/image.cjs +44 -0
- package/dist/image.d.cts +29 -0
- package/dist/image.d.ts +29 -0
- package/dist/image.js +43 -0
- package/dist/index.cjs +1581 -0
- package/dist/index.d.cts +566 -0
- package/dist/index.d.ts +566 -0
- package/dist/index.js +867 -0
- package/dist/input-group.cjs +49 -0
- package/dist/input-group.d.cts +20 -0
- package/dist/input-group.d.ts +20 -0
- package/dist/input-group.js +48 -0
- package/dist/input.cjs +74 -0
- package/dist/input.d.cts +52 -0
- package/dist/input.d.ts +52 -0
- package/dist/input.js +72 -0
- package/dist/item-BMra-oi7.js +194 -0
- package/dist/item-C_ZhJGza.d.cts +71 -0
- package/dist/item-Dujbi4dB.cjs +265 -0
- package/dist/item-Uxz8gAzc.d.ts +71 -0
- package/dist/item.cjs +11 -0
- package/dist/item.d.cts +2 -0
- package/dist/item.d.ts +2 -0
- package/dist/item.js +1 -0
- package/dist/kbd.cjs +75 -0
- package/dist/kbd.d.cts +17 -0
- package/dist/kbd.d.ts +17 -0
- package/dist/kbd.js +74 -0
- package/dist/label.cjs +27 -0
- package/dist/label.d.cts +15 -0
- package/dist/label.d.ts +15 -0
- package/dist/label.js +26 -0
- package/dist/list-data-D0kJD8WS.js +40 -0
- package/dist/list-data-DKH9VSgs.cjs +69 -0
- package/dist/listbox-CuISC5VB.js +188 -0
- package/dist/listbox-DLpIDe7l.cjs +217 -0
- package/dist/listbox-DzRlXOH7.d.cts +96 -0
- package/dist/listbox-Gsy3yFFS.d.ts +96 -0
- package/dist/listbox.cjs +6 -0
- package/dist/listbox.d.cts +2 -0
- package/dist/listbox.d.ts +2 -0
- package/dist/listbox.js +1 -0
- package/dist/loader.cjs +37 -0
- package/dist/loader.d.cts +27 -0
- package/dist/loader.d.ts +27 -0
- package/dist/loader.js +36 -0
- package/dist/mention-menu.cjs +159 -0
- package/dist/mention-menu.d.cts +68 -0
- package/dist/mention-menu.d.ts +68 -0
- package/dist/mention-menu.js +157 -0
- package/dist/menu-BptiQtff.js +347 -0
- package/dist/menu-DCdNGoQP.d.cts +57 -0
- package/dist/menu-DeSo-q8T.d.ts +57 -0
- package/dist/menu-qGui6tgy.cjs +394 -0
- package/dist/menu.cjs +10 -0
- package/dist/menu.d.cts +2 -0
- package/dist/menu.d.ts +2 -0
- package/dist/menu.js +1 -0
- package/dist/menubar.cjs +53 -0
- package/dist/menubar.d.cts +33 -0
- package/dist/menubar.d.ts +33 -0
- package/dist/menubar.js +51 -0
- package/dist/meter.cjs +85 -0
- package/dist/meter.d.cts +42 -0
- package/dist/meter.d.ts +42 -0
- package/dist/meter.js +80 -0
- package/dist/native-select-Ca8YL0F5.js +104 -0
- package/dist/native-select-D5oPMNzp.cjs +121 -0
- package/dist/native-select-DqUdVxFD.d.ts +46 -0
- package/dist/native-select-IFCcJ7sM.d.cts +46 -0
- package/dist/native-select.cjs +5 -0
- package/dist/native-select.d.cts +2 -0
- package/dist/native-select.d.ts +2 -0
- package/dist/native-select.js +1 -0
- package/dist/navigation-menu.cjs +164 -0
- package/dist/navigation-menu.d.cts +68 -0
- package/dist/navigation-menu.d.ts +68 -0
- package/dist/navigation-menu.js +162 -0
- package/dist/number-input.cjs +181 -0
- package/dist/number-input.d.cts +87 -0
- package/dist/number-input.d.ts +87 -0
- package/dist/number-input.js +173 -0
- package/dist/otp-input.cjs +111 -0
- package/dist/otp-input.d.cts +49 -0
- package/dist/otp-input.d.ts +49 -0
- package/dist/otp-input.js +110 -0
- package/dist/overlay-controller-BNGpdfOi.cjs +64 -0
- package/dist/overlay-controller-BwJtB1tP.js +47 -0
- package/dist/overlay-controller-Cchdw1aT.d.cts +21 -0
- package/dist/overlay-controller-lT7Gkj00.d.ts +21 -0
- package/dist/pagination.cjs +153 -0
- package/dist/pagination.d.cts +55 -0
- package/dist/pagination.d.ts +55 -0
- package/dist/pagination.js +151 -0
- package/dist/password-input.cjs +110 -0
- package/dist/password-input.d.cts +71 -0
- package/dist/password-input.d.ts +71 -0
- package/dist/password-input.js +108 -0
- package/dist/popover.cjs +106 -0
- package/dist/popover.d.cts +66 -0
- package/dist/popover.d.ts +66 -0
- package/dist/popover.js +103 -0
- package/dist/preferences.cjs +82 -0
- package/dist/preferences.d.cts +26 -0
- package/dist/preferences.d.ts +26 -0
- package/dist/preferences.js +80 -0
- package/dist/presence.cjs +71 -0
- package/dist/presence.d.cts +31 -0
- package/dist/presence.d.ts +31 -0
- package/dist/presence.js +69 -0
- package/dist/progress.cjs +88 -0
- package/dist/progress.d.cts +40 -0
- package/dist/progress.d.ts +40 -0
- package/dist/progress.js +83 -0
- package/dist/query.cjs +235 -0
- package/dist/query.d.cts +72 -0
- package/dist/query.d.ts +72 -0
- package/dist/query.js +220 -0
- package/dist/radio.cjs +129 -0
- package/dist/radio.d.cts +57 -0
- package/dist/radio.d.ts +57 -0
- package/dist/radio.js +127 -0
- package/dist/rating.cjs +95 -0
- package/dist/rating.d.cts +53 -0
- package/dist/rating.d.ts +53 -0
- package/dist/rating.js +93 -0
- package/dist/resizable-BK4Fz6B5.d.ts +49 -0
- package/dist/resizable-CTAsuFPX.d.cts +49 -0
- package/dist/resizable-CwkUH-MF.js +108 -0
- package/dist/resizable-Ddlx8mi3.cjs +143 -0
- package/dist/resizable.cjs +8 -0
- package/dist/resizable.d.cts +2 -0
- package/dist/resizable.d.ts +2 -0
- package/dist/resizable.js +1 -0
- package/dist/scroll-area.cjs +48 -0
- package/dist/scroll-area.d.cts +32 -0
- package/dist/scroll-area.d.ts +32 -0
- package/dist/scroll-area.js +46 -0
- package/dist/segmented-control.cjs +97 -0
- package/dist/segmented-control.d.cts +54 -0
- package/dist/segmented-control.d.ts +54 -0
- package/dist/segmented-control.js +94 -0
- package/dist/select-BFfmeGUv.d.ts +153 -0
- package/dist/select-BQh8JVx5.cjs +493 -0
- package/dist/select-COgnUXgF.d.cts +153 -0
- package/dist/select-SutRVX6v.js +398 -0
- package/dist/select.cjs +18 -0
- package/dist/select.d.cts +2 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +1 -0
- package/dist/separator.cjs +19 -0
- package/dist/separator.d.cts +13 -0
- package/dist/separator.d.ts +13 -0
- package/dist/separator.js +18 -0
- package/dist/sheet.cjs +131 -0
- package/dist/sheet.d.cts +84 -0
- package/dist/sheet.d.ts +84 -0
- package/dist/sheet.js +128 -0
- package/dist/sidebar-CIG1qDhQ.cjs +93 -0
- package/dist/sidebar-Dbx8GT2H.d.ts +43 -0
- package/dist/sidebar-fT_qQ-T0.js +64 -0
- package/dist/sidebar-l-Aq9IOz.d.cts +43 -0
- package/dist/sidebar.cjs +7 -0
- package/dist/sidebar.d.cts +2 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +1 -0
- package/dist/skeleton.cjs +62 -0
- package/dist/skeleton.d.cts +17 -0
- package/dist/skeleton.d.ts +17 -0
- package/dist/skeleton.js +61 -0
- package/dist/slider.cjs +146 -0
- package/dist/slider.d.cts +63 -0
- package/dist/slider.d.ts +63 -0
- package/dist/slider.js +137 -0
- package/dist/sortable-board-strict.cjs +121 -0
- package/dist/sortable-board-strict.d.cts +65 -0
- package/dist/sortable-board-strict.d.ts +65 -0
- package/dist/sortable-board-strict.js +114 -0
- package/dist/sortable-engine.cjs +150 -0
- package/dist/sortable-engine.d.cts +58 -0
- package/dist/sortable-engine.d.ts +58 -0
- package/dist/sortable-engine.js +148 -0
- package/dist/sortable-strict.cjs +108 -0
- package/dist/sortable-strict.d.cts +41 -0
- package/dist/sortable-strict.d.ts +41 -0
- package/dist/sortable-strict.js +102 -0
- package/dist/sortable.cjs +91 -0
- package/dist/sortable.d.cts +59 -0
- package/dist/sortable.d.ts +59 -0
- package/dist/sortable.js +90 -0
- package/dist/spinner-0flshyQD.d.cts +28 -0
- package/dist/spinner-CwRqmRiC.cjs +53 -0
- package/dist/spinner-DAy7BD58.js +36 -0
- package/dist/spinner-gyZlsbee.d.ts +28 -0
- package/dist/spinner.cjs +5 -0
- package/dist/spinner.d.cts +2 -0
- package/dist/spinner.d.ts +2 -0
- package/dist/spinner.js +1 -0
- package/dist/steps-BS3VTdAj.d.ts +42 -0
- package/dist/steps-C_q2sTwv.cjs +125 -0
- package/dist/steps-Cxo076uS.js +84 -0
- package/dist/steps-DNS1V6At.d.cts +42 -0
- package/dist/steps.cjs +8 -0
- package/dist/steps.d.cts +2 -0
- package/dist/steps.d.ts +2 -0
- package/dist/steps.js +1 -0
- package/dist/switch.cjs +90 -0
- package/dist/switch.d.cts +55 -0
- package/dist/switch.d.ts +55 -0
- package/dist/switch.js +88 -0
- package/dist/table.cjs +147 -0
- package/dist/table.d.cts +52 -0
- package/dist/table.d.ts +52 -0
- package/dist/table.js +146 -0
- package/dist/tabs.cjs +250 -0
- package/dist/tabs.d.cts +108 -0
- package/dist/tabs.d.ts +108 -0
- package/dist/tabs.js +243 -0
- package/dist/textarea.cjs +94 -0
- package/dist/textarea.d.cts +58 -0
- package/dist/textarea.d.ts +58 -0
- package/dist/textarea.js +92 -0
- package/dist/time-input.cjs +101 -0
- package/dist/time-input.d.cts +49 -0
- package/dist/time-input.d.ts +49 -0
- package/dist/time-input.js +100 -0
- package/dist/timeline-B-HlcIe2.d.cts +54 -0
- package/dist/timeline-B-nmr0Hb.js +113 -0
- package/dist/timeline-B9yOdmyL.cjs +178 -0
- package/dist/timeline-lJ2Eidq_.d.ts +54 -0
- package/dist/timeline.cjs +11 -0
- package/dist/timeline.d.cts +2 -0
- package/dist/timeline.d.ts +2 -0
- package/dist/timeline.js +1 -0
- package/dist/toast.cjs +320 -0
- package/dist/toast.d.cts +95 -0
- package/dist/toast.d.ts +95 -0
- package/dist/toast.js +307 -0
- package/dist/toggle-Bv70V6KS.d.cts +46 -0
- package/dist/toggle-Dpt_Qvx2.d.ts +46 -0
- package/dist/toggle-JXH5NEkQ.cjs +127 -0
- package/dist/toggle-group.cjs +63 -0
- package/dist/toggle-group.d.cts +35 -0
- package/dist/toggle-group.d.ts +35 -0
- package/dist/toggle-group.js +62 -0
- package/dist/toggle-nt4rA46s.js +104 -0
- package/dist/toggle.cjs +6 -0
- package/dist/toggle.d.cts +2 -0
- package/dist/toggle.d.ts +2 -0
- package/dist/toggle.js +1 -0
- package/dist/token-input-B0CXtxy3.d.cts +139 -0
- package/dist/token-input-BMkRWbm-.d.ts +139 -0
- package/dist/token-input-Cnw66beG.js +365 -0
- package/dist/token-input-NxrlP4Gz.cjs +418 -0
- package/dist/token-input.cjs +11 -0
- package/dist/token-input.d.cts +2 -0
- package/dist/token-input.d.ts +2 -0
- package/dist/token-input.js +1 -0
- package/dist/toolbar.cjs +97 -0
- package/dist/toolbar.d.cts +35 -0
- package/dist/toolbar.d.ts +35 -0
- package/dist/toolbar.js +95 -0
- package/dist/tooltip.cjs +90 -0
- package/dist/tooltip.d.cts +53 -0
- package/dist/tooltip.d.ts +53 -0
- package/dist/tooltip.js +88 -0
- package/dist/tree-B9ONanD2.d.cts +106 -0
- package/dist/tree-C1q2lYJs.js +238 -0
- package/dist/tree-CNWDUX_r.cjs +267 -0
- package/dist/tree-CtVvz_b4.d.ts +106 -0
- package/dist/tree-grid-BWZHm05V.d.cts +62 -0
- package/dist/tree-grid-C7SXcLbA.js +164 -0
- package/dist/tree-grid-CNajLoL-.cjs +193 -0
- package/dist/tree-grid-CmzYkxyz.d.ts +62 -0
- package/dist/tree-grid.cjs +7 -0
- package/dist/tree-grid.d.cts +2 -0
- package/dist/tree-grid.d.ts +2 -0
- package/dist/tree-grid.js +1 -0
- package/dist/tree.cjs +6 -0
- package/dist/tree.d.cts +2 -0
- package/dist/tree.d.ts +2 -0
- package/dist/tree.js +1 -0
- package/dist/trigger-menu-D6VAW4RC.d.ts +142 -0
- package/dist/trigger-menu-DbAaDRBP.d.cts +142 -0
- package/dist/trigger-menu-DrgodhOD.js +465 -0
- package/dist/trigger-menu-kLYrZ8M7.cjs +542 -0
- package/dist/trigger-menu.cjs +22 -0
- package/dist/trigger-menu.d.cts +2 -0
- package/dist/trigger-menu.d.ts +2 -0
- package/dist/trigger-menu.js +1 -0
- package/dist/virtual-list-BCbpPSc2.d.cts +63 -0
- package/dist/virtual-list-BwS-lXzi.d.ts +63 -0
- package/dist/virtual-list-Df4oyIaV.cjs +155 -0
- package/dist/virtual-list-eCLq_nPF.js +126 -0
- package/dist/virtual-list.cjs +7 -0
- package/dist/virtual-list.d.cts +2 -0
- package/dist/virtual-list.d.ts +2 -0
- package/dist/virtual-list.js +1 -0
- package/dist/virtual.cjs +59 -0
- package/dist/virtual.d.cts +45 -0
- package/dist/virtual.d.ts +45 -0
- package/dist/virtual.js +58 -0
- package/dist/waterfall-chart.cjs +115 -0
- package/dist/waterfall-chart.d.cts +42 -0
- package/dist/waterfall-chart.d.ts +42 -0
- package/dist/waterfall-chart.js +113 -0
- package/dist/waterfall.cjs +346 -0
- package/dist/waterfall.d.cts +91 -0
- package/dist/waterfall.d.ts +91 -0
- package/dist/waterfall.js +333 -0
- package/package.json +521 -3
- package/README.md +0 -3
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
import { r as descriptionNodes } from "./description-content-BWxZuDXC.js";
|
|
2
|
+
import { n as usePart, r as usePrimitive, t as createParts } from "./headless-DYGhuD8h.js";
|
|
3
|
+
import { n as useControllerAttach, t as createController } from "./controller-D9qJwhBF.js";
|
|
4
|
+
import { a as renderUntrackedChildren, i as liveState, s as withState } from "./headless-props-CBYucfR5.js";
|
|
5
|
+
import { createComponent, insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
6
|
+
import { commandEntryMatches, commandHighlighted, commandKeyAction, commandRunnable, commandTextSegments, resolveCommandFilter } from "@bevelo/core";
|
|
7
|
+
import { Index, Show, createContext, createEffect, createMemo, createSignal, onCleanup, onMount, splitProps, untrack, useContext } from "solid-js";
|
|
8
|
+
import { commandPrimitive } from "@bevelo/core/primitives/command";
|
|
9
|
+
// src/command-parts.tsx
|
|
10
|
+
const parts = createParts(commandPrimitive, {
|
|
11
|
+
root: "div",
|
|
12
|
+
panel: "div",
|
|
13
|
+
input: "input",
|
|
14
|
+
status: "div",
|
|
15
|
+
list: "div",
|
|
16
|
+
"group-label": "div",
|
|
17
|
+
option: "div",
|
|
18
|
+
"item-icon": "span",
|
|
19
|
+
"option-label": "span",
|
|
20
|
+
"option-shortcut": "span",
|
|
21
|
+
empty: "div"
|
|
22
|
+
});
|
|
23
|
+
const CommandRootPart = parts.Root;
|
|
24
|
+
const { Panel: CommandPanelPart, Input: CommandInputPart, Status: CommandStatusPart, List: CommandListPart, GroupLabel: CommandGroupLabelPart, Option: CommandOptionPart, ItemIcon: CommandItemIconPart, OptionLabel: CommandOptionLabelPart, OptionShortcut: CommandOptionShortcutPart, Empty: CommandEmptyPart } = parts;
|
|
25
|
+
/** The `panel` part. */
|
|
26
|
+
/** The `input` part. */
|
|
27
|
+
/** The `status` part. */
|
|
28
|
+
/** The `list` part. */
|
|
29
|
+
/** The `group-label` part. */
|
|
30
|
+
/** The `option` part. */
|
|
31
|
+
/** The `item-icon` part. */
|
|
32
|
+
/** The `option-label` part. */
|
|
33
|
+
/** The `option-shortcut` part. */
|
|
34
|
+
/** The `empty` part. */
|
|
35
|
+
// src/command-inline.tsx
|
|
36
|
+
var _tmpl$$1 = /*#__PURE__*/ template(`<div>`);
|
|
37
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<input type=text role=combobox aria-expanded=true data-part=input>`);
|
|
38
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<div role=listbox data-part=list>`);
|
|
39
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<div data-part=empty>`);
|
|
40
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<div role=status aria-live=polite data-part=status>`);
|
|
41
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<div data-part=group-label>`);
|
|
42
|
+
var _tmpl$7 = /*#__PURE__*/ template(`<div role=group data-part=group>`);
|
|
43
|
+
var _tmpl$8 = /*#__PURE__*/ template(`<span data-part=item-icon aria-hidden=true>`);
|
|
44
|
+
var _tmpl$9 = /*#__PURE__*/ template(`<div role=separator data-slot=command-separator>`);
|
|
45
|
+
var _tmpl$0 = /*#__PURE__*/ template(`<div role=option tabindex=-1 data-part=option>`);
|
|
46
|
+
var _tmpl$1 = /*#__PURE__*/ template(`<span data-part=option-label>`);
|
|
47
|
+
var _tmpl$10 = /*#__PURE__*/ template(`<span data-part=option-shortcut aria-hidden=true>`);
|
|
48
|
+
const InlineContext = createContext();
|
|
49
|
+
const GroupContext = createContext([]);
|
|
50
|
+
const ItemContext = createContext();
|
|
51
|
+
const NO_ITEMS = [];
|
|
52
|
+
/** The palette methods an inline list has no use for: it is always open and owns no ids. */
|
|
53
|
+
const inlinePaletteStubs = {
|
|
54
|
+
isOpen: () => true,
|
|
55
|
+
open: () => {},
|
|
56
|
+
close: () => {},
|
|
57
|
+
toggle: () => {},
|
|
58
|
+
matches: () => [],
|
|
59
|
+
options: () => [],
|
|
60
|
+
active: () => void 0,
|
|
61
|
+
runItem: () => {},
|
|
62
|
+
move: () => {},
|
|
63
|
+
inputId: () => "",
|
|
64
|
+
listboxId: () => "",
|
|
65
|
+
optionId: () => "",
|
|
66
|
+
groupLabelId: () => "",
|
|
67
|
+
instanceId: () => ""
|
|
68
|
+
};
|
|
69
|
+
const INLINE_OWNED = [
|
|
70
|
+
"query",
|
|
71
|
+
"label",
|
|
72
|
+
"items",
|
|
73
|
+
"status",
|
|
74
|
+
"pages",
|
|
75
|
+
"onPagesChange",
|
|
76
|
+
"page",
|
|
77
|
+
"onPageChange",
|
|
78
|
+
"onRun",
|
|
79
|
+
"onHighlight",
|
|
80
|
+
"onInput",
|
|
81
|
+
"filter",
|
|
82
|
+
"controller",
|
|
83
|
+
"children",
|
|
84
|
+
"className"
|
|
85
|
+
];
|
|
86
|
+
/** The inline list: state, the context, and the region that hosts the rows. */
|
|
87
|
+
function CommandInline(props) {
|
|
88
|
+
const [local, element] = splitProps(props, INLINE_OWNED);
|
|
89
|
+
const [ownQuery, setOwnQuery] = createSignal("");
|
|
90
|
+
const query = () => local.query ?? ownQuery();
|
|
91
|
+
const [requested, setRequested] = createSignal(void 0);
|
|
92
|
+
const initialPage = untrack(() => local.page);
|
|
93
|
+
const [ownPages, setOwnPages] = createSignal(initialPage === void 0 ? [] : [initialPage]);
|
|
94
|
+
const pages = () => local.pages ?? (local.page === void 0 ? ownPages() : [local.page]);
|
|
95
|
+
const page = () => pages()[pages().length - 1];
|
|
96
|
+
const filter = createMemo(() => resolveCommandFilter(local.filter));
|
|
97
|
+
const [registry, setRegistry] = createSignal(/* @__PURE__ */ new Map());
|
|
98
|
+
const entries = createMemo(() => [...registry().values()].map((read) => read()));
|
|
99
|
+
const runnable = createMemo(() => commandRunnable(entries(), query(), filter()));
|
|
100
|
+
const highlighted = createMemo(() => commandHighlighted(runnable(), requested()));
|
|
101
|
+
const status = () => local.status ?? "idle";
|
|
102
|
+
let root;
|
|
103
|
+
const state = createMemo(() => ({
|
|
104
|
+
empty: !entries().some((entry) => commandEntryMatches(entry, query(), filter())),
|
|
105
|
+
loading: status() === "loading",
|
|
106
|
+
count: runnable().length,
|
|
107
|
+
query: query(),
|
|
108
|
+
status: status()
|
|
109
|
+
}));
|
|
110
|
+
const setQuery = (next) => {
|
|
111
|
+
if (local.query === void 0) setOwnQuery(next);
|
|
112
|
+
local.onInput?.(next);
|
|
113
|
+
};
|
|
114
|
+
const highlight = (value) => {
|
|
115
|
+
setRequested(() => value);
|
|
116
|
+
const index = value === void 0 ? -1 : runnable().findIndex((entry) => entry.value === value);
|
|
117
|
+
local.onHighlight?.(value, { index });
|
|
118
|
+
};
|
|
119
|
+
const setPages = (next) => {
|
|
120
|
+
if (local.pages === void 0) setOwnPages(next);
|
|
121
|
+
local.onPagesChange?.([...next]);
|
|
122
|
+
local.onPageChange?.(next[next.length - 1]);
|
|
123
|
+
};
|
|
124
|
+
const push = (next) => setPages([...pages(), next]);
|
|
125
|
+
const pop = () => setPages(pages().slice(0, -1));
|
|
126
|
+
const run = (value) => {
|
|
127
|
+
const target = value ?? highlighted();
|
|
128
|
+
if (target === void 0) return false;
|
|
129
|
+
const entry = entries().find((candidate) => candidate.value === target);
|
|
130
|
+
if (entry === void 0) local.onRun?.(target);
|
|
131
|
+
else entry.run();
|
|
132
|
+
return true;
|
|
133
|
+
};
|
|
134
|
+
const scope = {
|
|
135
|
+
query,
|
|
136
|
+
highlighted,
|
|
137
|
+
filter,
|
|
138
|
+
state: liveState(state),
|
|
139
|
+
items: () => local.items ?? NO_ITEMS,
|
|
140
|
+
page,
|
|
141
|
+
setQuery,
|
|
142
|
+
highlight,
|
|
143
|
+
push,
|
|
144
|
+
register(key, entry) {
|
|
145
|
+
setRegistry((previous) => new Map(previous).set(key, entry));
|
|
146
|
+
},
|
|
147
|
+
unregister(key) {
|
|
148
|
+
setRegistry((previous) => {
|
|
149
|
+
const next = new Map(previous);
|
|
150
|
+
next.delete(key);
|
|
151
|
+
return next;
|
|
152
|
+
});
|
|
153
|
+
},
|
|
154
|
+
groupMatches(group) {
|
|
155
|
+
return entries().some((entry) => entry.groups.includes(group) && commandEntryMatches(entry, query(), filter()));
|
|
156
|
+
},
|
|
157
|
+
report(value) {
|
|
158
|
+
local.onRun?.(value);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const api = {
|
|
162
|
+
...inlinePaletteStubs,
|
|
163
|
+
query,
|
|
164
|
+
setQuery,
|
|
165
|
+
typeQuery: setQuery,
|
|
166
|
+
activeId: () => highlighted(),
|
|
167
|
+
run,
|
|
168
|
+
runActive: () => {
|
|
169
|
+
run();
|
|
170
|
+
},
|
|
171
|
+
count: () => runnable().length,
|
|
172
|
+
push,
|
|
173
|
+
pop,
|
|
174
|
+
setValue: (value) => highlight(value ?? void 0),
|
|
175
|
+
focus: () => root?.querySelector("input")?.focus()
|
|
176
|
+
};
|
|
177
|
+
useControllerAttach(local.controller, api);
|
|
178
|
+
const onKeyDown = (event) => {
|
|
179
|
+
const action = commandKeyAction(runnable(), highlighted(), event.key);
|
|
180
|
+
if (action === void 0) return;
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
if (action.kind === "highlight") highlight(action.entry.value);
|
|
183
|
+
else action.entry.run();
|
|
184
|
+
};
|
|
185
|
+
return createComponent(InlineContext.Provider, {
|
|
186
|
+
value: scope,
|
|
187
|
+
get children() {
|
|
188
|
+
var _el$ = _tmpl$$1();
|
|
189
|
+
var _ref$ = root;
|
|
190
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : root = _el$;
|
|
191
|
+
spread(_el$, mergeProps(element, {
|
|
192
|
+
get ["class"]() {
|
|
193
|
+
return element.class ?? local.className;
|
|
194
|
+
},
|
|
195
|
+
"role": "region",
|
|
196
|
+
get ["aria-label"]() {
|
|
197
|
+
return local.label ?? "Command";
|
|
198
|
+
},
|
|
199
|
+
"data-slot": "command",
|
|
200
|
+
"onKeyDown": onKeyDown
|
|
201
|
+
}), false, true);
|
|
202
|
+
insert(_el$, () => local.children);
|
|
203
|
+
return _el$;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/** A row's text as a reader hears it: aria-hidden icons and shortcuts are skipped. */
|
|
208
|
+
function visibleText(node) {
|
|
209
|
+
if (node.nodeType === 3) return node.textContent ?? "";
|
|
210
|
+
if (node instanceof Element && node.getAttribute("aria-hidden") === "true") return "";
|
|
211
|
+
let text = "";
|
|
212
|
+
for (const child of node.childNodes) text += visibleText(child);
|
|
213
|
+
return text;
|
|
214
|
+
}
|
|
215
|
+
const renderChildren = renderUntrackedChildren;
|
|
216
|
+
/** The search field. Outside an inline list it is the palette's `input` part. */
|
|
217
|
+
function CommandInput(props) {
|
|
218
|
+
const scope = useContext(InlineContext);
|
|
219
|
+
if (scope === void 0) return CommandInputPart(props);
|
|
220
|
+
const [own, rest] = splitProps(props, ["onInput"]);
|
|
221
|
+
return (() => {
|
|
222
|
+
var _el$2 = _tmpl$2();
|
|
223
|
+
spread(_el$2, mergeProps(rest, {
|
|
224
|
+
get value() {
|
|
225
|
+
return scope.query();
|
|
226
|
+
},
|
|
227
|
+
"onInput": (event) => {
|
|
228
|
+
scope.setQuery(event.currentTarget.value);
|
|
229
|
+
const host = own.onInput;
|
|
230
|
+
if (typeof host === "function") host(event);
|
|
231
|
+
}
|
|
232
|
+
}), false, false);
|
|
233
|
+
return _el$2;
|
|
234
|
+
})();
|
|
235
|
+
}
|
|
236
|
+
/** The listbox. A function child receives `{ items, highlightedValue }`. */
|
|
237
|
+
function CommandList(props) {
|
|
238
|
+
const scope = useContext(InlineContext);
|
|
239
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
240
|
+
if (scope === void 0) return CommandListPart({
|
|
241
|
+
...rest,
|
|
242
|
+
children: renderChildren(own.children, { items: NO_ITEMS })
|
|
243
|
+
});
|
|
244
|
+
return (() => {
|
|
245
|
+
var _el$3 = _tmpl$3();
|
|
246
|
+
spread(_el$3, rest, false, true);
|
|
247
|
+
insert(_el$3, () => renderChildren(own.children, {
|
|
248
|
+
get items() {
|
|
249
|
+
return scope.items();
|
|
250
|
+
},
|
|
251
|
+
get highlightedValue() {
|
|
252
|
+
return scope.highlighted();
|
|
253
|
+
}
|
|
254
|
+
}));
|
|
255
|
+
return _el$3;
|
|
256
|
+
})();
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Shown while no row matches. A function child receives the list's state and
|
|
260
|
+
* renders whenever it returns content; plain children render only while the
|
|
261
|
+
* list is empty.
|
|
262
|
+
*/
|
|
263
|
+
function CommandEmpty(props) {
|
|
264
|
+
const scope = useContext(InlineContext);
|
|
265
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
266
|
+
if (scope === void 0) return CommandEmptyPart({
|
|
267
|
+
...rest,
|
|
268
|
+
children: own.children
|
|
269
|
+
});
|
|
270
|
+
const content = createMemo(() => {
|
|
271
|
+
const children = own.children;
|
|
272
|
+
if (typeof children === "function") return children(scope.state);
|
|
273
|
+
return scope.state.empty ? children : null;
|
|
274
|
+
});
|
|
275
|
+
return createComponent(Show, {
|
|
276
|
+
get when() {
|
|
277
|
+
return memo(() => !!(content() !== null && content() !== void 0))() && content() !== false;
|
|
278
|
+
},
|
|
279
|
+
get children() {
|
|
280
|
+
var _el$4 = _tmpl$4();
|
|
281
|
+
spread(_el$4, rest, false, true);
|
|
282
|
+
insert(_el$4, content);
|
|
283
|
+
return _el$4;
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/** A polite live region; a function child receives the list's state. */
|
|
288
|
+
function CommandStatus(props) {
|
|
289
|
+
const scope = useContext(InlineContext);
|
|
290
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
291
|
+
if (scope === void 0) return CommandStatusPart({
|
|
292
|
+
...rest,
|
|
293
|
+
children: own.children
|
|
294
|
+
});
|
|
295
|
+
return (() => {
|
|
296
|
+
var _el$5 = _tmpl$5();
|
|
297
|
+
spread(_el$5, rest, false, true);
|
|
298
|
+
insert(_el$5, () => withState(own.children, scope.state));
|
|
299
|
+
return _el$5;
|
|
300
|
+
})();
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* A titled set of rows, hidden while a query leaves none of them matching. It
|
|
304
|
+
* hides rather than unmounts: its rows stay registered, so the group comes
|
|
305
|
+
* back when a later query matches one of them.
|
|
306
|
+
*/
|
|
307
|
+
function CommandGroup$1(props) {
|
|
308
|
+
const scope = useContext(InlineContext);
|
|
309
|
+
const id = Symbol("group");
|
|
310
|
+
const chain = [...useContext(GroupContext), id];
|
|
311
|
+
const [own, rest] = splitProps(props, [
|
|
312
|
+
"label",
|
|
313
|
+
"heading",
|
|
314
|
+
"children"
|
|
315
|
+
]);
|
|
316
|
+
const visible = () => scope === void 0 || scope.query() === "" || scope.groupMatches(id);
|
|
317
|
+
const title = () => own.label ?? own.heading;
|
|
318
|
+
return createComponent(GroupContext.Provider, {
|
|
319
|
+
value: chain,
|
|
320
|
+
get children() {
|
|
321
|
+
var _el$6 = _tmpl$7();
|
|
322
|
+
spread(_el$6, mergeProps(rest, { get hidden() {
|
|
323
|
+
return !visible();
|
|
324
|
+
} }), false, true);
|
|
325
|
+
insert(_el$6, createComponent(Show, {
|
|
326
|
+
get when() {
|
|
327
|
+
return title();
|
|
328
|
+
},
|
|
329
|
+
get children() {
|
|
330
|
+
var _el$7 = _tmpl$6();
|
|
331
|
+
insert(_el$7, title);
|
|
332
|
+
return _el$7;
|
|
333
|
+
}
|
|
334
|
+
}), null);
|
|
335
|
+
insert(_el$6, () => own.children, null);
|
|
336
|
+
return _el$6;
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/** A group's heading. Outside an inline list it is the palette's `group-label` part. */
|
|
341
|
+
function CommandGroupLabel(props) {
|
|
342
|
+
if (useContext(InlineContext) === void 0) return CommandGroupLabelPart(props);
|
|
343
|
+
return (() => {
|
|
344
|
+
var _el$8 = _tmpl$6();
|
|
345
|
+
spread(_el$8, props, false, false);
|
|
346
|
+
return _el$8;
|
|
347
|
+
})();
|
|
348
|
+
}
|
|
349
|
+
/** A row's icon, hidden from assistive technology. `mirror` flips it in right-to-left text. */
|
|
350
|
+
function CommandItemIcon(props) {
|
|
351
|
+
const scope = useContext(InlineContext);
|
|
352
|
+
const [own, rest] = splitProps(props, ["mirror"]);
|
|
353
|
+
if (scope === void 0) return CommandItemIconPart({
|
|
354
|
+
...rest,
|
|
355
|
+
...own.mirror === true ? { "data-mirror": "" } : {}
|
|
356
|
+
});
|
|
357
|
+
return (() => {
|
|
358
|
+
var _el$9 = _tmpl$8();
|
|
359
|
+
spread(_el$9, mergeProps({ get ["data-mirror"]() {
|
|
360
|
+
return own.mirror === true ? "" : void 0;
|
|
361
|
+
} }, rest), false, false);
|
|
362
|
+
return _el$9;
|
|
363
|
+
})();
|
|
364
|
+
}
|
|
365
|
+
/** A divider between rows or groups. */
|
|
366
|
+
function CommandSeparator(props) {
|
|
367
|
+
return (() => {
|
|
368
|
+
var _el$0 = _tmpl$9();
|
|
369
|
+
spread(_el$0, props, false, false);
|
|
370
|
+
return _el$0;
|
|
371
|
+
})();
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* One row. Its value is `value`, else its label; its label is `label`, else the
|
|
375
|
+
* text it first renders. Choosing it pushes `page` when given, calls
|
|
376
|
+
* `onSelect` (a returned promise marks the row pending until it settles) and
|
|
377
|
+
* reports `onRun`.
|
|
378
|
+
*/
|
|
379
|
+
function CommandItem(props) {
|
|
380
|
+
const scope = useContext(InlineContext);
|
|
381
|
+
const groups = useContext(GroupContext);
|
|
382
|
+
const [own, rest] = splitProps(props, [
|
|
383
|
+
"value",
|
|
384
|
+
"label",
|
|
385
|
+
"keywords",
|
|
386
|
+
"shortcut",
|
|
387
|
+
"page",
|
|
388
|
+
"disabled",
|
|
389
|
+
"onSelect",
|
|
390
|
+
"children",
|
|
391
|
+
"onClick"
|
|
392
|
+
]);
|
|
393
|
+
const [pending, setPending] = createSignal(false);
|
|
394
|
+
const [error, setError] = createSignal(void 0);
|
|
395
|
+
const [text, setText] = createSignal("");
|
|
396
|
+
const label = () => own.label ?? (text() === "" ? own.value ?? "" : text());
|
|
397
|
+
const value = () => own.value ?? label();
|
|
398
|
+
const disabled = () => own.disabled === true;
|
|
399
|
+
const key = Symbol("item");
|
|
400
|
+
const choose = () => {
|
|
401
|
+
if (disabled()) return;
|
|
402
|
+
if (own.page !== void 0) scope?.push(own.page);
|
|
403
|
+
if (own.onSelect !== void 0) try {
|
|
404
|
+
const result = own.onSelect(value());
|
|
405
|
+
if (result instanceof Promise) {
|
|
406
|
+
setPending(true);
|
|
407
|
+
setError(void 0);
|
|
408
|
+
result.then(() => setPending(false), (reason) => {
|
|
409
|
+
setPending(false);
|
|
410
|
+
setError(() => reason);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
} catch (reason) {
|
|
414
|
+
setError(() => reason);
|
|
415
|
+
}
|
|
416
|
+
scope?.report(value());
|
|
417
|
+
};
|
|
418
|
+
if (scope !== void 0) {
|
|
419
|
+
scope.register(key, () => ({
|
|
420
|
+
value: value(),
|
|
421
|
+
label: label(),
|
|
422
|
+
keywords: own.keywords,
|
|
423
|
+
disabled: disabled(),
|
|
424
|
+
groups,
|
|
425
|
+
run: choose
|
|
426
|
+
}));
|
|
427
|
+
onCleanup(() => scope.unregister(key));
|
|
428
|
+
}
|
|
429
|
+
const visible = () => scope === void 0 || scope.query() === "" || commandEntryMatches({
|
|
430
|
+
value: value(),
|
|
431
|
+
label: label(),
|
|
432
|
+
keywords: own.keywords
|
|
433
|
+
}, scope.query(), scope.filter());
|
|
434
|
+
const active = () => scope?.highlighted() === value();
|
|
435
|
+
const state = () => ({
|
|
436
|
+
highlighted: active(),
|
|
437
|
+
selected: active(),
|
|
438
|
+
disabled: disabled(),
|
|
439
|
+
pending: pending(),
|
|
440
|
+
error: error()
|
|
441
|
+
});
|
|
442
|
+
let element;
|
|
443
|
+
onMount(() => {
|
|
444
|
+
if (own.label === void 0 && element !== void 0) setText(visibleText(element));
|
|
445
|
+
});
|
|
446
|
+
return createComponent(ItemContext.Provider, {
|
|
447
|
+
value: {
|
|
448
|
+
label,
|
|
449
|
+
shortcut: () => own.shortcut ?? ""
|
|
450
|
+
},
|
|
451
|
+
get children() {
|
|
452
|
+
return createComponent(Show, {
|
|
453
|
+
get when() {
|
|
454
|
+
return visible();
|
|
455
|
+
},
|
|
456
|
+
get children() {
|
|
457
|
+
var _el$1 = _tmpl$0();
|
|
458
|
+
var _ref$2 = element;
|
|
459
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$1) : element = _el$1;
|
|
460
|
+
spread(_el$1, mergeProps({
|
|
461
|
+
get ["data-value"]() {
|
|
462
|
+
return value();
|
|
463
|
+
},
|
|
464
|
+
get ["aria-selected"]() {
|
|
465
|
+
return active() ? "true" : "false";
|
|
466
|
+
},
|
|
467
|
+
get ["data-active"]() {
|
|
468
|
+
return active() ? "" : void 0;
|
|
469
|
+
},
|
|
470
|
+
get ["data-highlighted"]() {
|
|
471
|
+
return active() ? "" : void 0;
|
|
472
|
+
},
|
|
473
|
+
get ["data-pending"]() {
|
|
474
|
+
return pending() ? "" : void 0;
|
|
475
|
+
},
|
|
476
|
+
get ["aria-disabled"]() {
|
|
477
|
+
return disabled() ? "true" : void 0;
|
|
478
|
+
},
|
|
479
|
+
get ["data-disabled"]() {
|
|
480
|
+
return disabled() ? "" : void 0;
|
|
481
|
+
}
|
|
482
|
+
}, rest, {
|
|
483
|
+
"onPointerMove": () => {
|
|
484
|
+
if (scope !== void 0 && !disabled() && !active()) scope.highlight(value());
|
|
485
|
+
},
|
|
486
|
+
"onClick": (event) => {
|
|
487
|
+
choose();
|
|
488
|
+
const host = own.onClick;
|
|
489
|
+
if (typeof host === "function") host(event);
|
|
490
|
+
}
|
|
491
|
+
}), false, true);
|
|
492
|
+
insert(_el$1, () => withState(own.children, liveState(state)));
|
|
493
|
+
return _el$1;
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/** A row's label. A function child receives `{ segments }`: the label split around what the query matched. */
|
|
500
|
+
function CommandItemText(props) {
|
|
501
|
+
const scope = useContext(InlineContext);
|
|
502
|
+
const item = useContext(ItemContext);
|
|
503
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
504
|
+
const label = () => item?.label() ?? "";
|
|
505
|
+
return (() => {
|
|
506
|
+
var _el$10 = _tmpl$1();
|
|
507
|
+
spread(_el$10, rest, false, true);
|
|
508
|
+
insert(_el$10, (() => {
|
|
509
|
+
var _c$ = memo(() => typeof own.children === "function");
|
|
510
|
+
return () => _c$() ? own.children({ segments: commandTextSegments(label(), scope?.query() ?? "") }) : own.children ?? label();
|
|
511
|
+
})());
|
|
512
|
+
return _el$10;
|
|
513
|
+
})();
|
|
514
|
+
}
|
|
515
|
+
/** The row's `shortcut`, or the children; a function child receives `{ text }`. */
|
|
516
|
+
function CommandShortcut(props) {
|
|
517
|
+
const item = useContext(ItemContext);
|
|
518
|
+
const [own, rest] = splitProps(props, ["children"]);
|
|
519
|
+
const text = () => item?.shortcut() ?? "";
|
|
520
|
+
return (() => {
|
|
521
|
+
var _el$11 = _tmpl$10();
|
|
522
|
+
spread(_el$11, rest, false, true);
|
|
523
|
+
insert(_el$11, (() => {
|
|
524
|
+
var _c$2 = memo(() => typeof own.children === "function");
|
|
525
|
+
return () => _c$2() ? own.children({ text: text() }) : own.children ?? text();
|
|
526
|
+
})());
|
|
527
|
+
return _el$11;
|
|
528
|
+
})();
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Rows for one page of the stack: `value` names the page, and a page without a
|
|
532
|
+
* value is the root, shown while the stack is empty.
|
|
533
|
+
*/
|
|
534
|
+
function CommandPage(props) {
|
|
535
|
+
const scope = useContext(InlineContext);
|
|
536
|
+
return createComponent(Show, {
|
|
537
|
+
get when() {
|
|
538
|
+
return scope === void 0 || scope.page() === (props.id ?? props.value);
|
|
539
|
+
},
|
|
540
|
+
get children() {
|
|
541
|
+
return props.children;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
// src/command.tsx
|
|
546
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=panel-content style=display:contents>`);
|
|
547
|
+
const noop = () => {};
|
|
548
|
+
/** The names the wrapper owns: everything else is an element prop. */
|
|
549
|
+
const OWNED = [
|
|
550
|
+
"open",
|
|
551
|
+
"defaultOpen",
|
|
552
|
+
"query",
|
|
553
|
+
"placeholder",
|
|
554
|
+
"label",
|
|
555
|
+
"groups",
|
|
556
|
+
"onRun",
|
|
557
|
+
"onOpenChange",
|
|
558
|
+
"onInput",
|
|
559
|
+
"filter",
|
|
560
|
+
"shortcuts",
|
|
561
|
+
"openShortcut",
|
|
562
|
+
"id",
|
|
563
|
+
"idSeed",
|
|
564
|
+
"children",
|
|
565
|
+
"render",
|
|
566
|
+
"ref",
|
|
567
|
+
"items",
|
|
568
|
+
"status",
|
|
569
|
+
"pages",
|
|
570
|
+
"onPagesChange",
|
|
571
|
+
"page",
|
|
572
|
+
"onPageChange",
|
|
573
|
+
"onHighlight",
|
|
574
|
+
"controller"
|
|
575
|
+
];
|
|
576
|
+
/** Stable empty default: a fresh array on every update would look like a change. */
|
|
577
|
+
const NO_GROUPS = [];
|
|
578
|
+
/** One row's content; the item is an accessor, so a filtered tree keeps it live. */
|
|
579
|
+
function CommandItemRow(props) {
|
|
580
|
+
const address = {
|
|
581
|
+
index: props.itemIndex,
|
|
582
|
+
scope: String(props.groupIndex)
|
|
583
|
+
};
|
|
584
|
+
const icon = usePart(props.handle, "item-icon", () => ({ children: descriptionNodes(props.item().icon) }), void 0, address);
|
|
585
|
+
const label = usePart(props.handle, "option-label", () => ({ children: props.item().label }), void 0, address);
|
|
586
|
+
const shortcut = usePart(props.handle, "option-shortcut", () => ({ children: props.item().shortcut }), void 0, address);
|
|
587
|
+
return usePart(props.handle, "option", () => ({ children: [
|
|
588
|
+
icon,
|
|
589
|
+
label,
|
|
590
|
+
shortcut
|
|
591
|
+
] }), void 0, address);
|
|
592
|
+
}
|
|
593
|
+
/** One group: its heading and its rows. */
|
|
594
|
+
function CommandGroupRow(props) {
|
|
595
|
+
const address = { index: props.groupIndex };
|
|
596
|
+
const heading = usePart(props.handle, "group-label", () => ({ children: props.match().group.label }), void 0, address);
|
|
597
|
+
return usePart(props.handle, "group", () => ({ children: [heading, createComponent(Index, {
|
|
598
|
+
get each() {
|
|
599
|
+
return props.match().items;
|
|
600
|
+
},
|
|
601
|
+
children: (item, itemIndex) => createComponent(CommandItemRow, {
|
|
602
|
+
get handle() {
|
|
603
|
+
return props.handle;
|
|
604
|
+
},
|
|
605
|
+
get groupIndex() {
|
|
606
|
+
return props.groupIndex;
|
|
607
|
+
},
|
|
608
|
+
itemIndex,
|
|
609
|
+
item
|
|
610
|
+
})
|
|
611
|
+
})] }), void 0, address);
|
|
612
|
+
}
|
|
613
|
+
function Command(props) {
|
|
614
|
+
if (untrack(() => props.groups === void 0 && props.open === void 0 && props.defaultOpen === void 0 && !props.openShortcut && ("children" in props || props.items !== void 0 || props.pages !== void 0))) return createComponent(CommandInline, props);
|
|
615
|
+
return createComponent(CommandPalette, props);
|
|
616
|
+
}
|
|
617
|
+
function CommandPalette(props) {
|
|
618
|
+
const [local, element] = splitProps(props, OWNED);
|
|
619
|
+
const options = () => ({
|
|
620
|
+
...local.open === void 0 ? {} : { open: local.open },
|
|
621
|
+
...local.defaultOpen === void 0 ? {} : { defaultOpen: local.defaultOpen },
|
|
622
|
+
...local.query === void 0 ? {} : { query: local.query },
|
|
623
|
+
placeholder: local.placeholder ?? "Type a command…",
|
|
624
|
+
label: local.label ?? "Command palette",
|
|
625
|
+
groups: local.groups ?? NO_GROUPS,
|
|
626
|
+
...local.onRun === void 0 ? {} : { onRun: local.onRun },
|
|
627
|
+
...local.onOpenChange === void 0 ? {} : { onOpenChange: local.onOpenChange },
|
|
628
|
+
...local.onInput === void 0 ? {} : { onInput: local.onInput },
|
|
629
|
+
...typeof local.filter === "function" ? { filter: local.filter } : {},
|
|
630
|
+
...local.shortcuts === void 0 ? {} : { shortcuts: local.shortcuts },
|
|
631
|
+
openShortcut: local.openShortcut ?? "",
|
|
632
|
+
id: local.id ?? "",
|
|
633
|
+
...local.idSeed === void 0 ? {} : { idSeed: local.idSeed }
|
|
634
|
+
});
|
|
635
|
+
const handle = usePrimitive(commandPrimitive, options);
|
|
636
|
+
const api = handle.api;
|
|
637
|
+
const controllerApi = {
|
|
638
|
+
...api,
|
|
639
|
+
run: (id) => id === void 0 ? api.activeId() !== void 0 && (api.runActive(), true) : api.run(id),
|
|
640
|
+
push: noop,
|
|
641
|
+
pop: noop,
|
|
642
|
+
setValue: noop,
|
|
643
|
+
focus: noop
|
|
644
|
+
};
|
|
645
|
+
useControllerAttach(local.controller, controllerApi);
|
|
646
|
+
const matches = () => {
|
|
647
|
+
handle.revision();
|
|
648
|
+
return api.matches();
|
|
649
|
+
};
|
|
650
|
+
const count = () => {
|
|
651
|
+
handle.revision();
|
|
652
|
+
return api.count();
|
|
653
|
+
};
|
|
654
|
+
let panelNode;
|
|
655
|
+
const setPanel = (node) => {
|
|
656
|
+
panelNode = node instanceof HTMLElement ? node : void 0;
|
|
657
|
+
};
|
|
658
|
+
createEffect(() => {
|
|
659
|
+
handle.revision();
|
|
660
|
+
const node = panelNode;
|
|
661
|
+
if (local.ref === void 0) return;
|
|
662
|
+
local.ref(node === void 0 ? null : {
|
|
663
|
+
api,
|
|
664
|
+
element: node
|
|
665
|
+
});
|
|
666
|
+
});
|
|
667
|
+
onCleanup(() => {
|
|
668
|
+
local.ref?.(null);
|
|
669
|
+
});
|
|
670
|
+
const countText = () => {
|
|
671
|
+
const total = count();
|
|
672
|
+
return total === 0 ? "No commands" : total === 1 ? "1 command" : String(total) + " commands";
|
|
673
|
+
};
|
|
674
|
+
const input = usePart(handle, "input", () => ({}));
|
|
675
|
+
const status = usePart(handle, "status", () => ({ children: count() > 0 ? countText() : null }));
|
|
676
|
+
const empty = usePart(handle, "empty", () => ({ children: "No commands found" }));
|
|
677
|
+
const list = usePart(handle, "list", () => ({ children: [createComponent(Index, {
|
|
678
|
+
get each() {
|
|
679
|
+
return matches();
|
|
680
|
+
},
|
|
681
|
+
children: (match, index) => createComponent(CommandGroupRow, {
|
|
682
|
+
handle,
|
|
683
|
+
groupIndex: index,
|
|
684
|
+
match
|
|
685
|
+
})
|
|
686
|
+
}), empty] }));
|
|
687
|
+
const body = (() => {
|
|
688
|
+
var _el$ = _tmpl$();
|
|
689
|
+
insert(_el$, () => local.children);
|
|
690
|
+
return _el$;
|
|
691
|
+
})();
|
|
692
|
+
return usePart(handle, "root", () => ({
|
|
693
|
+
...element,
|
|
694
|
+
ref: setPanel,
|
|
695
|
+
children: [
|
|
696
|
+
input,
|
|
697
|
+
status,
|
|
698
|
+
list,
|
|
699
|
+
body
|
|
700
|
+
]
|
|
701
|
+
}), local.render);
|
|
702
|
+
}
|
|
703
|
+
/** A controller for a `Command`: its api, once it is mounted. */
|
|
704
|
+
function createCommandController() {
|
|
705
|
+
return createController();
|
|
706
|
+
}
|
|
707
|
+
export { CommandPanelPart as C, CommandOptionShortcutPart as S, CommandStatusPart as T, CommandInputPart as _, CommandGroupLabel as a, CommandOptionLabelPart as b, CommandItemIcon as c, CommandPage as d, CommandSeparator as f, CommandGroupLabelPart as g, CommandEmptyPart as h, CommandGroup$1 as i, CommandItemText as l, CommandStatus as m, createCommandController as n, CommandInput as o, CommandShortcut as p, CommandEmpty as r, CommandItem as s, Command as t, CommandList as u, CommandItemIconPart as v, CommandRootPart as w, CommandOptionPart as x, CommandListPart as y };
|