@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.
Files changed (762) hide show
  1. package/CHANGELOG.md +1892 -0
  2. package/README.md +525 -0
  3. package/ai/USAGE.md +201 -0
  4. package/ai/component-registry.json +6707 -0
  5. package/ai/component-registry.md +8346 -0
  6. package/ai/schemas.ts +955 -0
  7. package/bin/reki.js +36 -0
  8. package/dist/.build-complete +1 -0
  9. package/dist/ai/schemas.d.ts +2514 -0
  10. package/dist/ai/schemas.d.ts.map +1 -0
  11. package/dist/ai/schemas.js +3985 -0
  12. package/dist/ai/schemas.js.map +1 -0
  13. package/dist/blocks-source/delete-resource/delete-resource.tsx +213 -0
  14. package/dist/blocks-source/page-header/page-header.tsx +99 -0
  15. package/dist/blocks-source/resource-list/resource-list.test.tsx +28 -0
  16. package/dist/blocks-source/resource-list/resource-list.tsx +69 -0
  17. package/dist/catalog.js +229 -0
  18. package/dist/catalog.js.map +1 -0
  19. package/dist/chunks/SankeyChart-jwwpwps4npqzbrvn.js +890 -0
  20. package/dist/chunks/SankeyChart-jwwpwps4npqzbrvn.js.map +1 -0
  21. package/dist/chunks/autocomplete-f4vetako14h2aqsw.js +193 -0
  22. package/dist/chunks/autocomplete-f4vetako14h2aqsw.js.map +1 -0
  23. package/dist/chunks/badge-pc33c5ir7muabgfh.js +163 -0
  24. package/dist/chunks/badge-pc33c5ir7muabgfh.js.map +1 -0
  25. package/dist/chunks/banner-kis9h1yq636liunc.js +120 -0
  26. package/dist/chunks/banner-kis9h1yq636liunc.js.map +1 -0
  27. package/dist/chunks/bash-g5z23u7me5rx7bzt.js +15 -0
  28. package/dist/chunks/bash-g5z23u7me5rx7bzt.js.map +1 -0
  29. package/dist/chunks/breadcrumbs-d6149hyct4puz3x4.js +169 -0
  30. package/dist/chunks/breadcrumbs-d6149hyct4puz3x4.js.map +1 -0
  31. package/dist/chunks/button-nc5p1h28cwes0tjw.js +237 -0
  32. package/dist/chunks/button-nc5p1h28cwes0tjw.js.map +1 -0
  33. package/dist/chunks/checkbox-g2661n3eodgoispq.js +216 -0
  34. package/dist/chunks/checkbox-g2661n3eodgoispq.js.map +1 -0
  35. package/dist/chunks/clipboard-text-g3659lejx2d7i93e.js +191 -0
  36. package/dist/chunks/clipboard-text-g3659lejx2d7i93e.js.map +1 -0
  37. package/dist/chunks/cloudflare-logo-k0f07zztsda8m4ca.js +175 -0
  38. package/dist/chunks/cloudflare-logo-k0f07zztsda8m4ca.js.map +1 -0
  39. package/dist/chunks/cn-ct4n7r74mh8y0f48.js +26 -0
  40. package/dist/chunks/cn-ct4n7r74mh8y0f48.js.map +1 -0
  41. package/dist/chunks/code-fm5rpi47v6cj9o8o.js +61 -0
  42. package/dist/chunks/code-fm5rpi47v6cj9o8o.js.map +1 -0
  43. package/dist/chunks/collapsible-ndvmgo29s5iqfcor.js +76 -0
  44. package/dist/chunks/collapsible-ndvmgo29s5iqfcor.js.map +1 -0
  45. package/dist/chunks/combobox-i38w67netm8ukw4f.js +408 -0
  46. package/dist/chunks/combobox-i38w67netm8ukw4f.js.map +1 -0
  47. package/dist/chunks/command-palette-fe5cjfdgsg3t17vq.js +403 -0
  48. package/dist/chunks/command-palette-fe5cjfdgsg3t17vq.js.map +1 -0
  49. package/dist/chunks/core-oowp00biqxe3hvjc.js +5806 -0
  50. package/dist/chunks/core-oowp00biqxe3hvjc.js.map +1 -0
  51. package/dist/chunks/css-d1mi3wy1sl3fzekh.js +8 -0
  52. package/dist/chunks/css-d1mi3wy1sl3fzekh.js.map +1 -0
  53. package/dist/chunks/date-picker-81mc3zrsmobm3ydm.js +2921 -0
  54. package/dist/chunks/date-picker-81mc3zrsmobm3ydm.js.map +1 -0
  55. package/dist/chunks/date-range-picker-c8ttrfaos9mb1w5n.js +408 -0
  56. package/dist/chunks/date-range-picker-c8ttrfaos9mb1w5n.js.map +1 -0
  57. package/dist/chunks/dialog-m4go8xof25fospqo.js +134 -0
  58. package/dist/chunks/dialog-m4go8xof25fospqo.js.map +1 -0
  59. package/dist/chunks/diff-cpj1h9lg0bw716mj.js +8 -0
  60. package/dist/chunks/diff-cpj1h9lg0bw716mj.js.map +1 -0
  61. package/dist/chunks/dropdown-j5uht8mn4z7xc9fc.js +313 -0
  62. package/dist/chunks/dropdown-j5uht8mn4z7xc9fc.js.map +1 -0
  63. package/dist/chunks/empty-kazxr0248zjemw6n.js +94 -0
  64. package/dist/chunks/empty-kazxr0248zjemw6n.js.map +1 -0
  65. package/dist/chunks/engine-javascript-iqcmg6wi2pjun29k.js +2637 -0
  66. package/dist/chunks/engine-javascript-iqcmg6wi2pjun29k.js.map +1 -0
  67. package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js +295 -0
  68. package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js.map +1 -0
  69. package/dist/chunks/field-fe5m8z3vbpvtctbe.js +77 -0
  70. package/dist/chunks/field-fe5m8z3vbpvtctbe.js.map +1 -0
  71. package/dist/chunks/github-light-ulev8flhimfg79ob.js +6 -0
  72. package/dist/chunks/github-light-ulev8flhimfg79ob.js.map +1 -0
  73. package/dist/chunks/graphql-ft2h47erta7isqn4.js +16 -0
  74. package/dist/chunks/graphql-ft2h47erta7isqn4.js.map +1 -0
  75. package/dist/chunks/grid-enlbb88vucgeq1np.js +128 -0
  76. package/dist/chunks/grid-enlbb88vucgeq1np.js.map +1 -0
  77. package/dist/chunks/hcl-hcu7d6ja6t540ijn.js +8 -0
  78. package/dist/chunks/hcl-hcu7d6ja6t540ijn.js.map +1 -0
  79. package/dist/chunks/html-kl304jmqj4jxj777.js +12 -0
  80. package/dist/chunks/html-kl304jmqj4jxj777.js.map +1 -0
  81. package/dist/chunks/input-area-ciw85g3fno06t4tw.js +78 -0
  82. package/dist/chunks/input-area-ciw85g3fno06t4tw.js.map +1 -0
  83. package/dist/chunks/input-group-mo7tq7jr19hmgor5.js +505 -0
  84. package/dist/chunks/input-group-mo7tq7jr19hmgor5.js.map +1 -0
  85. package/dist/chunks/input-i5nefqk213n4z7pr.js +130 -0
  86. package/dist/chunks/input-i5nefqk213n4z7pr.js.map +1 -0
  87. package/dist/chunks/javascript-hhx3avh9uv2o27ay.js +8 -0
  88. package/dist/chunks/javascript-hhx3avh9uv2o27ay.js.map +1 -0
  89. package/dist/chunks/json-jovp9qemdkp5cziz.js +8 -0
  90. package/dist/chunks/json-jovp9qemdkp5cziz.js.map +1 -0
  91. package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js +8 -0
  92. package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js.map +1 -0
  93. package/dist/chunks/jsx-ij885l2li2lzfoss.js +8 -0
  94. package/dist/chunks/jsx-ij885l2li2lzfoss.js.map +1 -0
  95. package/dist/chunks/label-fcho4757rbdess0c.js +68 -0
  96. package/dist/chunks/label-fcho4757rbdess0c.js.map +1 -0
  97. package/dist/chunks/layer-card-kzu48dhzxm3e9p4u.js +47 -0
  98. package/dist/chunks/layer-card-kzu48dhzxm3e9p4u.js.map +1 -0
  99. package/dist/chunks/link-j2gu5dr3nr4i4yf0.js +95 -0
  100. package/dist/chunks/link-j2gu5dr3nr4i4yf0.js.map +1 -0
  101. package/dist/chunks/link-provider-bgljdgs4hs438h0u.js +22 -0
  102. package/dist/chunks/link-provider-bgljdgs4hs438h0u.js.map +1 -0
  103. package/dist/chunks/loader-cxzp72mn53lzbv9c.js +109 -0
  104. package/dist/chunks/loader-cxzp72mn53lzbv9c.js.map +1 -0
  105. package/dist/chunks/markdown-n2vyyq7l68fy32wc.js +8 -0
  106. package/dist/chunks/markdown-n2vyyq7l68fy32wc.js.map +1 -0
  107. package/dist/chunks/menubar-ir5gbjmsizsddz7g.js +98 -0
  108. package/dist/chunks/menubar-ir5gbjmsizsddz7g.js.map +1 -0
  109. package/dist/chunks/meter-o5yd7ctjf80vvyjx.js +51 -0
  110. package/dist/chunks/meter-o5yd7ctjf80vvyjx.js.map +1 -0
  111. package/dist/chunks/pagination-bryw6rohfr7mm3km.js +266 -0
  112. package/dist/chunks/pagination-bryw6rohfr7mm3km.js.map +1 -0
  113. package/dist/chunks/popover-elxcmvv7mu7m7uk4.js +181 -0
  114. package/dist/chunks/popover-elxcmvv7mu7m7uk4.js.map +1 -0
  115. package/dist/chunks/portal-provider-off76og7tjyz96ys.js +18 -0
  116. package/dist/chunks/portal-provider-off76og7tjyz96ys.js.map +1 -0
  117. package/dist/chunks/python-gg755pb8oe9ra1d1.js +8 -0
  118. package/dist/chunks/python-gg755pb8oe9ra1d1.js.map +1 -0
  119. package/dist/chunks/radio-newyq331uk4lltr6.js +226 -0
  120. package/dist/chunks/radio-newyq331uk4lltr6.js.map +1 -0
  121. package/dist/chunks/resolve-variant-t8jcltsizeg29ege.js +11 -0
  122. package/dist/chunks/resolve-variant-t8jcltsizeg29ege.js.map +1 -0
  123. package/dist/chunks/select-h5480mbro0ypxu0b.js +237 -0
  124. package/dist/chunks/select-h5480mbro0ypxu0b.js.map +1 -0
  125. package/dist/chunks/sensitive-input-lqugq6uvx0lkpu0u.js +273 -0
  126. package/dist/chunks/sensitive-input-lqugq6uvx0lkpu0u.js.map +1 -0
  127. package/dist/chunks/sidebar-noz668nhdu2gso12.js +1144 -0
  128. package/dist/chunks/sidebar-noz668nhdu2gso12.js.map +1 -0
  129. package/dist/chunks/skeleton-line-epxenksfesr2fkcv.js +33 -0
  130. package/dist/chunks/skeleton-line-epxenksfesr2fkcv.js.map +1 -0
  131. package/dist/chunks/sql-ovukp5mrfunfk5tv.js +8 -0
  132. package/dist/chunks/sql-ovukp5mrfunfk5tv.js.map +1 -0
  133. package/dist/chunks/surface-cyxme7mlr49l33f8.js +29 -0
  134. package/dist/chunks/surface-cyxme7mlr49l33f8.js.map +1 -0
  135. package/dist/chunks/switch-bigo96fyjlh7ivbi.js +256 -0
  136. package/dist/chunks/switch-bigo96fyjlh7ivbi.js.map +1 -0
  137. package/dist/chunks/table-mwcmwp6a80zvyrxw.js +208 -0
  138. package/dist/chunks/table-mwcmwp6a80zvyrxw.js.map +1 -0
  139. package/dist/chunks/table-of-contents-gkuvkr2w6lbhi7wt.js +106 -0
  140. package/dist/chunks/table-of-contents-gkuvkr2w6lbhi7wt.js.map +1 -0
  141. package/dist/chunks/tabs-e4pcjkw94kpe35x0.js +177 -0
  142. package/dist/chunks/tabs-e4pcjkw94kpe35x0.js.map +1 -0
  143. package/dist/chunks/text-oxsrbmjmfq99ue85.js +103 -0
  144. package/dist/chunks/text-oxsrbmjmfq99ue85.js.map +1 -0
  145. package/dist/chunks/toast-ivr4097bstjcjotf.js +370 -0
  146. package/dist/chunks/toast-ivr4097bstjcjotf.js.map +1 -0
  147. package/dist/chunks/toml-nczb2z9n0o23o3ci.js +8 -0
  148. package/dist/chunks/toml-nczb2z9n0o23o3ci.js.map +1 -0
  149. package/dist/chunks/tooltip-ncaia8n1lavkyw8n.js +103 -0
  150. package/dist/chunks/tooltip-ncaia8n1lavkyw8n.js.map +1 -0
  151. package/dist/chunks/tsx-ehy8lrzet6v54zur.js +8 -0
  152. package/dist/chunks/tsx-ehy8lrzet6v54zur.js.map +1 -0
  153. package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js +8 -0
  154. package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js.map +1 -0
  155. package/dist/chunks/vendor-base-ui-bgl9g5nkvqy3tn36.js +24690 -0
  156. package/dist/chunks/vendor-base-ui-bgl9g5nkvqy3tn36.js.map +1 -0
  157. package/dist/chunks/vendor-floating-ui-dn8xswn8036udsqq.js +1311 -0
  158. package/dist/chunks/vendor-floating-ui-dn8xswn8036udsqq.js.map +1 -0
  159. package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js +2775 -0
  160. package/dist/chunks/vendor-styling-gobnkhsy0rva4qd3.js.map +1 -0
  161. package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js +217 -0
  162. package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js.map +1 -0
  163. package/dist/chunks/vesper-ebfu9ns65f2v830s.js +6 -0
  164. package/dist/chunks/vesper-ebfu9ns65f2v830s.js.map +1 -0
  165. package/dist/chunks/wasm-oj22f8usru9h7dzg.js +9 -0
  166. package/dist/chunks/wasm-oj22f8usru9h7dzg.js.map +1 -0
  167. package/dist/chunks/yaml-e2v22lr79tss2brj.js +8 -0
  168. package/dist/chunks/yaml-e2v22lr79tss2brj.js.map +1 -0
  169. package/dist/code/server.js +88 -0
  170. package/dist/code/server.js.map +1 -0
  171. package/dist/code.js +256 -0
  172. package/dist/code.js.map +1 -0
  173. package/dist/command-line/cli.js +850 -0
  174. package/dist/command-line/commands/add.js +282 -0
  175. package/dist/command-line/commands/ai.js +22 -0
  176. package/dist/command-line/commands/blocks.js +61 -0
  177. package/dist/command-line/commands/doc.js +167 -0
  178. package/dist/command-line/commands/init.js +95 -0
  179. package/dist/command-line/commands/ls.js +53 -0
  180. package/dist/components/autocomplete.js +9 -0
  181. package/dist/components/autocomplete.js.map +1 -0
  182. package/dist/components/badge.js +7 -0
  183. package/dist/components/badge.js.map +1 -0
  184. package/dist/components/banner.js +7 -0
  185. package/dist/components/banner.js.map +1 -0
  186. package/dist/components/breadcrumbs.js +9 -0
  187. package/dist/components/breadcrumbs.js.map +1 -0
  188. package/dist/components/button.js +9 -0
  189. package/dist/components/button.js.map +1 -0
  190. package/dist/components/chart.js +10 -0
  191. package/dist/components/chart.js.map +1 -0
  192. package/dist/components/checkbox.js +8 -0
  193. package/dist/components/checkbox.js.map +1 -0
  194. package/dist/components/clipboard-text.js +6 -0
  195. package/dist/components/clipboard-text.js.map +1 -0
  196. package/dist/components/cloudflare-logo.js +10 -0
  197. package/dist/components/cloudflare-logo.js.map +1 -0
  198. package/dist/components/code.js +7 -0
  199. package/dist/components/code.js.map +1 -0
  200. package/dist/components/collapsible.js +6 -0
  201. package/dist/components/collapsible.js.map +1 -0
  202. package/dist/components/combobox.js +6 -0
  203. package/dist/components/combobox.js.map +1 -0
  204. package/dist/components/command-palette.js +8 -0
  205. package/dist/components/command-palette.js.map +1 -0
  206. package/dist/components/date-picker.js +6 -0
  207. package/dist/components/date-picker.js.map +1 -0
  208. package/dist/components/date-range-picker.js +6 -0
  209. package/dist/components/date-range-picker.js.map +1 -0
  210. package/dist/components/dialog.js +11 -0
  211. package/dist/components/dialog.js.map +1 -0
  212. package/dist/components/dropdown.js +6 -0
  213. package/dist/components/dropdown.js.map +1 -0
  214. package/dist/components/empty.js +9 -0
  215. package/dist/components/empty.js.map +1 -0
  216. package/dist/components/field.js +10 -0
  217. package/dist/components/field.js.map +1 -0
  218. package/dist/components/flow.js +5831 -0
  219. package/dist/components/flow.js.map +1 -0
  220. package/dist/components/grid.js +11 -0
  221. package/dist/components/grid.js.map +1 -0
  222. package/dist/components/input-group.js +8 -0
  223. package/dist/components/input-group.js.map +1 -0
  224. package/dist/components/input.js +14 -0
  225. package/dist/components/input.js.map +1 -0
  226. package/dist/components/label.js +10 -0
  227. package/dist/components/label.js.map +1 -0
  228. package/dist/components/layer-card.js +6 -0
  229. package/dist/components/layer-card.js.map +1 -0
  230. package/dist/components/link.js +9 -0
  231. package/dist/components/link.js.map +1 -0
  232. package/dist/components/loader.js +8 -0
  233. package/dist/components/loader.js.map +1 -0
  234. package/dist/components/menubar.js +7 -0
  235. package/dist/components/menubar.js.map +1 -0
  236. package/dist/components/meter.js +6 -0
  237. package/dist/components/meter.js.map +1 -0
  238. package/dist/components/pagination.js +6 -0
  239. package/dist/components/pagination.js.map +1 -0
  240. package/dist/components/popover.js +14 -0
  241. package/dist/components/popover.js.map +1 -0
  242. package/dist/components/radio.js +10 -0
  243. package/dist/components/radio.js.map +1 -0
  244. package/dist/components/select.js +6 -0
  245. package/dist/components/select.js.map +1 -0
  246. package/dist/components/sensitive-input.js +8 -0
  247. package/dist/components/sensitive-input.js.map +1 -0
  248. package/dist/components/sidebar.js +34 -0
  249. package/dist/components/sidebar.js.map +1 -0
  250. package/dist/components/surface.js +6 -0
  251. package/dist/components/surface.js.map +1 -0
  252. package/dist/components/switch.js +8 -0
  253. package/dist/components/switch.js.map +1 -0
  254. package/dist/components/table-of-contents.js +8 -0
  255. package/dist/components/table-of-contents.js.map +1 -0
  256. package/dist/components/table.js +8 -0
  257. package/dist/components/table.js.map +1 -0
  258. package/dist/components/tabs.js +6 -0
  259. package/dist/components/tabs.js.map +1 -0
  260. package/dist/components/text.js +6 -0
  261. package/dist/components/text.js.map +1 -0
  262. package/dist/components/toast.js +11 -0
  263. package/dist/components/toast.js.map +1 -0
  264. package/dist/components/tooltip.js +7 -0
  265. package/dist/components/tooltip.js.map +1 -0
  266. package/dist/index.js +344 -0
  267. package/dist/index.js.map +1 -0
  268. package/dist/primitives/accordion.js +6 -0
  269. package/dist/primitives/accordion.js.map +1 -0
  270. package/dist/primitives/alert-dialog.js +6 -0
  271. package/dist/primitives/alert-dialog.js.map +1 -0
  272. package/dist/primitives/autocomplete.js +6 -0
  273. package/dist/primitives/autocomplete.js.map +1 -0
  274. package/dist/primitives/avatar.js +6 -0
  275. package/dist/primitives/avatar.js.map +1 -0
  276. package/dist/primitives/button.js +6 -0
  277. package/dist/primitives/button.js.map +1 -0
  278. package/dist/primitives/checkbox-group.js +6 -0
  279. package/dist/primitives/checkbox-group.js.map +1 -0
  280. package/dist/primitives/checkbox.js +6 -0
  281. package/dist/primitives/checkbox.js.map +1 -0
  282. package/dist/primitives/collapsible.js +6 -0
  283. package/dist/primitives/collapsible.js.map +1 -0
  284. package/dist/primitives/combobox.js +6 -0
  285. package/dist/primitives/combobox.js.map +1 -0
  286. package/dist/primitives/context-menu.js +6 -0
  287. package/dist/primitives/context-menu.js.map +1 -0
  288. package/dist/primitives/csp-provider.js +6 -0
  289. package/dist/primitives/csp-provider.js.map +1 -0
  290. package/dist/primitives/dialog.js +6 -0
  291. package/dist/primitives/dialog.js.map +1 -0
  292. package/dist/primitives/direction-provider.js +7 -0
  293. package/dist/primitives/direction-provider.js.map +1 -0
  294. package/dist/primitives/drawer.js +6 -0
  295. package/dist/primitives/drawer.js.map +1 -0
  296. package/dist/primitives/field.js +6 -0
  297. package/dist/primitives/field.js.map +1 -0
  298. package/dist/primitives/fieldset.js +6 -0
  299. package/dist/primitives/fieldset.js.map +1 -0
  300. package/dist/primitives/form.js +6 -0
  301. package/dist/primitives/form.js.map +1 -0
  302. package/dist/primitives/input.js +6 -0
  303. package/dist/primitives/input.js.map +1 -0
  304. package/dist/primitives/menu.js +6 -0
  305. package/dist/primitives/menu.js.map +1 -0
  306. package/dist/primitives/menubar.js +6 -0
  307. package/dist/primitives/menubar.js.map +1 -0
  308. package/dist/primitives/meter.js +6 -0
  309. package/dist/primitives/meter.js.map +1 -0
  310. package/dist/primitives/navigation-menu.js +6 -0
  311. package/dist/primitives/navigation-menu.js.map +1 -0
  312. package/dist/primitives/number-field.js +6 -0
  313. package/dist/primitives/number-field.js.map +1 -0
  314. package/dist/primitives/otp-field.js +6 -0
  315. package/dist/primitives/otp-field.js.map +1 -0
  316. package/dist/primitives/popover.js +6 -0
  317. package/dist/primitives/popover.js.map +1 -0
  318. package/dist/primitives/preview-card.js +6 -0
  319. package/dist/primitives/preview-card.js.map +1 -0
  320. package/dist/primitives/progress.js +6 -0
  321. package/dist/primitives/progress.js.map +1 -0
  322. package/dist/primitives/radio-group.js +6 -0
  323. package/dist/primitives/radio-group.js.map +1 -0
  324. package/dist/primitives/radio.js +6 -0
  325. package/dist/primitives/radio.js.map +1 -0
  326. package/dist/primitives/scroll-area.js +6 -0
  327. package/dist/primitives/scroll-area.js.map +1 -0
  328. package/dist/primitives/select.js +6 -0
  329. package/dist/primitives/select.js.map +1 -0
  330. package/dist/primitives/separator.js +6 -0
  331. package/dist/primitives/separator.js.map +1 -0
  332. package/dist/primitives/slider.js +6 -0
  333. package/dist/primitives/slider.js.map +1 -0
  334. package/dist/primitives/switch.js +6 -0
  335. package/dist/primitives/switch.js.map +1 -0
  336. package/dist/primitives/tabs.js +6 -0
  337. package/dist/primitives/tabs.js.map +1 -0
  338. package/dist/primitives/toast.js +6 -0
  339. package/dist/primitives/toast.js.map +1 -0
  340. package/dist/primitives/toggle-group.js +6 -0
  341. package/dist/primitives/toggle-group.js.map +1 -0
  342. package/dist/primitives/toggle.js +6 -0
  343. package/dist/primitives/toggle.js.map +1 -0
  344. package/dist/primitives/toolbar.js +6 -0
  345. package/dist/primitives/toolbar.js.map +1 -0
  346. package/dist/primitives/tooltip.js +6 -0
  347. package/dist/primitives/tooltip.js.map +1 -0
  348. package/dist/primitives.js +46 -0
  349. package/dist/primitives.js.map +1 -0
  350. package/dist/registry.js +2 -0
  351. package/dist/registry.js.map +1 -0
  352. package/dist/scripts/theme-generator/config.d.ts +6 -0
  353. package/dist/scripts/theme-generator/config.d.ts.map +1 -0
  354. package/dist/scripts/theme-generator/config.js +629 -0
  355. package/dist/scripts/theme-generator/config.js.map +1 -0
  356. package/dist/scripts/theme-generator/generate-css.d.ts +31 -0
  357. package/dist/scripts/theme-generator/generate-css.d.ts.map +1 -0
  358. package/dist/scripts/theme-generator/index.d.ts +13 -0
  359. package/dist/scripts/theme-generator/index.d.ts.map +1 -0
  360. package/dist/scripts/theme-generator/migrate.d.ts +56 -0
  361. package/dist/scripts/theme-generator/migrate.d.ts.map +1 -0
  362. package/dist/scripts/theme-generator/types.d.ts +82 -0
  363. package/dist/scripts/theme-generator/types.d.ts.map +1 -0
  364. package/dist/scripts/theme-generator/types.js +2 -0
  365. package/dist/scripts/theme-generator/types.js.map +1 -0
  366. package/dist/src/blocks/delete-resource/delete-resource.d.ts +46 -0
  367. package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +1 -0
  368. package/dist/src/blocks/delete-resource/index.d.ts +2 -0
  369. package/dist/src/blocks/delete-resource/index.d.ts.map +1 -0
  370. package/dist/src/blocks/page-header/index.d.ts +2 -0
  371. package/dist/src/blocks/page-header/index.d.ts.map +1 -0
  372. package/dist/src/blocks/page-header/page-header.d.ts +38 -0
  373. package/dist/src/blocks/page-header/page-header.d.ts.map +1 -0
  374. package/dist/src/blocks/resource-list/index.d.ts +2 -0
  375. package/dist/src/blocks/resource-list/index.d.ts.map +1 -0
  376. package/dist/src/blocks/resource-list/resource-list.d.ts +18 -0
  377. package/dist/src/blocks/resource-list/resource-list.d.ts.map +1 -0
  378. package/dist/src/catalog/catalog.d.ts +75 -0
  379. package/dist/src/catalog/catalog.d.ts.map +1 -0
  380. package/dist/src/catalog/data.d.ts +44 -0
  381. package/dist/src/catalog/data.d.ts.map +1 -0
  382. package/dist/src/catalog/index.d.ts +39 -0
  383. package/dist/src/catalog/index.d.ts.map +1 -0
  384. package/dist/src/catalog/types.d.ts +226 -0
  385. package/dist/src/catalog/types.d.ts.map +1 -0
  386. package/dist/src/catalog/visibility.d.ts +37 -0
  387. package/dist/src/catalog/visibility.d.ts.map +1 -0
  388. package/dist/src/code/code-highlighted.d.ts +32 -0
  389. package/dist/src/code/code-highlighted.d.ts.map +1 -0
  390. package/dist/src/code/context.d.ts +16 -0
  391. package/dist/src/code/context.d.ts.map +1 -0
  392. package/dist/src/code/index.d.ts +32 -0
  393. package/dist/src/code/index.d.ts.map +1 -0
  394. package/dist/src/code/provider.d.ts +13 -0
  395. package/dist/src/code/provider.d.ts.map +1 -0
  396. package/dist/src/code/server.d.ts +95 -0
  397. package/dist/src/code/server.d.ts.map +1 -0
  398. package/dist/src/code/types.d.ts +130 -0
  399. package/dist/src/code/types.d.ts.map +1 -0
  400. package/dist/src/code/use-shiki-highlighter.d.ts +36 -0
  401. package/dist/src/code/use-shiki-highlighter.d.ts.map +1 -0
  402. package/dist/src/command-line/build-cli.d.ts +7 -0
  403. package/dist/src/command-line/build-cli.d.ts.map +1 -0
  404. package/dist/src/command-line/cli.d.ts +13 -0
  405. package/dist/src/command-line/cli.d.ts.map +1 -0
  406. package/dist/src/command-line/commands/add.d.ts +10 -0
  407. package/dist/src/command-line/commands/add.d.ts.map +1 -0
  408. package/dist/src/command-line/commands/ai.d.ts +10 -0
  409. package/dist/src/command-line/commands/ai.d.ts.map +1 -0
  410. package/dist/src/command-line/commands/blocks.d.ts +10 -0
  411. package/dist/src/command-line/commands/blocks.d.ts.map +1 -0
  412. package/dist/src/command-line/commands/doc.d.ts +14 -0
  413. package/dist/src/command-line/commands/doc.d.ts.map +1 -0
  414. package/dist/src/command-line/commands/init.d.ts +18 -0
  415. package/dist/src/command-line/commands/init.d.ts.map +1 -0
  416. package/dist/src/command-line/commands/ls.d.ts +10 -0
  417. package/dist/src/command-line/commands/ls.d.ts.map +1 -0
  418. package/dist/src/command-line/commands/migrate.d.ts +10 -0
  419. package/dist/src/command-line/commands/migrate.d.ts.map +1 -0
  420. package/dist/src/command-line/utils/config.d.ts +42 -0
  421. package/dist/src/command-line/utils/config.d.ts.map +1 -0
  422. package/dist/src/command-line/utils/transformer.d.ts +21 -0
  423. package/dist/src/command-line/utils/transformer.d.ts.map +1 -0
  424. package/dist/src/components/autocomplete/autocomplete.d.ts +181 -0
  425. package/dist/src/components/autocomplete/autocomplete.d.ts.map +1 -0
  426. package/dist/src/components/autocomplete/index.d.ts +3 -0
  427. package/dist/src/components/autocomplete/index.d.ts.map +1 -0
  428. package/dist/src/components/badge/badge.d.ts +180 -0
  429. package/dist/src/components/badge/badge.d.ts.map +1 -0
  430. package/dist/src/components/badge/index.d.ts +2 -0
  431. package/dist/src/components/badge/index.d.ts.map +1 -0
  432. package/dist/src/components/banner/banner.d.ts +106 -0
  433. package/dist/src/components/banner/banner.d.ts.map +1 -0
  434. package/dist/src/components/banner/index.d.ts +2 -0
  435. package/dist/src/components/banner/index.d.ts.map +1 -0
  436. package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +78 -0
  437. package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  438. package/dist/src/components/breadcrumbs/index.d.ts +2 -0
  439. package/dist/src/components/breadcrumbs/index.d.ts.map +1 -0
  440. package/dist/src/components/button/button.d.ts +214 -0
  441. package/dist/src/components/button/button.d.ts.map +1 -0
  442. package/dist/src/components/button/index.d.ts +2 -0
  443. package/dist/src/components/button/index.d.ts.map +1 -0
  444. package/dist/src/components/chart/Color.d.ts +91 -0
  445. package/dist/src/components/chart/Color.d.ts.map +1 -0
  446. package/dist/src/components/chart/EChart.d.ts +159 -0
  447. package/dist/src/components/chart/EChart.d.ts.map +1 -0
  448. package/dist/src/components/chart/Legend.d.ts +51 -0
  449. package/dist/src/components/chart/Legend.d.ts.map +1 -0
  450. package/dist/src/components/chart/SankeyChart.d.ts +98 -0
  451. package/dist/src/components/chart/SankeyChart.d.ts.map +1 -0
  452. package/dist/src/components/chart/TimeseriesChart.d.ts +181 -0
  453. package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -0
  454. package/dist/src/components/chart/index.d.ts +6 -0
  455. package/dist/src/components/chart/index.d.ts.map +1 -0
  456. package/dist/src/components/checkbox/checkbox.d.ts +197 -0
  457. package/dist/src/components/checkbox/checkbox.d.ts.map +1 -0
  458. package/dist/src/components/checkbox/index.d.ts +2 -0
  459. package/dist/src/components/checkbox/index.d.ts.map +1 -0
  460. package/dist/src/components/clipboard-text/clipboard-text.d.ts +88 -0
  461. package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -0
  462. package/dist/src/components/clipboard-text/index.d.ts +2 -0
  463. package/dist/src/components/clipboard-text/index.d.ts.map +1 -0
  464. package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts +133 -0
  465. package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +1 -0
  466. package/dist/src/components/cloudflare-logo/index.d.ts +2 -0
  467. package/dist/src/components/cloudflare-logo/index.d.ts.map +1 -0
  468. package/dist/src/components/code/code.d.ts +189 -0
  469. package/dist/src/components/code/code.d.ts.map +1 -0
  470. package/dist/src/components/code/index.d.ts +4 -0
  471. package/dist/src/components/code/index.d.ts.map +1 -0
  472. package/dist/src/components/collapsible/collapsible.d.ts +109 -0
  473. package/dist/src/components/collapsible/collapsible.d.ts.map +1 -0
  474. package/dist/src/components/collapsible/index.d.ts +2 -0
  475. package/dist/src/components/collapsible/index.d.ts.map +1 -0
  476. package/dist/src/components/combobox/combobox.d.ts +246 -0
  477. package/dist/src/components/combobox/combobox.d.ts.map +1 -0
  478. package/dist/src/components/combobox/index.d.ts +3 -0
  479. package/dist/src/components/combobox/index.d.ts.map +1 -0
  480. package/dist/src/components/command-palette/command-palette.d.ts +258 -0
  481. package/dist/src/components/command-palette/command-palette.d.ts.map +1 -0
  482. package/dist/src/components/command-palette/index.d.ts +3 -0
  483. package/dist/src/components/command-palette/index.d.ts.map +1 -0
  484. package/dist/src/components/command-palette/types.d.ts +168 -0
  485. package/dist/src/components/command-palette/types.d.ts.map +1 -0
  486. package/dist/src/components/date-picker/date-picker.d.ts +65 -0
  487. package/dist/src/components/date-picker/date-picker.d.ts.map +1 -0
  488. package/dist/src/components/date-picker/index.d.ts +4 -0
  489. package/dist/src/components/date-picker/index.d.ts.map +1 -0
  490. package/dist/src/components/date-range-picker/date-range-picker.d.ts +125 -0
  491. package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +1 -0
  492. package/dist/src/components/date-range-picker/index.d.ts +5 -0
  493. package/dist/src/components/date-range-picker/index.d.ts.map +1 -0
  494. package/dist/src/components/dialog/dialog.d.ts +242 -0
  495. package/dist/src/components/dialog/dialog.d.ts.map +1 -0
  496. package/dist/src/components/dialog/index.d.ts +2 -0
  497. package/dist/src/components/dialog/index.d.ts.map +1 -0
  498. package/dist/src/components/dropdown/dropdown.d.ts +116 -0
  499. package/dist/src/components/dropdown/dropdown.d.ts.map +1 -0
  500. package/dist/src/components/dropdown/index.d.ts +2 -0
  501. package/dist/src/components/dropdown/index.d.ts.map +1 -0
  502. package/dist/src/components/empty/empty.d.ts +69 -0
  503. package/dist/src/components/empty/empty.d.ts.map +1 -0
  504. package/dist/src/components/empty/index.d.ts +2 -0
  505. package/dist/src/components/empty/index.d.ts.map +1 -0
  506. package/dist/src/components/field/field.d.ts +89 -0
  507. package/dist/src/components/field/field.d.ts.map +1 -0
  508. package/dist/src/components/field/index.d.ts +2 -0
  509. package/dist/src/components/field/index.d.ts.map +1 -0
  510. package/dist/src/components/flow/connectors.d.ts +41 -0
  511. package/dist/src/components/flow/connectors.d.ts.map +1 -0
  512. package/dist/src/components/flow/diagram.d.ts +96 -0
  513. package/dist/src/components/flow/diagram.d.ts.map +1 -0
  514. package/dist/src/components/flow/index.d.ts +26 -0
  515. package/dist/src/components/flow/index.d.ts.map +1 -0
  516. package/dist/src/components/flow/node.d.ts +61 -0
  517. package/dist/src/components/flow/node.d.ts.map +1 -0
  518. package/dist/src/components/flow/parallel.d.ts +13 -0
  519. package/dist/src/components/flow/parallel.d.ts.map +1 -0
  520. package/dist/src/components/flow/use-children.d.ts +87 -0
  521. package/dist/src/components/flow/use-children.d.ts.map +1 -0
  522. package/dist/src/components/grid/grid.d.ts +135 -0
  523. package/dist/src/components/grid/grid.d.ts.map +1 -0
  524. package/dist/src/components/grid/index.d.ts +2 -0
  525. package/dist/src/components/grid/index.d.ts.map +1 -0
  526. package/dist/src/components/input/index.d.ts +19 -0
  527. package/dist/src/components/input/index.d.ts.map +1 -0
  528. package/dist/src/components/input/input-area.d.ts +65 -0
  529. package/dist/src/components/input/input-area.d.ts.map +1 -0
  530. package/dist/src/components/input/input.d.ts +175 -0
  531. package/dist/src/components/input/input.d.ts.map +1 -0
  532. package/dist/src/components/input-group/context.d.ts +96 -0
  533. package/dist/src/components/input-group/context.d.ts.map +1 -0
  534. package/dist/src/components/input-group/index.d.ts +2 -0
  535. package/dist/src/components/input-group/index.d.ts.map +1 -0
  536. package/dist/src/components/input-group/input-group-addon.d.ts +15 -0
  537. package/dist/src/components/input-group/input-group-addon.d.ts.map +1 -0
  538. package/dist/src/components/input-group/input-group-button.d.ts +36 -0
  539. package/dist/src/components/input-group/input-group-button.d.ts.map +1 -0
  540. package/dist/src/components/input-group/input-group-input.d.ts +9 -0
  541. package/dist/src/components/input-group/input-group-input.d.ts.map +1 -0
  542. package/dist/src/components/input-group/input-group-suffix.d.ts +13 -0
  543. package/dist/src/components/input-group/input-group-suffix.d.ts.map +1 -0
  544. package/dist/src/components/input-group/input-group.d.ts +43 -0
  545. package/dist/src/components/input-group/input-group.d.ts.map +1 -0
  546. package/dist/src/components/label/index.d.ts +2 -0
  547. package/dist/src/components/label/index.d.ts.map +1 -0
  548. package/dist/src/components/label/label.d.ts +67 -0
  549. package/dist/src/components/label/label.d.ts.map +1 -0
  550. package/dist/src/components/layer-card/index.d.ts +2 -0
  551. package/dist/src/components/layer-card/index.d.ts.map +1 -0
  552. package/dist/src/components/layer-card/layer-card.d.ts +60 -0
  553. package/dist/src/components/layer-card/layer-card.d.ts.map +1 -0
  554. package/dist/src/components/link/index.d.ts +2 -0
  555. package/dist/src/components/link/index.d.ts.map +1 -0
  556. package/dist/src/components/link/link.d.ts +66 -0
  557. package/dist/src/components/link/link.d.ts.map +1 -0
  558. package/dist/src/components/loader/index.d.ts +3 -0
  559. package/dist/src/components/loader/index.d.ts.map +1 -0
  560. package/dist/src/components/loader/loader.d.ts +70 -0
  561. package/dist/src/components/loader/loader.d.ts.map +1 -0
  562. package/dist/src/components/loader/skeleton-line.d.ts +11 -0
  563. package/dist/src/components/loader/skeleton-line.d.ts.map +1 -0
  564. package/dist/src/components/menubar/index.d.ts +3 -0
  565. package/dist/src/components/menubar/index.d.ts.map +1 -0
  566. package/dist/src/components/menubar/menubar.d.ts +66 -0
  567. package/dist/src/components/menubar/menubar.d.ts.map +1 -0
  568. package/dist/src/components/menubar/use-menu-navigation.d.ts +8 -0
  569. package/dist/src/components/menubar/use-menu-navigation.d.ts.map +1 -0
  570. package/dist/src/components/meter/index.d.ts +2 -0
  571. package/dist/src/components/meter/index.d.ts.map +1 -0
  572. package/dist/src/components/meter/meter.d.ts +44 -0
  573. package/dist/src/components/meter/meter.d.ts.map +1 -0
  574. package/dist/src/components/pagination/index.d.ts +2 -0
  575. package/dist/src/components/pagination/index.d.ts.map +1 -0
  576. package/dist/src/components/pagination/pagination.d.ts +241 -0
  577. package/dist/src/components/pagination/pagination.d.ts.map +1 -0
  578. package/dist/src/components/popover/index.d.ts +3 -0
  579. package/dist/src/components/popover/index.d.ts.map +1 -0
  580. package/dist/src/components/popover/popover.d.ts +178 -0
  581. package/dist/src/components/popover/popover.d.ts.map +1 -0
  582. package/dist/src/components/radio/index.d.ts +2 -0
  583. package/dist/src/components/radio/index.d.ts.map +1 -0
  584. package/dist/src/components/radio/radio.d.ts +277 -0
  585. package/dist/src/components/radio/radio.d.ts.map +1 -0
  586. package/dist/src/components/radio/radio.type-spec.d.ts +12 -0
  587. package/dist/src/components/radio/radio.type-spec.d.ts.map +1 -0
  588. package/dist/src/components/select/index.d.ts +2 -0
  589. package/dist/src/components/select/index.d.ts.map +1 -0
  590. package/dist/src/components/select/select.d.ts +288 -0
  591. package/dist/src/components/select/select.d.ts.map +1 -0
  592. package/dist/src/components/sensitive-input/index.d.ts +2 -0
  593. package/dist/src/components/sensitive-input/index.d.ts.map +1 -0
  594. package/dist/src/components/sensitive-input/sensitive-input.d.ts +94 -0
  595. package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -0
  596. package/dist/src/components/sidebar/index.d.ts +2 -0
  597. package/dist/src/components/sidebar/index.d.ts.map +1 -0
  598. package/dist/src/components/sidebar/sidebar.d.ts +581 -0
  599. package/dist/src/components/sidebar/sidebar.d.ts.map +1 -0
  600. package/dist/src/components/surface/index.d.ts +5 -0
  601. package/dist/src/components/surface/index.d.ts.map +1 -0
  602. package/dist/src/components/surface/surface.d.ts +64 -0
  603. package/dist/src/components/surface/surface.d.ts.map +1 -0
  604. package/dist/src/components/switch/index.d.ts +2 -0
  605. package/dist/src/components/switch/index.d.ts.map +1 -0
  606. package/dist/src/components/switch/switch.d.ts +197 -0
  607. package/dist/src/components/switch/switch.d.ts.map +1 -0
  608. package/dist/src/components/table/index.d.ts +2 -0
  609. package/dist/src/components/table/index.d.ts.map +1 -0
  610. package/dist/src/components/table/table.d.ts +138 -0
  611. package/dist/src/components/table/table.d.ts.map +1 -0
  612. package/dist/src/components/table-of-contents/index.d.ts +2 -0
  613. package/dist/src/components/table-of-contents/index.d.ts.map +1 -0
  614. package/dist/src/components/table-of-contents/table-of-contents.d.ts +72 -0
  615. package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +1 -0
  616. package/dist/src/components/tabs/index.d.ts +3 -0
  617. package/dist/src/components/tabs/index.d.ts.map +1 -0
  618. package/dist/src/components/tabs/tabs.d.ts +116 -0
  619. package/dist/src/components/tabs/tabs.d.ts.map +1 -0
  620. package/dist/src/components/text/index.d.ts +2 -0
  621. package/dist/src/components/text/index.d.ts.map +1 -0
  622. package/dist/src/components/text/text.d.ts +214 -0
  623. package/dist/src/components/text/text.d.ts.map +1 -0
  624. package/dist/src/components/text/text.type-spec.d.ts +44 -0
  625. package/dist/src/components/text/text.type-spec.d.ts.map +1 -0
  626. package/dist/src/components/toast/index.d.ts +5 -0
  627. package/dist/src/components/toast/index.d.ts.map +1 -0
  628. package/dist/src/components/toast/toast.d.ts +197 -0
  629. package/dist/src/components/toast/toast.d.ts.map +1 -0
  630. package/dist/src/components/tooltip/index.d.ts +2 -0
  631. package/dist/src/components/tooltip/index.d.ts.map +1 -0
  632. package/dist/src/components/tooltip/tooltip.d.ts +108 -0
  633. package/dist/src/components/tooltip/tooltip.d.ts.map +1 -0
  634. package/dist/src/index.d.ts +84 -0
  635. package/dist/src/index.d.ts.map +1 -0
  636. package/dist/src/primitives/accordion.d.ts +13 -0
  637. package/dist/src/primitives/accordion.d.ts.map +1 -0
  638. package/dist/src/primitives/alert-dialog.d.ts +13 -0
  639. package/dist/src/primitives/alert-dialog.d.ts.map +1 -0
  640. package/dist/src/primitives/autocomplete.d.ts +13 -0
  641. package/dist/src/primitives/autocomplete.d.ts.map +1 -0
  642. package/dist/src/primitives/avatar.d.ts +13 -0
  643. package/dist/src/primitives/avatar.d.ts.map +1 -0
  644. package/dist/src/primitives/button.d.ts +13 -0
  645. package/dist/src/primitives/button.d.ts.map +1 -0
  646. package/dist/src/primitives/checkbox-group.d.ts +13 -0
  647. package/dist/src/primitives/checkbox-group.d.ts.map +1 -0
  648. package/dist/src/primitives/checkbox.d.ts +13 -0
  649. package/dist/src/primitives/checkbox.d.ts.map +1 -0
  650. package/dist/src/primitives/collapsible.d.ts +13 -0
  651. package/dist/src/primitives/collapsible.d.ts.map +1 -0
  652. package/dist/src/primitives/combobox.d.ts +13 -0
  653. package/dist/src/primitives/combobox.d.ts.map +1 -0
  654. package/dist/src/primitives/context-menu.d.ts +13 -0
  655. package/dist/src/primitives/context-menu.d.ts.map +1 -0
  656. package/dist/src/primitives/csp-provider.d.ts +13 -0
  657. package/dist/src/primitives/csp-provider.d.ts.map +1 -0
  658. package/dist/src/primitives/dialog.d.ts +13 -0
  659. package/dist/src/primitives/dialog.d.ts.map +1 -0
  660. package/dist/src/primitives/direction-provider.d.ts +13 -0
  661. package/dist/src/primitives/direction-provider.d.ts.map +1 -0
  662. package/dist/src/primitives/drawer.d.ts +13 -0
  663. package/dist/src/primitives/drawer.d.ts.map +1 -0
  664. package/dist/src/primitives/field.d.ts +13 -0
  665. package/dist/src/primitives/field.d.ts.map +1 -0
  666. package/dist/src/primitives/fieldset.d.ts +13 -0
  667. package/dist/src/primitives/fieldset.d.ts.map +1 -0
  668. package/dist/src/primitives/form.d.ts +13 -0
  669. package/dist/src/primitives/form.d.ts.map +1 -0
  670. package/dist/src/primitives/index.d.ts +55 -0
  671. package/dist/src/primitives/index.d.ts.map +1 -0
  672. package/dist/src/primitives/input.d.ts +13 -0
  673. package/dist/src/primitives/input.d.ts.map +1 -0
  674. package/dist/src/primitives/menu.d.ts +13 -0
  675. package/dist/src/primitives/menu.d.ts.map +1 -0
  676. package/dist/src/primitives/menubar.d.ts +13 -0
  677. package/dist/src/primitives/menubar.d.ts.map +1 -0
  678. package/dist/src/primitives/meter.d.ts +13 -0
  679. package/dist/src/primitives/meter.d.ts.map +1 -0
  680. package/dist/src/primitives/navigation-menu.d.ts +13 -0
  681. package/dist/src/primitives/navigation-menu.d.ts.map +1 -0
  682. package/dist/src/primitives/number-field.d.ts +13 -0
  683. package/dist/src/primitives/number-field.d.ts.map +1 -0
  684. package/dist/src/primitives/otp-field.d.ts +13 -0
  685. package/dist/src/primitives/otp-field.d.ts.map +1 -0
  686. package/dist/src/primitives/popover.d.ts +13 -0
  687. package/dist/src/primitives/popover.d.ts.map +1 -0
  688. package/dist/src/primitives/preview-card.d.ts +13 -0
  689. package/dist/src/primitives/preview-card.d.ts.map +1 -0
  690. package/dist/src/primitives/progress.d.ts +13 -0
  691. package/dist/src/primitives/progress.d.ts.map +1 -0
  692. package/dist/src/primitives/radio-group.d.ts +13 -0
  693. package/dist/src/primitives/radio-group.d.ts.map +1 -0
  694. package/dist/src/primitives/radio.d.ts +13 -0
  695. package/dist/src/primitives/radio.d.ts.map +1 -0
  696. package/dist/src/primitives/scroll-area.d.ts +13 -0
  697. package/dist/src/primitives/scroll-area.d.ts.map +1 -0
  698. package/dist/src/primitives/select.d.ts +13 -0
  699. package/dist/src/primitives/select.d.ts.map +1 -0
  700. package/dist/src/primitives/separator.d.ts +13 -0
  701. package/dist/src/primitives/separator.d.ts.map +1 -0
  702. package/dist/src/primitives/slider.d.ts +13 -0
  703. package/dist/src/primitives/slider.d.ts.map +1 -0
  704. package/dist/src/primitives/switch.d.ts +13 -0
  705. package/dist/src/primitives/switch.d.ts.map +1 -0
  706. package/dist/src/primitives/tabs.d.ts +13 -0
  707. package/dist/src/primitives/tabs.d.ts.map +1 -0
  708. package/dist/src/primitives/toast.d.ts +13 -0
  709. package/dist/src/primitives/toast.d.ts.map +1 -0
  710. package/dist/src/primitives/toggle-group.d.ts +13 -0
  711. package/dist/src/primitives/toggle-group.d.ts.map +1 -0
  712. package/dist/src/primitives/toggle.d.ts +13 -0
  713. package/dist/src/primitives/toggle.d.ts.map +1 -0
  714. package/dist/src/primitives/toolbar.d.ts +13 -0
  715. package/dist/src/primitives/toolbar.d.ts.map +1 -0
  716. package/dist/src/primitives/tooltip.d.ts +13 -0
  717. package/dist/src/primitives/tooltip.d.ts.map +1 -0
  718. package/dist/src/registry/index.d.ts +8 -0
  719. package/dist/src/registry/index.d.ts.map +1 -0
  720. package/dist/src/registry/types.d.ts +191 -0
  721. package/dist/src/registry/types.d.ts.map +1 -0
  722. package/dist/src/utils/cn.d.ts +4 -0
  723. package/dist/src/utils/cn.d.ts.map +1 -0
  724. package/dist/src/utils/index.d.ts +4 -0
  725. package/dist/src/utils/index.d.ts.map +1 -0
  726. package/dist/src/utils/link-provider.d.ts +66 -0
  727. package/dist/src/utils/link-provider.d.ts.map +1 -0
  728. package/dist/src/utils/portal-provider.d.ts +56 -0
  729. package/dist/src/utils/portal-provider.d.ts.map +1 -0
  730. package/dist/src/utils/prop-examples.d.ts +36 -0
  731. package/dist/src/utils/prop-examples.d.ts.map +1 -0
  732. package/dist/src/utils/resolve-variant.d.ts +27 -0
  733. package/dist/src/utils/resolve-variant.d.ts.map +1 -0
  734. package/dist/styles/reki-binding.css +303 -0
  735. package/dist/styles/reki-standalone.css +2 -0
  736. package/dist/styles/reki.css +700 -0
  737. package/dist/styles/theme-fedramp.css +39 -0
  738. package/dist/styles/theme-reki.css +412 -0
  739. package/dist/utils.js +12 -0
  740. package/dist/utils.js.map +1 -0
  741. package/package.json +511 -0
  742. package/scripts/component-registry/cache.ts +123 -0
  743. package/scripts/component-registry/discovery.ts +469 -0
  744. package/scripts/component-registry/example-cleanup.ts +168 -0
  745. package/scripts/component-registry/index.test.ts +987 -0
  746. package/scripts/component-registry/index.ts +970 -0
  747. package/scripts/component-registry/markdown-generator.ts +222 -0
  748. package/scripts/component-registry/metadata.ts +956 -0
  749. package/scripts/component-registry/props-filter.ts +310 -0
  750. package/scripts/component-registry/schema-generator.ts +331 -0
  751. package/scripts/component-registry/sub-components.ts +380 -0
  752. package/scripts/component-registry/types.ts +158 -0
  753. package/scripts/component-registry/utils.ts +280 -0
  754. package/scripts/component-registry/variant-parser.ts +261 -0
  755. package/scripts/css-build.ts +105 -0
  756. package/scripts/generate-primitives.ts +183 -0
  757. package/scripts/theme-generator/config.ts +653 -0
  758. package/scripts/theme-generator/generate-css.test.ts +30 -0
  759. package/scripts/theme-generator/generate-css.ts +351 -0
  760. package/scripts/theme-generator/index.ts +159 -0
  761. package/scripts/theme-generator/migrate.ts +560 -0
  762. package/scripts/theme-generator/types.ts +92 -0
@@ -0,0 +1,970 @@
1
+ /**
2
+ * Component Metadata Generator for AI/Agent Consumption
3
+ *
4
+ * This script auto-discovers components from the filesystem and uses
5
+ * ts-json-schema-generator to derive props directly from TypeScript types,
6
+ * then enriches with variant descriptions from REKI_*_VARIANTS.
7
+ *
8
+ * Components are auto-discovered from src/components/ subdirectories.
9
+ * Each component must export REKI_<NAME>_VARIANTS and REKI_<NAME>_DEFAULT_VARIANTS
10
+ *
11
+ * Run: pnpm codegen:registry
12
+ * Output: ai/component-registry.json (committed to git)
13
+ *
14
+ * Performance optimizations:
15
+ * - Hash-based caching: Skip regeneration for unchanged components
16
+ * - Parallel processing: Process components concurrently (8 at a time)
17
+ * - Skip inherited props by default: Opt-in with --inherited-props flag
18
+ */
19
+
20
+ import { writeFileSync, mkdirSync, readFileSync } from "node:fs";
21
+ import { dirname, join } from "node:path";
22
+ import { fileURLToPath } from "node:url";
23
+ import * as tsj from "ts-json-schema-generator";
24
+ import type { Definition } from "ts-json-schema-generator";
25
+
26
+ // Internal module imports
27
+ import type {
28
+ CLIFlags,
29
+ CacheFile,
30
+ ComponentConfig,
31
+ ComponentSchema,
32
+ PropSchema,
33
+ SubComponentSchema,
34
+ ProcessComponentResult,
35
+ GenerateRegistryResult,
36
+ } from "./types.js";
37
+ import type { BlockSchema } from "../../src/registry/types.js";
38
+ import {
39
+ CACHE_VERSION,
40
+ loadCache,
41
+ saveCache,
42
+ getCachedComponent,
43
+ hashFileContent,
44
+ createCacheEntry,
45
+ } from "./cache.js";
46
+ import {
47
+ toPascalCase,
48
+ toScreamingSnakeCase,
49
+ extractSemanticColors,
50
+ extractBlockDependencies,
51
+ getBlockFiles,
52
+ } from "./utils.js";
53
+ import { discoverComponents, discoverBlocks } from "./discovery.js";
54
+ import { shouldSkipProp } from "./props-filter.js";
55
+ import {
56
+ detectSubComponents,
57
+ extractSubComponentProps,
58
+ } from "./sub-components.js";
59
+ import { generateAIContext } from "./markdown-generator.js";
60
+ import { generateSchemasFile } from "./schema-generator.js";
61
+ import {
62
+ PASSTHROUGH_COMPONENT_DOCS,
63
+ ADDITIONAL_COMPONENT_PROPS,
64
+ PROP_TYPE_OVERRIDES,
65
+ COMPONENT_STYLING_METADATA,
66
+ SUB_COMPONENT_OVERRIDES,
67
+ } from "./metadata.js";
68
+
69
+ // External imports - demo examples from reki-docs-astro
70
+ import { existsSync } from "node:fs";
71
+
72
+ // Type for demo metadata (matches reki-docs-astro output)
73
+ interface DemoMetadata {
74
+ generatedAt: string;
75
+ version: string;
76
+ components: Record<
77
+ string,
78
+ {
79
+ componentName: string;
80
+ sourceFile: string;
81
+ demos: Array<{
82
+ name: string;
83
+ code: string;
84
+ description?: string;
85
+ }>;
86
+ }
87
+ >;
88
+ }
89
+
90
+ /**
91
+ * Load demo examples from reki-docs-astro's generated metadata file.
92
+ * Returns a map compatible with the existing storyExamples interface.
93
+ */
94
+ function loadDemoExamples(): Map<string, { aiExamples: string[] }> {
95
+ const demoMetadataPath = join(
96
+ __dirname,
97
+ "../../../reki-docs-astro/dist/demo-metadata.json",
98
+ );
99
+
100
+ if (!existsSync(demoMetadataPath)) {
101
+ console.warn(
102
+ `Warning: demo-metadata.json not found at ${demoMetadataPath}`,
103
+ );
104
+ console.warn(
105
+ "Run 'pnpm --filter @cloudraker/reki-docs-astro codegen:demos' first",
106
+ );
107
+ return new Map();
108
+ }
109
+
110
+ const metadata: DemoMetadata = JSON.parse(
111
+ readFileSync(demoMetadataPath, "utf-8"),
112
+ );
113
+
114
+ const examples = new Map<string, { aiExamples: string[] }>();
115
+
116
+ for (const [componentName, data] of Object.entries(metadata.components)) {
117
+ examples.set(componentName, {
118
+ aiExamples: data.demos.map((demo) => demo.code),
119
+ });
120
+ }
121
+
122
+ return examples;
123
+ }
124
+
125
+ const __dirname = dirname(fileURLToPath(import.meta.url));
126
+ const componentsDir = join(__dirname, "../../src/components");
127
+ const blocksDir = join(__dirname, "../../src/blocks");
128
+ const rootDir = join(__dirname, "../..");
129
+ const cacheDir = join(__dirname, "../../.cache");
130
+ const cachePath = join(cacheDir, "component-registry-cache.json");
131
+
132
+ // =============================================================================
133
+ // CLI Flags
134
+ // =============================================================================
135
+
136
+ function parseCLIFlags(): CLIFlags {
137
+ const args = process.argv.slice(2);
138
+ return {
139
+ includeInheritedProps: args.includes("--inherited-props"),
140
+ noCache: args.includes("--no-cache"),
141
+ verbose: args.includes("--verbose"),
142
+ };
143
+ }
144
+
145
+ const CLI_FLAGS = parseCLIFlags();
146
+
147
+ // =============================================================================
148
+ // JSON Schema Type Conversion
149
+ // =============================================================================
150
+
151
+ function jsonSchemaTypeToString(def: Definition): string {
152
+ if (def.$ref) {
153
+ // Extract type name from $ref like "#/definitions/ReactNode"
154
+ const refName = decodeURIComponent(def.$ref.split("/").pop() || "unknown");
155
+ // Simplify common React types
156
+ if (refName.includes("ReactNode") || refName.includes("ReactElement")) {
157
+ return "ReactNode";
158
+ }
159
+ return refName;
160
+ }
161
+ if (def.enum) {
162
+ return "enum";
163
+ }
164
+ if (def.type === "array") {
165
+ const itemType = def.items
166
+ ? jsonSchemaTypeToString(def.items as Definition)
167
+ : "unknown";
168
+ return `${itemType}[]`;
169
+ }
170
+ if (def.anyOf || def.oneOf) {
171
+ const types = (def.anyOf || def.oneOf) as Definition[];
172
+ const typeStrings = types
173
+ .map((t) => jsonSchemaTypeToString(t))
174
+ .filter((t) => t !== "undefined" && t !== "null");
175
+ // Simplify if it includes ReactNode variants
176
+ if (typeStrings.some((t) => t.includes("React"))) {
177
+ return "ReactNode";
178
+ }
179
+ return typeStrings.join(" | ");
180
+ }
181
+ if (def.type) {
182
+ return Array.isArray(def.type) ? def.type.join(" | ") : def.type;
183
+ }
184
+ return "unknown";
185
+ }
186
+
187
+ /**
188
+ * Resolve a $ref to its actual definition.
189
+ * Returns the resolved definition or the original if no $ref.
190
+ */
191
+ function resolveRef(
192
+ def: Definition,
193
+ allDefinitions?: Record<string, Definition>,
194
+ ): Definition {
195
+ if (!def.$ref || !allDefinitions) {
196
+ return def;
197
+ }
198
+ const refName = decodeURIComponent(def.$ref.split("/").pop() || "");
199
+ const resolved = allDefinitions[refName];
200
+ return resolved || def;
201
+ }
202
+
203
+ function convertToPropSchema(
204
+ propName: string,
205
+ def: Definition,
206
+ required: boolean,
207
+ // biome-ignore lint/suspicious/noExplicitAny: Variants have varying shapes
208
+ variants?: Record<string, Record<string, any>>,
209
+ defaults?: Record<string, string>,
210
+ allDefinitions?: Record<string, Definition>,
211
+ ): PropSchema {
212
+ // Resolve $ref to get the actual definition (for enum detection)
213
+ const resolvedDef = resolveRef(def, allDefinitions);
214
+
215
+ const prop: PropSchema = {
216
+ type: jsonSchemaTypeToString(def),
217
+ };
218
+
219
+ if (required) {
220
+ prop.required = true;
221
+ } else {
222
+ prop.optional = true;
223
+ }
224
+
225
+ if (def.description) {
226
+ prop.description = def.description;
227
+ }
228
+
229
+ // Handle enums - check both original def and resolved def (for $ref cases)
230
+ if (def.enum) {
231
+ prop.values = def.enum as string[];
232
+ prop.type = "enum";
233
+ } else if (resolvedDef.enum) {
234
+ // Enum found via $ref resolution (e.g., RekiCodeLang)
235
+ prop.values = resolvedDef.enum as string[];
236
+ prop.type = "enum";
237
+ }
238
+
239
+ // Enrich with variant descriptions and classes if this prop is a variant
240
+ if (variants && propName in variants) {
241
+ const variantDef = variants[propName];
242
+ prop.values = Object.keys(variantDef);
243
+ prop.type = "enum";
244
+
245
+ const descriptions: Record<string, string> = {};
246
+ const classes: Record<string, string> = {};
247
+ const stateClassesMap: Record<string, Record<string, string>> = {};
248
+
249
+ for (const [key, val] of Object.entries(variantDef)) {
250
+ if (val.description) {
251
+ descriptions[key] = val.description;
252
+ }
253
+ if (val.classes) {
254
+ classes[key] = val.classes;
255
+ }
256
+ if (val.stateClasses) {
257
+ stateClassesMap[key] = val.stateClasses;
258
+ }
259
+ }
260
+
261
+ if (Object.keys(descriptions).length > 0) {
262
+ prop.descriptions = descriptions;
263
+ }
264
+ if (Object.keys(classes).length > 0) {
265
+ prop.classes = classes;
266
+ }
267
+ if (Object.keys(stateClassesMap).length > 0) {
268
+ prop.stateClasses = stateClassesMap;
269
+ }
270
+ }
271
+
272
+ // Add default value from variants defaults
273
+ if (defaults && propName in defaults) {
274
+ prop.default = defaults[propName];
275
+ }
276
+
277
+ return prop;
278
+ }
279
+
280
+ // =============================================================================
281
+ // Props Generation from TypeScript Types
282
+ // =============================================================================
283
+
284
+ /** Derive propsType from component name */
285
+ function getPropsType(config: ComponentConfig): string {
286
+ return config.propsType ?? `${config.name}Props`;
287
+ }
288
+
289
+ /** Derive sourceFile from component config */
290
+ function getSourceFile(config: ComponentConfig): string {
291
+ return config.sourceFile;
292
+ }
293
+
294
+ function generatePropsFromType(
295
+ config: ComponentConfig,
296
+ ): Record<string, PropSchema> {
297
+ const sourceFile = getSourceFile(config);
298
+ const propsType = getPropsType(config);
299
+ const sourcePath = join(config.sourceDir, sourceFile);
300
+
301
+ try {
302
+ const tsjConfig: tsj.Config = {
303
+ path: sourcePath,
304
+ tsconfig: join(rootDir, "tsconfig.json"),
305
+ type: propsType,
306
+ skipTypeCheck: true,
307
+ expose: "all",
308
+ };
309
+
310
+ const schema = tsj.createGenerator(tsjConfig).createSchema(propsType);
311
+ const props: Record<string, PropSchema> = {};
312
+
313
+ // Get the main type definition, following $ref if needed
314
+ let mainDef = schema.definitions?.[propsType] as Definition;
315
+ if (!mainDef) {
316
+ console.warn(`Warning: Could not find type ${propsType}`);
317
+ return {};
318
+ }
319
+
320
+ // Follow $ref chain to get the actual definition
321
+ // This handles cases like: ExpandableProps -> React.PropsWithChildren<...>
322
+ while (
323
+ mainDef.$ref &&
324
+ !mainDef.properties &&
325
+ !mainDef.allOf &&
326
+ !mainDef.anyOf &&
327
+ !mainDef.oneOf
328
+ ) {
329
+ const refName = decodeURIComponent(mainDef.$ref.split("/").pop()!);
330
+ const refDef = schema.definitions?.[refName] as Definition;
331
+ if (!refDef) break;
332
+ mainDef = refDef;
333
+ }
334
+
335
+ // Helper: collect properties and required fields from a schema part
336
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
337
+ function collectFromParts(parts: Definition[]): {
338
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
339
+ properties: Record<string, any>;
340
+ required: string[];
341
+ } {
342
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
343
+ let properties: Record<string, any> = {};
344
+ let required: string[] = [];
345
+
346
+ for (const part of parts) {
347
+ if (part.$ref) {
348
+ const refName = decodeURIComponent(part.$ref.split("/").pop()!);
349
+ const refDef = schema.definitions?.[refName] as Definition;
350
+ if (refDef?.properties) {
351
+ properties = { ...properties, ...refDef.properties };
352
+ }
353
+ if (refDef?.required) {
354
+ required = [...required, ...(refDef.required as string[])];
355
+ }
356
+ // Recursively handle nested allOf/anyOf in referenced definitions
357
+ if (refDef?.allOf) {
358
+ const nested = collectFromParts(refDef.allOf as Definition[]);
359
+ properties = { ...properties, ...nested.properties };
360
+ required = [...required, ...nested.required];
361
+ }
362
+ } else if (part.properties) {
363
+ properties = { ...properties, ...part.properties };
364
+ if (part.required) {
365
+ required = [...required, ...(part.required as string[])];
366
+ }
367
+ }
368
+ }
369
+ return { properties, required };
370
+ }
371
+
372
+ // Handle intersection types (allOf) - merge all properties
373
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
374
+ let allProperties: Record<string, any> = {};
375
+ let allRequired: string[] = [];
376
+
377
+ if (mainDef.allOf) {
378
+ const result = collectFromParts(mainDef.allOf as Definition[]);
379
+ allProperties = result.properties;
380
+ allRequired = result.required;
381
+ } else if (mainDef.anyOf || mainDef.oneOf) {
382
+ // Handle union types (anyOf/oneOf) — e.g. discriminated unions like ButtonProps
383
+ // Merge properties from all union members. Properties that only appear in
384
+ // some members are marked as optional.
385
+ const unionMembers = (mainDef.anyOf || mainDef.oneOf) as Definition[];
386
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
387
+ const memberProps: Array<{
388
+ // biome-ignore lint/suspicious/noExplicitAny: JSON Schema types are complex
389
+ properties: Record<string, any>;
390
+ required: string[];
391
+ }> = [];
392
+
393
+ for (const member of unionMembers) {
394
+ const collected = collectFromParts([member]);
395
+ memberProps.push(collected);
396
+ }
397
+
398
+ // Merge all member properties
399
+ for (const mp of memberProps) {
400
+ allProperties = { ...allProperties, ...mp.properties };
401
+ }
402
+
403
+ // A prop is required only if it's required in ALL union members
404
+ const allPropNames = Object.keys(allProperties);
405
+ allRequired = allPropNames.filter((prop) =>
406
+ memberProps.every((mp) => mp.required.includes(prop)),
407
+ );
408
+ } else if (mainDef.properties) {
409
+ allProperties = mainDef.properties;
410
+ allRequired = (mainDef.required as string[]) || [];
411
+ }
412
+
413
+ // Convert each property
414
+ for (const [propName, propDef] of Object.entries(allProperties)) {
415
+ // Skip internal React props and inherited DOM props we don't want to expose
416
+ if (shouldSkipProp(propName, CLI_FLAGS)) {
417
+ continue;
418
+ }
419
+
420
+ props[propName] = convertToPropSchema(
421
+ propName,
422
+ propDef as Definition,
423
+ allRequired.includes(propName),
424
+ config.variants,
425
+ config.defaults,
426
+ schema.definitions as Record<string, Definition>,
427
+ );
428
+ }
429
+
430
+ return props;
431
+ } catch (error) {
432
+ console.warn(
433
+ `Warning: Could not generate schema for ${getPropsType(config)}:`,
434
+ error,
435
+ );
436
+ // Fallback: generate props from variants only
437
+ return generatePropsFromVariantsOnly(config);
438
+ }
439
+ }
440
+
441
+ /**
442
+ * Fallback props generation when ts-json-schema-generator fails.
443
+ * Extracts props from the REKI_*_VARIANTS object only.
444
+ * This is useful for components with complex generic types.
445
+ */
446
+ function generatePropsFromVariantsOnly(
447
+ config: ComponentConfig,
448
+ ): Record<string, PropSchema> {
449
+ const props: Record<string, PropSchema> = {};
450
+
451
+ // Add variant props from the config
452
+ for (const [propName, variantDef] of Object.entries(config.variants)) {
453
+ const values = Object.keys(variantDef);
454
+ const descriptions: Record<string, string> = {};
455
+ const classes: Record<string, string> = {};
456
+ const stateClassesMap: Record<string, Record<string, string>> = {};
457
+
458
+ for (const [key, val] of Object.entries(variantDef)) {
459
+ if (val.description) {
460
+ descriptions[key] = val.description;
461
+ }
462
+ if (val.classes) {
463
+ classes[key] = val.classes;
464
+ }
465
+ if (val.stateClasses) {
466
+ stateClassesMap[key] = val.stateClasses;
467
+ }
468
+ }
469
+
470
+ props[propName] = {
471
+ type: "enum",
472
+ values,
473
+ ...(config.defaults[propName] && { default: config.defaults[propName] }),
474
+ ...(Object.keys(descriptions).length > 0 && { descriptions }),
475
+ ...(Object.keys(classes).length > 0 && { classes }),
476
+ ...(Object.keys(stateClassesMap).length > 0 && {
477
+ stateClasses: stateClassesMap,
478
+ }),
479
+ };
480
+ }
481
+
482
+ // Add common props that most components have
483
+ props.className = { type: "string", description: "Additional CSS classes" };
484
+ props.children = { type: "ReactNode", description: "Child elements" };
485
+
486
+ console.log(
487
+ ` → Fallback: generated ${Object.keys(props).length} props from variants`,
488
+ );
489
+ return props;
490
+ }
491
+
492
+ // =============================================================================
493
+ // Process Individual Component
494
+ // =============================================================================
495
+
496
+ interface ProcessComponentInput {
497
+ config: ComponentConfig;
498
+ variantConstants: Map<string, string[]>;
499
+ storyExamples: Map<string, { aiExamples: string[] }>;
500
+ cache: CacheFile;
501
+ }
502
+
503
+ async function processComponent(
504
+ input: ProcessComponentInput,
505
+ ): Promise<ProcessComponentResult> {
506
+ const { config, cache } = input;
507
+ const sourcePath = join(config.sourceDir, getSourceFile(config));
508
+ const storyPath = join(
509
+ config.sourceDir,
510
+ config.dirName,
511
+ `${config.dirName}.stories.tsx`,
512
+ );
513
+
514
+ // Compute hashes for cache checking
515
+ const sourceHash = hashFileContent(sourcePath);
516
+ const storyHash = hashFileContent(storyPath);
517
+
518
+ // Check cache
519
+ const cachedMetadata = getCachedComponent(
520
+ config.name,
521
+ sourceHash,
522
+ storyHash,
523
+ cache,
524
+ CLI_FLAGS,
525
+ );
526
+
527
+ if (cachedMetadata) {
528
+ if (CLI_FLAGS.verbose) {
529
+ console.log(` ✓ ${config.name} (cached)`);
530
+ } else {
531
+ console.log(`✓ ${config.name} (cached)`);
532
+ }
533
+ const colors = extractSemanticColors(sourcePath);
534
+ return {
535
+ name: config.name,
536
+ category: config.category,
537
+ schema: cachedMetadata,
538
+ colors,
539
+ cached: true,
540
+ cacheEntry: {
541
+ componentName: config.name,
542
+ sourceHash,
543
+ storyHash,
544
+ cacheVersion: CACHE_VERSION,
545
+ generatedAt: cache.entries[config.name]?.generatedAt || Date.now(),
546
+ metadata: cachedMetadata,
547
+ },
548
+ };
549
+ }
550
+
551
+ // Not cached, regenerate
552
+ if (CLI_FLAGS.verbose) {
553
+ console.log(` → ${config.name} (regenerating)`);
554
+ } else {
555
+ console.log(`→ ${config.name} (regenerating)`);
556
+ }
557
+
558
+ const props = generatePropsFromType(config);
559
+
560
+ // Inject additional props for components with important inherited props
561
+ const additionalProps = ADDITIONAL_COMPONENT_PROPS[config.name];
562
+ if (additionalProps) {
563
+ for (const [propName, propSchema] of Object.entries(additionalProps)) {
564
+ if (!props[propName]) {
565
+ props[propName] = propSchema;
566
+ } else {
567
+ if (propSchema.type) {
568
+ props[propName].type = propSchema.type;
569
+ }
570
+ if (propSchema.description) {
571
+ props[propName].description = propSchema.description;
572
+ }
573
+ }
574
+ }
575
+ }
576
+
577
+ // Apply type overrides
578
+ const typeOverrides = PROP_TYPE_OVERRIDES[config.name];
579
+ if (typeOverrides) {
580
+ for (const [propName, newType] of Object.entries(typeOverrides)) {
581
+ if (props[propName]) {
582
+ props[propName].type = newType;
583
+ }
584
+ }
585
+ }
586
+
587
+ const colors = extractSemanticColors(sourcePath);
588
+
589
+ // Determine examples
590
+ // Demo metadata keys are derived from file names (e.g. DropdownDemo.tsx → "Dropdown")
591
+ // which may differ from the component's export name (e.g. "DropdownMenu").
592
+ // Try the component name first, then fall back to the PascalCase directory name.
593
+ let examples: readonly string[];
594
+ if (config.examples !== undefined) {
595
+ examples = config.examples;
596
+ } else {
597
+ const extracted =
598
+ input.storyExamples.get(config.name) ??
599
+ input.storyExamples.get(toPascalCase(config.dirName));
600
+ examples = extracted?.aiExamples ?? [];
601
+ if (examples.length > 0 && CLI_FLAGS.verbose) {
602
+ console.log(
603
+ ` → Auto-extracted ${examples.length} examples from stories`,
604
+ );
605
+ }
606
+ }
607
+
608
+ // Merge SUB_COMPONENT_OVERRIDES after source detection.
609
+ // Detected entries win on name conflict so source-level patterns aren't masked.
610
+ const detectedSubComponents = detectSubComponents(sourcePath);
611
+ const subComponentOverrides = SUB_COMPONENT_OVERRIDES[config.name] ?? [];
612
+ const detectedNames = new Set(detectedSubComponents.map((sc) => sc.name));
613
+ const mergedSubComponents = [
614
+ ...detectedSubComponents,
615
+ ...subComponentOverrides.filter((o) => !detectedNames.has(o.name)),
616
+ ];
617
+ let subComponentSchemas: Record<string, SubComponentSchema> | undefined;
618
+
619
+ if (mergedSubComponents.length > 0) {
620
+ subComponentSchemas = {};
621
+
622
+ for (const subComp of mergedSubComponents) {
623
+ let subProps = extractSubComponentProps(sourcePath, subComp, CLI_FLAGS);
624
+ let description = subComp.description;
625
+ let usageExamples: string[] | undefined;
626
+ let renderElement: string | undefined;
627
+
628
+ // Inject additional props for sub-components (e.g., "InputGroup.Input")
629
+ const subAdditionalProps =
630
+ ADDITIONAL_COMPONENT_PROPS[`${config.name}.${subComp.name}`];
631
+ if (subAdditionalProps) {
632
+ for (const [propName, propSchema] of Object.entries(
633
+ subAdditionalProps,
634
+ )) {
635
+ subProps[propName] = {
636
+ ...subProps[propName],
637
+ ...propSchema,
638
+ };
639
+ }
640
+ }
641
+
642
+ if (subComp.isPassThrough && subComp.baseComponent) {
643
+ const passthroughDoc =
644
+ PASSTHROUGH_COMPONENT_DOCS[subComp.baseComponent];
645
+ if (passthroughDoc) {
646
+ description = passthroughDoc.description;
647
+ subProps = passthroughDoc.props;
648
+ usageExamples = passthroughDoc.usageExamples;
649
+ renderElement = passthroughDoc.renderElement;
650
+ }
651
+ }
652
+
653
+ subComponentSchemas[subComp.name] = {
654
+ name: subComp.name,
655
+ description,
656
+ props: subProps,
657
+ ...(subComp.isPassThrough && { isPassThrough: true }),
658
+ ...(subComp.baseComponent && { baseComponent: subComp.baseComponent }),
659
+ ...(usageExamples && { usageExamples }),
660
+ ...(renderElement && { renderElement }),
661
+ };
662
+ }
663
+
664
+ if (CLI_FLAGS.verbose && Object.keys(subComponentSchemas).length > 0) {
665
+ console.log(
666
+ ` → Processed ${Object.keys(subComponentSchemas).length} sub-components`,
667
+ );
668
+ }
669
+ }
670
+
671
+ // Get styling metadata - prefer extracted from component file, fallback to hardcoded metadata
672
+ const stylingMetadata =
673
+ config.styling ?? COMPONENT_STYLING_METADATA[config.name];
674
+
675
+ const schema: ComponentSchema = {
676
+ name: config.name,
677
+ type: config.type,
678
+ description: config.description,
679
+ importPath: "@cloudraker/reki",
680
+ category: config.category,
681
+ props,
682
+ examples,
683
+ colors,
684
+ ...(config.baseStyles && { baseStyles: config.baseStyles }),
685
+ ...(subComponentSchemas && { subComponents: subComponentSchemas }),
686
+ ...(stylingMetadata && { styling: stylingMetadata }),
687
+ };
688
+
689
+ return {
690
+ name: config.name,
691
+ category: config.category,
692
+ schema,
693
+ colors,
694
+ cached: false,
695
+ cacheEntry: createCacheEntry(config.name, sourceHash, storyHash, schema),
696
+ };
697
+ }
698
+
699
+ // =============================================================================
700
+ // Parallel Processing
701
+ // =============================================================================
702
+
703
+ async function processComponentsInParallel(
704
+ configs: ComponentConfig[],
705
+ variantConstants: Map<string, string[]>,
706
+ storyExamples: Map<string, { aiExamples: string[] }>,
707
+ cache: CacheFile,
708
+ ): Promise<ProcessComponentResult[]> {
709
+ const BATCH_SIZE = 8; // Process 8 components concurrently
710
+ const results: ProcessComponentResult[] = [];
711
+
712
+ for (let i = 0; i < configs.length; i += BATCH_SIZE) {
713
+ const batch = configs.slice(i, i + BATCH_SIZE);
714
+ const batchResults = await Promise.all(
715
+ batch.map((config) =>
716
+ processComponent({ config, variantConstants, storyExamples, cache }),
717
+ ),
718
+ );
719
+ results.push(...batchResults);
720
+ }
721
+
722
+ return results;
723
+ }
724
+
725
+ // =============================================================================
726
+ // Generate Registry
727
+ // =============================================================================
728
+
729
+ async function generateRegistry(): Promise<GenerateRegistryResult> {
730
+ const startTime = Date.now();
731
+
732
+ // Auto-discover components and blocks from filesystem
733
+ const COMPONENTS = await discoverComponents(componentsDir);
734
+ console.log(`\nDiscovered ${COMPONENTS.length} components`);
735
+
736
+ const BLOCKS = await discoverBlocks(blocksDir);
737
+ console.log(`Discovered ${BLOCKS.length} blocks`);
738
+
739
+ // Load cache
740
+ const cache = loadCache(cachePath);
741
+ if (!CLI_FLAGS.noCache) {
742
+ const cachedCount = Object.keys(cache.entries).length;
743
+ console.log(`Loaded cache with ${cachedCount} entries`);
744
+ }
745
+
746
+ // Build variant constants map for propTester parsing (components + blocks)
747
+ const variantConstants = new Map<string, string[]>();
748
+ for (const config of [...COMPONENTS, ...BLOCKS]) {
749
+ const constName = `REKI_${toScreamingSnakeCase(config.name)}_VARIANTS`;
750
+ for (const [propName, propVariants] of Object.entries(config.variants)) {
751
+ if (typeof propVariants === "object" && propVariants !== null) {
752
+ variantConstants.set(
753
+ `${constName}.${propName}`,
754
+ Object.keys(propVariants),
755
+ );
756
+ }
757
+ }
758
+ }
759
+
760
+ // Load examples from demo files (reki-docs-astro)
761
+ console.log("\nLoading examples from demo files...");
762
+ const storyExamples = loadDemoExamples();
763
+
764
+ // Process components in parallel
765
+ console.log("\nProcessing components...");
766
+ const componentResults = await processComponentsInParallel(
767
+ COMPONENTS,
768
+ variantConstants,
769
+ storyExamples,
770
+ cache,
771
+ );
772
+
773
+ // Process blocks in parallel
774
+ console.log("\nProcessing blocks...");
775
+ const blockResults = await processComponentsInParallel(
776
+ BLOCKS,
777
+ variantConstants,
778
+ storyExamples,
779
+ cache,
780
+ );
781
+
782
+ // Combine and sort results by name for deterministic output
783
+ const allResults = [...componentResults, ...blockResults];
784
+ allResults.sort((a, b) => a.name.localeCompare(b.name));
785
+
786
+ // Build registry from results
787
+ const components: Record<string, ComponentSchema> = {};
788
+ const blocks: Record<string, BlockSchema> = {};
789
+ const byCategory: Record<string, string[]> = {};
790
+ const byType: Record<string, string[]> = { component: [], block: [] };
791
+ const componentColors = new Map<string, string[]>();
792
+ const newCache: CacheFile = {
793
+ version: CACHE_VERSION,
794
+ entries: {},
795
+ };
796
+
797
+ for (const result of componentResults) {
798
+ components[result.name] = result.schema;
799
+ componentColors.set(result.name, result.colors);
800
+ byType.component.push(result.name);
801
+
802
+ if (!byCategory[result.category]) {
803
+ byCategory[result.category] = [];
804
+ }
805
+ byCategory[result.category].push(result.name);
806
+
807
+ // Store in new cache
808
+ newCache.entries[result.name] = result.cacheEntry;
809
+ }
810
+
811
+ // Process block results and build BlockSchema with files and dependencies
812
+ for (const result of blockResults) {
813
+ const blockConfig = BLOCKS.find((b) => b.name === result.name)!;
814
+ const mainFilePath = join(blockConfig.sourceDir, blockConfig.sourceFile);
815
+
816
+ // Extract dependencies and files
817
+ const dependencies = extractBlockDependencies(mainFilePath);
818
+ const files = getBlockFiles(blockConfig.sourceDir, blockConfig.dirName);
819
+
820
+ blocks[result.name] = {
821
+ ...result.schema,
822
+ type: "block",
823
+ files,
824
+ dependencies,
825
+ };
826
+ componentColors.set(result.name, result.colors);
827
+ byType.block.push(result.name);
828
+
829
+ if (!byCategory[result.category]) {
830
+ byCategory[result.category] = [];
831
+ }
832
+ byCategory[result.category].push(result.name);
833
+
834
+ // Store in new cache
835
+ newCache.entries[result.name] = result.cacheEntry;
836
+ }
837
+
838
+ // Save updated cache
839
+ saveCache(newCache, cachePath, cacheDir);
840
+
841
+ // Add InputArea as a synthetic component (uses Input's variants but has its own dimensions)
842
+ // InputArea doesn't exist as a separate component file but needs registry metadata for Figma plugin
843
+ if (COMPONENT_STYLING_METADATA.InputArea) {
844
+ components.InputArea = {
845
+ name: "InputArea",
846
+ type: "component",
847
+ description:
848
+ "Multi-line textarea input with Input variants and InputArea-specific dimensions",
849
+ importPath: "@cloudraker/reki (synthetic - uses Input component)",
850
+ category: "Input",
851
+ props: {}, // Uses Input's props
852
+ styling: COMPONENT_STYLING_METADATA.InputArea,
853
+ examples: [],
854
+ colors: [],
855
+ };
856
+ // Add to Input category
857
+ if (!byCategory.Input) {
858
+ byCategory.Input = [];
859
+ }
860
+ // Don't add to byName search (it's a synthetic entry for Figma plugin only)
861
+ }
862
+
863
+ const elapsed = ((Date.now() - startTime) / 1000).toFixed(2);
864
+ const cached = allResults.filter((r) => r.cached).length;
865
+ const regenerated = allResults.length - cached;
866
+
867
+ console.log(
868
+ `\n✓ Completed in ${elapsed}s (${cached} cached, ${regenerated} regenerated)`,
869
+ );
870
+
871
+ return {
872
+ registry: {
873
+ version: "1.0.0",
874
+ components,
875
+ blocks,
876
+ search: {
877
+ byCategory,
878
+ byName: allResults.map((r) => r.name),
879
+ byType,
880
+ },
881
+ },
882
+ componentColors,
883
+ };
884
+ }
885
+
886
+ // =============================================================================
887
+ // Main
888
+ // =============================================================================
889
+
890
+ function printHelp() {
891
+ console.log(`
892
+ Reki Component Registry Generator
893
+
894
+ Usage:
895
+ pnpm build:ai-metadata [options]
896
+
897
+ Options:
898
+ --inherited-props Include inherited HTML props (SLOW: adds ~15s)
899
+ Default: false (uses minimal static skip list)
900
+ --no-cache Force full regeneration, ignore cache
901
+ Default: false (uses hash-based cache)
902
+ --verbose Show detailed timing and processing info
903
+ Default: false
904
+ --help Show this help message
905
+
906
+ Examples:
907
+ pnpm build:ai-metadata # Fast build with cache
908
+ pnpm build:ai-metadata --no-cache # Full rebuild
909
+ pnpm build:ai-metadata --inherited-props # Include all HTML props
910
+ pnpm build:ai-metadata --verbose # Show detailed logs
911
+
912
+ Performance:
913
+ - Hash-based caching: Skips unchanged components (~1s incremental)
914
+ - Parallel processing: Processes 8 components concurrently
915
+ - Skip inherited props: Saves ~15s (47% of total time)
916
+
917
+ Target: <10s cold build, <1s incremental build
918
+ `);
919
+ }
920
+
921
+ async function main() {
922
+ // Handle --help flag
923
+ if (process.argv.includes("--help") || process.argv.includes("-h")) {
924
+ printHelp();
925
+ return;
926
+ }
927
+
928
+ console.log("Reki Component Registry Generator");
929
+ console.log("==================================");
930
+ console.log(
931
+ `Flags: ${CLI_FLAGS.includeInheritedProps ? "inherited-props" : "skip-inherited"} | ${CLI_FLAGS.noCache ? "no-cache" : "cache"} | ${CLI_FLAGS.verbose ? "verbose" : "quiet"}`,
932
+ );
933
+
934
+ const { registry, componentColors } = await generateRegistry();
935
+ const aiContext = generateAIContext(registry, componentColors);
936
+ const schemasContent = generateSchemasFile(registry);
937
+
938
+ // Ensure output directory exists
939
+ const outputDir = join(__dirname, "../../ai");
940
+ mkdirSync(outputDir, { recursive: true });
941
+
942
+ // Write JSON registry
943
+ const jsonPath = join(outputDir, "component-registry.json");
944
+ writeFileSync(jsonPath, JSON.stringify(registry, null, 2));
945
+ console.log(`\n✓ Generated ${jsonPath}`);
946
+
947
+ // Write markdown context for LLMs
948
+ const mdPath = join(outputDir, "component-registry.md");
949
+ writeFileSync(mdPath, aiContext);
950
+ console.log(`✓ Generated ${mdPath}`);
951
+
952
+ // Write Zod schemas for runtime validation
953
+ const schemasPath = join(outputDir, "schemas.ts");
954
+ writeFileSync(schemasPath, schemasContent);
955
+ console.log(`✓ Generated ${schemasPath}`);
956
+
957
+ // Also output to stdout for piping
958
+ console.log("\n--- Registry Summary ---");
959
+ console.log(`Components: ${registry.search.byType.component.length}`);
960
+ console.log(`Blocks: ${registry.search.byType.block.length}`);
961
+ console.log(`Total: ${registry.search.byName.length}`);
962
+ console.log(
963
+ `Categories: ${Object.keys(registry.search.byCategory).length} (${Object.keys(registry.search.byCategory).join(", ")})`,
964
+ );
965
+ }
966
+
967
+ // Re-export types for external consumers
968
+ export type { ComponentType } from "./types.js";
969
+
970
+ main().catch(console.error);