@theokit/ui 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (715) hide show
  1. package/CHANGELOG.md +1325 -0
  2. package/DESIGN.md +456 -0
  3. package/LICENSE +201 -0
  4. package/NOTICE +38 -0
  5. package/README.md +467 -0
  6. package/dist/chunk-27ENTTY7.js +146 -0
  7. package/dist/chunk-27ENTTY7.js.map +1 -0
  8. package/dist/chunk-2H6TQELG.js +33 -0
  9. package/dist/chunk-2H6TQELG.js.map +1 -0
  10. package/dist/chunk-2L6MRJD4.js +120 -0
  11. package/dist/chunk-2L6MRJD4.js.map +1 -0
  12. package/dist/chunk-2Y5V2PAL.js +80 -0
  13. package/dist/chunk-2Y5V2PAL.js.map +1 -0
  14. package/dist/chunk-34NAFDVL.js +46 -0
  15. package/dist/chunk-34NAFDVL.js.map +1 -0
  16. package/dist/chunk-36KJGXEK.js +112 -0
  17. package/dist/chunk-36KJGXEK.js.map +1 -0
  18. package/dist/chunk-3BMYYNN6.js +124 -0
  19. package/dist/chunk-3BMYYNN6.js.map +1 -0
  20. package/dist/chunk-3OHV7EEI.js +34 -0
  21. package/dist/chunk-3OHV7EEI.js.map +1 -0
  22. package/dist/chunk-3QKTS6F5.js +88 -0
  23. package/dist/chunk-3QKTS6F5.js.map +1 -0
  24. package/dist/chunk-3TBXLYNM.js +42 -0
  25. package/dist/chunk-3TBXLYNM.js.map +1 -0
  26. package/dist/chunk-4AM2HSXU.js +67 -0
  27. package/dist/chunk-4AM2HSXU.js.map +1 -0
  28. package/dist/chunk-4BCGKM65.js +44 -0
  29. package/dist/chunk-4BCGKM65.js.map +1 -0
  30. package/dist/chunk-4D3JILQX.js +145 -0
  31. package/dist/chunk-4D3JILQX.js.map +1 -0
  32. package/dist/chunk-4EJU2GBG.js +48 -0
  33. package/dist/chunk-4EJU2GBG.js.map +1 -0
  34. package/dist/chunk-4WKO3G5C.js +110 -0
  35. package/dist/chunk-4WKO3G5C.js.map +1 -0
  36. package/dist/chunk-53XPKI7Q.js +97 -0
  37. package/dist/chunk-53XPKI7Q.js.map +1 -0
  38. package/dist/chunk-55TDVDPG.js +58 -0
  39. package/dist/chunk-55TDVDPG.js.map +1 -0
  40. package/dist/chunk-56BJLFW7.js +26 -0
  41. package/dist/chunk-56BJLFW7.js.map +1 -0
  42. package/dist/chunk-5HOQLE6Y.js +35 -0
  43. package/dist/chunk-5HOQLE6Y.js.map +1 -0
  44. package/dist/chunk-5TY3NYF5.js +144 -0
  45. package/dist/chunk-5TY3NYF5.js.map +1 -0
  46. package/dist/chunk-5VOSCJKQ.js +92 -0
  47. package/dist/chunk-5VOSCJKQ.js.map +1 -0
  48. package/dist/chunk-65NVO6TK.js +171 -0
  49. package/dist/chunk-65NVO6TK.js.map +1 -0
  50. package/dist/chunk-6A5TPCKP.js +64 -0
  51. package/dist/chunk-6A5TPCKP.js.map +1 -0
  52. package/dist/chunk-6CO4LEXZ.js +41 -0
  53. package/dist/chunk-6CO4LEXZ.js.map +1 -0
  54. package/dist/chunk-6FVUPNPG.js +56 -0
  55. package/dist/chunk-6FVUPNPG.js.map +1 -0
  56. package/dist/chunk-76YWTIWK.js +106 -0
  57. package/dist/chunk-76YWTIWK.js.map +1 -0
  58. package/dist/chunk-7EI7424P.js +78 -0
  59. package/dist/chunk-7EI7424P.js.map +1 -0
  60. package/dist/chunk-AHTVYOPQ.js +26 -0
  61. package/dist/chunk-AHTVYOPQ.js.map +1 -0
  62. package/dist/chunk-AJTJNHKK.js +85 -0
  63. package/dist/chunk-AJTJNHKK.js.map +1 -0
  64. package/dist/chunk-AMT3CPMC.js +155 -0
  65. package/dist/chunk-AMT3CPMC.js.map +1 -0
  66. package/dist/chunk-AX5EH73R.js +59 -0
  67. package/dist/chunk-AX5EH73R.js.map +1 -0
  68. package/dist/chunk-B3VAJSZ2.js +35 -0
  69. package/dist/chunk-B3VAJSZ2.js.map +1 -0
  70. package/dist/chunk-B4CQMQ64.js +25 -0
  71. package/dist/chunk-B4CQMQ64.js.map +1 -0
  72. package/dist/chunk-BMRZXT5T.js +115 -0
  73. package/dist/chunk-BMRZXT5T.js.map +1 -0
  74. package/dist/chunk-BYZ6OFH4.js +73 -0
  75. package/dist/chunk-BYZ6OFH4.js.map +1 -0
  76. package/dist/chunk-C55VUQ7N.js +156 -0
  77. package/dist/chunk-C55VUQ7N.js.map +1 -0
  78. package/dist/chunk-D4GEAV4C.js +91 -0
  79. package/dist/chunk-D4GEAV4C.js.map +1 -0
  80. package/dist/chunk-DC43CHAM.js +152 -0
  81. package/dist/chunk-DC43CHAM.js.map +1 -0
  82. package/dist/chunk-DKCRLN35.js +92 -0
  83. package/dist/chunk-DKCRLN35.js.map +1 -0
  84. package/dist/chunk-DN5BUDBI.js +86 -0
  85. package/dist/chunk-DN5BUDBI.js.map +1 -0
  86. package/dist/chunk-DOLKDYMS.js +88 -0
  87. package/dist/chunk-DOLKDYMS.js.map +1 -0
  88. package/dist/chunk-DW34WXCG.js +28 -0
  89. package/dist/chunk-DW34WXCG.js.map +1 -0
  90. package/dist/chunk-DZAAKHGZ.js +135 -0
  91. package/dist/chunk-DZAAKHGZ.js.map +1 -0
  92. package/dist/chunk-E4IRSSHO.js +116 -0
  93. package/dist/chunk-E4IRSSHO.js.map +1 -0
  94. package/dist/chunk-E67WQXBV.js +104 -0
  95. package/dist/chunk-E67WQXBV.js.map +1 -0
  96. package/dist/chunk-EG6IHP3H.js +128 -0
  97. package/dist/chunk-EG6IHP3H.js.map +1 -0
  98. package/dist/chunk-EO7LOXG2.js +82 -0
  99. package/dist/chunk-EO7LOXG2.js.map +1 -0
  100. package/dist/chunk-EWDN56AS.js +24 -0
  101. package/dist/chunk-EWDN56AS.js.map +1 -0
  102. package/dist/chunk-F5P5P2SC.js +141 -0
  103. package/dist/chunk-F5P5P2SC.js.map +1 -0
  104. package/dist/chunk-FAWPRZTM.js +79 -0
  105. package/dist/chunk-FAWPRZTM.js.map +1 -0
  106. package/dist/chunk-FGYJ2WPX.js +36 -0
  107. package/dist/chunk-FGYJ2WPX.js.map +1 -0
  108. package/dist/chunk-GBG3I5I5.js +46 -0
  109. package/dist/chunk-GBG3I5I5.js.map +1 -0
  110. package/dist/chunk-GDMCDW66.js +19 -0
  111. package/dist/chunk-GDMCDW66.js.map +1 -0
  112. package/dist/chunk-H6HSQCOW.js +80 -0
  113. package/dist/chunk-H6HSQCOW.js.map +1 -0
  114. package/dist/chunk-HDM4RCIF.js +111 -0
  115. package/dist/chunk-HDM4RCIF.js.map +1 -0
  116. package/dist/chunk-HNTOGGVD.js +77 -0
  117. package/dist/chunk-HNTOGGVD.js.map +1 -0
  118. package/dist/chunk-HQW2ABO4.js +28 -0
  119. package/dist/chunk-HQW2ABO4.js.map +1 -0
  120. package/dist/chunk-HRDRGZ2Y.js +76 -0
  121. package/dist/chunk-HRDRGZ2Y.js.map +1 -0
  122. package/dist/chunk-HUOVA7SF.js +83 -0
  123. package/dist/chunk-HUOVA7SF.js.map +1 -0
  124. package/dist/chunk-ITA3SNOR.js +133 -0
  125. package/dist/chunk-ITA3SNOR.js.map +1 -0
  126. package/dist/chunk-IYNUPG2G.js +61 -0
  127. package/dist/chunk-IYNUPG2G.js.map +1 -0
  128. package/dist/chunk-JJ65ZI4P.js +199 -0
  129. package/dist/chunk-JJ65ZI4P.js.map +1 -0
  130. package/dist/chunk-JRBGZ6NI.js +106 -0
  131. package/dist/chunk-JRBGZ6NI.js.map +1 -0
  132. package/dist/chunk-K45OO62F.js +108 -0
  133. package/dist/chunk-K45OO62F.js.map +1 -0
  134. package/dist/chunk-KDTKA667.js +67 -0
  135. package/dist/chunk-KDTKA667.js.map +1 -0
  136. package/dist/chunk-KI7KZBSN.js +142 -0
  137. package/dist/chunk-KI7KZBSN.js.map +1 -0
  138. package/dist/chunk-KOJ7XOPZ.js +87 -0
  139. package/dist/chunk-KOJ7XOPZ.js.map +1 -0
  140. package/dist/chunk-KQTHJ22B.js +82 -0
  141. package/dist/chunk-KQTHJ22B.js.map +1 -0
  142. package/dist/chunk-KRC43RZR.js +77 -0
  143. package/dist/chunk-KRC43RZR.js.map +1 -0
  144. package/dist/chunk-LJQOEGQ2.js +116 -0
  145. package/dist/chunk-LJQOEGQ2.js.map +1 -0
  146. package/dist/chunk-LKRNUSKZ.js +149 -0
  147. package/dist/chunk-LKRNUSKZ.js.map +1 -0
  148. package/dist/chunk-LLL7QQ52.js +76 -0
  149. package/dist/chunk-LLL7QQ52.js.map +1 -0
  150. package/dist/chunk-LQ4B5X4Y.js +56 -0
  151. package/dist/chunk-LQ4B5X4Y.js.map +1 -0
  152. package/dist/chunk-M3FSLEHQ.js +76 -0
  153. package/dist/chunk-M3FSLEHQ.js.map +1 -0
  154. package/dist/chunk-M5G3O6H6.js +57 -0
  155. package/dist/chunk-M5G3O6H6.js.map +1 -0
  156. package/dist/chunk-M6JIC5PU.js +81 -0
  157. package/dist/chunk-M6JIC5PU.js.map +1 -0
  158. package/dist/chunk-N2HJ3SLS.js +186 -0
  159. package/dist/chunk-N2HJ3SLS.js.map +1 -0
  160. package/dist/chunk-NGZWBFTP.js +45 -0
  161. package/dist/chunk-NGZWBFTP.js.map +1 -0
  162. package/dist/chunk-OAKCXT35.js +34 -0
  163. package/dist/chunk-OAKCXT35.js.map +1 -0
  164. package/dist/chunk-OSD3U3HT.js +54 -0
  165. package/dist/chunk-OSD3U3HT.js.map +1 -0
  166. package/dist/chunk-OUXESQ2R.js +42 -0
  167. package/dist/chunk-OUXESQ2R.js.map +1 -0
  168. package/dist/chunk-OY2LJHMJ.js +43 -0
  169. package/dist/chunk-OY2LJHMJ.js.map +1 -0
  170. package/dist/chunk-OYEZR4CN.js +221 -0
  171. package/dist/chunk-OYEZR4CN.js.map +1 -0
  172. package/dist/chunk-P57HUMAE.js +66 -0
  173. package/dist/chunk-P57HUMAE.js.map +1 -0
  174. package/dist/chunk-P6Y2PI6L.js +82 -0
  175. package/dist/chunk-P6Y2PI6L.js.map +1 -0
  176. package/dist/chunk-PA7TDXUQ.js +51 -0
  177. package/dist/chunk-PA7TDXUQ.js.map +1 -0
  178. package/dist/chunk-PPBGGNPV.js +112 -0
  179. package/dist/chunk-PPBGGNPV.js.map +1 -0
  180. package/dist/chunk-PRH4HKND.js +48 -0
  181. package/dist/chunk-PRH4HKND.js.map +1 -0
  182. package/dist/chunk-PSPAZJUQ.js +32 -0
  183. package/dist/chunk-PSPAZJUQ.js.map +1 -0
  184. package/dist/chunk-Q5G5CGZ2.js +170 -0
  185. package/dist/chunk-Q5G5CGZ2.js.map +1 -0
  186. package/dist/chunk-QDAF3LP7.js +89 -0
  187. package/dist/chunk-QDAF3LP7.js.map +1 -0
  188. package/dist/chunk-QGVIGNJ3.js +37 -0
  189. package/dist/chunk-QGVIGNJ3.js.map +1 -0
  190. package/dist/chunk-QNUITYSY.js +68 -0
  191. package/dist/chunk-QNUITYSY.js.map +1 -0
  192. package/dist/chunk-QSWVN3RT.js +116 -0
  193. package/dist/chunk-QSWVN3RT.js.map +1 -0
  194. package/dist/chunk-QTLQZ7OJ.js +110 -0
  195. package/dist/chunk-QTLQZ7OJ.js.map +1 -0
  196. package/dist/chunk-QYAMLIG2.js +84 -0
  197. package/dist/chunk-QYAMLIG2.js.map +1 -0
  198. package/dist/chunk-REILH4XF.js +128 -0
  199. package/dist/chunk-REILH4XF.js.map +1 -0
  200. package/dist/chunk-S6SSK6QX.js +80 -0
  201. package/dist/chunk-S6SSK6QX.js.map +1 -0
  202. package/dist/chunk-SA7ED3PN.js +68 -0
  203. package/dist/chunk-SA7ED3PN.js.map +1 -0
  204. package/dist/chunk-SIJOEM4N.js +55 -0
  205. package/dist/chunk-SIJOEM4N.js.map +1 -0
  206. package/dist/chunk-SLOKAAH2.js +70 -0
  207. package/dist/chunk-SLOKAAH2.js.map +1 -0
  208. package/dist/chunk-TR6NPSMX.js +85 -0
  209. package/dist/chunk-TR6NPSMX.js.map +1 -0
  210. package/dist/chunk-TSZ5DEAT.js +106 -0
  211. package/dist/chunk-TSZ5DEAT.js.map +1 -0
  212. package/dist/chunk-TUNVF45W.js +127 -0
  213. package/dist/chunk-TUNVF45W.js.map +1 -0
  214. package/dist/chunk-TXOBNSQ5.js +63 -0
  215. package/dist/chunk-TXOBNSQ5.js.map +1 -0
  216. package/dist/chunk-U44DRLMM.js +88 -0
  217. package/dist/chunk-U44DRLMM.js.map +1 -0
  218. package/dist/chunk-U4THNRV5.js +114 -0
  219. package/dist/chunk-U4THNRV5.js.map +1 -0
  220. package/dist/chunk-UAZOFC4W.js +72 -0
  221. package/dist/chunk-UAZOFC4W.js.map +1 -0
  222. package/dist/chunk-UGKI466V.js +12 -0
  223. package/dist/chunk-UGKI466V.js.map +1 -0
  224. package/dist/chunk-VM4RMQQN.js +11 -0
  225. package/dist/chunk-VM4RMQQN.js.map +1 -0
  226. package/dist/chunk-VQ37VLAS.js +54 -0
  227. package/dist/chunk-VQ37VLAS.js.map +1 -0
  228. package/dist/chunk-VT7VSYH5.js +73 -0
  229. package/dist/chunk-VT7VSYH5.js.map +1 -0
  230. package/dist/chunk-VTIRUCLZ.js +57 -0
  231. package/dist/chunk-VTIRUCLZ.js.map +1 -0
  232. package/dist/chunk-VVBAEYKI.js +202 -0
  233. package/dist/chunk-VVBAEYKI.js.map +1 -0
  234. package/dist/chunk-WHFIQUCC.js +120 -0
  235. package/dist/chunk-WHFIQUCC.js.map +1 -0
  236. package/dist/chunk-WPSESV5Z.js +74 -0
  237. package/dist/chunk-WPSESV5Z.js.map +1 -0
  238. package/dist/chunk-WXEXCHEN.js +51 -0
  239. package/dist/chunk-WXEXCHEN.js.map +1 -0
  240. package/dist/chunk-X2DDPD3D.js +113 -0
  241. package/dist/chunk-X2DDPD3D.js.map +1 -0
  242. package/dist/chunk-X7VIMKLD.js +127 -0
  243. package/dist/chunk-X7VIMKLD.js.map +1 -0
  244. package/dist/chunk-XJ3EG6XY.js +30 -0
  245. package/dist/chunk-XJ3EG6XY.js.map +1 -0
  246. package/dist/chunk-XOT5HWSF.js +23 -0
  247. package/dist/chunk-XOT5HWSF.js.map +1 -0
  248. package/dist/chunk-Y72IP43U.js +117 -0
  249. package/dist/chunk-Y72IP43U.js.map +1 -0
  250. package/dist/chunk-YD6FLXBV.js +61 -0
  251. package/dist/chunk-YD6FLXBV.js.map +1 -0
  252. package/dist/chunk-YEQQGYYO.js +1022 -0
  253. package/dist/chunk-YEQQGYYO.js.map +1 -0
  254. package/dist/chunk-YYW6AEIT.js +46 -0
  255. package/dist/chunk-YYW6AEIT.js.map +1 -0
  256. package/dist/chunk-ZEVGXKRU.js +104 -0
  257. package/dist/chunk-ZEVGXKRU.js.map +1 -0
  258. package/dist/chunk-ZKSMMLDP.js +74 -0
  259. package/dist/chunk-ZKSMMLDP.js.map +1 -0
  260. package/dist/chunk-ZU6IM6PK.js +101 -0
  261. package/dist/chunk-ZU6IM6PK.js.map +1 -0
  262. package/dist/chunk-ZUS5KZGO.js +714 -0
  263. package/dist/chunk-ZUS5KZGO.js.map +1 -0
  264. package/dist/chunk-ZVS2GOT2.js +58 -0
  265. package/dist/chunk-ZVS2GOT2.js.map +1 -0
  266. package/dist/chunk-ZXPDS6DH.js +3 -0
  267. package/dist/chunk-ZXPDS6DH.js.map +1 -0
  268. package/dist/chunk-ZZQQJX5Z.js +173 -0
  269. package/dist/chunk-ZZQQJX5Z.js.map +1 -0
  270. package/dist/components.css +2 -0
  271. package/dist/composites/account-menu/index.js +6 -0
  272. package/dist/composites/account-menu/index.js.map +1 -0
  273. package/dist/composites/agent-composer/index.js +7 -0
  274. package/dist/composites/agent-composer/index.js.map +1 -0
  275. package/dist/composites/agent-editor/index.js +10 -0
  276. package/dist/composites/agent-editor/index.js.map +1 -0
  277. package/dist/composites/agent-stream/index.js +12 -0
  278. package/dist/composites/agent-stream/index.js.map +1 -0
  279. package/dist/composites/agent-timeline/index.js +5 -0
  280. package/dist/composites/agent-timeline/index.js.map +1 -0
  281. package/dist/composites/approval-card/index.js +5 -0
  282. package/dist/composites/approval-card/index.js.map +1 -0
  283. package/dist/composites/chat-composer/index.js +6 -0
  284. package/dist/composites/chat-composer/index.js.map +1 -0
  285. package/dist/composites/chat-message/index.js +6 -0
  286. package/dist/composites/chat-message/index.js.map +1 -0
  287. package/dist/composites/code-block/index.js +5 -0
  288. package/dist/composites/code-block/index.js.map +1 -0
  289. package/dist/composites/command-palette/index.js +5 -0
  290. package/dist/composites/command-palette/index.js.map +1 -0
  291. package/dist/composites/confirm-dialog/index.js +7 -0
  292. package/dist/composites/confirm-dialog/index.js.map +1 -0
  293. package/dist/composites/cron-jobs-list/index.js +5 -0
  294. package/dist/composites/cron-jobs-list/index.js.map +1 -0
  295. package/dist/composites/data-table/index.js +10 -0
  296. package/dist/composites/data-table/index.js.map +1 -0
  297. package/dist/composites/deployment-row/index.js +5 -0
  298. package/dist/composites/deployment-row/index.js.map +1 -0
  299. package/dist/composites/domain-config/index.js +7 -0
  300. package/dist/composites/domain-config/index.js.map +1 -0
  301. package/dist/composites/env-var-editor/index.js +7 -0
  302. package/dist/composites/env-var-editor/index.js.map +1 -0
  303. package/dist/composites/mcp-server-list/index.js +5 -0
  304. package/dist/composites/mcp-server-list/index.js.map +1 -0
  305. package/dist/composites/page-shell/index.js +7 -0
  306. package/dist/composites/page-shell/index.js.map +1 -0
  307. package/dist/composites/permission-modal/index.js +6 -0
  308. package/dist/composites/permission-modal/index.js.map +1 -0
  309. package/dist/composites/preview-env-card/index.js +6 -0
  310. package/dist/composites/preview-env-card/index.js.map +1 -0
  311. package/dist/composites/preview-panel/index.js +5 -0
  312. package/dist/composites/preview-panel/index.js.map +1 -0
  313. package/dist/composites/project-card/index.js +6 -0
  314. package/dist/composites/project-card/index.js.map +1 -0
  315. package/dist/composites/rollback-ui/index.js +6 -0
  316. package/dist/composites/rollback-ui/index.js.map +1 -0
  317. package/dist/composites/rule-editor/index.js +11 -0
  318. package/dist/composites/rule-editor/index.js.map +1 -0
  319. package/dist/composites/skill-editor/index.js +11 -0
  320. package/dist/composites/skill-editor/index.js.map +1 -0
  321. package/dist/composites/skills-list/index.js +5 -0
  322. package/dist/composites/skills-list/index.js.map +1 -0
  323. package/dist/composites/stability-bundle-viewer/index.js +4 -0
  324. package/dist/composites/stability-bundle-viewer/index.js.map +1 -0
  325. package/dist/composites/task-header/index.js +5 -0
  326. package/dist/composites/task-header/index.js.map +1 -0
  327. package/dist/composites/usage-meter/index.js +5 -0
  328. package/dist/composites/usage-meter/index.js.map +1 -0
  329. package/dist/fonts/LICENSE-GEIST.txt +92 -0
  330. package/dist/fonts/geist-400.woff2 +0 -0
  331. package/dist/fonts/geist-500.woff2 +0 -0
  332. package/dist/fonts/geist-600.woff2 +0 -0
  333. package/dist/fonts/geist-mono-400.woff2 +0 -0
  334. package/dist/fonts/geist-mono-500.woff2 +0 -0
  335. package/dist/fonts/geist-mono-600.woff2 +0 -0
  336. package/dist/fonts-cdn.css +28 -0
  337. package/dist/fonts.css +75 -0
  338. package/dist/index.d.ts +4621 -0
  339. package/dist/index.js +1338 -0
  340. package/dist/index.js.map +1 -0
  341. package/dist/plugin-D5xmXqYb.d.ts +172 -0
  342. package/dist/preset-v3-legacy.d.ts +35 -0
  343. package/dist/preset-v3-legacy.js +159 -0
  344. package/dist/preset-v3-legacy.js.map +1 -0
  345. package/dist/preset.css +27 -0
  346. package/dist/primitives/action-bar/index.js +4 -0
  347. package/dist/primitives/action-bar/index.js.map +1 -0
  348. package/dist/primitives/agent-error-card/index.js +5 -0
  349. package/dist/primitives/agent-error-card/index.js.map +1 -0
  350. package/dist/primitives/agent-event/index.js +4 -0
  351. package/dist/primitives/agent-event/index.js.map +1 -0
  352. package/dist/primitives/agent-handoff/index.js +4 -0
  353. package/dist/primitives/agent-handoff/index.js.map +1 -0
  354. package/dist/primitives/agent-profile/index.js +4 -0
  355. package/dist/primitives/agent-profile/index.js.map +1 -0
  356. package/dist/primitives/agent-starting-state/index.js +5 -0
  357. package/dist/primitives/agent-starting-state/index.js.map +1 -0
  358. package/dist/primitives/agent-streaming/index.js +5 -0
  359. package/dist/primitives/agent-streaming/index.js.map +1 -0
  360. package/dist/primitives/alert/index.js +4 -0
  361. package/dist/primitives/alert/index.js.map +1 -0
  362. package/dist/primitives/artifact-preview/index.js +4 -0
  363. package/dist/primitives/artifact-preview/index.js.map +1 -0
  364. package/dist/primitives/attachment-chip/index.js +4 -0
  365. package/dist/primitives/attachment-chip/index.js.map +1 -0
  366. package/dist/primitives/audit-log-entry/index.js +4 -0
  367. package/dist/primitives/audit-log-entry/index.js.map +1 -0
  368. package/dist/primitives/auto-compact-notice/index.js +5 -0
  369. package/dist/primitives/auto-compact-notice/index.js.map +1 -0
  370. package/dist/primitives/avatar/index.js +4 -0
  371. package/dist/primitives/avatar/index.js.map +1 -0
  372. package/dist/primitives/badge/index.js +4 -0
  373. package/dist/primitives/badge/index.js.map +1 -0
  374. package/dist/primitives/branch-indicator/index.js +4 -0
  375. package/dist/primitives/branch-indicator/index.js.map +1 -0
  376. package/dist/primitives/browser-controls/index.js +4 -0
  377. package/dist/primitives/browser-controls/index.js.map +1 -0
  378. package/dist/primitives/build-log-stream/index.js +5 -0
  379. package/dist/primitives/build-log-stream/index.js.map +1 -0
  380. package/dist/primitives/button/index.js +4 -0
  381. package/dist/primitives/button/index.js.map +1 -0
  382. package/dist/primitives/capability-indicator/index.js +4 -0
  383. package/dist/primitives/capability-indicator/index.js.map +1 -0
  384. package/dist/primitives/card/index.js +4 -0
  385. package/dist/primitives/card/index.js.map +1 -0
  386. package/dist/primitives/channel-card/index.js +4 -0
  387. package/dist/primitives/channel-card/index.js.map +1 -0
  388. package/dist/primitives/chat-thread/index.js +5 -0
  389. package/dist/primitives/chat-thread/index.js.map +1 -0
  390. package/dist/primitives/checkbox/index.js +4 -0
  391. package/dist/primitives/checkbox/index.js.map +1 -0
  392. package/dist/primitives/context-card/index.js +4 -0
  393. package/dist/primitives/context-card/index.js.map +1 -0
  394. package/dist/primitives/context-window-bar/index.js +4 -0
  395. package/dist/primitives/context-window-bar/index.js.map +1 -0
  396. package/dist/primitives/copy-button/index.js +4 -0
  397. package/dist/primitives/copy-button/index.js.map +1 -0
  398. package/dist/primitives/cost-meter/index.js +4 -0
  399. package/dist/primitives/cost-meter/index.js.map +1 -0
  400. package/dist/primitives/created-files-card/index.js +4 -0
  401. package/dist/primitives/created-files-card/index.js.map +1 -0
  402. package/dist/primitives/cron-job-card/index.js +4 -0
  403. package/dist/primitives/cron-job-card/index.js.map +1 -0
  404. package/dist/primitives/danger-zone/index.js +4 -0
  405. package/dist/primitives/danger-zone/index.js.map +1 -0
  406. package/dist/primitives/dialog/index.js +4 -0
  407. package/dist/primitives/dialog/index.js.map +1 -0
  408. package/dist/primitives/diff-viewer/index.js +4 -0
  409. package/dist/primitives/diff-viewer/index.js.map +1 -0
  410. package/dist/primitives/dropdown-menu/index.js +4 -0
  411. package/dist/primitives/dropdown-menu/index.js.map +1 -0
  412. package/dist/primitives/empty-state/index.js +4 -0
  413. package/dist/primitives/empty-state/index.js.map +1 -0
  414. package/dist/primitives/export-chat-dialog/index.js +4 -0
  415. package/dist/primitives/export-chat-dialog/index.js.map +1 -0
  416. package/dist/primitives/folder-context-card/index.js +4 -0
  417. package/dist/primitives/folder-context-card/index.js.map +1 -0
  418. package/dist/primitives/folder-selector/index.js +4 -0
  419. package/dist/primitives/folder-selector/index.js.map +1 -0
  420. package/dist/primitives/form-field/index.js +4 -0
  421. package/dist/primitives/form-field/index.js.map +1 -0
  422. package/dist/primitives/gateway-status-indicator/index.js +4 -0
  423. package/dist/primitives/gateway-status-indicator/index.js.map +1 -0
  424. package/dist/primitives/hook-config/index.js +4 -0
  425. package/dist/primitives/hook-config/index.js.map +1 -0
  426. package/dist/primitives/hook-event-log/index.js +4 -0
  427. package/dist/primitives/hook-event-log/index.js.map +1 -0
  428. package/dist/primitives/input/index.js +4 -0
  429. package/dist/primitives/input/index.js.map +1 -0
  430. package/dist/primitives/intent-selector/index.js +4 -0
  431. package/dist/primitives/intent-selector/index.js.map +1 -0
  432. package/dist/primitives/label/index.js +4 -0
  433. package/dist/primitives/label/index.js.map +1 -0
  434. package/dist/primitives/lane-board/index.js +4 -0
  435. package/dist/primitives/lane-board/index.js.map +1 -0
  436. package/dist/primitives/login-split/index.js +4 -0
  437. package/dist/primitives/login-split/index.js.map +1 -0
  438. package/dist/primitives/mcp-server-card/index.js +4 -0
  439. package/dist/primitives/mcp-server-card/index.js.map +1 -0
  440. package/dist/primitives/memory-editor/index.js +4 -0
  441. package/dist/primitives/memory-editor/index.js.map +1 -0
  442. package/dist/primitives/mention-menu/index.js +4 -0
  443. package/dist/primitives/mention-menu/index.js.map +1 -0
  444. package/dist/primitives/metrics-panel/index.js +4 -0
  445. package/dist/primitives/metrics-panel/index.js.map +1 -0
  446. package/dist/primitives/model-card/index.js +4 -0
  447. package/dist/primitives/model-card/index.js.map +1 -0
  448. package/dist/primitives/model-selector/index.js +4 -0
  449. package/dist/primitives/model-selector/index.js.map +1 -0
  450. package/dist/primitives/pagination/index.js +4 -0
  451. package/dist/primitives/pagination/index.js.map +1 -0
  452. package/dist/primitives/permission-matrix/index.js +4 -0
  453. package/dist/primitives/permission-matrix/index.js.map +1 -0
  454. package/dist/primitives/pin-input/index.js +4 -0
  455. package/dist/primitives/pin-input/index.js.map +1 -0
  456. package/dist/primitives/plan-badge/index.js +4 -0
  457. package/dist/primitives/plan-badge/index.js.map +1 -0
  458. package/dist/primitives/progress/index.js +4 -0
  459. package/dist/primitives/progress/index.js.map +1 -0
  460. package/dist/primitives/progress-checklist/index.js +4 -0
  461. package/dist/primitives/progress-checklist/index.js.map +1 -0
  462. package/dist/primitives/project-switcher/index.js +4 -0
  463. package/dist/primitives/project-switcher/index.js.map +1 -0
  464. package/dist/primitives/quick-action-chips/index.js +4 -0
  465. package/dist/primitives/quick-action-chips/index.js.map +1 -0
  466. package/dist/primitives/radio-group/index.js +4 -0
  467. package/dist/primitives/radio-group/index.js.map +1 -0
  468. package/dist/primitives/recent-folders-list/index.js +4 -0
  469. package/dist/primitives/recent-folders-list/index.js.map +1 -0
  470. package/dist/primitives/rule-card/index.js +4 -0
  471. package/dist/primitives/rule-card/index.js.map +1 -0
  472. package/dist/primitives/run-stats/index.js +4 -0
  473. package/dist/primitives/run-stats/index.js.map +1 -0
  474. package/dist/primitives/run-status-pill/index.js +4 -0
  475. package/dist/primitives/run-status-pill/index.js.map +1 -0
  476. package/dist/primitives/running-tasks-panel/index.js +4 -0
  477. package/dist/primitives/running-tasks-panel/index.js.map +1 -0
  478. package/dist/primitives/scroll-area/index.js +4 -0
  479. package/dist/primitives/scroll-area/index.js.map +1 -0
  480. package/dist/primitives/select/index.js +4 -0
  481. package/dist/primitives/select/index.js.map +1 -0
  482. package/dist/primitives/session-list-item/index.js +4 -0
  483. package/dist/primitives/session-list-item/index.js.map +1 -0
  484. package/dist/primitives/session-timeline/index.js +4 -0
  485. package/dist/primitives/session-timeline/index.js.map +1 -0
  486. package/dist/primitives/sheet/index.js +4 -0
  487. package/dist/primitives/sheet/index.js.map +1 -0
  488. package/dist/primitives/sidebar/index.js +4 -0
  489. package/dist/primitives/sidebar/index.js.map +1 -0
  490. package/dist/primitives/skeleton/index.js +5 -0
  491. package/dist/primitives/skeleton/index.js.map +1 -0
  492. package/dist/primitives/skill-card/index.js +4 -0
  493. package/dist/primitives/skill-card/index.js.map +1 -0
  494. package/dist/primitives/social-auth-row/index.js +4 -0
  495. package/dist/primitives/social-auth-row/index.js.map +1 -0
  496. package/dist/primitives/stat-tile/index.js +4 -0
  497. package/dist/primitives/stat-tile/index.js.map +1 -0
  498. package/dist/primitives/status-dot/index.js +4 -0
  499. package/dist/primitives/status-dot/index.js.map +1 -0
  500. package/dist/primitives/steps-rail/index.js +4 -0
  501. package/dist/primitives/steps-rail/index.js.map +1 -0
  502. package/dist/primitives/sub-agent-dispatch/index.js +4 -0
  503. package/dist/primitives/sub-agent-dispatch/index.js.map +1 -0
  504. package/dist/primitives/switch/index.js +4 -0
  505. package/dist/primitives/switch/index.js.map +1 -0
  506. package/dist/primitives/system-prompt-editor/index.js +4 -0
  507. package/dist/primitives/system-prompt-editor/index.js.map +1 -0
  508. package/dist/primitives/table/index.js +4 -0
  509. package/dist/primitives/table/index.js.map +1 -0
  510. package/dist/primitives/tabs/index.js +4 -0
  511. package/dist/primitives/tabs/index.js.map +1 -0
  512. package/dist/primitives/task-plan/index.js +4 -0
  513. package/dist/primitives/task-plan/index.js.map +1 -0
  514. package/dist/primitives/terminal-panel/index.js +5 -0
  515. package/dist/primitives/terminal-panel/index.js.map +1 -0
  516. package/dist/primitives/textarea/index.js +4 -0
  517. package/dist/primitives/textarea/index.js.map +1 -0
  518. package/dist/primitives/thinking-level-selector/index.js +4 -0
  519. package/dist/primitives/thinking-level-selector/index.js.map +1 -0
  520. package/dist/primitives/timestamp/index.js +4 -0
  521. package/dist/primitives/timestamp/index.js.map +1 -0
  522. package/dist/primitives/toast/index.js +4 -0
  523. package/dist/primitives/toast/index.js.map +1 -0
  524. package/dist/primitives/token-usage-chart/index.js +4 -0
  525. package/dist/primitives/token-usage-chart/index.js.map +1 -0
  526. package/dist/primitives/tool-call/index.js +4 -0
  527. package/dist/primitives/tool-call/index.js.map +1 -0
  528. package/dist/primitives/tool-call-card/index.js +4 -0
  529. package/dist/primitives/tool-call-card/index.js.map +1 -0
  530. package/dist/primitives/tool-result/index.js +4 -0
  531. package/dist/primitives/tool-result/index.js.map +1 -0
  532. package/dist/primitives/tools-list/index.js +4 -0
  533. package/dist/primitives/tools-list/index.js.map +1 -0
  534. package/dist/primitives/tooltip/index.js +4 -0
  535. package/dist/primitives/tooltip/index.js.map +1 -0
  536. package/dist/primitives/topnav/index.js +4 -0
  537. package/dist/primitives/topnav/index.js.map +1 -0
  538. package/dist/primitives/update-banner/index.js +4 -0
  539. package/dist/primitives/update-banner/index.js.map +1 -0
  540. package/dist/slide/index.d.ts +212 -0
  541. package/dist/slide/index.js +3 -0
  542. package/dist/slide/index.js.map +1 -0
  543. package/dist/slide/plugins/emoji/index.d.ts +29 -0
  544. package/dist/slide/plugins/emoji/index.js +157 -0
  545. package/dist/slide/plugins/emoji/index.js.map +1 -0
  546. package/dist/slide/plugins/math/index.d.ts +13 -0
  547. package/dist/slide/plugins/math/index.js +145 -0
  548. package/dist/slide/plugins/math/index.js.map +1 -0
  549. package/dist/slide/plugins/mermaid/index.d.ts +55 -0
  550. package/dist/slide/plugins/mermaid/index.js +218 -0
  551. package/dist/slide/plugins/mermaid/index.js.map +1 -0
  552. package/dist/slide/plugins/shiki/index.d.ts +18 -0
  553. package/dist/slide/plugins/shiki/index.js +87 -0
  554. package/dist/slide/plugins/shiki/index.js.map +1 -0
  555. package/dist/slide/themes/default.css +256 -0
  556. package/dist/slide/themes/layouts.css +143 -0
  557. package/dist/slide/themes/violet-forge.css +256 -0
  558. package/dist/slide-deck/index.css +52 -0
  559. package/dist/slide-deck/index.css.map +1 -0
  560. package/dist/slide-deck/index.d.ts +377 -0
  561. package/dist/slide-deck/index.js +1111 -0
  562. package/dist/slide-deck/index.js.map +1 -0
  563. package/dist/styles-v3-legacy.css +88 -0
  564. package/dist/styles.css +137 -0
  565. package/dist/tokens-v4.css +187 -0
  566. package/dist/tokens.css +230 -0
  567. package/dist/vite-plugin.d.ts +29 -0
  568. package/dist/vite-plugin.js +76 -0
  569. package/dist/vite-plugin.js.map +1 -0
  570. package/dist/whiteboard/index.d.ts +258 -0
  571. package/dist/whiteboard/index.js +738 -0
  572. package/dist/whiteboard/index.js.map +1 -0
  573. package/llms.txt +273 -0
  574. package/package.json +800 -0
  575. package/registry/index.json +856 -0
  576. package/registry/r/account-menu.json +24 -0
  577. package/registry/r/action-bar.json +22 -0
  578. package/registry/r/agent-composer.json +22 -0
  579. package/registry/r/agent-editor.json +27 -0
  580. package/registry/r/agent-error-card.json +22 -0
  581. package/registry/r/agent-event.json +24 -0
  582. package/registry/r/agent-handoff.json +22 -0
  583. package/registry/r/agent-profile.json +23 -0
  584. package/registry/r/agent-starting-state.json +22 -0
  585. package/registry/r/agent-stream.json +27 -0
  586. package/registry/r/agent-streaming.json +22 -0
  587. package/registry/r/agent-timeline.json +22 -0
  588. package/registry/r/agent-types.json +15 -0
  589. package/registry/r/alert.json +22 -0
  590. package/registry/r/approval-card.json +25 -0
  591. package/registry/r/artifact-preview.json +22 -0
  592. package/registry/r/attachment-chip.json +24 -0
  593. package/registry/r/audit-log-entry.json +23 -0
  594. package/registry/r/auto-compact-notice.json +22 -0
  595. package/registry/r/avatar.json +23 -0
  596. package/registry/r/badge.json +22 -0
  597. package/registry/r/browser-controls.json +22 -0
  598. package/registry/r/build-log-stream.json +19 -0
  599. package/registry/r/button.json +23 -0
  600. package/registry/r/capability-indicator.json +23 -0
  601. package/registry/r/card.json +22 -0
  602. package/registry/r/chat-composer.json +23 -0
  603. package/registry/r/chat-message.json +129 -0
  604. package/registry/r/chat-thread.json +20 -0
  605. package/registry/r/chat-types.json +15 -0
  606. package/registry/r/checkbox.json +24 -0
  607. package/registry/r/cn.json +19 -0
  608. package/registry/r/code-block.json +21 -0
  609. package/registry/r/command-palette.json +25 -0
  610. package/registry/r/confirm-dialog.json +25 -0
  611. package/registry/r/context-card.json +23 -0
  612. package/registry/r/context-window-bar.json +20 -0
  613. package/registry/r/copy-button.json +22 -0
  614. package/registry/r/cost-meter.json +22 -0
  615. package/registry/r/created-files-card.json +23 -0
  616. package/registry/r/cron-job-card.json +22 -0
  617. package/registry/r/cron-jobs-list.json +23 -0
  618. package/registry/r/danger-zone.json +20 -0
  619. package/registry/r/data-table.json +27 -0
  620. package/registry/r/deployment-row.json +23 -0
  621. package/registry/r/dialog.json +23 -0
  622. package/registry/r/diff-viewer.json +20 -0
  623. package/registry/r/domain-config.json +25 -0
  624. package/registry/r/dropdown-menu.json +23 -0
  625. package/registry/r/empty-state.json +20 -0
  626. package/registry/r/env-var-editor.json +25 -0
  627. package/registry/r/folder-context-card.json +23 -0
  628. package/registry/r/folder-selector.json +22 -0
  629. package/registry/r/form-field.json +23 -0
  630. package/registry/r/hook-config.json +22 -0
  631. package/registry/r/hook-event-log.json +22 -0
  632. package/registry/r/input.json +22 -0
  633. package/registry/r/intent-selector.json +24 -0
  634. package/registry/r/label.json +22 -0
  635. package/registry/r/lane-board.json +20 -0
  636. package/registry/r/live-region-context.json +16 -0
  637. package/registry/r/login-split.json +20 -0
  638. package/registry/r/mcp-server-card.json +22 -0
  639. package/registry/r/mcp-server-list.json +23 -0
  640. package/registry/r/memory-editor.json +23 -0
  641. package/registry/r/mention-menu.json +23 -0
  642. package/registry/r/metrics-panel.json +22 -0
  643. package/registry/r/mode-types.json +15 -0
  644. package/registry/r/model-card.json +23 -0
  645. package/registry/r/model-selector.json +23 -0
  646. package/registry/r/page-shell.json +25 -0
  647. package/registry/r/pagination.json +22 -0
  648. package/registry/r/permission-matrix.json +22 -0
  649. package/registry/r/permission-modal.json +24 -0
  650. package/registry/r/permission-types.json +15 -0
  651. package/registry/r/pin-input.json +20 -0
  652. package/registry/r/plan-badge.json +20 -0
  653. package/registry/r/preview-env-card.json +25 -0
  654. package/registry/r/preview-panel.json +21 -0
  655. package/registry/r/progress-checklist.json +23 -0
  656. package/registry/r/progress.json +20 -0
  657. package/registry/r/project-card.json +25 -0
  658. package/registry/r/project-switcher.json +22 -0
  659. package/registry/r/quick-action-chips.json +21 -0
  660. package/registry/r/radio-group.json +23 -0
  661. package/registry/r/recent-folders-list.json +22 -0
  662. package/registry/r/rollback-ui.json +24 -0
  663. package/registry/r/rule-card.json +23 -0
  664. package/registry/r/rule-editor.json +28 -0
  665. package/registry/r/rule-types.json +18 -0
  666. package/registry/r/run-stats.json +22 -0
  667. package/registry/r/running-tasks-panel.json +22 -0
  668. package/registry/r/safe-href.json +16 -0
  669. package/registry/r/scroll-area.json +22 -0
  670. package/registry/r/select.json +24 -0
  671. package/registry/r/session-list-item.json +20 -0
  672. package/registry/r/session-timeline.json +22 -0
  673. package/registry/r/sheet.json +24 -0
  674. package/registry/r/sidebar.json +19 -0
  675. package/registry/r/skeleton.json +19 -0
  676. package/registry/r/skill-card.json +24 -0
  677. package/registry/r/skill-editor.json +28 -0
  678. package/registry/r/skills-list.json +23 -0
  679. package/registry/r/slide-deck.json +130 -0
  680. package/registry/r/slide-plugin-emoji.json +28 -0
  681. package/registry/r/slide-plugin-math.json +24 -0
  682. package/registry/r/slide-plugin-mermaid.json +23 -0
  683. package/registry/r/slide-plugin-shiki.json +23 -0
  684. package/registry/r/slide.json +123 -0
  685. package/registry/r/social-auth-row.json +21 -0
  686. package/registry/r/stat-tile.json +22 -0
  687. package/registry/r/status-dot.json +20 -0
  688. package/registry/r/steps-rail.json +20 -0
  689. package/registry/r/sub-agent-dispatch.json +22 -0
  690. package/registry/r/switch.json +23 -0
  691. package/registry/r/system-prompt-editor.json +22 -0
  692. package/registry/r/table.json +22 -0
  693. package/registry/r/tabs.json +22 -0
  694. package/registry/r/tailwind-preset.json +19 -0
  695. package/registry/r/task-header.json +24 -0
  696. package/registry/r/task-plan.json +22 -0
  697. package/registry/r/task-types.json +15 -0
  698. package/registry/r/terminal-panel.json +22 -0
  699. package/registry/r/textarea.json +22 -0
  700. package/registry/r/theme-provider.json +59 -0
  701. package/registry/r/theme-script.json +18 -0
  702. package/registry/r/theo-ui-provider.json +20 -0
  703. package/registry/r/timestamp.json +20 -0
  704. package/registry/r/toast.json +30 -0
  705. package/registry/r/token-usage-chart.json +20 -0
  706. package/registry/r/tokens.json +21 -0
  707. package/registry/r/tool-call-card.json +23 -0
  708. package/registry/r/tool-call.json +22 -0
  709. package/registry/r/tool-result.json +20 -0
  710. package/registry/r/tools-list.json +23 -0
  711. package/registry/r/tooltip.json +22 -0
  712. package/registry/r/topnav.json +22 -0
  713. package/registry/r/types.json +15 -0
  714. package/registry/r/usage-meter.json +21 -0
  715. package/registry/r/whiteboard.json +101 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "cost-meter",
4
+ "type": "registry:ui",
5
+ "title": "CostMeter",
6
+ "description": "Gauge for token spend that visualizes used vs. budget with color-coded states.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "components/primitives/cost-meter/cost-meter.tsx",
17
+ "type": "registry:ui",
18
+ "target": "components/ui/cost-meter.tsx",
19
+ "content": "import { Coins, TrendingDown, TrendingUp } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\ninterface CostMeterProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Current cost in USD. */\n cost: number;\n /** Optional monthly budget; renders progress bar when present. */\n budget?: number;\n /** Optional title (e.g. \"This session\", \"Monthly\"). */\n title?: ReactNode;\n /** Optional delta vs previous period. */\n delta?: { value: number; period: string };\n /** Compact mode — single-line summary. */\n compact?: boolean;\n}\n\nconst formatUsd = (n: number) =>\n n >= 100 ? `$${n.toFixed(0)}` : n >= 10 ? `$${n.toFixed(1)}` : `$${n.toFixed(2)}`;\n\n/**\n * CostMeter — gauge for token spend. Two visuals:\n * - card: title + big number + optional progress bar + optional delta.\n * - compact: chip \"Coins $4.20\" for nav bars.\n */\nconst CostMeter = forwardRef<HTMLDivElement, CostMeterProps>(\n ({ className, cost, budget, title = \"Spend\", delta, compact, ...props }, ref) => {\n if (compact) {\n return (\n <div\n ref={ref}\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-card px-2.5 py-1\",\n \"font-mono text-label\",\n className,\n )}\n {...props}\n >\n <Coins className=\"size-3 text-primary\" aria-hidden=\"true\" />\n <span className=\"text-foreground tabular-nums\">{formatUsd(cost)}</span>\n {budget ? <span className=\"text-muted-foreground\">/ {formatUsd(budget)}</span> : null}\n </div>\n );\n }\n\n const ratio = budget ? Math.max(0, Math.min(1, cost / budget)) : 0;\n const percent = Math.round(ratio * 100);\n const overBudget = budget !== undefined && cost > budget;\n\n return (\n <div\n ref={ref}\n className={cn(\"grid gap-2 rounded-xl border bg-card p-4\", className)}\n {...props}\n >\n <header className=\"flex items-baseline justify-between\">\n <span className=\"font-mono text-label-caps text-muted-foreground uppercase tracking-wider\">\n {title}\n </span>\n {delta ? (\n <span\n className={cn(\n \"inline-flex items-center gap-1 font-mono text-body-sm tabular-nums\",\n delta.value >= 0 ? \"text-warning\" : \"text-success\",\n )}\n >\n {delta.value >= 0 ? (\n <TrendingUp className=\"size-3\" aria-hidden=\"true\" />\n ) : (\n <TrendingDown className=\"size-3\" aria-hidden=\"true\" />\n )}\n {delta.value >= 0 ? \"+\" : \"\"}\n {formatUsd(Math.abs(delta.value))}{\" \"}\n <span className=\"text-muted-foreground\">{delta.period}</span>\n </span>\n ) : null}\n </header>\n <div className=\"flex items-baseline gap-1.5\">\n <span className=\"font-bold font-display text-display-md text-foreground tabular-nums leading-none\">\n {formatUsd(cost)}\n </span>\n {budget !== undefined ? (\n <span className=\"font-mono text-body-sm text-muted-foreground\">\n of {formatUsd(budget)}\n </span>\n ) : null}\n </div>\n {budget !== undefined ? (\n <div className=\"grid gap-1\">\n <div\n className=\"h-1.5 w-full overflow-hidden rounded-full bg-muted\"\n role=\"progressbar\"\n tabIndex={-1}\n aria-valuenow={percent}\n aria-valuemin={0}\n aria-valuemax={100}\n >\n <div\n className={cn(\n \"h-full rounded-full transition-[width,background-color]\",\n overBudget ? \"bg-destructive\" : ratio > 0.75 ? \"bg-warning\" : \"bg-primary\",\n )}\n style={{ width: `${Math.min(100, percent)}%` }}\n />\n </div>\n <span className=\"font-mono text-label text-muted-foreground tabular-nums\">\n {percent}% of budget {overBudget ? \"· over!\" : \"used\"}\n </span>\n </div>\n ) : null}\n </div>\n );\n },\n);\nCostMeter.displayName = \"CostMeter\";\n\nexport { CostMeter };\n"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "created-files-card",
4
+ "type": "registry:ui",
5
+ "title": "CreatedFilesCard",
6
+ "description": "Surfaces files produced by a completed task.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json",
13
+ "https://usetheodev.github.io/theo-ui/r/types.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/primitives/created-files-card/created-files-card.tsx",
18
+ "type": "registry:ui",
19
+ "target": "components/ui/created-files-card.tsx",
20
+ "content": "import { Cloud, FileSpreadsheet, Folder } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport type { IconComponent } from \"@/lib/types\";\n\nexport interface CreatedFile {\n id: string;\n name: string;\n /** Optional size for display, e.g. \"42 KB\". */\n size?: string;\n /** Icon override. */\n icon?: IconComponent;\n /** Optional destination metadata (e.g. \"Google Drive · /Reports\"). */\n destination?: ReactNode;\n /** Optional URL to open the file. */\n href?: string;\n}\n\ninterface CreatedFilesCardProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title?: ReactNode;\n files: CreatedFile[];\n /**\n * Optional CTA shown at the bottom (e.g. \"Move to Google Drive\").\n */\n cta?: ReactNode;\n}\n\n/**\n * CreatedFilesCard — surfaces files produced by a completed task.\n *\n * From WIREMOCKS §2: each file is a card-like row with icon + name + destination.\n * Used as social proof of delivery in Task Completed views.\n */\nconst CreatedFilesCard = forwardRef<HTMLElement, CreatedFilesCardProps>(\n ({ className, title = \"Files created\", files, cta, ...props }, ref) => (\n <section\n ref={ref}\n className={cn(\"rounded-xl border border-primary/40 bg-primary/5 p-4\", className)}\n {...props}\n >\n <header className=\"mb-3 flex items-center gap-2\">\n <Cloud className=\"size-4 text-primary\" aria-hidden=\"true\" />\n <h3 className=\"font-display text-title-md tracking-tight\">{title}</h3>\n </header>\n <ul className=\"grid gap-2\">\n {files.map((file) => {\n const Icon = file.icon ?? FileSpreadsheet;\n const RowTag = file.href ? \"a\" : \"div\";\n return (\n <li key={file.id}>\n <RowTag\n href={file.href}\n target={file.href ? \"_blank\" : undefined}\n rel={file.href ? \"noreferrer\" : undefined}\n className={cn(\n \"flex items-center gap-3 rounded-md border border-border/40 bg-card px-3 py-2\",\n file.href &&\n \"transition-colors hover:border-primary/40 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n )}\n >\n <Icon className=\"size-5 shrink-0 text-primary\" aria-hidden=\"true\" />\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate font-mono text-code-md text-foreground\">{file.name}</p>\n {file.destination ? (\n <p className=\"flex items-center gap-1 truncate text-body-sm text-muted-foreground\">\n <Folder className=\"size-3 shrink-0\" aria-hidden=\"true\" /> {file.destination}\n </p>\n ) : null}\n </div>\n {file.size ? (\n <span className=\"font-mono text-code-sm text-muted-foreground\">{file.size}</span>\n ) : null}\n </RowTag>\n </li>\n );\n })}\n </ul>\n {cta ? <div className=\"mt-3 flex justify-end\">{cta}</div> : null}\n </section>\n ),\n);\nCreatedFilesCard.displayName = \"CreatedFilesCard\";\n\nexport { CreatedFilesCard };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "cron-job-card",
4
+ "type": "registry:ui",
5
+ "title": "CronJobCard",
6
+ "description": "One scheduled agent job — shows schedule, next run, last status, and toggle / edit actions.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "components/primitives/cron-job-card/cron-job-card.tsx",
17
+ "type": "registry:ui",
18
+ "target": "components/ui/cron-job-card.tsx",
19
+ "content": "import { Clock, Play, Square, Trash2 } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport type CronJobStatus = \"idle\" | \"running\" | \"failed\" | \"disabled\";\n\nexport interface CronJob {\n id: string;\n /** Human-readable job name. */\n name: string;\n /** Cron expression — e.g. every 4 hours. */\n schedule: string;\n /** What gets run (prompt or command). */\n prompt: string;\n status: CronJobStatus;\n /** ISO/string timestamp of last run. */\n lastRun?: string;\n /** ISO/string timestamp of next run. */\n nextRun?: string;\n /** Optional last-run result line. */\n lastResult?: ReactNode;\n}\n\ninterface CronJobCardProps extends Omit<HTMLAttributes<HTMLElement>, \"onToggle\"> {\n job: CronJob;\n onRunNow?: (id: string) => void;\n onToggle?: (id: string, enabled: boolean) => void;\n onRemove?: (id: string) => void;\n}\n\nconst STATUS_CONFIG: Record<CronJobStatus, { label: string; class: string }> = {\n idle: { label: \"Scheduled\", class: \"border-success/40 bg-success/10 text-success\" },\n running: {\n label: \"Running\",\n class: \"border-primary/40 bg-primary/10 text-primary animate-pulse\",\n },\n failed: {\n label: \"Last run failed\",\n class: \"border-destructive/40 bg-destructive/10 text-destructive\",\n },\n disabled: { label: \"Disabled\", class: \"border-border/40 bg-muted text-muted-foreground\" },\n};\n\n/**\n * CronJobCard — one scheduled agent job. Shows cron expression, prompt,\n * status, last/next run. Inline actions: run now, pause, delete.\n */\nconst CronJobCard = forwardRef<HTMLElement, CronJobCardProps>(\n ({ className, job, onRunNow, onToggle, onRemove, ...props }, ref) => {\n const cfg = STATUS_CONFIG[job.status];\n const enabled = job.status !== \"disabled\";\n return (\n <article\n ref={ref}\n className={cn(\n \"grid gap-3 rounded-xl border bg-card p-4\",\n job.status === \"disabled\" && \"opacity-70\",\n className,\n )}\n {...props}\n >\n <header className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <h4 className=\"font-display text-title-md tracking-tight\">{job.name}</h4>\n <p className=\"mt-0.5 inline-flex items-center gap-2 font-mono text-code-sm text-muted-foreground\">\n <Clock className=\"size-3\" aria-hidden=\"true\" /> {job.schedule}\n </p>\n </div>\n <span\n className={cn(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5\",\n \"font-mono text-label uppercase tracking-wider\",\n cfg.class,\n )}\n >\n {cfg.label}\n </span>\n </header>\n\n <p className=\"line-clamp-2 rounded-md bg-muted/60 px-3 py-2 font-mono text-code-sm text-foreground\">\n {job.prompt}\n </p>\n\n <div className=\"grid grid-cols-2 gap-3 font-mono text-label text-muted-foreground\">\n <span>\n <span className=\"text-muted-foreground/60\">last:</span> {job.lastRun ?? \"never\"}\n </span>\n <span>\n <span className=\"text-muted-foreground/60\">next:</span> {job.nextRun ?? \"—\"}\n </span>\n </div>\n\n {job.lastResult ? (\n <p className=\"text-body-sm text-muted-foreground\">{job.lastResult}</p>\n ) : null}\n\n <footer className=\"flex items-center justify-end gap-1.5\">\n {onRunNow ? (\n <button\n type=\"button\"\n onClick={() => onRunNow(job.id)}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card px-2.5 py-1 font-mono text-label hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Play className=\"size-3\" /> Run now\n </button>\n ) : null}\n {onToggle ? (\n <button\n type=\"button\"\n onClick={() => onToggle(job.id, !enabled)}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card px-2.5 py-1 font-mono text-label hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Square className=\"size-3\" /> {enabled ? \"Pause\" : \"Enable\"}\n </button>\n ) : null}\n {onRemove ? (\n <button\n type=\"button\"\n onClick={() => onRemove(job.id)}\n aria-label={`Remove ${job.name}`}\n className=\"rounded-md p-1.5 text-muted-foreground hover:bg-muted hover:text-destructive focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Trash2 className=\"size-3.5\" />\n </button>\n ) : null}\n </footer>\n </article>\n );\n },\n);\nCronJobCard.displayName = \"CronJobCard\";\n\nexport { CronJobCard };\n"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "cron-jobs-list",
4
+ "type": "registry:block",
5
+ "title": "CronJobsList",
6
+ "description": "Grid of CronJobCards with a sticky \"new job\" action.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/cron-job-card.json",
13
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/composites/cron-jobs-list/cron-jobs-list.tsx",
18
+ "type": "registry:block",
19
+ "target": "components/blocks/cron-jobs-list.tsx",
20
+ "content": "import { Plus } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { type CronJob, CronJobCard } from \"@/components/ui/cron-job-card\";\n\ninterface CronJobsListProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\" | \"onToggle\"> {\n jobs: CronJob[];\n title?: ReactNode;\n onAdd?: () => void;\n onRunNow?: (id: string) => void;\n onToggle?: (id: string, enabled: boolean) => void;\n onRemove?: (id: string) => void;\n}\n\n/**\n * CronJobsList — grid of CronJobCards with a sticky \"new job\" action.\n */\nconst CronJobsList = forwardRef<HTMLDivElement, CronJobsListProps>(\n (\n { className, jobs, title = \"Scheduled jobs\", onAdd, onRunNow, onToggle, onRemove, ...props },\n ref,\n ) => (\n <section\n ref={ref}\n className={cn(\"grid gap-3\", className)}\n aria-label=\"Scheduled agent jobs\"\n {...props}\n >\n <header className=\"flex items-baseline justify-between\">\n {title ? <h3 className=\"font-display text-title-md tracking-tight\">{title}</h3> : <span />}\n <div className=\"flex items-center gap-3\">\n <span className=\"font-mono text-label text-muted-foreground\">\n {jobs.length} {jobs.length === 1 ? \"job\" : \"jobs\"}\n </span>\n {onAdd ? (\n <button\n type=\"button\"\n onClick={onAdd}\n className=\"inline-flex items-center gap-1 rounded-md bg-primary px-2.5 py-1 font-sans text-label text-primary-foreground hover:shadow-glow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Plus className=\"size-3.5\" /> New job\n </button>\n ) : null}\n </div>\n </header>\n {jobs.length === 0 ? (\n <p className=\"rounded-xl border border-border/60 border-dashed bg-muted/30 px-4 py-8 text-center font-sans text-body-sm text-muted-foreground\">\n No scheduled jobs yet.\n </p>\n ) : (\n <div className=\"grid grid-cols-1 gap-3 md:grid-cols-2\">\n {jobs.map((job) => (\n <CronJobCard\n key={job.id}\n job={job}\n {...(onRunNow ? { onRunNow } : {})}\n {...(onToggle ? { onToggle } : {})}\n {...(onRemove ? { onRemove } : {})}\n />\n ))}\n </div>\n )}\n </section>\n ),\n);\nCronJobsList.displayName = \"CronJobsList\";\n\nexport { CronJobsList };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "danger-zone",
4
+ "type": "registry:ui",
5
+ "title": "DangerZone",
6
+ "description": "Destructive-actions section primitive with sub-component DangerZone.Action. Red-bordered container with title bar (default 'Danger Zone') and action rows. Each row carries title + description + consumer-provided action slot (typically a destructive Button). Rows separated by hairline dividers; last row drops the bottom border via last:border-b-0.",
7
+ "dependencies": [],
8
+ "registryDependencies": [
9
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
10
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/primitives/danger-zone/danger-zone.tsx",
15
+ "type": "registry:ui",
16
+ "target": "components/ui/danger-zone.tsx",
17
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * DangerZone — destructive-actions section primitive.\n *\n * Red-bordered container with a title bar and `DangerZone.Action` rows.\n * Each Action is laid out as title + description on the left, with a\n * consumer-provided action slot (typically a destructive Button) on\n * the right. Rows are separated by hairline dividers; the last row\n * has no bottom border via `last:border-b-0`.\n *\n * The consumer supplies the destructive button — this primitive never\n * imports `<Button>`, keeping it free of internal `@theokit/ui` deps\n * (true primitive).\n *\n * @example\n * <DangerZone>\n * <DangerZone.Action\n * title=\"Delete project\"\n * description=\"Permanently delete this project.\"\n * action={<Button variant=\"destructive\">Delete</Button>}\n * />\n * </DangerZone>\n */\nexport interface DangerZoneProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n /** Section title. Default \"Danger Zone\". */\n title?: ReactNode;\n}\n\nconst Root = forwardRef<HTMLElement, DangerZoneProps>(\n ({ className, title = \"Danger Zone\", children, ...props }, ref) => (\n <section\n ref={ref}\n aria-label={typeof title === \"string\" ? title : \"Danger Zone\"}\n className={cn(\"rounded-xl border border-destructive/30 bg-destructive/[0.02]\", className)}\n {...props}\n >\n <div className=\"border-destructive/20 border-b px-5 py-3 font-sans text-destructive text-label-caps uppercase tracking-wider\">\n {title}\n </div>\n {children}\n </section>\n ),\n);\nRoot.displayName = \"DangerZone\";\n\nexport interface DangerZoneActionProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: ReactNode;\n description: ReactNode;\n /** Consumer-provided destructive button (or any ReactNode). */\n action: ReactNode;\n}\n\nconst Action = forwardRef<HTMLDivElement, DangerZoneActionProps>(\n ({ className, title, description, action, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-center justify-between gap-4 border-destructive/10 border-b px-5 py-4 last:border-b-0\",\n className,\n )}\n {...props}\n >\n <div className=\"flex flex-col\">\n <span className=\"font-medium font-sans text-body-sm text-foreground\">{title}</span>\n <span className=\"mt-0.5 font-sans text-label text-muted-foreground\">{description}</span>\n </div>\n <div className=\"shrink-0\">{action}</div>\n </div>\n ),\n);\nAction.displayName = \"DangerZone.Action\";\n\ntype DangerZoneRoot = typeof Root & { Action: typeof Action };\nconst DangerZone: DangerZoneRoot = Object.assign(Root, { Action });\n\nexport { DangerZone };\n"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "data-table",
4
+ "type": "registry:ui",
5
+ "title": "DataTable",
6
+ "description": "Generic, sortable, expandable composite over <Table>. Operator-grade entity-list patterns: sortable headers (controlled OR uncontrolled), sticky header, expandable rows (multi default + expandMode='single' opt-in), row action menus via DropdownMenu, client-side pagination, loading skeleton, empty state. Generic over T (e.g. DataTable<Domain>).",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/table.json",
13
+ "https://usetheodev.github.io/theo-ui/r/pagination.json",
14
+ "https://usetheodev.github.io/theo-ui/r/skeleton.json",
15
+ "https://usetheodev.github.io/theo-ui/r/empty-state.json",
16
+ "https://usetheodev.github.io/theo-ui/r/dropdown-menu.json",
17
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
18
+ ],
19
+ "files": [
20
+ {
21
+ "path": "components/composites/data-table/data-table.tsx",
22
+ "type": "registry:ui",
23
+ "target": "components/ui/data-table.tsx",
24
+ "content": "import { ChevronDown, ChevronRight, MoreHorizontal } from \"lucide-react\";\nimport { Fragment, useMemo, useState } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { DropdownMenu } from \"@/components/ui/dropdown-menu\";\nimport { EmptyState } from \"@/components/ui/empty-state\";\nimport { Pagination } from \"@/components/ui/pagination\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport { Table } from \"@/components/ui/table\";\n\n/**\n * DataTable — generic, sortable, expandable composite over `<Table>`.\n *\n * Adds operator-grade entity-list patterns on top of the plain Table\n * primitive: sortable headers, sticky header, expandable rows\n * (multi-row by default), row action menus (Dropdown), client-side\n * pagination, loading skeleton rows, empty state. Both sort and\n * pagination support controlled OR uncontrolled mode (consumer\n * passes onSortChange / onPageChange to take over state).\n *\n * @example\n * <DataTable\n * columns={[\n * { key: \"name\", label: \"Name\", sortable: true },\n * { key: \"status\", label: \"Status\" },\n * ]}\n * data={domains}\n * rowKey={(d) => d.id}\n * expandable={(d) => d.status === \"pending\" ? <DnsRecords domain={d} /> : null}\n * rowActions={(d) => (\n * <>\n * <DropdownMenu.Item onSelect={() => editDomain(d)}>Edit</DropdownMenu.Item>\n * <DropdownMenu.Item onSelect={() => deleteDomain(d)}>Delete</DropdownMenu.Item>\n * </>\n * )}\n * />\n */\nexport interface DataTableColumn<T> {\n key: string;\n label: ReactNode;\n align?: \"left\" | \"center\" | \"right\";\n sortable?: boolean;\n width?: string;\n render?: (row: T) => ReactNode;\n className?: string;\n}\n\nexport interface DataTableSort {\n key: string;\n direction: \"asc\" | \"desc\";\n}\n\nexport interface DataTableProps<T> {\n data: T[];\n columns: DataTableColumn<T>[];\n rowKey: (row: T) => string;\n stickyHeader?: boolean;\n expandable?: (row: T) => ReactNode | null;\n expandMode?: \"single\" | \"multiple\";\n rowActions?: (row: T) => ReactNode;\n pagination?: {\n pageSize: number;\n controlledPage?: number;\n onPageChange?: (page: number) => void;\n } | null;\n defaultSort?: DataTableSort;\n sort?: DataTableSort | null;\n onSortChange?: (sort: DataTableSort | null) => void;\n loading?: boolean;\n emptyState?: ReactNode;\n className?: string;\n}\n\nfunction compareValues(a: unknown, b: unknown): number {\n if (a === b) return 0;\n if (a === null || a === undefined) return -1;\n if (b === null || b === undefined) return 1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n return String(a).localeCompare(String(b));\n}\n\nfunction DataTable<T>(props: DataTableProps<T>): ReactNode {\n const {\n data,\n columns,\n rowKey,\n stickyHeader = true,\n expandable,\n expandMode = \"multiple\",\n rowActions,\n pagination,\n defaultSort,\n sort: controlledSort,\n onSortChange,\n loading = false,\n emptyState,\n className,\n } = props;\n\n const isControlledSort = onSortChange !== undefined;\n const [uncontrolledSort, setUncontrolledSort] = useState<DataTableSort | null>(\n defaultSort ?? null,\n );\n const sort = isControlledSort ? (controlledSort ?? null) : uncontrolledSort;\n\n const isControlledPage = pagination?.controlledPage !== undefined;\n const [uncontrolledPage, setUncontrolledPage] = useState(0);\n const currentPage = isControlledPage ? (pagination?.controlledPage ?? 0) : uncontrolledPage;\n\n // EC-9: clamp pageSize to >= 1 to avoid divide-by-zero / infinite render\n const effectivePageSize = Math.max(1, pagination?.pageSize ?? 10);\n\n const [expanded, setExpanded] = useState<Set<string>>(new Set());\n\n function handleSort(columnKey: string) {\n // Cycle: none → asc → desc → none\n let nextSort: DataTableSort | null;\n if (sort?.key !== columnKey) {\n nextSort = { key: columnKey, direction: \"asc\" };\n } else if (sort.direction === \"asc\") {\n nextSort = { key: columnKey, direction: \"desc\" };\n } else {\n nextSort = null;\n }\n if (isControlledSort) {\n onSortChange?.(nextSort);\n } else {\n setUncontrolledSort(nextSort);\n // EC-8: sort change resets pagination to page 0\n if (!isControlledPage) setUncontrolledPage(0);\n }\n }\n\n function handlePageChange(page: number) {\n // Pagination uses 1-indexed; internal state 0-indexed\n const zeroIdx = page - 1;\n if (isControlledPage) {\n pagination?.onPageChange?.(zeroIdx);\n } else {\n setUncontrolledPage(zeroIdx);\n }\n }\n\n function toggleExpand(key: string) {\n if (expandMode === \"single\") {\n setExpanded((prev) => (prev.has(key) ? new Set() : new Set([key])));\n } else {\n setExpanded((prev) => {\n const next = new Set(prev);\n if (next.has(key)) {\n next.delete(key);\n } else {\n next.add(key);\n }\n return next;\n });\n }\n }\n\n // Apply client-side sort in uncontrolled mode\n const sortedData = useMemo(() => {\n if (isControlledSort || sort === null) return data;\n const col = columns.find((c) => c.key === sort.key);\n if (!col) return data;\n const sorted = [...data].sort((a, b) => {\n const aVal = col.render\n ? null\n : (a as Record<string, unknown>)[sort.key as keyof T as string];\n const bVal = col.render\n ? null\n : (b as Record<string, unknown>)[sort.key as keyof T as string];\n const cmp = compareValues(aVal, bVal);\n return sort.direction === \"asc\" ? cmp : -cmp;\n });\n return sorted;\n }, [data, sort, isControlledSort, columns]);\n\n // Apply client-side pagination in uncontrolled mode\n const visibleData = useMemo(() => {\n if (!pagination) return sortedData;\n if (isControlledPage) return sortedData; // consumer pre-sliced\n const start = currentPage * effectivePageSize;\n return sortedData.slice(start, start + effectivePageSize);\n }, [sortedData, pagination, isControlledPage, currentPage, effectivePageSize]);\n\n // EC-1 fix: compute colSpan accounting for chevron + actions columns\n const extraCols = (expandable ? 1 : 0) + (rowActions ? 1 : 0);\n const expandedColSpan = columns.length + extraCols;\n const totalCols = columns.length + extraCols;\n\n // Loading state (EC-7: loading > empty)\n if (loading) {\n return (\n <div className={cn(\"w-full\", className)}>\n <Table>\n <Table.Header className={stickyHeader ? \"sticky top-0 bg-card\" : undefined}>\n <Table.Row>\n {expandable ? (\n <Table.HeaderCell>\n <span className=\"sr-only\">Expand</span>\n </Table.HeaderCell>\n ) : null}\n {columns.map((col) => (\n <Table.HeaderCell key={col.key} align={col.align}>\n {col.label}\n </Table.HeaderCell>\n ))}\n {rowActions ? (\n <Table.HeaderCell>\n <span className=\"sr-only\">Actions</span>\n </Table.HeaderCell>\n ) : null}\n </Table.Row>\n </Table.Header>\n <Table.Body>\n {Array.from({ length: 5 }, (_, i) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton rows are positional placeholders\n <Table.Row key={`skeleton-${i}`}>\n {Array.from({ length: totalCols }, (_, j) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton cells are positional placeholders\n <Table.Cell key={`s-${i}-${j}`}>\n <Skeleton className=\"h-4 w-full\" />\n </Table.Cell>\n ))}\n </Table.Row>\n ))}\n </Table.Body>\n </Table>\n </div>\n );\n }\n\n // Empty state (after loading check)\n if (sortedData.length === 0) {\n return (\n <div className={cn(\"w-full\", className)}>\n {emptyState ?? <EmptyState title=\"No data\" description=\"There's nothing here yet.\" />}\n </div>\n );\n }\n\n const totalPages = pagination ? Math.ceil(sortedData.length / effectivePageSize) : 1;\n\n return (\n <div className={cn(\"w-full\", className)}>\n <Table>\n <Table.Header className={stickyHeader ? \"sticky top-0 z-10 bg-card\" : undefined}>\n <Table.Row>\n {expandable ? (\n <Table.HeaderCell>\n <span className=\"sr-only\">Expand</span>\n </Table.HeaderCell>\n ) : null}\n {columns.map((col) => {\n const isSortable = col.sortable === true;\n const isActive = sort?.key === col.key;\n return (\n <Table.HeaderCell\n key={col.key}\n align={col.align}\n onSort={isSortable ? () => handleSort(col.key) : undefined}\n sortDirection={isSortable ? (isActive ? sort?.direction : \"none\") : undefined}\n style={col.width ? { width: col.width } : undefined}\n >\n {col.label}\n </Table.HeaderCell>\n );\n })}\n {rowActions ? (\n <Table.HeaderCell>\n <span className=\"sr-only\">Actions</span>\n </Table.HeaderCell>\n ) : null}\n </Table.Row>\n </Table.Header>\n <Table.Body>\n {visibleData.map((row) => {\n const key = rowKey(row);\n const expandedContent = expandable ? expandable(row) : null;\n const isExpandable = expandedContent !== null && expandedContent !== undefined;\n const isExpanded = expanded.has(key);\n return (\n <Fragment key={key}>\n <Table.Row>\n {expandable ? (\n <Table.Cell>\n {isExpandable ? (\n <button\n type=\"button\"\n onClick={() => toggleExpand(key)}\n aria-expanded={isExpanded}\n aria-controls={`expanded-${key}`}\n aria-label={isExpanded ? \"Collapse row\" : \"Expand row\"}\n className=\"inline-flex items-center justify-center rounded-md p-0.5 hover:bg-muted\"\n >\n {isExpanded ? (\n <ChevronDown aria-hidden=\"true\" className=\"size-4\" />\n ) : (\n <ChevronRight aria-hidden=\"true\" className=\"size-4\" />\n )}\n </button>\n ) : null}\n </Table.Cell>\n ) : null}\n {columns.map((col) => (\n <Table.Cell key={col.key} align={col.align} className={col.className}>\n {col.render\n ? col.render(row)\n : String((row as Record<string, unknown>)[col.key] ?? \"\")}\n </Table.Cell>\n ))}\n {rowActions ? (\n <Table.Cell align=\"right\">\n <DropdownMenu>\n <DropdownMenu.Trigger\n aria-label=\"Row actions\"\n className={cn(\n \"inline-flex size-7 items-center justify-center rounded-md\",\n \"text-muted-foreground hover:bg-muted hover:text-foreground\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n )}\n >\n <MoreHorizontal aria-hidden=\"true\" className=\"size-4\" />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">{rowActions(row)}</DropdownMenu.Content>\n </DropdownMenu>\n </Table.Cell>\n ) : null}\n </Table.Row>\n {isExpanded && isExpandable ? (\n <tr id={`expanded-${key}`}>\n <td colSpan={expandedColSpan} className=\"bg-muted/30 p-4\">\n {expandedContent}\n </td>\n </tr>\n ) : null}\n </Fragment>\n );\n })}\n </Table.Body>\n </Table>\n {pagination && totalPages > 1 ? (\n <div className=\"mt-4 flex items-center justify-end\">\n <Pagination\n currentPage={currentPage + 1}\n totalPages={totalPages}\n onPageChange={handlePageChange}\n />\n </div>\n ) : null}\n </div>\n );\n}\n\nexport { DataTable };\n"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "deployment-row",
4
+ "type": "registry:block",
5
+ "title": "DeploymentRow",
6
+ "description": "One row in a deployment list (table-ish layout).",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/badge.json",
12
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
13
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/composites/deployment-row/deployment-row.tsx",
18
+ "type": "registry:block",
19
+ "target": "components/blocks/deployment-row.tsx",
20
+ "content": "import { GitCommit } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { Badge } from \"@/components/ui/badge\";\n\nexport type DeploymentStatus =\n | \"queued\"\n | \"building\"\n | \"deploying\"\n | \"live\"\n | \"failed\"\n | \"cancelled\";\n\nconst statusToVariant: Record<\n DeploymentStatus,\n \"default\" | \"primary\" | \"success\" | \"warning\" | \"destructive\"\n> = {\n queued: \"warning\",\n building: \"primary\",\n deploying: \"primary\",\n live: \"success\",\n failed: \"destructive\",\n cancelled: \"default\",\n};\n\nconst statusToDotTone: Record<\n DeploymentStatus,\n \"primary\" | \"success\" | \"warning\" | \"destructive\" | \"muted\"\n> = {\n queued: \"warning\",\n building: \"primary\",\n deploying: \"primary\",\n live: \"success\",\n failed: \"destructive\",\n cancelled: \"muted\",\n};\n\nconst statusLabels: Record<DeploymentStatus, string> = {\n queued: \"Queued\",\n building: \"Building\",\n deploying: \"Deploying\",\n live: \"Live\",\n failed: \"Failed\",\n cancelled: \"Cancelled\",\n};\n\nconst isAnimated = (status: DeploymentStatus) =>\n status === \"building\" || status === \"deploying\" || status === \"queued\";\n\nexport interface Deployment {\n id: string;\n status: DeploymentStatus;\n environment: string;\n branch: string;\n commitSha: string;\n commitMessage: string;\n author?: { name: string; avatarUrl?: string };\n duration?: string;\n timeAgo: string;\n}\n\ninterface DeploymentRowProps extends HTMLAttributes<HTMLDivElement> {\n deployment: Deployment;\n actions?: ReactNode;\n}\n\n/**\n * DeploymentRow — one row in a deployment list (table-ish layout).\n *\n * Inspired by Vercel/Railway deployment lists. Composes Badge + Badge.Dot for status,\n * mono font for SHA/branch, muted-foreground for metadata.\n */\nconst DeploymentRow = forwardRef<HTMLDivElement, DeploymentRowProps>(\n ({ className, deployment, actions, ...props }, ref) => {\n const variant = statusToVariant[deployment.status];\n const tone = statusToDotTone[deployment.status];\n return (\n <div\n ref={ref}\n className={cn(\n \"grid grid-cols-[auto_1fr_auto] items-center gap-4 border-border/40 border-b px-4 py-3\",\n \"last:border-b-0\",\n \"transition-colors hover:bg-muted/40\",\n className,\n )}\n {...props}\n >\n <Badge variant={variant} className=\"min-w-[88px] justify-center\">\n <Badge.Dot tone={tone} pulse={isAnimated(deployment.status)} />\n {statusLabels[deployment.status]}\n </Badge>\n\n <div className=\"min-w-0\">\n <p className=\"truncate font-medium text-body-sm text-foreground\">\n {deployment.commitMessage}\n </p>\n <p className=\"mt-0.5 flex flex-wrap items-center gap-2 text-body-sm text-muted-foreground\">\n <span className=\"font-mono text-code-sm\">{deployment.environment}</span>\n <span aria-hidden=\"true\">·</span>\n <span className=\"inline-flex items-center gap-1 font-mono text-code-sm\">\n <GitCommit className=\"size-3\" /> {deployment.commitSha.slice(0, 7)}\n </span>\n <span aria-hidden=\"true\">·</span>\n <span className=\"font-mono text-code-sm\">{deployment.branch}</span>\n {deployment.author ? (\n <>\n <span aria-hidden=\"true\">·</span>\n <span>by {deployment.author.name}</span>\n </>\n ) : null}\n {deployment.duration ? (\n <>\n <span aria-hidden=\"true\">·</span>\n <span className=\"font-mono text-code-sm\">{deployment.duration}</span>\n </>\n ) : null}\n <span aria-hidden=\"true\">·</span>\n <span>{deployment.timeAgo}</span>\n </p>\n </div>\n\n {actions ? <div className=\"flex items-center gap-1\">{actions}</div> : null}\n </div>\n );\n },\n);\nDeploymentRow.displayName = \"DeploymentRow\";\n\nexport { DeploymentRow };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "dialog",
4
+ "type": "registry:ui",
5
+ "title": "Dialog",
6
+ "description": "Modal overlay built on Radix Dialog.",
7
+ "dependencies": [
8
+ "@radix-ui/react-dialog",
9
+ "lucide-react"
10
+ ],
11
+ "registryDependencies": [
12
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
13
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/primitives/dialog/dialog.tsx",
18
+ "type": "registry:ui",
19
+ "target": "components/ui/dialog.tsx",
20
+ "content": "import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Dialog — modal overlay built on Radix Dialog.\n *\n * Composition:\n * <Dialog>\n * <Dialog.Trigger>Open</Dialog.Trigger>\n * <Dialog.Content>\n * <Dialog.Header>\n * <Dialog.Title>…</Dialog.Title>\n * <Dialog.Description>…</Dialog.Description>\n * </Dialog.Header>\n * <Dialog.Body>…</Dialog.Body>\n * <Dialog.Footer>…</Dialog.Footer>\n * </Dialog.Content>\n * </Dialog>\n *\n * Overlay is a theme-neutral backdrop (`bg-background/80`) with no glass blur\n * (anti-glass guideline). Content uses card surface, rounded-2xl, shadow-lg\n * + slight glow on enter.\n */\n\nconst Overlay = forwardRef<\n ElementRef<typeof DialogPrimitive.Overlay>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80\",\n \"data-[state=open]:fade-in-0 data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=closed]:animate-out\",\n className,\n )}\n {...props}\n />\n));\nOverlay.displayName = \"Dialog.Overlay\";\n\ninterface ContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n hideCloseButton?: boolean;\n}\n\nconst Content = forwardRef<ElementRef<typeof DialogPrimitive.Content>, ContentProps>(\n ({ className, children, hideCloseButton, ...props }, ref) => (\n <DialogPrimitive.Portal>\n <Overlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2 z-50 w-full max-w-lg\",\n \"rounded-2xl border bg-card text-card-foreground shadow-lg\",\n \"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out\",\n \"duration-base\",\n className,\n )}\n {...props}\n >\n {children}\n {!hideCloseButton ? (\n <DialogPrimitive.Close\n className={cn(\n \"absolute top-4 right-4 rounded-md p-1 opacity-70\",\n \"transition-opacity hover:opacity-100\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card\",\n \"disabled:pointer-events-none\",\n )}\n >\n <X className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ),\n);\nContent.displayName = \"Dialog.Content\";\n\nconst Header = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col gap-1.5 p-6 pb-3 text-left\", className)} {...props} />\n);\nHeader.displayName = \"Dialog.Header\";\n\nconst Body = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"px-6 pb-6 text-body-md text-muted-foreground\", className)} {...props} />\n);\nBody.displayName = \"Dialog.Body\";\n\nconst Footer = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse gap-2 p-6 pt-3 sm:flex-row sm:justify-end\", className)}\n {...props}\n />\n);\nFooter.displayName = \"Dialog.Footer\";\n\ntype TitleProps = ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;\n\nconst Title = forwardRef<ElementRef<typeof DialogPrimitive.Title>, TitleProps>(\n ({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"font-display text-foreground text-title-lg tracking-tight\", className)}\n {...props}\n />\n ),\n);\nTitle.displayName = \"Dialog.Title\";\n\nconst Description = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-body-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDescription.displayName = \"Dialog.Description\";\n\nconst Dialog = /*#__PURE__*/ Object.assign(DialogPrimitive.Root, {\n Trigger: DialogPrimitive.Trigger,\n Close: DialogPrimitive.Close,\n Content,\n Overlay,\n Header,\n Body,\n Footer,\n Title,\n Description,\n});\n\nexport { Dialog };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "diff-viewer",
4
+ "type": "registry:ui",
5
+ "title": "DiffViewer",
6
+ "description": "Unified diff rendering, no external dep.",
7
+ "dependencies": [],
8
+ "registryDependencies": [
9
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
10
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/primitives/diff-viewer/diff-viewer.tsx",
15
+ "type": "registry:ui",
16
+ "target": "components/ui/diff-viewer.tsx",
17
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport type DiffLineKind = \"added\" | \"removed\" | \"unchanged\" | \"meta\";\n\nexport interface DiffLine {\n kind: DiffLineKind;\n /** Original line number (left side); undefined for added lines. */\n oldNumber?: number;\n /** New line number (right side); undefined for removed lines. */\n newNumber?: number;\n content: string;\n}\n\nexport interface DiffHunk {\n id: string;\n /**\n * Optional header (e.g. \"@@ -42,7 +42,12 @@\"). Caller usually formats this.\n */\n header?: string;\n lines: DiffLine[];\n /**\n * If true, the hunk is rendered as a collapsed \"N unmodified lines\" placeholder.\n */\n collapsed?: boolean;\n}\n\ninterface DiffViewerProps extends HTMLAttributes<HTMLDivElement> {\n /** Path of the file being diffed. */\n path: string;\n /** Diff stats summary. */\n stats?: { added: number; removed: number };\n hunks: DiffHunk[];\n}\n\nconst lineBg: Record<DiffLineKind, string> = {\n added: \"bg-success/10\",\n removed: \"bg-destructive/10\",\n unchanged: \"\",\n meta: \"bg-muted/60 text-primary\",\n};\n\nconst sign: Record<DiffLineKind, string> = {\n added: \"+\",\n removed: \"-\",\n unchanged: \" \",\n meta: \"@\",\n};\n\n/**\n * DiffViewer — unified diff rendering, no external dep.\n *\n * Visual: two gutter columns (old/new line numbers) + sign + monospaced content.\n * Added/removed rows tinted in success/destructive. Collapsed hunks render as\n * a single muted row \"N unmodified lines\".\n *\n * For syntax highlighting, the consumer can render `content` via their own\n * highlighter and pass `unchanged` lines with already-highlighted strings (not\n * common; usually plain text is enough for the brutalist console aesthetic).\n */\nconst DiffViewer = forwardRef<HTMLDivElement, DiffViewerProps>(\n ({ className, path, stats, hunks, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"overflow-hidden rounded-xl border bg-card font-mono\", className)}\n {...props}\n >\n <header className=\"flex items-center justify-between gap-3 border-border/40 border-b bg-muted/30 px-3 py-2\">\n <span className=\"truncate text-code-sm text-foreground\">{path}</span>\n {stats ? (\n <span className=\"font-mono text-code-sm\">\n <span className=\"text-success\">+{stats.added}</span>{\" \"}\n <span className=\"text-destructive\">-{stats.removed}</span>\n </span>\n ) : null}\n </header>\n <ol className=\"text-code-sm\">\n {hunks.map((hunk) => (\n <li key={hunk.id}>\n {hunk.collapsed ? (\n <div className=\"px-3 py-1 text-muted-foreground italic\">\n {hunk.lines.length} unmodified lines\n </div>\n ) : (\n <>\n {hunk.header ? (\n <div className=\"bg-muted/60 px-3 py-1 text-primary\">{hunk.header}</div>\n ) : null}\n <table className=\"w-full border-collapse\" aria-label={`Diff hunk for ${path}`}>\n <tbody>\n {hunk.lines.map((line, idx) => (\n <tr key={`${hunk.id}-${idx}`} className={lineBg[line.kind]}>\n <td className=\"select-none px-2 text-right text-muted-foreground/60 tabular-nums\">\n {line.oldNumber ?? \"\"}\n </td>\n <td className=\"select-none px-2 text-right text-muted-foreground/60 tabular-nums\">\n {line.newNumber ?? \"\"}\n </td>\n <td\n className={cn(\n \"select-none pr-1 pl-2\",\n line.kind === \"added\" && \"text-success\",\n line.kind === \"removed\" && \"text-destructive\",\n line.kind === \"meta\" && \"text-primary\",\n )}\n >\n {sign[line.kind]}\n </td>\n <td\n className={cn(\n \"w-full whitespace-pre\",\n line.kind === \"added\" && \"text-success\",\n line.kind === \"removed\" && \"text-destructive\",\n )}\n >\n {line.content}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </>\n )}\n </li>\n ))}\n </ol>\n </div>\n ),\n);\nDiffViewer.displayName = \"DiffViewer\";\n\nexport { DiffViewer };\n"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "domain-config",
4
+ "type": "registry:block",
5
+ "title": "DomainConfig",
6
+ "description": "Manage custom domains for a project.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/badge.json",
12
+ "https://usetheodev.github.io/theo-ui/r/button.json",
13
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
14
+ "https://usetheodev.github.io/theo-ui/r/input.json",
15
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
16
+ ],
17
+ "files": [
18
+ {
19
+ "path": "components/composites/domain-config/domain-config.tsx",
20
+ "type": "registry:block",
21
+ "target": "components/blocks/domain-config.tsx",
22
+ "content": "import { Check, Globe, Plus, ShieldCheck, ShieldX, Trash2 } from \"lucide-react\";\nimport { forwardRef, useState } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\n\nexport type DomainStatus = \"verified\" | \"pending\" | \"invalid\";\n\nexport interface Domain {\n id: string;\n hostname: string;\n status: DomainStatus;\n primary?: boolean;\n /**\n * TLS state. If true, certificate is provisioned & valid.\n */\n tls?: boolean;\n /**\n * DNS record the user must add to verify ownership.\n */\n verificationRecord?: {\n type: \"TXT\" | \"CNAME\" | \"A\";\n name: string;\n value: string;\n };\n}\n\nconst statusVariant: Record<DomainStatus, \"success\" | \"warning\" | \"destructive\"> = {\n verified: \"success\",\n pending: \"warning\",\n invalid: \"destructive\",\n};\nconst statusDot: Record<DomainStatus, \"success\" | \"warning\" | \"destructive\"> = {\n verified: \"success\",\n pending: \"warning\",\n invalid: \"destructive\",\n};\nconst statusLabel: Record<DomainStatus, string> = {\n verified: \"Verified\",\n pending: \"Pending DNS\",\n invalid: \"Invalid\",\n};\n\ninterface DomainConfigProps extends HTMLAttributes<HTMLDivElement> {\n domains: Domain[];\n onAdd?: (hostname: string) => void;\n onRemove?: (id: string) => void;\n onSetPrimary?: (id: string) => void;\n}\n\n/**\n * DomainConfig — manage custom domains for a project.\n *\n * Shows: hostname, status, TLS, primary flag, and verification DNS record when pending.\n * Common in every cloud dashboard (Vercel, Railway, Render).\n */\nconst DomainConfig = forwardRef<HTMLDivElement, DomainConfigProps>(\n ({ className, domains, onAdd, onRemove, onSetPrimary, ...props }, ref) => {\n const [hostname, setHostname] = useState(\"\");\n\n return (\n <div\n ref={ref}\n className={cn(\"rounded-xl border bg-card p-5 shadow-sm\", className)}\n {...props}\n >\n <header className=\"mb-4 flex items-baseline justify-between gap-3\">\n <div>\n <h3 className=\"font-display text-title-md tracking-tight\">Domains</h3>\n <p className=\"text-body-sm text-muted-foreground\">{domains.length} configured</p>\n </div>\n </header>\n\n {onAdd ? (\n <form\n className=\"mb-4 grid grid-cols-[1fr_auto] gap-2\"\n onSubmit={(e) => {\n e.preventDefault();\n const v = hostname.trim();\n if (!v) return;\n onAdd(v);\n setHostname(\"\");\n }}\n >\n <Input\n placeholder=\"api.acme.com\"\n value={hostname}\n onChange={(e) => setHostname(e.target.value)}\n aria-label=\"Hostname\"\n className=\"font-mono\"\n />\n <Button type=\"submit\">\n <Plus /> Add domain\n </Button>\n </form>\n ) : null}\n\n <ul className=\"grid gap-3\">\n {domains.map((d) => (\n <li key={d.id} className=\"grid gap-3 rounded-lg border border-border/40 p-4\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <Globe className=\"size-4 text-muted-foreground\" aria-hidden=\"true\" />\n <span className=\"font-mono text-code-md text-foreground\">{d.hostname}</span>\n <Badge variant={statusVariant[d.status]}>\n <Badge.Dot tone={statusDot[d.status]} pulse={d.status === \"pending\"} />\n {statusLabel[d.status]}\n </Badge>\n {d.tls === true ? (\n <Badge variant=\"primary\">\n <ShieldCheck className=\"size-3\" /> TLS\n </Badge>\n ) : d.tls === false ? (\n <Badge variant=\"destructive\">\n <ShieldX className=\"size-3\" /> No TLS\n </Badge>\n ) : null}\n {d.primary ? (\n <Badge variant=\"accent\">\n <Check className=\"size-3\" /> Primary\n </Badge>\n ) : null}\n <div className=\"ml-auto flex items-center gap-1\">\n {!d.primary && onSetPrimary ? (\n <Button size=\"sm\" variant=\"ghost\" onClick={() => onSetPrimary(d.id)}>\n Set primary\n </Button>\n ) : null}\n {onRemove ? (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n onClick={() => onRemove(d.id)}\n aria-label={`Remove ${d.hostname}`}\n >\n <Trash2 />\n </Button>\n ) : null}\n </div>\n </div>\n {d.status === \"pending\" && d.verificationRecord ? (\n <div className=\"rounded-md border border-border/60 border-dashed bg-muted/30 p-3 font-mono text-code-sm\">\n <p className=\"mb-2 font-sans text-label-caps text-muted-foreground uppercase\">\n Add this DNS record to verify\n </p>\n <div className=\"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1\">\n <span className=\"text-muted-foreground\">type</span>\n <span>{d.verificationRecord.type}</span>\n <span className=\"text-muted-foreground\">name</span>\n <span>{d.verificationRecord.name}</span>\n <span className=\"text-muted-foreground\">value</span>\n <span className=\"break-all\">{d.verificationRecord.value}</span>\n </div>\n </div>\n ) : null}\n </li>\n ))}\n {domains.length === 0 ? (\n <li className=\"rounded-lg border border-border/40 border-dashed p-8 text-center text-body-sm text-muted-foreground\">\n No domains yet. Add one to route traffic to this project.\n </li>\n ) : null}\n </ul>\n </div>\n );\n },\n);\nDomainConfig.displayName = \"DomainConfig\";\n\nexport { DomainConfig };\n"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "dropdown-menu",
4
+ "type": "registry:ui",
5
+ "title": "DropdownMenu",
6
+ "description": "Accessible dropdown menu primitive built on @radix-ui/react-dropdown-menu. Sub-components attached via Object.assign (Trigger, Content, Item, CheckboxItem, RadioItem, Label, Separator, Shortcut, Group, Sub, SubTrigger, SubContent, RadioGroup). Styled with @theokit/ui design tokens. Consolidates the 5 prior direct-Radix usages under a single wrapper.",
7
+ "dependencies": [
8
+ "@radix-ui/react-dropdown-menu",
9
+ "lucide-react"
10
+ ],
11
+ "registryDependencies": [
12
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
13
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/primitives/dropdown-menu/dropdown-menu.tsx",
18
+ "type": "registry:ui",
19
+ "target": "components/ui/dropdown-menu.tsx",
20
+ "content": "import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ElementRef, HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * DropdownMenu — accessible menu primitive built on Radix.\n *\n * Composition (single import surface):\n * <DropdownMenu>\n * <DropdownMenu.Trigger>…</DropdownMenu.Trigger>\n * <DropdownMenu.Content>\n * <DropdownMenu.Label>Section</DropdownMenu.Label>\n * <DropdownMenu.Item onSelect={…}>Edit</DropdownMenu.Item>\n * <DropdownMenu.Separator />\n * <DropdownMenu.Item disabled>Delete</DropdownMenu.Item>\n * </DropdownMenu.Content>\n * </DropdownMenu>\n *\n * The primitive consolidates 5 prior direct-Radix usages\n * (`model-selector`, `intent-selector`, `agent-profile`,\n * `theme-switcher`, `theo-code-shell`) under a single styled\n * wrapper so consumers get consistent visuals + the design tokens.\n *\n * a11y note for tests: Radix's focus-guard spans intentionally\n * violate `aria-hidden-focus`. Tests should pass\n * `{ rules: { \"aria-hidden-focus\": { enabled: false } } }` to axe.\n */\n\nconst Trigger = DropdownMenuPrimitive.Trigger;\nconst Portal = DropdownMenuPrimitive.Portal;\nconst Group = DropdownMenuPrimitive.Group;\nconst Sub = DropdownMenuPrimitive.Sub;\nconst RadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst Content = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-lg border border-border/40 bg-card p-1\",\n \"text-card-foreground shadow-md\",\n \"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nContent.displayName = \"DropdownMenu.Content\";\n\ninterface ItemProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst Item = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Item>, ItemProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5\",\n \"font-sans text-body-sm text-foreground outline-none\",\n \"transition-colors\",\n \"focus:bg-muted focus:text-foreground\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n ),\n);\nItem.displayName = \"DropdownMenu.Item\";\n\nconst CheckboxItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-md py-1.5 pr-2 pl-8\",\n \"font-sans text-body-sm text-foreground outline-none\",\n \"transition-colors focus:bg-muted focus:text-foreground\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check aria-hidden=\"true\" className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nCheckboxItem.displayName = \"DropdownMenu.CheckboxItem\";\n\nconst RadioItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-md py-1.5 pr-2 pl-8\",\n \"font-sans text-body-sm text-foreground outline-none\",\n \"transition-colors focus:bg-muted focus:text-foreground\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle aria-hidden=\"true\" className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nRadioItem.displayName = \"DropdownMenu.RadioItem\";\n\ninterface LabelProps extends ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst Label = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Label>, LabelProps>(\n ({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 font-medium font-sans text-label-caps text-muted-foreground uppercase tracking-wider\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n ),\n);\nLabel.displayName = \"DropdownMenu.Label\";\n\nconst Separator = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Separator>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border/40\", className)}\n {...props}\n />\n));\nSeparator.displayName = \"DropdownMenu.Separator\";\n\nconst Shortcut = ({ className, ...props }: HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto font-mono text-label text-muted-foreground\", className)}\n {...props}\n />\n);\nShortcut.displayName = \"DropdownMenu.Shortcut\";\n\nconst SubTrigger = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5\",\n \"font-sans text-body-sm text-foreground outline-none\",\n \"focus:bg-muted data-[state=open]:bg-muted\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight aria-hidden=\"true\" className=\"ml-auto size-3.5\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nSubTrigger.displayName = \"DropdownMenu.SubTrigger\";\n\nconst SubContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-lg border border-border/40 bg-card p-1\",\n \"text-card-foreground shadow-md\",\n \"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in\",\n \"data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out\",\n className,\n )}\n {...props}\n />\n));\nSubContent.displayName = \"DropdownMenu.SubContent\";\n\ntype DropdownMenuRoot = typeof DropdownMenuPrimitive.Root & {\n Trigger: typeof Trigger;\n Portal: typeof Portal;\n Content: typeof Content;\n Item: typeof Item;\n CheckboxItem: typeof CheckboxItem;\n RadioItem: typeof RadioItem;\n Label: typeof Label;\n Separator: typeof Separator;\n Shortcut: typeof Shortcut;\n Group: typeof Group;\n Sub: typeof Sub;\n SubTrigger: typeof SubTrigger;\n SubContent: typeof SubContent;\n RadioGroup: typeof RadioGroup;\n};\n\nconst DropdownMenu: DropdownMenuRoot = Object.assign(DropdownMenuPrimitive.Root, {\n Trigger,\n Portal,\n Content,\n Item,\n CheckboxItem,\n RadioItem,\n Label,\n Separator,\n Shortcut,\n Group,\n Sub,\n SubTrigger,\n SubContent,\n RadioGroup,\n});\n\nexport { DropdownMenu };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "empty-state",
4
+ "type": "registry:ui",
5
+ "title": "EmptyState",
6
+ "description": "Visual placeholder for empty lists / first-run screens.",
7
+ "registryDependencies": [
8
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
9
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json",
10
+ "https://usetheodev.github.io/theo-ui/r/types.json"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "components/primitives/empty-state/empty-state.tsx",
15
+ "type": "registry:ui",
16
+ "target": "components/ui/empty-state.tsx",
17
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport type { IconComponent } from \"@/lib/types\";\n\ninterface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n /** Icon shown above the title. */\n icon?: IconComponent;\n title: ReactNode;\n description?: ReactNode;\n /** Optional action slot (typically <Button>). */\n action?: ReactNode;\n /** Hint shown above the title (e.g. uppercase eyebrow). */\n eyebrow?: ReactNode;\n /** Bordered dashed surface (placeholder vibe). Default true. */\n dashed?: boolean;\n}\n\n/**\n * EmptyState — visual placeholder for empty lists / first-run screens.\n *\n * Composition: icon + eyebrow + title + description + action. All slots are\n * optional except title.\n */\nconst EmptyState = forwardRef<HTMLDivElement, EmptyStateProps>(\n (\n { className, icon: Icon, title, description, action, eyebrow, dashed = true, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\n \"grid place-items-center gap-3 rounded-2xl border bg-card px-6 py-12 text-center\",\n dashed ? \"border-border/60 border-dashed\" : \"border-border/40\",\n className,\n )}\n {...props}\n >\n {Icon ? (\n <span className=\"grid size-12 place-items-center rounded-2xl bg-primary/10 text-primary\">\n <Icon className=\"size-6\" aria-hidden=\"true\" />\n </span>\n ) : null}\n {eyebrow ? (\n <p className=\"font-mono text-label-caps text-muted-foreground uppercase\">{eyebrow}</p>\n ) : null}\n <h3 className=\"font-display text-foreground text-title-md\">{title}</h3>\n {description ? (\n <p className=\"max-w-md text-body-sm text-muted-foreground\">{description}</p>\n ) : null}\n {action ? <div className=\"mt-2\">{action}</div> : null}\n </div>\n ),\n);\nEmptyState.displayName = \"EmptyState\";\n\nexport { EmptyState };\n"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "env-var-editor",
4
+ "type": "registry:block",
5
+ "title": "EnvVarEditor",
6
+ "description": "Table-like editor for environment variables.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/badge.json",
12
+ "https://usetheodev.github.io/theo-ui/r/button.json",
13
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
14
+ "https://usetheodev.github.io/theo-ui/r/input.json",
15
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
16
+ ],
17
+ "files": [
18
+ {
19
+ "path": "components/composites/env-var-editor/env-var-editor.tsx",
20
+ "type": "registry:block",
21
+ "target": "components/blocks/env-var-editor.tsx",
22
+ "content": "import { Copy, Eye, EyeOff, Lock, Plus, Trash2 } from \"lucide-react\";\nimport { forwardRef, useState } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\n\nexport type EnvScope = \"production\" | \"staging\" | \"preview\" | \"all\" | string;\n\nexport interface EnvVar {\n id: string;\n key: string;\n /**\n * Secret value. If `masked` is true, value is hidden by default.\n */\n value: string;\n masked?: boolean;\n scope?: EnvScope;\n /**\n * Read-only marker (e.g. system-managed vars like THEO_DEPLOY_ID).\n */\n readonly?: boolean;\n}\n\ninterface EnvVarEditorProps extends HTMLAttributes<HTMLDivElement> {\n vars: EnvVar[];\n onAdd?: (entry: Omit<EnvVar, \"id\">) => void;\n onRemove?: (id: string) => void;\n /**\n * Available scope options for the add form. Defaults to a sensible PaaS set.\n */\n scopeOptions?: EnvScope[];\n}\n\nconst DEFAULT_SCOPES: EnvScope[] = [\"production\", \"staging\", \"preview\", \"all\"];\n\n/**\n * EnvVarEditor — table-like editor for environment variables.\n *\n * Mono font on keys/values, mask toggle on secret values, scope badge,\n * remove + copy actions. Add form sits above the list.\n *\n * Stateless: caller controls the list and reacts to onAdd / onRemove.\n */\nconst EnvVarEditor = forwardRef<HTMLDivElement, EnvVarEditorProps>(\n ({ className, vars, onAdd, onRemove, scopeOptions = DEFAULT_SCOPES, ...props }, ref) => {\n const [newKey, setNewKey] = useState(\"\");\n const [newValue, setNewValue] = useState(\"\");\n const [newScope, setNewScope] = useState<EnvScope>(scopeOptions[0] ?? \"production\");\n\n const submit = () => {\n const trimmedKey = newKey.trim();\n if (!trimmedKey) return;\n onAdd?.({ key: trimmedKey, value: newValue, scope: newScope, masked: true });\n setNewKey(\"\");\n setNewValue(\"\");\n };\n\n return (\n <div\n ref={ref}\n className={cn(\"rounded-xl border bg-card p-5 shadow-sm\", className)}\n {...props}\n >\n <header className=\"mb-4 flex items-baseline justify-between gap-3\">\n <div>\n <h3 className=\"font-display text-title-md tracking-tight\">Environment variables</h3>\n <p className=\"text-body-sm text-muted-foreground\">\n {vars.length} {vars.length === 1 ? \"variable\" : \"variables\"}\n </p>\n </div>\n </header>\n\n {onAdd ? (\n <form\n className=\"mb-4 grid grid-cols-[2fr_3fr_auto_auto] gap-2\"\n onSubmit={(e) => {\n e.preventDefault();\n submit();\n }}\n >\n <Input\n placeholder=\"DATABASE_URL\"\n value={newKey}\n onChange={(e) => setNewKey(e.target.value)}\n className=\"font-mono\"\n aria-label=\"Variable name\"\n />\n <Input\n placeholder=\"postgresql://…\"\n value={newValue}\n onChange={(e) => setNewValue(e.target.value)}\n className=\"font-mono\"\n aria-label=\"Variable value\"\n />\n <select\n value={newScope}\n onChange={(e) => setNewScope(e.target.value)}\n aria-label=\"Variable scope\"\n className={cn(\n \"h-10 rounded-md border border-input bg-card px-3\",\n \"font-sans text-body-sm\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card\",\n )}\n >\n {scopeOptions.map((s) => (\n <option key={s} value={s}>\n {s}\n </option>\n ))}\n </select>\n <Button type=\"submit\">\n <Plus /> Add\n </Button>\n </form>\n ) : null}\n\n <ul className=\"divide-y divide-border/30\">\n {vars.map((v) => (\n <Row key={v.id} entry={v} {...(onRemove ? { onRemove } : {})} />\n ))}\n {vars.length === 0 ? (\n <li className=\"py-8 text-center text-body-sm text-muted-foreground\">\n No environment variables yet.\n </li>\n ) : null}\n </ul>\n </div>\n );\n },\n);\nEnvVarEditor.displayName = \"EnvVarEditor\";\n\ninterface RowProps {\n entry: EnvVar;\n onRemove?: (id: string) => void;\n}\n\nfunction Row({ entry, onRemove }: RowProps) {\n const [revealed, setRevealed] = useState(!entry.masked);\n\n const value = revealed ? entry.value : \"•\".repeat(Math.min(entry.value.length, 12) || 8);\n\n const copy = () => {\n if (typeof navigator !== \"undefined\" && navigator.clipboard) {\n navigator.clipboard.writeText(entry.value).catch((err: unknown) => {\n // T7.6: dev-only warning so engineers see something when clipboard\n // fails (Safari/Firefox iframe sandbox, document not focused,\n // Permissions-Policy block). Production stays silent — behavior is\n // fail-safe (user can still copy manually).\n if (typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n // biome-ignore lint/suspicious/noConsole: dev-only clipboard diagnostic (T7.6)\n console.warn(\"[@theokit/ui] EnvVarEditor clipboard write failed:\", err);\n }\n });\n }\n };\n\n return (\n <li className=\"grid grid-cols-[2fr_3fr_auto_auto] items-center gap-3 py-3\">\n <span className=\"truncate font-mono text-code-sm text-foreground\">{entry.key}</span>\n <span className=\"flex items-center gap-2 truncate font-mono text-code-sm text-muted-foreground\">\n {entry.readonly ? <Lock className=\"size-3\" aria-hidden=\"true\" /> : null}\n {value}\n </span>\n <Badge variant={entry.scope === \"production\" ? \"primary\" : \"default\"}>\n {entry.scope ?? \"all\"}\n </Badge>\n <div className=\"flex items-center gap-0.5\">\n {entry.masked ? (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n onClick={() => setRevealed((r) => !r)}\n aria-label={revealed ? \"Hide value\" : \"Reveal value\"}\n >\n {revealed ? <EyeOff /> : <Eye />}\n </Button>\n ) : null}\n <Button size=\"icon\" variant=\"ghost\" onClick={copy} aria-label=\"Copy value\">\n <Copy />\n </Button>\n {onRemove && !entry.readonly ? (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n onClick={() => onRemove(entry.id)}\n aria-label={`Remove ${entry.key}`}\n >\n <Trash2 />\n </Button>\n ) : null}\n </div>\n </li>\n );\n}\n\nexport { EnvVarEditor };\n"
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "folder-context-card",
4
+ "type": "registry:ui",
5
+ "title": "FolderContextCard",
6
+ "description": "File/folder tree fragment for the right inspector.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json",
13
+ "https://usetheodev.github.io/theo-ui/r/types.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/primitives/folder-context-card/folder-context-card.tsx",
18
+ "type": "registry:ui",
19
+ "target": "components/ui/folder-context-card.tsx",
20
+ "content": "import { ChevronRight, File, Folder } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport type { IconComponent } from \"@/lib/types\";\n\nexport interface FolderEntry {\n id: string;\n name: string;\n kind: \"folder\" | \"file\";\n /**\n * If true, the entry is expanded (icons + nested children).\n * Pure visual flag; toggling is the caller's job.\n */\n open?: boolean;\n /**\n * Optional nested entries when this is a folder.\n */\n children?: FolderEntry[];\n /** Optional adornment after the name (badge, modified indicator). */\n trailing?: ReactNode;\n /** Override the icon. */\n icon?: IconComponent;\n}\n\ninterface FolderContextCardProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title?: ReactNode;\n /**\n * Root entries shown directly in the card.\n */\n entries: FolderEntry[];\n /**\n * Fires when an entry row is clicked.\n */\n onEntryClick?: (id: string) => void;\n}\n\n/**\n * FolderContextCard — file/folder tree fragment for the right inspector.\n *\n * Visual: 1-level tree with chevron indicating expanded state. Renders nested\n * children recursively, but does not manage open state — caller controls\n * `entry.open` and reacts to `onEntryClick`.\n */\nconst FolderContextCard = forwardRef<HTMLElement, FolderContextCardProps>(\n ({ className, title, entries, onEntryClick, ...props }, ref) => (\n <section ref={ref} className={cn(\"rounded-xl border bg-card p-4\", className)} {...props}>\n {title ? (\n <header className=\"mb-3 flex items-center justify-between\">\n <h3 className=\"font-display text-title-md tracking-tight\">{title}</h3>\n </header>\n ) : null}\n <Tree entries={entries} {...(onEntryClick ? { onEntryClick } : {})} depth={0} />\n </section>\n ),\n);\nFolderContextCard.displayName = \"FolderContextCard\";\n\nfunction Tree({\n entries,\n onEntryClick,\n depth,\n}: {\n entries: FolderEntry[];\n onEntryClick?: (id: string) => void;\n depth: number;\n}) {\n return (\n <ul className={cn(\"grid\", depth === 0 ? \"gap-0.5\" : \"gap-0\")}>\n {entries.map((entry) => {\n const IconComp = entry.icon ?? (entry.kind === \"folder\" ? Folder : File);\n const hasChildren = entry.kind === \"folder\" && entry.children && entry.children.length > 0;\n return (\n <li key={entry.id}>\n <button\n type=\"button\"\n onClick={() => onEntryClick?.(entry.id)}\n className={cn(\n \"flex w-full items-center gap-2 rounded-md px-2 py-1.5\",\n \"font-sans text-body-sm text-foreground\",\n \"transition-colors hover:bg-muted\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n )}\n style={{ paddingLeft: `${0.5 + depth * 0.9}rem` }}\n >\n {hasChildren ? (\n <ChevronRight\n className={cn(\n \"size-3 shrink-0 text-muted-foreground transition-transform\",\n entry.open && \"rotate-90\",\n )}\n aria-hidden=\"true\"\n />\n ) : (\n <span className=\"w-3\" aria-hidden=\"true\" />\n )}\n <IconComp\n className={cn(\n \"size-4 shrink-0\",\n entry.kind === \"folder\" ? \"text-primary\" : \"text-muted-foreground\",\n )}\n aria-hidden=\"true\"\n />\n <span className=\"flex-1 truncate text-left\">{entry.name}</span>\n {entry.trailing}\n </button>\n {hasChildren && entry.open ? (\n <Tree\n entries={entry.children as FolderEntry[]}\n {...(onEntryClick ? { onEntryClick } : {})}\n depth={depth + 1}\n />\n ) : null}\n </li>\n );\n })}\n </ul>\n );\n}\n\nexport { FolderContextCard };\n"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "folder-selector",
4
+ "type": "registry:ui",
5
+ "title": "FolderSelector",
6
+ "description": "Chip showing the active working directory.",
7
+ "dependencies": [
8
+ "lucide-react"
9
+ ],
10
+ "registryDependencies": [
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "components/primitives/folder-selector/folder-selector.tsx",
17
+ "type": "registry:ui",
18
+ "target": "components/ui/folder-selector.tsx",
19
+ "content": "import { ChevronDown, Folder } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\ninterface FolderSelectorProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** Currently selected absolute path. */\n path: string;\n /**\n * Render in compact mode (smaller height, no chevron padding).\n * Default is the full-width composer variant used in the Files panel.\n */\n compact?: boolean;\n}\n\n/**\n * FolderSelector — chip showing the active working directory.\n *\n * Visual: folder icon + monospaced path (truncated middle) + chevron.\n * Stateless: caller handles the actual folder-picker dialog.\n */\nconst FolderSelector = forwardRef<HTMLButtonElement, FolderSelectorProps>(\n ({ className, path, compact, ...props }, ref) => (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n \"inline-flex items-center gap-2 rounded-lg border border-border/60 bg-card\",\n \"font-mono text-code-sm text-foreground\",\n \"transition-colors duration-base ease-out-soft\",\n \"hover:border-primary/40 hover:bg-muted\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n compact ? \"h-8 px-2.5\" : \"h-10 px-3\",\n className,\n )}\n {...props}\n >\n <Folder className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n <span className=\"min-w-0 flex-1 truncate text-left\">{path}</span>\n <ChevronDown className=\"size-3 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n </button>\n ),\n);\nFolderSelector.displayName = \"FolderSelector\";\n\nexport { FolderSelector };\n"
20
+ }
21
+ ]
22
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "form-field",
4
+ "type": "registry:ui",
5
+ "title": "FormField",
6
+ "description": "Composition wrapper for accessible form rows.",
7
+ "dependencies": [
8
+ "@radix-ui/react-label",
9
+ "lucide-react"
10
+ ],
11
+ "registryDependencies": [
12
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
13
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "components/primitives/form-field/form-field.tsx",
18
+ "type": "registry:ui",
19
+ "target": "components/ui/form-field.tsx",
20
+ "content": "import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { AlertCircle } from \"lucide-react\";\nimport {\n Children,\n cloneElement,\n createContext,\n forwardRef,\n isValidElement,\n useContext,\n useId,\n} from \"react\";\nimport type {\n ComponentPropsWithoutRef,\n ElementRef,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n} from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * FormField — composition wrapper for accessible form rows.\n *\n * Provides context with a generated `id`, so children (Label, Input, Hint,\n * Error) wire themselves via `htmlFor` / `id` / `aria-describedby` without\n * the consumer having to thread IDs manually.\n *\n * Composition:\n * <FormField>\n * <FormField.Label required>Email</FormField.Label>\n * <FormField.Control>\n * <Input type=\"email\" placeholder=\"…\" />\n * </FormField.Control>\n * <FormField.Hint>We never share your email.</FormField.Hint>\n * <FormField.Error>{error}</FormField.Error>\n * </FormField>\n *\n * Errors take precedence over hints (only one of them shows at once).\n */\n\ntype FormFieldSize = \"sm\" | \"md\" | \"lg\";\n\ninterface FormFieldContextValue {\n fieldId: string;\n hintId: string;\n errorId: string;\n hasError: boolean;\n size: FormFieldSize;\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue | null>(null);\n\nfunction useFormField(): FormFieldContextValue {\n const ctx = useContext(FormFieldContext);\n if (!ctx) throw new Error(\"FormField subcomponents must be inside <FormField>.\");\n return ctx;\n}\n\ninterface FormFieldProps extends HTMLAttributes<HTMLDivElement> {\n /** Optional explicit id override. */\n id?: string;\n /** Marks the field as invalid; switches Hint → Error and toggles aria. */\n invalid?: boolean;\n /**\n * Size scale propagated to Label / Hint / Error subparts via Context.\n * Default `md` preserves prior behavior. Subparts do NOT accept a `size`\n * prop of their own — use `className` for granular tweaks (EC-8).\n */\n size?: FormFieldSize;\n}\n\nconst rootGapBySize: Record<FormFieldSize, string> = {\n sm: \"gap-1\",\n md: \"gap-1.5\",\n lg: \"gap-2\",\n};\n\nconst FormFieldRoot = forwardRef<HTMLDivElement, FormFieldProps>(\n ({ className, id: idProp, invalid, size = \"md\", ...props }, ref) => {\n const auto = useId();\n const fieldId = idProp ?? `field-${auto}`;\n const ctx: FormFieldContextValue = {\n fieldId,\n hintId: `${fieldId}-hint`,\n errorId: `${fieldId}-error`,\n hasError: !!invalid,\n size,\n };\n return (\n <FormFieldContext.Provider value={ctx}>\n <div ref={ref} className={cn(\"grid\", rootGapBySize[size], className)} {...props} />\n </FormFieldContext.Provider>\n );\n },\n);\nFormFieldRoot.displayName = \"FormField\";\n\nconst labelFontBySize: Record<FormFieldSize, string> = {\n sm: \"text-label-caps\",\n md: \"text-body-sm\",\n lg: \"text-body-md\",\n};\n\nconst hintFontBySize: Record<FormFieldSize, string> = {\n sm: \"text-label-caps\",\n md: \"text-body-sm\",\n lg: \"text-body-md\",\n};\n\ninterface FormFieldLabelProps extends ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\n required?: boolean;\n}\n\n// Inlined label markup (was importing `<Label>` from sibling primitive).\n// BLOCKER-001 / D2: form-field stays in primitives/ but cannot cross-import.\n// Uses the same Radix LabelPrimitive primitive that the standalone `<Label>`\n// uses, with identical Tailwind tokens — visual parity is preserved.\nconst FormFieldLabel = forwardRef<ElementRef<typeof LabelPrimitive.Root>, FormFieldLabelProps>(\n ({ className, required, children, ...props }, ref) => {\n const { fieldId, size } = useFormField();\n return (\n <LabelPrimitive.Root\n ref={ref}\n htmlFor={fieldId}\n className={cn(\n \"inline-flex items-center gap-1 font-medium font-sans text-foreground\",\n labelFontBySize[size],\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-60\",\n className,\n )}\n {...props}\n >\n {children}\n {required ? (\n <span className=\"text-destructive\" aria-hidden=\"true\">\n *\n </span>\n ) : null}\n </LabelPrimitive.Root>\n );\n },\n);\nFormFieldLabel.displayName = \"FormField.Label\";\n\nconst FormFieldControl = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ children, ...props }, ref) => {\n const { fieldId, hintId, errorId, hasError } = useFormField();\n const described = hasError ? errorId : hintId;\n // Children.only enforces exactly one child element (the form control) so we\n // can safely clone it with the wiring props (id + aria-describedby + aria-invalid).\n // The previous implementation spread the element object directly which relied\n // on React's internal `$$typeof` invariant and silently dropped `ref` — the\n // cloneElement path preserves both `ref` and `key`.\n const only = Children.only(children) as ReactElement;\n const cloned = isValidElement(only)\n ? cloneElement(only, {\n id: fieldId,\n \"aria-describedby\": described,\n \"aria-invalid\": hasError || undefined,\n } as Partial<typeof only.props>)\n : only;\n return (\n <div ref={ref} {...props}>\n {cloned}\n </div>\n );\n },\n);\nFormFieldControl.displayName = \"FormField.Control\";\n\nconst FormFieldHint = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => {\n const { hintId, hasError, size } = useFormField();\n if (hasError) return null;\n return (\n <p\n ref={ref}\n id={hintId}\n className={cn(\"text-muted-foreground\", hintFontBySize[size], className)}\n {...props}\n >\n {children}\n </p>\n );\n },\n);\nFormFieldHint.displayName = \"FormField.Hint\";\n\nconst FormFieldError = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(\n ({ className, children, ...props }, ref) => {\n const { errorId, hasError, size } = useFormField();\n if (!hasError) return null;\n return (\n <p\n ref={ref}\n id={errorId}\n role=\"alert\"\n className={cn(\"flex items-center gap-1 text-destructive\", hintFontBySize[size], className)}\n {...props}\n >\n <AlertCircle className=\"size-3.5 shrink-0\" aria-hidden=\"true\" />\n {children as ReactNode}\n </p>\n );\n },\n);\nFormFieldError.displayName = \"FormField.Error\";\n\nconst FormField = /*#__PURE__*/ Object.assign(FormFieldRoot, {\n Label: FormFieldLabel,\n Control: FormFieldControl,\n Hint: FormFieldHint,\n Error: FormFieldError,\n});\n\nexport { FormField };\n"
21
+ }
22
+ ]
23
+ }