@cloudraker/reki 2.6.1
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 +1892 -0
- package/README.md +525 -0
- package/ai/USAGE.md +201 -0
- package/ai/component-registry.json +6707 -0
- package/ai/component-registry.md +8346 -0
- package/ai/schemas.ts +955 -0
- package/bin/reki.js +36 -0
- package/dist/.build-complete +1 -0
- package/dist/ai/schemas.d.ts +2514 -0
- package/dist/ai/schemas.d.ts.map +1 -0
- package/dist/ai/schemas.js +3985 -0
- package/dist/ai/schemas.js.map +1 -0
- package/dist/blocks-source/delete-resource/delete-resource.tsx +213 -0
- package/dist/blocks-source/page-header/page-header.tsx +99 -0
- package/dist/blocks-source/resource-list/resource-list.test.tsx +28 -0
- package/dist/blocks-source/resource-list/resource-list.tsx +69 -0
- package/dist/catalog.js +229 -0
- package/dist/catalog.js.map +1 -0
- package/dist/chunks/SankeyChart-jwwpwps4npqzbrvn.js +890 -0
- package/dist/chunks/SankeyChart-jwwpwps4npqzbrvn.js.map +1 -0
- package/dist/chunks/autocomplete-f4vetako14h2aqsw.js +193 -0
- package/dist/chunks/autocomplete-f4vetako14h2aqsw.js.map +1 -0
- package/dist/chunks/badge-pc33c5ir7muabgfh.js +163 -0
- package/dist/chunks/badge-pc33c5ir7muabgfh.js.map +1 -0
- package/dist/chunks/banner-kis9h1yq636liunc.js +120 -0
- package/dist/chunks/banner-kis9h1yq636liunc.js.map +1 -0
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js +15 -0
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js.map +1 -0
- package/dist/chunks/breadcrumbs-d6149hyct4puz3x4.js +169 -0
- package/dist/chunks/breadcrumbs-d6149hyct4puz3x4.js.map +1 -0
- package/dist/chunks/button-nc5p1h28cwes0tjw.js +237 -0
- package/dist/chunks/button-nc5p1h28cwes0tjw.js.map +1 -0
- package/dist/chunks/checkbox-g2661n3eodgoispq.js +216 -0
- package/dist/chunks/checkbox-g2661n3eodgoispq.js.map +1 -0
- package/dist/chunks/clipboard-text-g3659lejx2d7i93e.js +191 -0
- package/dist/chunks/clipboard-text-g3659lejx2d7i93e.js.map +1 -0
- package/dist/chunks/cloudflare-logo-k0f07zztsda8m4ca.js +175 -0
- package/dist/chunks/cloudflare-logo-k0f07zztsda8m4ca.js.map +1 -0
- package/dist/chunks/cn-ct4n7r74mh8y0f48.js +26 -0
- package/dist/chunks/cn-ct4n7r74mh8y0f48.js.map +1 -0
- package/dist/chunks/code-fm5rpi47v6cj9o8o.js +61 -0
- package/dist/chunks/code-fm5rpi47v6cj9o8o.js.map +1 -0
- package/dist/chunks/collapsible-ndvmgo29s5iqfcor.js +76 -0
- package/dist/chunks/collapsible-ndvmgo29s5iqfcor.js.map +1 -0
- package/dist/chunks/combobox-i38w67netm8ukw4f.js +408 -0
- package/dist/chunks/combobox-i38w67netm8ukw4f.js.map +1 -0
- package/dist/chunks/command-palette-fe5cjfdgsg3t17vq.js +403 -0
- package/dist/chunks/command-palette-fe5cjfdgsg3t17vq.js.map +1 -0
- package/dist/chunks/core-oowp00biqxe3hvjc.js +5806 -0
- package/dist/chunks/core-oowp00biqxe3hvjc.js.map +1 -0
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js +8 -0
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js.map +1 -0
- package/dist/chunks/date-picker-81mc3zrsmobm3ydm.js +2921 -0
- package/dist/chunks/date-picker-81mc3zrsmobm3ydm.js.map +1 -0
- package/dist/chunks/date-range-picker-c8ttrfaos9mb1w5n.js +408 -0
- package/dist/chunks/date-range-picker-c8ttrfaos9mb1w5n.js.map +1 -0
- package/dist/chunks/dialog-m4go8xof25fospqo.js +134 -0
- package/dist/chunks/dialog-m4go8xof25fospqo.js.map +1 -0
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js +8 -0
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js.map +1 -0
- package/dist/chunks/dropdown-j5uht8mn4z7xc9fc.js +313 -0
- package/dist/chunks/dropdown-j5uht8mn4z7xc9fc.js.map +1 -0
- package/dist/chunks/empty-kazxr0248zjemw6n.js +94 -0
- package/dist/chunks/empty-kazxr0248zjemw6n.js.map +1 -0
- package/dist/chunks/engine-javascript-iqcmg6wi2pjun29k.js +2637 -0
- package/dist/chunks/engine-javascript-iqcmg6wi2pjun29k.js.map +1 -0
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js +295 -0
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js.map +1 -0
- package/dist/chunks/field-fe5m8z3vbpvtctbe.js +77 -0
- package/dist/chunks/field-fe5m8z3vbpvtctbe.js.map +1 -0
- package/dist/chunks/github-light-ulev8flhimfg79ob.js +6 -0
- package/dist/chunks/github-light-ulev8flhimfg79ob.js.map +1 -0
- package/dist/chunks/graphql-ft2h47erta7isqn4.js +16 -0
- package/dist/chunks/graphql-ft2h47erta7isqn4.js.map +1 -0
- package/dist/chunks/grid-enlbb88vucgeq1np.js +128 -0
- package/dist/chunks/grid-enlbb88vucgeq1np.js.map +1 -0
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js +8 -0
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js.map +1 -0
- package/dist/chunks/html-kl304jmqj4jxj777.js +12 -0
- package/dist/chunks/html-kl304jmqj4jxj777.js.map +1 -0
- package/dist/chunks/input-area-ciw85g3fno06t4tw.js +78 -0
- package/dist/chunks/input-area-ciw85g3fno06t4tw.js.map +1 -0
- package/dist/chunks/input-group-mo7tq7jr19hmgor5.js +505 -0
- package/dist/chunks/input-group-mo7tq7jr19hmgor5.js.map +1 -0
- package/dist/chunks/input-i5nefqk213n4z7pr.js +130 -0
- package/dist/chunks/input-i5nefqk213n4z7pr.js.map +1 -0
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js +8 -0
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js.map +1 -0
- package/dist/chunks/json-jovp9qemdkp5cziz.js +8 -0
- package/dist/chunks/json-jovp9qemdkp5cziz.js.map +1 -0
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js +8 -0
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js.map +1 -0
- package/dist/chunks/jsx-ij885l2li2lzfoss.js +8 -0
- package/dist/chunks/jsx-ij885l2li2lzfoss.js.map +1 -0
- package/dist/chunks/label-fcho4757rbdess0c.js +68 -0
- package/dist/chunks/label-fcho4757rbdess0c.js.map +1 -0
- package/dist/chunks/layer-card-kzu48dhzxm3e9p4u.js +47 -0
- package/dist/chunks/layer-card-kzu48dhzxm3e9p4u.js.map +1 -0
- package/dist/chunks/link-j2gu5dr3nr4i4yf0.js +95 -0
- package/dist/chunks/link-j2gu5dr3nr4i4yf0.js.map +1 -0
- package/dist/chunks/link-provider-bgljdgs4hs438h0u.js +22 -0
- package/dist/chunks/link-provider-bgljdgs4hs438h0u.js.map +1 -0
- package/dist/chunks/loader-cxzp72mn53lzbv9c.js +109 -0
- package/dist/chunks/loader-cxzp72mn53lzbv9c.js.map +1 -0
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js +8 -0
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js.map +1 -0
- package/dist/chunks/menubar-ir5gbjmsizsddz7g.js +98 -0
- package/dist/chunks/menubar-ir5gbjmsizsddz7g.js.map +1 -0
- package/dist/chunks/meter-o5yd7ctjf80vvyjx.js +51 -0
- package/dist/chunks/meter-o5yd7ctjf80vvyjx.js.map +1 -0
- package/dist/chunks/pagination-bryw6rohfr7mm3km.js +266 -0
- package/dist/chunks/pagination-bryw6rohfr7mm3km.js.map +1 -0
- package/dist/chunks/popover-elxcmvv7mu7m7uk4.js +181 -0
- package/dist/chunks/popover-elxcmvv7mu7m7uk4.js.map +1 -0
- package/dist/chunks/portal-provider-off76og7tjyz96ys.js +18 -0
- package/dist/chunks/portal-provider-off76og7tjyz96ys.js.map +1 -0
- package/dist/chunks/python-gg755pb8oe9ra1d1.js +8 -0
- package/dist/chunks/python-gg755pb8oe9ra1d1.js.map +1 -0
- package/dist/chunks/radio-newyq331uk4lltr6.js +226 -0
- package/dist/chunks/radio-newyq331uk4lltr6.js.map +1 -0
- package/dist/chunks/resolve-variant-t8jcltsizeg29ege.js +11 -0
- package/dist/chunks/resolve-variant-t8jcltsizeg29ege.js.map +1 -0
- package/dist/chunks/select-h5480mbro0ypxu0b.js +237 -0
- package/dist/chunks/select-h5480mbro0ypxu0b.js.map +1 -0
- package/dist/chunks/sensitive-input-lqugq6uvx0lkpu0u.js +273 -0
- package/dist/chunks/sensitive-input-lqugq6uvx0lkpu0u.js.map +1 -0
- package/dist/chunks/sidebar-noz668nhdu2gso12.js +1144 -0
- package/dist/chunks/sidebar-noz668nhdu2gso12.js.map +1 -0
- package/dist/chunks/skeleton-line-epxenksfesr2fkcv.js +33 -0
- package/dist/chunks/skeleton-line-epxenksfesr2fkcv.js.map +1 -0
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js +8 -0
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js.map +1 -0
- package/dist/chunks/surface-cyxme7mlr49l33f8.js +29 -0
- package/dist/chunks/surface-cyxme7mlr49l33f8.js.map +1 -0
- package/dist/chunks/switch-bigo96fyjlh7ivbi.js +256 -0
- package/dist/chunks/switch-bigo96fyjlh7ivbi.js.map +1 -0
- package/dist/chunks/table-mwcmwp6a80zvyrxw.js +208 -0
- package/dist/chunks/table-mwcmwp6a80zvyrxw.js.map +1 -0
- package/dist/chunks/table-of-contents-gkuvkr2w6lbhi7wt.js +106 -0
- package/dist/chunks/table-of-contents-gkuvkr2w6lbhi7wt.js.map +1 -0
- package/dist/chunks/tabs-e4pcjkw94kpe35x0.js +177 -0
- package/dist/chunks/tabs-e4pcjkw94kpe35x0.js.map +1 -0
- package/dist/chunks/text-oxsrbmjmfq99ue85.js +103 -0
- package/dist/chunks/text-oxsrbmjmfq99ue85.js.map +1 -0
- package/dist/chunks/toast-ivr4097bstjcjotf.js +370 -0
- package/dist/chunks/toast-ivr4097bstjcjotf.js.map +1 -0
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js +8 -0
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js.map +1 -0
- package/dist/chunks/tooltip-ncaia8n1lavkyw8n.js +103 -0
- package/dist/chunks/tooltip-ncaia8n1lavkyw8n.js.map +1 -0
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js +8 -0
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js.map +1 -0
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js +8 -0
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js.map +1 -0
- package/dist/chunks/vendor-base-ui-bgl9g5nkvqy3tn36.js +24690 -0
- package/dist/chunks/vendor-base-ui-bgl9g5nkvqy3tn36.js.map +1 -0
- package/dist/chunks/vendor-floating-ui-dn8xswn8036udsqq.js +1311 -0
- package/dist/chunks/vendor-floating-ui-dn8xswn8036udsqq.js.map +1 -0
- package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js +2775 -0
- package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js.map +1 -0
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js +217 -0
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js.map +1 -0
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js +6 -0
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js.map +1 -0
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js +9 -0
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js.map +1 -0
- package/dist/chunks/yaml-e2v22lr79tss2brj.js +8 -0
- package/dist/chunks/yaml-e2v22lr79tss2brj.js.map +1 -0
- package/dist/code/server.js +88 -0
- package/dist/code/server.js.map +1 -0
- package/dist/code.js +256 -0
- package/dist/code.js.map +1 -0
- package/dist/command-line/cli.js +850 -0
- package/dist/command-line/commands/add.js +282 -0
- package/dist/command-line/commands/ai.js +22 -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/components/autocomplete.js +9 -0
- package/dist/components/autocomplete.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/chart.js +10 -0
- package/dist/components/chart.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/cloudflare-logo.js +10 -0
- package/dist/components/cloudflare-logo.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-picker.js +6 -0
- package/dist/components/date-picker.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 +10 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/flow.js +5831 -0
- package/dist/components/flow.js.map +1 -0
- package/dist/components/grid.js +11 -0
- package/dist/components/grid.js.map +1 -0
- package/dist/components/input-group.js +8 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.js +14 -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/sidebar.js +34 -0
- package/dist/components/sidebar.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-of-contents.js +8 -0
- package/dist/components/table-of-contents.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 +11 -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/index.js +344 -0
- package/dist/index.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/csp-provider.js +6 -0
- package/dist/primitives/csp-provider.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/drawer.js +6 -0
- package/dist/primitives/drawer.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/otp-field.js +6 -0
- package/dist/primitives/otp-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 +46 -0
- package/dist/primitives.js.map +1 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/scripts/theme-generator/config.d.ts +6 -0
- package/dist/scripts/theme-generator/config.d.ts.map +1 -0
- package/dist/scripts/theme-generator/config.js +629 -0
- package/dist/scripts/theme-generator/config.js.map +1 -0
- package/dist/scripts/theme-generator/generate-css.d.ts +31 -0
- package/dist/scripts/theme-generator/generate-css.d.ts.map +1 -0
- package/dist/scripts/theme-generator/index.d.ts +13 -0
- package/dist/scripts/theme-generator/index.d.ts.map +1 -0
- package/dist/scripts/theme-generator/migrate.d.ts +56 -0
- package/dist/scripts/theme-generator/migrate.d.ts.map +1 -0
- package/dist/scripts/theme-generator/types.d.ts +82 -0
- package/dist/scripts/theme-generator/types.d.ts.map +1 -0
- package/dist/scripts/theme-generator/types.js +2 -0
- package/dist/scripts/theme-generator/types.js.map +1 -0
- package/dist/src/blocks/delete-resource/delete-resource.d.ts +46 -0
- package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +1 -0
- package/dist/src/blocks/delete-resource/index.d.ts +2 -0
- package/dist/src/blocks/delete-resource/index.d.ts.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/code/code-highlighted.d.ts +32 -0
- package/dist/src/code/code-highlighted.d.ts.map +1 -0
- package/dist/src/code/context.d.ts +16 -0
- package/dist/src/code/context.d.ts.map +1 -0
- package/dist/src/code/index.d.ts +32 -0
- package/dist/src/code/index.d.ts.map +1 -0
- package/dist/src/code/provider.d.ts +13 -0
- package/dist/src/code/provider.d.ts.map +1 -0
- package/dist/src/code/server.d.ts +95 -0
- package/dist/src/code/server.d.ts.map +1 -0
- package/dist/src/code/types.d.ts +130 -0
- package/dist/src/code/types.d.ts.map +1 -0
- package/dist/src/code/use-shiki-highlighter.d.ts +36 -0
- package/dist/src/code/use-shiki-highlighter.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/ai.d.ts +10 -0
- package/dist/src/command-line/commands/ai.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 +21 -0
- package/dist/src/command-line/utils/transformer.d.ts.map +1 -0
- package/dist/src/components/autocomplete/autocomplete.d.ts +181 -0
- package/dist/src/components/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/src/components/autocomplete/index.d.ts +3 -0
- package/dist/src/components/autocomplete/index.d.ts.map +1 -0
- package/dist/src/components/badge/badge.d.ts +180 -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 +106 -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 +78 -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 +214 -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/chart/Color.d.ts +91 -0
- package/dist/src/components/chart/Color.d.ts.map +1 -0
- package/dist/src/components/chart/EChart.d.ts +159 -0
- package/dist/src/components/chart/EChart.d.ts.map +1 -0
- package/dist/src/components/chart/Legend.d.ts +51 -0
- package/dist/src/components/chart/Legend.d.ts.map +1 -0
- package/dist/src/components/chart/SankeyChart.d.ts +98 -0
- package/dist/src/components/chart/SankeyChart.d.ts.map +1 -0
- package/dist/src/components/chart/TimeseriesChart.d.ts +181 -0
- package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -0
- package/dist/src/components/chart/index.d.ts +6 -0
- package/dist/src/components/chart/index.d.ts.map +1 -0
- package/dist/src/components/checkbox/checkbox.d.ts +197 -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 +88 -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/cloudflare-logo/cloudflare-logo.d.ts +133 -0
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +1 -0
- package/dist/src/components/cloudflare-logo/index.d.ts +2 -0
- package/dist/src/components/cloudflare-logo/index.d.ts.map +1 -0
- package/dist/src/components/code/code.d.ts +189 -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 +109 -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 +246 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -0
- package/dist/src/components/combobox/index.d.ts +3 -0
- package/dist/src/components/combobox/index.d.ts.map +1 -0
- package/dist/src/components/command-palette/command-palette.d.ts +258 -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 +168 -0
- package/dist/src/components/command-palette/types.d.ts.map +1 -0
- package/dist/src/components/date-picker/date-picker.d.ts +65 -0
- package/dist/src/components/date-picker/date-picker.d.ts.map +1 -0
- package/dist/src/components/date-picker/index.d.ts +4 -0
- package/dist/src/components/date-picker/index.d.ts.map +1 -0
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +125 -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 +5 -0
- package/dist/src/components/date-range-picker/index.d.ts.map +1 -0
- package/dist/src/components/dialog/dialog.d.ts +242 -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 +116 -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 +69 -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 +89 -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/flow/connectors.d.ts +41 -0
- package/dist/src/components/flow/connectors.d.ts.map +1 -0
- package/dist/src/components/flow/diagram.d.ts +96 -0
- package/dist/src/components/flow/diagram.d.ts.map +1 -0
- package/dist/src/components/flow/index.d.ts +26 -0
- package/dist/src/components/flow/index.d.ts.map +1 -0
- package/dist/src/components/flow/node.d.ts +61 -0
- package/dist/src/components/flow/node.d.ts.map +1 -0
- package/dist/src/components/flow/parallel.d.ts +13 -0
- package/dist/src/components/flow/parallel.d.ts.map +1 -0
- package/dist/src/components/flow/use-children.d.ts +87 -0
- package/dist/src/components/flow/use-children.d.ts.map +1 -0
- package/dist/src/components/grid/grid.d.ts +135 -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 +19 -0
- package/dist/src/components/input/index.d.ts.map +1 -0
- package/dist/src/components/input/input-area.d.ts +65 -0
- package/dist/src/components/input/input-area.d.ts.map +1 -0
- package/dist/src/components/input/input.d.ts +175 -0
- package/dist/src/components/input/input.d.ts.map +1 -0
- package/dist/src/components/input-group/context.d.ts +96 -0
- package/dist/src/components/input-group/context.d.ts.map +1 -0
- package/dist/src/components/input-group/index.d.ts +2 -0
- package/dist/src/components/input-group/index.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-addon.d.ts +15 -0
- package/dist/src/components/input-group/input-group-addon.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-button.d.ts +36 -0
- package/dist/src/components/input-group/input-group-button.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-input.d.ts +9 -0
- package/dist/src/components/input-group/input-group-input.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group-suffix.d.ts +13 -0
- package/dist/src/components/input-group/input-group-suffix.d.ts.map +1 -0
- package/dist/src/components/input-group/input-group.d.ts +43 -0
- package/dist/src/components/input-group/input-group.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 +67 -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 +60 -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 +66 -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 +70 -0
- package/dist/src/components/loader/loader.d.ts.map +1 -0
- package/dist/src/components/loader/skeleton-line.d.ts +11 -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 +66 -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 +44 -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 +241 -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 +178 -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 +277 -0
- package/dist/src/components/radio/radio.d.ts.map +1 -0
- package/dist/src/components/radio/radio.type-spec.d.ts +12 -0
- package/dist/src/components/radio/radio.type-spec.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 +288 -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 +94 -0
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -0
- package/dist/src/components/sidebar/index.d.ts +2 -0
- package/dist/src/components/sidebar/index.d.ts.map +1 -0
- package/dist/src/components/sidebar/sidebar.d.ts +581 -0
- package/dist/src/components/sidebar/sidebar.d.ts.map +1 -0
- package/dist/src/components/surface/index.d.ts +5 -0
- package/dist/src/components/surface/index.d.ts.map +1 -0
- package/dist/src/components/surface/surface.d.ts +64 -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 +197 -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 +138 -0
- package/dist/src/components/table/table.d.ts.map +1 -0
- package/dist/src/components/table-of-contents/index.d.ts +2 -0
- package/dist/src/components/table-of-contents/index.d.ts.map +1 -0
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +72 -0
- package/dist/src/components/table-of-contents/table-of-contents.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 +116 -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 +214 -0
- package/dist/src/components/text/text.d.ts.map +1 -0
- package/dist/src/components/text/text.type-spec.d.ts +44 -0
- package/dist/src/components/text/text.type-spec.d.ts.map +1 -0
- package/dist/src/components/toast/index.d.ts +5 -0
- package/dist/src/components/toast/index.d.ts.map +1 -0
- package/dist/src/components/toast/toast.d.ts +197 -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 +108 -0
- package/dist/src/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/src/index.d.ts +84 -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/csp-provider.d.ts +13 -0
- package/dist/src/primitives/csp-provider.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/drawer.d.ts +13 -0
- package/dist/src/primitives/drawer.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 +55 -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/otp-field.d.ts +13 -0
- package/dist/src/primitives/otp-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 +4 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/link-provider.d.ts +66 -0
- package/dist/src/utils/link-provider.d.ts.map +1 -0
- package/dist/src/utils/portal-provider.d.ts +56 -0
- package/dist/src/utils/portal-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/src/utils/resolve-variant.d.ts +27 -0
- package/dist/src/utils/resolve-variant.d.ts.map +1 -0
- package/dist/styles/reki-binding.css +303 -0
- package/dist/styles/reki-standalone.css +2 -0
- package/dist/styles/reki.css +700 -0
- package/dist/styles/theme-fedramp.css +39 -0
- package/dist/styles/theme-reki.css +412 -0
- package/dist/utils.js +12 -0
- package/dist/utils.js.map +1 -0
- package/package.json +511 -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 +987 -0
- package/scripts/component-registry/index.ts +970 -0
- package/scripts/component-registry/markdown-generator.ts +222 -0
- package/scripts/component-registry/metadata.ts +956 -0
- package/scripts/component-registry/props-filter.ts +310 -0
- package/scripts/component-registry/schema-generator.ts +331 -0
- package/scripts/component-registry/sub-components.ts +380 -0
- package/scripts/component-registry/types.ts +158 -0
- package/scripts/component-registry/utils.ts +280 -0
- package/scripts/component-registry/variant-parser.ts +261 -0
- package/scripts/css-build.ts +105 -0
- package/scripts/generate-primitives.ts +183 -0
- package/scripts/theme-generator/config.ts +653 -0
- package/scripts/theme-generator/generate-css.test.ts +30 -0
- package/scripts/theme-generator/generate-css.ts +351 -0
- package/scripts/theme-generator/index.ts +159 -0
- package/scripts/theme-generator/migrate.ts +560 -0
- package/scripts/theme-generator/types.ts +92 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props filtering for component registry generation.
|
|
3
|
+
*
|
|
4
|
+
* Filters out inherited DOM/React props to keep documentation focused
|
|
5
|
+
* on component-specific props.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as ts from "typescript";
|
|
9
|
+
import { join, dirname } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
11
|
+
import type { CLIFlags } from "./types.js";
|
|
12
|
+
|
|
13
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const rootDir = join(__dirname, "../..");
|
|
15
|
+
|
|
16
|
+
// =============================================================================
|
|
17
|
+
// Props Filter Constants
|
|
18
|
+
// =============================================================================
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Props to always skip - these are internal React props or rarely useful for LLMs
|
|
22
|
+
*/
|
|
23
|
+
export const ALWAYS_SKIP_PROPS = new Set([
|
|
24
|
+
"key",
|
|
25
|
+
"ref",
|
|
26
|
+
"style",
|
|
27
|
+
"dangerouslySetInnerHTML",
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Prefixes for props that should be skipped (DOM event handlers, ARIA, data attributes)
|
|
32
|
+
*/
|
|
33
|
+
export const SKIP_PROP_PREFIXES = [
|
|
34
|
+
"aria-",
|
|
35
|
+
"data-",
|
|
36
|
+
"on", // Event handlers: onClick, onMouseDown, onKeyUp, etc.
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Props that should be kept even if they appear in inherited HTML types.
|
|
41
|
+
* These are commonly used and meaningful for component APIs.
|
|
42
|
+
*/
|
|
43
|
+
export const KEEP_PROPS = new Set([
|
|
44
|
+
"children",
|
|
45
|
+
"className",
|
|
46
|
+
"disabled",
|
|
47
|
+
"name",
|
|
48
|
+
"value",
|
|
49
|
+
"checked",
|
|
50
|
+
"required",
|
|
51
|
+
"placeholder",
|
|
52
|
+
"readOnly",
|
|
53
|
+
"type",
|
|
54
|
+
"label", // Common form field prop
|
|
55
|
+
"href", // Common link prop for navigation components
|
|
56
|
+
"lang", // Code component uses lang for syntax highlighting
|
|
57
|
+
]);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* React interface names that define inherited HTML props.
|
|
61
|
+
* Props from these interfaces are filtered out to keep docs focused on component-specific props.
|
|
62
|
+
*/
|
|
63
|
+
export const REACT_HTML_INTERFACES = [
|
|
64
|
+
"HTMLAttributes",
|
|
65
|
+
"InputHTMLAttributes",
|
|
66
|
+
"ButtonHTMLAttributes",
|
|
67
|
+
"AnchorHTMLAttributes",
|
|
68
|
+
"FormHTMLAttributes",
|
|
69
|
+
"TextareaHTMLAttributes",
|
|
70
|
+
"SelectHTMLAttributes",
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Minimal static list of common HTML props to skip (when --inherited-props is not set).
|
|
75
|
+
* This replaces the expensive deriveInheritedHtmlProps() by default.
|
|
76
|
+
*/
|
|
77
|
+
export const MINIMAL_SKIP_PROPS = new Set([
|
|
78
|
+
// Common HTML attributes we don't want to document
|
|
79
|
+
"accessKey",
|
|
80
|
+
"autoCapitalize",
|
|
81
|
+
"autoFocus",
|
|
82
|
+
"contentEditable",
|
|
83
|
+
"dir",
|
|
84
|
+
"draggable",
|
|
85
|
+
"hidden",
|
|
86
|
+
"spellCheck",
|
|
87
|
+
"tabIndex",
|
|
88
|
+
"translate",
|
|
89
|
+
// Form-specific attributes
|
|
90
|
+
"autocomplete",
|
|
91
|
+
"autofocus",
|
|
92
|
+
"form",
|
|
93
|
+
"formAction",
|
|
94
|
+
"formEncType",
|
|
95
|
+
"formMethod",
|
|
96
|
+
"formNoValidate",
|
|
97
|
+
"formTarget",
|
|
98
|
+
"max",
|
|
99
|
+
"maxLength",
|
|
100
|
+
"min",
|
|
101
|
+
"minLength",
|
|
102
|
+
"multiple",
|
|
103
|
+
"pattern",
|
|
104
|
+
"step",
|
|
105
|
+
// Media attributes
|
|
106
|
+
"accept",
|
|
107
|
+
"capture",
|
|
108
|
+
"crossOrigin",
|
|
109
|
+
"loop",
|
|
110
|
+
"muted",
|
|
111
|
+
"preload",
|
|
112
|
+
"poster",
|
|
113
|
+
"src",
|
|
114
|
+
"srcSet",
|
|
115
|
+
// React internal props
|
|
116
|
+
"suppressContentEditableWarning",
|
|
117
|
+
"suppressHydrationWarning",
|
|
118
|
+
"defaultChecked",
|
|
119
|
+
"defaultValue",
|
|
120
|
+
// RDFa attributes (semantic web metadata - not useful for component docs)
|
|
121
|
+
"about",
|
|
122
|
+
"content",
|
|
123
|
+
"datatype",
|
|
124
|
+
"inlist",
|
|
125
|
+
"prefix",
|
|
126
|
+
"property",
|
|
127
|
+
"rel",
|
|
128
|
+
"resource",
|
|
129
|
+
"rev",
|
|
130
|
+
"typeof",
|
|
131
|
+
"vocab",
|
|
132
|
+
// Microdata attributes (HTML5 semantic markup - not useful for component docs)
|
|
133
|
+
"itemID",
|
|
134
|
+
"itemProp",
|
|
135
|
+
"itemRef",
|
|
136
|
+
"itemScope",
|
|
137
|
+
"itemType",
|
|
138
|
+
// Deprecated/obscure HTML attributes
|
|
139
|
+
"autoCorrect",
|
|
140
|
+
"autoSave",
|
|
141
|
+
"color",
|
|
142
|
+
"results",
|
|
143
|
+
"security",
|
|
144
|
+
"unselectable",
|
|
145
|
+
// Popover API attributes (rarely used directly)
|
|
146
|
+
"popover",
|
|
147
|
+
"popoverTarget",
|
|
148
|
+
"popoverTargetAction",
|
|
149
|
+
// Web Components attributes
|
|
150
|
+
"is",
|
|
151
|
+
"slot",
|
|
152
|
+
"part",
|
|
153
|
+
"exportparts",
|
|
154
|
+
// Other rarely-used HTML attributes
|
|
155
|
+
"contextMenu",
|
|
156
|
+
"enterKeyHint",
|
|
157
|
+
"inputMode",
|
|
158
|
+
"inert",
|
|
159
|
+
"nonce",
|
|
160
|
+
"radioGroup",
|
|
161
|
+
"role",
|
|
162
|
+
]);
|
|
163
|
+
|
|
164
|
+
// =============================================================================
|
|
165
|
+
// Inherited Props Derivation (expensive, only used with --inherited-props)
|
|
166
|
+
// =============================================================================
|
|
167
|
+
|
|
168
|
+
// Lazily computed inherited HTML props (derived from React types at runtime)
|
|
169
|
+
let _inheritedHtmlProps: Set<string> | null = null;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* OPTIMIZATION: Derive inherited HTML props from React's type definitions.
|
|
173
|
+
* This is EXPENSIVE (~15s / 47% of total time) and NOT NEEDED for most use cases.
|
|
174
|
+
* Only enabled with --inherited-props CLI flag.
|
|
175
|
+
*
|
|
176
|
+
* Extracts property names from HTMLAttributes, InputHTMLAttributes, ButtonHTMLAttributes, etc.
|
|
177
|
+
* These are filtered out to keep component docs focused on component-specific props.
|
|
178
|
+
*/
|
|
179
|
+
export function deriveInheritedHtmlProps(): Set<string> {
|
|
180
|
+
const inheritedProps = new Set<string>();
|
|
181
|
+
|
|
182
|
+
try {
|
|
183
|
+
// Read tsconfig to get compiler options
|
|
184
|
+
const configPath = join(rootDir, "tsconfig.json");
|
|
185
|
+
const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
186
|
+
const parsedConfig = ts.parseJsonConfigFileContent(
|
|
187
|
+
configFile.config,
|
|
188
|
+
ts.sys,
|
|
189
|
+
rootDir,
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
// Create a program to access React's type definitions
|
|
193
|
+
const program = ts.createProgram({
|
|
194
|
+
rootNames: parsedConfig.fileNames,
|
|
195
|
+
options: parsedConfig.options,
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// Find React's type definition file
|
|
199
|
+
const reactDts = program
|
|
200
|
+
.getSourceFiles()
|
|
201
|
+
.find((sf) =>
|
|
202
|
+
sf.fileName.includes("node_modules/@types/react/index.d.ts"),
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
if (!reactDts) {
|
|
206
|
+
throw new Error("Could not find React type definitions");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Walk the AST to find the HTML attribute interfaces
|
|
210
|
+
ts.forEachChild(reactDts, function visit(node) {
|
|
211
|
+
if (ts.isInterfaceDeclaration(node)) {
|
|
212
|
+
const name = node.name.text;
|
|
213
|
+
if (REACT_HTML_INTERFACES.includes(name)) {
|
|
214
|
+
// Extract property names from this interface
|
|
215
|
+
for (const member of node.members) {
|
|
216
|
+
if (ts.isPropertySignature(member) && member.name) {
|
|
217
|
+
const propName = member.name.getText(reactDts);
|
|
218
|
+
inheritedProps.add(propName);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
ts.forEachChild(node, visit);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
console.log(
|
|
227
|
+
`Derived ${inheritedProps.size} inherited HTML props from React types`,
|
|
228
|
+
);
|
|
229
|
+
} catch (error) {
|
|
230
|
+
console.warn(
|
|
231
|
+
"Warning: Could not derive HTML props from React types, using fallback list",
|
|
232
|
+
);
|
|
233
|
+
console.warn(error instanceof Error ? error.message : error);
|
|
234
|
+
|
|
235
|
+
// Fallback to a minimal set if derivation fails
|
|
236
|
+
const fallbackProps = [
|
|
237
|
+
"accessKey",
|
|
238
|
+
"autoCapitalize",
|
|
239
|
+
"autoFocus",
|
|
240
|
+
"contentEditable",
|
|
241
|
+
"dir",
|
|
242
|
+
"draggable",
|
|
243
|
+
"hidden",
|
|
244
|
+
"lang",
|
|
245
|
+
"spellCheck",
|
|
246
|
+
"tabIndex",
|
|
247
|
+
"title",
|
|
248
|
+
"translate",
|
|
249
|
+
"className",
|
|
250
|
+
"id",
|
|
251
|
+
"style",
|
|
252
|
+
"children",
|
|
253
|
+
];
|
|
254
|
+
for (const prop of fallbackProps) {
|
|
255
|
+
inheritedProps.add(prop);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return inheritedProps;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Get the set of inherited HTML props to skip.
|
|
264
|
+
* Uses minimal static list by default, or derives from React types with --inherited-props flag.
|
|
265
|
+
*/
|
|
266
|
+
export function getInheritedHtmlProps(cliFlags: CLIFlags): Set<string> {
|
|
267
|
+
if (!cliFlags.includeInheritedProps) {
|
|
268
|
+
// Use minimal static list instead of expensive derivation
|
|
269
|
+
return MINIMAL_SKIP_PROPS;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (!_inheritedHtmlProps) {
|
|
273
|
+
_inheritedHtmlProps = deriveInheritedHtmlProps();
|
|
274
|
+
}
|
|
275
|
+
return _inheritedHtmlProps;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// =============================================================================
|
|
279
|
+
// Main Filter Function
|
|
280
|
+
// =============================================================================
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Determine if a prop should be skipped from the generated documentation.
|
|
284
|
+
* Filters out inherited DOM props, event handlers, and internal React props.
|
|
285
|
+
*/
|
|
286
|
+
export function shouldSkipProp(propName: string, cliFlags: CLIFlags): boolean {
|
|
287
|
+
// Never skip props in the keep list
|
|
288
|
+
if (KEEP_PROPS.has(propName)) {
|
|
289
|
+
return false;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Always skip certain props
|
|
293
|
+
if (ALWAYS_SKIP_PROPS.has(propName)) {
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Skip props with certain prefixes
|
|
298
|
+
for (const prefix of SKIP_PROP_PREFIXES) {
|
|
299
|
+
if (propName.startsWith(prefix)) {
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Skip inherited HTML attributes (derived from React types)
|
|
305
|
+
if (getInheritedHtmlProps(cliFlags).has(propName)) {
|
|
306
|
+
return true;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod Schema Generator for Reki Component Registry
|
|
3
|
+
*
|
|
4
|
+
* Generates TypeScript file with Zod schemas from component-registry.json.
|
|
5
|
+
* This enables runtime validation of AI-generated UI trees.
|
|
6
|
+
*
|
|
7
|
+
* Output: catalog/schemas.ts
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type {
|
|
11
|
+
ComponentRegistry,
|
|
12
|
+
ComponentSchema,
|
|
13
|
+
PropSchema,
|
|
14
|
+
} from "./types.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Convert a PropSchema type to its Zod equivalent
|
|
18
|
+
*/
|
|
19
|
+
function propTypeToZod(prop: PropSchema): string {
|
|
20
|
+
const { type, values, required, optional } = prop;
|
|
21
|
+
|
|
22
|
+
let zodType: string;
|
|
23
|
+
|
|
24
|
+
// Handle enum types with explicit values
|
|
25
|
+
if (type === "enum" && values && values.length > 0) {
|
|
26
|
+
const enumValues = values.map((v) => `"${v}"`).join(", ");
|
|
27
|
+
zodType = `z.enum([${enumValues}])`;
|
|
28
|
+
}
|
|
29
|
+
// Handle common types
|
|
30
|
+
else if (type === "string") {
|
|
31
|
+
zodType = "z.string()";
|
|
32
|
+
} else if (type === "number") {
|
|
33
|
+
zodType = "z.number()";
|
|
34
|
+
} else if (type === "boolean") {
|
|
35
|
+
zodType = "z.boolean()";
|
|
36
|
+
} else if (type === "ReactNode") {
|
|
37
|
+
// ReactNode can be string, number, boolean, null, or a dynamic path reference
|
|
38
|
+
zodType =
|
|
39
|
+
"z.union([z.string(), z.number(), z.boolean(), z.null(), DynamicValueSchema])";
|
|
40
|
+
} else if (type.endsWith("[]")) {
|
|
41
|
+
// Array types
|
|
42
|
+
const itemType = type.slice(0, -2);
|
|
43
|
+
const itemZod = itemType === "string" ? "z.string()" : "z.unknown()";
|
|
44
|
+
zodType = `z.array(${itemZod})`;
|
|
45
|
+
} else if (type.includes("|")) {
|
|
46
|
+
// Union types - simplified handling
|
|
47
|
+
zodType = "z.unknown()";
|
|
48
|
+
} else {
|
|
49
|
+
// Fallback for complex types
|
|
50
|
+
zodType = "z.unknown()";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Make optional if not required
|
|
54
|
+
if (optional || !required) {
|
|
55
|
+
zodType = `${zodType}.optional()`;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return zodType;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Generate Zod schema for a single component's props
|
|
63
|
+
*/
|
|
64
|
+
function generateComponentPropsSchema(
|
|
65
|
+
componentName: string,
|
|
66
|
+
schema: ComponentSchema,
|
|
67
|
+
): string {
|
|
68
|
+
const propsEntries = Object.entries(schema.props);
|
|
69
|
+
|
|
70
|
+
if (propsEntries.length === 0) {
|
|
71
|
+
return `export const ${componentName}PropsSchema = z.object({});`;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const propsLines = propsEntries.map(([propName, propSchema]) => {
|
|
75
|
+
const zodType = propTypeToZod(propSchema);
|
|
76
|
+
// Replace newlines with spaces to keep comments on a single line
|
|
77
|
+
const sanitizedDescription = propSchema.description
|
|
78
|
+
?.replace(/\n+/g, " ")
|
|
79
|
+
.trim();
|
|
80
|
+
const comment = sanitizedDescription ? ` // ${sanitizedDescription}` : "";
|
|
81
|
+
return ` ${propName}: ${zodType},${comment}`;
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return `export const ${componentName}PropsSchema = z.object({
|
|
85
|
+
${propsLines.join("\n")}
|
|
86
|
+
});`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Generate the complete schemas.ts file content
|
|
91
|
+
*/
|
|
92
|
+
export function generateSchemasFile(registry: ComponentRegistry): string {
|
|
93
|
+
const componentNames = Object.keys(registry.components).sort();
|
|
94
|
+
|
|
95
|
+
const lines: string[] = [
|
|
96
|
+
"/**",
|
|
97
|
+
" * Auto-generated Zod schemas for Reki components",
|
|
98
|
+
" * DO NOT EDIT - Generated by scripts/component-registry/index.ts",
|
|
99
|
+
" *",
|
|
100
|
+
" * These schemas enable runtime validation of AI-generated UI trees.",
|
|
101
|
+
" */",
|
|
102
|
+
"",
|
|
103
|
+
'import { z } from "zod";',
|
|
104
|
+
"",
|
|
105
|
+
"// SafeParseReturnType was removed in Zod v4, but we still want stable typing.",
|
|
106
|
+
"export type SafeParseResult<T> =",
|
|
107
|
+
" | { success: true; data: T; error?: never }",
|
|
108
|
+
" | { success: false; error: z.ZodError<any>; data?: never };",
|
|
109
|
+
"",
|
|
110
|
+
"// =============================================================================",
|
|
111
|
+
"// Dynamic Value Schema (for data binding)",
|
|
112
|
+
"// =============================================================================",
|
|
113
|
+
"",
|
|
114
|
+
"/**",
|
|
115
|
+
" * A value that can either be a literal or a reference to the data model.",
|
|
116
|
+
' * Example: "Hello" or { path: "/user/name" }',
|
|
117
|
+
" */",
|
|
118
|
+
"export const DynamicValueSchema = z.union([",
|
|
119
|
+
" z.string(),",
|
|
120
|
+
" z.number(),",
|
|
121
|
+
" z.boolean(),",
|
|
122
|
+
" z.null(),",
|
|
123
|
+
" z.object({ path: z.string() }),",
|
|
124
|
+
"]);",
|
|
125
|
+
"",
|
|
126
|
+
"export type DynamicValue<T = unknown> = T | { path: string };",
|
|
127
|
+
"",
|
|
128
|
+
"// =============================================================================",
|
|
129
|
+
"// Visibility Condition Schemas",
|
|
130
|
+
"// =============================================================================",
|
|
131
|
+
"",
|
|
132
|
+
"/**",
|
|
133
|
+
" * Visibility conditions for conditional rendering.",
|
|
134
|
+
" * Components can be shown/hidden based on data, auth, or logic expressions.",
|
|
135
|
+
" */",
|
|
136
|
+
"",
|
|
137
|
+
"// Forward declaration for recursive types",
|
|
138
|
+
"// Note: Numeric comparisons use DynamicValue (not DynamicValue<number>) for Zod compatibility",
|
|
139
|
+
"export type LogicExpression =",
|
|
140
|
+
" | { and: LogicExpression[] }",
|
|
141
|
+
" | { or: LogicExpression[] }",
|
|
142
|
+
" | { not: LogicExpression }",
|
|
143
|
+
" | { path: string }",
|
|
144
|
+
" | { eq: [DynamicValue, DynamicValue] }",
|
|
145
|
+
" | { neq: [DynamicValue, DynamicValue] }",
|
|
146
|
+
" | { gt: [DynamicValue, DynamicValue] }",
|
|
147
|
+
" | { gte: [DynamicValue, DynamicValue] }",
|
|
148
|
+
" | { lt: [DynamicValue, DynamicValue] }",
|
|
149
|
+
" | { lte: [DynamicValue, DynamicValue] };",
|
|
150
|
+
"",
|
|
151
|
+
"// Lazy schema for recursive logic expressions",
|
|
152
|
+
"const LogicExpressionSchema: z.ZodType<LogicExpression> = z.lazy(() =>",
|
|
153
|
+
" z.union([",
|
|
154
|
+
" z.object({ and: z.array(LogicExpressionSchema) }),",
|
|
155
|
+
" z.object({ or: z.array(LogicExpressionSchema) }),",
|
|
156
|
+
" z.object({ not: LogicExpressionSchema }),",
|
|
157
|
+
" z.object({ path: z.string() }),",
|
|
158
|
+
" z.object({ eq: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
159
|
+
" z.object({ neq: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
160
|
+
" z.object({ gt: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
161
|
+
" z.object({ gte: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
162
|
+
" z.object({ lt: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
163
|
+
" z.object({ lte: z.tuple([DynamicValueSchema, DynamicValueSchema]) }),",
|
|
164
|
+
" ])",
|
|
165
|
+
");",
|
|
166
|
+
"",
|
|
167
|
+
"export const VisibilityConditionSchema = z.union([",
|
|
168
|
+
" z.boolean(),",
|
|
169
|
+
" z.object({ path: z.string() }),",
|
|
170
|
+
' z.object({ auth: z.enum(["signedIn", "signedOut"]) }),',
|
|
171
|
+
" LogicExpressionSchema,",
|
|
172
|
+
"]);",
|
|
173
|
+
"",
|
|
174
|
+
"export type VisibilityCondition = z.infer<typeof VisibilityConditionSchema>;",
|
|
175
|
+
"",
|
|
176
|
+
"// =============================================================================",
|
|
177
|
+
"// Action Schemas",
|
|
178
|
+
"// =============================================================================",
|
|
179
|
+
"",
|
|
180
|
+
"/**",
|
|
181
|
+
" * Action confirmation dialog configuration",
|
|
182
|
+
" */",
|
|
183
|
+
"export const ActionConfirmSchema = z.object({",
|
|
184
|
+
" title: z.string(),",
|
|
185
|
+
" message: z.string(),",
|
|
186
|
+
' variant: z.enum(["default", "danger"]).optional(),',
|
|
187
|
+
" confirmLabel: z.string().optional(),",
|
|
188
|
+
" cancelLabel: z.string().optional(),",
|
|
189
|
+
"});",
|
|
190
|
+
"",
|
|
191
|
+
"/**",
|
|
192
|
+
" * Action definition that AI can declare",
|
|
193
|
+
" */",
|
|
194
|
+
"export const ActionSchema = z.object({",
|
|
195
|
+
" name: z.string(),",
|
|
196
|
+
" params: z.record(z.string(), DynamicValueSchema).optional(),",
|
|
197
|
+
" confirm: ActionConfirmSchema.optional(),",
|
|
198
|
+
" onSuccess: z.object({ set: z.record(z.string(), DynamicValueSchema) }).optional(),",
|
|
199
|
+
" onError: z.object({ set: z.record(z.string(), DynamicValueSchema) }).optional(),",
|
|
200
|
+
"});",
|
|
201
|
+
"",
|
|
202
|
+
"export type Action = z.infer<typeof ActionSchema>;",
|
|
203
|
+
"",
|
|
204
|
+
"// =============================================================================",
|
|
205
|
+
"// Component Props Schemas",
|
|
206
|
+
"// =============================================================================",
|
|
207
|
+
"",
|
|
208
|
+
];
|
|
209
|
+
|
|
210
|
+
// Generate schema for each component
|
|
211
|
+
for (const name of componentNames) {
|
|
212
|
+
const schema = registry.components[name];
|
|
213
|
+
lines.push(generateComponentPropsSchema(name, schema));
|
|
214
|
+
lines.push("");
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Generate the component type union
|
|
218
|
+
lines.push(
|
|
219
|
+
"// =============================================================================",
|
|
220
|
+
);
|
|
221
|
+
lines.push("// Component Type Union");
|
|
222
|
+
lines.push(
|
|
223
|
+
"// =============================================================================",
|
|
224
|
+
);
|
|
225
|
+
lines.push("");
|
|
226
|
+
lines.push("/**");
|
|
227
|
+
lines.push(" * All valid component type names");
|
|
228
|
+
lines.push(" */");
|
|
229
|
+
const typeUnion = componentNames.map((n) => `"${n}"`).join(" | ");
|
|
230
|
+
lines.push(`export type RekiComponentType = ${typeUnion};`);
|
|
231
|
+
lines.push("");
|
|
232
|
+
lines.push("export const RekiComponentTypeSchema = z.enum([");
|
|
233
|
+
for (const name of componentNames) {
|
|
234
|
+
lines.push(` "${name}",`);
|
|
235
|
+
}
|
|
236
|
+
lines.push("]);");
|
|
237
|
+
lines.push("");
|
|
238
|
+
|
|
239
|
+
// Generate props schema map
|
|
240
|
+
lines.push("/**");
|
|
241
|
+
lines.push(" * Map of component type to its props schema");
|
|
242
|
+
lines.push(" */");
|
|
243
|
+
lines.push("export const ComponentPropsSchemas = {");
|
|
244
|
+
for (const name of componentNames) {
|
|
245
|
+
lines.push(` ${name}: ${name}PropsSchema,`);
|
|
246
|
+
}
|
|
247
|
+
lines.push("} as const;");
|
|
248
|
+
lines.push("");
|
|
249
|
+
|
|
250
|
+
// Generate UIElement schema
|
|
251
|
+
lines.push(
|
|
252
|
+
"// =============================================================================",
|
|
253
|
+
);
|
|
254
|
+
lines.push("// UI Element & Tree Schemas");
|
|
255
|
+
lines.push(
|
|
256
|
+
"// =============================================================================",
|
|
257
|
+
);
|
|
258
|
+
lines.push("");
|
|
259
|
+
lines.push("/**");
|
|
260
|
+
lines.push(" * Base UI element structure");
|
|
261
|
+
lines.push(" */");
|
|
262
|
+
lines.push("export const UIElementBaseSchema = z.object({");
|
|
263
|
+
lines.push(" key: z.string(),");
|
|
264
|
+
lines.push(" type: RekiComponentTypeSchema,");
|
|
265
|
+
lines.push(" props: z.record(z.string(), z.unknown()),");
|
|
266
|
+
lines.push(" children: z.array(z.string()).optional(),");
|
|
267
|
+
lines.push(" parentKey: z.string().nullable().optional(),");
|
|
268
|
+
lines.push(" visible: VisibilityConditionSchema.optional(),");
|
|
269
|
+
lines.push(" action: ActionSchema.optional(),");
|
|
270
|
+
lines.push("});");
|
|
271
|
+
lines.push("");
|
|
272
|
+
lines.push("export type UIElement = z.infer<typeof UIElementBaseSchema>;");
|
|
273
|
+
lines.push("");
|
|
274
|
+
lines.push("/**");
|
|
275
|
+
lines.push(" * Flat UI tree structure (optimized for LLM generation)");
|
|
276
|
+
lines.push(" */");
|
|
277
|
+
lines.push("export const UITreeSchema = z.object({");
|
|
278
|
+
lines.push(" root: z.string(),");
|
|
279
|
+
lines.push(" elements: z.record(z.string(), UIElementBaseSchema),");
|
|
280
|
+
lines.push("});");
|
|
281
|
+
lines.push("");
|
|
282
|
+
lines.push("export type UITree = z.infer<typeof UITreeSchema>;");
|
|
283
|
+
lines.push("");
|
|
284
|
+
|
|
285
|
+
// Generate validation helpers
|
|
286
|
+
lines.push(
|
|
287
|
+
"// =============================================================================",
|
|
288
|
+
);
|
|
289
|
+
lines.push("// Validation Helpers");
|
|
290
|
+
lines.push(
|
|
291
|
+
"// =============================================================================",
|
|
292
|
+
);
|
|
293
|
+
lines.push("");
|
|
294
|
+
lines.push("/**");
|
|
295
|
+
lines.push(" * Validate an element's props against its component schema");
|
|
296
|
+
lines.push(" */");
|
|
297
|
+
lines.push(
|
|
298
|
+
"export function validateElementProps(element: UIElement): SafeParseResult<unknown> {",
|
|
299
|
+
);
|
|
300
|
+
lines.push(
|
|
301
|
+
" const schema = ComponentPropsSchemas[element.type as keyof typeof ComponentPropsSchemas];",
|
|
302
|
+
);
|
|
303
|
+
lines.push(" if (!schema) {");
|
|
304
|
+
lines.push(
|
|
305
|
+
" return { success: false, error: new z.ZodError([{ code: 'custom', message: `Unknown component type: ${element.type}`, path: ['type'] }]) };",
|
|
306
|
+
);
|
|
307
|
+
lines.push(" }");
|
|
308
|
+
lines.push(" return schema.safeParse(element.props);");
|
|
309
|
+
lines.push("}");
|
|
310
|
+
lines.push("");
|
|
311
|
+
lines.push("/**");
|
|
312
|
+
lines.push(" * Validate a complete UI tree");
|
|
313
|
+
lines.push(" */");
|
|
314
|
+
lines.push(
|
|
315
|
+
"export function validateUITree(tree: unknown): SafeParseResult<UITree> {",
|
|
316
|
+
);
|
|
317
|
+
lines.push(" return UITreeSchema.safeParse(tree);");
|
|
318
|
+
lines.push("}");
|
|
319
|
+
lines.push("");
|
|
320
|
+
|
|
321
|
+
// Export component names for catalog generation
|
|
322
|
+
lines.push("/**");
|
|
323
|
+
lines.push(" * List of all component names (for catalog generation)");
|
|
324
|
+
lines.push(" */");
|
|
325
|
+
lines.push(
|
|
326
|
+
`export const REKI_COMPONENT_NAMES = [${componentNames.map((n) => `"${n}"`).join(", ")}] as const;`,
|
|
327
|
+
);
|
|
328
|
+
lines.push("");
|
|
329
|
+
|
|
330
|
+
return lines.join("\n");
|
|
331
|
+
}
|