@cloudflare/kumo 1.0.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/CHANGELOG.md +510 -0
- package/LICENSE +21 -0
- package/README.md +521 -0
- package/ai/component-registry.json +3754 -0
- package/ai/component-registry.md +4022 -0
- package/ai/schemas.ts +594 -0
- package/dist/badge-Dc99vsfo.js +51 -0
- package/dist/badge-Dc99vsfo.js.map +1 -0
- package/dist/banner-4fkH6Sbt.js +51 -0
- package/dist/banner-4fkH6Sbt.js.map +1 -0
- package/dist/breadcrumbs-B5SY2CWj.js +132 -0
- package/dist/breadcrumbs-B5SY2CWj.js.map +1 -0
- package/dist/button-E2-hZMZE.js +191 -0
- package/dist/button-E2-hZMZE.js.map +1 -0
- package/dist/catalog.js +229 -0
- package/dist/catalog.js.map +1 -0
- package/dist/checkbox-BexIU_lZ.js +224 -0
- package/dist/checkbox-BexIU_lZ.js.map +1 -0
- package/dist/clipboard-text-BFHWMjmr.js +108 -0
- package/dist/clipboard-text-BFHWMjmr.js.map +1 -0
- package/dist/cn-Bhsu1vx2.js +26 -0
- package/dist/cn-Bhsu1vx2.js.map +1 -0
- package/dist/code-T2wPDiM0.js +60 -0
- package/dist/code-T2wPDiM0.js.map +1 -0
- package/dist/collapsible-OBNkTO48.js +56 -0
- package/dist/collapsible-OBNkTO48.js.map +1 -0
- package/dist/combobox-Dld0kS0U.js +228 -0
- package/dist/combobox-Dld0kS0U.js.map +1 -0
- package/dist/command-line/cli.js +764 -0
- package/dist/command-line/commands/add.js +220 -0
- package/dist/command-line/commands/blocks.js +61 -0
- package/dist/command-line/commands/doc.js +167 -0
- package/dist/command-line/commands/init.js +95 -0
- package/dist/command-line/commands/ls.js +53 -0
- package/dist/command-palette-BgQ680BG.js +393 -0
- package/dist/command-palette-BgQ680BG.js.map +1 -0
- package/dist/components/badge.js +7 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/banner.js +7 -0
- package/dist/components/banner.js.map +1 -0
- package/dist/components/breadcrumbs.js +9 -0
- package/dist/components/breadcrumbs.js.map +1 -0
- package/dist/components/button.js +9 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/checkbox.js +8 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/clipboard-text.js +6 -0
- package/dist/components/clipboard-text.js.map +1 -0
- package/dist/components/code.js +7 -0
- package/dist/components/code.js.map +1 -0
- package/dist/components/collapsible.js +6 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.js +6 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command-palette.js +8 -0
- package/dist/components/command-palette.js.map +1 -0
- package/dist/components/date-range-picker.js +6 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/dialog.js +11 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown.js +6 -0
- package/dist/components/dropdown.js.map +1 -0
- package/dist/components/empty.js +9 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.js +9 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/grid.js +11 -0
- package/dist/components/grid.js.map +1 -0
- package/dist/components/input.js +11 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.js +10 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layer-card.js +6 -0
- package/dist/components/layer-card.js.map +1 -0
- package/dist/components/link.js +9 -0
- package/dist/components/link.js.map +1 -0
- package/dist/components/loader.js +8 -0
- package/dist/components/loader.js.map +1 -0
- package/dist/components/menubar.js +7 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/meter.js +6 -0
- package/dist/components/meter.js.map +1 -0
- package/dist/components/pagination.js +6 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.js +14 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/radio.js +10 -0
- package/dist/components/radio.js.map +1 -0
- package/dist/components/select.js +6 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/sensitive-input.js +8 -0
- package/dist/components/sensitive-input.js.map +1 -0
- package/dist/components/surface.js +6 -0
- package/dist/components/surface.js.map +1 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +8 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.js +6 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/text.js +6 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/toast.js +8 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.js +7 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/date-range-picker-CbKEQ9pi.js +408 -0
- package/dist/date-range-picker-CbKEQ9pi.js.map +1 -0
- package/dist/dialog-B1TaN0oR.js +77 -0
- package/dist/dialog-B1TaN0oR.js.map +1 -0
- package/dist/dropdown-D0rhYKeG.js +263 -0
- package/dist/dropdown-D0rhYKeG.js.map +1 -0
- package/dist/empty-DzCqjea-.js +93 -0
- package/dist/empty-DzCqjea-.js.map +1 -0
- package/dist/field-V3J0Ql_V.js +71 -0
- package/dist/field-V3J0Ql_V.js.map +1 -0
- package/dist/grid-DKajRHh8.js +127 -0
- package/dist/grid-DKajRHh8.js.map +1 -0
- package/dist/index.js +125 -0
- package/dist/index.js.map +1 -0
- package/dist/input-Dqvc2AB_.js +109 -0
- package/dist/input-Dqvc2AB_.js.map +1 -0
- package/dist/input-area-B9qajxvZ.js +57 -0
- package/dist/input-area-B9qajxvZ.js.map +1 -0
- package/dist/input-group-Bl6tgD5-.js +111 -0
- package/dist/input-group-Bl6tgD5-.js.map +1 -0
- package/dist/label-87HQArUG.js +50 -0
- package/dist/label-87HQArUG.js.map +1 -0
- package/dist/layer-card-C8j5Hkkj.js +44 -0
- package/dist/layer-card-C8j5Hkkj.js.map +1 -0
- package/dist/link-6TIZ4JIw.js +73 -0
- package/dist/link-6TIZ4JIw.js.map +1 -0
- package/dist/link-provider-DPBGo-0n.js +22 -0
- package/dist/link-provider-DPBGo-0n.js.map +1 -0
- package/dist/loader-DHGMYlC6.js +105 -0
- package/dist/loader-DHGMYlC6.js.map +1 -0
- package/dist/menubar-DLwLRFB1.js +92 -0
- package/dist/menubar-DLwLRFB1.js.map +1 -0
- package/dist/meter-DKUuvXxS.js +51 -0
- package/dist/meter-DKUuvXxS.js.map +1 -0
- package/dist/pagination-C4HQqodz.js +99 -0
- package/dist/pagination-C4HQqodz.js.map +1 -0
- package/dist/popover-DhdIqrP7.js +178 -0
- package/dist/popover-DhdIqrP7.js.map +1 -0
- package/dist/primitives/accordion.js +6 -0
- package/dist/primitives/accordion.js.map +1 -0
- package/dist/primitives/alert-dialog.js +6 -0
- package/dist/primitives/alert-dialog.js.map +1 -0
- package/dist/primitives/autocomplete.js +6 -0
- package/dist/primitives/autocomplete.js.map +1 -0
- package/dist/primitives/avatar.js +6 -0
- package/dist/primitives/avatar.js.map +1 -0
- package/dist/primitives/button.js +6 -0
- package/dist/primitives/button.js.map +1 -0
- package/dist/primitives/checkbox-group.js +6 -0
- package/dist/primitives/checkbox-group.js.map +1 -0
- package/dist/primitives/checkbox.js +6 -0
- package/dist/primitives/checkbox.js.map +1 -0
- package/dist/primitives/collapsible.js +6 -0
- package/dist/primitives/collapsible.js.map +1 -0
- package/dist/primitives/combobox.js +6 -0
- package/dist/primitives/combobox.js.map +1 -0
- package/dist/primitives/context-menu.js +6 -0
- package/dist/primitives/context-menu.js.map +1 -0
- package/dist/primitives/dialog.js +6 -0
- package/dist/primitives/dialog.js.map +1 -0
- package/dist/primitives/direction-provider.js +7 -0
- package/dist/primitives/direction-provider.js.map +1 -0
- package/dist/primitives/field.js +6 -0
- package/dist/primitives/field.js.map +1 -0
- package/dist/primitives/fieldset.js +6 -0
- package/dist/primitives/fieldset.js.map +1 -0
- package/dist/primitives/form.js +6 -0
- package/dist/primitives/form.js.map +1 -0
- package/dist/primitives/input.js +6 -0
- package/dist/primitives/input.js.map +1 -0
- package/dist/primitives/menu.js +6 -0
- package/dist/primitives/menu.js.map +1 -0
- package/dist/primitives/menubar.js +6 -0
- package/dist/primitives/menubar.js.map +1 -0
- package/dist/primitives/meter.js +6 -0
- package/dist/primitives/meter.js.map +1 -0
- package/dist/primitives/navigation-menu.js +6 -0
- package/dist/primitives/navigation-menu.js.map +1 -0
- package/dist/primitives/number-field.js +6 -0
- package/dist/primitives/number-field.js.map +1 -0
- package/dist/primitives/popover.js +6 -0
- package/dist/primitives/popover.js.map +1 -0
- package/dist/primitives/preview-card.js +6 -0
- package/dist/primitives/preview-card.js.map +1 -0
- package/dist/primitives/progress.js +6 -0
- package/dist/primitives/progress.js.map +1 -0
- package/dist/primitives/radio-group.js +6 -0
- package/dist/primitives/radio-group.js.map +1 -0
- package/dist/primitives/radio.js +6 -0
- package/dist/primitives/radio.js.map +1 -0
- package/dist/primitives/scroll-area.js +6 -0
- package/dist/primitives/scroll-area.js.map +1 -0
- package/dist/primitives/select.js +6 -0
- package/dist/primitives/select.js.map +1 -0
- package/dist/primitives/separator.js +6 -0
- package/dist/primitives/separator.js.map +1 -0
- package/dist/primitives/slider.js +6 -0
- package/dist/primitives/slider.js.map +1 -0
- package/dist/primitives/switch.js +6 -0
- package/dist/primitives/switch.js.map +1 -0
- package/dist/primitives/tabs.js +6 -0
- package/dist/primitives/tabs.js.map +1 -0
- package/dist/primitives/toast.js +6 -0
- package/dist/primitives/toast.js.map +1 -0
- package/dist/primitives/toggle-group.js +6 -0
- package/dist/primitives/toggle-group.js.map +1 -0
- package/dist/primitives/toggle.js +6 -0
- package/dist/primitives/toggle.js.map +1 -0
- package/dist/primitives/toolbar.js +6 -0
- package/dist/primitives/toolbar.js.map +1 -0
- package/dist/primitives/tooltip.js +6 -0
- package/dist/primitives/tooltip.js.map +1 -0
- package/dist/primitives.js +43 -0
- package/dist/primitives.js.map +1 -0
- package/dist/radio-BVAG7hNp.js +125 -0
- package/dist/radio-BVAG7hNp.js.map +1 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/schemas-BSdA0fz-.js +3210 -0
- package/dist/schemas-BSdA0fz-.js.map +1 -0
- package/dist/select-B5Vb3zou.js +122 -0
- package/dist/select-B5Vb3zou.js.map +1 -0
- package/dist/sensitive-input-D5HCV04N.js +258 -0
- package/dist/sensitive-input-D5HCV04N.js.map +1 -0
- package/dist/skeleton-line-CtpS1u1J.js +28 -0
- package/dist/skeleton-line-CtpS1u1J.js.map +1 -0
- package/dist/src/blocks/page-header/index.d.ts +2 -0
- package/dist/src/blocks/page-header/index.d.ts.map +1 -0
- package/dist/src/blocks/page-header/page-header.d.ts +38 -0
- package/dist/src/blocks/page-header/page-header.d.ts.map +1 -0
- package/dist/src/blocks/resource-list/index.d.ts +2 -0
- package/dist/src/blocks/resource-list/index.d.ts.map +1 -0
- package/dist/src/blocks/resource-list/resource-list.d.ts +18 -0
- package/dist/src/blocks/resource-list/resource-list.d.ts.map +1 -0
- package/dist/src/catalog/catalog.d.ts +75 -0
- package/dist/src/catalog/catalog.d.ts.map +1 -0
- package/dist/src/catalog/data.d.ts +44 -0
- package/dist/src/catalog/data.d.ts.map +1 -0
- package/dist/src/catalog/index.d.ts +39 -0
- package/dist/src/catalog/index.d.ts.map +1 -0
- package/dist/src/catalog/types.d.ts +226 -0
- package/dist/src/catalog/types.d.ts.map +1 -0
- package/dist/src/catalog/visibility.d.ts +37 -0
- package/dist/src/catalog/visibility.d.ts.map +1 -0
- package/dist/src/command-line/build-cli.d.ts +7 -0
- package/dist/src/command-line/build-cli.d.ts.map +1 -0
- package/dist/src/command-line/cli.d.ts +13 -0
- package/dist/src/command-line/cli.d.ts.map +1 -0
- package/dist/src/command-line/commands/add.d.ts +10 -0
- package/dist/src/command-line/commands/add.d.ts.map +1 -0
- package/dist/src/command-line/commands/blocks.d.ts +10 -0
- package/dist/src/command-line/commands/blocks.d.ts.map +1 -0
- package/dist/src/command-line/commands/doc.d.ts +14 -0
- package/dist/src/command-line/commands/doc.d.ts.map +1 -0
- package/dist/src/command-line/commands/init.d.ts +18 -0
- package/dist/src/command-line/commands/init.d.ts.map +1 -0
- package/dist/src/command-line/commands/ls.d.ts +10 -0
- package/dist/src/command-line/commands/ls.d.ts.map +1 -0
- package/dist/src/command-line/commands/migrate.d.ts +10 -0
- package/dist/src/command-line/commands/migrate.d.ts.map +1 -0
- package/dist/src/command-line/utils/config.d.ts +42 -0
- package/dist/src/command-line/utils/config.d.ts.map +1 -0
- package/dist/src/command-line/utils/transformer.d.ts +17 -0
- package/dist/src/command-line/utils/transformer.d.ts.map +1 -0
- package/dist/src/components/badge/badge.d.ts +46 -0
- package/dist/src/components/badge/badge.d.ts.map +1 -0
- package/dist/src/components/badge/index.d.ts +2 -0
- package/dist/src/components/badge/index.d.ts.map +1 -0
- package/dist/src/components/banner/banner.d.ts +45 -0
- package/dist/src/components/banner/banner.d.ts.map +1 -0
- package/dist/src/components/banner/index.d.ts +2 -0
- package/dist/src/components/banner/index.d.ts.map +1 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +43 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/src/components/breadcrumbs/index.d.ts +2 -0
- package/dist/src/components/breadcrumbs/index.d.ts.map +1 -0
- package/dist/src/components/button/button.d.ts +118 -0
- package/dist/src/components/button/button.d.ts.map +1 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/button/index.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.d.ts +167 -0
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/checkbox/index.d.ts.map +1 -0
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +38 -0
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -0
- package/dist/src/components/clipboard-text/index.d.ts +2 -0
- package/dist/src/components/clipboard-text/index.d.ts.map +1 -0
- package/dist/src/components/code/code.d.ts +138 -0
- package/dist/src/components/code/code.d.ts.map +1 -0
- package/dist/src/components/code/index.d.ts +4 -0
- package/dist/src/components/code/index.d.ts.map +1 -0
- package/dist/src/components/collapsible/collapsible.d.ts +62 -0
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/src/components/collapsible/index.d.ts +2 -0
- package/dist/src/components/collapsible/index.d.ts.map +1 -0
- package/dist/src/components/combobox/combobox.d.ts +124 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -0
- package/dist/src/components/combobox/index.d.ts +2 -0
- package/dist/src/components/combobox/index.d.ts.map +1 -0
- package/dist/src/components/command-palette/command-palette.d.ts +225 -0
- package/dist/src/components/command-palette/command-palette.d.ts.map +1 -0
- package/dist/src/components/command-palette/index.d.ts +3 -0
- package/dist/src/components/command-palette/index.d.ts.map +1 -0
- package/dist/src/components/command-palette/types.d.ts +149 -0
- package/dist/src/components/command-palette/types.d.ts.map +1 -0
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +65 -0
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +1 -0
- package/dist/src/components/date-range-picker/index.d.ts +2 -0
- package/dist/src/components/date-range-picker/index.d.ts.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +121 -0
- package/dist/src/components/dialog/dialog.d.ts.map +1 -0
- package/dist/src/components/dialog/index.d.ts +2 -0
- package/dist/src/components/dialog/index.d.ts.map +1 -0
- package/dist/src/components/dropdown/dropdown.d.ts +58 -0
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/src/components/dropdown/index.d.ts +2 -0
- package/dist/src/components/dropdown/index.d.ts.map +1 -0
- package/dist/src/components/empty/empty.d.ts +34 -0
- package/dist/src/components/empty/empty.d.ts.map +1 -0
- package/dist/src/components/empty/index.d.ts +2 -0
- package/dist/src/components/empty/index.d.ts.map +1 -0
- package/dist/src/components/field/field.d.ts +38 -0
- package/dist/src/components/field/field.d.ts.map +1 -0
- package/dist/src/components/field/index.d.ts +2 -0
- package/dist/src/components/field/index.d.ts.map +1 -0
- package/dist/src/components/grid/grid.d.ts +107 -0
- package/dist/src/components/grid/grid.d.ts.map +1 -0
- package/dist/src/components/grid/index.d.ts +2 -0
- package/dist/src/components/grid/index.d.ts.map +1 -0
- package/dist/src/components/input/index.d.ts +4 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/input/input-area.d.ts +46 -0
- package/dist/src/components/input/input-area.d.ts.map +1 -0
- package/dist/src/components/input/input-group.d.ts +39 -0
- package/dist/src/components/input/input-group.d.ts.map +1 -0
- package/dist/src/components/input/input.d.ts +157 -0
- package/dist/src/components/input/input.d.ts.map +1 -0
- package/dist/src/components/label/index.d.ts +2 -0
- package/dist/src/components/label/index.d.ts.map +1 -0
- package/dist/src/components/label/label.d.ts +54 -0
- package/dist/src/components/label/label.d.ts.map +1 -0
- package/dist/src/components/layer-card/index.d.ts +2 -0
- package/dist/src/components/layer-card/index.d.ts.map +1 -0
- package/dist/src/components/layer-card/layer-card.d.ts +16 -0
- package/dist/src/components/layer-card/layer-card.d.ts.map +1 -0
- package/dist/src/components/link/index.d.ts +2 -0
- package/dist/src/components/link/index.d.ts.map +1 -0
- package/dist/src/components/link/link.d.ts +35 -0
- package/dist/src/components/link/link.d.ts.map +1 -0
- package/dist/src/components/loader/index.d.ts +3 -0
- package/dist/src/components/loader/index.d.ts.map +1 -0
- package/dist/src/components/loader/loader.d.ts +30 -0
- package/dist/src/components/loader/loader.d.ts.map +1 -0
- package/dist/src/components/loader/skeleton-line.d.ts +10 -0
- package/dist/src/components/loader/skeleton-line.d.ts.map +1 -0
- package/dist/src/components/menubar/index.d.ts +3 -0
- package/dist/src/components/menubar/index.d.ts.map +1 -0
- package/dist/src/components/menubar/menubar.d.ts +22 -0
- package/dist/src/components/menubar/menubar.d.ts.map +1 -0
- package/dist/src/components/menubar/use-menu-navigation.d.ts +8 -0
- package/dist/src/components/menubar/use-menu-navigation.d.ts.map +1 -0
- package/dist/src/components/meter/index.d.ts +2 -0
- package/dist/src/components/meter/index.d.ts.map +1 -0
- package/dist/src/components/meter/meter.d.ts +18 -0
- package/dist/src/components/meter/meter.d.ts.map +1 -0
- package/dist/src/components/pagination/index.d.ts +2 -0
- package/dist/src/components/pagination/index.d.ts.map +1 -0
- package/dist/src/components/pagination/pagination.d.ts +28 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -0
- package/dist/src/components/popover/index.d.ts +3 -0
- package/dist/src/components/popover/index.d.ts.map +1 -0
- package/dist/src/components/popover/popover.d.ts +110 -0
- package/dist/src/components/popover/popover.d.ts.map +1 -0
- package/dist/src/components/radio/index.d.ts +2 -0
- package/dist/src/components/radio/index.d.ts.map +1 -0
- package/dist/src/components/radio/radio.d.ts +141 -0
- package/dist/src/components/radio/radio.d.ts.map +1 -0
- package/dist/src/components/select/index.d.ts +2 -0
- package/dist/src/components/select/index.d.ts.map +1 -0
- package/dist/src/components/select/select.d.ts +128 -0
- package/dist/src/components/select/select.d.ts.map +1 -0
- package/dist/src/components/sensitive-input/index.d.ts +2 -0
- package/dist/src/components/sensitive-input/index.d.ts.map +1 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +70 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -0
- package/dist/src/components/surface/index.d.ts +2 -0
- package/dist/src/components/surface/index.d.ts.map +1 -0
- package/dist/src/components/surface/surface.d.ts +48 -0
- package/dist/src/components/surface/surface.d.ts.map +1 -0
- package/dist/src/components/switch/index.d.ts +2 -0
- package/dist/src/components/switch/index.d.ts.map +1 -0
- package/dist/src/components/switch/switch.d.ts +155 -0
- package/dist/src/components/switch/switch.d.ts.map +1 -0
- package/dist/src/components/table/index.d.ts +2 -0
- package/dist/src/components/table/index.d.ts.map +1 -0
- package/dist/src/components/table/table.d.ts +54 -0
- package/dist/src/components/table/table.d.ts.map +1 -0
- package/dist/src/components/tabs/index.d.ts +3 -0
- package/dist/src/components/tabs/index.d.ts.map +1 -0
- package/dist/src/components/tabs/tabs.d.ts +64 -0
- package/dist/src/components/tabs/tabs.d.ts.map +1 -0
- package/dist/src/components/text/index.d.ts +2 -0
- package/dist/src/components/text/index.d.ts.map +1 -0
- package/dist/src/components/text/text.d.ts +153 -0
- package/dist/src/components/text/text.d.ts.map +1 -0
- package/dist/src/components/toast/index.d.ts +3 -0
- package/dist/src/components/toast/index.d.ts.map +1 -0
- package/dist/src/components/toast/toast.d.ts +66 -0
- package/dist/src/components/toast/toast.d.ts.map +1 -0
- package/dist/src/components/tooltip/index.d.ts +2 -0
- package/dist/src/components/tooltip/index.d.ts.map +1 -0
- package/dist/src/components/tooltip/tooltip.d.ts +43 -0
- package/dist/src/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/src/index.d.ts +39 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/primitives/accordion.d.ts +13 -0
- package/dist/src/primitives/accordion.d.ts.map +1 -0
- package/dist/src/primitives/alert-dialog.d.ts +13 -0
- package/dist/src/primitives/alert-dialog.d.ts.map +1 -0
- package/dist/src/primitives/autocomplete.d.ts +13 -0
- package/dist/src/primitives/autocomplete.d.ts.map +1 -0
- package/dist/src/primitives/avatar.d.ts +13 -0
- package/dist/src/primitives/avatar.d.ts.map +1 -0
- package/dist/src/primitives/button.d.ts +13 -0
- package/dist/src/primitives/button.d.ts.map +1 -0
- package/dist/src/primitives/checkbox-group.d.ts +13 -0
- package/dist/src/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/src/primitives/checkbox.d.ts +13 -0
- package/dist/src/primitives/checkbox.d.ts.map +1 -0
- package/dist/src/primitives/collapsible.d.ts +13 -0
- package/dist/src/primitives/collapsible.d.ts.map +1 -0
- package/dist/src/primitives/combobox.d.ts +13 -0
- package/dist/src/primitives/combobox.d.ts.map +1 -0
- package/dist/src/primitives/context-menu.d.ts +13 -0
- package/dist/src/primitives/context-menu.d.ts.map +1 -0
- package/dist/src/primitives/dialog.d.ts +13 -0
- package/dist/src/primitives/dialog.d.ts.map +1 -0
- package/dist/src/primitives/direction-provider.d.ts +13 -0
- package/dist/src/primitives/direction-provider.d.ts.map +1 -0
- package/dist/src/primitives/field.d.ts +13 -0
- package/dist/src/primitives/field.d.ts.map +1 -0
- package/dist/src/primitives/fieldset.d.ts +13 -0
- package/dist/src/primitives/fieldset.d.ts.map +1 -0
- package/dist/src/primitives/form.d.ts +13 -0
- package/dist/src/primitives/form.d.ts.map +1 -0
- package/dist/src/primitives/index.d.ts +52 -0
- package/dist/src/primitives/index.d.ts.map +1 -0
- package/dist/src/primitives/input.d.ts +13 -0
- package/dist/src/primitives/input.d.ts.map +1 -0
- package/dist/src/primitives/menu.d.ts +13 -0
- package/dist/src/primitives/menu.d.ts.map +1 -0
- package/dist/src/primitives/menubar.d.ts +13 -0
- package/dist/src/primitives/menubar.d.ts.map +1 -0
- package/dist/src/primitives/meter.d.ts +13 -0
- package/dist/src/primitives/meter.d.ts.map +1 -0
- package/dist/src/primitives/navigation-menu.d.ts +13 -0
- package/dist/src/primitives/navigation-menu.d.ts.map +1 -0
- package/dist/src/primitives/number-field.d.ts +13 -0
- package/dist/src/primitives/number-field.d.ts.map +1 -0
- package/dist/src/primitives/popover.d.ts +13 -0
- package/dist/src/primitives/popover.d.ts.map +1 -0
- package/dist/src/primitives/preview-card.d.ts +13 -0
- package/dist/src/primitives/preview-card.d.ts.map +1 -0
- package/dist/src/primitives/progress.d.ts +13 -0
- package/dist/src/primitives/progress.d.ts.map +1 -0
- package/dist/src/primitives/radio-group.d.ts +13 -0
- package/dist/src/primitives/radio-group.d.ts.map +1 -0
- package/dist/src/primitives/radio.d.ts +13 -0
- package/dist/src/primitives/radio.d.ts.map +1 -0
- package/dist/src/primitives/scroll-area.d.ts +13 -0
- package/dist/src/primitives/scroll-area.d.ts.map +1 -0
- package/dist/src/primitives/select.d.ts +13 -0
- package/dist/src/primitives/select.d.ts.map +1 -0
- package/dist/src/primitives/separator.d.ts +13 -0
- package/dist/src/primitives/separator.d.ts.map +1 -0
- package/dist/src/primitives/slider.d.ts +13 -0
- package/dist/src/primitives/slider.d.ts.map +1 -0
- package/dist/src/primitives/switch.d.ts +13 -0
- package/dist/src/primitives/switch.d.ts.map +1 -0
- package/dist/src/primitives/tabs.d.ts +13 -0
- package/dist/src/primitives/tabs.d.ts.map +1 -0
- package/dist/src/primitives/toast.d.ts +13 -0
- package/dist/src/primitives/toast.d.ts.map +1 -0
- package/dist/src/primitives/toggle-group.d.ts +13 -0
- package/dist/src/primitives/toggle-group.d.ts.map +1 -0
- package/dist/src/primitives/toggle.d.ts +13 -0
- package/dist/src/primitives/toggle.d.ts.map +1 -0
- package/dist/src/primitives/toolbar.d.ts +13 -0
- package/dist/src/primitives/toolbar.d.ts.map +1 -0
- package/dist/src/primitives/tooltip.d.ts +13 -0
- package/dist/src/primitives/tooltip.d.ts.map +1 -0
- package/dist/src/registry/index.d.ts +8 -0
- package/dist/src/registry/index.d.ts.map +1 -0
- package/dist/src/registry/types.d.ts +191 -0
- package/dist/src/registry/types.d.ts.map +1 -0
- package/dist/src/utils/cn.d.ts +4 -0
- package/dist/src/utils/cn.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/link-provider.d.ts +12 -0
- package/dist/src/utils/link-provider.d.ts.map +1 -0
- package/dist/src/utils/prop-examples.d.ts +36 -0
- package/dist/src/utils/prop-examples.d.ts.map +1 -0
- package/dist/styles/kumo-binding.css +190 -0
- package/dist/styles/kumo-standalone.css +2 -0
- package/dist/styles/kumo.css +55 -0
- package/dist/styles/theme-fedramp.css +20 -0
- package/dist/styles/theme-kumo.css +186 -0
- package/dist/surface-BIC6CXiz.js +21 -0
- package/dist/surface-BIC6CXiz.js.map +1 -0
- package/dist/switch-D4duMhJ0.js +257 -0
- package/dist/switch-D4duMhJ0.js.map +1 -0
- package/dist/table-KuvHGpL8.js +153 -0
- package/dist/table-KuvHGpL8.js.map +1 -0
- package/dist/tabs-lQup-IbT.js +85 -0
- package/dist/tabs-lQup-IbT.js.map +1 -0
- package/dist/text-BEhqwMfe.js +97 -0
- package/dist/text-BEhqwMfe.js.map +1 -0
- package/dist/toast-8YyyQuqZ.js +69 -0
- package/dist/toast-8YyyQuqZ.js.map +1 -0
- package/dist/tooltip-DJWsDTWJ.js +85 -0
- package/dist/tooltip-DJWsDTWJ.js.map +1 -0
- package/dist/utils.js +10 -0
- package/dist/utils.js.map +1 -0
- package/dist/vendor-base-ui-DWIDNgE1.js +20446 -0
- package/dist/vendor-base-ui-DWIDNgE1.js.map +1 -0
- package/dist/vendor-floating-ui-BgbEw62H.js +1286 -0
- package/dist/vendor-floating-ui-BgbEw62H.js.map +1 -0
- package/dist/vendor-styling-BQbxAbdS.js +2775 -0
- package/dist/vendor-styling-BQbxAbdS.js.map +1 -0
- package/dist/vendor-utils-DD8jNJwD.js +741 -0
- package/dist/vendor-utils-DD8jNJwD.js.map +1 -0
- package/package.json +444 -0
- package/scripts/component-registry/cache.ts +123 -0
- package/scripts/component-registry/discovery.ts +469 -0
- package/scripts/component-registry/example-cleanup.ts +168 -0
- package/scripts/component-registry/index.test.ts +680 -0
- package/scripts/component-registry/index.ts +874 -0
- package/scripts/component-registry/markdown-generator.ts +222 -0
- package/scripts/component-registry/metadata.ts +643 -0
- package/scripts/component-registry/props-filter.ts +310 -0
- package/scripts/component-registry/schema-generator.ts +326 -0
- package/scripts/component-registry/sub-components.ts +349 -0
- package/scripts/component-registry/types.ts +156 -0
- package/scripts/component-registry/utils.ts +280 -0
- package/scripts/component-registry/variant-parser.ts +261 -0
- package/scripts/css-build.ts +55 -0
- package/scripts/generate-primitives.ts +178 -0
- package/scripts/theme-generator/config.ts +392 -0
- package/scripts/theme-generator/generate-css.ts +250 -0
- package/scripts/theme-generator/index.ts +159 -0
- package/scripts/theme-generator/migrate.ts +560 -0
- package/scripts/theme-generator/types.ts +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
# @cloudflare/kumo
|
|
2
|
+
|
|
3
|
+
Cloudflare's component library for building modern web applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @cloudflare/kumo
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
Kumo requires the following peer dependencies:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add react react-dom @phosphor-icons/react
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Component Documentation
|
|
20
|
+
|
|
21
|
+
Kumo includes a built-in CLI for quick component reference:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx @cloudflare/kumo ls # List all components
|
|
25
|
+
npx @cloudflare/kumo doc Button # Get component documentation
|
|
26
|
+
npx @cloudflare/kumo docs # Get all component docs
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The CLI reads from `catalog/component-registry.json` (generated from TypeScript types + Storybook examples).
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Import Components
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
// Main package import
|
|
37
|
+
import { Button, Input, Surface } from "@cloudflare/kumo";
|
|
38
|
+
|
|
39
|
+
// Granular imports (recommended for tree-shaking)
|
|
40
|
+
import { Button } from "@cloudflare/kumo/components/button";
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Import Styles
|
|
44
|
+
|
|
45
|
+
#### For Tailwind CSS Users
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
// Explicit import (recommended)
|
|
49
|
+
import "@cloudflare/kumo/styles/tailwind";
|
|
50
|
+
|
|
51
|
+
// Or use the default export (same as above)
|
|
52
|
+
import "@cloudflare/kumo/styles";
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This imports the raw CSS with Tailwind directives (`@theme`, `@layer`, etc.) that your Tailwind setup will process.
|
|
56
|
+
|
|
57
|
+
#### For Non-Tailwind Users (Standalone)
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import "@cloudflare/kumo/styles/standalone";
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This imports a fully compiled CSS file with all Tailwind utilities and Kumo styles pre-compiled. No Tailwind configuration needed!
|
|
64
|
+
|
|
65
|
+
**What's included in standalone:**
|
|
66
|
+
|
|
67
|
+
- All Tailwind utility classes used by Kumo components
|
|
68
|
+
- Kumo component styles
|
|
69
|
+
- Dark mode support (via `data-mode="dark"` attribute)
|
|
70
|
+
- All animations and keyframes
|
|
71
|
+
- Responsive utilities
|
|
72
|
+
|
|
73
|
+
**Note:** The standalone CSS is minified and optimized, but will be larger than the Tailwind version since it includes all utilities.
|
|
74
|
+
|
|
75
|
+
### Base UI Primitives
|
|
76
|
+
|
|
77
|
+
Kumo bundles [Base UI](https://base-ui.com) and re-exports all primitives for advanced use cases:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
// Barrel import - imports all primitives (convenient but larger bundle)
|
|
81
|
+
import { Popover, Slider, Accordion } from "@cloudflare/kumo/primitives";
|
|
82
|
+
|
|
83
|
+
// Granular imports - tree-shakeable, smaller bundles (recommended)
|
|
84
|
+
import { Popover } from "@cloudflare/kumo/primitives/popover";
|
|
85
|
+
import { Slider } from "@cloudflare/kumo/primitives/slider";
|
|
86
|
+
import { Accordion } from "@cloudflare/kumo/primitives/accordion";
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
> **Note:** Prefer styled Kumo components when available. Primitives are for custom components not yet in Kumo or cases requiring fine-grained control.
|
|
90
|
+
>
|
|
91
|
+
> **Performance tip:** Use granular imports (`@cloudflare/kumo/primitives/{name}`) for better tree-shaking and smaller bundle sizes.
|
|
92
|
+
|
|
93
|
+
#### Updating Primitives
|
|
94
|
+
|
|
95
|
+
Primitive exports are automatically generated from Base UI. After upgrading `@base-ui/react`:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Regenerate primitive files to sync with new Base UI version
|
|
99
|
+
pnpm build:primitives
|
|
100
|
+
|
|
101
|
+
# Review changes (new/removed primitives)
|
|
102
|
+
git diff src/primitives/
|
|
103
|
+
|
|
104
|
+
# Commit if primitives changed
|
|
105
|
+
git add src/primitives/ package.json
|
|
106
|
+
git commit -m "chore: update primitives for base-ui@x.x.x"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The `build:primitives` script:
|
|
110
|
+
|
|
111
|
+
- Generates individual primitive files in `src/primitives/*.ts`
|
|
112
|
+
- Updates barrel export in `src/primitives/index.ts`
|
|
113
|
+
- Updates `package.json` with granular export paths
|
|
114
|
+
- Runs automatically before every build via the `prebuild` script
|
|
115
|
+
|
|
116
|
+
#### Validating Build Output
|
|
117
|
+
|
|
118
|
+
After building, validate the primitives output:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Run post-build validation (checks dist/ structure)
|
|
122
|
+
pnpm validate:build
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This validates:
|
|
126
|
+
|
|
127
|
+
- All primitive JS files exist in `dist/primitives/`
|
|
128
|
+
- All type definitions exist in `dist/src/primitives/`
|
|
129
|
+
- Base UI is bundled (not externalized)
|
|
130
|
+
- Import paths reference bundled modules
|
|
131
|
+
- Source maps are present
|
|
132
|
+
|
|
133
|
+
## Development
|
|
134
|
+
|
|
135
|
+
**For comprehensive contributor documentation, see [AGENTS.md](../../AGENTS.md).**
|
|
136
|
+
|
|
137
|
+
### Creating New Components
|
|
138
|
+
|
|
139
|
+
Use the scaffolding tool to quickly create new components with all required files and configurations:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Create a new component
|
|
143
|
+
pnpm new-component
|
|
144
|
+
|
|
145
|
+
# Or use the shorthand
|
|
146
|
+
pnpm new
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**What it creates:**
|
|
150
|
+
|
|
151
|
+
- Component file: `src/components/{name}/{name}.tsx`
|
|
152
|
+
- Index file: `src/components/{name}/index.ts`
|
|
153
|
+
- Test file: `src/components/{name}/{name}.test.tsx`
|
|
154
|
+
|
|
155
|
+
**What it updates:**
|
|
156
|
+
|
|
157
|
+
- `src/index.ts` - Adds component export
|
|
158
|
+
- `vite.config.ts` - Adds build entry
|
|
159
|
+
- `package.json` - Adds export configuration
|
|
160
|
+
|
|
161
|
+
**Example:**
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
? Component name: Alert Banner
|
|
165
|
+
|
|
166
|
+
✅ Component scaffolded successfully!
|
|
167
|
+
|
|
168
|
+
📁 Files created:
|
|
169
|
+
- src/components/alert-banner/alert-banner.tsx
|
|
170
|
+
- src/components/alert-banner/index.ts
|
|
171
|
+
- src/components/alert-banner/alert-banner.test.tsx
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The scaffolding tool handles naming automatically - input any format (spaces, PascalCase, kebab-case) and it will convert appropriately.
|
|
175
|
+
|
|
176
|
+
### Creating New Blocks
|
|
177
|
+
|
|
178
|
+
Blocks are higher-level components that compose multiple base components to create common page patterns. Use the block scaffolding tool:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Create a new block
|
|
182
|
+
pnpm new-block
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**What it creates:**
|
|
186
|
+
|
|
187
|
+
- Block file: `src/blocks/{name}/{name}.tsx`
|
|
188
|
+
- Index file: `src/blocks/{name}/index.ts`
|
|
189
|
+
- Test file: `src/blocks/{name}/{name}.test.tsx`
|
|
190
|
+
|
|
191
|
+
**What it updates:**
|
|
192
|
+
|
|
193
|
+
- `src/index.ts` - Adds block export
|
|
194
|
+
- `vite.config.ts` - Adds build entry
|
|
195
|
+
- `package.json` - Adds export configuration
|
|
196
|
+
|
|
197
|
+
Blocks are higher-level components that compose multiple base components. See [AGENTS.md](../../AGENTS.md) for detailed documentation on blocks.
|
|
198
|
+
|
|
199
|
+
### Development Workflows
|
|
200
|
+
|
|
201
|
+
#### Option 1: Storybook Development (Recommended)
|
|
202
|
+
|
|
203
|
+
Kumo uses **Storybook** as a live development environment for building and testing components in isolation. Storybook provides instant feedback, interactive controls, and serves as living documentation for the component library.
|
|
204
|
+
|
|
205
|
+
**Start Storybook:**
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# From this directory
|
|
209
|
+
pnpm storybook
|
|
210
|
+
|
|
211
|
+
# Or from workspace root
|
|
212
|
+
pnpm --filter @cloudflare/kumo storybook
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Storybook runs at `http://localhost:6006` with hot module replacement enabled.
|
|
216
|
+
|
|
217
|
+
**Why use Storybook:**
|
|
218
|
+
|
|
219
|
+
- Full HMR with React Fast Refresh
|
|
220
|
+
- Changes reflect instantly without page reload
|
|
221
|
+
- Test all component variations and edge cases interactively
|
|
222
|
+
- Auto-generated docs from TypeScript types
|
|
223
|
+
- Best for isolated component development
|
|
224
|
+
- Test keyboard navigation and screen readers
|
|
225
|
+
|
|
226
|
+
**Story files** live alongside components:
|
|
227
|
+
|
|
228
|
+
- Components: `src/components/{name}/{name}.stories.tsx`
|
|
229
|
+
- Blocks: `src/blocks/{name}/{name}.stories.tsx`
|
|
230
|
+
|
|
231
|
+
**Storybook documentation** includes:
|
|
232
|
+
|
|
233
|
+
- Writing stories guide
|
|
234
|
+
- Development workflow
|
|
235
|
+
- Best practices
|
|
236
|
+
|
|
237
|
+
#### Option 2: Watch Build Mode
|
|
238
|
+
|
|
239
|
+
When you need to test components in the actual documentation site or consuming application:
|
|
240
|
+
|
|
241
|
+
**Start watch build:**
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
pnpm dev
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
This runs Vite in watch mode with optimizations for fast rebuilds:
|
|
248
|
+
|
|
249
|
+
- ⚡~400ms rebuild time (10x faster than production builds)
|
|
250
|
+
- Skips minification in development
|
|
251
|
+
- Incremental TypeScript compilation
|
|
252
|
+
- Selective file watching (ignores tests and stories)
|
|
253
|
+
- Validates components against production build output
|
|
254
|
+
|
|
255
|
+
**Using with documentation site:**
|
|
256
|
+
|
|
257
|
+
Terminal 1 (this directory):
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
pnpm dev
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Terminal 2 (from workspace root or kumo-docs):
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
cd ../kumo-docs
|
|
267
|
+
pnpm dev
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
When you edit a component:
|
|
271
|
+
|
|
272
|
+
1. Kumo rebuilds automatically (~400ms)
|
|
273
|
+
2. Refresh browser to see changes in docs site
|
|
274
|
+
3. Changes are validated against the actual build output
|
|
275
|
+
|
|
276
|
+
**Build modes:**
|
|
277
|
+
|
|
278
|
+
- `pnpm dev` - Development mode (fast, optimized for iteration)
|
|
279
|
+
- `pnpm build` - Production mode (full optimization, minification, CSS processing)
|
|
280
|
+
|
|
281
|
+
### Testing
|
|
282
|
+
|
|
283
|
+
The package includes comprehensive import validation tests that ensure all components are properly exported and consumable.
|
|
284
|
+
|
|
285
|
+
**Run tests:**
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Watch mode
|
|
289
|
+
pnpm test
|
|
290
|
+
|
|
291
|
+
# Single run
|
|
292
|
+
pnpm test:run
|
|
293
|
+
|
|
294
|
+
# With UI
|
|
295
|
+
pnpm test:ui
|
|
296
|
+
|
|
297
|
+
# With coverage
|
|
298
|
+
pnpm test:coverage
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**What's tested:**
|
|
302
|
+
|
|
303
|
+
- All components importable from main entry: `import { Component } from "@cloudflare/kumo"`
|
|
304
|
+
- All components importable via deep imports: `import { Component } from "@cloudflare/kumo/components/component-name"`
|
|
305
|
+
- All blocks importable from main entry: `import { Block } from "@cloudflare/kumo"`
|
|
306
|
+
- All blocks importable via deep imports: `import { Block } from "@cloudflare/kumo/blocks/block-name"`
|
|
307
|
+
- Package.json exports sync with actual components and blocks
|
|
308
|
+
- Export paths and formats are correct
|
|
309
|
+
- Build configuration consistency
|
|
310
|
+
|
|
311
|
+
**Zero maintenance:** Tests automatically discover components and blocks from the filesystem and validate against package.json. When adding new items, tests will fail with exact code snippets to fix configuration.
|
|
312
|
+
|
|
313
|
+
## Beta Releases
|
|
314
|
+
|
|
315
|
+
Beta releases allow you to test changes before publishing to production. Beta versions are automatically created for merge requests and include the commit hash for identification.
|
|
316
|
+
|
|
317
|
+
### Automated Beta Releases
|
|
318
|
+
|
|
319
|
+
Beta releases are automatically triggered for merge requests through the CI pipeline configured in the root `.gitlab-ci.yml`:
|
|
320
|
+
|
|
321
|
+
**CI Job Configuration:**
|
|
322
|
+
|
|
323
|
+
- **Job Name**: `version-and-publish-beta`
|
|
324
|
+
- **Stage**: `beta-release` (runs after build, checks, and tests)
|
|
325
|
+
- **Triggers**: Automatically on merge requests with changes to `packages/kumo/**/*`
|
|
326
|
+
- **Dependencies**: Requires `validate-changeset-run` job to pass
|
|
327
|
+
- **Environment**: Node.js container with pnpm, jq, and git configured
|
|
328
|
+
- **Authentication**: Uses Vault secrets for npm and GitLab API tokens
|
|
329
|
+
|
|
330
|
+
**Process Flow:**
|
|
331
|
+
|
|
332
|
+
1. **Validate**: Ensures changeset exists for `@cloudflare/kumo`
|
|
333
|
+
2. **Version**: Runs `pnpm run version:beta` (executes `./ci/versioning/version-beta.sh`)
|
|
334
|
+
- Consumes pending changesets
|
|
335
|
+
- Appends `-beta.{commit-hash}` to version number
|
|
336
|
+
3. **Build**: Runs `pnpm run build` in `packages/kumo`
|
|
337
|
+
4. **Publish**: Runs `pnpm run release:beta` to publish with `beta` tag
|
|
338
|
+
5. **Verify**: Waits 45s for npm propagation and verifies publication
|
|
339
|
+
6. **Notify**: Posts MR comment with installation instructions
|
|
340
|
+
|
|
341
|
+
**Secrets Required:**
|
|
342
|
+
|
|
343
|
+
- `NPM_TOKEN`: Authentication for npm registry
|
|
344
|
+
- `GITLAB_API_TOKEN`: For posting MR comments
|
|
345
|
+
|
|
346
|
+
### Beta Version Format
|
|
347
|
+
|
|
348
|
+
Beta versions follow this pattern:
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
{base-version}-beta.{commit-hash}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
For example: `0.1.0-beta.a1b2c3d`
|
|
355
|
+
|
|
356
|
+
### Installing Beta Versions
|
|
357
|
+
|
|
358
|
+
When a beta is published, the MR will include a comment with installation instructions:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
# Install the specific beta version
|
|
362
|
+
npm install @cloudflare/kumo@0.1.0-beta.a1b2c3d
|
|
363
|
+
|
|
364
|
+
# Or with pnpm
|
|
365
|
+
pnpm add @cloudflare/kumo@0.1.0-beta.a1b2c3d
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Testing Beta Releases
|
|
369
|
+
|
|
370
|
+
1. **Create MR**: Submit your changes with a changeset
|
|
371
|
+
2. **Wait for Beta**: The beta job runs automatically after changeset validation passes
|
|
372
|
+
3. **Install Beta**: Use the version from the MR comment
|
|
373
|
+
4. **Test Changes**: Verify functionality in your project
|
|
374
|
+
5. **Merge**: Once tested, merge the MR for production release
|
|
375
|
+
|
|
376
|
+
### Changeset Validation
|
|
377
|
+
|
|
378
|
+
All merge requests with changes to `packages/kumo/` must include a changeset:
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# Create a changeset
|
|
382
|
+
pnpm changeset
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
- Select `@cloudflare/kumo` when prompted
|
|
386
|
+
- Choose the type of change: `patch`, `minor`, or `major`
|
|
387
|
+
- Write a clear description of what changed
|
|
388
|
+
|
|
389
|
+
The CI will automatically validate that a changeset exists before allowing beta publication.
|
|
390
|
+
|
|
391
|
+
## Production Releases
|
|
392
|
+
|
|
393
|
+
This package uses [Changesets](https://github.com/changesets/changesets) for version management and automated releases.
|
|
394
|
+
|
|
395
|
+
### Creating a Release
|
|
396
|
+
|
|
397
|
+
1. **Check for existing changesets**:
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# List any pending changesets
|
|
401
|
+
ls .changeset/*.md 2>/dev/null | grep -v "README\|USAGE" || echo "No pending changesets"
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
2. **Create a changeset** for your changes (if necessary):
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
pnpm changeset
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
- Select `@cloudflare/kumo` from the list
|
|
411
|
+
- Select the type of change: `patch`, `minor`, or `major`
|
|
412
|
+
- Write a clear description of what changed
|
|
413
|
+
- This creates a `.changeset/*.md` file describing the change
|
|
414
|
+
|
|
415
|
+
### Release Workflow
|
|
416
|
+
|
|
417
|
+
1. **Development**: Make changes to components or blocks
|
|
418
|
+
2. **Changeset**: Create changeset describing the changes
|
|
419
|
+
3. **Review**: Submit MR with changes and changeset
|
|
420
|
+
4. **Beta Test**: Test the beta version published to the MR
|
|
421
|
+
5. **Merge**: Merge MR to main branch
|
|
422
|
+
6. **Release**: Run the production release process
|
|
423
|
+
|
|
424
|
+
### Production Release Process
|
|
425
|
+
|
|
426
|
+
To publish a production release:
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
# 1. Ensure you're on main branch with latest changes
|
|
430
|
+
git checkout main
|
|
431
|
+
git pull
|
|
432
|
+
|
|
433
|
+
# 2. Version all packages (consumes changesets)
|
|
434
|
+
pnpm version
|
|
435
|
+
|
|
436
|
+
# 3. Build all packages
|
|
437
|
+
pnpm build:all
|
|
438
|
+
|
|
439
|
+
# 4. Publish to npm
|
|
440
|
+
pnpm release
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
This will:
|
|
444
|
+
|
|
445
|
+
- Update `package.json` with new version
|
|
446
|
+
- Generate/update `CHANGELOG.md`
|
|
447
|
+
- Remove consumed changeset files
|
|
448
|
+
- Publish to npm registry
|
|
449
|
+
- Create git tags
|
|
450
|
+
|
|
451
|
+
### Post-Release
|
|
452
|
+
|
|
453
|
+
After publishing:
|
|
454
|
+
|
|
455
|
+
1. **Commit version changes**:
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
git add .
|
|
459
|
+
git commit -m "chore: release @cloudflare/kumo@{version}"
|
|
460
|
+
git push
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
2. **Push tags**:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
git push --tags
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
3. **Verify publication**:
|
|
470
|
+
```bash
|
|
471
|
+
npm view @cloudflare/kumo versions
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### Semantic Versioning
|
|
475
|
+
|
|
476
|
+
Follow semantic versioning guidelines:
|
|
477
|
+
|
|
478
|
+
- **Patch** (`0.0.1`): Bug fixes, small component updates, style tweaks
|
|
479
|
+
- **Minor** (`0.1.0`): New components, new features, backwards-compatible changes
|
|
480
|
+
- **Major** (`1.0.0`): Breaking changes, removed components, API changes
|
|
481
|
+
|
|
482
|
+
### Release Notes
|
|
483
|
+
|
|
484
|
+
Changesets automatically generate:
|
|
485
|
+
|
|
486
|
+
- Updated `package.json` version
|
|
487
|
+
- `CHANGELOG.md` with release notes
|
|
488
|
+
- Git tags for each release
|
|
489
|
+
|
|
490
|
+
The changelog includes all changeset descriptions, providing clear documentation of what changed in each release.
|
|
491
|
+
|
|
492
|
+
## Troubleshooting
|
|
493
|
+
|
|
494
|
+
### Common Issues
|
|
495
|
+
|
|
496
|
+
**Changeset Validation Failed**
|
|
497
|
+
|
|
498
|
+
If the CI fails with a changeset validation error:
|
|
499
|
+
|
|
500
|
+
1. **Check if changeset exists**: Run `ls .changeset/*.md` to see pending changesets
|
|
501
|
+
2. **Create changeset**: Run `pnpm changeset` and select `@cloudflare/kumo`
|
|
502
|
+
3. **Verify changeset targets correct package**: Open the changeset file and ensure it includes `@cloudflare/kumo`
|
|
503
|
+
4. **Commit changeset**: Add and commit the changeset file to your branch
|
|
504
|
+
|
|
505
|
+
**Beta Publication Failed**
|
|
506
|
+
|
|
507
|
+
If the beta release job fails:
|
|
508
|
+
|
|
509
|
+
1. **Check build**: Ensure `pnpm build` succeeds locally
|
|
510
|
+
2. **Check npm token**: Verify npm authentication is configured in CI
|
|
511
|
+
3. **Check version format**: Ensure version follows semver format
|
|
512
|
+
4. **Review CI logs**: Check GitLab CI logs for specific error messages
|
|
513
|
+
|
|
514
|
+
**Import Errors After Release**
|
|
515
|
+
|
|
516
|
+
If consumers report import errors:
|
|
517
|
+
|
|
518
|
+
1. **Verify exports**: Check `package.json` exports match actual files
|
|
519
|
+
2. **Run tests**: Ensure `pnpm test:run` passes
|
|
520
|
+
3. **Check build output**: Verify `dist/` contains expected files
|
|
521
|
+
4. **Test locally**: Use `npm link` to test package locally before publishing
|