@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,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime types for Reki 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 createRekiCatalog.
|
|
191
|
+
*/
|
|
192
|
+
export interface CatalogConfig {
|
|
193
|
+
/** Action definitions (optional) */
|
|
194
|
+
actions?: Record<string, ActionDefinition>;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Runtime catalog instance.
|
|
198
|
+
*/
|
|
199
|
+
export interface RekiCatalog {
|
|
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,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CodeHighlightedProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Syntax-highlighted code block powered by Shiki.
|
|
5
|
+
*
|
|
6
|
+
* Must be used within a ShikiProvider. While Shiki is loading,
|
|
7
|
+
* displays code as plain text (no layout shift, immediately readable).
|
|
8
|
+
*
|
|
9
|
+
* Uses hardcoded themes: `github-light` for light mode, `vesper` for dark mode.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { ShikiProvider, CodeHighlighted } from "@cloudraker/reki/code";
|
|
14
|
+
*
|
|
15
|
+
* <ShikiProvider
|
|
16
|
+
* engine="javascript"
|
|
17
|
+
* languages={['tsx', 'bash']}
|
|
18
|
+
* >
|
|
19
|
+
* <CodeHighlighted
|
|
20
|
+
* code={`const greeting = "Hello!";`}
|
|
21
|
+
* lang="tsx"
|
|
22
|
+
* showLineNumbers
|
|
23
|
+
* showCopyButton
|
|
24
|
+
* />
|
|
25
|
+
* </ShikiProvider>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function CodeHighlighted({ code, lang, showLineNumbers, highlightLines, showCopyButton, labels: labelOverrides, className, }: CodeHighlightedProps): React.JSX.Element;
|
|
29
|
+
export declare namespace CodeHighlighted {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=code-highlighted.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-highlighted.d.ts","sourceRoot":"","sources":["../../../src/code/code-highlighted.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,IAAI,EACJ,eAAuB,EACvB,cAAc,EACd,cAAsB,EACtB,MAAM,EAAE,cAAc,EACtB,SAAS,GACV,EAAE,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqI1C;yBA7Ie,eAAe"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HighlighterCore } from 'shiki/core';
|
|
2
|
+
import { SupportedLanguage, CodeHighlightedLabels } from './types';
|
|
3
|
+
export interface ShikiContextValue {
|
|
4
|
+
/** The initialized Shiki highlighter instance */
|
|
5
|
+
highlighter: HighlighterCore | null;
|
|
6
|
+
/** True while Shiki is loading */
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
/** Error if initialization failed */
|
|
9
|
+
error: Error | null;
|
|
10
|
+
/** Configured languages */
|
|
11
|
+
languages: SupportedLanguage[];
|
|
12
|
+
/** Localized labels for UI elements */
|
|
13
|
+
labels: CodeHighlightedLabels;
|
|
14
|
+
}
|
|
15
|
+
export declare const ShikiContext: import('react').Context<ShikiContextValue | null>;
|
|
16
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/code/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,iDAAiD;IACjD,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;IAEpC,kCAAkC;IAClC,SAAS,EAAE,OAAO,CAAC;IAEnB,qCAAqC;IACrC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB,2BAA2B;IAC3B,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAE/B,uCAAuC;IACvC,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shiki-powered syntax highlighting for Reki.
|
|
3
|
+
*
|
|
4
|
+
* This module is intentionally separate from the main `@cloudraker/reki` export
|
|
5
|
+
* to avoid bundling Shiki (~65-250KB) for consumers who don't need it.
|
|
6
|
+
*
|
|
7
|
+
* Uses hardcoded themes: `github-light` for light mode, `vesper` for dark mode.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { ShikiProvider, CodeHighlighted } from "@cloudraker/reki/code";
|
|
12
|
+
*
|
|
13
|
+
* function App() {
|
|
14
|
+
* return (
|
|
15
|
+
* <ShikiProvider
|
|
16
|
+
* engine="javascript"
|
|
17
|
+
* languages={['tsx', 'bash', 'json']}
|
|
18
|
+
* >
|
|
19
|
+
* <CodeHighlighted code="const x = 1;" lang="tsx" />
|
|
20
|
+
* </ShikiProvider>
|
|
21
|
+
* );
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @packageDocumentation
|
|
26
|
+
*/
|
|
27
|
+
export { ShikiProvider, normalizeLanguage } from './provider';
|
|
28
|
+
export { CodeHighlighted } from './code-highlighted';
|
|
29
|
+
export { useShikiHighlighter } from './use-shiki-highlighter';
|
|
30
|
+
export { LANGUAGE_ALIASES } from './types';
|
|
31
|
+
export type { ShikiProviderProps, CodeHighlightedProps, UseShikiHighlighterResult, ShikiEngine, BundledLanguage, LanguageAlias, LanguageInput, } from './types';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/code/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,WAAW,EACX,eAAe,EACf,aAAa,EACb,aAAa,GACd,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ShikiProviderProps, SupportedLanguage } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Normalize a language identifier to its canonical SupportedLanguage name.
|
|
5
|
+
* Returns the canonical name if the input is a known alias or already canonical,
|
|
6
|
+
* otherwise returns null.
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeLanguage(lang: string): SupportedLanguage | null;
|
|
9
|
+
export declare function ShikiProvider({ engine, languages, labels, children, }: ShikiProviderProps): React.JSX.Element;
|
|
10
|
+
export declare namespace ShikiProvider {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/code/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAiB,MAAM,SAAS,CAAC;AA8BpF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAIxE;AAgCD,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,SAAS,EACT,MAAM,EACN,QAAQ,GACT,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2GxC;yBAhHe,aAAa"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ShikiEngine, SupportedLanguage } from './types';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface HighlightCodeOptions {
|
|
4
|
+
/** Highlighting engine (default: "javascript") */
|
|
5
|
+
engine?: ShikiEngine;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateHighlighterOptions {
|
|
8
|
+
/** Highlighting engine (default: "javascript") */
|
|
9
|
+
engine?: ShikiEngine;
|
|
10
|
+
/** Languages to support */
|
|
11
|
+
languages: SupportedLanguage[];
|
|
12
|
+
}
|
|
13
|
+
export interface ServerHighlighter {
|
|
14
|
+
/** Highlight code and return HTML string */
|
|
15
|
+
highlight: (code: string, lang: SupportedLanguage) => string;
|
|
16
|
+
/** Dispose the highlighter when done */
|
|
17
|
+
dispose: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* One-off highlighting for a single code snippet.
|
|
21
|
+
*
|
|
22
|
+
* Creates a highlighter, highlights the code, and disposes.
|
|
23
|
+
* For multiple highlights, use `createServerHighlighter` instead.
|
|
24
|
+
*
|
|
25
|
+
* Uses hardcoded themes: `github-light` for light mode, `vesper` for dark mode.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const html = await highlightCode(code, "tsx");
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function highlightCode(code: string, lang: SupportedLanguage, options?: HighlightCodeOptions): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Create a reusable highlighter for multiple code snippets.
|
|
35
|
+
*
|
|
36
|
+
* More efficient than `highlightCode` when highlighting multiple snippets.
|
|
37
|
+
* Remember to call `dispose()` when done.
|
|
38
|
+
*
|
|
39
|
+
* Uses hardcoded themes: `github-light` for light mode, `vesper` for dark mode.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const highlighter = await createServerHighlighter({
|
|
44
|
+
* languages: ["tsx", "bash", "json"],
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* const html1 = highlighter.highlight(code1, "tsx");
|
|
48
|
+
* const html2 = highlighter.highlight(code2, "bash");
|
|
49
|
+
*
|
|
50
|
+
* highlighter.dispose();
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function createServerHighlighter(options: CreateHighlighterOptions): Promise<ServerHighlighter>;
|
|
54
|
+
/**
|
|
55
|
+
* Props for the CodeBlock component.
|
|
56
|
+
*/
|
|
57
|
+
export interface CodeBlockProps {
|
|
58
|
+
/** Pre-rendered HTML from highlightCode() or createServerHighlighter().highlight() */
|
|
59
|
+
html: string;
|
|
60
|
+
/** Additional CSS classes for the container */
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Server component that wraps highlighted code HTML with proper styling.
|
|
65
|
+
*
|
|
66
|
+
* Use this with `highlightCode()` or `createServerHighlighter().highlight()`
|
|
67
|
+
* to render syntax-highlighted code blocks with consistent Reki styling.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* import { highlightCode, CodeBlock } from "@cloudraker/reki/code/server";
|
|
72
|
+
*
|
|
73
|
+
* export default async function Page() {
|
|
74
|
+
* const html = await highlightCode(`const x = 1;`, "tsx");
|
|
75
|
+
* return <CodeBlock html={html} />;
|
|
76
|
+
* }
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* // With createServerHighlighter for multiple blocks
|
|
82
|
+
* const highlighter = await createServerHighlighter({ languages: ["tsx", "bash"] });
|
|
83
|
+
*
|
|
84
|
+
* return (
|
|
85
|
+
* <>
|
|
86
|
+
* <CodeBlock html={highlighter.highlight(code1, "tsx")} />
|
|
87
|
+
* <CodeBlock html={highlighter.highlight(code2, "bash")} />
|
|
88
|
+
* </>
|
|
89
|
+
* );
|
|
90
|
+
*
|
|
91
|
+
* highlighter.dispose();
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function CodeBlock({ html, className }: CodeBlockProps): ReactNode;
|
|
95
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/code/server.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA8BvC,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,2BAA2B;IAC3B,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,KAAK,MAAM,CAAC;IAC7D,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,iBAAiB,EACvB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,MAAM,CAAC,CAwCjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,iBAAiB,CAAC,CAiD5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sFAAsF;IACtF,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,SAAS,CAexE"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported languages for syntax highlighting.
|
|
3
|
+
*
|
|
4
|
+
* Reki bundles a curated subset of Shiki languages to keep bundle size small.
|
|
5
|
+
* These cover the most common use cases for documentation and code snippets.
|
|
6
|
+
*
|
|
7
|
+
* If you need additional languages, use Shiki directly with fine-grained imports.
|
|
8
|
+
*/
|
|
9
|
+
export type SupportedLanguage = "javascript" | "typescript" | "jsx" | "tsx" | "json" | "jsonc" | "html" | "css" | "python" | "yaml" | "markdown" | "graphql" | "sql" | "bash" | "shell" | "diff" | "hcl" | "toml";
|
|
10
|
+
/**
|
|
11
|
+
* Common language aliases mapped to their canonical SupportedLanguage names.
|
|
12
|
+
*
|
|
13
|
+
* Markdown code fences often use short aliases (e.g., `js`, `ts`, `sh`) that
|
|
14
|
+
* don't match the canonical grammar names but should resolve to them.
|
|
15
|
+
*
|
|
16
|
+
* Note: `mdx` is intentionally omitted because it has a distinct grammar
|
|
17
|
+
* (Markdown + JSX) that would lose JSX highlighting if mapped to `markdown`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const LANGUAGE_ALIASES: {
|
|
20
|
+
readonly js: "javascript";
|
|
21
|
+
readonly cjs: "javascript";
|
|
22
|
+
readonly mjs: "javascript";
|
|
23
|
+
readonly ts: "typescript";
|
|
24
|
+
readonly cts: "typescript";
|
|
25
|
+
readonly mts: "typescript";
|
|
26
|
+
readonly sh: "bash";
|
|
27
|
+
readonly zsh: "bash";
|
|
28
|
+
readonly yml: "yaml";
|
|
29
|
+
readonly py: "python";
|
|
30
|
+
readonly md: "markdown";
|
|
31
|
+
readonly gql: "graphql";
|
|
32
|
+
};
|
|
33
|
+
/** A known alias that maps to a SupportedLanguage. */
|
|
34
|
+
export type LanguageAlias = keyof typeof LANGUAGE_ALIASES;
|
|
35
|
+
/** Any language identifier accepted by ShikiProvider and highlight(). */
|
|
36
|
+
export type LanguageInput = SupportedLanguage | LanguageAlias;
|
|
37
|
+
/**
|
|
38
|
+
* Shiki engine choice for syntax highlighting.
|
|
39
|
+
* - `"javascript"` — Smaller bundle (~50KB), slightly less accurate
|
|
40
|
+
* - `"wasm"` — Larger bundle (~180KB), VS Code-accurate highlighting
|
|
41
|
+
*/
|
|
42
|
+
export type ShikiEngine = "javascript" | "wasm";
|
|
43
|
+
/**
|
|
44
|
+
* Localized labels for the copy button.
|
|
45
|
+
*/
|
|
46
|
+
export interface CodeHighlightedLabels {
|
|
47
|
+
/** Label for copy button (default: "Copy") */
|
|
48
|
+
copy?: string;
|
|
49
|
+
/** Label shown after copying (default: "Copied!") */
|
|
50
|
+
copied?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props for ShikiProvider component.
|
|
54
|
+
*/
|
|
55
|
+
export interface ShikiProviderProps {
|
|
56
|
+
/**
|
|
57
|
+
* Highlighting engine choice.
|
|
58
|
+
* - `"javascript"` — Smaller, faster to load (~50KB gzipped)
|
|
59
|
+
* - `"wasm"` — Larger but more accurate (~180KB gzipped)
|
|
60
|
+
*/
|
|
61
|
+
engine: ShikiEngine;
|
|
62
|
+
/**
|
|
63
|
+
* Languages to support. Only these languages will be loaded.
|
|
64
|
+
* Accepts canonical names (`'javascript'`) or common aliases (`'js'`).
|
|
65
|
+
* @example ['tsx', 'ts', 'bash', 'json']
|
|
66
|
+
*/
|
|
67
|
+
languages: LanguageInput[];
|
|
68
|
+
/**
|
|
69
|
+
* Localized labels for UI elements (copy button, etc.).
|
|
70
|
+
* Can be overridden at the component level.
|
|
71
|
+
* @example { copy: "Copier", copied: "Copié!" }
|
|
72
|
+
*/
|
|
73
|
+
labels?: CodeHighlightedLabels;
|
|
74
|
+
/** React children */
|
|
75
|
+
children: React.ReactNode;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Return value from useShikiHighlighter hook.
|
|
79
|
+
*/
|
|
80
|
+
export interface UseShikiHighlighterResult {
|
|
81
|
+
/**
|
|
82
|
+
* Highlight code and return HTML string.
|
|
83
|
+
* Returns `null` if highlighter is not ready or highlighting fails.
|
|
84
|
+
* When `null` is returned, render the code as plain text.
|
|
85
|
+
*
|
|
86
|
+
* Accepts language aliases (e.g., 'js', 'ts', 'sh') which are automatically
|
|
87
|
+
* normalized to their canonical SupportedLanguage names.
|
|
88
|
+
*/
|
|
89
|
+
highlight: (code: string, lang: LanguageInput | (string & {})) => string | null;
|
|
90
|
+
/** True while Shiki is loading */
|
|
91
|
+
isLoading: boolean;
|
|
92
|
+
/** True when highlight() is safe to call */
|
|
93
|
+
isReady: boolean;
|
|
94
|
+
/** Error if Shiki initialization failed */
|
|
95
|
+
error: Error | null;
|
|
96
|
+
/** Localized labels from provider */
|
|
97
|
+
labels: CodeHighlightedLabels;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Props for CodeHighlighted component.
|
|
101
|
+
*/
|
|
102
|
+
export interface CodeHighlightedProps {
|
|
103
|
+
/** Source code to display */
|
|
104
|
+
code: string;
|
|
105
|
+
/**
|
|
106
|
+
* Language identifier for syntax highlighting.
|
|
107
|
+
* Accepts canonical names or common aliases (e.g., 'js', 'ts').
|
|
108
|
+
* Must be included in the ShikiProvider's `languages` array.
|
|
109
|
+
*/
|
|
110
|
+
lang: LanguageInput | (string & {});
|
|
111
|
+
/** Display line numbers */
|
|
112
|
+
showLineNumbers?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Lines to visually emphasize (1-indexed).
|
|
115
|
+
* @example [1, 5, 6]
|
|
116
|
+
*/
|
|
117
|
+
highlightLines?: number[];
|
|
118
|
+
/** Show copy-to-clipboard button */
|
|
119
|
+
showCopyButton?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Override provider labels for this instance.
|
|
122
|
+
* @example { copy: "Copy code", copied: "Done!" }
|
|
123
|
+
*/
|
|
124
|
+
labels?: CodeHighlightedLabels;
|
|
125
|
+
/** Additional CSS classes */
|
|
126
|
+
className?: string;
|
|
127
|
+
}
|
|
128
|
+
/** @deprecated Use SupportedLanguage instead */
|
|
129
|
+
export type BundledLanguage = SupportedLanguage;
|
|
130
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/code/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,KAAK,GACL,KAAK,GACL,MAAM,GACN,OAAO,GACP,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,UAAU,GACV,SAAS,GACT,KAAK,GACL,MAAM,GACN,OAAO,GACP,MAAM,GACN,KAAK,GACL,MAAM,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAayB,CAAC;AAEvD,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,aAAa,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,MAAM,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,SAAS,EAAE,aAAa,EAAE,CAAC;IAE3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAE/B,qBAAqB;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC;IAEhF,kCAAkC;IAClC,SAAS,EAAE,OAAO,CAAC;IAEnB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IAEjB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB,qCAAqC;IACrC,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,EAAE,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAEpC,2BAA2B;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,oCAAoC;IACpC,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAE/B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,gDAAgD;AAChD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UseShikiHighlighterResult } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for accessing Shiki highlighting in custom implementations.
|
|
4
|
+
*
|
|
5
|
+
* Must be used within a ShikiProvider.
|
|
6
|
+
*
|
|
7
|
+
* Uses hardcoded themes: `github-light` for light mode, `vesper` for dark mode.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { useShikiHighlighter } from "@cloudraker/reki/code";
|
|
12
|
+
*
|
|
13
|
+
* function CustomCodeBlock({ code, lang }) {
|
|
14
|
+
* const { highlight, isLoading, isReady, error } = useShikiHighlighter();
|
|
15
|
+
*
|
|
16
|
+
* if (error) {
|
|
17
|
+
* return <div>Failed to load highlighter</div>;
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* if (isLoading) {
|
|
21
|
+
* return <pre><code>{code}</code></pre>;
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* const html = highlight(code, lang);
|
|
25
|
+
*
|
|
26
|
+
* // null means highlighting failed — render plain text
|
|
27
|
+
* if (html === null) {
|
|
28
|
+
* return <pre><code>{code}</code></pre>;
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* return <pre dangerouslySetInnerHTML={{ __html: html }} />;
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function useShikiHighlighter(): UseShikiHighlighterResult;
|
|
36
|
+
//# sourceMappingURL=use-shiki-highlighter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-shiki-highlighter.d.ts","sourceRoot":"","sources":["../../../src/code/use-shiki-highlighter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,mBAAmB,IAAI,yBAAyB,CA4D/D"}
|