@usetheo/ui 0.13.0 → 0.13.2

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 (1235) hide show
  1. package/CHANGELOG.md +541 -69
  2. package/DESIGN.md +18 -18
  3. package/NOTICE +2 -2
  4. package/README.md +54 -52
  5. package/dist/chunk-23YEYNDS.js +89 -0
  6. package/dist/chunk-23YEYNDS.js.map +1 -0
  7. package/dist/chunk-25KBUQEQ.js +95 -0
  8. package/dist/chunk-25KBUQEQ.js.map +1 -0
  9. package/dist/chunk-2NTEJRPA.js +212 -0
  10. package/dist/chunk-2NTEJRPA.js.map +1 -0
  11. package/dist/chunk-2NZYMQKT.js +56 -0
  12. package/dist/chunk-2NZYMQKT.js.map +1 -0
  13. package/dist/chunk-2OVFVPSZ.js +26 -0
  14. package/dist/chunk-2OVFVPSZ.js.map +1 -0
  15. package/dist/chunk-2UP7SECE.js +78 -0
  16. package/dist/chunk-2UP7SECE.js.map +1 -0
  17. package/dist/chunk-33ETHPT7.js +112 -0
  18. package/dist/chunk-33ETHPT7.js.map +1 -0
  19. package/dist/chunk-33IIDFSM.js +43 -0
  20. package/dist/chunk-33IIDFSM.js.map +1 -0
  21. package/dist/chunk-345HYADQ.js +88 -0
  22. package/dist/chunk-345HYADQ.js.map +1 -0
  23. package/dist/chunk-357XIC2N.js +98 -0
  24. package/dist/chunk-357XIC2N.js.map +1 -0
  25. package/dist/chunk-3YOPTHZH.js +31 -0
  26. package/dist/chunk-3YOPTHZH.js.map +1 -0
  27. package/dist/chunk-44ZNZZUS.js +111 -0
  28. package/dist/chunk-44ZNZZUS.js.map +1 -0
  29. package/dist/chunk-45FWKR23.js +62 -0
  30. package/dist/chunk-45FWKR23.js.map +1 -0
  31. package/dist/chunk-47IPOYLQ.js +116 -0
  32. package/dist/chunk-47IPOYLQ.js.map +1 -0
  33. package/dist/chunk-4EH6F54D.js +69 -0
  34. package/dist/chunk-4EH6F54D.js.map +1 -0
  35. package/dist/chunk-4EKF4EIE.js +140 -0
  36. package/dist/chunk-4EKF4EIE.js.map +1 -0
  37. package/dist/chunk-4XYFJIRC.js +65 -0
  38. package/dist/chunk-4XYFJIRC.js.map +1 -0
  39. package/dist/chunk-52J7SDYH.js +48 -0
  40. package/dist/chunk-52J7SDYH.js.map +1 -0
  41. package/dist/chunk-5YX76GH6.js +70 -0
  42. package/dist/chunk-5YX76GH6.js.map +1 -0
  43. package/dist/chunk-624AATQZ.js +77 -0
  44. package/dist/chunk-624AATQZ.js.map +1 -0
  45. package/dist/chunk-65YSFZAN.js +192 -0
  46. package/dist/chunk-65YSFZAN.js.map +1 -0
  47. package/dist/chunk-6IODJQWC.js +47 -0
  48. package/dist/chunk-6IODJQWC.js.map +1 -0
  49. package/dist/chunk-6ORS6XOE.js +57 -0
  50. package/dist/chunk-6ORS6XOE.js.map +1 -0
  51. package/dist/chunk-6V2LQEPT.js +165 -0
  52. package/dist/chunk-6V2LQEPT.js.map +1 -0
  53. package/dist/chunk-75IDWFYX.js +134 -0
  54. package/dist/chunk-75IDWFYX.js.map +1 -0
  55. package/dist/chunk-7BQXMG2A.js +93 -0
  56. package/dist/chunk-7BQXMG2A.js.map +1 -0
  57. package/dist/chunk-7RFWVNQA.js +47 -0
  58. package/dist/chunk-7RFWVNQA.js.map +1 -0
  59. package/dist/chunk-ABBXLAJW.js +74 -0
  60. package/dist/chunk-ABBXLAJW.js.map +1 -0
  61. package/dist/chunk-ACZNFEOZ.js +180 -0
  62. package/dist/chunk-ACZNFEOZ.js.map +1 -0
  63. package/dist/chunk-AJ2LNQUQ.js +108 -0
  64. package/dist/chunk-AJ2LNQUQ.js.map +1 -0
  65. package/dist/chunk-AX6P3SDS.js +89 -0
  66. package/dist/chunk-AX6P3SDS.js.map +1 -0
  67. package/dist/chunk-AXUAQM45.js +154 -0
  68. package/dist/chunk-AXUAQM45.js.map +1 -0
  69. package/dist/chunk-B2FL7KBJ.js +65 -0
  70. package/dist/chunk-B2FL7KBJ.js.map +1 -0
  71. package/dist/chunk-B42EOFRD.js +106 -0
  72. package/dist/chunk-B42EOFRD.js.map +1 -0
  73. package/dist/chunk-BE232OKN.js +42 -0
  74. package/dist/chunk-BE232OKN.js.map +1 -0
  75. package/dist/chunk-BSF4Y4UT.js +77 -0
  76. package/dist/chunk-BSF4Y4UT.js.map +1 -0
  77. package/dist/chunk-BYUWQ6OP.js +45 -0
  78. package/dist/chunk-BYUWQ6OP.js.map +1 -0
  79. package/dist/chunk-C5ULP2P5.js +140 -0
  80. package/dist/chunk-C5ULP2P5.js.map +1 -0
  81. package/dist/chunk-CCG7PXLX.js +24 -0
  82. package/dist/chunk-CCG7PXLX.js.map +1 -0
  83. package/dist/chunk-CFVSXYVT.js +59 -0
  84. package/dist/chunk-CFVSXYVT.js.map +1 -0
  85. package/dist/chunk-CGWIOIEO.js +27 -0
  86. package/dist/chunk-CGWIOIEO.js.map +1 -0
  87. package/dist/chunk-CVFSNA4K.js +716 -0
  88. package/dist/chunk-CVFSNA4K.js.map +1 -0
  89. package/dist/chunk-CX54TUTT.js +144 -0
  90. package/dist/chunk-CX54TUTT.js.map +1 -0
  91. package/dist/chunk-DJK6H3FD.js +200 -0
  92. package/dist/chunk-DJK6H3FD.js.map +1 -0
  93. package/dist/chunk-E26M7ATD.js +61 -0
  94. package/dist/chunk-E26M7ATD.js.map +1 -0
  95. package/dist/chunk-E63IRXZZ.js +78 -0
  96. package/dist/chunk-E63IRXZZ.js.map +1 -0
  97. package/dist/chunk-EOTSD2GL.js +83 -0
  98. package/dist/chunk-EOTSD2GL.js.map +1 -0
  99. package/dist/chunk-ESJUISWY.js +45 -0
  100. package/dist/chunk-ESJUISWY.js.map +1 -0
  101. package/dist/chunk-ET7A3TQZ.js +158 -0
  102. package/dist/chunk-ET7A3TQZ.js.map +1 -0
  103. package/dist/chunk-ETTL6XGU.js +139 -0
  104. package/dist/chunk-ETTL6XGU.js.map +1 -0
  105. package/dist/chunk-EWDN56AS.js +24 -0
  106. package/dist/chunk-EWDN56AS.js.map +1 -0
  107. package/dist/chunk-FELH4AAQ.js +90 -0
  108. package/dist/chunk-FELH4AAQ.js.map +1 -0
  109. package/dist/chunk-FJZKA2LV.js +165 -0
  110. package/dist/chunk-FJZKA2LV.js.map +1 -0
  111. package/dist/chunk-FM72LBCJ.js +102 -0
  112. package/dist/chunk-FM72LBCJ.js.map +1 -0
  113. package/dist/chunk-FNQASFTK.js +53 -0
  114. package/dist/chunk-FNQASFTK.js.map +1 -0
  115. package/dist/chunk-FOE3XXBJ.js +965 -0
  116. package/dist/chunk-FOE3XXBJ.js.map +1 -0
  117. package/dist/chunk-GC52HWIL.js +41 -0
  118. package/dist/chunk-GC52HWIL.js.map +1 -0
  119. package/dist/chunk-GCKFA7X7.js +83 -0
  120. package/dist/chunk-GCKFA7X7.js.map +1 -0
  121. package/dist/chunk-GDMCDW66.js +19 -0
  122. package/dist/chunk-GDMCDW66.js.map +1 -0
  123. package/dist/chunk-GLRUM43F.js +121 -0
  124. package/dist/chunk-GLRUM43F.js.map +1 -0
  125. package/dist/chunk-H3L7WZDZ.js +74 -0
  126. package/dist/chunk-H3L7WZDZ.js.map +1 -0
  127. package/dist/chunk-H55WXDME.js +45 -0
  128. package/dist/chunk-H55WXDME.js.map +1 -0
  129. package/dist/chunk-HB45JHMM.js +43 -0
  130. package/dist/chunk-HB45JHMM.js.map +1 -0
  131. package/dist/chunk-HETHTYEZ.js +80 -0
  132. package/dist/chunk-HETHTYEZ.js.map +1 -0
  133. package/dist/chunk-HHSKNB32.js +55 -0
  134. package/dist/chunk-HHSKNB32.js.map +1 -0
  135. package/dist/chunk-HILOUYES.js +151 -0
  136. package/dist/chunk-HILOUYES.js.map +1 -0
  137. package/dist/chunk-HKVOCYTN.js +113 -0
  138. package/dist/chunk-HKVOCYTN.js.map +1 -0
  139. package/dist/chunk-HNRFBJ25.js +129 -0
  140. package/dist/chunk-HNRFBJ25.js.map +1 -0
  141. package/dist/chunk-HTJVHFNW.js +178 -0
  142. package/dist/chunk-HTJVHFNW.js.map +1 -0
  143. package/dist/chunk-HZ7Z22VW.js +130 -0
  144. package/dist/chunk-HZ7Z22VW.js.map +1 -0
  145. package/dist/chunk-II5Q5RIO.js +236 -0
  146. package/dist/chunk-II5Q5RIO.js.map +1 -0
  147. package/dist/chunk-ITEIRMSH.js +121 -0
  148. package/dist/chunk-ITEIRMSH.js.map +1 -0
  149. package/dist/chunk-JIZKW3WC.js +74 -0
  150. package/dist/chunk-JIZKW3WC.js.map +1 -0
  151. package/dist/chunk-JP3SHERK.js +154 -0
  152. package/dist/chunk-JP3SHERK.js.map +1 -0
  153. package/dist/chunk-JR4H3FJ2.js +74 -0
  154. package/dist/chunk-JR4H3FJ2.js.map +1 -0
  155. package/dist/chunk-JRW53TVG.js +53 -0
  156. package/dist/chunk-JRW53TVG.js.map +1 -0
  157. package/dist/chunk-JS5T2CRO.js +86 -0
  158. package/dist/chunk-JS5T2CRO.js.map +1 -0
  159. package/dist/chunk-JXOCE27Z.js +82 -0
  160. package/dist/chunk-JXOCE27Z.js.map +1 -0
  161. package/dist/chunk-JYW5YNF7.js +188 -0
  162. package/dist/chunk-JYW5YNF7.js.map +1 -0
  163. package/dist/chunk-KHBXI6AV.js +149 -0
  164. package/dist/chunk-KHBXI6AV.js.map +1 -0
  165. package/dist/chunk-KXZH7BTX.js +92 -0
  166. package/dist/chunk-KXZH7BTX.js.map +1 -0
  167. package/dist/chunk-LB4PMLCX.js +57 -0
  168. package/dist/chunk-LB4PMLCX.js.map +1 -0
  169. package/dist/chunk-LMGE2QEO.js +117 -0
  170. package/dist/chunk-LMGE2QEO.js.map +1 -0
  171. package/dist/chunk-M74ZYBOK.js +93 -0
  172. package/dist/chunk-M74ZYBOK.js.map +1 -0
  173. package/dist/chunk-ML7WLNIK.js +11 -0
  174. package/dist/chunk-ML7WLNIK.js.map +1 -0
  175. package/dist/chunk-MLEPCMTF.js +147 -0
  176. package/dist/chunk-MLEPCMTF.js.map +1 -0
  177. package/dist/chunk-NSZEZTDO.js +98 -0
  178. package/dist/chunk-NSZEZTDO.js.map +1 -0
  179. package/dist/chunk-OMR6ZGME.js +63 -0
  180. package/dist/chunk-OMR6ZGME.js.map +1 -0
  181. package/dist/chunk-ORVYP73T.js +223 -0
  182. package/dist/chunk-ORVYP73T.js.map +1 -0
  183. package/dist/chunk-OZFUUO2Q.js +50 -0
  184. package/dist/chunk-OZFUUO2Q.js.map +1 -0
  185. package/dist/chunk-PJWYIOY4.js +3 -0
  186. package/dist/chunk-PJWYIOY4.js.map +1 -0
  187. package/dist/chunk-PXT47DRZ.js +59 -0
  188. package/dist/chunk-PXT47DRZ.js.map +1 -0
  189. package/dist/chunk-QBSJM4XI.js +83 -0
  190. package/dist/chunk-QBSJM4XI.js.map +1 -0
  191. package/dist/chunk-QBUTRD2M.js +58 -0
  192. package/dist/chunk-QBUTRD2M.js.map +1 -0
  193. package/dist/chunk-QCSMJTA6.js +68 -0
  194. package/dist/chunk-QCSMJTA6.js.map +1 -0
  195. package/dist/chunk-QNYOIVQ4.js +36 -0
  196. package/dist/chunk-QNYOIVQ4.js.map +1 -0
  197. package/dist/chunk-QPURZJJM.js +88 -0
  198. package/dist/chunk-QPURZJJM.js.map +1 -0
  199. package/dist/chunk-QTG266XU.js +69 -0
  200. package/dist/chunk-QTG266XU.js.map +1 -0
  201. package/dist/chunk-QV4BQRNH.js +29 -0
  202. package/dist/chunk-QV4BQRNH.js.map +1 -0
  203. package/dist/chunk-RJ6RAMKH.js +89 -0
  204. package/dist/chunk-RJ6RAMKH.js.map +1 -0
  205. package/dist/chunk-RJBCTMVW.js +59 -0
  206. package/dist/chunk-RJBCTMVW.js.map +1 -0
  207. package/dist/chunk-RMJYXHBX.js +113 -0
  208. package/dist/chunk-RMJYXHBX.js.map +1 -0
  209. package/dist/chunk-RQT5DWGG.js +34 -0
  210. package/dist/chunk-RQT5DWGG.js.map +1 -0
  211. package/dist/chunk-SPGNNN4R.js +115 -0
  212. package/dist/chunk-SPGNNN4R.js.map +1 -0
  213. package/dist/chunk-SQ66DCXY.js +35 -0
  214. package/dist/chunk-SQ66DCXY.js.map +1 -0
  215. package/dist/chunk-SXKGWHAM.js +179 -0
  216. package/dist/chunk-SXKGWHAM.js.map +1 -0
  217. package/dist/chunk-T2OKGV6M.js +13 -0
  218. package/dist/chunk-T2OKGV6M.js.map +1 -0
  219. package/dist/chunk-T4Z7HBZR.js +110 -0
  220. package/dist/chunk-T4Z7HBZR.js.map +1 -0
  221. package/dist/chunk-TW5I37AE.js +142 -0
  222. package/dist/chunk-TW5I37AE.js.map +1 -0
  223. package/dist/chunk-TY6NTWN5.js +29 -0
  224. package/dist/chunk-TY6NTWN5.js.map +1 -0
  225. package/dist/chunk-UJAWV6LM.js +136 -0
  226. package/dist/chunk-UJAWV6LM.js.map +1 -0
  227. package/dist/chunk-V2WCZBVE.js +122 -0
  228. package/dist/chunk-V2WCZBVE.js.map +1 -0
  229. package/dist/chunk-V4LRBYOD.js +55 -0
  230. package/dist/chunk-V4LRBYOD.js.map +1 -0
  231. package/dist/chunk-V6H2RUVP.js +77 -0
  232. package/dist/chunk-V6H2RUVP.js.map +1 -0
  233. package/dist/chunk-VFRFUU7A.js +35 -0
  234. package/dist/chunk-VFRFUU7A.js.map +1 -0
  235. package/dist/chunk-VHK2OUCW.js +38 -0
  236. package/dist/chunk-VHK2OUCW.js.map +1 -0
  237. package/dist/chunk-VLNFUEOR.js +86 -0
  238. package/dist/chunk-VLNFUEOR.js.map +1 -0
  239. package/dist/chunk-VU7XKD4G.js +66 -0
  240. package/dist/chunk-VU7XKD4G.js.map +1 -0
  241. package/dist/chunk-VZX4HLBM.js +84 -0
  242. package/dist/chunk-VZX4HLBM.js.map +1 -0
  243. package/dist/chunk-W24RR5OD.js +102 -0
  244. package/dist/chunk-W24RR5OD.js.map +1 -0
  245. package/dist/chunk-W47V2F3Q.js +115 -0
  246. package/dist/chunk-W47V2F3Q.js.map +1 -0
  247. package/dist/chunk-W743ORLA.js +91 -0
  248. package/dist/chunk-W743ORLA.js.map +1 -0
  249. package/dist/chunk-W7I3ZX66.js +76 -0
  250. package/dist/chunk-W7I3ZX66.js.map +1 -0
  251. package/dist/chunk-WD42UBGR.js +64 -0
  252. package/dist/chunk-WD42UBGR.js.map +1 -0
  253. package/dist/chunk-WQVEJJV7.js +108 -0
  254. package/dist/chunk-WQVEJJV7.js.map +1 -0
  255. package/dist/chunk-WX4Q4DTX.js +121 -0
  256. package/dist/chunk-WX4Q4DTX.js.map +1 -0
  257. package/dist/chunk-XC7SYZYR.js +86 -0
  258. package/dist/chunk-XC7SYZYR.js.map +1 -0
  259. package/dist/chunk-XSENM65D.js +128 -0
  260. package/dist/chunk-XSENM65D.js.map +1 -0
  261. package/dist/chunk-Y7JTBQUQ.js +152 -0
  262. package/dist/chunk-Y7JTBQUQ.js.map +1 -0
  263. package/dist/chunk-YD2QEVHO.js +68 -0
  264. package/dist/chunk-YD2QEVHO.js.map +1 -0
  265. package/dist/chunk-YDKRUSB5.js +35 -0
  266. package/dist/chunk-YDKRUSB5.js.map +1 -0
  267. package/dist/chunk-YNDHYMPI.js +46 -0
  268. package/dist/chunk-YNDHYMPI.js.map +1 -0
  269. package/dist/chunk-YO3WEMOH.js +130 -0
  270. package/dist/chunk-YO3WEMOH.js.map +1 -0
  271. package/dist/chunk-YVXMWUWD.js +118 -0
  272. package/dist/chunk-YVXMWUWD.js.map +1 -0
  273. package/dist/chunk-Z6HZMGO2.js +106 -0
  274. package/dist/chunk-Z6HZMGO2.js.map +1 -0
  275. package/dist/chunk-ZAP4RIUL.js +81 -0
  276. package/dist/chunk-ZAP4RIUL.js.map +1 -0
  277. package/dist/chunk-ZEDDWVBB.js +112 -0
  278. package/dist/chunk-ZEDDWVBB.js.map +1 -0
  279. package/dist/chunk-ZEFOXF2I.js +87 -0
  280. package/dist/chunk-ZEFOXF2I.js.map +1 -0
  281. package/dist/chunk-ZPURFK4C.js +203 -0
  282. package/dist/chunk-ZPURFK4C.js.map +1 -0
  283. package/dist/chunk-ZZZIOTLC.js +89 -0
  284. package/dist/chunk-ZZZIOTLC.js.map +1 -0
  285. package/dist/components/composites/account-menu/account-menu.d.ts +43 -0
  286. package/dist/components/composites/account-menu/index.d.ts +1 -0
  287. package/dist/components/composites/agent-composer/agent-composer.d.ts +41 -0
  288. package/dist/components/composites/agent-composer/index.d.ts +1 -0
  289. package/dist/components/composites/agent-editor/agent-editor.d.ts +31 -0
  290. package/dist/components/composites/agent-editor/index.d.ts +1 -0
  291. package/dist/components/composites/agent-stream/agent-stream.d.ts +72 -0
  292. package/dist/components/composites/agent-stream/index.d.ts +2 -0
  293. package/dist/components/composites/agent-stream/to-agent-stream-items.d.ts +32 -0
  294. package/dist/components/composites/agent-timeline/agent-timeline.d.ts +22 -0
  295. package/dist/components/composites/agent-timeline/index.d.ts +1 -0
  296. package/dist/components/composites/agent-tool-renderer/agent-tool-renderer.d.ts +60 -0
  297. package/dist/components/composites/agent-tool-renderer/index.d.ts +1 -0
  298. package/dist/components/composites/agent-tool-renderer/tool-call-part.d.ts +5 -0
  299. package/dist/components/composites/approval-card/approval-card.d.ts +35 -0
  300. package/dist/components/composites/approval-card/index.d.ts +1 -0
  301. package/dist/components/composites/chat-composer/chat-composer.d.ts +68 -0
  302. package/dist/components/composites/chat-composer/index.d.ts +1 -0
  303. package/dist/components/composites/chat-message/chat-message-actions.d.ts +22 -0
  304. package/dist/components/composites/chat-message/chat-message-branch.d.ts +17 -0
  305. package/dist/components/composites/chat-message/chat-message-response.d.ts +15 -0
  306. package/dist/components/composites/chat-message/chat-message-toolbar.d.ts +7 -0
  307. package/dist/components/composites/chat-message/chat-message.d.ts +94 -0
  308. package/dist/components/composites/chat-message/index.d.ts +23 -0
  309. package/dist/components/composites/chat-message/parts/data-part.d.ts +9 -0
  310. package/dist/components/composites/chat-message/parts/file-part.d.ts +5 -0
  311. package/dist/components/composites/chat-message/parts/reasoning-part.d.ts +7 -0
  312. package/dist/components/composites/chat-message/parts/source-part.d.ts +9 -0
  313. package/dist/components/composites/chat-message/parts/text-part.d.ts +11 -0
  314. package/dist/components/composites/choice-prompt/choice-prompt.d.ts +65 -0
  315. package/dist/components/composites/choice-prompt/index.d.ts +2 -0
  316. package/dist/components/composites/code-block/code-block.d.ts +29 -0
  317. package/dist/components/composites/code-block/index.d.ts +1 -0
  318. package/dist/components/composites/command-palette/command-palette.d.ts +41 -0
  319. package/dist/components/composites/command-palette/index.d.ts +1 -0
  320. package/dist/components/composites/confirm-dialog/confirm-dialog.d.ts +41 -0
  321. package/dist/components/composites/confirm-dialog/index.d.ts +1 -0
  322. package/dist/components/composites/confirm-prompt/confirm-prompt.d.ts +31 -0
  323. package/dist/components/composites/confirm-prompt/index.d.ts +1 -0
  324. package/dist/components/composites/cron-jobs-list/cron-jobs-list.d.ts +15 -0
  325. package/dist/components/composites/cron-jobs-list/index.d.ts +1 -0
  326. package/dist/components/composites/data-table/data-table.d.ts +63 -0
  327. package/dist/components/composites/data-table/index.d.ts +1 -0
  328. package/dist/components/composites/deployment-row/deployment-row.d.ts +28 -0
  329. package/dist/components/composites/deployment-row/index.d.ts +1 -0
  330. package/dist/components/composites/domain-config/domain-config.d.ts +34 -0
  331. package/dist/components/composites/domain-config/index.d.ts +1 -0
  332. package/dist/components/composites/env-var-editor/env-var-editor.d.ts +35 -0
  333. package/dist/components/composites/env-var-editor/index.d.ts +1 -0
  334. package/dist/components/composites/mcp-server-list/index.d.ts +1 -0
  335. package/dist/components/composites/mcp-server-list/mcp-server-list.d.ts +15 -0
  336. package/dist/components/composites/metric-card/index.d.ts +2 -0
  337. package/dist/components/composites/metric-card/metric-card.d.ts +46 -0
  338. package/dist/components/composites/multi-select-prompt/index.d.ts +1 -0
  339. package/dist/components/composites/multi-select-prompt/multi-select-prompt.d.ts +61 -0
  340. package/dist/components/composites/page-shell/index.d.ts +1 -0
  341. package/dist/components/composites/page-shell/page-shell.d.ts +68 -0
  342. package/dist/components/composites/permission-modal/index.d.ts +1 -0
  343. package/dist/components/composites/permission-modal/permission-modal.d.ts +48 -0
  344. package/dist/components/composites/preview-env-card/index.d.ts +1 -0
  345. package/dist/components/composites/preview-env-card/preview-env-card.d.ts +36 -0
  346. package/dist/components/composites/preview-panel/index.d.ts +1 -0
  347. package/dist/components/composites/preview-panel/preview-panel.d.ts +24 -0
  348. package/dist/components/composites/project-card/index.d.ts +1 -0
  349. package/dist/components/composites/project-card/project-card.d.ts +32 -0
  350. package/dist/components/composites/rollback-ui/index.d.ts +1 -0
  351. package/dist/components/composites/rollback-ui/rollback-ui.d.ts +32 -0
  352. package/dist/components/composites/rule-editor/index.d.ts +1 -0
  353. package/dist/components/composites/rule-editor/rule-editor.d.ts +18 -0
  354. package/dist/components/composites/skill-editor/index.d.ts +1 -0
  355. package/dist/components/composites/skill-editor/skill-editor.d.ts +19 -0
  356. package/dist/components/composites/skills-list/index.d.ts +1 -0
  357. package/dist/components/composites/skills-list/skills-list.d.ts +15 -0
  358. package/dist/components/composites/slide-deck/context.d.ts +23 -0
  359. package/dist/components/composites/slide-deck/controls.d.ts +8 -0
  360. package/dist/components/composites/slide-deck/fragments.d.ts +20 -0
  361. package/dist/components/composites/slide-deck/index.d.ts +21 -0
  362. package/dist/components/composites/slide-deck/notes.d.ts +14 -0
  363. package/dist/components/composites/slide-deck/presenter-view.d.ts +15 -0
  364. package/dist/components/composites/slide-deck/print-styles.d.ts +21 -0
  365. package/dist/components/composites/slide-deck/progress-bar.d.ts +8 -0
  366. package/dist/components/composites/slide-deck/schema.d.ts +31 -0
  367. package/dist/components/composites/slide-deck/slide-deck.d.ts +78 -0
  368. package/dist/components/composites/slide-deck/slide-number.d.ts +11 -0
  369. package/dist/components/composites/slide-deck/split-deck.d.ts +2 -0
  370. package/dist/components/composites/slide-deck/thumbnails.d.ts +19 -0
  371. package/dist/components/composites/slide-deck/use-deck-hash-routing.d.ts +23 -0
  372. package/dist/components/composites/slide-deck/use-deck-keyboard.d.ts +25 -0
  373. package/dist/components/composites/slide-deck/use-deck-state.d.ts +57 -0
  374. package/dist/components/composites/slide-deck/use-deck-swipe.d.ts +20 -0
  375. package/dist/components/composites/slide-deck/use-fullscreen.d.ts +18 -0
  376. package/dist/components/composites/stability-bundle-viewer/index.d.ts +1 -0
  377. package/dist/components/composites/stability-bundle-viewer/stability-bundle-viewer.d.ts +28 -0
  378. package/dist/components/composites/status-indicator/index.d.ts +2 -0
  379. package/dist/components/composites/status-indicator/status-indicator.d.ts +31 -0
  380. package/dist/components/composites/task-header/index.d.ts +1 -0
  381. package/dist/components/composites/task-header/task-header.d.ts +20 -0
  382. package/dist/components/composites/text-prompt/index.d.ts +1 -0
  383. package/dist/components/composites/text-prompt/text-prompt.d.ts +48 -0
  384. package/dist/components/composites/usage-meter/index.d.ts +1 -0
  385. package/dist/components/composites/usage-meter/usage-meter.d.ts +56 -0
  386. package/dist/components/primitives/action-bar/action-bar.d.ts +34 -0
  387. package/dist/components/primitives/action-bar/index.d.ts +1 -0
  388. package/dist/components/primitives/agent-error-card/agent-error-card.d.ts +47 -0
  389. package/dist/components/primitives/agent-error-card/index.d.ts +1 -0
  390. package/dist/components/primitives/agent-event/agent-event.d.ts +25 -0
  391. package/dist/components/primitives/agent-event/index.d.ts +1 -0
  392. package/dist/components/primitives/agent-handoff/agent-handoff.d.ts +24 -0
  393. package/dist/components/primitives/agent-handoff/index.d.ts +1 -0
  394. package/dist/components/primitives/agent-profile/agent-profile.d.ts +28 -0
  395. package/dist/components/primitives/agent-profile/index.d.ts +1 -0
  396. package/dist/components/primitives/agent-starting-state/agent-starting-state.d.ts +15 -0
  397. package/dist/components/primitives/agent-starting-state/index.d.ts +1 -0
  398. package/dist/components/primitives/agent-streaming/agent-streaming.d.ts +16 -0
  399. package/dist/components/primitives/agent-streaming/index.d.ts +1 -0
  400. package/dist/components/primitives/alert/alert.d.ts +31 -0
  401. package/dist/components/primitives/alert/index.d.ts +1 -0
  402. package/dist/components/primitives/artifact-preview/artifact-preview.d.ts +25 -0
  403. package/dist/components/primitives/artifact-preview/index.d.ts +1 -0
  404. package/dist/components/primitives/attachment-chip/attachment-chip.d.ts +14 -0
  405. package/dist/components/primitives/attachment-chip/index.d.ts +1 -0
  406. package/dist/components/primitives/audit-log-entry/audit-log-entry.d.ts +29 -0
  407. package/dist/components/primitives/audit-log-entry/index.d.ts +1 -0
  408. package/dist/components/primitives/auto-compact-notice/auto-compact-notice.d.ts +24 -0
  409. package/dist/components/primitives/auto-compact-notice/index.d.ts +1 -0
  410. package/dist/components/primitives/avatar/avatar.d.ts +26 -0
  411. package/dist/components/primitives/avatar/index.d.ts +1 -0
  412. package/dist/components/primitives/badge/badge.d.ts +33 -0
  413. package/dist/components/primitives/badge/index.d.ts +1 -0
  414. package/dist/components/primitives/branch-indicator/branch-indicator.d.ts +13 -0
  415. package/dist/components/primitives/branch-indicator/index.d.ts +1 -0
  416. package/dist/components/primitives/browser-controls/browser-controls.d.ts +19 -0
  417. package/dist/components/primitives/browser-controls/index.d.ts +1 -0
  418. package/dist/components/primitives/build-log-stream/build-log-stream.d.ts +51 -0
  419. package/dist/components/primitives/build-log-stream/index.d.ts +1 -0
  420. package/dist/components/primitives/button/button.d.ts +26 -0
  421. package/dist/components/primitives/button/index.d.ts +1 -0
  422. package/dist/components/primitives/capability-indicator/capability-indicator.d.ts +57 -0
  423. package/dist/components/primitives/capability-indicator/index.d.ts +1 -0
  424. package/dist/components/primitives/card/card.d.ts +40 -0
  425. package/dist/components/primitives/card/index.d.ts +1 -0
  426. package/dist/components/primitives/channel-card/channel-card.d.ts +28 -0
  427. package/dist/components/primitives/channel-card/index.d.ts +1 -0
  428. package/dist/components/primitives/chat-thread/chat-thread.d.ts +12 -0
  429. package/dist/components/primitives/chat-thread/index.d.ts +1 -0
  430. package/dist/components/primitives/checkbox/checkbox.d.ts +20 -0
  431. package/dist/components/primitives/checkbox/index.d.ts +1 -0
  432. package/dist/components/primitives/context-card/context-card.d.ts +18 -0
  433. package/dist/components/primitives/context-card/index.d.ts +1 -0
  434. package/dist/components/primitives/context-window-bar/context-window-bar.d.ts +27 -0
  435. package/dist/components/primitives/context-window-bar/index.d.ts +1 -0
  436. package/dist/components/primitives/copy-button/copy-button.d.ts +17 -0
  437. package/dist/components/primitives/copy-button/index.d.ts +1 -0
  438. package/dist/components/primitives/cost-meter/cost-meter.d.ts +23 -0
  439. package/dist/components/primitives/cost-meter/index.d.ts +1 -0
  440. package/dist/components/primitives/created-files-card/created-files-card.d.ts +30 -0
  441. package/dist/components/primitives/created-files-card/index.d.ts +1 -0
  442. package/dist/components/primitives/cron-job-card/cron-job-card.d.ts +30 -0
  443. package/dist/components/primitives/cron-job-card/index.d.ts +1 -0
  444. package/dist/components/primitives/danger-zone/danger-zone.d.ts +40 -0
  445. package/dist/components/primitives/danger-zone/index.d.ts +1 -0
  446. package/dist/components/primitives/dialog/dialog.d.ts +26 -0
  447. package/dist/components/primitives/dialog/index.d.ts +1 -0
  448. package/dist/components/primitives/diff-viewer/diff-viewer.d.ts +45 -0
  449. package/dist/components/primitives/diff-viewer/index.d.ts +1 -0
  450. package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +68 -0
  451. package/dist/components/primitives/dropdown-menu/index.d.ts +1 -0
  452. package/dist/components/primitives/empty-state/empty-state.d.ts +22 -0
  453. package/dist/components/primitives/empty-state/index.d.ts +1 -0
  454. package/dist/components/primitives/export-chat-dialog/export-chat-dialog.d.ts +18 -0
  455. package/dist/components/primitives/export-chat-dialog/index.d.ts +1 -0
  456. package/dist/components/primitives/folder-context-card/folder-context-card.d.ts +40 -0
  457. package/dist/components/primitives/folder-context-card/index.d.ts +1 -0
  458. package/dist/components/primitives/folder-selector/folder-selector.d.ts +18 -0
  459. package/dist/components/primitives/folder-selector/index.d.ts +1 -0
  460. package/dist/components/primitives/form-field/form-field.d.ts +44 -0
  461. package/dist/components/primitives/form-field/index.d.ts +1 -0
  462. package/dist/components/primitives/gateway-status-indicator/gateway-status-indicator.d.ts +19 -0
  463. package/dist/components/primitives/gateway-status-indicator/index.d.ts +1 -0
  464. package/dist/components/primitives/hook-config/hook-config.d.ts +27 -0
  465. package/dist/components/primitives/hook-config/index.d.ts +1 -0
  466. package/dist/components/primitives/hook-event-log/hook-event-log.d.ts +27 -0
  467. package/dist/components/primitives/hook-event-log/index.d.ts +1 -0
  468. package/dist/components/primitives/input/index.d.ts +1 -0
  469. package/dist/components/primitives/input/input.d.ts +24 -0
  470. package/dist/components/primitives/intent-selector/index.d.ts +1 -0
  471. package/dist/components/primitives/intent-selector/intent-selector.d.ts +22 -0
  472. package/dist/components/primitives/label/index.d.ts +1 -0
  473. package/dist/components/primitives/label/label.d.ts +15 -0
  474. package/dist/components/primitives/lane-board/index.d.ts +1 -0
  475. package/dist/components/primitives/lane-board/lane-board.d.ts +26 -0
  476. package/dist/components/primitives/login-split/index.d.ts +1 -0
  477. package/dist/components/primitives/login-split/login-split.d.ts +24 -0
  478. package/dist/components/primitives/mcp-server-card/index.d.ts +1 -0
  479. package/dist/components/primitives/mcp-server-card/mcp-server-card.d.ts +32 -0
  480. package/dist/components/primitives/memory-editor/index.d.ts +1 -0
  481. package/dist/components/primitives/memory-editor/memory-editor.d.ts +29 -0
  482. package/dist/components/primitives/mention-menu/index.d.ts +1 -0
  483. package/dist/components/primitives/mention-menu/mention-menu.d.ts +44 -0
  484. package/dist/components/primitives/metrics-panel/index.d.ts +1 -0
  485. package/dist/components/primitives/metrics-panel/metrics-panel.d.ts +62 -0
  486. package/dist/components/primitives/model-card/index.d.ts +1 -0
  487. package/dist/components/primitives/model-card/model-card.d.ts +72 -0
  488. package/dist/components/primitives/model-selector/index.d.ts +1 -0
  489. package/dist/components/primitives/model-selector/model-selector.d.ts +21 -0
  490. package/dist/components/primitives/pagination/index.d.ts +1 -0
  491. package/dist/components/primitives/pagination/pagination.d.ts +44 -0
  492. package/dist/components/primitives/permission-matrix/index.d.ts +1 -0
  493. package/dist/components/primitives/permission-matrix/permission-matrix.d.ts +43 -0
  494. package/dist/components/primitives/pin-input/index.d.ts +1 -0
  495. package/dist/components/primitives/pin-input/pin-input.d.ts +41 -0
  496. package/dist/components/primitives/plan-badge/index.d.ts +1 -0
  497. package/dist/components/primitives/plan-badge/plan-badge.d.ts +35 -0
  498. package/dist/components/primitives/progress/index.d.ts +1 -0
  499. package/dist/components/primitives/progress/progress.d.ts +44 -0
  500. package/dist/components/primitives/progress-checklist/index.d.ts +1 -0
  501. package/dist/components/primitives/progress-checklist/progress-checklist.d.ts +18 -0
  502. package/dist/components/primitives/project-switcher/index.d.ts +1 -0
  503. package/dist/components/primitives/project-switcher/project-switcher.d.ts +32 -0
  504. package/dist/components/primitives/quick-action-chips/index.d.ts +1 -0
  505. package/dist/components/primitives/quick-action-chips/quick-action-chips.d.ts +22 -0
  506. package/dist/components/primitives/radio-group/index.d.ts +1 -0
  507. package/dist/components/primitives/radio-group/radio-group.d.ts +5 -0
  508. package/dist/components/primitives/recent-folders-list/index.d.ts +1 -0
  509. package/dist/components/primitives/recent-folders-list/recent-folders-list.d.ts +21 -0
  510. package/dist/components/primitives/rule-card/index.d.ts +1 -0
  511. package/dist/components/primitives/rule-card/rule-card.d.ts +15 -0
  512. package/dist/components/primitives/run-stats/index.d.ts +1 -0
  513. package/dist/components/primitives/run-stats/run-stats.d.ts +16 -0
  514. package/dist/components/primitives/run-status-pill/index.d.ts +1 -0
  515. package/dist/components/primitives/run-status-pill/run-status-pill.d.ts +13 -0
  516. package/dist/components/primitives/running-tasks-panel/index.d.ts +1 -0
  517. package/dist/components/primitives/running-tasks-panel/running-tasks-panel.d.ts +20 -0
  518. package/dist/components/primitives/scroll-area/index.d.ts +2 -0
  519. package/dist/components/primitives/scroll-area/scroll-area.d.ts +40 -0
  520. package/dist/components/primitives/scroll-area/use-stick-to-bottom.d.ts +20 -0
  521. package/dist/components/primitives/select/index.d.ts +1 -0
  522. package/dist/components/primitives/select/select.d.ts +50 -0
  523. package/dist/components/primitives/session-list-item/index.d.ts +1 -0
  524. package/dist/components/primitives/session-list-item/session-list-item.d.ts +35 -0
  525. package/dist/components/primitives/session-timeline/index.d.ts +1 -0
  526. package/dist/components/primitives/session-timeline/session-timeline.d.ts +32 -0
  527. package/dist/components/primitives/sheet/index.d.ts +1 -0
  528. package/dist/components/primitives/sheet/sheet.d.ts +57 -0
  529. package/dist/components/primitives/sidebar/index.d.ts +1 -0
  530. package/dist/components/primitives/sidebar/sidebar.d.ts +18 -0
  531. package/dist/components/primitives/skeleton/index.d.ts +1 -0
  532. package/dist/components/primitives/skeleton/skeleton.d.ts +21 -0
  533. package/dist/components/primitives/skill-card/index.d.ts +1 -0
  534. package/dist/components/primitives/skill-card/skill-card.d.ts +28 -0
  535. package/dist/components/primitives/slide/alerts.d.ts +31 -0
  536. package/dist/components/primitives/slide/frontmatter.d.ts +23 -0
  537. package/dist/components/primitives/slide/index.d.ts +16 -0
  538. package/dist/components/primitives/slide/json-schema.d.ts +9 -0
  539. package/dist/components/primitives/slide/marpit-bg.d.ts +36 -0
  540. package/dist/components/primitives/slide/parse.d.ts +59 -0
  541. package/dist/components/primitives/slide/plugin.d.ts +79 -0
  542. package/dist/components/primitives/slide/plugins/emoji/index.d.ts +8 -0
  543. package/dist/components/primitives/slide/plugins/emoji/map.d.ts +15 -0
  544. package/dist/components/primitives/slide/plugins/math/index.d.ts +6 -0
  545. package/dist/components/primitives/slide/plugins/mermaid/index.d.ts +48 -0
  546. package/dist/components/primitives/slide/plugins/shiki/index.d.ts +11 -0
  547. package/dist/components/primitives/slide/sanitize.d.ts +33 -0
  548. package/dist/components/primitives/slide/schema.d.ts +109 -0
  549. package/dist/components/primitives/slide/slide.d.ts +53 -0
  550. package/dist/components/primitives/slide/themes/index.d.ts +9 -0
  551. package/dist/components/primitives/slide/use-slide-fit.d.ts +21 -0
  552. package/dist/components/primitives/slide/validate.d.ts +33 -0
  553. package/dist/components/primitives/social-auth-row/index.d.ts +1 -0
  554. package/dist/components/primitives/social-auth-row/social-auth-row.d.ts +24 -0
  555. package/dist/components/primitives/stat-tile/index.d.ts +1 -0
  556. package/dist/components/primitives/stat-tile/stat-tile.d.ts +28 -0
  557. package/dist/components/primitives/status-dot/index.d.ts +1 -0
  558. package/dist/components/primitives/status-dot/status-dot.d.ts +31 -0
  559. package/dist/components/primitives/steps-rail/index.d.ts +1 -0
  560. package/dist/components/primitives/steps-rail/steps-rail.d.ts +24 -0
  561. package/dist/components/primitives/sub-agent-dispatch/index.d.ts +1 -0
  562. package/dist/components/primitives/sub-agent-dispatch/sub-agent-dispatch.d.ts +30 -0
  563. package/dist/components/primitives/switch/index.d.ts +1 -0
  564. package/dist/components/primitives/switch/switch.d.ts +20 -0
  565. package/dist/components/primitives/system-prompt-editor/index.d.ts +1 -0
  566. package/dist/components/primitives/system-prompt-editor/system-prompt-editor.d.ts +25 -0
  567. package/dist/components/primitives/table/index.d.ts +1 -0
  568. package/dist/components/primitives/table/table.d.ts +61 -0
  569. package/dist/components/primitives/tabs/index.d.ts +1 -0
  570. package/dist/components/primitives/tabs/tabs.d.ts +7 -0
  571. package/dist/components/primitives/task-plan/index.d.ts +1 -0
  572. package/dist/components/primitives/task-plan/task-plan.d.ts +36 -0
  573. package/dist/components/primitives/terminal-panel/index.d.ts +1 -0
  574. package/dist/components/primitives/terminal-panel/terminal-panel.d.ts +32 -0
  575. package/dist/components/primitives/textarea/index.d.ts +1 -0
  576. package/dist/components/primitives/textarea/textarea.d.ts +20 -0
  577. package/dist/components/primitives/thinking-level-selector/index.d.ts +1 -0
  578. package/dist/components/primitives/thinking-level-selector/thinking-level-selector.d.ts +24 -0
  579. package/dist/components/primitives/timestamp/index.d.ts +1 -0
  580. package/dist/components/primitives/timestamp/timestamp.d.ts +34 -0
  581. package/dist/components/primitives/toast/index.d.ts +2 -0
  582. package/dist/components/primitives/toast/toast.d.ts +34 -0
  583. package/dist/components/primitives/toast/toaster.d.ts +38 -0
  584. package/dist/components/primitives/token-usage-chart/index.d.ts +2 -0
  585. package/dist/components/primitives/token-usage-chart/token-usage-chart.d.ts +44 -0
  586. package/dist/components/primitives/token-usage-chart/usage-metrics.d.ts +23 -0
  587. package/dist/components/primitives/tool-call/index.d.ts +1 -0
  588. package/dist/components/primitives/tool-call/tool-call.d.ts +30 -0
  589. package/dist/components/primitives/tool-call-card/index.d.ts +1 -0
  590. package/dist/components/primitives/tool-call-card/tool-call-card.d.ts +30 -0
  591. package/dist/components/primitives/tool-result/index.d.ts +1 -0
  592. package/dist/components/primitives/tool-result/tool-result.d.ts +19 -0
  593. package/dist/components/primitives/tools-list/index.d.ts +1 -0
  594. package/dist/components/primitives/tools-list/tools-list.d.ts +32 -0
  595. package/dist/components/primitives/tooltip/index.d.ts +1 -0
  596. package/dist/components/primitives/tooltip/tooltip.d.ts +33 -0
  597. package/dist/components/primitives/topnav/index.d.ts +1 -0
  598. package/dist/components/primitives/topnav/topnav.d.ts +29 -0
  599. package/dist/components/primitives/update-banner/index.d.ts +1 -0
  600. package/dist/components/primitives/update-banner/update-banner.d.ts +16 -0
  601. package/dist/components/primitives/whiteboard/index.d.ts +2 -0
  602. package/dist/components/primitives/whiteboard/render/freedraw.d.ts +2 -0
  603. package/dist/components/primitives/whiteboard/render/line.d.ts +4 -0
  604. package/dist/components/primitives/whiteboard/render/rough-paths.d.ts +16 -0
  605. package/dist/components/primitives/whiteboard/render/scene.d.ts +3 -0
  606. package/dist/components/primitives/whiteboard/render/shape.d.ts +5 -0
  607. package/dist/components/primitives/whiteboard/render/style.d.ts +24 -0
  608. package/dist/components/primitives/whiteboard/render/text.d.ts +2 -0
  609. package/dist/components/primitives/whiteboard/schema.d.ts +596 -0
  610. package/dist/components/primitives/whiteboard/seed.d.ts +22 -0
  611. package/dist/components/primitives/whiteboard/validate.d.ts +26 -0
  612. package/dist/components/primitives/whiteboard/viewport/use-pointer-pan.d.ts +11 -0
  613. package/dist/components/primitives/whiteboard/viewport/use-viewport.d.ts +33 -0
  614. package/dist/components/primitives/whiteboard/whiteboard.d.ts +21 -0
  615. package/dist/components.css +1 -1
  616. package/dist/composites/account-menu/index.js +4 -4
  617. package/dist/composites/agent-composer/index.js +6 -5
  618. package/dist/composites/agent-editor/index.js +8 -7
  619. package/dist/composites/agent-stream/index.js +21 -9
  620. package/dist/composites/agent-timeline/index.js +3 -3
  621. package/dist/composites/agent-tool-renderer/index.js +17 -0
  622. package/dist/composites/agent-tool-renderer/index.js.map +1 -0
  623. package/dist/composites/approval-card/index.js +3 -3
  624. package/dist/composites/chat-composer/index.js +3 -3
  625. package/dist/composites/chat-message/index.js +18 -4
  626. package/dist/composites/choice-prompt/index.js +11 -0
  627. package/dist/composites/choice-prompt/index.js.map +1 -0
  628. package/dist/composites/code-block/index.js +3 -3
  629. package/dist/composites/command-palette/index.js +4 -3
  630. package/dist/composites/confirm-dialog/index.js +6 -5
  631. package/dist/composites/confirm-prompt/index.js +7 -0
  632. package/dist/composites/confirm-prompt/index.js.map +1 -0
  633. package/dist/composites/cron-jobs-list/index.js +3 -3
  634. package/dist/composites/data-table/index.js +8 -7
  635. package/dist/composites/deployment-row/index.js +3 -3
  636. package/dist/composites/domain-config/index.js +6 -5
  637. package/dist/composites/env-var-editor/index.js +7 -5
  638. package/dist/composites/mcp-server-list/index.js +4 -3
  639. package/dist/composites/metric-card/index.js +5 -0
  640. package/dist/composites/metric-card/index.js.map +1 -0
  641. package/dist/composites/multi-select-prompt/index.js +11 -0
  642. package/dist/composites/multi-select-prompt/index.js.map +1 -0
  643. package/dist/composites/page-shell/index.js +6 -5
  644. package/dist/composites/permission-modal/index.js +5 -4
  645. package/dist/composites/preview-env-card/index.js +4 -4
  646. package/dist/composites/preview-panel/index.js +3 -3
  647. package/dist/composites/project-card/index.js +4 -4
  648. package/dist/composites/rollback-ui/index.js +5 -4
  649. package/dist/composites/rule-editor/index.js +9 -8
  650. package/dist/composites/skill-editor/index.js +9 -8
  651. package/dist/composites/skills-list/index.js +4 -3
  652. package/dist/composites/stability-bundle-viewer/index.js +3 -2
  653. package/dist/composites/status-indicator/index.js +4 -0
  654. package/dist/composites/status-indicator/index.js.map +1 -0
  655. package/dist/composites/task-header/index.js +3 -3
  656. package/dist/composites/text-prompt/index.js +10 -0
  657. package/dist/composites/text-prompt/index.js.map +1 -0
  658. package/dist/composites/usage-meter/index.js +3 -3
  659. package/dist/fonts-cdn.css +4 -4
  660. package/dist/fonts.css +2 -2
  661. package/dist/index.d.ts +144 -4622
  662. package/dist/index.js +999 -739
  663. package/dist/index.js.map +1 -1
  664. package/dist/lib/cn.d.ts +6 -0
  665. package/dist/lib/env.d.ts +55 -0
  666. package/dist/lib/live-region-context.d.ts +2 -0
  667. package/dist/lib/markdown/code-block.d.ts +14 -0
  668. package/dist/lib/markdown/inline-code.d.ts +10 -0
  669. package/dist/lib/markdown/math.d.ts +12 -0
  670. package/dist/lib/markdown/mermaid.d.ts +6 -0
  671. package/dist/lib/markdown/parser.d.ts +47 -0
  672. package/dist/lib/markdown/streaming-preprocess.d.ts +39 -0
  673. package/dist/lib/prompt.d.ts +40 -0
  674. package/dist/lib/safe-href.d.ts +27 -0
  675. package/dist/lib/sdk-tools-adapters/index.d.ts +1 -0
  676. package/dist/lib/sdk-tools-adapters/index.js +3 -0
  677. package/dist/lib/sdk-tools-adapters/index.js.map +1 -0
  678. package/dist/lib/sdk-tools-adapters/sdk-tools-adapters.d.ts +60 -0
  679. package/dist/lib/types.d.ts +10 -0
  680. package/dist/preset-v3-legacy.d.ts +7 -10
  681. package/dist/preset-v3-legacy.js +23 -3
  682. package/dist/preset-v3-legacy.js.map +1 -1
  683. package/dist/preset.css +2 -2
  684. package/dist/primitives/action-bar/index.js +2 -2
  685. package/dist/primitives/agent-error-card/index.js +2 -2
  686. package/dist/primitives/agent-event/index.js +3 -2
  687. package/dist/primitives/agent-handoff/index.js +2 -2
  688. package/dist/primitives/agent-profile/index.js +2 -2
  689. package/dist/primitives/agent-starting-state/index.js +2 -2
  690. package/dist/primitives/agent-streaming/index.js +2 -2
  691. package/dist/primitives/alert/index.js +2 -2
  692. package/dist/primitives/artifact-preview/index.js +2 -2
  693. package/dist/primitives/attachment-chip/index.js +2 -2
  694. package/dist/primitives/audit-log-entry/index.js +2 -2
  695. package/dist/primitives/auto-compact-notice/index.js +2 -2
  696. package/dist/primitives/avatar/index.js +2 -2
  697. package/dist/primitives/badge/index.js +2 -2
  698. package/dist/primitives/branch-indicator/index.js +2 -2
  699. package/dist/primitives/browser-controls/index.js +2 -2
  700. package/dist/primitives/build-log-stream/index.js +4 -2
  701. package/dist/primitives/button/index.js +2 -2
  702. package/dist/primitives/capability-indicator/index.js +2 -2
  703. package/dist/primitives/card/index.js +3 -2
  704. package/dist/primitives/channel-card/index.js +2 -2
  705. package/dist/primitives/chat-thread/index.js +2 -2
  706. package/dist/primitives/checkbox/index.js +2 -2
  707. package/dist/primitives/context-card/index.js +2 -2
  708. package/dist/primitives/context-window-bar/index.js +2 -2
  709. package/dist/primitives/copy-button/index.js +3 -2
  710. package/dist/primitives/cost-meter/index.js +2 -2
  711. package/dist/primitives/created-files-card/index.js +2 -2
  712. package/dist/primitives/cron-job-card/index.js +2 -2
  713. package/dist/primitives/danger-zone/index.js +2 -2
  714. package/dist/primitives/dialog/index.js +2 -2
  715. package/dist/primitives/diff-viewer/index.js +2 -2
  716. package/dist/primitives/dropdown-menu/index.js +2 -2
  717. package/dist/primitives/empty-state/index.js +2 -2
  718. package/dist/primitives/export-chat-dialog/index.js +3 -2
  719. package/dist/primitives/folder-context-card/index.js +2 -2
  720. package/dist/primitives/folder-selector/index.js +2 -2
  721. package/dist/primitives/form-field/index.js +3 -2
  722. package/dist/primitives/gateway-status-indicator/index.js +2 -2
  723. package/dist/primitives/hook-config/index.js +3 -2
  724. package/dist/primitives/hook-event-log/index.js +2 -2
  725. package/dist/primitives/input/index.js +2 -2
  726. package/dist/primitives/intent-selector/index.js +2 -2
  727. package/dist/primitives/label/index.js +2 -2
  728. package/dist/primitives/lane-board/index.js +2 -2
  729. package/dist/primitives/login-split/index.js +2 -2
  730. package/dist/primitives/mcp-server-card/index.js +2 -2
  731. package/dist/primitives/memory-editor/index.js +2 -2
  732. package/dist/primitives/mention-menu/index.js +3 -2
  733. package/dist/primitives/metrics-panel/index.js +2 -2
  734. package/dist/primitives/model-card/index.js +2 -2
  735. package/dist/primitives/model-selector/index.js +2 -2
  736. package/dist/primitives/pagination/index.js +2 -2
  737. package/dist/primitives/permission-matrix/index.js +3 -2
  738. package/dist/primitives/pin-input/index.js +3 -2
  739. package/dist/primitives/plan-badge/index.js +2 -2
  740. package/dist/primitives/progress/index.js +2 -2
  741. package/dist/primitives/progress-checklist/index.js +2 -2
  742. package/dist/primitives/project-switcher/index.js +2 -2
  743. package/dist/primitives/quick-action-chips/index.js +2 -2
  744. package/dist/primitives/radio-group/index.js +2 -2
  745. package/dist/primitives/recent-folders-list/index.js +2 -2
  746. package/dist/primitives/rule-card/index.js +2 -2
  747. package/dist/primitives/run-stats/index.js +2 -2
  748. package/dist/primitives/run-status-pill/index.js +2 -2
  749. package/dist/primitives/running-tasks-panel/index.js +2 -2
  750. package/dist/primitives/scroll-area/index.js +3 -2
  751. package/dist/primitives/select/index.js +2 -2
  752. package/dist/primitives/session-list-item/index.js +2 -2
  753. package/dist/primitives/session-timeline/index.js +2 -2
  754. package/dist/primitives/sheet/index.js +2 -2
  755. package/dist/primitives/sidebar/index.js +2 -2
  756. package/dist/primitives/skeleton/index.js +2 -2
  757. package/dist/primitives/skill-card/index.js +2 -2
  758. package/dist/primitives/social-auth-row/index.js +2 -2
  759. package/dist/primitives/stat-tile/index.js +2 -2
  760. package/dist/primitives/status-dot/index.js +4 -2
  761. package/dist/primitives/steps-rail/index.js +2 -2
  762. package/dist/primitives/sub-agent-dispatch/index.js +2 -2
  763. package/dist/primitives/switch/index.js +2 -2
  764. package/dist/primitives/system-prompt-editor/index.js +3 -2
  765. package/dist/primitives/table/index.js +3 -2
  766. package/dist/primitives/tabs/index.js +2 -2
  767. package/dist/primitives/task-plan/index.js +2 -2
  768. package/dist/primitives/terminal-panel/index.js +2 -2
  769. package/dist/primitives/textarea/index.js +2 -2
  770. package/dist/primitives/thinking-level-selector/index.js +3 -2
  771. package/dist/primitives/timestamp/index.js +4 -2
  772. package/dist/primitives/toast/index.js +3 -2
  773. package/dist/primitives/token-usage-chart/index.js +2 -2
  774. package/dist/primitives/tool-call/index.js +3 -2
  775. package/dist/primitives/tool-call-card/index.js +3 -2
  776. package/dist/primitives/tool-result/index.js +2 -2
  777. package/dist/primitives/tools-list/index.js +2 -2
  778. package/dist/primitives/tooltip/index.js +2 -2
  779. package/dist/primitives/topnav/index.js +2 -2
  780. package/dist/primitives/update-banner/index.js +2 -2
  781. package/dist/screens/theo-code-shell.d.ts +9 -0
  782. package/dist/screens/theo-code-shell.data.d.ts +147 -0
  783. package/dist/slide/index.js +2 -1
  784. package/dist/slide/plugins/mermaid/index.js +1 -1
  785. package/dist/slide/plugins/mermaid/index.js.map +1 -1
  786. package/dist/slide/plugins/shiki/index.js.map +1 -1
  787. package/dist/slide/themes/violet-forge.css +1 -1
  788. package/dist/slide-deck/index.js +13 -2
  789. package/dist/slide-deck/index.js.map +1 -1
  790. package/dist/styles/tailwind-preset.d.ts +29 -0
  791. package/dist/styles.css +3 -3
  792. package/dist/test/a11y.d.ts +13 -0
  793. package/dist/test/setup.d.ts +1 -0
  794. package/dist/themes/anthropic-style.d.ts +11 -0
  795. package/dist/themes/aurora-terminal.d.ts +9 -0
  796. package/dist/themes/classic-paper.d.ts +17 -0
  797. package/dist/themes/color-value-pattern.d.ts +22 -0
  798. package/dist/themes/color.d.ts +62 -0
  799. package/dist/themes/define.d.ts +65 -0
  800. package/dist/themes/density.d.ts +17 -0
  801. package/dist/themes/dracula.d.ts +14 -0
  802. package/dist/themes/github-dark.d.ts +11 -0
  803. package/dist/themes/index.d.ts +26 -0
  804. package/dist/themes/linear-glass.d.ts +11 -0
  805. package/dist/themes/one-dark.d.ts +11 -0
  806. package/dist/themes/openai-style.d.ts +10 -0
  807. package/dist/themes/schema.d.ts +112 -0
  808. package/dist/themes/theme-provider.d.ts +82 -0
  809. package/dist/themes/theme-script.d.ts +48 -0
  810. package/dist/themes/theme-switcher.d.ts +17 -0
  811. package/dist/themes/types.d.ts +88 -0
  812. package/dist/themes/vercel-mono.d.ts +11 -0
  813. package/dist/themes/violet-forge.d.ts +12 -0
  814. package/dist/theo-ui-provider.d.ts +50 -0
  815. package/dist/tokens-v4.css +77 -41
  816. package/dist/tokens.css +159 -74
  817. package/dist/types/agent.d.ts +19 -0
  818. package/dist/types/chat.d.ts +173 -0
  819. package/dist/types/mode.d.ts +16 -0
  820. package/dist/types/permission.d.ts +8 -0
  821. package/dist/types/rule.d.ts +28 -0
  822. package/dist/types/task.d.ts +9 -0
  823. package/dist/vite-plugin.d.ts +7 -11
  824. package/dist/vite-plugin.js +4 -4
  825. package/dist/vite-plugin.js.map +1 -1
  826. package/dist/whiteboard/index.js +3 -0
  827. package/dist/whiteboard/index.js.map +1 -1
  828. package/llms.txt +39 -39
  829. package/package.json +236 -188
  830. package/registry/index.json +58 -4
  831. package/registry/r/account-menu.json +1 -1
  832. package/registry/r/action-bar.json +1 -1
  833. package/registry/r/agent-composer.json +1 -1
  834. package/registry/r/agent-editor.json +1 -1
  835. package/registry/r/agent-error-card.json +1 -1
  836. package/registry/r/agent-event.json +1 -1
  837. package/registry/r/agent-handoff.json +1 -1
  838. package/registry/r/agent-profile.json +1 -1
  839. package/registry/r/agent-starting-state.json +1 -1
  840. package/registry/r/agent-stream.json +1 -1
  841. package/registry/r/agent-streaming.json +1 -1
  842. package/registry/r/agent-timeline.json +1 -1
  843. package/registry/r/agent-tool-renderer.json +40 -0
  844. package/registry/r/alert.json +1 -1
  845. package/registry/r/approval-card.json +1 -1
  846. package/registry/r/artifact-preview.json +1 -1
  847. package/registry/r/attachment-chip.json +1 -1
  848. package/registry/r/audit-log-entry.json +1 -1
  849. package/registry/r/auto-compact-notice.json +1 -1
  850. package/registry/r/avatar.json +1 -1
  851. package/registry/r/badge.json +1 -1
  852. package/registry/r/browser-controls.json +1 -1
  853. package/registry/r/build-log-stream.json +2 -1
  854. package/registry/r/button.json +1 -1
  855. package/registry/r/capability-indicator.json +1 -1
  856. package/registry/r/card.json +1 -1
  857. package/registry/r/chat-composer.json +1 -1
  858. package/registry/r/chat-message.json +11 -16
  859. package/registry/r/chat-thread.json +1 -1
  860. package/registry/r/chat-types.json +1 -1
  861. package/registry/r/checkbox.json +1 -1
  862. package/registry/r/choice-prompt.json +25 -0
  863. package/registry/r/cn.json +1 -1
  864. package/registry/r/code-block.json +1 -1
  865. package/registry/r/command-palette.json +1 -1
  866. package/registry/r/confirm-dialog.json +1 -1
  867. package/registry/r/confirm-prompt.json +21 -0
  868. package/registry/r/context-card.json +1 -1
  869. package/registry/r/context-window-bar.json +1 -1
  870. package/registry/r/copy-button.json +1 -1
  871. package/registry/r/cost-meter.json +1 -1
  872. package/registry/r/created-files-card.json +1 -1
  873. package/registry/r/cron-job-card.json +1 -1
  874. package/registry/r/cron-jobs-list.json +1 -1
  875. package/registry/r/danger-zone.json +1 -1
  876. package/registry/r/data-table.json +1 -1
  877. package/registry/r/deployment-row.json +1 -1
  878. package/registry/r/dialog.json +1 -1
  879. package/registry/r/diff-viewer.json +1 -1
  880. package/registry/r/domain-config.json +1 -1
  881. package/registry/r/dropdown-menu.json +2 -2
  882. package/registry/r/empty-state.json +1 -1
  883. package/registry/r/env-var-editor.json +2 -1
  884. package/registry/r/env.json +15 -0
  885. package/registry/r/folder-context-card.json +1 -1
  886. package/registry/r/folder-selector.json +1 -1
  887. package/registry/r/form-field.json +1 -1
  888. package/registry/r/hook-config.json +1 -1
  889. package/registry/r/hook-event-log.json +1 -1
  890. package/registry/r/input.json +1 -1
  891. package/registry/r/intent-selector.json +1 -1
  892. package/registry/r/label.json +1 -1
  893. package/registry/r/lane-board.json +1 -1
  894. package/registry/r/login-split.json +1 -1
  895. package/registry/r/mcp-server-card.json +1 -1
  896. package/registry/r/mcp-server-list.json +1 -1
  897. package/registry/r/memory-editor.json +1 -1
  898. package/registry/r/mention-menu.json +1 -1
  899. package/registry/r/metric-card.json +23 -0
  900. package/registry/r/metrics-panel.json +1 -1
  901. package/registry/r/model-card.json +1 -1
  902. package/registry/r/model-selector.json +1 -1
  903. package/registry/r/multi-select-prompt.json +25 -0
  904. package/registry/r/page-shell.json +1 -1
  905. package/registry/r/pagination.json +1 -1
  906. package/registry/r/permission-matrix.json +1 -1
  907. package/registry/r/permission-modal.json +1 -1
  908. package/registry/r/pin-input.json +1 -1
  909. package/registry/r/plan-badge.json +1 -1
  910. package/registry/r/preview-env-card.json +1 -1
  911. package/registry/r/preview-panel.json +1 -1
  912. package/registry/r/progress-checklist.json +1 -1
  913. package/registry/r/progress.json +1 -1
  914. package/registry/r/project-card.json +1 -1
  915. package/registry/r/project-switcher.json +1 -1
  916. package/registry/r/prompt.json +15 -0
  917. package/registry/r/quick-action-chips.json +1 -1
  918. package/registry/r/radio-group.json +1 -1
  919. package/registry/r/recent-folders-list.json +1 -1
  920. package/registry/r/rollback-ui.json +1 -1
  921. package/registry/r/rule-card.json +1 -1
  922. package/registry/r/rule-editor.json +1 -1
  923. package/registry/r/run-stats.json +1 -1
  924. package/registry/r/running-tasks-panel.json +1 -1
  925. package/registry/r/safe-href.json +1 -1
  926. package/registry/r/scroll-area.json +1 -1
  927. package/registry/r/select.json +1 -1
  928. package/registry/r/session-list-item.json +1 -1
  929. package/registry/r/session-timeline.json +1 -1
  930. package/registry/r/sheet.json +1 -1
  931. package/registry/r/sidebar.json +1 -1
  932. package/registry/r/skeleton.json +1 -1
  933. package/registry/r/skill-card.json +1 -1
  934. package/registry/r/skill-editor.json +1 -1
  935. package/registry/r/skills-list.json +1 -1
  936. package/registry/r/slide-deck.json +8 -8
  937. package/registry/r/slide-plugin-mermaid.json +1 -1
  938. package/registry/r/slide-plugin-shiki.json +1 -1
  939. package/registry/r/slide.json +6 -6
  940. package/registry/r/social-auth-row.json +1 -1
  941. package/registry/r/stat-tile.json +1 -1
  942. package/registry/r/status-dot.json +2 -1
  943. package/registry/r/status-indicator.json +20 -0
  944. package/registry/r/steps-rail.json +1 -1
  945. package/registry/r/sub-agent-dispatch.json +1 -1
  946. package/registry/r/switch.json +1 -1
  947. package/registry/r/system-prompt-editor.json +1 -1
  948. package/registry/r/table.json +1 -1
  949. package/registry/r/tabs.json +1 -1
  950. package/registry/r/tailwind-preset.json +1 -1
  951. package/registry/r/task-header.json +1 -1
  952. package/registry/r/task-plan.json +1 -1
  953. package/registry/r/terminal-panel.json +1 -1
  954. package/registry/r/text-prompt.json +24 -0
  955. package/registry/r/textarea.json +1 -1
  956. package/registry/r/theme-provider.json +7 -6
  957. package/registry/r/theo-ui-provider.json +1 -1
  958. package/registry/r/timestamp.json +2 -1
  959. package/registry/r/toast.json +2 -2
  960. package/registry/r/token-usage-chart.json +1 -1
  961. package/registry/r/tokens.json +2 -2
  962. package/registry/r/tool-call-card.json +1 -1
  963. package/registry/r/tool-call.json +1 -1
  964. package/registry/r/tool-result.json +1 -1
  965. package/registry/r/tools-list.json +1 -1
  966. package/registry/r/tooltip.json +1 -1
  967. package/registry/r/topnav.json +1 -1
  968. package/registry/r/usage-meter.json +1 -1
  969. package/registry/r/whiteboard.json +3 -3
  970. package/dist/chunk-2UJROWAG.js +0 -106
  971. package/dist/chunk-2UJROWAG.js.map +0 -1
  972. package/dist/chunk-2XPWOUEH.js +0 -68
  973. package/dist/chunk-2XPWOUEH.js.map +0 -1
  974. package/dist/chunk-3GHLNCM3.js +0 -42
  975. package/dist/chunk-3GHLNCM3.js.map +0 -1
  976. package/dist/chunk-3HOXC25T.js +0 -48
  977. package/dist/chunk-3HOXC25T.js.map +0 -1
  978. package/dist/chunk-3QGO5SB3.js +0 -46
  979. package/dist/chunk-3QGO5SB3.js.map +0 -1
  980. package/dist/chunk-47QJVWW2.js +0 -85
  981. package/dist/chunk-47QJVWW2.js.map +0 -1
  982. package/dist/chunk-4L63UW3I.js +0 -35
  983. package/dist/chunk-4L63UW3I.js.map +0 -1
  984. package/dist/chunk-4UUSJJFZ.js +0 -25
  985. package/dist/chunk-4UUSJJFZ.js.map +0 -1
  986. package/dist/chunk-4ZBZBRG5.js +0 -127
  987. package/dist/chunk-4ZBZBRG5.js.map +0 -1
  988. package/dist/chunk-57NXT3OX.js +0 -92
  989. package/dist/chunk-57NXT3OX.js.map +0 -1
  990. package/dist/chunk-5FF5EUZP.js +0 -44
  991. package/dist/chunk-5FF5EUZP.js.map +0 -1
  992. package/dist/chunk-5UGQXB2P.js +0 -714
  993. package/dist/chunk-5UGQXB2P.js.map +0 -1
  994. package/dist/chunk-62FT22CI.js +0 -85
  995. package/dist/chunk-62FT22CI.js.map +0 -1
  996. package/dist/chunk-673R3GSK.js +0 -19
  997. package/dist/chunk-673R3GSK.js.map +0 -1
  998. package/dist/chunk-6VINZJBV.js +0 -128
  999. package/dist/chunk-6VINZJBV.js.map +0 -1
  1000. package/dist/chunk-6ZQKEY54.js +0 -149
  1001. package/dist/chunk-6ZQKEY54.js.map +0 -1
  1002. package/dist/chunk-74NZ5U3E.js +0 -145
  1003. package/dist/chunk-74NZ5U3E.js.map +0 -1
  1004. package/dist/chunk-755NWSNW.js +0 -36
  1005. package/dist/chunk-755NWSNW.js.map +0 -1
  1006. package/dist/chunk-7GLBWWMW.js +0 -70
  1007. package/dist/chunk-7GLBWWMW.js.map +0 -1
  1008. package/dist/chunk-7RXYW5VM.js +0 -88
  1009. package/dist/chunk-7RXYW5VM.js.map +0 -1
  1010. package/dist/chunk-AC4MGCXI.js +0 -92
  1011. package/dist/chunk-AC4MGCXI.js.map +0 -1
  1012. package/dist/chunk-AEVSVDT6.js +0 -67
  1013. package/dist/chunk-AEVSVDT6.js.map +0 -1
  1014. package/dist/chunk-AODIMN2N.js +0 -68
  1015. package/dist/chunk-AODIMN2N.js.map +0 -1
  1016. package/dist/chunk-ATHOPBCA.js +0 -61
  1017. package/dist/chunk-ATHOPBCA.js.map +0 -1
  1018. package/dist/chunk-AVPHVQZS.js +0 -73
  1019. package/dist/chunk-AVPHVQZS.js.map +0 -1
  1020. package/dist/chunk-AXKBNRZW.js +0 -173
  1021. package/dist/chunk-AXKBNRZW.js.map +0 -1
  1022. package/dist/chunk-B75MEYNR.js +0 -106
  1023. package/dist/chunk-B75MEYNR.js.map +0 -1
  1024. package/dist/chunk-BGKA6DI6.js +0 -34
  1025. package/dist/chunk-BGKA6DI6.js.map +0 -1
  1026. package/dist/chunk-BNQAJGEN.js +0 -88
  1027. package/dist/chunk-BNQAJGEN.js.map +0 -1
  1028. package/dist/chunk-BP2SETUC.js +0 -101
  1029. package/dist/chunk-BP2SETUC.js.map +0 -1
  1030. package/dist/chunk-BPUQWMBD.js +0 -79
  1031. package/dist/chunk-BPUQWMBD.js.map +0 -1
  1032. package/dist/chunk-BVDASR3Y.js +0 -74
  1033. package/dist/chunk-BVDASR3Y.js.map +0 -1
  1034. package/dist/chunk-BX7A5GUV.js +0 -78
  1035. package/dist/chunk-BX7A5GUV.js.map +0 -1
  1036. package/dist/chunk-CDA6RYOX.js +0 -115
  1037. package/dist/chunk-CDA6RYOX.js.map +0 -1
  1038. package/dist/chunk-CG7O3A42.js +0 -80
  1039. package/dist/chunk-CG7O3A42.js.map +0 -1
  1040. package/dist/chunk-CIYGNPKT.js +0 -76
  1041. package/dist/chunk-CIYGNPKT.js.map +0 -1
  1042. package/dist/chunk-CKXY4FTV.js +0 -59
  1043. package/dist/chunk-CKXY4FTV.js.map +0 -1
  1044. package/dist/chunk-CVOKZITR.js +0 -82
  1045. package/dist/chunk-CVOKZITR.js.map +0 -1
  1046. package/dist/chunk-CWFMFKDI.js +0 -82
  1047. package/dist/chunk-CWFMFKDI.js.map +0 -1
  1048. package/dist/chunk-CWVKSV7S.js +0 -124
  1049. package/dist/chunk-CWVKSV7S.js.map +0 -1
  1050. package/dist/chunk-CYOLRWOX.js +0 -63
  1051. package/dist/chunk-CYOLRWOX.js.map +0 -1
  1052. package/dist/chunk-D23LRJT6.js +0 -116
  1053. package/dist/chunk-D23LRJT6.js.map +0 -1
  1054. package/dist/chunk-DFADMEJK.js +0 -127
  1055. package/dist/chunk-DFADMEJK.js.map +0 -1
  1056. package/dist/chunk-DKQAHZG2.js +0 -83
  1057. package/dist/chunk-DKQAHZG2.js.map +0 -1
  1058. package/dist/chunk-DW247T3Q.js +0 -199
  1059. package/dist/chunk-DW247T3Q.js.map +0 -1
  1060. package/dist/chunk-E5A7HN6H.js +0 -32
  1061. package/dist/chunk-E5A7HN6H.js.map +0 -1
  1062. package/dist/chunk-EI63GTN7.js +0 -57
  1063. package/dist/chunk-EI63GTN7.js.map +0 -1
  1064. package/dist/chunk-EP25QJ4N.js +0 -146
  1065. package/dist/chunk-EP25QJ4N.js.map +0 -1
  1066. package/dist/chunk-ET44426Q.js +0 -80
  1067. package/dist/chunk-ET44426Q.js.map +0 -1
  1068. package/dist/chunk-ETEIDY34.js +0 -67
  1069. package/dist/chunk-ETEIDY34.js.map +0 -1
  1070. package/dist/chunk-EU55O4P7.js +0 -76
  1071. package/dist/chunk-EU55O4P7.js.map +0 -1
  1072. package/dist/chunk-F436537E.js +0 -104
  1073. package/dist/chunk-F436537E.js.map +0 -1
  1074. package/dist/chunk-FLBTGNQI.js +0 -86
  1075. package/dist/chunk-FLBTGNQI.js.map +0 -1
  1076. package/dist/chunk-FUT45NFW.js +0 -46
  1077. package/dist/chunk-FUT45NFW.js.map +0 -1
  1078. package/dist/chunk-G3LWNTVZ.js +0 -51
  1079. package/dist/chunk-G3LWNTVZ.js.map +0 -1
  1080. package/dist/chunk-GBJB5WLT.js +0 -58
  1081. package/dist/chunk-GBJB5WLT.js.map +0 -1
  1082. package/dist/chunk-GIEPEFRX.js +0 -110
  1083. package/dist/chunk-GIEPEFRX.js.map +0 -1
  1084. package/dist/chunk-GSO7MISR.js +0 -58
  1085. package/dist/chunk-GSO7MISR.js.map +0 -1
  1086. package/dist/chunk-GUQFYUIC.js +0 -61
  1087. package/dist/chunk-GUQFYUIC.js.map +0 -1
  1088. package/dist/chunk-GXBFGWQN.js +0 -81
  1089. package/dist/chunk-GXBFGWQN.js.map +0 -1
  1090. package/dist/chunk-H3VJMFJQ.js +0 -35
  1091. package/dist/chunk-H3VJMFJQ.js.map +0 -1
  1092. package/dist/chunk-HG4WEERE.js +0 -26
  1093. package/dist/chunk-HG4WEERE.js.map +0 -1
  1094. package/dist/chunk-HGPBGLNP.js +0 -51
  1095. package/dist/chunk-HGPBGLNP.js.map +0 -1
  1096. package/dist/chunk-HQFTW7SF.js +0 -141
  1097. package/dist/chunk-HQFTW7SF.js.map +0 -1
  1098. package/dist/chunk-I32I36LW.js +0 -113
  1099. package/dist/chunk-I32I36LW.js.map +0 -1
  1100. package/dist/chunk-I7WYM63C.js +0 -170
  1101. package/dist/chunk-I7WYM63C.js.map +0 -1
  1102. package/dist/chunk-JPTPIZ5V.js +0 -120
  1103. package/dist/chunk-JPTPIZ5V.js.map +0 -1
  1104. package/dist/chunk-JQXLPVWP.js +0 -74
  1105. package/dist/chunk-JQXLPVWP.js.map +0 -1
  1106. package/dist/chunk-K5ARID4S.js +0 -26
  1107. package/dist/chunk-K5ARID4S.js.map +0 -1
  1108. package/dist/chunk-K6RTLPIJ.js +0 -41
  1109. package/dist/chunk-K6RTLPIJ.js.map +0 -1
  1110. package/dist/chunk-K7PYLTMP.js +0 -221
  1111. package/dist/chunk-K7PYLTMP.js.map +0 -1
  1112. package/dist/chunk-KQNKKV2C.js +0 -56
  1113. package/dist/chunk-KQNKKV2C.js.map +0 -1
  1114. package/dist/chunk-KRN4NE4U.js +0 -155
  1115. package/dist/chunk-KRN4NE4U.js.map +0 -1
  1116. package/dist/chunk-L2BI762I.js +0 -82
  1117. package/dist/chunk-L2BI762I.js.map +0 -1
  1118. package/dist/chunk-LEEH63B2.js +0 -56
  1119. package/dist/chunk-LEEH63B2.js.map +0 -1
  1120. package/dist/chunk-LHRWVM3G.js +0 -42
  1121. package/dist/chunk-LHRWVM3G.js.map +0 -1
  1122. package/dist/chunk-LIGWMGXM.js +0 -117
  1123. package/dist/chunk-LIGWMGXM.js.map +0 -1
  1124. package/dist/chunk-LKYSX3QF.js +0 -104
  1125. package/dist/chunk-LKYSX3QF.js.map +0 -1
  1126. package/dist/chunk-MCIFB6VS.js +0 -54
  1127. package/dist/chunk-MCIFB6VS.js.map +0 -1
  1128. package/dist/chunk-MI5CXMZU.js +0 -171
  1129. package/dist/chunk-MI5CXMZU.js.map +0 -1
  1130. package/dist/chunk-MYEHGDC2.js +0 -152
  1131. package/dist/chunk-MYEHGDC2.js.map +0 -1
  1132. package/dist/chunk-NQZYY4LR.js +0 -84
  1133. package/dist/chunk-NQZYY4LR.js.map +0 -1
  1134. package/dist/chunk-O23LKHUR.js +0 -66
  1135. package/dist/chunk-O23LKHUR.js.map +0 -1
  1136. package/dist/chunk-PASI2U2R.js +0 -23
  1137. package/dist/chunk-PASI2U2R.js.map +0 -1
  1138. package/dist/chunk-PPH5NTHV.js +0 -34
  1139. package/dist/chunk-PPH5NTHV.js.map +0 -1
  1140. package/dist/chunk-PR6OZF6D.js +0 -28
  1141. package/dist/chunk-PR6OZF6D.js.map +0 -1
  1142. package/dist/chunk-PTHRL242.js +0 -186
  1143. package/dist/chunk-PTHRL242.js.map +0 -1
  1144. package/dist/chunk-PWXOXPFT.js +0 -142
  1145. package/dist/chunk-PWXOXPFT.js.map +0 -1
  1146. package/dist/chunk-QB6BNHO3.js +0 -112
  1147. package/dist/chunk-QB6BNHO3.js.map +0 -1
  1148. package/dist/chunk-QJGGTIUN.js +0 -110
  1149. package/dist/chunk-QJGGTIUN.js.map +0 -1
  1150. package/dist/chunk-QSOIJ6J3.js +0 -91
  1151. package/dist/chunk-QSOIJ6J3.js.map +0 -1
  1152. package/dist/chunk-R63ZKLQM.js +0 -45
  1153. package/dist/chunk-R63ZKLQM.js.map +0 -1
  1154. package/dist/chunk-RC5XME4T.js +0 -33
  1155. package/dist/chunk-RC5XME4T.js.map +0 -1
  1156. package/dist/chunk-RTYYJPPE.js +0 -77
  1157. package/dist/chunk-RTYYJPPE.js.map +0 -1
  1158. package/dist/chunk-RVOBP7PO.js +0 -116
  1159. package/dist/chunk-RVOBP7PO.js.map +0 -1
  1160. package/dist/chunk-SF6R5VMQ.js +0 -97
  1161. package/dist/chunk-SF6R5VMQ.js.map +0 -1
  1162. package/dist/chunk-SP4CP5HY.js +0 -57
  1163. package/dist/chunk-SP4CP5HY.js.map +0 -1
  1164. package/dist/chunk-SWJ4EUOI.js +0 -30
  1165. package/dist/chunk-SWJ4EUOI.js.map +0 -1
  1166. package/dist/chunk-TK24HQJJ.js +0 -128
  1167. package/dist/chunk-TK24HQJJ.js.map +0 -1
  1168. package/dist/chunk-UAYOOTRR.js +0 -77
  1169. package/dist/chunk-UAYOOTRR.js.map +0 -1
  1170. package/dist/chunk-UDTAMHXW.js +0 -55
  1171. package/dist/chunk-UDTAMHXW.js.map +0 -1
  1172. package/dist/chunk-UK27KR35.js +0 -73
  1173. package/dist/chunk-UK27KR35.js.map +0 -1
  1174. package/dist/chunk-UOMQPIB4.js +0 -48
  1175. package/dist/chunk-UOMQPIB4.js.map +0 -1
  1176. package/dist/chunk-UOXU7NDY.js +0 -120
  1177. package/dist/chunk-UOXU7NDY.js.map +0 -1
  1178. package/dist/chunk-V7OOTVK3.js +0 -106
  1179. package/dist/chunk-V7OOTVK3.js.map +0 -1
  1180. package/dist/chunk-VI5M7KJ2.js +0 -1022
  1181. package/dist/chunk-VI5M7KJ2.js.map +0 -1
  1182. package/dist/chunk-VMMATOPE.js +0 -64
  1183. package/dist/chunk-VMMATOPE.js.map +0 -1
  1184. package/dist/chunk-W2PVSIW3.js +0 -89
  1185. package/dist/chunk-W2PVSIW3.js.map +0 -1
  1186. package/dist/chunk-W3DUDZDU.js +0 -88
  1187. package/dist/chunk-W3DUDZDU.js.map +0 -1
  1188. package/dist/chunk-WKEUU2FU.js +0 -114
  1189. package/dist/chunk-WKEUU2FU.js.map +0 -1
  1190. package/dist/chunk-WKLW7RC6.js +0 -28
  1191. package/dist/chunk-WKLW7RC6.js.map +0 -1
  1192. package/dist/chunk-WSJGZNUH.js +0 -111
  1193. package/dist/chunk-WSJGZNUH.js.map +0 -1
  1194. package/dist/chunk-WVPDQMC2.js +0 -144
  1195. package/dist/chunk-WVPDQMC2.js.map +0 -1
  1196. package/dist/chunk-WWNH5ENT.js +0 -43
  1197. package/dist/chunk-WWNH5ENT.js.map +0 -1
  1198. package/dist/chunk-X5L62PXY.js +0 -112
  1199. package/dist/chunk-X5L62PXY.js.map +0 -1
  1200. package/dist/chunk-XGCV5E6W.js +0 -133
  1201. package/dist/chunk-XGCV5E6W.js.map +0 -1
  1202. package/dist/chunk-XRKIEL5M.js +0 -72
  1203. package/dist/chunk-XRKIEL5M.js.map +0 -1
  1204. package/dist/chunk-XUJYEADU.js +0 -80
  1205. package/dist/chunk-XUJYEADU.js.map +0 -1
  1206. package/dist/chunk-XVYNSIQC.js +0 -116
  1207. package/dist/chunk-XVYNSIQC.js.map +0 -1
  1208. package/dist/chunk-XWTISHXO.js +0 -54
  1209. package/dist/chunk-XWTISHXO.js.map +0 -1
  1210. package/dist/chunk-XZKEGEPT.js +0 -156
  1211. package/dist/chunk-XZKEGEPT.js.map +0 -1
  1212. package/dist/chunk-YOGHS4UU.js +0 -202
  1213. package/dist/chunk-YOGHS4UU.js.map +0 -1
  1214. package/dist/chunk-YRSKXEOD.js +0 -135
  1215. package/dist/chunk-YRSKXEOD.js.map +0 -1
  1216. package/dist/chunk-ZALLCR7X.js +0 -108
  1217. package/dist/chunk-ZALLCR7X.js.map +0 -1
  1218. package/dist/chunk-ZDAOHMCW.js +0 -46
  1219. package/dist/chunk-ZDAOHMCW.js.map +0 -1
  1220. package/dist/chunk-ZESICCKK.js +0 -37
  1221. package/dist/chunk-ZESICCKK.js.map +0 -1
  1222. package/dist/chunk-ZIKFOD6N.js +0 -87
  1223. package/dist/chunk-ZIKFOD6N.js.map +0 -1
  1224. package/dist/chunk-ZJRWCQEN.js +0 -76
  1225. package/dist/chunk-ZJRWCQEN.js.map +0 -1
  1226. package/dist/chunk-ZSRJCIWF.js +0 -24
  1227. package/dist/chunk-ZSRJCIWF.js.map +0 -1
  1228. package/dist/plugin-Atb0VKtr.d.ts +0 -172
  1229. package/dist/slide/index.d.ts +0 -212
  1230. package/dist/slide/plugins/emoji/index.d.ts +0 -29
  1231. package/dist/slide/plugins/math/index.d.ts +0 -13
  1232. package/dist/slide/plugins/mermaid/index.d.ts +0 -55
  1233. package/dist/slide/plugins/shiki/index.d.ts +0 -18
  1234. package/dist/slide-deck/index.d.ts +0 -377
  1235. package/dist/whiteboard/index.d.ts +0 -258
@@ -17,7 +17,7 @@
17
17
  "path": "components/primitives/model-card/model-card.tsx",
18
18
  "type": "registry:ui",
19
19
  "target": "components/ui/model-card.tsx",
20
- "content": "import { CalendarDays, Eye, GitBranch, Image, Sparkles, Wrench } 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 ModelCapabilityFlag {\n id: string;\n label: string;\n icon?: IconComponent;\n enabled: boolean;\n}\n\nexport interface ModelInfo {\n id: string;\n /** Display name (e.g. \"Opus 4.7\"). */\n name: string;\n /** Vendor (Anthropic, OpenAI, …). */\n vendor: string;\n /** Optional tag (default, fast, smart, beta). */\n tag?: ReactNode;\n /** Total context window in tokens. */\n contextWindow: number;\n /** Max output tokens per turn. */\n maxOutput: number;\n /** USD per million input tokens. */\n pricePerMInput?: number;\n /** USD per million output tokens. */\n pricePerMOutput?: number;\n /** Knowledge cutoff date label (e.g. \"Jan 2026\"). */\n cutoff?: string;\n /** Capability flags shown as chips. */\n capabilities?: ModelCapabilityFlag[];\n /** Short description / positioning. */\n description?: ReactNode;\n}\n\nconst formatTokens = (n: number) => {\n if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(0)}M`;\n if (n >= 1_000) return `${(n / 1_000).toFixed(0)}k`;\n return `${n}`;\n};\n\nconst formatUsd = (n: number) =>\n n >= 100 ? `$${n.toFixed(0)}` : n >= 1 ? `$${n.toFixed(2)}` : `$${n.toFixed(3)}`;\n\ninterface ModelCardProps extends Omit<HTMLAttributes<HTMLElement>, \"onSelect\"> {\n model: ModelInfo;\n /** Render as the currently-selected variant (violet ring). */\n selected?: boolean;\n /** Fires when user clicks to select. */\n onSelect?: (id: string) => void;\n}\n\n/**\n * ModelCard — full info on a model: vendor, context, output cap, pricing,\n * capabilities, knowledge cutoff. Used in the \"switch model\" surface.\n */\nconst ModelCard = forwardRef<HTMLElement, ModelCardProps>(\n ({ className, model, selected, onSelect, ...props }, ref) => {\n const Tag = onSelect ? \"button\" : \"article\";\n return (\n <Tag\n ref={ref as never}\n type={onSelect ? \"button\" : undefined}\n onClick={onSelect ? () => onSelect(model.id) : undefined}\n className={cn(\n \"grid gap-3 rounded-xl border bg-card p-4 text-left\",\n \"transition-[border-color,box-shadow] duration-base ease-out-soft\",\n selected\n ? \"border-primary shadow-glow\"\n : onSelect\n ? \"hover:border-primary/40 hover:shadow-sm\"\n : \"\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className,\n )}\n aria-pressed={onSelect ? !!selected : undefined}\n {...(props as HTMLAttributes<HTMLElement>)}\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\">{model.name}</h4>\n <p className=\"font-mono text-label-caps text-muted-foreground uppercase tracking-wider\">\n {model.vendor}\n </p>\n </div>\n {model.tag ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-accent/15 px-2 py-0.5 font-mono text-accent text-label uppercase\">\n {typeof model.tag === \"string\" && model.tag.toLowerCase() === \"smart\" ? (\n <Sparkles className=\"size-3\" />\n ) : null}\n {model.tag}\n </span>\n ) : null}\n </header>\n\n {model.description ? (\n <p className=\"text-body-sm text-muted-foreground\">{model.description}</p>\n ) : null}\n\n <dl className=\"grid grid-cols-2 gap-3 border-border/30 border-t pt-3 font-mono\">\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Context\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatTokens(model.contextWindow)} tok\n </dd>\n </div>\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Max output\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatTokens(model.maxOutput)} tok\n </dd>\n </div>\n {model.pricePerMInput !== undefined ? (\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Input\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatUsd(model.pricePerMInput)} <span className=\"text-muted-foreground\">/M</span>\n </dd>\n </div>\n ) : null}\n {model.pricePerMOutput !== undefined ? (\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Output\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatUsd(model.pricePerMOutput)} <span className=\"text-muted-foreground\">/M</span>\n </dd>\n </div>\n ) : null}\n </dl>\n\n {model.capabilities && model.capabilities.length > 0 ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {model.capabilities.map((cap) => {\n const Icon = cap.icon ?? Wrench;\n return (\n <span\n key={cap.id}\n className={cn(\n \"inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-label\",\n cap.enabled\n ? \"bg-success/15 text-success\"\n : \"bg-muted text-muted-foreground line-through\",\n )}\n >\n <Icon className=\"size-3\" aria-hidden=\"true\" />\n {cap.label}\n </span>\n );\n })}\n </div>\n ) : null}\n\n {model.cutoff ? (\n <p className=\"inline-flex items-center gap-1 font-mono text-label text-muted-foreground\">\n <CalendarDays className=\"size-3\" aria-hidden=\"true\" /> Knowledge cutoff · {model.cutoff}\n </p>\n ) : null}\n </Tag>\n );\n },\n);\nModelCard.displayName = \"ModelCard\";\n\n/** Pre-canned capability flags. */\nexport const modelCapabilityPresets = {\n vision: { id: \"vision\", label: \"Vision\", icon: Image as IconComponent } as const,\n tools: { id: \"tools\", label: \"Tool use\", icon: Wrench } as const,\n reasoning: { id: \"reasoning\", label: \"Reasoning\", icon: Sparkles } as const,\n fineTuning: { id: \"ft\", label: \"Fine-tuning\", icon: GitBranch } as const,\n multimodal: { id: \"multimodal\", label: \"Multimodal\", icon: Eye } as const,\n};\n\nexport { ModelCard };\n"
20
+ "content": "import { CalendarDays, Eye, GitBranch, Image, Sparkles, Wrench } 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 ModelCapabilityFlag {\n id: string;\n label: string;\n icon?: IconComponent;\n enabled: boolean;\n}\n\nexport interface ModelInfo {\n id: string;\n /** Display name (e.g. \"Opus 4.7\"). */\n name: string;\n /** Vendor (Anthropic, OpenAI, …). */\n vendor: string;\n /** Optional tag (default, fast, smart, beta). */\n tag?: ReactNode;\n /** Total context window in tokens. */\n contextWindow: number;\n /** Max output tokens per turn. */\n maxOutput: number;\n /** USD per million input tokens. */\n pricePerMInput?: number;\n /** USD per million output tokens. */\n pricePerMOutput?: number;\n /** Knowledge cutoff date label (e.g. \"Jan 2026\"). */\n cutoff?: string;\n /** Capability flags shown as chips. */\n capabilities?: ModelCapabilityFlag[];\n /** Short description / positioning. */\n description?: ReactNode;\n}\n\nconst formatTokens = (n: number) => {\n if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(0)}M`;\n if (n >= 1_000) return `${(n / 1_000).toFixed(0)}k`;\n return `${n}`;\n};\n\nconst formatUsd = (n: number) =>\n n >= 100 ? `$${n.toFixed(0)}` : n >= 1 ? `$${n.toFixed(2)}` : `$${n.toFixed(3)}`;\n\ninterface ModelCardProps extends Omit<HTMLAttributes<HTMLElement>, \"onSelect\"> {\n model: ModelInfo;\n /** Render as the currently-selected variant (violet ring). */\n selected?: boolean;\n /** Fires when user clicks to select. */\n onSelect?: (id: string) => void;\n}\n\n/**\n * ModelCard — full info on a model: vendor, context, output cap, pricing,\n * capabilities, knowledge cutoff. Used in the \"switch model\" surface.\n */\nconst ModelCard = forwardRef<HTMLElement, ModelCardProps>(\n ({ className, model, selected, onSelect, ...props }, ref) => {\n const Tag = onSelect ? \"button\" : \"article\";\n return (\n <Tag\n data-slot=\"model-card\"\n ref={ref as never}\n type={onSelect ? \"button\" : undefined}\n onClick={onSelect ? () => onSelect(model.id) : undefined}\n className={cn(\n \"grid gap-3 rounded-xl border bg-card p-4 text-left\",\n \"transition-[border-color,box-shadow] duration-base ease-out-soft\",\n selected\n ? \"border-primary shadow-glow\"\n : onSelect\n ? \"hover:border-primary/40 hover:shadow-sm\"\n : \"\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className,\n )}\n aria-pressed={onSelect ? !!selected : undefined}\n {...(props as HTMLAttributes<HTMLElement>)}\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\">{model.name}</h4>\n <p className=\"font-mono text-label-caps text-muted-foreground uppercase tracking-wider\">\n {model.vendor}\n </p>\n </div>\n {model.tag ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-accent/15 px-2 py-0.5 font-mono text-accent text-label uppercase\">\n {typeof model.tag === \"string\" && model.tag.toLowerCase() === \"smart\" ? (\n <Sparkles className=\"size-3\" />\n ) : null}\n {model.tag}\n </span>\n ) : null}\n </header>\n\n {model.description ? (\n <p className=\"text-body-sm text-muted-foreground\">{model.description}</p>\n ) : null}\n\n <dl className=\"grid grid-cols-2 gap-3 border-border/30 border-t pt-3 font-mono\">\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Context\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatTokens(model.contextWindow)} tok\n </dd>\n </div>\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Max output\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatTokens(model.maxOutput)} tok\n </dd>\n </div>\n {model.pricePerMInput !== undefined ? (\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Input\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatUsd(model.pricePerMInput)} <span className=\"text-muted-foreground\">/M</span>\n </dd>\n </div>\n ) : null}\n {model.pricePerMOutput !== undefined ? (\n <div className=\"grid gap-0.5\">\n <dt className=\"text-label-caps text-muted-foreground uppercase tracking-wider\">\n Output\n </dt>\n <dd className=\"font-medium text-body-sm tabular-nums\">\n {formatUsd(model.pricePerMOutput)} <span className=\"text-muted-foreground\">/M</span>\n </dd>\n </div>\n ) : null}\n </dl>\n\n {model.capabilities && model.capabilities.length > 0 ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {model.capabilities.map((cap) => {\n const Icon = cap.icon ?? Wrench;\n return (\n <span\n key={cap.id}\n className={cn(\n \"inline-flex items-center gap-1 rounded-md px-2 py-0.5 font-mono text-label\",\n cap.enabled\n ? \"bg-success/15 text-success\"\n : \"bg-muted text-muted-foreground line-through\",\n )}\n >\n <Icon className=\"size-3\" aria-hidden=\"true\" />\n {cap.label}\n </span>\n );\n })}\n </div>\n ) : null}\n\n {model.cutoff ? (\n <p className=\"inline-flex items-center gap-1 font-mono text-label text-muted-foreground\">\n <CalendarDays className=\"size-3\" aria-hidden=\"true\" /> Knowledge cutoff · {model.cutoff}\n </p>\n ) : null}\n </Tag>\n );\n },\n);\nModelCard.displayName = \"ModelCard\";\n\n/** Pre-canned capability flags. */\nexport const modelCapabilityPresets = {\n vision: { id: \"vision\", label: \"Vision\", icon: Image as IconComponent } as const,\n tools: { id: \"tools\", label: \"Tool use\", icon: Wrench } as const,\n reasoning: { id: \"reasoning\", label: \"Reasoning\", icon: Sparkles } as const,\n fineTuning: { id: \"ft\", label: \"Fine-tuning\", icon: GitBranch } as const,\n multimodal: { id: \"multimodal\", label: \"Multimodal\", icon: Eye } as const,\n};\n\nexport { ModelCard };\n"
21
21
  }
22
22
  ]
23
23
  }
@@ -17,7 +17,7 @@
17
17
  "path": "components/primitives/model-selector/model-selector.tsx",
18
18
  "type": "registry:ui",
19
19
  "target": "components/ui/model-selector.tsx",
20
- "content": "import * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronDown, Sparkles } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport interface ModelOption {\n id: string;\n label: string;\n /** Optional vendor hint shown small below the label. */\n vendor?: string;\n /** Optional tag e.g. \"default\", \"fast\", \"smart\". */\n tag?: string;\n}\n\ninterface ModelSelectorProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"onChange\"> {\n value: string;\n options: ModelOption[];\n onChange?: (id: string) => void;\n}\n\n/**\n * ModelSelector — chip dropdown for picking the active LLM.\n *\n * Visual: pill with violet dot + label + chevron. Dropdown uses Radix Menu.\n */\nconst ModelSelector = forwardRef<HTMLButtonElement, ModelSelectorProps>(\n ({ className, value, options, onChange, ...props }, ref) => {\n const current = options.find((o) => o.id === value) ?? options[0];\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n \"inline-flex h-8 items-center gap-2 rounded-full border border-border/60 bg-card px-3\",\n \"font-medium font-sans text-body-sm text-foreground\",\n \"transition-colors duration-base ease-out-soft\",\n \"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 className,\n )}\n {...props}\n >\n <span className=\"size-1.5 rounded-full bg-primary\" aria-hidden=\"true\" />\n {current?.label ?? \"Select model\"}\n <ChevronDown className=\"size-3 text-muted-foreground\" aria-hidden=\"true\" />\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n sideOffset={6}\n align=\"end\"\n className={cn(\n \"z-50 min-w-[14rem] overflow-hidden rounded-lg border bg-popover p-1 text-popover-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 )}\n >\n {options.map((opt) => (\n <DropdownMenu.Item\n key={opt.id}\n onSelect={() => onChange?.(opt.id)}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 rounded-md px-2 py-2\",\n \"text-body-sm\",\n \"focus:bg-muted focus:outline-none\",\n \"data-[highlighted]:bg-muted\",\n )}\n >\n <span className=\"flex flex-col\">\n <span className=\"font-medium\">{opt.label}</span>\n {opt.vendor ? (\n <span className=\"font-mono text-label text-muted-foreground\">{opt.vendor}</span>\n ) : null}\n </span>\n <span className=\"flex items-center gap-2\">\n {opt.tag ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-accent/15 px-2 py-0.5 font-mono text-accent text-label uppercase\">\n {opt.tag === \"smart\" ? <Sparkles className=\"size-3\" /> : null}\n {opt.tag}\n </span>\n ) : null}\n {opt.id === value ? <Check className=\"size-3.5 text-primary\" /> : null}\n </span>\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\nModelSelector.displayName = \"ModelSelector\";\n\nexport { ModelSelector };\n"
20
+ "content": "import * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronDown, Sparkles } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport interface ModelOption {\n id: string;\n label: string;\n /** Optional vendor hint shown small below the label. */\n vendor?: string;\n /** Optional tag e.g. \"default\", \"fast\", \"smart\". */\n tag?: string;\n}\n\ninterface ModelSelectorProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"onChange\"> {\n value: string;\n options: ModelOption[];\n onChange?: (id: string) => void;\n}\n\n/**\n * ModelSelector — chip dropdown for picking the active LLM.\n *\n * Visual: pill with violet dot + label + chevron. Dropdown uses Radix Menu.\n */\nconst ModelSelector = forwardRef<HTMLButtonElement, ModelSelectorProps>(\n ({ className, value, options, onChange, ...props }, ref) => {\n const current = options.find((o) => o.id === value) ?? options[0];\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>\n <button\n data-slot=\"model-selector\"\n ref={ref}\n type=\"button\"\n className={cn(\n \"inline-flex h-8 items-center gap-2 rounded-full border border-border/60 bg-card px-3\",\n \"font-medium font-sans text-body-sm text-foreground\",\n \"transition-colors duration-base ease-out-soft\",\n \"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 className,\n )}\n {...props}\n >\n <span className=\"size-1.5 rounded-full bg-primary\" aria-hidden=\"true\" />\n {current?.label ?? \"Select model\"}\n <ChevronDown className=\"size-3 text-muted-foreground\" aria-hidden=\"true\" />\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n sideOffset={6}\n align=\"end\"\n className={cn(\n \"z-50 min-w-[14rem] overflow-hidden rounded-lg border bg-popover p-1 text-popover-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 )}\n >\n {options.map((opt) => (\n <DropdownMenu.Item\n key={opt.id}\n onSelect={() => onChange?.(opt.id)}\n className={cn(\n \"flex cursor-pointer items-center justify-between gap-3 rounded-md px-2 py-2\",\n \"text-body-sm\",\n \"focus:bg-muted focus:outline-none\",\n \"data-[highlighted]:bg-muted\",\n )}\n >\n <span className=\"flex flex-col\">\n <span className=\"font-medium\">{opt.label}</span>\n {opt.vendor ? (\n <span className=\"font-mono text-label text-muted-foreground\">{opt.vendor}</span>\n ) : null}\n </span>\n <span className=\"flex items-center gap-2\">\n {opt.tag ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-accent/15 px-2 py-0.5 font-mono text-accent text-label uppercase\">\n {opt.tag === \"smart\" ? <Sparkles className=\"size-3\" /> : null}\n {opt.tag}\n </span>\n ) : null}\n {opt.id === value ? <Check className=\"size-3.5 text-primary\" /> : null}\n </span>\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n },\n);\nModelSelector.displayName = \"ModelSelector\";\n\nexport { ModelSelector };\n"
21
21
  }
22
22
  ]
23
23
  }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "name": "multi-select-prompt",
4
+ "type": "registry:block",
5
+ "title": "MultiSelectPrompt",
6
+ "description": "Multi-select ask-the-user card with number-key toggles, an Other free-text option, and a side-by-side preview pane.",
7
+ "registryDependencies": [
8
+ "https://usetheodev.github.io/theo-ui/r/badge.json",
9
+ "https://usetheodev.github.io/theo-ui/r/button.json",
10
+ "https://usetheodev.github.io/theo-ui/r/checkbox.json",
11
+ "https://usetheodev.github.io/theo-ui/r/cn.json",
12
+ "https://usetheodev.github.io/theo-ui/r/input.json",
13
+ "https://usetheodev.github.io/theo-ui/r/label.json",
14
+ "https://usetheodev.github.io/theo-ui/r/prompt.json",
15
+ "https://usetheodev.github.io/theo-ui/r/tailwind-preset.json"
16
+ ],
17
+ "files": [
18
+ {
19
+ "path": "components/composites/multi-select-prompt/multi-select-prompt.tsx",
20
+ "type": "registry:block",
21
+ "target": "components/blocks/multi-select-prompt.tsx",
22
+ "content": "\"use client\";\n\nimport { forwardRef, useId, useState } from \"react\";\nimport type { HTMLAttributes, KeyboardEvent, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { OTHER_OPTION_VALUE, type PromptOption, digitKeyToIndex } from \"@/lib/prompt\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Checkbox } from \"@/components/ui/checkbox\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\n/**\n * MultiSelectPrompt — multi-select \"ask the user\" card for agent surfaces.\n *\n * The checkbox sibling of `ChoicePrompt`: same question + header chip + option\n * shape + `1`..`9` number-key toggles + injectable free-text \"Other\" +\n * side-by-side preview, but the user may select any number of options.\n *\n * Renders one question at a time — sequencing is the consumer's responsibility.\n * Controlled (`value` + `onValueChange`) or uncontrolled (`defaultValue`).\n */\n\n/** Payload handed to `onConfirm`. */\nexport interface MultiSelectPromptResult {\n /** The selected option values (includes the reserved Other value when checked). */\n values: string[];\n /** Present only when the Other option is among the selected values. */\n otherText?: string;\n}\n\nexport interface MultiSelectPromptProps extends Omit<HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** The question being asked. */\n question: ReactNode;\n /** Optional secondary line under the question. */\n description?: ReactNode;\n /** Optional short header chip (rendered as a Badge). */\n badge?: ReactNode;\n /** The selectable options. */\n options: PromptOption[];\n /** Controlled selected values. */\n value?: string[];\n /** Initial selected values when uncontrolled. */\n defaultValue?: string[];\n /** Fired with the full value array whenever the selection changes. */\n onValueChange?: (values: string[]) => void;\n /** Inject a free-text \"Other\" option as the last row. */\n allowOther?: boolean;\n /** Label for the Other row. Defaults to \"Other\". */\n otherLabel?: ReactNode;\n /** Placeholder for the Other text field. */\n otherPlaceholder?: string;\n /** Controlled Other text. */\n otherText?: string;\n /** Fired with the Other text on every keystroke. */\n onOtherTextChange?: (text: string) => void;\n /** Enable `1`..`9` number-key toggling. Default true. */\n enableKeyboardShortcuts?: boolean;\n /** Show the `1`..`9` hint chips next to options. Defaults to the shortcut flag. */\n showNumbers?: boolean;\n /** Minimum selections required before Confirm enables. Default 1. */\n minSelected?: number;\n /** Confirm button label. Defaults to \"Confirm\". Omit `onConfirm` to hide it. */\n confirmLabel?: ReactNode;\n /** Cancel button label. Defaults to \"Cancel\". Omit `onCancel` to hide it. */\n cancelLabel?: ReactNode;\n /** Pressing Confirm. Receives the selection (and Other text when relevant). */\n onConfirm?: (result: MultiSelectPromptResult) => void;\n /** Pressing Cancel. */\n onCancel?: () => void;\n}\n\nconst MultiSelectPrompt = forwardRef<HTMLElement, MultiSelectPromptProps>(\n (\n {\n className,\n question,\n description,\n badge,\n options,\n value,\n defaultValue,\n onValueChange,\n allowOther = false,\n otherLabel = \"Other\",\n otherPlaceholder = \"Type your answer…\",\n otherText,\n onOtherTextChange,\n enableKeyboardShortcuts = true,\n showNumbers,\n minSelected = 1,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n onConfirm,\n onCancel,\n ...props\n },\n ref,\n ) => {\n const baseId = useId();\n const questionId = `${baseId}-question`;\n const optionId = (value_: string): string => `${baseId}-opt-${value_}`;\n\n const [internalValues, setInternalValues] = useState<string[]>(defaultValue ?? []);\n const values = value !== undefined ? value : internalValues;\n\n const [internalOther, setInternalOther] = useState(\"\");\n const otherValue = otherText !== undefined ? otherText : internalOther;\n\n const numbersVisible = showNumbers ?? enableKeyboardShortcuts;\n const hasPreview = options.some((option) => option.preview != null);\n const selectedPreviews = options.filter(\n (option) => option.preview != null && values.includes(option.value),\n );\n\n const toggle = (next: string): void => {\n const updated = values.includes(next)\n ? values.filter((current) => current !== next)\n : [...values, next];\n if (value === undefined) setInternalValues(updated);\n onValueChange?.(updated);\n };\n\n const setOther = (next: string): void => {\n if (otherText === undefined) setInternalOther(next);\n onOtherTextChange?.(next);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLElement>): void => {\n if (!enableKeyboardShortcuts) return;\n const target = event.target as HTMLElement;\n if (target.tagName === \"INPUT\" || target.tagName === \"TEXTAREA\") return;\n const index = digitKeyToIndex(event.key);\n if (index === null || index >= options.length) return;\n const option = options[index];\n if (!option || option.disabled) return;\n event.preventDefault();\n toggle(option.value);\n };\n\n const otherChecked = values.includes(OTHER_OPTION_VALUE);\n\n const confirm = (): void => {\n if (values.length < minSelected) return;\n onConfirm?.(otherChecked ? { values, otherText: otherValue } : { values });\n };\n\n return (\n <section\n data-slot=\"multi-select-prompt\"\n ref={ref}\n aria-labelledby={questionId}\n onKeyDown={handleKeyDown}\n className={cn(\n \"grid w-full gap-4 rounded-xl border bg-card p-5 text-card-foreground shadow-md\",\n \"transition-shadow duration-base ease-out-soft\",\n className,\n )}\n {...props}\n >\n <header className=\"flex items-start justify-between gap-3\">\n <h3 id={questionId} className=\"font-display text-foreground text-title-md tracking-tight\">\n {question}\n </h3>\n {badge != null ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"shrink-0\">\n {badge}\n </Badge>\n ) : null}\n </header>\n {description != null ? (\n <p className=\"text-body-sm text-muted-foreground\">{description}</p>\n ) : null}\n\n <div className={cn(\"grid gap-5\", hasPreview && \"md:grid-cols-2\")}>\n <fieldset className=\"m-0 grid min-w-0 gap-2 border-0 p-0\" aria-labelledby={questionId}>\n {options.map((option, index) => (\n <div key={option.value} className=\"flex items-start gap-3\">\n <Checkbox\n id={optionId(option.value)}\n checked={values.includes(option.value)}\n disabled={option.disabled}\n onCheckedChange={() => toggle(option.value)}\n className=\"mt-0.5\"\n />\n <Label\n htmlFor={optionId(option.value)}\n className=\"flex flex-1 cursor-pointer flex-col items-start gap-0.5\"\n >\n <span className=\"text-body-md text-foreground\">{option.label}</span>\n {option.description != null ? (\n <span className=\"text-body-sm text-muted-foreground\">{option.description}</span>\n ) : null}\n </Label>\n {numbersVisible && index < 9 ? (\n <span\n aria-hidden=\"true\"\n className=\"mt-0.5 shrink-0 rounded border border-border bg-muted px-1.5 font-mono text-label text-muted-foreground\"\n >\n {index + 1}\n </span>\n ) : null}\n </div>\n ))}\n\n {allowOther ? (\n <div className=\"flex flex-col gap-2 border-border/40 border-t pt-2\">\n <div className=\"flex items-start gap-3\">\n <Checkbox\n id={optionId(OTHER_OPTION_VALUE)}\n checked={otherChecked}\n onCheckedChange={() => toggle(OTHER_OPTION_VALUE)}\n className=\"mt-0.5\"\n />\n <Label\n htmlFor={optionId(OTHER_OPTION_VALUE)}\n className=\"flex-1 cursor-pointer text-body-md\"\n >\n {otherLabel}\n </Label>\n </div>\n {otherChecked ? (\n <Input\n size=\"sm\"\n aria-label={typeof otherLabel === \"string\" ? otherLabel : \"Other\"}\n placeholder={otherPlaceholder}\n value={otherValue}\n onChange={(event) => setOther(event.target.value)}\n className=\"ml-7\"\n />\n ) : null}\n </div>\n ) : null}\n </fieldset>\n\n {hasPreview ? (\n <div className=\"rounded-lg border border-border/60 bg-muted/40 p-3\">\n <p className=\"mb-2 font-sans text-label-caps text-muted-foreground uppercase tracking-wider\">\n Preview\n </p>\n {selectedPreviews.length > 0 ? (\n <div className=\"grid gap-3\">\n {selectedPreviews.map((option) => (\n <div\n key={option.value}\n className=\"whitespace-pre-wrap break-words font-mono text-code-sm text-foreground\"\n >\n {option.preview}\n </div>\n ))}\n </div>\n ) : (\n <p className=\"text-body-sm text-muted-foreground\">Select an option to preview.</p>\n )}\n </div>\n ) : null}\n </div>\n\n {onConfirm || onCancel ? (\n <footer className=\"flex items-center justify-end gap-2\">\n {onCancel ? (\n <Button size=\"sm\" variant=\"secondary\" onClick={onCancel}>\n {cancelLabel}\n </Button>\n ) : null}\n {onConfirm ? (\n <Button\n size=\"sm\"\n variant=\"primary\"\n disabled={values.length < minSelected}\n onClick={confirm}\n >\n {confirmLabel}\n </Button>\n ) : null}\n </footer>\n ) : null}\n </section>\n );\n },\n);\nMultiSelectPrompt.displayName = \"MultiSelectPrompt\";\n\nexport { MultiSelectPrompt };\n"
23
+ }
24
+ ]
25
+ }
@@ -19,7 +19,7 @@
19
19
  "path": "components/composites/page-shell/page-shell.tsx",
20
20
  "type": "registry:ui",
21
21
  "target": "components/ui/page-shell.tsx",
22
- "content": "import { AlertCircle, Loader2 } from \"lucide-react\";\nimport { forwardRef, useEffect } from \"react\";\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { ActionBar } from \"@/components/ui/action-bar\";\nimport { Card } from \"@/components/ui/card\";\nimport { EmptyState } from \"@/components/ui/empty-state\";\n\n/**\n * PageShell — page-level scaffold composite.\n *\n * Renders title + optional description + optional ActionBar, then\n * one of four mutually-exclusive content states:\n * 1. loading (highest precedence)\n * 2. error\n * 3. empty\n * 4. children (default)\n *\n * Scope-narrowed per Brief #5 D3: PageShell does NOT manage\n * `document.title`. Use the optional `onTitleChange` callback to\n * wire your own hook (e.g. useSetPageTitle, react-helmet,\n * next/head).\n *\n * @example\n * <PageShell\n * title=\"Domains\"\n * description=\"Custom domains and DNS verification.\"\n * search={{ placeholder: \"Search…\", value: q, onChange: setQ }}\n * primaryAction={{ label: \"Add domain\", icon: Plus, onClick: openModal }}\n * loading={isLoading}\n * error={error ? { message: error.message, onRetry: refetch } : undefined}\n * empty={data?.length === 0 ? { title: \"No domains yet\" } : undefined}\n * >\n * <DataTable columns={…} data={data} />\n * </PageShell>\n */\nexport interface PageShellProps {\n title: string;\n description?: ReactNode;\n /** Optional callback invoked when `title` changes — wire to your own document.title hook. */\n onTitleChange?: (title: string) => void;\n primaryAction?: {\n label: ReactNode;\n icon?: ElementType;\n onClick: () => void;\n loading?: boolean;\n };\n search?: {\n placeholder: string;\n value: string;\n onChange: (v: string) => void;\n };\n onFilterClick?: () => void;\n loading?: boolean;\n /** Custom loading UI. Defaults to a centered spinner card. */\n loadingNode?: ReactNode;\n error?: {\n message: string;\n onRetry?: () => void;\n docsHref?: string;\n };\n empty?: {\n icon?: ElementType;\n title: string;\n description?: ReactNode;\n action?: { label: string; onClick: () => void };\n };\n children?: ReactNode;\n className?: string;\n}\n\nconst PageShell = forwardRef<HTMLElement, PageShellProps>(\n (\n {\n title,\n description,\n onTitleChange,\n primaryAction,\n search,\n onFilterClick,\n loading = false,\n loadingNode,\n error,\n empty,\n children,\n className,\n },\n ref,\n ) => {\n useEffect(() => {\n onTitleChange?.(title);\n }, [title, onTitleChange]);\n\n const hasActionBar =\n search !== undefined || primaryAction !== undefined || onFilterClick !== undefined;\n\n // State precedence: loading > error > empty > children\n let content: ReactNode;\n if (loading) {\n content = loadingNode ?? (\n <Card className=\"flex items-center justify-center gap-3 p-12 text-muted-foreground\">\n <Loader2 aria-hidden=\"true\" className=\"size-5 animate-spin\" />\n <span className=\"font-sans text-body-sm\">Loading…</span>\n </Card>\n );\n } else if (error) {\n content = (\n <Card className=\"flex flex-col items-center gap-3 p-8 text-center\">\n <AlertCircle aria-hidden=\"true\" className=\"size-8 text-destructive\" />\n <p className=\"font-sans text-body-sm text-foreground\">{error.message}</p>\n <div className=\"flex items-center gap-3\">\n {error.onRetry ? (\n <button\n type=\"button\"\n onClick={error.onRetry}\n className={cn(\n \"inline-flex items-center rounded-md border border-border/40 px-3 py-1.5\",\n \"font-sans text-body-sm text-foreground\",\n \"transition-colors hover:bg-muted\",\n )}\n >\n Retry\n </button>\n ) : null}\n {error.docsHref ? (\n <a\n href={error.docsHref}\n className=\"font-sans text-body-sm text-primary hover:underline\"\n >\n View docs\n </a>\n ) : null}\n </div>\n </Card>\n );\n } else if (empty) {\n const emptyAction = empty.action;\n content = (\n <EmptyState\n icon={empty.icon as Parameters<typeof EmptyState>[0][\"icon\"]}\n title={empty.title}\n description={empty.description}\n action={\n emptyAction ? (\n <button\n type=\"button\"\n onClick={emptyAction.onClick}\n className={cn(\n \"inline-flex items-center rounded-md bg-primary px-3 py-1.5\",\n \"font-medium font-sans text-body-sm text-primary-foreground\",\n \"transition-colors hover:bg-primary-deep\",\n )}\n >\n {emptyAction.label}\n </button>\n ) : undefined\n }\n />\n );\n } else {\n content = children;\n }\n\n return (\n <main\n ref={ref}\n aria-busy={loading || undefined}\n className={cn(\"flex flex-col gap-6\", className)}\n >\n <header className=\"flex flex-col gap-1\">\n <h1 className=\"font-display font-semibold text-display-sm text-foreground tracking-tight\">\n {title}\n </h1>\n {description ? (\n <p className=\"font-sans text-body-md text-muted-foreground\">{description}</p>\n ) : null}\n </header>\n {hasActionBar ? (\n <ActionBar search={search} primaryAction={primaryAction} onFilterClick={onFilterClick} />\n ) : null}\n <div>{content}</div>\n </main>\n );\n },\n);\nPageShell.displayName = \"PageShell\";\n\nexport { PageShell };\n"
22
+ "content": "\"use client\";\n\nimport { AlertCircle, Loader2 } from \"lucide-react\";\nimport { forwardRef, useEffect } from \"react\";\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { ActionBar } from \"@/components/ui/action-bar\";\nimport { Card } from \"@/components/ui/card\";\nimport { EmptyState } from \"@/components/ui/empty-state\";\n\n/**\n * PageShell — page-level scaffold composite.\n *\n * Renders title + optional description + optional ActionBar, then\n * one of four mutually-exclusive content states:\n * 1. loading (highest precedence)\n * 2. error\n * 3. empty\n * 4. children (default)\n *\n * Scope-narrowed per Brief #5 D3: PageShell does NOT manage\n * `document.title`. Use the optional `onTitleChange` callback to\n * wire your own hook (e.g. useSetPageTitle, react-helmet,\n * next/head).\n *\n * @example\n * <PageShell\n * title=\"Domains\"\n * description=\"Custom domains and DNS verification.\"\n * search={{ placeholder: \"Search…\", value: q, onChange: setQ }}\n * primaryAction={{ label: \"Add domain\", icon: Plus, onClick: openModal }}\n * loading={isLoading}\n * error={error ? { message: error.message, onRetry: refetch } : undefined}\n * empty={data?.length === 0 ? { title: \"No domains yet\" } : undefined}\n * >\n * <DataTable columns={…} data={data} />\n * </PageShell>\n */\nexport interface PageShellProps {\n title: string;\n description?: ReactNode;\n /** Optional callback invoked when `title` changes — wire to your own document.title hook. */\n onTitleChange?: (title: string) => void;\n primaryAction?: {\n label: ReactNode;\n icon?: ElementType;\n onClick: () => void;\n loading?: boolean;\n };\n search?: {\n placeholder: string;\n value: string;\n onChange: (v: string) => void;\n };\n onFilterClick?: () => void;\n loading?: boolean;\n /** Custom loading UI. Defaults to a centered spinner card. */\n loadingNode?: ReactNode;\n error?: {\n message: string;\n onRetry?: () => void;\n docsHref?: string;\n };\n empty?: {\n icon?: ElementType;\n title: string;\n description?: ReactNode;\n action?: { label: string; onClick: () => void };\n };\n children?: ReactNode;\n className?: string;\n}\n\nconst PageShell = forwardRef<HTMLElement, PageShellProps>(\n (\n {\n title,\n description,\n onTitleChange,\n primaryAction,\n search,\n onFilterClick,\n loading = false,\n loadingNode,\n error,\n empty,\n children,\n className,\n },\n ref,\n ) => {\n useEffect(() => {\n onTitleChange?.(title);\n }, [title, onTitleChange]);\n\n const hasActionBar =\n search !== undefined || primaryAction !== undefined || onFilterClick !== undefined;\n\n // State precedence: loading > error > empty > children\n let content: ReactNode;\n if (loading) {\n content = loadingNode ?? (\n <Card className=\"flex items-center justify-center gap-3 p-12 text-muted-foreground\">\n <Loader2 aria-hidden=\"true\" className=\"size-5 animate-spin\" />\n <span className=\"font-sans text-body-sm\">Loading…</span>\n </Card>\n );\n } else if (error) {\n content = (\n <Card className=\"flex flex-col items-center gap-3 p-8 text-center\">\n <AlertCircle aria-hidden=\"true\" className=\"size-8 text-destructive\" />\n <p className=\"font-sans text-body-sm text-foreground\">{error.message}</p>\n <div className=\"flex items-center gap-3\">\n {error.onRetry ? (\n <button\n type=\"button\"\n onClick={error.onRetry}\n className={cn(\n \"inline-flex items-center rounded-md border border-border/40 px-3 py-1.5\",\n \"font-sans text-body-sm text-foreground\",\n \"transition-colors hover:bg-muted\",\n )}\n >\n Retry\n </button>\n ) : null}\n {error.docsHref ? (\n <a\n href={error.docsHref}\n className=\"font-sans text-body-sm text-primary hover:underline\"\n >\n View docs\n </a>\n ) : null}\n </div>\n </Card>\n );\n } else if (empty) {\n const emptyAction = empty.action;\n content = (\n <EmptyState\n icon={empty.icon as Parameters<typeof EmptyState>[0][\"icon\"]}\n title={empty.title}\n description={empty.description}\n action={\n emptyAction ? (\n <button\n type=\"button\"\n onClick={emptyAction.onClick}\n className={cn(\n \"inline-flex items-center rounded-md bg-primary px-3 py-1.5\",\n \"font-medium font-sans text-body-sm text-primary-foreground\",\n \"transition-colors hover:bg-primary-deep\",\n )}\n >\n {emptyAction.label}\n </button>\n ) : undefined\n }\n />\n );\n } else {\n content = children;\n }\n\n return (\n <main\n data-slot=\"page-shell\"\n ref={ref}\n aria-busy={loading || undefined}\n className={cn(\"flex flex-col gap-6\", className)}\n >\n <header className=\"flex flex-col gap-1\">\n <h1 className=\"font-display font-semibold text-display-sm text-foreground tracking-tight\">\n {title}\n </h1>\n {description ? (\n <p className=\"font-sans text-body-md text-muted-foreground\">{description}</p>\n ) : null}\n </header>\n {hasActionBar ? (\n <ActionBar search={search} primaryAction={primaryAction} onFilterClick={onFilterClick} />\n ) : null}\n {/* Content slot: `flex flex-col gap-6` matches the outer <main> gap so\n * direct children (e.g. multiple <Card>s, a <Table>, an inline <Alert>)\n * automatically receive consistent section spacing. Without this,\n * pages with 2+ top-level children would render them flush against\n * each other — a regression observed in dashboard /memory landing\n * (5 sibling sections collided). Pages that already wrap their content\n * in a single grid/div are unaffected (gap only applies between siblings). */}\n <div className=\"flex flex-col gap-6\">{content}</div>\n </main>\n );\n },\n);\nPageShell.displayName = \"PageShell\";\n\nexport { PageShell };\n"
23
23
  }
24
24
  ]
25
25
  }
@@ -16,7 +16,7 @@
16
16
  "path": "components/primitives/pagination/pagination.tsx",
17
17
  "type": "registry:ui",
18
18
  "target": "components/ui/pagination.tsx",
19
- "content": "import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, KeyboardEvent } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Pagination — accessible page-number navigation primitive.\n *\n * Renders a `<nav aria-label=\"Pagination\">` containing a button group:\n * `[<<] [<] 1 ... 5 6 [7] 8 9 ... 42 [>] [>>]`. The active page carries\n * `aria-current=\"page\"`. Keyboard navigation (ArrowLeft / ArrowRight /\n * Home / End) is wired on the nav. Ellipses are rendered as\n * non-interactive `<span>` elements with `aria-hidden`.\n *\n * Renders nothing when `totalPages <= 1` (the page is the whole list).\n *\n * `siblingCount` controls how many neighbors of the current page are\n * always visible (default 1 → \"5 6 [7] 8 9\"). `showJumpButtons`\n * toggles the first/last `<<` / `>>` buttons.\n *\n * Consumers control state (`currentPage`) and are responsible for any\n * URL routing — the buttons are `<button>`, not `<a>`.\n *\n * @example\n * <Pagination\n * currentPage={page}\n * totalPages={42}\n * onPageChange={setPage}\n * />\n */\nexport interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\"> {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n /** Neighbors of current page that stay visible. Default 1. */\n siblingCount?: number;\n /** Render `<<` / `>>` first/last buttons. Default true. */\n showJumpButtons?: boolean;\n /** Size variant. Default md. */\n size?: \"sm\" | \"md\";\n}\n\n/**\n * Pure helper: compute the visible page-range with ellipses.\n * Exported for unit testing — most pagination bugs live here.\n */\nexport function computePageRange(\n currentPage: number,\n totalPages: number,\n siblingCount = 1,\n): Array<number | \"ellipsis-start\" | \"ellipsis-end\"> {\n if (totalPages <= 1) return [];\n\n // Always keep first + last + siblings around current.\n // Total \"core\" buttons: 1 + (siblingCount * 2 + 1) + 1 = siblingCount * 2 + 3.\n // Plus possibly 2 ellipsis placeholders → max visible = siblingCount * 2 + 5.\n const totalNumbers = siblingCount * 2 + 3;\n const totalWithEdges = totalNumbers + 2;\n\n if (totalPages <= totalWithEdges) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const leftSibling = Math.max(currentPage - siblingCount, 1);\n const rightSibling = Math.min(currentPage + siblingCount, totalPages);\n\n const showLeftEllipsis = leftSibling > 2;\n const showRightEllipsis = rightSibling < totalPages - 1;\n\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRangeEnd = 1 + (siblingCount * 2 + 2);\n const leftRange = Array.from({ length: leftRangeEnd }, (_, i) => i + 1);\n return [...leftRange, \"ellipsis-end\", totalPages];\n }\n\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightStart = totalPages - (siblingCount * 2 + 2);\n const rightRange = Array.from(\n { length: totalPages - rightStart + 1 },\n (_, i) => rightStart + i,\n );\n return [1, \"ellipsis-start\", ...rightRange];\n }\n\n // Both sides need ellipsis.\n const middleRange = Array.from(\n { length: rightSibling - leftSibling + 1 },\n (_, i) => leftSibling + i,\n );\n return [1, \"ellipsis-start\", ...middleRange, \"ellipsis-end\", totalPages];\n}\n\nconst SIZE: Record<NonNullable<PaginationProps[\"size\"]>, string> = {\n sm: \"size-7 text-label\",\n md: \"size-8 text-body-sm\",\n};\n\nconst ICON_SIZE: Record<NonNullable<PaginationProps[\"size\"]>, string> = {\n sm: \"size-3\",\n md: \"size-3.5\",\n};\n\nconst Pagination = forwardRef<HTMLElement, PaginationProps>(\n (\n {\n className,\n currentPage,\n totalPages,\n onPageChange,\n siblingCount = 1,\n showJumpButtons = true,\n size = \"md\",\n ...props\n },\n ref,\n ) => {\n if (totalPages <= 1) {\n return null;\n }\n\n const range = computePageRange(currentPage, totalPages, siblingCount);\n const prevDisabled = currentPage <= 1;\n const nextDisabled = currentPage >= totalPages;\n const sizeClass = SIZE[size];\n const iconClass = ICON_SIZE[size];\n\n const buttonBase = cn(\n \"inline-flex items-center justify-center rounded-md font-mono tabular-nums\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n sizeClass,\n );\n\n function go(page: number) {\n const clamped = Math.max(1, Math.min(totalPages, page));\n if (clamped !== currentPage) onPageChange(clamped);\n }\n\n function handleKeyDown(e: KeyboardEvent<HTMLElement>) {\n if (e.key === \"ArrowLeft\") {\n e.preventDefault();\n go(currentPage - 1);\n } else if (e.key === \"ArrowRight\") {\n e.preventDefault();\n go(currentPage + 1);\n } else if (e.key === \"Home\") {\n e.preventDefault();\n go(1);\n } else if (e.key === \"End\") {\n e.preventDefault();\n go(totalPages);\n }\n }\n\n return (\n <nav\n ref={ref}\n aria-label=\"Pagination\"\n onKeyDown={handleKeyDown}\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n >\n {showJumpButtons ? (\n <button\n type=\"button\"\n onClick={() => go(1)}\n disabled={prevDisabled}\n aria-label=\"Go to first page\"\n aria-disabled={prevDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n prevDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronsLeft aria-hidden=\"true\" className={iconClass} />\n </button>\n ) : null}\n <button\n type=\"button\"\n onClick={() => go(currentPage - 1)}\n disabled={prevDisabled}\n aria-label=\"Go to previous page\"\n aria-disabled={prevDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n prevDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronLeft aria-hidden=\"true\" className={iconClass} />\n </button>\n {range.map((item) => {\n if (item === \"ellipsis-start\" || item === \"ellipsis-end\") {\n return (\n <span\n key={item}\n aria-hidden=\"true\"\n className={cn(\n \"inline-flex items-center justify-center text-muted-foreground\",\n sizeClass,\n )}\n >\n …\n </span>\n );\n }\n const isActive = item === currentPage;\n return (\n <button\n key={item}\n type=\"button\"\n onClick={() => go(item)}\n aria-label={`Go to page ${item}`}\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonBase,\n isActive\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"text-foreground hover:bg-muted\",\n )}\n >\n {item}\n </button>\n );\n })}\n <button\n type=\"button\"\n onClick={() => go(currentPage + 1)}\n disabled={nextDisabled}\n aria-label=\"Go to next page\"\n aria-disabled={nextDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n nextDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronRight aria-hidden=\"true\" className={iconClass} />\n </button>\n {showJumpButtons ? (\n <button\n type=\"button\"\n onClick={() => go(totalPages)}\n disabled={nextDisabled}\n aria-label=\"Go to last page\"\n aria-disabled={nextDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n nextDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronsRight aria-hidden=\"true\" className={iconClass} />\n </button>\n ) : null}\n </nav>\n );\n },\n);\nPagination.displayName = \"Pagination\";\n\nexport { Pagination };\n"
19
+ "content": "import { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, KeyboardEvent } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Pagination — accessible page-number navigation primitive.\n *\n * Renders a `<nav aria-label=\"Pagination\">` containing a button group:\n * `[<<] [<] 1 ... 5 6 [7] 8 9 ... 42 [>] [>>]`. The active page carries\n * `aria-current=\"page\"`. Keyboard navigation (ArrowLeft / ArrowRight /\n * Home / End) is wired on the nav. Ellipses are rendered as\n * non-interactive `<span>` elements with `aria-hidden`.\n *\n * Renders nothing when `totalPages <= 1` (the page is the whole list).\n *\n * `siblingCount` controls how many neighbors of the current page are\n * always visible (default 1 → \"5 6 [7] 8 9\"). `showJumpButtons`\n * toggles the first/last `<<` / `>>` buttons.\n *\n * Consumers control state (`currentPage`) and are responsible for any\n * URL routing — the buttons are `<button>`, not `<a>`.\n *\n * @example\n * <Pagination\n * currentPage={page}\n * totalPages={42}\n * onPageChange={setPage}\n * />\n */\nexport interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, \"onChange\"> {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n /** Neighbors of current page that stay visible. Default 1. */\n siblingCount?: number;\n /** Render `<<` / `>>` first/last buttons. Default true. */\n showJumpButtons?: boolean;\n /** Size variant. Default md. */\n size?: \"sm\" | \"md\";\n}\n\n/**\n * Pure helper: compute the visible page-range with ellipses.\n * Exported for unit testing — most pagination bugs live here.\n */\nexport function computePageRange(\n currentPage: number,\n totalPages: number,\n siblingCount = 1,\n): Array<number | \"ellipsis-start\" | \"ellipsis-end\"> {\n if (totalPages <= 1) return [];\n\n // Always keep first + last + siblings around current.\n // Total \"core\" buttons: 1 + (siblingCount * 2 + 1) + 1 = siblingCount * 2 + 3.\n // Plus possibly 2 ellipsis placeholders → max visible = siblingCount * 2 + 5.\n const totalNumbers = siblingCount * 2 + 3;\n const totalWithEdges = totalNumbers + 2;\n\n if (totalPages <= totalWithEdges) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const leftSibling = Math.max(currentPage - siblingCount, 1);\n const rightSibling = Math.min(currentPage + siblingCount, totalPages);\n\n const showLeftEllipsis = leftSibling > 2;\n const showRightEllipsis = rightSibling < totalPages - 1;\n\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRangeEnd = 1 + (siblingCount * 2 + 2);\n const leftRange = Array.from({ length: leftRangeEnd }, (_, i) => i + 1);\n return [...leftRange, \"ellipsis-end\", totalPages];\n }\n\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightStart = totalPages - (siblingCount * 2 + 2);\n const rightRange = Array.from(\n { length: totalPages - rightStart + 1 },\n (_, i) => rightStart + i,\n );\n return [1, \"ellipsis-start\", ...rightRange];\n }\n\n // Both sides need ellipsis.\n const middleRange = Array.from(\n { length: rightSibling - leftSibling + 1 },\n (_, i) => leftSibling + i,\n );\n return [1, \"ellipsis-start\", ...middleRange, \"ellipsis-end\", totalPages];\n}\n\nconst SIZE: Record<NonNullable<PaginationProps[\"size\"]>, string> = {\n sm: \"size-7 text-label\",\n md: \"size-8 text-body-sm\",\n};\n\nconst ICON_SIZE: Record<NonNullable<PaginationProps[\"size\"]>, string> = {\n sm: \"size-3\",\n md: \"size-3.5\",\n};\n\nconst Pagination = forwardRef<HTMLElement, PaginationProps>(\n (\n {\n className,\n currentPage,\n totalPages,\n onPageChange,\n siblingCount = 1,\n showJumpButtons = true,\n size = \"md\",\n ...props\n },\n ref,\n ) => {\n if (totalPages <= 1) {\n return null;\n }\n\n const range = computePageRange(currentPage, totalPages, siblingCount);\n const prevDisabled = currentPage <= 1;\n const nextDisabled = currentPage >= totalPages;\n const sizeClass = SIZE[size];\n const iconClass = ICON_SIZE[size];\n\n const buttonBase = cn(\n \"inline-flex items-center justify-center rounded-md font-mono tabular-nums\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n sizeClass,\n );\n\n function go(page: number) {\n const clamped = Math.max(1, Math.min(totalPages, page));\n if (clamped !== currentPage) onPageChange(clamped);\n }\n\n function handleKeyDown(e: KeyboardEvent<HTMLElement>) {\n if (e.key === \"ArrowLeft\") {\n e.preventDefault();\n go(currentPage - 1);\n } else if (e.key === \"ArrowRight\") {\n e.preventDefault();\n go(currentPage + 1);\n } else if (e.key === \"Home\") {\n e.preventDefault();\n go(1);\n } else if (e.key === \"End\") {\n e.preventDefault();\n go(totalPages);\n }\n }\n\n return (\n <nav\n data-slot=\"pagination\"\n ref={ref}\n aria-label=\"Pagination\"\n onKeyDown={handleKeyDown}\n className={cn(\"flex items-center gap-1\", className)}\n {...props}\n >\n {showJumpButtons ? (\n <button\n type=\"button\"\n onClick={() => go(1)}\n disabled={prevDisabled}\n aria-label=\"Go to first page\"\n aria-disabled={prevDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n prevDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronsLeft aria-hidden=\"true\" className={iconClass} />\n </button>\n ) : null}\n <button\n type=\"button\"\n onClick={() => go(currentPage - 1)}\n disabled={prevDisabled}\n aria-label=\"Go to previous page\"\n aria-disabled={prevDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n prevDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronLeft aria-hidden=\"true\" className={iconClass} />\n </button>\n {range.map((item) => {\n if (item === \"ellipsis-start\" || item === \"ellipsis-end\") {\n return (\n <span\n key={item}\n aria-hidden=\"true\"\n className={cn(\n \"inline-flex items-center justify-center text-muted-foreground\",\n sizeClass,\n )}\n >\n …\n </span>\n );\n }\n const isActive = item === currentPage;\n return (\n <button\n key={item}\n type=\"button\"\n onClick={() => go(item)}\n aria-label={`Go to page ${item}`}\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonBase,\n isActive\n ? \"bg-primary text-primary-foreground hover:bg-primary\"\n : \"text-foreground hover:bg-muted\",\n )}\n >\n {item}\n </button>\n );\n })}\n <button\n type=\"button\"\n onClick={() => go(currentPage + 1)}\n disabled={nextDisabled}\n aria-label=\"Go to next page\"\n aria-disabled={nextDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n nextDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronRight aria-hidden=\"true\" className={iconClass} />\n </button>\n {showJumpButtons ? (\n <button\n type=\"button\"\n onClick={() => go(totalPages)}\n disabled={nextDisabled}\n aria-label=\"Go to last page\"\n aria-disabled={nextDisabled || undefined}\n className={cn(\n buttonBase,\n \"text-foreground hover:bg-muted\",\n nextDisabled && \"cursor-not-allowed opacity-40 hover:bg-transparent\",\n )}\n >\n <ChevronsRight aria-hidden=\"true\" className={iconClass} />\n </button>\n ) : null}\n </nav>\n );\n },\n);\nPagination.displayName = \"Pagination\";\n\nexport { Pagination };\n"
20
20
  }
21
21
  ]
22
22
  }
@@ -16,7 +16,7 @@
16
16
  "path": "components/primitives/permission-matrix/permission-matrix.tsx",
17
17
  "type": "registry:ui",
18
18
  "target": "components/ui/permission-matrix.tsx",
19
- "content": "import { Check, Lock, Plus, ShieldQuestion, Trash2 } from \"lucide-react\";\nimport { forwardRef, useState } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport type PermissionDecisionKind = \"allow\" | \"ask\" | \"deny\";\n\nexport interface PermissionRule {\n id: string;\n /** Tool the rule applies to. Use \"*\" for any. */\n tool: string;\n /** Glob path it applies to. Use \"*\" for any. */\n path: string;\n decision: PermissionDecisionKind;\n /** Optional rationale shown as helper text. */\n note?: string;\n}\n\ninterface PermissionMatrixProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n rules: PermissionRule[];\n title?: ReactNode;\n /**\n * Available tools shown in the add form. Pass `undefined` (or omit) — or an\n * empty array — to hide the add form entirely. The form only renders when\n * `onAdd` is provided AND `toolOptions` has at least one entry.\n */\n toolOptions?: string[];\n onAdd?: (rule: Omit<PermissionRule, \"id\">) => void;\n onRemove?: (id: string) => void;\n onDecisionChange?: (id: string, decision: PermissionDecisionKind) => void;\n}\n\nconst DECISION_CLASS: Record<PermissionDecisionKind, string> = {\n allow: \"bg-success/15 text-success border-success/40\",\n ask: \"bg-warning/15 text-warning border-warning/40\",\n deny: \"bg-destructive/15 text-destructive border-destructive/40\",\n};\n\nconst DECISION_ICON: Record<PermissionDecisionKind, ReactNode> = {\n allow: <Check className=\"size-3\" aria-hidden=\"true\" />,\n ask: <ShieldQuestion className=\"size-3\" aria-hidden=\"true\" />,\n deny: <Lock className=\"size-3\" aria-hidden=\"true\" />,\n};\n\nconst cycle = (cur: PermissionDecisionKind): PermissionDecisionKind =>\n cur === \"allow\" ? \"ask\" : cur === \"ask\" ? \"deny\" : \"allow\";\n\n/**\n * PermissionMatrix — tool × path × decision grid for fine-grained access\n * control. Used as the \"permissions\" tab in the agent settings.\n *\n * One PermissionRule per row. Click the decision pill to cycle Allow → Ask → Deny.\n *\n * Design decision (2026-05-14): PermissionMatrix stays in `primitives/`\n * — not `composites/` — even though it renders inputs and a select. The native\n * `<input>` / `<select>` elements use Theo design tokens directly (border-input,\n * ring, font-mono) so visual parity with `Input` / `Select` primitives is\n * preserved. Reason for keeping it primitive: a consumer installing\n * `permission-matrix` from the registry gets a single self-contained file with\n * no transitive Theo dependencies — opposite trade-off from `EnvVarEditor`\n * which is intentionally a composite. Both shapes are valid; we ship one of\n * each so consumers can pick the dependency profile that fits their app.\n */\nconst PermissionMatrix = forwardRef<HTMLDivElement, PermissionMatrixProps>(\n (\n {\n className,\n rules,\n title = \"Permissions\",\n toolOptions,\n onAdd,\n onRemove,\n onDecisionChange,\n ...props\n },\n ref,\n ) => {\n const [newTool, setNewTool] = useState(toolOptions?.[0] ?? \"*\");\n const [newPath, setNewPath] = useState(\"\");\n const [newDecision, setNewDecision] = useState<PermissionDecisionKind>(\"ask\");\n\n const submit = () => {\n if (!newPath.trim()) return;\n onAdd?.({ tool: newTool, path: newPath.trim(), decision: newDecision });\n setNewPath(\"\");\n };\n\n return (\n <section ref={ref} className={cn(\"rounded-xl border bg-card\", className)} {...props}>\n {title ? (\n <header className=\"flex items-baseline justify-between border-border/40 border-b px-4 py-3\">\n <h3 className=\"font-display text-title-md tracking-tight\">{title}</h3>\n <span className=\"font-mono text-label text-muted-foreground\">\n {rules.length} {rules.length === 1 ? \"rule\" : \"rules\"}\n </span>\n </header>\n ) : null}\n\n {onAdd && toolOptions && toolOptions.length > 0 ? (\n <form\n className=\"grid grid-cols-[1fr_2fr_auto_auto] gap-2 border-border/40 border-b p-3\"\n onSubmit={(e) => {\n e.preventDefault();\n submit();\n }}\n >\n <select\n value={newTool}\n onChange={(e) => setNewTool(e.target.value)}\n aria-label=\"Tool\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm\"\n >\n <option value=\"*\">* (any tool)</option>\n {toolOptions.map((t) => (\n <option key={t} value={t}>\n {t}\n </option>\n ))}\n </select>\n <input\n type=\"text\"\n value={newPath}\n onChange={(e) => setNewPath(e.target.value)}\n placeholder=\"path glob (e.g. src/**/*.ts)\"\n aria-label=\"Path\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n />\n <select\n value={newDecision}\n onChange={(e) => setNewDecision(e.target.value as PermissionDecisionKind)}\n aria-label=\"Decision\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm uppercase\"\n >\n <option value=\"allow\">allow</option>\n <option value=\"ask\">ask</option>\n <option value=\"deny\">deny</option>\n </select>\n <button\n type=\"submit\"\n className=\"inline-flex h-9 items-center gap-1 rounded-md bg-primary px-3 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\" /> Add\n </button>\n </form>\n ) : null}\n\n <ul className=\"divide-y divide-border/30\">\n {rules.map((rule) => (\n <li\n key={rule.id}\n className=\"grid grid-cols-[1fr_2fr_auto_auto] items-center gap-3 px-4 py-2.5\"\n >\n <span className=\"truncate font-mono text-code-sm text-foreground\">{rule.tool}</span>\n <span className=\"truncate font-mono text-code-sm text-muted-foreground\">\n {rule.path}\n </span>\n <button\n type=\"button\"\n onClick={() => onDecisionChange?.(rule.id, cycle(rule.decision))}\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1\",\n \"font-mono text-label uppercase tracking-wider transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n DECISION_CLASS[rule.decision],\n !onDecisionChange && \"pointer-events-none\",\n )}\n >\n {DECISION_ICON[rule.decision]}\n {rule.decision}\n </button>\n {onRemove ? (\n <button\n type=\"button\"\n onClick={() => onRemove(rule.id)}\n aria-label={`Remove rule ${rule.tool} ${rule.path}`}\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 </li>\n ))}\n {rules.length === 0 ? (\n <li className=\"px-4 py-8 text-center font-sans text-body-sm text-muted-foreground\">\n No permission rules configured. The agent will fall back to default policy.\n </li>\n ) : null}\n </ul>\n </section>\n );\n },\n);\nPermissionMatrix.displayName = \"PermissionMatrix\";\n\nexport { PermissionMatrix };\n"
19
+ "content": "\"use client\";\n\nimport { Check, Lock, Plus, ShieldQuestion, Trash2 } from \"lucide-react\";\nimport { forwardRef, useState } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\nexport type PermissionDecisionKind = \"allow\" | \"ask\" | \"deny\";\n\nexport interface PermissionRule {\n id: string;\n /** Tool the rule applies to. Use \"*\" for any. */\n tool: string;\n /** Glob path it applies to. Use \"*\" for any. */\n path: string;\n decision: PermissionDecisionKind;\n /** Optional rationale shown as helper text. */\n note?: string;\n}\n\ninterface PermissionMatrixProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n rules: PermissionRule[];\n title?: ReactNode;\n /**\n * Available tools shown in the add form. Pass `undefined` (or omit) — or an\n * empty array — to hide the add form entirely. The form only renders when\n * `onAdd` is provided AND `toolOptions` has at least one entry.\n */\n toolOptions?: string[];\n onAdd?: (rule: Omit<PermissionRule, \"id\">) => void;\n onRemove?: (id: string) => void;\n onDecisionChange?: (id: string, decision: PermissionDecisionKind) => void;\n}\n\nconst DECISION_CLASS: Record<PermissionDecisionKind, string> = {\n allow: \"bg-success/15 text-success border-success/40\",\n ask: \"bg-warning/15 text-warning border-warning/40\",\n deny: \"bg-destructive/15 text-destructive border-destructive/40\",\n};\n\nconst DECISION_ICON: Record<PermissionDecisionKind, ReactNode> = {\n allow: <Check className=\"size-3\" aria-hidden=\"true\" />,\n ask: <ShieldQuestion className=\"size-3\" aria-hidden=\"true\" />,\n deny: <Lock className=\"size-3\" aria-hidden=\"true\" />,\n};\n\nconst cycle = (cur: PermissionDecisionKind): PermissionDecisionKind =>\n cur === \"allow\" ? \"ask\" : cur === \"ask\" ? \"deny\" : \"allow\";\n\n/**\n * PermissionMatrix — tool × path × decision grid for fine-grained access\n * control. Used as the \"permissions\" tab in the agent settings.\n *\n * One PermissionRule per row. Click the decision pill to cycle Allow → Ask → Deny.\n *\n * Design decision (2026-05-14): PermissionMatrix stays in `primitives/`\n * — not `composites/` — even though it renders inputs and a select. The native\n * `<input>` / `<select>` elements use Theo design tokens directly (border-input,\n * ring, font-mono) so visual parity with `Input` / `Select` primitives is\n * preserved. Reason for keeping it primitive: a consumer installing\n * `permission-matrix` from the registry gets a single self-contained file with\n * no transitive Theo dependencies — opposite trade-off from `EnvVarEditor`\n * which is intentionally a composite. Both shapes are valid; we ship one of\n * each so consumers can pick the dependency profile that fits their app.\n */\nconst PermissionMatrix = forwardRef<HTMLDivElement, PermissionMatrixProps>(\n (\n {\n className,\n rules,\n title = \"Permissions\",\n toolOptions,\n onAdd,\n onRemove,\n onDecisionChange,\n ...props\n },\n ref,\n ) => {\n const [newTool, setNewTool] = useState(toolOptions?.[0] ?? \"*\");\n const [newPath, setNewPath] = useState(\"\");\n const [newDecision, setNewDecision] = useState<PermissionDecisionKind>(\"ask\");\n\n const submit = () => {\n if (!newPath.trim()) return;\n onAdd?.({ tool: newTool, path: newPath.trim(), decision: newDecision });\n setNewPath(\"\");\n };\n\n return (\n <section\n data-slot=\"permission-matrix\"\n ref={ref}\n className={cn(\"rounded-xl border bg-card\", className)}\n {...props}\n >\n {title ? (\n <header className=\"flex items-baseline justify-between border-border/40 border-b px-4 py-3\">\n <h3 className=\"font-display text-title-md tracking-tight\">{title}</h3>\n <span className=\"font-mono text-label text-muted-foreground\">\n {rules.length} {rules.length === 1 ? \"rule\" : \"rules\"}\n </span>\n </header>\n ) : null}\n\n {onAdd && toolOptions && toolOptions.length > 0 ? (\n <form\n className=\"grid grid-cols-[1fr_2fr_auto_auto] gap-2 border-border/40 border-b p-3\"\n onSubmit={(e) => {\n e.preventDefault();\n submit();\n }}\n >\n <select\n value={newTool}\n onChange={(e) => setNewTool(e.target.value)}\n aria-label=\"Tool\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm\"\n >\n <option value=\"*\">* (any tool)</option>\n {toolOptions.map((t) => (\n <option key={t} value={t}>\n {t}\n </option>\n ))}\n </select>\n <input\n type=\"text\"\n value={newPath}\n onChange={(e) => setNewPath(e.target.value)}\n placeholder=\"path glob (e.g. src/**/*.ts)\"\n aria-label=\"Path\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n />\n <select\n value={newDecision}\n onChange={(e) => setNewDecision(e.target.value as PermissionDecisionKind)}\n aria-label=\"Decision\"\n className=\"h-9 rounded-md border border-input bg-card px-2 font-mono text-code-sm uppercase\"\n >\n <option value=\"allow\">allow</option>\n <option value=\"ask\">ask</option>\n <option value=\"deny\">deny</option>\n </select>\n <button\n type=\"submit\"\n className=\"inline-flex h-9 items-center gap-1 rounded-md bg-primary px-3 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\" /> Add\n </button>\n </form>\n ) : null}\n\n <ul className=\"divide-y divide-border/30\">\n {rules.map((rule) => (\n <li\n key={rule.id}\n className=\"grid grid-cols-[1fr_2fr_auto_auto] items-center gap-3 px-4 py-2.5\"\n >\n <span className=\"truncate font-mono text-code-sm text-foreground\">{rule.tool}</span>\n <span className=\"truncate font-mono text-code-sm text-muted-foreground\">\n {rule.path}\n </span>\n <button\n type=\"button\"\n onClick={() => onDecisionChange?.(rule.id, cycle(rule.decision))}\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1\",\n \"font-mono text-label uppercase tracking-wider transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n DECISION_CLASS[rule.decision],\n !onDecisionChange && \"pointer-events-none\",\n )}\n >\n {DECISION_ICON[rule.decision]}\n {rule.decision}\n </button>\n {onRemove ? (\n <button\n type=\"button\"\n onClick={() => onRemove(rule.id)}\n aria-label={`Remove rule ${rule.tool} ${rule.path}`}\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 </li>\n ))}\n {rules.length === 0 ? (\n <li className=\"px-4 py-8 text-center font-sans text-body-sm text-muted-foreground\">\n No permission rules configured. The agent will fall back to default policy.\n </li>\n ) : null}\n </ul>\n </section>\n );\n },\n);\nPermissionMatrix.displayName = \"PermissionMatrix\";\n\nexport { PermissionMatrix };\n"
20
20
  }
21
21
  ]
22
22
  }
@@ -18,7 +18,7 @@
18
18
  "path": "components/composites/permission-modal/permission-modal.tsx",
19
19
  "type": "registry:ui",
20
20
  "target": "components/ui/permission-modal.tsx",
21
- "content": "import { AlertTriangle, FolderOpen, ShieldAlert } from \"lucide-react\";\nimport { useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type {\n PermissionDecision,\n PermissionOperation,\n PermissionRequest,\n} from \"@/types/permission\";\nimport { Button } from \"@/components/ui/button\";\nimport { Dialog } from \"@/components/ui/dialog\";\n\n/**\n * Friendly operation labels used by the default copy. Override with the\n * `operationLabels` prop to localize or rephrase per project.\n */\nexport const defaultOperationLabels: Record<PermissionOperation, string> = {\n read: \"read\",\n write: \"edit\",\n delete: \"permanently delete\",\n};\n\ninterface PermissionModalLabels {\n /** \"Cancel\" button. */\n cancel: ReactNode;\n /** \"Always allow\" tertiary button. */\n always: ReactNode;\n /** \"Allow once\" primary button. */\n allow: ReactNode;\n /** Inline label rendered before the operation list inside the body card. */\n requestedOps: ReactNode;\n}\n\nconst defaultLabels: PermissionModalLabels = {\n cancel: \"Cancel\",\n always: \"Always allow\",\n allow: \"Allow once\",\n requestedOps: \"Requested operations:\",\n};\n\ninterface PermissionModalProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n request: PermissionRequest;\n /**\n * Fires when the user picks a decision. The modal does NOT auto-close;\n * caller decides whether the decision should dismiss the modal.\n */\n onDecide: (decision: PermissionDecision) => void;\n /** Override the modal title. Defaults to \"Allow Theo to {ops} files in {path}?\". */\n title?: ReactNode;\n /** Override the modal description (body lead text). */\n description?: ReactNode;\n /** Override the verb used for each operation in the default copy. */\n operationLabels?: Partial<Record<PermissionOperation, string>>;\n /** Override button text + inline labels. Useful for i18n. */\n labels?: Partial<PermissionModalLabels>;\n}\n\n/**\n * PermissionModal — local-files access prompt built on Dialog.\n *\n * Three actions: Cancel (denied), Always allow, Allow once. Per WIREMOCKS §5,\n * the path is shown in the title (not hidden in body) and destructive\n * operations are listed inline.\n *\n * All visible text can be overridden via `title`, `description`,\n * `operationLabels`, and `labels`. Defaults are English; pass overrides for\n * other locales.\n */\nfunction PermissionModal({\n open,\n onOpenChange,\n request,\n onDecide,\n title,\n description,\n operationLabels,\n labels,\n}: PermissionModalProps) {\n const opLabels = { ...defaultOperationLabels, ...operationLabels };\n const opsList = request.operations.map((op) => opLabels[op]).join(\", \");\n const text = { ...defaultLabels, ...labels };\n\n // T4.4 (Code Issue 4): Esc / overlay-click previously fired onOpenChange(false)\n // but never onDecide — users saw \"Cancel\" semantics, app saw silent dismissal.\n // Track whether an explicit button decision happened; if the dialog closes\n // without one, treat it as denied. decidedRef must reset on every fresh open\n // so a rapid close-then-open doesn't carry state forward.\n const decidedRef = useRef(false);\n function handleDecide(decision: PermissionDecision) {\n decidedRef.current = true;\n onDecide(decision);\n }\n function handleOpenChange(next: boolean) {\n const wasDecided = decidedRef.current;\n // Reset BEFORE invoking onDecide so a re-open within the same tick starts\n // clean. Edge case from SF-6: rapid toggle could leave decidedRef=true.\n decidedRef.current = false;\n if (!next && !wasDecided) {\n onDecide(\"denied\");\n }\n onOpenChange(next);\n }\n\n const defaultTitle = (\n <span className=\"flex items-center gap-2\">\n <ShieldAlert className=\"size-5 text-warning\" aria-hidden=\"true\" />\n Allow Theo to {opsList} files in{\" \"}\n <code className=\"rounded-md bg-muted px-1.5 py-0.5 font-mono text-code-md text-primary\">\n {request.path}\n </code>\n ?\n </span>\n );\n\n const defaultDescription = (\n <>\n This includes all files and subfolders. Theo will be able to {opsList} and may share the\n contents with connected third-party tools. Be careful when exposing confidential information.\n </>\n );\n\n return (\n <Dialog open={open} onOpenChange={handleOpenChange}>\n <Dialog.Content className=\"max-w-xl\">\n <Dialog.Header>\n <Dialog.Title>{title ?? defaultTitle}</Dialog.Title>\n <Dialog.Description>{description ?? defaultDescription}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n <div className=\"flex items-start gap-3 rounded-md border border-border/40 bg-muted/40 p-3\">\n <FolderOpen\n className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <div className=\"grid gap-1\">\n <p className=\"font-mono text-code-sm text-foreground\">{request.path}</p>\n <p className=\"flex items-center gap-1.5 font-sans text-label text-warning\">\n <AlertTriangle className=\"size-3\" aria-hidden=\"true\" />\n {text.requestedOps} {opsList}\n </p>\n </div>\n </div>\n </Dialog.Body>\n <Dialog.Footer>\n <Button variant=\"secondary\" onClick={() => handleDecide(\"denied\")}>\n {text.cancel}\n </Button>\n <Button variant=\"ghost\" onClick={() => handleDecide(\"always_allowed\")}>\n {text.always}\n </Button>\n <Button onClick={() => handleDecide(\"allowed_once\")}>{text.allow}</Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n );\n}\n\nexport { PermissionModal };\n"
21
+ "content": "\"use client\";\n\nimport { AlertTriangle, FolderOpen, ShieldAlert } from \"lucide-react\";\nimport { useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type {\n PermissionDecision,\n PermissionOperation,\n PermissionRequest,\n} from \"@/types/permission\";\nimport { Button } from \"@/components/ui/button\";\nimport { Dialog } from \"@/components/ui/dialog\";\n\n/**\n * Friendly operation labels used by the default copy. Override with the\n * `operationLabels` prop to localize or rephrase per project.\n */\nexport const defaultOperationLabels: Record<PermissionOperation, string> = {\n read: \"read\",\n write: \"edit\",\n delete: \"permanently delete\",\n};\n\ninterface PermissionModalLabels {\n /** \"Cancel\" button. */\n cancel: ReactNode;\n /** \"Always allow\" tertiary button. */\n always: ReactNode;\n /** \"Allow once\" primary button. */\n allow: ReactNode;\n /** Inline label rendered before the operation list inside the body card. */\n requestedOps: ReactNode;\n}\n\nconst defaultLabels: PermissionModalLabels = {\n cancel: \"Cancel\",\n always: \"Always allow\",\n allow: \"Allow once\",\n requestedOps: \"Requested operations:\",\n};\n\ninterface PermissionModalProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n request: PermissionRequest;\n /**\n * Fires when the user picks a decision. The modal does NOT auto-close;\n * caller decides whether the decision should dismiss the modal.\n */\n onDecide: (decision: PermissionDecision) => void;\n /** Override the modal title. Defaults to \"Allow Theo to {ops} files in {path}?\". */\n title?: ReactNode;\n /** Override the modal description (body lead text). */\n description?: ReactNode;\n /** Override the verb used for each operation in the default copy. */\n operationLabels?: Partial<Record<PermissionOperation, string>>;\n /** Override button text + inline labels. Useful for i18n. */\n labels?: Partial<PermissionModalLabels>;\n}\n\n/**\n * PermissionModal — local-files access prompt built on Dialog.\n *\n * Three actions: Cancel (denied), Always allow, Allow once. Per WIREMOCKS §5,\n * the path is shown in the title (not hidden in body) and destructive\n * operations are listed inline.\n *\n * All visible text can be overridden via `title`, `description`,\n * `operationLabels`, and `labels`. Defaults are English; pass overrides for\n * other locales.\n */\nfunction PermissionModal({\n open,\n onOpenChange,\n request,\n onDecide,\n title,\n description,\n operationLabels,\n labels,\n}: PermissionModalProps) {\n const opLabels = { ...defaultOperationLabels, ...operationLabels };\n const opsList = request.operations.map((op) => opLabels[op]).join(\", \");\n const text = { ...defaultLabels, ...labels };\n\n // T4.4 (Code Issue 4): Esc / overlay-click previously fired onOpenChange(false)\n // but never onDecide — users saw \"Cancel\" semantics, app saw silent dismissal.\n // Track whether an explicit button decision happened; if the dialog closes\n // without one, treat it as denied. decidedRef must reset on every fresh open\n // so a rapid close-then-open doesn't carry state forward.\n const decidedRef = useRef(false);\n function handleDecide(decision: PermissionDecision) {\n decidedRef.current = true;\n onDecide(decision);\n }\n function handleOpenChange(next: boolean) {\n const wasDecided = decidedRef.current;\n // Reset BEFORE invoking onDecide so a re-open within the same tick starts\n // clean. Edge case from SF-6: rapid toggle could leave decidedRef=true.\n decidedRef.current = false;\n if (!next && !wasDecided) {\n onDecide(\"denied\");\n }\n onOpenChange(next);\n }\n\n const defaultTitle = (\n <span className=\"flex items-center gap-2\">\n <ShieldAlert className=\"size-5 text-warning\" aria-hidden=\"true\" />\n Allow Theo to {opsList} files in{\" \"}\n <code className=\"rounded-md bg-muted px-1.5 py-0.5 font-mono text-code-md text-primary\">\n {request.path}\n </code>\n ?\n </span>\n );\n\n const defaultDescription = (\n <>\n This includes all files and subfolders. Theo will be able to {opsList} and may share the\n contents with connected third-party tools. Be careful when exposing confidential information.\n </>\n );\n\n return (\n <Dialog data-slot=\"permission-modal\" open={open} onOpenChange={handleOpenChange}>\n <Dialog.Content className=\"max-w-xl\">\n <Dialog.Header>\n <Dialog.Title>{title ?? defaultTitle}</Dialog.Title>\n <Dialog.Description>{description ?? defaultDescription}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n <div className=\"flex items-start gap-3 rounded-md border border-border/40 bg-muted/40 p-3\">\n <FolderOpen\n className=\"mt-0.5 size-4 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <div className=\"grid gap-1\">\n <p className=\"font-mono text-code-sm text-foreground\">{request.path}</p>\n <p className=\"flex items-center gap-1.5 font-sans text-label text-warning\">\n <AlertTriangle className=\"size-3\" aria-hidden=\"true\" />\n {text.requestedOps} {opsList}\n </p>\n </div>\n </div>\n </Dialog.Body>\n <Dialog.Footer>\n <Button variant=\"secondary\" onClick={() => handleDecide(\"denied\")}>\n {text.cancel}\n </Button>\n <Button variant=\"ghost\" onClick={() => handleDecide(\"always_allowed\")}>\n {text.always}\n </Button>\n <Button onClick={() => handleDecide(\"allowed_once\")}>{text.allow}</Button>\n </Dialog.Footer>\n </Dialog.Content>\n </Dialog>\n );\n}\n\nexport { PermissionModal };\n"
22
22
  }
23
23
  ]
24
24
  }
@@ -14,7 +14,7 @@
14
14
  "path": "components/primitives/pin-input/pin-input.tsx",
15
15
  "type": "registry:ui",
16
16
  "target": "components/ui/pin-input.tsx",
17
- "content": "import { forwardRef, useEffect, useRef } from \"react\";\nimport type { ClipboardEvent, HTMLAttributes, KeyboardEvent } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * PinInput — multi-slot OTP / code input primitive.\n *\n * Renders N separate boxes (default 6) that auto-advance focus on\n * input. Paste handling fills all slots from clipboard (whitespace\n * stripped). Arrow keys navigate; backspace clears current slot\n * then moves focus back when empty.\n *\n * Industry-standard pattern for email verification codes (Apple,\n * Stripe, Clerk, Auth0, GitHub two-factor).\n *\n * @example\n * <PinInput\n * length={6}\n * value={code}\n * onChange={setCode}\n * onComplete={(v) => verify(v)}\n * inputMode=\"numeric\"\n * aria-label=\"Verification code\"\n * />\n *\n * Note: value is treated as controlled. If you pass a complete value\n * on mount, onComplete will NOT fire — onComplete fires only on\n * transitions from incomplete → complete.\n */\nexport interface PinInputProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\" | \"inputMode\"> {\n length?: number;\n value?: string;\n onChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n inputMode?: \"numeric\" | \"alphanumeric\";\n size?: \"sm\" | \"md\" | \"lg\";\n disabled?: boolean;\n error?: boolean;\n \"aria-label\": string;\n autoFocus?: boolean;\n mask?: boolean;\n}\n\nconst SIZE_CLASS: Record<NonNullable<PinInputProps[\"size\"]>, string> = {\n sm: \"size-8 text-body-sm\",\n md: \"size-10 text-body-md\",\n lg: \"size-12 text-title-sm\",\n};\n\nfunction sanitize(raw: string, inputMode: \"numeric\" | \"alphanumeric\"): string {\n const noWhitespace = raw.replace(/\\s/g, \"\");\n if (inputMode === \"numeric\") {\n return noWhitespace.replace(/\\D/g, \"\");\n }\n return noWhitespace.toUpperCase().replace(/[^A-Z0-9]/g, \"\");\n}\n\nconst PinInput = forwardRef<HTMLDivElement, PinInputProps>(\n (\n {\n className,\n length = 6,\n value = \"\",\n onChange,\n onComplete,\n inputMode = \"numeric\",\n size = \"md\",\n disabled = false,\n error = false,\n autoFocus = false,\n mask = false,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) => {\n const inputRefs = useRef<Array<HTMLInputElement | null>>([]);\n const wasCompleteRef = useRef<boolean>(value.length === length);\n\n // Auto-focus first slot on mount (SSR-safe)\n useEffect(() => {\n if (!autoFocus) return;\n if (typeof window === \"undefined\") return;\n inputRefs.current[0]?.focus();\n }, [autoFocus]);\n\n // Fire onComplete on transitions from incomplete → complete\n useEffect(() => {\n const isComplete = value.length === length && value.length > 0;\n if (isComplete && !wasCompleteRef.current) {\n onComplete?.(value);\n }\n wasCompleteRef.current = isComplete;\n }, [value, length, onComplete]);\n\n function commit(next: string) {\n const sanitized = sanitize(next, inputMode).slice(0, length);\n onChange?.(sanitized);\n }\n\n function handleChange(slot: number, raw: string) {\n const sanitized = sanitize(raw, inputMode);\n if (sanitized.length === 0) {\n // Clear current slot\n const next = `${value.slice(0, slot)}${value.slice(slot + 1)}`;\n commit(next);\n return;\n }\n // Take the last character typed (handles browser autocomplete that fills multiple)\n const ch = sanitized[sanitized.length - 1] ?? \"\";\n const next = `${value.slice(0, slot)}${ch}${value.slice(slot + 1)}`;\n commit(next);\n // Advance focus\n if (slot < length - 1) {\n inputRefs.current[slot + 1]?.focus();\n }\n }\n\n function handleKeyDown(slot: number, e: KeyboardEvent<HTMLInputElement>) {\n if (disabled) return;\n const slotChar = value[slot] ?? \"\";\n\n if (e.key === \"Backspace\") {\n if (slotChar === \"\") {\n // Move focus back if current is empty\n if (slot > 0) {\n inputRefs.current[slot - 1]?.focus();\n }\n } else {\n // Clear current slot, stay focused\n const next = `${value.slice(0, slot)}${value.slice(slot + 1)}`;\n commit(next);\n }\n e.preventDefault();\n } else if (e.key === \"ArrowLeft\") {\n if (slot > 0) inputRefs.current[slot - 1]?.focus();\n e.preventDefault();\n } else if (e.key === \"ArrowRight\") {\n if (slot < length - 1) inputRefs.current[slot + 1]?.focus();\n e.preventDefault();\n }\n }\n\n function handlePaste(slot: number, e: ClipboardEvent<HTMLInputElement>) {\n if (disabled) return;\n e.preventDefault();\n const pasted = e.clipboardData.getData(\"text/plain\");\n const sanitized = sanitize(pasted, inputMode);\n if (sanitized.length === 0) return;\n // Build slot-indexed array, then overwrite from `slot` onwards.\n // Previous string-concat approach didn't pad when value was shorter\n // than `slot`, which made paste-from-middle-when-empty fill from 0.\n const slotArr: string[] = Array.from({ length }, (_, i) => value[i] ?? \"\");\n const remaining = length - slot;\n const filled = sanitized.slice(0, remaining);\n for (let i = 0; i < filled.length; i++) {\n slotArr[slot + i] = filled[i] ?? \"\";\n }\n const next = slotArr.join(\"\");\n commit(next);\n // Focus the slot after the last filled, or the last slot if completed\n const focusAt = Math.min(slot + filled.length, length - 1);\n requestAnimationFrame(() => inputRefs.current[focusAt]?.focus());\n }\n\n const slots = Array.from({ length }, (_, i) => i);\n\n return (\n <div\n ref={ref}\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> would force a different visual layout (rectangular border by default) and is form-bound; we use a div with role=\"group\" + aria-label for grouping semantics.\n role=\"group\"\n aria-label={ariaLabel}\n className={cn(\"inline-flex items-center gap-2\", className)}\n {...props}\n >\n {slots.map((i) => {\n const ch = value[i] ?? \"\";\n const display = mask && ch !== \"\" ? \"•\" : ch;\n return (\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n }}\n type=\"text\"\n inputMode={inputMode === \"numeric\" ? \"numeric\" : \"text\"}\n pattern={inputMode === \"numeric\" ? \"[0-9]*\" : undefined}\n maxLength={1}\n autoComplete={i === 0 ? \"one-time-code\" : \"off\"}\n disabled={disabled}\n value={display}\n onChange={(e) => handleChange(i, e.target.value)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={(e) => handlePaste(i, e)}\n aria-label={`Digit ${i + 1} of ${length}`}\n className={cn(\n \"rounded-md border bg-card text-center font-medium font-mono\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n SIZE_CLASS[size],\n error ? \"border-destructive\" : \"border-border/60 hover:border-border\",\n )}\n />\n );\n })}\n </div>\n );\n },\n);\nPinInput.displayName = \"PinInput\";\n\nexport { PinInput };\n"
17
+ "content": "\"use client\";\n\nimport { forwardRef, useEffect, useRef } from \"react\";\nimport type { ClipboardEvent, HTMLAttributes, KeyboardEvent } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * PinInput — multi-slot OTP / code input primitive.\n *\n * Renders N separate boxes (default 6) that auto-advance focus on\n * input. Paste handling fills all slots from clipboard (whitespace\n * stripped). Arrow keys navigate; backspace clears current slot\n * then moves focus back when empty.\n *\n * Industry-standard pattern for email verification codes (Apple,\n * Stripe, Clerk, Auth0, GitHub two-factor).\n *\n * @example\n * <PinInput\n * length={6}\n * value={code}\n * onChange={setCode}\n * onComplete={(v) => verify(v)}\n * inputMode=\"numeric\"\n * aria-label=\"Verification code\"\n * />\n *\n * Note: value is treated as controlled. If you pass a complete value\n * on mount, onComplete will NOT fire — onComplete fires only on\n * transitions from incomplete → complete.\n */\nexport interface PinInputProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\" | \"inputMode\"> {\n length?: number;\n value?: string;\n onChange?: (value: string) => void;\n onComplete?: (value: string) => void;\n inputMode?: \"numeric\" | \"alphanumeric\";\n size?: \"sm\" | \"md\" | \"lg\";\n disabled?: boolean;\n error?: boolean;\n \"aria-label\": string;\n autoFocus?: boolean;\n mask?: boolean;\n}\n\nconst SIZE_CLASS: Record<NonNullable<PinInputProps[\"size\"]>, string> = {\n sm: \"size-8 text-body-sm\",\n md: \"size-10 text-body-md\",\n lg: \"size-12 text-title-sm\",\n};\n\nfunction sanitize(raw: string, inputMode: \"numeric\" | \"alphanumeric\"): string {\n const noWhitespace = raw.replace(/\\s/g, \"\");\n if (inputMode === \"numeric\") {\n return noWhitespace.replace(/\\D/g, \"\");\n }\n return noWhitespace.toUpperCase().replace(/[^A-Z0-9]/g, \"\");\n}\n\nconst PinInput = forwardRef<HTMLDivElement, PinInputProps>(\n (\n {\n className,\n length = 6,\n value = \"\",\n onChange,\n onComplete,\n inputMode = \"numeric\",\n size = \"md\",\n disabled = false,\n error = false,\n autoFocus = false,\n mask = false,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) => {\n const inputRefs = useRef<Array<HTMLInputElement | null>>([]);\n const wasCompleteRef = useRef<boolean>(value.length === length);\n\n // Auto-focus first slot on mount (SSR-safe)\n useEffect(() => {\n if (!autoFocus) return;\n if (typeof window === \"undefined\") return;\n inputRefs.current[0]?.focus();\n }, [autoFocus]);\n\n // Fire onComplete on transitions from incomplete → complete\n useEffect(() => {\n const isComplete = value.length === length && value.length > 0;\n if (isComplete && !wasCompleteRef.current) {\n onComplete?.(value);\n }\n wasCompleteRef.current = isComplete;\n }, [value, length, onComplete]);\n\n function commit(next: string) {\n const sanitized = sanitize(next, inputMode).slice(0, length);\n onChange?.(sanitized);\n }\n\n function handleChange(slot: number, raw: string) {\n const sanitized = sanitize(raw, inputMode);\n if (sanitized.length === 0) {\n // Clear current slot\n const next = `${value.slice(0, slot)}${value.slice(slot + 1)}`;\n commit(next);\n return;\n }\n // Take the last character typed (handles browser autocomplete that fills multiple)\n const ch = sanitized[sanitized.length - 1] ?? \"\";\n const next = `${value.slice(0, slot)}${ch}${value.slice(slot + 1)}`;\n commit(next);\n // Advance focus\n if (slot < length - 1) {\n inputRefs.current[slot + 1]?.focus();\n }\n }\n\n function handleKeyDown(slot: number, e: KeyboardEvent<HTMLInputElement>) {\n if (disabled) return;\n const slotChar = value[slot] ?? \"\";\n\n if (e.key === \"Backspace\") {\n if (slotChar === \"\") {\n // Move focus back if current is empty\n if (slot > 0) {\n inputRefs.current[slot - 1]?.focus();\n }\n } else {\n // Clear current slot, stay focused\n const next = `${value.slice(0, slot)}${value.slice(slot + 1)}`;\n commit(next);\n }\n e.preventDefault();\n } else if (e.key === \"ArrowLeft\") {\n if (slot > 0) inputRefs.current[slot - 1]?.focus();\n e.preventDefault();\n } else if (e.key === \"ArrowRight\") {\n if (slot < length - 1) inputRefs.current[slot + 1]?.focus();\n e.preventDefault();\n }\n }\n\n function handlePaste(slot: number, e: ClipboardEvent<HTMLInputElement>) {\n if (disabled) return;\n e.preventDefault();\n const pasted = e.clipboardData.getData(\"text/plain\");\n const sanitized = sanitize(pasted, inputMode);\n if (sanitized.length === 0) return;\n // Build slot-indexed array, then overwrite from `slot` onwards.\n // Previous string-concat approach didn't pad when value was shorter\n // than `slot`, which made paste-from-middle-when-empty fill from 0.\n const slotArr: string[] = Array.from({ length }, (_, i) => value[i] ?? \"\");\n const remaining = length - slot;\n const filled = sanitized.slice(0, remaining);\n for (let i = 0; i < filled.length; i++) {\n slotArr[slot + i] = filled[i] ?? \"\";\n }\n const next = slotArr.join(\"\");\n commit(next);\n // Focus the slot after the last filled, or the last slot if completed\n const focusAt = Math.min(slot + filled.length, length - 1);\n requestAnimationFrame(() => inputRefs.current[focusAt]?.focus());\n }\n\n const slots = Array.from({ length }, (_, i) => i);\n\n return (\n <div\n data-slot=\"pin-input\"\n ref={ref}\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> would force a different visual layout (rectangular border by default) and is form-bound; we use a div with role=\"group\" + aria-label for grouping semantics.\n role=\"group\"\n aria-label={ariaLabel}\n className={cn(\"inline-flex items-center gap-2\", className)}\n {...props}\n >\n {slots.map((i) => {\n const ch = value[i] ?? \"\";\n const display = mask && ch !== \"\" ? \"•\" : ch;\n return (\n <input\n key={i}\n ref={(el) => {\n inputRefs.current[i] = el;\n }}\n type=\"text\"\n inputMode={inputMode === \"numeric\" ? \"numeric\" : \"text\"}\n pattern={inputMode === \"numeric\" ? \"[0-9]*\" : undefined}\n maxLength={1}\n autoComplete={i === 0 ? \"one-time-code\" : \"off\"}\n disabled={disabled}\n value={display}\n onChange={(e) => handleChange(i, e.target.value)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={(e) => handlePaste(i, e)}\n aria-label={`Digit ${i + 1} of ${length}`}\n className={cn(\n \"rounded-md border bg-card text-center font-medium font-mono\",\n \"transition-colors\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n SIZE_CLASS[size],\n error ? \"border-destructive\" : \"border-border/60 hover:border-border\",\n )}\n />\n );\n })}\n </div>\n );\n },\n);\nPinInput.displayName = \"PinInput\";\n\nexport { PinInput };\n"
18
18
  }
19
19
  ]
20
20
  }
@@ -14,7 +14,7 @@
14
14
  "path": "components/primitives/plan-badge/plan-badge.tsx",
15
15
  "type": "registry:ui",
16
16
  "target": "components/ui/plan-badge.tsx",
17
- "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * PlanBadge — semantic pricing-tier badge.\n *\n * Five canonical tiers (`free` / `hobby` / `pro` / `team` / `enterprise`) with\n * distinct color tokens. Consumers self-document intent with `plan=\"hobby\"`\n * instead of mapping a generic `<Badge variant=\"outline\">` to colors per app.\n * Future rebrand / dark-mode tweaks propagate automatically — no consumer\n * code change.\n *\n * Visual spec (per `theo/docs/handoff/2026-05-23-theo-ui-cloud-dashboard-gaps-brief.md`):\n *\n * | tier | bg | border | text |\n * |--------------|---------------------|--------------------------|-----------------------|\n * | free | bg-muted/40 | border-muted-foreground/20 | text-muted-foreground |\n * | hobby | bg-warning/10 | border-warning/30 | text-warning |\n * | pro | bg-primary/10 | border-primary/30 | text-primary |\n * | team | bg-success/10 | border-success/30 | text-success |\n * | enterprise | bg-foreground/5 | border-foreground/20 | text-foreground |\n *\n * Default label capitalizes the tier (`hobby → \"Hobby\"`, `enterprise → \"Enterprise\"`).\n *\n * Used by `<AccountMenu>` inline with the user name; usable standalone.\n */\n\nexport type PlanTier = \"free\" | \"hobby\" | \"pro\" | \"team\" | \"enterprise\";\n\nexport interface PlanBadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** Plan tier identifier. */\n plan: PlanTier;\n /** Override the display label. Defaults to the capitalized tier name. */\n label?: string;\n /** Size variant. */\n size?: \"sm\" | \"md\";\n}\n\nconst TIER_CLASS: Record<PlanTier, string> = {\n free: \"bg-muted/40 border-muted-foreground/20 text-muted-foreground\",\n hobby: \"bg-warning/10 border-warning/30 text-warning\",\n pro: \"bg-primary/10 border-primary/30 text-primary\",\n team: \"bg-success/10 border-success/30 text-success\",\n enterprise: \"bg-foreground/5 border-foreground/20 text-foreground\",\n};\n\nconst SIZE_CLASS = {\n sm: \"px-1.5 py-0 text-label-caps\",\n md: \"px-2 py-0.5 text-label\",\n} as const;\n\nfunction defaultLabel(plan: PlanTier): string {\n return plan.charAt(0).toUpperCase() + plan.slice(1);\n}\n\nconst PlanBadge = forwardRef<HTMLSpanElement, PlanBadgeProps>(\n ({ className, plan, label, size = \"md\", ...props }, ref) => {\n // Runtime fallback for unknown tier (TypeScript prevents this at compile\n // time; the guard handles consumers casting an arbitrary string).\n const tierClass = TIER_CLASS[plan] ?? TIER_CLASS.free;\n const displayLabel = label ?? defaultLabel(plan);\n return (\n <span\n ref={ref}\n className={cn(\n \"inline-flex items-center rounded-md border\",\n \"font-mono uppercase tabular-nums tracking-wider\",\n tierClass,\n SIZE_CLASS[size],\n className,\n )}\n data-plan={plan}\n {...props}\n >\n {displayLabel}\n </span>\n );\n },\n);\nPlanBadge.displayName = \"PlanBadge\";\n\nexport { PlanBadge };\n"
17
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * PlanBadge — semantic pricing-tier badge.\n *\n * Five canonical tiers (`free` / `hobby` / `pro` / `team` / `enterprise`) with\n * distinct color tokens. Consumers self-document intent with `plan=\"hobby\"`\n * instead of mapping a generic `<Badge variant=\"outline\">` to colors per app.\n * Future rebrand / dark-mode tweaks propagate automatically — no consumer\n * code change.\n *\n * Visual spec (per `theo/docs/handoff/2026-05-23-theo-ui-cloud-dashboard-gaps-brief.md`):\n *\n * | tier | bg | border | text |\n * |--------------|---------------------|--------------------------|-----------------------|\n * | free | bg-muted/40 | border-muted-foreground/20 | text-muted-foreground |\n * | hobby | bg-warning/10 | border-warning/30 | text-warning |\n * | pro | bg-primary/10 | border-primary/30 | text-primary |\n * | team | bg-success/10 | border-success/30 | text-success |\n * | enterprise | bg-foreground/5 | border-foreground/20 | text-foreground |\n *\n * Default label capitalizes the tier (`hobby → \"Hobby\"`, `enterprise → \"Enterprise\"`).\n *\n * Used by `<AccountMenu>` inline with the user name; usable standalone.\n */\n\nexport type PlanTier = \"free\" | \"hobby\" | \"pro\" | \"team\" | \"enterprise\";\n\nexport interface PlanBadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** Plan tier identifier. */\n plan: PlanTier;\n /** Override the display label. Defaults to the capitalized tier name. */\n label?: string;\n /** Size variant. */\n size?: \"sm\" | \"md\";\n}\n\nconst TIER_CLASS: Record<PlanTier, string> = {\n free: \"bg-muted/40 border-muted-foreground/20 text-muted-foreground\",\n hobby: \"bg-warning/10 border-warning/30 text-warning\",\n pro: \"bg-primary/10 border-primary/30 text-primary\",\n team: \"bg-success/10 border-success/30 text-success\",\n enterprise: \"bg-foreground/5 border-foreground/20 text-foreground\",\n};\n\nconst SIZE_CLASS = {\n sm: \"px-1.5 py-0 text-label-caps\",\n md: \"px-2 py-0.5 text-label\",\n} as const;\n\nfunction defaultLabel(plan: PlanTier): string {\n return plan.charAt(0).toUpperCase() + plan.slice(1);\n}\n\nconst PlanBadge = forwardRef<HTMLSpanElement, PlanBadgeProps>(\n ({ className, plan, label, size = \"md\", ...props }, ref) => {\n // Runtime fallback for unknown tier (TypeScript prevents this at compile\n // time; the guard handles consumers casting an arbitrary string).\n const tierClass = TIER_CLASS[plan] ?? TIER_CLASS.free;\n const displayLabel = label ?? defaultLabel(plan);\n return (\n <span\n data-slot=\"plan-badge\"\n ref={ref}\n className={cn(\n \"inline-flex items-center rounded-md border\",\n \"font-mono uppercase tabular-nums tracking-wider\",\n tierClass,\n SIZE_CLASS[size],\n className,\n )}\n data-plan={plan}\n {...props}\n >\n {displayLabel}\n </span>\n );\n },\n);\nPlanBadge.displayName = \"PlanBadge\";\n\nexport { PlanBadge };\n"
18
18
  }
19
19
  ]
20
20
  }
@@ -19,7 +19,7 @@
19
19
  "path": "components/composites/preview-env-card/preview-env-card.tsx",
20
20
  "type": "registry:block",
21
21
  "target": "components/blocks/preview-env-card.tsx",
22
- "content": "import { ExternalLink, GitPullRequest, Server } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { safeHref } from \"@/lib/safe-href\";\nimport { Badge } from \"@/components/ui/badge\";\nimport type { DeploymentStatus } from \"@/components/blocks/deployment-row\";\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};\nconst statusToDot: 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};\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\nexport interface PreviewService {\n /** Service name e.g. \"api\", \"web\", \"worker\". */\n name: string;\n /** Live URL or null if not exposed (worker). */\n url?: string;\n status: DeploymentStatus;\n}\n\nexport interface PreviewEnv {\n id: string;\n prNumber: number;\n prTitle: string;\n branch: string;\n author?: { name: string; avatarUrl?: string };\n services: PreviewService[];\n createdAt: string;\n}\n\ninterface PreviewEnvCardProps extends HTMLAttributes<HTMLDivElement> {\n env: PreviewEnv;\n actions?: ReactNode;\n}\n\n/**\n * PreviewEnvCard — preview environment card surfacing all services from one PR.\n *\n * Theo's killer feature: full-stack preview environments. The card shows:\n * - PR number + title at the top\n * - branch + author in the metadata row\n * - one badge per service with its own status + URL\n * - bottom action row (Open, Promote, Delete)\n */\nconst PreviewEnvCard = forwardRef<HTMLDivElement, PreviewEnvCardProps>(\n ({ className, env, actions, ...props }, ref) => (\n <article\n ref={ref}\n className={cn(\n \"rounded-xl border bg-card p-5 shadow-sm\",\n \"transition-[border-color,box-shadow] duration-base ease-out-soft\",\n \"hover:border-primary/40\",\n className,\n )}\n {...(props as HTMLAttributes<HTMLDivElement>)}\n >\n <header className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <p className=\"flex items-center gap-2 font-mono text-label-caps text-muted-foreground uppercase\">\n <GitPullRequest className=\"size-3\" /> PR #{env.prNumber}\n </p>\n <h3 className=\"mt-1 truncate font-display text-title-md tracking-tight\">{env.prTitle}</h3>\n <p className=\"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-body-sm text-muted-foreground\">\n <span className=\"font-mono text-code-sm\">{env.branch}</span>\n {env.author ? (\n <>\n <span aria-hidden=\"true\">·</span>\n <span>by {env.author.name}</span>\n </>\n ) : null}\n <span aria-hidden=\"true\">·</span>\n <span>opened {env.createdAt}</span>\n </p>\n </div>\n <Badge variant=\"primary\">\n <Server className=\"size-3\" /> {env.services.length} service\n {env.services.length === 1 ? \"\" : \"s\"}\n </Badge>\n </header>\n\n <ul className=\"mt-4 divide-y divide-border/30 rounded-lg border border-border/30\">\n {env.services.map((s) => {\n // T3.3 (SEC-003): defang dangerous URL protocols before rendering\n // as <a href>. Consumers passing user-controlled URLs from API\n // responses are protected from javascript:/vbscript:/data:text/html\n // XSS payloads.\n const sanitized = safeHref(s.url);\n return (\n <li key={s.name} className=\"flex items-center justify-between gap-3 px-3 py-2\">\n <span className=\"font-mono text-code-sm text-foreground\">{s.name}</span>\n <div className=\"flex items-center gap-2\">\n {sanitized ? (\n <a\n href={sanitized}\n className=\"inline-flex items-center gap-1 font-mono text-code-sm text-primary hover:underline\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {sanitized.replace(/^https?:\\/\\//, \"\")}\n <ExternalLink className=\"size-3\" />\n </a>\n ) : (\n <span className=\"font-mono text-code-sm text-muted-foreground\">internal</span>\n )}\n <Badge variant={statusToVariant[s.status]}>\n <Badge.Dot\n tone={statusToDot[s.status]}\n pulse={\n s.status === \"building\" || s.status === \"deploying\" || s.status === \"queued\"\n }\n />\n {statusLabels[s.status]}\n </Badge>\n </div>\n </li>\n );\n })}\n </ul>\n\n {actions ? <div className=\"mt-4 flex items-center gap-2\">{actions}</div> : null}\n </article>\n ),\n);\nPreviewEnvCard.displayName = \"PreviewEnvCard\";\n\nexport { PreviewEnvCard };\n"
22
+ "content": "import { ExternalLink, GitPullRequest, Server } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { safeHref } from \"@/lib/safe-href\";\nimport { Badge } from \"@/components/ui/badge\";\nimport type { DeploymentStatus } from \"@/components/blocks/deployment-row\";\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};\nconst statusToDot: 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};\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\nexport interface PreviewService {\n /** Service name e.g. \"api\", \"web\", \"worker\". */\n name: string;\n /** Live URL or null if not exposed (worker). */\n url?: string;\n status: DeploymentStatus;\n}\n\nexport interface PreviewEnv {\n id: string;\n prNumber: number;\n prTitle: string;\n branch: string;\n author?: { name: string; avatarUrl?: string };\n services: PreviewService[];\n createdAt: string;\n}\n\ninterface PreviewEnvCardProps extends HTMLAttributes<HTMLDivElement> {\n env: PreviewEnv;\n actions?: ReactNode;\n}\n\n/**\n * PreviewEnvCard — preview environment card surfacing all services from one PR.\n *\n * Theo's killer feature: full-stack preview environments. The card shows:\n * - PR number + title at the top\n * - branch + author in the metadata row\n * - one badge per service with its own status + URL\n * - bottom action row (Open, Promote, Delete)\n */\nconst PreviewEnvCard = forwardRef<HTMLDivElement, PreviewEnvCardProps>(\n ({ className, env, actions, ...props }, ref) => (\n <article\n data-slot=\"preview-env-card\"\n ref={ref}\n className={cn(\n \"rounded-xl border bg-card p-5 shadow-sm\",\n \"transition-[border-color,box-shadow] duration-base ease-out-soft\",\n \"hover:border-primary/40\",\n className,\n )}\n {...(props as HTMLAttributes<HTMLDivElement>)}\n >\n <header className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <p className=\"flex items-center gap-2 font-mono text-label-caps text-muted-foreground uppercase\">\n <GitPullRequest className=\"size-3\" /> PR #{env.prNumber}\n </p>\n <h3 className=\"mt-1 truncate font-display text-title-md tracking-tight\">{env.prTitle}</h3>\n <p className=\"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-body-sm text-muted-foreground\">\n <span className=\"font-mono text-code-sm\">{env.branch}</span>\n {env.author ? (\n <>\n <span aria-hidden=\"true\">·</span>\n <span>by {env.author.name}</span>\n </>\n ) : null}\n <span aria-hidden=\"true\">·</span>\n <span>opened {env.createdAt}</span>\n </p>\n </div>\n <Badge variant=\"primary\">\n <Server className=\"size-3\" /> {env.services.length} service\n {env.services.length === 1 ? \"\" : \"s\"}\n </Badge>\n </header>\n\n <ul className=\"mt-4 divide-y divide-border/30 rounded-lg border border-border/30\">\n {env.services.map((s) => {\n // T3.3 (SEC-003): defang dangerous URL protocols before rendering\n // as <a href>. Consumers passing user-controlled URLs from API\n // responses are protected from javascript:/vbscript:/data:text/html\n // XSS payloads.\n const sanitized = safeHref(s.url);\n return (\n <li key={s.name} className=\"flex items-center justify-between gap-3 px-3 py-2\">\n <span className=\"font-mono text-code-sm text-foreground\">{s.name}</span>\n <div className=\"flex items-center gap-2\">\n {sanitized ? (\n <a\n href={sanitized}\n className=\"inline-flex items-center gap-1 font-mono text-code-sm text-primary hover:underline\"\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {sanitized.replace(/^https?:\\/\\//, \"\")}\n <ExternalLink className=\"size-3\" />\n </a>\n ) : (\n <span className=\"font-mono text-code-sm text-muted-foreground\">internal</span>\n )}\n <Badge variant={statusToVariant[s.status]}>\n <Badge.Dot\n tone={statusToDot[s.status]}\n pulse={\n s.status === \"building\" || s.status === \"deploying\" || s.status === \"queued\"\n }\n />\n {statusLabels[s.status]}\n </Badge>\n </div>\n </li>\n );\n })}\n </ul>\n\n {actions ? <div className=\"mt-4 flex items-center gap-2\">{actions}</div> : null}\n </article>\n ),\n);\nPreviewEnvCard.displayName = \"PreviewEnvCard\";\n\nexport { PreviewEnvCard };\n"
23
23
  }
24
24
  ]
25
25
  }
@@ -15,7 +15,7 @@
15
15
  "path": "components/composites/preview-panel/preview-panel.tsx",
16
16
  "type": "registry:ui",
17
17
  "target": "components/ui/preview-panel.tsx",
18
- "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { BrowserControls } from \"@/components/ui/browser-controls\";\n\ninterface PreviewPanelProps extends Omit<HTMLAttributes<HTMLElement>, \"content\"> {\n url: string;\n onUrlChange?: (next: string) => void;\n onBack?: () => void;\n onForward?: () => void;\n onReload?: () => void;\n /**\n * Region rendered as the preview body. Typically an <iframe>.\n */\n content: ReactNode;\n /**\n * Optional logs section rendered below the preview (e.g. dev server output).\n */\n logsSlot?: ReactNode;\n}\n\n/**\n * PreviewPanel — browser preview with controls + integrated logs slot.\n *\n * The Code workspace shows live dev-server URL + HMR logs side-by-side; this\n * panel keeps both in a single card so the user doesn't switch contexts.\n */\nconst PreviewPanel = forwardRef<HTMLElement, PreviewPanelProps>(\n (\n { className, url, onUrlChange, onBack, onForward, onReload, content, logsSlot, ...props },\n ref,\n ) => (\n <section\n ref={ref}\n className={cn(\"flex h-full flex-col overflow-hidden rounded-xl border bg-card\", className)}\n {...props}\n >\n <BrowserControls\n url={url}\n {...(onUrlChange ? { onUrlChange } : {})}\n {...(onBack ? { onBack } : {})}\n {...(onForward ? { onForward } : {})}\n {...(onReload ? { onReload } : {})}\n />\n <div className=\"flex-1 overflow-hidden bg-background\">{content}</div>\n {logsSlot ? (\n <div className=\"max-h-48 overflow-auto border-border/40 border-t bg-card\">{logsSlot}</div>\n ) : null}\n </section>\n ),\n);\nPreviewPanel.displayName = \"PreviewPanel\";\n\nexport { PreviewPanel };\n"
18
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { BrowserControls } from \"@/components/ui/browser-controls\";\n\ninterface PreviewPanelProps extends Omit<HTMLAttributes<HTMLElement>, \"content\"> {\n url: string;\n onUrlChange?: (next: string) => void;\n onBack?: () => void;\n onForward?: () => void;\n onReload?: () => void;\n /**\n * Region rendered as the preview body. Typically an <iframe>.\n */\n content: ReactNode;\n /**\n * Optional logs section rendered below the preview (e.g. dev server output).\n */\n logsSlot?: ReactNode;\n}\n\n/**\n * PreviewPanel — browser preview with controls + integrated logs slot.\n *\n * The Code workspace shows live dev-server URL + HMR logs side-by-side; this\n * panel keeps both in a single card so the user doesn't switch contexts.\n */\nconst PreviewPanel = forwardRef<HTMLElement, PreviewPanelProps>(\n (\n { className, url, onUrlChange, onBack, onForward, onReload, content, logsSlot, ...props },\n ref,\n ) => (\n <section\n data-slot=\"preview-panel\"\n ref={ref}\n className={cn(\"flex h-full flex-col overflow-hidden rounded-xl border bg-card\", className)}\n {...props}\n >\n <BrowserControls\n url={url}\n {...(onUrlChange ? { onUrlChange } : {})}\n {...(onBack ? { onBack } : {})}\n {...(onForward ? { onForward } : {})}\n {...(onReload ? { onReload } : {})}\n />\n <div className=\"flex-1 overflow-hidden bg-background\">{content}</div>\n {logsSlot ? (\n <div className=\"max-h-48 overflow-auto border-border/40 border-t bg-card\">{logsSlot}</div>\n ) : null}\n </section>\n ),\n);\nPreviewPanel.displayName = \"PreviewPanel\";\n\nexport { PreviewPanel };\n"
19
19
  }
20
20
  ]
21
21
  }
@@ -17,7 +17,7 @@
17
17
  "path": "components/primitives/progress-checklist/progress-checklist.tsx",
18
18
  "type": "registry:ui",
19
19
  "target": "components/ui/progress-checklist.tsx",
20
- "content": "import { Check, CircleDashed, Loader2 } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport type { TaskStep, TaskStepStatus } from \"@/types/task\";\n\nconst statusIcon = {\n pending: CircleDashed,\n running: Loader2,\n done: Check,\n skipped: CircleDashed,\n} as const;\n\nconst statusToneText: Record<TaskStepStatus, string> = {\n pending: \"text-muted-foreground\",\n running: \"text-primary\",\n done: \"text-success line-through\",\n skipped: \"text-muted-foreground line-through\",\n};\n\nconst statusBg: Record<TaskStepStatus, string> = {\n pending: \"bg-muted text-muted-foreground\",\n running: \"bg-primary text-primary-foreground\",\n done: \"bg-success text-success-foreground\",\n skipped: \"bg-muted text-muted-foreground\",\n};\n\ninterface ProgressChecklistProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title?: ReactNode;\n steps: TaskStep[];\n /**\n * If true, shows percentage bar for running steps with `progress`.\n */\n showProgressBars?: boolean;\n}\n\n/**\n * ProgressChecklist — right-inspector checklist.\n *\n * Visual: vertical list of steps with status dot, label, optional progress bar.\n * Matches WIREMOCKS §3 / §4 (\"Progresso\") with checkmarks and pulse on running.\n */\nconst ProgressChecklist = forwardRef<HTMLDivElement, ProgressChecklistProps>(\n ({ className, title, steps, showProgressBars = true, ...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 <ol className=\"grid gap-3\">\n {steps.map((step) => {\n const Icon = statusIcon[step.status];\n return (\n <li key={step.id} className=\"grid grid-cols-[auto_1fr] items-start gap-3\">\n <span\n className={cn(\n \"mt-0.5 grid size-5 place-items-center rounded-full\",\n statusBg[step.status],\n )}\n aria-hidden=\"true\"\n >\n <Icon className={cn(\"size-3\", step.status === \"running\" && \"animate-spin\")} />\n </span>\n <div className=\"min-w-0\">\n <p className={cn(\"text-body-sm\", statusToneText[step.status])}>{step.label}</p>\n {showProgressBars && step.status === \"running\" && step.progress !== undefined ? (\n <div className=\"mt-1.5 h-1 w-full overflow-hidden rounded-full bg-muted\">\n <div\n className=\"h-full bg-primary transition-[width] duration-base ease-out-soft\"\n style={{ width: `${Math.round(step.progress * 100)}%` }}\n />\n </div>\n ) : null}\n </div>\n </li>\n );\n })}\n </ol>\n </section>\n ),\n);\nProgressChecklist.displayName = \"ProgressChecklist\";\n\nexport { ProgressChecklist };\n"
20
+ "content": "import { Check, CircleDashed, Loader2 } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport type { TaskStep, TaskStepStatus } from \"@/types/task\";\n\nconst statusIcon = {\n pending: CircleDashed,\n running: Loader2,\n done: Check,\n skipped: CircleDashed,\n} as const;\n\nconst statusToneText: Record<TaskStepStatus, string> = {\n pending: \"text-muted-foreground\",\n running: \"text-primary\",\n done: \"text-success line-through\",\n skipped: \"text-muted-foreground line-through\",\n};\n\nconst statusBg: Record<TaskStepStatus, string> = {\n pending: \"bg-muted text-muted-foreground\",\n running: \"bg-primary text-primary-foreground\",\n done: \"bg-success text-success-foreground\",\n skipped: \"bg-muted text-muted-foreground\",\n};\n\ninterface ProgressChecklistProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title?: ReactNode;\n steps: TaskStep[];\n /**\n * If true, shows percentage bar for running steps with `progress`.\n */\n showProgressBars?: boolean;\n}\n\n/**\n * ProgressChecklist — right-inspector checklist.\n *\n * Visual: vertical list of steps with status dot, label, optional progress bar.\n * Matches WIREMOCKS §3 / §4 (\"Progresso\") with checkmarks and pulse on running.\n */\nconst ProgressChecklist = forwardRef<HTMLDivElement, ProgressChecklistProps>(\n ({ className, title, steps, showProgressBars = true, ...props }, ref) => (\n <section\n data-slot=\"progress-checklist\"\n ref={ref}\n className={cn(\"rounded-xl border bg-card p-4\", className)}\n {...props}\n >\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 <ol className=\"grid gap-3\">\n {steps.map((step) => {\n const Icon = statusIcon[step.status];\n return (\n <li key={step.id} className=\"grid grid-cols-[auto_1fr] items-start gap-3\">\n <span\n className={cn(\n \"mt-0.5 grid size-5 place-items-center rounded-full\",\n statusBg[step.status],\n )}\n aria-hidden=\"true\"\n >\n <Icon className={cn(\"size-3\", step.status === \"running\" && \"animate-spin\")} />\n </span>\n <div className=\"min-w-0\">\n <p className={cn(\"text-body-sm\", statusToneText[step.status])}>{step.label}</p>\n {showProgressBars && step.status === \"running\" && step.progress !== undefined ? (\n <div className=\"mt-1.5 h-1 w-full overflow-hidden rounded-full bg-muted\">\n <div\n className=\"h-full bg-primary transition-[width] duration-base ease-out-soft\"\n style={{ width: `${Math.round(step.progress * 100)}%` }}\n />\n </div>\n ) : null}\n </div>\n </li>\n );\n })}\n </ol>\n </section>\n ),\n);\nProgressChecklist.displayName = \"ProgressChecklist\";\n\nexport { ProgressChecklist };\n"
21
21
  }
22
22
  ]
23
23
  }
@@ -14,7 +14,7 @@
14
14
  "path": "components/primitives/progress/progress.tsx",
15
15
  "type": "registry:ui",
16
16
  "target": "components/ui/progress.tsx",
17
- "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Progress — accessible progress bar primitive.\n *\n * Built on `<div role=\"progressbar\">` (NOT native `<progress>`) so Tailwind\n * classes can style the track + fill cross-browser (Chrome/Safari/Firefox\n * shadow-DOM hooks for `<progress>` diverge). Matches Radix / shadcn /\n * Mantine convention.\n *\n * Variants:\n * - intent: `default` | `success` | `warning` | `destructive` — controls fill color\n * - height: `h-1` (4px, default) | `h-1.5` | `h-2` | `h-3`\n * - indeterminate: animated bar, no value (e.g. \"uploading…\", \"building…\")\n *\n * Composition:\n * <Progress value={42} max={100} intent=\"success\" aria-label=\"Upload\" />\n * <Progress indeterminate aria-label=\"Building\" />\n *\n * A11y:\n * - role=\"progressbar\"\n * - aria-valuenow / aria-valuemin / aria-valuemax (determinate)\n * - aria-busy=\"true\" when indeterminate\n * - Respects `prefers-reduced-motion` (no animation when set)\n *\n * Used by `<UsageMeter>` to render each metric's fill bar, but ships as a\n * standalone primitive for direct consumer use (deploy phase, file upload,\n * build progress, quota fill).\n */\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, \"role\"> {\n /** Current value (0..max). Values outside the range are clamped. */\n value?: number;\n /** Maximum value. Defaults to 100. */\n max?: number;\n /** Visual intent — controls fill color. */\n intent?: \"default\" | \"success\" | \"warning\" | \"destructive\";\n /** Bar height in tailwind units. Defaults to `\"h-1\"` (4px). */\n height?: \"h-1\" | \"h-1.5\" | \"h-2\" | \"h-3\";\n /** When true, animated bar with no value. Omits `aria-valuenow`, adds `aria-busy`. */\n indeterminate?: boolean;\n /** Accessible label. Required if not preceded by an `aria-labelledby` element. */\n \"aria-label\"?: string;\n}\n\nconst INTENT_FILL: Record<NonNullable<ProgressProps[\"intent\"]>, string> = {\n default: \"bg-primary\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n destructive: \"bg-destructive\",\n};\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n intent = \"default\",\n height = \"h-1\",\n indeterminate = false,\n ...props\n },\n ref,\n ) => {\n const clampedMax = Math.max(0, max);\n const clampedValue = Math.min(clampedMax, Math.max(0, value));\n const percent = clampedMax > 0 ? (clampedValue / clampedMax) * 100 : 0;\n const fillClass = INTENT_FILL[intent];\n\n return (\n // biome-ignore lint/a11y/useFocusableInteractive: WAI-ARIA `progressbar` is a status role (https://www.w3.org/TR/wai-aria-1.2/#progressbar) — NOT supposed to be focusable; screen readers announce updates without keyboard navigation.\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={clampedMax}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-busy={indeterminate ? true : undefined}\n className={cn(\"relative w-full overflow-hidden rounded-full bg-muted\", height, className)}\n {...props}\n >\n {indeterminate ? (\n <div\n className={cn(\n \"absolute inset-y-0 left-0 w-1/3 rounded-full\",\n \"animate-[progress-indeterminate_1.4s_ease-in-out_infinite] motion-reduce:animate-none\",\n \"motion-reduce:w-full motion-reduce:opacity-50\",\n fillClass,\n )}\n />\n ) : (\n <div\n className={cn(\n \"h-full rounded-full transition-[width] duration-base ease-out-soft\",\n \"motion-reduce:transition-none\",\n fillClass,\n )}\n style={{ width: `${percent}%` }}\n />\n )}\n </div>\n );\n },\n);\nProgress.displayName = \"Progress\";\n\nexport { Progress };\n"
17
+ "content": "import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Progress — accessible progress bar primitive.\n *\n * Built on `<div role=\"progressbar\">` (NOT native `<progress>`) so Tailwind\n * classes can style the track + fill cross-browser (Chrome/Safari/Firefox\n * shadow-DOM hooks for `<progress>` diverge). Matches Radix / shadcn /\n * Mantine convention.\n *\n * Variants:\n * - intent: `default` | `success` | `warning` | `destructive` — controls fill color\n * - height: `h-1` (4px, default) | `h-1.5` | `h-2` | `h-3`\n * - indeterminate: animated bar, no value (e.g. \"uploading…\", \"building…\")\n *\n * Composition:\n * <Progress value={42} max={100} intent=\"success\" aria-label=\"Upload\" />\n * <Progress indeterminate aria-label=\"Building\" />\n *\n * A11y:\n * - role=\"progressbar\"\n * - aria-valuenow / aria-valuemin / aria-valuemax (determinate)\n * - aria-busy=\"true\" when indeterminate\n * - Respects `prefers-reduced-motion` (no animation when set)\n *\n * Used by `<UsageMeter>` to render each metric's fill bar, but ships as a\n * standalone primitive for direct consumer use (deploy phase, file upload,\n * build progress, quota fill).\n */\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, \"role\"> {\n /** Current value (0..max). Values outside the range are clamped. */\n value?: number;\n /** Maximum value. Defaults to 100. */\n max?: number;\n /** Visual intent — controls fill color. */\n intent?: \"default\" | \"success\" | \"warning\" | \"destructive\";\n /** Bar height in tailwind units. Defaults to `\"h-1\"` (4px). */\n height?: \"h-1\" | \"h-1.5\" | \"h-2\" | \"h-3\";\n /** When true, animated bar with no value. Omits `aria-valuenow`, adds `aria-busy`. */\n indeterminate?: boolean;\n /** Accessible label. Required if not preceded by an `aria-labelledby` element. */\n \"aria-label\"?: string;\n}\n\nconst INTENT_FILL: Record<NonNullable<ProgressProps[\"intent\"]>, string> = {\n default: \"bg-primary\",\n success: \"bg-success\",\n warning: \"bg-warning\",\n destructive: \"bg-destructive\",\n};\n\nconst Progress = forwardRef<HTMLDivElement, ProgressProps>(\n (\n {\n className,\n value = 0,\n max = 100,\n intent = \"default\",\n height = \"h-1\",\n indeterminate = false,\n ...props\n },\n ref,\n ) => {\n const clampedMax = Math.max(0, max);\n const clampedValue = Math.min(clampedMax, Math.max(0, value));\n const percent = clampedMax > 0 ? (clampedValue / clampedMax) * 100 : 0;\n const fillClass = INTENT_FILL[intent];\n\n return (\n // biome-ignore lint/a11y/useFocusableInteractive: WAI-ARIA `progressbar` is a status role (https://www.w3.org/TR/wai-aria-1.2/#progressbar) — NOT supposed to be focusable; screen readers announce updates without keyboard navigation.\n <div\n data-slot=\"progress\"\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={clampedMax}\n aria-valuenow={indeterminate ? undefined : clampedValue}\n aria-busy={indeterminate ? true : undefined}\n className={cn(\"relative w-full overflow-hidden rounded-full bg-muted\", height, className)}\n {...props}\n >\n {indeterminate ? (\n <div\n className={cn(\n \"absolute inset-y-0 left-0 w-1/3 rounded-full\",\n \"animate-[progress-indeterminate_1.4s_ease-in-out_infinite] motion-reduce:animate-none\",\n \"motion-reduce:w-full motion-reduce:opacity-50\",\n fillClass,\n )}\n />\n ) : (\n <div\n className={cn(\n \"h-full rounded-full transition-[width] duration-base ease-out-soft\",\n \"motion-reduce:transition-none\",\n fillClass,\n )}\n style={{ width: `${percent}%` }}\n />\n )}\n </div>\n );\n },\n);\nProgress.displayName = \"Progress\";\n\nexport { Progress };\n"
18
18
  }
19
19
  ]
20
20
  }
@@ -19,7 +19,7 @@
19
19
  "path": "components/composites/project-card/project-card.tsx",
20
20
  "type": "registry:block",
21
21
  "target": "components/blocks/project-card.tsx",
22
- "content": "import { Activity, GitBranch, GitCommit } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { safeHref } from \"@/lib/safe-href\";\nimport { Badge } from \"@/components/ui/badge\";\nimport type { DeploymentStatus } from \"@/components/blocks/deployment-row\";\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};\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\nexport interface Project {\n id: string;\n name: string;\n description?: string;\n framework?: string;\n branch: string;\n commitSha: string;\n commitMessage?: string;\n status: DeploymentStatus;\n url?: string;\n region?: string;\n lastDeployedAt: string;\n}\n\ninterface ProjectCardProps extends HTMLAttributes<HTMLAnchorElement | HTMLDivElement> {\n project: Project;\n href?: string;\n actions?: ReactNode;\n /**\n * Show the project description and commit message. Default true.\n */\n detailed?: boolean;\n}\n\n/**\n * ProjectCard — surface for a project in a project listing.\n *\n * Light hover lift (no shadow inflation), violet ring on focus,\n * status badge with optional pulse, framework + region in muted footer.\n */\nconst ProjectCard = forwardRef<HTMLElement, ProjectCardProps>(\n ({ className, project, href, actions, detailed = true, ...props }, ref) => {\n // T3.3 (SEC-003): defang javascript:/vbscript:/data:text/html before\n // rendering as <a href>. Consumers passing user-controlled URLs are\n // protected from XSS via dangerous protocols.\n const sanitizedHref = safeHref(href);\n const isLink = sanitizedHref !== undefined;\n const Tag = isLink ? \"a\" : \"div\";\n const isAnimated =\n project.status === \"building\" ||\n project.status === \"deploying\" ||\n project.status === \"queued\";\n\n const content = (\n <>\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate font-display text-title-md tracking-tight\">{project.name}</h3>\n {project.framework ? (\n <p className=\"mt-0.5 font-mono text-label-caps text-muted-foreground uppercase\">\n {project.framework}\n </p>\n ) : null}\n </div>\n <Badge variant={statusToVariant[project.status]}>\n <Badge.Dot tone={statusToDotTone[project.status]} pulse={isAnimated} />\n {project.status === \"live\"\n ? \"Live\"\n : project.status === \"building\"\n ? \"Building\"\n : project.status === \"deploying\"\n ? \"Deploying\"\n : project.status === \"queued\"\n ? \"Queued\"\n : project.status === \"failed\"\n ? \"Failed\"\n : \"Cancelled\"}\n </Badge>\n </div>\n\n {detailed && project.description ? (\n <p className=\"line-clamp-2 text-body-sm text-muted-foreground\">{project.description}</p>\n ) : null}\n\n {detailed && project.commitMessage ? (\n <p className=\"line-clamp-1 font-mono text-code-sm text-foreground/80\">\n {project.commitMessage}\n </p>\n ) : null}\n\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-code-sm text-muted-foreground\">\n <span className=\"inline-flex items-center gap-1\">\n <GitBranch className=\"size-3\" /> {project.branch}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <GitCommit className=\"size-3\" /> {project.commitSha.slice(0, 7)}\n </span>\n {project.region ? (\n <span className=\"inline-flex items-center gap-1\">\n <Activity className=\"size-3\" /> {project.region}\n </span>\n ) : null}\n <span aria-hidden=\"true\">·</span>\n <span>{project.lastDeployedAt}</span>\n </div>\n\n {actions ? <div className=\"flex items-center gap-2 pt-2\">{actions}</div> : null}\n </>\n );\n\n return (\n <Tag\n ref={ref as Ref<HTMLAnchorElement & HTMLDivElement>}\n href={sanitizedHref}\n className={cn(\n \"group relative flex flex-col gap-3 rounded-xl border bg-card p-5 shadow-sm\",\n \"transition-[box-shadow,transform,border-color] duration-base ease-out-soft\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n isLink && \"hover:-translate-y-px cursor-pointer hover:border-primary/50 hover:shadow-md\",\n className,\n )}\n {...(props as HTMLAttributes<HTMLAnchorElement> & HTMLAttributes<HTMLDivElement>)}\n >\n {content}\n </Tag>\n );\n },\n);\nProjectCard.displayName = \"ProjectCard\";\n\nexport { ProjectCard };\n"
22
+ "content": "import { Activity, GitBranch, GitCommit } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/lib/cn\";\nimport { safeHref } from \"@/lib/safe-href\";\nimport { Badge } from \"@/components/ui/badge\";\nimport type { DeploymentStatus } from \"@/components/blocks/deployment-row\";\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};\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\nexport interface Project {\n id: string;\n name: string;\n description?: string;\n framework?: string;\n branch: string;\n commitSha: string;\n commitMessage?: string;\n status: DeploymentStatus;\n url?: string;\n region?: string;\n lastDeployedAt: string;\n}\n\ninterface ProjectCardProps extends HTMLAttributes<HTMLAnchorElement | HTMLDivElement> {\n project: Project;\n href?: string;\n actions?: ReactNode;\n /**\n * Show the project description and commit message. Default true.\n */\n detailed?: boolean;\n}\n\n/**\n * ProjectCard — surface for a project in a project listing.\n *\n * Light hover lift (no shadow inflation), violet ring on focus,\n * status badge with optional pulse, framework + region in muted footer.\n */\nconst ProjectCard = forwardRef<HTMLElement, ProjectCardProps>(\n ({ className, project, href, actions, detailed = true, ...props }, ref) => {\n // T3.3 (SEC-003): defang javascript:/vbscript:/data:text/html before\n // rendering as <a href>. Consumers passing user-controlled URLs are\n // protected from XSS via dangerous protocols.\n const sanitizedHref = safeHref(href);\n const isLink = sanitizedHref !== undefined;\n const Tag = isLink ? \"a\" : \"div\";\n const isAnimated =\n project.status === \"building\" ||\n project.status === \"deploying\" ||\n project.status === \"queued\";\n\n const content = (\n <>\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate font-display text-title-md tracking-tight\">{project.name}</h3>\n {project.framework ? (\n <p className=\"mt-0.5 font-mono text-label-caps text-muted-foreground uppercase\">\n {project.framework}\n </p>\n ) : null}\n </div>\n <Badge variant={statusToVariant[project.status]}>\n <Badge.Dot tone={statusToDotTone[project.status]} pulse={isAnimated} />\n {project.status === \"live\"\n ? \"Live\"\n : project.status === \"building\"\n ? \"Building\"\n : project.status === \"deploying\"\n ? \"Deploying\"\n : project.status === \"queued\"\n ? \"Queued\"\n : project.status === \"failed\"\n ? \"Failed\"\n : \"Cancelled\"}\n </Badge>\n </div>\n\n {detailed && project.description ? (\n <p className=\"line-clamp-2 text-body-sm text-muted-foreground\">{project.description}</p>\n ) : null}\n\n {detailed && project.commitMessage ? (\n <p className=\"line-clamp-1 font-mono text-code-sm text-foreground/80\">\n {project.commitMessage}\n </p>\n ) : null}\n\n <div className=\"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-code-sm text-muted-foreground\">\n <span className=\"inline-flex items-center gap-1\">\n <GitBranch className=\"size-3\" /> {project.branch}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <GitCommit className=\"size-3\" /> {project.commitSha.slice(0, 7)}\n </span>\n {project.region ? (\n <span className=\"inline-flex items-center gap-1\">\n <Activity className=\"size-3\" /> {project.region}\n </span>\n ) : null}\n <span aria-hidden=\"true\">·</span>\n <span>{project.lastDeployedAt}</span>\n </div>\n\n {actions ? <div className=\"flex items-center gap-2 pt-2\">{actions}</div> : null}\n </>\n );\n\n return (\n <Tag\n data-slot=\"project-card\"\n ref={ref as Ref<HTMLAnchorElement & HTMLDivElement>}\n href={sanitizedHref}\n className={cn(\n \"group relative flex flex-col gap-3 rounded-xl border bg-card p-5 shadow-sm\",\n \"transition-[box-shadow,transform,border-color] duration-base ease-out-soft\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n isLink && \"hover:-translate-y-px cursor-pointer hover:border-primary/50 hover:shadow-md\",\n className,\n )}\n {...(props as HTMLAttributes<HTMLAnchorElement> & HTMLAttributes<HTMLDivElement>)}\n >\n {content}\n </Tag>\n );\n },\n);\nProjectCard.displayName = \"ProjectCard\";\n\nexport { ProjectCard };\n"
23
23
  }
24
24
  ]
25
25
  }
@@ -16,7 +16,7 @@
16
16
  "path": "components/primitives/project-switcher/project-switcher.tsx",
17
17
  "type": "registry:ui",
18
18
  "target": "components/ui/project-switcher.tsx",
19
- "content": "import { ChevronsUpDown, GitBranch } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * ProjectSwitcher — sidebar header for a code agent app.\n *\n * Shows the active workspace (folder name) + branch + status dot + a tiny\n * `ChevronsUpDown` hint when clickable. Used in Sidebar.Header to anchor the\n * current project context for the session list below.\n *\n * <Sidebar.Header className=\"p-0\">\n * <ProjectSwitcher\n * workspace=\"acme-web\"\n * branch=\"claude/alignment-grid\"\n * status=\"running\"\n * onClick={openProjectPicker}\n * />\n * </Sidebar.Header>\n *\n * If `onClick` is omitted, renders as a static `<div>` (no chevron, not focusable).\n */\n\nexport type ProjectStatus = \"idle\" | \"running\" | \"error\" | \"offline\";\n\nconst STATUS_CLASS: Record<ProjectStatus, string> = {\n idle: \"bg-muted-foreground/40\",\n running: \"bg-success animate-pulse\",\n error: \"bg-destructive\",\n offline: \"bg-muted-foreground/20\",\n};\n\nconst STATUS_LABEL: Record<ProjectStatus, string> = {\n idle: \"Idle\",\n running: \"Agent running\",\n error: \"Error\",\n offline: \"Offline\",\n};\n\ninterface ProjectSwitcherProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\" | \"children\"> {\n /** Workspace / folder name (e.g. \"acme-web\"). */\n workspace: ReactNode;\n /** Optional git branch. Renders inline with a GitBranch icon. */\n branch?: ReactNode;\n /** Optional status dot. Defaults to \"idle\". */\n status?: ProjectStatus;\n /** Brand letter / icon shown in the violet tile. Default: first char of workspace if string. */\n brand?: ReactNode;\n}\n\nconst ProjectSwitcher = forwardRef<HTMLButtonElement, ProjectSwitcherProps>(\n ({ className, workspace, branch, status = \"idle\", brand, onClick, disabled, ...props }, ref) => {\n const isInteractive = !!onClick;\n const inferredBrand =\n brand ?? (typeof workspace === \"string\" ? workspace.charAt(0).toUpperCase() : \"·\");\n const content = (\n <>\n <span\n className=\"grid size-8 shrink-0 place-items-center rounded-lg bg-primary font-black font-display text-primary-foreground\"\n aria-hidden=\"true\"\n >\n {inferredBrand}\n </span>\n <div className=\"grid min-w-0 flex-1 text-left\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <span className=\"truncate font-display text-title-md leading-none\">{workspace}</span>\n <span\n className={cn(\"size-1.5 shrink-0 rounded-full\", STATUS_CLASS[status])}\n aria-label={STATUS_LABEL[status]}\n role=\"img\"\n />\n </div>\n {branch ? (\n <span className=\"mt-1 inline-flex items-center gap-1 truncate font-mono text-label text-muted-foreground\">\n <GitBranch className=\"size-3 shrink-0\" aria-hidden=\"true\" /> {branch}\n </span>\n ) : null}\n </div>\n {isInteractive ? (\n <ChevronsUpDown className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n ) : null}\n </>\n );\n\n if (!isInteractive) {\n return (\n <div\n className={cn(\"flex w-full items-center gap-3 px-5 py-3 text-card-foreground\", className)}\n aria-disabled={disabled || undefined}\n >\n {content}\n </div>\n );\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className={cn(\n \"flex w-full items-center gap-3 px-5 py-3 text-card-foreground\",\n \"transition-colors hover:bg-muted/40\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {content}\n </button>\n );\n },\n);\nProjectSwitcher.displayName = \"ProjectSwitcher\";\n\nexport { ProjectSwitcher };\n"
19
+ "content": "import { ChevronsUpDown, GitBranch } from \"lucide-react\";\nimport { forwardRef } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * ProjectSwitcher — sidebar header for a code agent app.\n *\n * Shows the active workspace (folder name) + branch + status dot + a tiny\n * `ChevronsUpDown` hint when clickable. Used in Sidebar.Header to anchor the\n * current project context for the session list below.\n *\n * <Sidebar.Header className=\"p-0\">\n * <ProjectSwitcher\n * workspace=\"acme-web\"\n * branch=\"claude/alignment-grid\"\n * status=\"running\"\n * onClick={openProjectPicker}\n * />\n * </Sidebar.Header>\n *\n * If `onClick` is omitted, renders as a static `<div>` (no chevron, not focusable).\n */\n\nexport type ProjectStatus = \"idle\" | \"running\" | \"error\" | \"offline\";\n\nconst STATUS_CLASS: Record<ProjectStatus, string> = {\n idle: \"bg-muted-foreground/40\",\n running: \"bg-success animate-pulse\",\n error: \"bg-destructive\",\n offline: \"bg-muted-foreground/20\",\n};\n\nconst STATUS_LABEL: Record<ProjectStatus, string> = {\n idle: \"Idle\",\n running: \"Agent running\",\n error: \"Error\",\n offline: \"Offline\",\n};\n\ninterface ProjectSwitcherProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"type\" | \"children\"> {\n /** Workspace / folder name (e.g. \"acme-web\"). */\n workspace: ReactNode;\n /** Optional git branch. Renders inline with a GitBranch icon. */\n branch?: ReactNode;\n /** Optional status dot. Defaults to \"idle\". */\n status?: ProjectStatus;\n /** Brand letter / icon shown in the violet tile. Default: first char of workspace if string. */\n brand?: ReactNode;\n}\n\nconst ProjectSwitcher = forwardRef<HTMLButtonElement, ProjectSwitcherProps>(\n ({ className, workspace, branch, status = \"idle\", brand, onClick, disabled, ...props }, ref) => {\n const isInteractive = !!onClick;\n const inferredBrand =\n brand ?? (typeof workspace === \"string\" ? workspace.charAt(0).toUpperCase() : \"·\");\n const content = (\n <>\n <span\n className=\"grid size-8 shrink-0 place-items-center rounded-lg bg-primary font-black font-display text-primary-foreground\"\n aria-hidden=\"true\"\n >\n {inferredBrand}\n </span>\n <div className=\"grid min-w-0 flex-1 text-left\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <span className=\"truncate font-display text-title-md leading-none\">{workspace}</span>\n <span\n className={cn(\"size-1.5 shrink-0 rounded-full\", STATUS_CLASS[status])}\n aria-label={STATUS_LABEL[status]}\n role=\"img\"\n />\n </div>\n {branch ? (\n <span className=\"mt-1 inline-flex items-center gap-1 truncate font-mono text-label text-muted-foreground\">\n <GitBranch className=\"size-3 shrink-0\" aria-hidden=\"true\" /> {branch}\n </span>\n ) : null}\n </div>\n {isInteractive ? (\n <ChevronsUpDown className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden=\"true\" />\n ) : null}\n </>\n );\n\n if (!isInteractive) {\n return (\n <div\n className={cn(\"flex w-full items-center gap-3 px-5 py-3 text-card-foreground\", className)}\n aria-disabled={disabled || undefined}\n >\n {content}\n </div>\n );\n }\n\n return (\n <button\n data-slot=\"project-switcher\"\n ref={ref}\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className={cn(\n \"flex w-full items-center gap-3 px-5 py-3 text-card-foreground\",\n \"transition-colors hover:bg-muted/40\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {content}\n </button>\n );\n },\n);\nProjectSwitcher.displayName = \"ProjectSwitcher\";\n\nexport { ProjectSwitcher };\n"
20
20
  }
21
21
  ]
22
22
  }