@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { KumoCatalog, CatalogConfig, UIElement } from './types';
|
|
2
|
+
interface SchemasModule {
|
|
3
|
+
KUMO_COMPONENT_NAMES: readonly string[];
|
|
4
|
+
UIElementBaseSchema: {
|
|
5
|
+
safeParse: (data: unknown) => {
|
|
6
|
+
success: boolean;
|
|
7
|
+
data?: unknown;
|
|
8
|
+
error?: {
|
|
9
|
+
issues: Array<{
|
|
10
|
+
message: string;
|
|
11
|
+
path: (string | number)[];
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
validateElementProps: (element: UIElement) => {
|
|
17
|
+
success: boolean;
|
|
18
|
+
error?: {
|
|
19
|
+
issues: Array<{
|
|
20
|
+
message: string;
|
|
21
|
+
path: (string | number)[];
|
|
22
|
+
}>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
validateUITree: (tree: unknown) => {
|
|
26
|
+
success: boolean;
|
|
27
|
+
data?: unknown;
|
|
28
|
+
error?: {
|
|
29
|
+
issues: Array<{
|
|
30
|
+
message: string;
|
|
31
|
+
path: (string | number)[];
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Load the generated schemas module.
|
|
38
|
+
* This is called automatically when needed.
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadSchemas(): Promise<SchemasModule>;
|
|
41
|
+
/**
|
|
42
|
+
* Create a Kumo catalog for runtime validation.
|
|
43
|
+
*
|
|
44
|
+
* The catalog:
|
|
45
|
+
* - Uses auto-generated Zod schemas from component-registry.json
|
|
46
|
+
* - Validates UI elements and trees at runtime
|
|
47
|
+
* - Generates AI prompts describing available components
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* import { createKumoCatalog, initCatalog } from '@cloudflare/kumo/catalog';
|
|
51
|
+
*
|
|
52
|
+
* const catalog = createKumoCatalog({
|
|
53
|
+
* actions: {
|
|
54
|
+
* submit_form: { description: 'Submit the form' },
|
|
55
|
+
* delete_item: { description: 'Delete selected item' },
|
|
56
|
+
* },
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // Initialize schemas (required before sync validation)
|
|
60
|
+
* await initCatalog(catalog);
|
|
61
|
+
*
|
|
62
|
+
* // Validate AI-generated tree
|
|
63
|
+
* const result = catalog.validateTree(aiGeneratedJson);
|
|
64
|
+
* if (result.success) {
|
|
65
|
+
* // Render the tree
|
|
66
|
+
* }
|
|
67
|
+
*/
|
|
68
|
+
export declare function createKumoCatalog(config?: CatalogConfig): KumoCatalog;
|
|
69
|
+
/**
|
|
70
|
+
* Initialize the catalog by loading schemas.
|
|
71
|
+
* Call this before using synchronous validation methods.
|
|
72
|
+
*/
|
|
73
|
+
export declare function initCatalog(catalog: KumoCatalog): Promise<void>;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/catalog/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EAIb,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB,UAAU,aAAa;IACrB,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,mBAAmB,EAAE;QACnB,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK;YAC5B,OAAO,EAAE,OAAO,CAAC;YACjB,IAAI,CAAC,EAAE,OAAO,CAAC;YACf,KAAK,CAAC,EAAE;gBAAE,MAAM,EAAE,KAAK,CAAC;oBAAE,OAAO,EAAE,MAAM,CAAC;oBAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;iBAAE,CAAC,CAAA;aAAE,CAAC;SAC3E,CAAC;KACH,CAAC;IACF,oBAAoB,EAAE,CAAC,OAAO,EAAE,SAAS,KAAK;QAC5C,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE;YAAE,MAAM,EAAE,KAAK,CAAC;gBAAE,OAAO,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;aAAE,CAAC,CAAA;SAAE,CAAC;KAC3E,CAAC;IACF,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK;QACjC,OAAO,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE;YAAE,MAAM,EAAE,KAAK,CAAC;gBAAE,OAAO,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;aAAE,CAAC,CAAA;SAAE,CAAC;KAC3E,CAAC;CACH;AAMD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,CAU1D;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,aAAkB,GAAG,WAAW,CA8KzE;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAGrE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DataModel, DynamicValue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Get a value from an object by JSON Pointer path.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const data = { user: { name: "John", profile: { age: 30 } } };
|
|
7
|
+
* getByPath(data, "/user/name") // "John"
|
|
8
|
+
* getByPath(data, "/user/profile/age") // 30
|
|
9
|
+
* getByPath(data, "/missing") // undefined
|
|
10
|
+
*/
|
|
11
|
+
export declare function getByPath(obj: unknown, path: string): unknown;
|
|
12
|
+
/**
|
|
13
|
+
* Set a value in an object by JSON Pointer path.
|
|
14
|
+
* Creates intermediate objects as needed.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const data = {};
|
|
18
|
+
* setByPath(data, "/user/name", "John");
|
|
19
|
+
* // data is now { user: { name: "John" } }
|
|
20
|
+
*/
|
|
21
|
+
export declare function setByPath(obj: Record<string, unknown>, path: string, value: unknown): void;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a value is a dynamic path reference.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isDynamicPath(value: unknown): value is {
|
|
26
|
+
path: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Resolve a dynamic value against a data model.
|
|
30
|
+
* If the value is a path reference, look it up in the data model.
|
|
31
|
+
* Otherwise, return the literal value.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* const data = { user: { name: "John" } };
|
|
35
|
+
* resolveDynamicValue("Hello", data) // "Hello"
|
|
36
|
+
* resolveDynamicValue({ path: "/user/name" }, data) // "John"
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveDynamicValue<T>(value: DynamicValue<T>, dataModel: DataModel): T | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Resolve all dynamic values in an object.
|
|
41
|
+
* Recursively resolves any { path: string } references.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveProps(props: Record<string, unknown>, dataModel: DataModel): Record<string, unknown>;
|
|
44
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/catalog/data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAwB7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GACb,IAAI,CAmBN;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAOvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EACtB,SAAS,EAAE,SAAS,GACnB,CAAC,GAAG,SAAS,CAUf;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,SAAS,EAAE,SAAS,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kumo Catalog Module
|
|
3
|
+
*
|
|
4
|
+
* Runtime utilities for JSON-based UI rendering with Kumo components.
|
|
5
|
+
* Based on the json-render pattern: https://github.com/vercel-labs/json-render
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Catalog creation with auto-generated Zod schemas
|
|
9
|
+
* - UI tree validation
|
|
10
|
+
* - Dynamic value resolution (data binding)
|
|
11
|
+
* - Visibility condition evaluation
|
|
12
|
+
* - Action handling
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import {
|
|
16
|
+
* createKumoCatalog,
|
|
17
|
+
* initCatalog,
|
|
18
|
+
* evaluateVisibility,
|
|
19
|
+
* resolveProps,
|
|
20
|
+
* } from '@cloudflare/kumo/catalog';
|
|
21
|
+
*
|
|
22
|
+
* // Create catalog with actions
|
|
23
|
+
* const catalog = createKumoCatalog({
|
|
24
|
+
* actions: {
|
|
25
|
+
* submit: { description: 'Submit form' },
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Initialize (loads schemas)
|
|
30
|
+
* await initCatalog(catalog);
|
|
31
|
+
*
|
|
32
|
+
* // Validate AI-generated tree
|
|
33
|
+
* const result = catalog.validateTree(aiGeneratedJson);
|
|
34
|
+
*/
|
|
35
|
+
export type { UIElement, UITree, DynamicValue, DynamicString, DynamicNumber, DynamicBoolean, VisibilityCondition, LogicExpression, Action, ActionConfirm, ActionHandler, ActionHandlers, ActionDefinition, AuthState, DataModel, KumoCatalog, CatalogConfig, ValidationResult, ComponentRegistry, ComponentSchema, PropSchema, SubComponentSchema, } from './types';
|
|
36
|
+
export { createKumoCatalog, initCatalog, loadSchemas } from './catalog';
|
|
37
|
+
export { getByPath, setByPath, isDynamicPath, resolveDynamicValue, resolveProps, } from './data';
|
|
38
|
+
export { evaluateVisibility, createVisibilityContext, type VisibilityContext, } from './visibility';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/catalog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,YAAY,EAEV,SAAS,EACT,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EAEd,mBAAmB,EACnB,eAAe,EAEf,MAAM,EACN,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAEhB,SAAS,EACT,SAAS,EAET,WAAW,EACX,aAAa,EACb,gBAAgB,EAEhB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxE,OAAO,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,YAAY,GACb,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,iBAAiB,GACvB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime types for Kumo catalog module.
|
|
3
|
+
*
|
|
4
|
+
* These types extend the registry types with runtime capabilities
|
|
5
|
+
* like visibility conditions, actions, and data binding.
|
|
6
|
+
*/
|
|
7
|
+
export type { ComponentRegistry, ComponentSchema, PropSchema, SubComponentSchema, } from '../registry/types';
|
|
8
|
+
/**
|
|
9
|
+
* A value that can either be a literal or a reference to the data model.
|
|
10
|
+
* When { path: string }, the value is resolved from the data model at runtime.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Literal value
|
|
14
|
+
* const title: DynamicValue<string> = "Hello World";
|
|
15
|
+
*
|
|
16
|
+
* // Dynamic reference
|
|
17
|
+
* const title: DynamicValue<string> = { path: "/user/name" };
|
|
18
|
+
*/
|
|
19
|
+
export type DynamicValue<T = unknown> = T | {
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
export type DynamicString = DynamicValue<string>;
|
|
23
|
+
export type DynamicNumber = DynamicValue<number>;
|
|
24
|
+
export type DynamicBoolean = DynamicValue<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Logic expression for complex visibility conditions.
|
|
27
|
+
* Supports boolean logic (and, or, not) and comparisons.
|
|
28
|
+
*/
|
|
29
|
+
export type LogicExpression = {
|
|
30
|
+
and: LogicExpression[];
|
|
31
|
+
} | {
|
|
32
|
+
or: LogicExpression[];
|
|
33
|
+
} | {
|
|
34
|
+
not: LogicExpression;
|
|
35
|
+
} | {
|
|
36
|
+
path: string;
|
|
37
|
+
} | {
|
|
38
|
+
eq: [DynamicValue, DynamicValue];
|
|
39
|
+
} | {
|
|
40
|
+
neq: [DynamicValue, DynamicValue];
|
|
41
|
+
} | {
|
|
42
|
+
gt: [DynamicValue<number>, DynamicValue<number>];
|
|
43
|
+
} | {
|
|
44
|
+
gte: [DynamicValue<number>, DynamicValue<number>];
|
|
45
|
+
} | {
|
|
46
|
+
lt: [DynamicValue<number>, DynamicValue<number>];
|
|
47
|
+
} | {
|
|
48
|
+
lte: [DynamicValue<number>, DynamicValue<number>];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Visibility condition for conditional rendering.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Always visible
|
|
55
|
+
* visible: true
|
|
56
|
+
*
|
|
57
|
+
* // Visible when data path is truthy
|
|
58
|
+
* visible: { path: "/user/isAdmin" }
|
|
59
|
+
*
|
|
60
|
+
* // Visible when user is signed in
|
|
61
|
+
* visible: { auth: "signedIn" }
|
|
62
|
+
*
|
|
63
|
+
* // Complex condition
|
|
64
|
+
* visible: { and: [{ path: "/user/isAdmin" }, { auth: "signedIn" }] }
|
|
65
|
+
*/
|
|
66
|
+
export type VisibilityCondition = boolean | {
|
|
67
|
+
path: string;
|
|
68
|
+
} | {
|
|
69
|
+
auth: "signedIn" | "signedOut";
|
|
70
|
+
} | LogicExpression;
|
|
71
|
+
/**
|
|
72
|
+
* Confirmation dialog configuration for destructive actions.
|
|
73
|
+
*/
|
|
74
|
+
export interface ActionConfirm {
|
|
75
|
+
title: string;
|
|
76
|
+
message: string;
|
|
77
|
+
variant?: "default" | "danger";
|
|
78
|
+
confirmLabel?: string;
|
|
79
|
+
cancelLabel?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Action that can be triggered by a component.
|
|
83
|
+
* AI declares the intent, your handlers execute the logic.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* {
|
|
87
|
+
* name: "delete_item",
|
|
88
|
+
* params: {
|
|
89
|
+
* itemId: { path: "/selected/id" }
|
|
90
|
+
* },
|
|
91
|
+
* confirm: {
|
|
92
|
+
* title: "Delete Item",
|
|
93
|
+
* message: "Are you sure?",
|
|
94
|
+
* variant: "danger"
|
|
95
|
+
* }
|
|
96
|
+
* }
|
|
97
|
+
*/
|
|
98
|
+
export interface Action {
|
|
99
|
+
/** Action name (must be registered in catalog) */
|
|
100
|
+
name: string;
|
|
101
|
+
/** Parameters to pass to the action handler */
|
|
102
|
+
params?: Record<string, DynamicValue>;
|
|
103
|
+
/** Confirmation dialog before executing */
|
|
104
|
+
confirm?: ActionConfirm;
|
|
105
|
+
/** Data updates on successful execution */
|
|
106
|
+
onSuccess?: {
|
|
107
|
+
set: Record<string, DynamicValue>;
|
|
108
|
+
};
|
|
109
|
+
/** Data updates on error */
|
|
110
|
+
onError?: {
|
|
111
|
+
set: Record<string, DynamicValue>;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* A single UI element in the tree.
|
|
116
|
+
* Represents one component with its props and relationships.
|
|
117
|
+
*/
|
|
118
|
+
export interface UIElement<TType extends string = string, TProps = Record<string, unknown>> {
|
|
119
|
+
/** Unique key for reconciliation */
|
|
120
|
+
key: string;
|
|
121
|
+
/** Component type from the catalog */
|
|
122
|
+
type: TType;
|
|
123
|
+
/** Component props (may include dynamic values) */
|
|
124
|
+
props: TProps;
|
|
125
|
+
/** Child element keys (flat structure for streaming) */
|
|
126
|
+
children?: string[];
|
|
127
|
+
/** Parent element key (null for root) */
|
|
128
|
+
parentKey?: string | null;
|
|
129
|
+
/** Visibility condition */
|
|
130
|
+
visible?: VisibilityCondition;
|
|
131
|
+
/** Action to trigger on interaction */
|
|
132
|
+
action?: Action;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Flat UI tree structure optimized for LLM generation and streaming.
|
|
136
|
+
*
|
|
137
|
+
* The flat structure allows:
|
|
138
|
+
* - Progressive rendering as elements stream in
|
|
139
|
+
* - Easy updates without deep tree traversal
|
|
140
|
+
* - Simple serialization/deserialization
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* {
|
|
144
|
+
* root: "card-1",
|
|
145
|
+
* elements: {
|
|
146
|
+
* "card-1": { key: "card-1", type: "Surface", props: { variant: "card" }, children: ["text-1"] },
|
|
147
|
+
* "text-1": { key: "text-1", type: "Text", props: { children: "Hello" }, parentKey: "card-1" }
|
|
148
|
+
* }
|
|
149
|
+
* }
|
|
150
|
+
*/
|
|
151
|
+
export interface UITree {
|
|
152
|
+
/** Root element key */
|
|
153
|
+
root: string;
|
|
154
|
+
/** Flat map of elements by key */
|
|
155
|
+
elements: Record<string, UIElement>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Authentication state for visibility evaluation.
|
|
159
|
+
*/
|
|
160
|
+
export interface AuthState {
|
|
161
|
+
isSignedIn: boolean;
|
|
162
|
+
user?: Record<string, unknown>;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Data model that backs dynamic values.
|
|
166
|
+
* Values are accessed via JSON Pointer paths (e.g., "/user/name").
|
|
167
|
+
*/
|
|
168
|
+
export type DataModel = Record<string, unknown>;
|
|
169
|
+
/**
|
|
170
|
+
* Action handler function signature.
|
|
171
|
+
*/
|
|
172
|
+
export type ActionHandler = (params: Record<string, unknown>) => void | Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Map of action names to their handlers.
|
|
175
|
+
*/
|
|
176
|
+
export type ActionHandlers = Record<string, ActionHandler>;
|
|
177
|
+
/**
|
|
178
|
+
* Action definition for the catalog.
|
|
179
|
+
*/
|
|
180
|
+
export interface ActionDefinition {
|
|
181
|
+
/** Description for AI generation */
|
|
182
|
+
description: string;
|
|
183
|
+
/** Parameter schema (optional, for validation) */
|
|
184
|
+
params?: Record<string, {
|
|
185
|
+
type: string;
|
|
186
|
+
description?: string;
|
|
187
|
+
}>;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Catalog configuration for createKumoCatalog.
|
|
191
|
+
*/
|
|
192
|
+
export interface CatalogConfig {
|
|
193
|
+
/** Action definitions (optional) */
|
|
194
|
+
actions?: Record<string, ActionDefinition>;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Runtime catalog instance.
|
|
198
|
+
*/
|
|
199
|
+
export interface KumoCatalog {
|
|
200
|
+
/** Component names in the catalog */
|
|
201
|
+
readonly componentNames: readonly string[];
|
|
202
|
+
/** Action names in the catalog */
|
|
203
|
+
readonly actionNames: readonly string[];
|
|
204
|
+
/** Check if component type exists */
|
|
205
|
+
hasComponent(type: string): boolean;
|
|
206
|
+
/** Check if action exists */
|
|
207
|
+
hasAction(name: string): boolean;
|
|
208
|
+
/** Validate a UI element */
|
|
209
|
+
validateElement(element: unknown): ValidationResult;
|
|
210
|
+
/** Validate a complete UI tree */
|
|
211
|
+
validateTree(tree: unknown): ValidationResult<UITree>;
|
|
212
|
+
/** Generate a prompt describing the catalog for AI */
|
|
213
|
+
generatePrompt(): string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Validation result from schema validation.
|
|
217
|
+
*/
|
|
218
|
+
export interface ValidationResult<T = unknown> {
|
|
219
|
+
success: boolean;
|
|
220
|
+
data?: T;
|
|
221
|
+
error?: {
|
|
222
|
+
message: string;
|
|
223
|
+
path: (string | number)[];
|
|
224
|
+
}[];
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/catalog/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VisibilityCondition, DataModel, AuthState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Context for evaluating visibility conditions.
|
|
4
|
+
*/
|
|
5
|
+
export interface VisibilityContext {
|
|
6
|
+
/** Data model for path resolution */
|
|
7
|
+
data: DataModel;
|
|
8
|
+
/** Authentication state */
|
|
9
|
+
auth: AuthState;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Evaluate a visibility condition.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Boolean
|
|
16
|
+
* evaluateVisibility(true, ctx) // true
|
|
17
|
+
*
|
|
18
|
+
* // Path check
|
|
19
|
+
* evaluateVisibility({ path: "/user/isAdmin" }, ctx) // depends on data
|
|
20
|
+
*
|
|
21
|
+
* // Auth check
|
|
22
|
+
* evaluateVisibility({ auth: "signedIn" }, ctx) // depends on auth state
|
|
23
|
+
*
|
|
24
|
+
* // Complex logic
|
|
25
|
+
* evaluateVisibility({
|
|
26
|
+
* and: [
|
|
27
|
+
* { path: "/user/isAdmin" },
|
|
28
|
+
* { auth: "signedIn" }
|
|
29
|
+
* ]
|
|
30
|
+
* }, ctx)
|
|
31
|
+
*/
|
|
32
|
+
export declare function evaluateVisibility(condition: VisibilityCondition | undefined, ctx: VisibilityContext): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Create a default visibility context.
|
|
35
|
+
*/
|
|
36
|
+
export declare function createVisibilityContext(data?: DataModel, auth?: Partial<AuthState>): VisibilityContext;
|
|
37
|
+
//# sourceMappingURL=visibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../src/catalog/visibility.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,mBAAmB,EAEnB,SAAS,EACT,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,SAAS,CAAC;IAChB,2BAA2B;IAC3B,IAAI,EAAE,SAAS,CAAC;CACjB;AA+FD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,mBAAmB,GAAG,SAAS,EAC1C,GAAG,EAAE,iBAAiB,GACrB,OAAO,CA8BT;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,GAAE,SAAc,EACpB,IAAI,GAAE,OAAO,CAAC,SAAS,CAAM,GAC5B,iBAAiB,CAQnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-cli.d.ts","sourceRoot":"","sources":["../../../src/command-line/build-cli.ts"],"names":[],"mappings":";AACA;;;GAGG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Kumo CLI - Component registry and blocks distribution
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* kumo init Initialize kumo.json configuration
|
|
7
|
+
* kumo ls List all components
|
|
8
|
+
* kumo doc <name> Get documentation for a component
|
|
9
|
+
* kumo docs Get documentation for all components
|
|
10
|
+
* kumo help Show this help message
|
|
11
|
+
*/
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/command-line/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/add.ts"],"names":[],"mappings":";AACA;;;GAGG;AAiGH;;GAEG;AACH,wBAAsB,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAkJtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/blocks.ts"],"names":[],"mappings":";AACA;;;GAGG;AAsCH;;GAEG;AACH,wBAAgB,MAAM,IAAI,IAAI,CAmD7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Get documentation for a specific Kumo component
|
|
4
|
+
* Usage: kumo doc <ComponentName>
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Output documentation for all components
|
|
8
|
+
*/
|
|
9
|
+
export declare function docs(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Get documentation for a specific component
|
|
12
|
+
*/
|
|
13
|
+
export declare function doc(componentName?: string): void;
|
|
14
|
+
//# sourceMappingURL=doc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/doc.ts"],"names":[],"mappings":";AACA;;;GAGG;AAoMH;;GAEG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAsB3B;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CA+BhD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Initialize kumo.json configuration file
|
|
4
|
+
* Usage: kumo init
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Prompt user for input
|
|
8
|
+
*/
|
|
9
|
+
export declare function prompt(question: string, defaultValue?: string): Promise<string>;
|
|
10
|
+
/**
|
|
11
|
+
* Prompt user for yes/no confirmation
|
|
12
|
+
*/
|
|
13
|
+
export declare function confirm(question: string): Promise<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Initialize kumo.json configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function init(): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/init.ts"],"names":[],"mappings":";AACA;;;GAGG;AAUH;;GAEG;AACH,wBAAsB,MAAM,CAC1B,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAajB;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYhE;AAED;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAyC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ls.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/ls.ts"],"names":[],"mappings":";AACA;;;GAGG;AAoCH;;GAEG;AACH,wBAAgB,EAAE,IAAI,IAAI,CAwCzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kumo CLI migrate command
|
|
3
|
+
*
|
|
4
|
+
* For CONSUMERS: Exports the token rename map when Kumo releases breaking changes.
|
|
5
|
+
* The actual rename map is embedded at build time from the theme-generator config.
|
|
6
|
+
*
|
|
7
|
+
* For KUMO MAINTAINERS: Use `pnpm migrate:tokens` for the full migration workflow.
|
|
8
|
+
*/
|
|
9
|
+
export declare function migrate(args: string[]): void;
|
|
10
|
+
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../../src/command-line/commands/migrate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA6GH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CA2C5C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kumo CLI configuration utilities
|
|
3
|
+
* Handles reading and writing kumo.json config files
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Configuration schema for kumo.json
|
|
7
|
+
*/
|
|
8
|
+
export interface KumoConfig {
|
|
9
|
+
/**
|
|
10
|
+
* Directory where blocks will be installed (relative to project root)
|
|
11
|
+
* @default "src/components/kumo"
|
|
12
|
+
*/
|
|
13
|
+
blocksDir: string;
|
|
14
|
+
/**
|
|
15
|
+
* Version of the config schema
|
|
16
|
+
* @default "1.0.0"
|
|
17
|
+
*/
|
|
18
|
+
version?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Default configuration values
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_CONFIG: Required<KumoConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* Read kumo.json from the specified directory
|
|
26
|
+
* @param projectRoot - Path to project root (defaults to cwd)
|
|
27
|
+
* @returns Parsed config or null if not found
|
|
28
|
+
*/
|
|
29
|
+
export declare function readConfig(projectRoot?: string): KumoConfig | null;
|
|
30
|
+
/**
|
|
31
|
+
* Write kumo.json to the specified directory
|
|
32
|
+
* @param config - Configuration to write
|
|
33
|
+
* @param projectRoot - Path to project root (defaults to cwd)
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeConfig(config: KumoConfig, projectRoot?: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Check if kumo.json exists in the specified directory
|
|
38
|
+
* @param projectRoot - Path to project root (defaults to cwd)
|
|
39
|
+
* @returns true if kumo.json exists
|
|
40
|
+
*/
|
|
41
|
+
export declare function configExists(projectRoot?: string): boolean;
|
|
42
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/command-line/utils/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,UAAU,CAG/C,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,WAAW,GAAE,MAAsB,GAClC,UAAU,GAAG,IAAI,CAsBnB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,UAAU,EAClB,WAAW,GAAE,MAAsB,GAClC,IAAI,CAkBN;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAGzE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Import path transformer for Kumo blocks
|
|
3
|
+
* Transforms relative imports to package imports when installing blocks via CLI
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Transforms relative imports in block source code to package imports
|
|
7
|
+
*
|
|
8
|
+
* Examples:
|
|
9
|
+
* - `../../components/tabs` → `@cloudflare/kumo`
|
|
10
|
+
* - `../../utils/cn` → `@cloudflare/kumo`
|
|
11
|
+
* - Preserves type imports: `import { type Foo }` correctly
|
|
12
|
+
*
|
|
13
|
+
* @param content - The source code content to transform
|
|
14
|
+
* @returns Transformed source code with package imports
|
|
15
|
+
*/
|
|
16
|
+
export declare function transformImports(content: string): string;
|
|
17
|
+
//# sourceMappingURL=transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../../src/command-line/utils/transformer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAgExD"}
|