@major-tech/ui 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (495) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/THIRD_PARTY_NOTICES.md +27 -0
  3. package/dist/components/accordion.d.ts +33 -0
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +51 -0
  6. package/dist/components/accordion.js.map +1 -0
  7. package/dist/components/activity-chart.d.ts +26 -0
  8. package/dist/components/activity-chart.d.ts.map +1 -0
  9. package/dist/components/activity-chart.js +56 -0
  10. package/dist/components/activity-chart.js.map +1 -0
  11. package/dist/components/alert-dialog.d.ts +28 -0
  12. package/dist/components/alert-dialog.d.ts.map +1 -0
  13. package/dist/components/alert-dialog.js +51 -0
  14. package/dist/components/alert-dialog.js.map +1 -0
  15. package/dist/components/alert.d.ts +34 -0
  16. package/dist/components/alert.d.ts.map +1 -0
  17. package/dist/components/alert.js +59 -0
  18. package/dist/components/alert.js.map +1 -0
  19. package/dist/components/ask-user-question.d.ts +103 -0
  20. package/dist/components/ask-user-question.d.ts.map +1 -0
  21. package/dist/components/ask-user-question.js +401 -0
  22. package/dist/components/ask-user-question.js.map +1 -0
  23. package/dist/components/attachment-gallery.d.ts +137 -0
  24. package/dist/components/attachment-gallery.d.ts.map +1 -0
  25. package/dist/components/attachment-gallery.js +317 -0
  26. package/dist/components/attachment-gallery.js.map +1 -0
  27. package/dist/components/avatar.d.ts +37 -0
  28. package/dist/components/avatar.d.ts.map +1 -0
  29. package/dist/components/avatar.js +62 -0
  30. package/dist/components/avatar.js.map +1 -0
  31. package/dist/components/badge.d.ts +29 -0
  32. package/dist/components/badge.d.ts.map +1 -0
  33. package/dist/components/badge.js +50 -0
  34. package/dist/components/badge.js.map +1 -0
  35. package/dist/components/brand-tile.d.ts +33 -0
  36. package/dist/components/brand-tile.d.ts.map +1 -0
  37. package/dist/components/brand-tile.js +36 -0
  38. package/dist/components/brand-tile.js.map +1 -0
  39. package/dist/components/button.d.ts +51 -0
  40. package/dist/components/button.d.ts.map +1 -0
  41. package/dist/components/button.js +90 -0
  42. package/dist/components/button.js.map +1 -0
  43. package/dist/components/calendar.d.ts +18 -0
  44. package/dist/components/calendar.d.ts.map +1 -0
  45. package/dist/components/calendar.js +78 -0
  46. package/dist/components/calendar.js.map +1 -0
  47. package/dist/components/card.d.ts +18 -0
  48. package/dist/components/card.d.ts.map +1 -0
  49. package/dist/components/card.js +34 -0
  50. package/dist/components/card.js.map +1 -0
  51. package/dist/components/carousel.d.ts +48 -0
  52. package/dist/components/carousel.d.ts.map +1 -0
  53. package/dist/components/carousel.js +227 -0
  54. package/dist/components/carousel.js.map +1 -0
  55. package/dist/components/catalog-card.d.ts +29 -0
  56. package/dist/components/catalog-card.d.ts.map +1 -0
  57. package/dist/components/catalog-card.js +20 -0
  58. package/dist/components/catalog-card.js.map +1 -0
  59. package/dist/components/chart.d.ts +118 -0
  60. package/dist/components/chart.d.ts.map +1 -0
  61. package/dist/components/chart.js +209 -0
  62. package/dist/components/chart.js.map +1 -0
  63. package/dist/components/checkbox.d.ts +8 -0
  64. package/dist/components/checkbox.d.ts.map +1 -0
  65. package/dist/components/checkbox.js +14 -0
  66. package/dist/components/checkbox.js.map +1 -0
  67. package/dist/components/chip.d.ts +68 -0
  68. package/dist/components/chip.d.ts.map +1 -0
  69. package/dist/components/chip.js +100 -0
  70. package/dist/components/chip.js.map +1 -0
  71. package/dist/components/code-block.d.ts +99 -0
  72. package/dist/components/code-block.d.ts.map +1 -0
  73. package/dist/components/code-block.js +144 -0
  74. package/dist/components/code-block.js.map +1 -0
  75. package/dist/components/collapsible.d.ts +17 -0
  76. package/dist/components/collapsible.d.ts.map +1 -0
  77. package/dist/components/collapsible.js +25 -0
  78. package/dist/components/collapsible.js.map +1 -0
  79. package/dist/components/command.d.ts +51 -0
  80. package/dist/components/command.d.ts.map +1 -0
  81. package/dist/components/command.js +120 -0
  82. package/dist/components/command.js.map +1 -0
  83. package/dist/components/composer.d.ts +211 -0
  84. package/dist/components/composer.d.ts.map +1 -0
  85. package/dist/components/composer.js +605 -0
  86. package/dist/components/composer.js.map +1 -0
  87. package/dist/components/connector-request.d.ts +63 -0
  88. package/dist/components/connector-request.d.ts.map +1 -0
  89. package/dist/components/connector-request.js +57 -0
  90. package/dist/components/connector-request.js.map +1 -0
  91. package/dist/components/context-menu.d.ts +26 -0
  92. package/dist/components/context-menu.d.ts.map +1 -0
  93. package/dist/components/context-menu.js +33 -0
  94. package/dist/components/context-menu.js.map +1 -0
  95. package/dist/components/data-table.d.ts +61 -0
  96. package/dist/components/data-table.d.ts.map +1 -0
  97. package/dist/components/data-table.js +79 -0
  98. package/dist/components/data-table.js.map +1 -0
  99. package/dist/components/date-range-picker.d.ts +54 -0
  100. package/dist/components/date-range-picker.d.ts.map +1 -0
  101. package/dist/components/date-range-picker.js +451 -0
  102. package/dist/components/date-range-picker.js.map +1 -0
  103. package/dist/components/dialog.d.ts +46 -0
  104. package/dist/components/dialog.d.ts.map +1 -0
  105. package/dist/components/dialog.js +75 -0
  106. package/dist/components/dialog.js.map +1 -0
  107. package/dist/components/drawer.d.ts +85 -0
  108. package/dist/components/drawer.d.ts.map +1 -0
  109. package/dist/components/drawer.js +166 -0
  110. package/dist/components/drawer.js.map +1 -0
  111. package/dist/components/dropdown-menu.d.ts +77 -0
  112. package/dist/components/dropdown-menu.d.ts.map +1 -0
  113. package/dist/components/dropdown-menu.js +112 -0
  114. package/dist/components/dropdown-menu.js.map +1 -0
  115. package/dist/components/editor-tabs.d.ts +49 -0
  116. package/dist/components/editor-tabs.d.ts.map +1 -0
  117. package/dist/components/editor-tabs.js +159 -0
  118. package/dist/components/editor-tabs.js.map +1 -0
  119. package/dist/components/empty-state.d.ts +21 -0
  120. package/dist/components/empty-state.d.ts.map +1 -0
  121. package/dist/components/empty-state.js +14 -0
  122. package/dist/components/empty-state.js.map +1 -0
  123. package/dist/components/entity-card.d.ts +301 -0
  124. package/dist/components/entity-card.d.ts.map +1 -0
  125. package/dist/components/entity-card.js +392 -0
  126. package/dist/components/entity-card.js.map +1 -0
  127. package/dist/components/entity-row.d.ts +37 -0
  128. package/dist/components/entity-row.d.ts.map +1 -0
  129. package/dist/components/entity-row.js +65 -0
  130. package/dist/components/entity-row.js.map +1 -0
  131. package/dist/components/env-var-request.d.ts +51 -0
  132. package/dist/components/env-var-request.d.ts.map +1 -0
  133. package/dist/components/env-var-request.js +50 -0
  134. package/dist/components/env-var-request.js.map +1 -0
  135. package/dist/components/field.d.ts +30 -0
  136. package/dist/components/field.d.ts.map +1 -0
  137. package/dist/components/field.js +48 -0
  138. package/dist/components/field.js.map +1 -0
  139. package/dist/components/file-upload.d.ts +108 -0
  140. package/dist/components/file-upload.d.ts.map +1 -0
  141. package/dist/components/file-upload.js +217 -0
  142. package/dist/components/file-upload.js.map +1 -0
  143. package/dist/components/hover-card.d.ts +18 -0
  144. package/dist/components/hover-card.d.ts.map +1 -0
  145. package/dist/components/hover-card.js +84 -0
  146. package/dist/components/hover-card.js.map +1 -0
  147. package/dist/components/input-group.d.ts +29 -0
  148. package/dist/components/input-group.d.ts.map +1 -0
  149. package/dist/components/input-group.js +61 -0
  150. package/dist/components/input-group.js.map +1 -0
  151. package/dist/components/input.d.ts +9 -0
  152. package/dist/components/input.d.ts.map +1 -0
  153. package/dist/components/input.js +13 -0
  154. package/dist/components/input.js.map +1 -0
  155. package/dist/components/island.d.ts +18 -0
  156. package/dist/components/island.d.ts.map +1 -0
  157. package/dist/components/island.js +30 -0
  158. package/dist/components/island.js.map +1 -0
  159. package/dist/components/kbd.d.ts +7 -0
  160. package/dist/components/kbd.d.ts.map +1 -0
  161. package/dist/components/kbd.js +11 -0
  162. package/dist/components/kbd.js.map +1 -0
  163. package/dist/components/label.d.ts +8 -0
  164. package/dist/components/label.d.ts.map +1 -0
  165. package/dist/components/label.js +12 -0
  166. package/dist/components/label.js.map +1 -0
  167. package/dist/components/markdown.d.ts +24 -0
  168. package/dist/components/markdown.d.ts.map +1 -0
  169. package/dist/components/markdown.js +38 -0
  170. package/dist/components/markdown.js.map +1 -0
  171. package/dist/components/message.d.ts +38 -0
  172. package/dist/components/message.d.ts.map +1 -0
  173. package/dist/components/message.js +25 -0
  174. package/dist/components/message.js.map +1 -0
  175. package/dist/components/page-header.d.ts +31 -0
  176. package/dist/components/page-header.d.ts.map +1 -0
  177. package/dist/components/page-header.js +94 -0
  178. package/dist/components/page-header.js.map +1 -0
  179. package/dist/components/pagination.d.ts +22 -0
  180. package/dist/components/pagination.d.ts.map +1 -0
  181. package/dist/components/pagination.js +36 -0
  182. package/dist/components/pagination.js.map +1 -0
  183. package/dist/components/password-input.d.ts +5 -0
  184. package/dist/components/password-input.d.ts.map +1 -0
  185. package/dist/components/password-input.js +12 -0
  186. package/dist/components/password-input.js.map +1 -0
  187. package/dist/components/pepper.d.ts +92 -0
  188. package/dist/components/pepper.d.ts.map +1 -0
  189. package/dist/components/pepper.js +1279 -0
  190. package/dist/components/pepper.js.map +1 -0
  191. package/dist/components/permission-request.d.ts +53 -0
  192. package/dist/components/permission-request.d.ts.map +1 -0
  193. package/dist/components/permission-request.js +54 -0
  194. package/dist/components/permission-request.js.map +1 -0
  195. package/dist/components/popover.d.ts +42 -0
  196. package/dist/components/popover.d.ts.map +1 -0
  197. package/dist/components/popover.js +76 -0
  198. package/dist/components/popover.js.map +1 -0
  199. package/dist/components/progress.d.ts +9 -0
  200. package/dist/components/progress.d.ts.map +1 -0
  201. package/dist/components/progress.js +12 -0
  202. package/dist/components/progress.js.map +1 -0
  203. package/dist/components/progressive-blur.d.ts +31 -0
  204. package/dist/components/progressive-blur.d.ts.map +1 -0
  205. package/dist/components/progressive-blur.js +44 -0
  206. package/dist/components/progressive-blur.js.map +1 -0
  207. package/dist/components/radio-group.d.ts +8 -0
  208. package/dist/components/radio-group.d.ts.map +1 -0
  209. package/dist/components/radio-group.js +15 -0
  210. package/dist/components/radio-group.js.map +1 -0
  211. package/dist/components/request-card.d.ts +34 -0
  212. package/dist/components/request-card.d.ts.map +1 -0
  213. package/dist/components/request-card.js +50 -0
  214. package/dist/components/request-card.js.map +1 -0
  215. package/dist/components/resizable.d.ts +24 -0
  216. package/dist/components/resizable.d.ts.map +1 -0
  217. package/dist/components/resizable.js +40 -0
  218. package/dist/components/resizable.js.map +1 -0
  219. package/dist/components/responsive-overlay.d.ts +136 -0
  220. package/dist/components/responsive-overlay.d.ts.map +1 -0
  221. package/dist/components/responsive-overlay.js +302 -0
  222. package/dist/components/responsive-overlay.js.map +1 -0
  223. package/dist/components/scroll-shadows.d.ts +11 -0
  224. package/dist/components/scroll-shadows.d.ts.map +1 -0
  225. package/dist/components/scroll-shadows.js +53 -0
  226. package/dist/components/scroll-shadows.js.map +1 -0
  227. package/dist/components/search-field.d.ts +16 -0
  228. package/dist/components/search-field.d.ts.map +1 -0
  229. package/dist/components/search-field.js +50 -0
  230. package/dist/components/search-field.js.map +1 -0
  231. package/dist/components/searchable-select.d.ts +43 -0
  232. package/dist/components/searchable-select.d.ts.map +1 -0
  233. package/dist/components/searchable-select.js +39 -0
  234. package/dist/components/searchable-select.js.map +1 -0
  235. package/dist/components/select.d.ts +60 -0
  236. package/dist/components/select.d.ts.map +1 -0
  237. package/dist/components/select.js +94 -0
  238. package/dist/components/select.js.map +1 -0
  239. package/dist/components/separator.d.ts +7 -0
  240. package/dist/components/separator.d.ts.map +1 -0
  241. package/dist/components/separator.js +12 -0
  242. package/dist/components/separator.js.map +1 -0
  243. package/dist/components/settings-section.d.ts +41 -0
  244. package/dist/components/settings-section.d.ts.map +1 -0
  245. package/dist/components/settings-section.js +50 -0
  246. package/dist/components/settings-section.js.map +1 -0
  247. package/dist/components/sidebar-item.d.ts +41 -0
  248. package/dist/components/sidebar-item.d.ts.map +1 -0
  249. package/dist/components/sidebar-item.js +59 -0
  250. package/dist/components/sidebar-item.js.map +1 -0
  251. package/dist/components/skeleton.d.ts +7 -0
  252. package/dist/components/skeleton.d.ts.map +1 -0
  253. package/dist/components/skeleton.js +11 -0
  254. package/dist/components/skeleton.js.map +1 -0
  255. package/dist/components/slider.d.ts +10 -0
  256. package/dist/components/slider.d.ts.map +1 -0
  257. package/dist/components/slider.js +36 -0
  258. package/dist/components/slider.js.map +1 -0
  259. package/dist/components/sonner.d.ts +8 -0
  260. package/dist/components/sonner.d.ts.map +1 -0
  261. package/dist/components/sonner.js +21 -0
  262. package/dist/components/sonner.js.map +1 -0
  263. package/dist/components/spinner.d.ts +7 -0
  264. package/dist/components/spinner.d.ts.map +1 -0
  265. package/dist/components/spinner.js +12 -0
  266. package/dist/components/spinner.js.map +1 -0
  267. package/dist/components/stat-strip.d.ts +20 -0
  268. package/dist/components/stat-strip.d.ts.map +1 -0
  269. package/dist/components/stat-strip.js +11 -0
  270. package/dist/components/stat-strip.js.map +1 -0
  271. package/dist/components/status-dot.d.ts +25 -0
  272. package/dist/components/status-dot.d.ts.map +1 -0
  273. package/dist/components/status-dot.js +31 -0
  274. package/dist/components/status-dot.js.map +1 -0
  275. package/dist/components/subagent-run.d.ts +27 -0
  276. package/dist/components/subagent-run.d.ts.map +1 -0
  277. package/dist/components/subagent-run.js +38 -0
  278. package/dist/components/subagent-run.js.map +1 -0
  279. package/dist/components/switch.d.ts +8 -0
  280. package/dist/components/switch.d.ts.map +1 -0
  281. package/dist/components/switch.js +13 -0
  282. package/dist/components/switch.js.map +1 -0
  283. package/dist/components/system-notice.d.ts +34 -0
  284. package/dist/components/system-notice.d.ts.map +1 -0
  285. package/dist/components/system-notice.js +52 -0
  286. package/dist/components/system-notice.js.map +1 -0
  287. package/dist/components/table.d.ts +27 -0
  288. package/dist/components/table.d.ts.map +1 -0
  289. package/dist/components/table.js +37 -0
  290. package/dist/components/table.js.map +1 -0
  291. package/dist/components/tabs.d.ts +40 -0
  292. package/dist/components/tabs.d.ts.map +1 -0
  293. package/dist/components/tabs.js +52 -0
  294. package/dist/components/tabs.js.map +1 -0
  295. package/dist/components/textarea.d.ts +5 -0
  296. package/dist/components/textarea.d.ts.map +1 -0
  297. package/dist/components/textarea.js +9 -0
  298. package/dist/components/textarea.js.map +1 -0
  299. package/dist/components/thinking-indicator.d.ts +21 -0
  300. package/dist/components/thinking-indicator.d.ts.map +1 -0
  301. package/dist/components/thinking-indicator.js +136 -0
  302. package/dist/components/thinking-indicator.js.map +1 -0
  303. package/dist/components/thread-status.d.ts +25 -0
  304. package/dist/components/thread-status.d.ts.map +1 -0
  305. package/dist/components/thread-status.js +41 -0
  306. package/dist/components/thread-status.js.map +1 -0
  307. package/dist/components/todo-list.d.ts +52 -0
  308. package/dist/components/todo-list.d.ts.map +1 -0
  309. package/dist/components/todo-list.js +137 -0
  310. package/dist/components/todo-list.js.map +1 -0
  311. package/dist/components/toggle-group.d.ts +17 -0
  312. package/dist/components/toggle-group.d.ts.map +1 -0
  313. package/dist/components/toggle-group.js +26 -0
  314. package/dist/components/toggle-group.js.map +1 -0
  315. package/dist/components/toggle.d.ts +27 -0
  316. package/dist/components/toggle.d.ts.map +1 -0
  317. package/dist/components/toggle.js +44 -0
  318. package/dist/components/toggle.js.map +1 -0
  319. package/dist/components/tool-call.d.ts +60 -0
  320. package/dist/components/tool-call.d.ts.map +1 -0
  321. package/dist/components/tool-call.js +94 -0
  322. package/dist/components/tool-call.js.map +1 -0
  323. package/dist/components/tool-result.d.ts +127 -0
  324. package/dist/components/tool-result.d.ts.map +1 -0
  325. package/dist/components/tool-result.js +155 -0
  326. package/dist/components/tool-result.js.map +1 -0
  327. package/dist/components/tooltip.d.ts +18 -0
  328. package/dist/components/tooltip.d.ts.map +1 -0
  329. package/dist/components/tooltip.js +38 -0
  330. package/dist/components/tooltip.js.map +1 -0
  331. package/dist/components/trace.d.ts +38 -0
  332. package/dist/components/trace.d.ts.map +1 -0
  333. package/dist/components/trace.js +52 -0
  334. package/dist/components/trace.js.map +1 -0
  335. package/dist/components/turn-summary.d.ts +17 -0
  336. package/dist/components/turn-summary.d.ts.map +1 -0
  337. package/dist/components/turn-summary.js +19 -0
  338. package/dist/components/turn-summary.js.map +1 -0
  339. package/dist/components/usage-meter.d.ts +16 -0
  340. package/dist/components/usage-meter.d.ts.map +1 -0
  341. package/dist/components/usage-meter.js +10 -0
  342. package/dist/components/usage-meter.js.map +1 -0
  343. package/dist/components/view-switcher.d.ts +25 -0
  344. package/dist/components/view-switcher.d.ts.map +1 -0
  345. package/dist/components/view-switcher.js +196 -0
  346. package/dist/components/view-switcher.js.map +1 -0
  347. package/dist/docs/components/accordion.md +151 -0
  348. package/dist/docs/components/activity-chart.md +104 -0
  349. package/dist/docs/components/alert-dialog.md +216 -0
  350. package/dist/docs/components/alert.md +203 -0
  351. package/dist/docs/components/ask-user-question.md +429 -0
  352. package/dist/docs/components/attachment-gallery.md +377 -0
  353. package/dist/docs/components/avatar.md +197 -0
  354. package/dist/docs/components/badge.md +162 -0
  355. package/dist/docs/components/brand-tile.md +138 -0
  356. package/dist/docs/components/button.md +392 -0
  357. package/dist/docs/components/calendar.md +113 -0
  358. package/dist/docs/components/card.md +157 -0
  359. package/dist/docs/components/carousel.md +144 -0
  360. package/dist/docs/components/catalog-card.md +136 -0
  361. package/dist/docs/components/chart.md +608 -0
  362. package/dist/docs/components/checkbox.md +164 -0
  363. package/dist/docs/components/chip.md +411 -0
  364. package/dist/docs/components/code-block.md +389 -0
  365. package/dist/docs/components/collapsible.md +93 -0
  366. package/dist/docs/components/command.md +276 -0
  367. package/dist/docs/components/composer.md +1092 -0
  368. package/dist/docs/components/connector-request.md +497 -0
  369. package/dist/docs/components/context-menu.md +127 -0
  370. package/dist/docs/components/data-table.md +462 -0
  371. package/dist/docs/components/date-range-picker.md +425 -0
  372. package/dist/docs/components/dialog.md +263 -0
  373. package/dist/docs/components/drawer.md +505 -0
  374. package/dist/docs/components/dropdown-menu.md +336 -0
  375. package/dist/docs/components/editor-tabs.md +284 -0
  376. package/dist/docs/components/empty-state.md +134 -0
  377. package/dist/docs/components/entity-card.md +640 -0
  378. package/dist/docs/components/entity-row.md +291 -0
  379. package/dist/docs/components/env-var-request.md +223 -0
  380. package/dist/docs/components/field.md +272 -0
  381. package/dist/docs/components/file-upload.md +255 -0
  382. package/dist/docs/components/hover-card.md +335 -0
  383. package/dist/docs/components/input-group.md +134 -0
  384. package/dist/docs/components/input.md +97 -0
  385. package/dist/docs/components/island.md +97 -0
  386. package/dist/docs/components/kbd.md +91 -0
  387. package/dist/docs/components/markdown.md +180 -0
  388. package/dist/docs/components/message.md +336 -0
  389. package/dist/docs/components/page-header.md +203 -0
  390. package/dist/docs/components/pagination.md +211 -0
  391. package/dist/docs/components/password-input.md +68 -0
  392. package/dist/docs/components/pepper.md +238 -0
  393. package/dist/docs/components/permission-request.md +265 -0
  394. package/dist/docs/components/popover.md +206 -0
  395. package/dist/docs/components/progress.md +142 -0
  396. package/dist/docs/components/progressive-blur.md +195 -0
  397. package/dist/docs/components/radio-group.md +129 -0
  398. package/dist/docs/components/request-card.md +305 -0
  399. package/dist/docs/components/resizable.md +318 -0
  400. package/dist/docs/components/responsive-overlay.md +449 -0
  401. package/dist/docs/components/scroll-shadows.md +161 -0
  402. package/dist/docs/components/search-field.md +86 -0
  403. package/dist/docs/components/searchable-select.md +144 -0
  404. package/dist/docs/components/select.md +331 -0
  405. package/dist/docs/components/separator.md +80 -0
  406. package/dist/docs/components/settings-section.md +246 -0
  407. package/dist/docs/components/sidebar-item.md +307 -0
  408. package/dist/docs/components/skeleton.md +107 -0
  409. package/dist/docs/components/slider.md +171 -0
  410. package/dist/docs/components/sonner.md +122 -0
  411. package/dist/docs/components/spinner.md +112 -0
  412. package/dist/docs/components/stat-strip.md +85 -0
  413. package/dist/docs/components/status-dot.md +190 -0
  414. package/dist/docs/components/subagent-run.md +196 -0
  415. package/dist/docs/components/switch.md +91 -0
  416. package/dist/docs/components/system-notice.md +144 -0
  417. package/dist/docs/components/table.md +201 -0
  418. package/dist/docs/components/tabs.md +233 -0
  419. package/dist/docs/components/textarea.md +89 -0
  420. package/dist/docs/components/thinking-indicator.md +164 -0
  421. package/dist/docs/components/thread-status.md +143 -0
  422. package/dist/docs/components/todo-list.md +225 -0
  423. package/dist/docs/components/toggle-group.md +117 -0
  424. package/dist/docs/components/toggle.md +132 -0
  425. package/dist/docs/components/tool-call.md +237 -0
  426. package/dist/docs/components/tool-result.md +418 -0
  427. package/dist/docs/components/tooltip.md +136 -0
  428. package/dist/docs/components/trace.md +319 -0
  429. package/dist/docs/components/turn-summary.md +218 -0
  430. package/dist/docs/components/usage-meter.md +69 -0
  431. package/dist/docs/components/view-switcher.md +193 -0
  432. package/dist/docs/foundations/colors.md +83 -0
  433. package/dist/docs/foundations/elevation.md +19 -0
  434. package/dist/docs/foundations/iconography.md +34 -0
  435. package/dist/docs/foundations/layout.md +42 -0
  436. package/dist/docs/foundations/logo.md +111 -0
  437. package/dist/docs/foundations/motion.md +91 -0
  438. package/dist/docs/foundations/radius.md +13 -0
  439. package/dist/docs/foundations/spacing.md +23 -0
  440. package/dist/docs/foundations/typography.md +42 -0
  441. package/dist/docs/getting-started/installation.md +116 -0
  442. package/dist/docs/getting-started/releases.md +59 -0
  443. package/dist/docs/getting-started/theming.md +58 -0
  444. package/dist/docs/guidelines/accessibility.md +28 -0
  445. package/dist/docs/guidelines/content.md +36 -0
  446. package/dist/docs/guidelines/forms.md +36 -0
  447. package/dist/docs/guidelines/principles.md +30 -0
  448. package/dist/docs/hooks/use-is-mobile.md +134 -0
  449. package/dist/docs/index.md +182 -0
  450. package/dist/docs/overview.md +35 -0
  451. package/dist/docs/patterns/chat.md +477 -0
  452. package/dist/docs/patterns/index.md +13 -0
  453. package/dist/docs/patterns/login.md +311 -0
  454. package/dist/docs/patterns/share.md +415 -0
  455. package/dist/hooks/use-is-mobile.d.ts +9 -0
  456. package/dist/hooks/use-is-mobile.d.ts.map +1 -0
  457. package/dist/hooks/use-is-mobile.js +26 -0
  458. package/dist/hooks/use-is-mobile.js.map +1 -0
  459. package/dist/lib/cn.d.ts +4 -0
  460. package/dist/lib/cn.d.ts.map +1 -0
  461. package/dist/lib/cn.js +31 -0
  462. package/dist/lib/cn.js.map +1 -0
  463. package/dist/lib/code-language.d.ts +8 -0
  464. package/dist/lib/code-language.d.ts.map +1 -0
  465. package/dist/lib/code-language.js +48 -0
  466. package/dist/lib/code-language.js.map +1 -0
  467. package/dist/lib/date-range.d.ts +122 -0
  468. package/dist/lib/date-range.d.ts.map +1 -0
  469. package/dist/lib/date-range.js +281 -0
  470. package/dist/lib/date-range.js.map +1 -0
  471. package/dist/lib/major-tokens.d.ts +40 -0
  472. package/dist/lib/major-tokens.d.ts.map +1 -0
  473. package/dist/lib/major-tokens.js +602 -0
  474. package/dist/lib/major-tokens.js.map +1 -0
  475. package/dist/lib/markdown.d.ts +25 -0
  476. package/dist/lib/markdown.d.ts.map +1 -0
  477. package/dist/lib/markdown.js +87 -0
  478. package/dist/lib/markdown.js.map +1 -0
  479. package/dist/lib/overlay-portal-branch.d.ts +6 -0
  480. package/dist/lib/overlay-portal-branch.d.ts.map +1 -0
  481. package/dist/lib/overlay-portal-branch.js +15 -0
  482. package/dist/lib/overlay-portal-branch.js.map +1 -0
  483. package/dist/lib/pepper-matcap.d.ts +2 -0
  484. package/dist/lib/pepper-matcap.d.ts.map +1 -0
  485. package/dist/lib/pepper-matcap.js +4 -0
  486. package/dist/lib/pepper-matcap.js.map +1 -0
  487. package/dist/lib/scroll-fade.d.ts +28 -0
  488. package/dist/lib/scroll-fade.d.ts.map +1 -0
  489. package/dist/lib/scroll-fade.js +57 -0
  490. package/dist/lib/scroll-fade.js.map +1 -0
  491. package/dist/tailwind.css +7 -0
  492. package/dist/theme.css +428 -0
  493. package/package.json +145 -3
  494. package/tokens.json +841 -0
  495. package/README.md +0 -3
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: ToolCall
3
+ slug: tool-call
4
+ description: One tool call as a step line that opens into its input and output, and a run of calls summed up in one line (“Read 3 files, edited 1 file”).
5
+ group: AI
6
+ layer: composed
7
+ status: beta
8
+ since: 0.4.0
9
+ primitive: Collapsible
10
+ import: import { ToolCall, ToolCallOutput, ToolCallGroup, formatToolOutput, TOOL_CALL_STATUSES } from "@major-tech/ui/tool-call";
11
+ source: packages/ui/src/components/tool-call.tsx
12
+ ---
13
+
14
+ # ToolCall
15
+
16
+ ## Usage
17
+
18
+ ### Calls
19
+
20
+ One tool call as a step line: the tool's 14px icon, its name, what it was called on in muted, and how long it took. No status means done.
21
+
22
+ Example: `states`
23
+
24
+ ```tsx
25
+ "use client";
26
+
27
+ import { TOOL_CALL_STATUSES, ToolCall, ToolCallOutput } from "@major-tech/ui/tool-call";
28
+ import { Search, SquarePlus, Wrench } from "lucide-react";
29
+
30
+ const DEALS_INPUT = "resource: HubSpot\ntool: list_deals\nstage: open";
31
+ const DEALS_OUTPUT = "name: Acme renewal\namount: 24000\n\nname: Globex pilot\namount: 8000";
32
+ const POST_INPUT = "resource: Slack\ntool: post_message\nchannel: #deploys";
33
+ const POST_ERROR = "Error: channel_not_found\nThe bot isn't a member of #deploys.";
34
+
35
+ export default function ToolCallStates() {
36
+ return (
37
+ <div className="flex w-full max-w-2xl flex-col">
38
+ <ToolCall icon={<Search />} name="Grep" description="useChatStore in src" status={TOOL_CALL_STATUSES.RUNNING} />
39
+ <ToolCall icon={<Wrench />} name="Execute Resource Tool" description="List open deals in HubSpot" duration="1s">
40
+ <ToolCallOutput label="Input" value={DEALS_INPUT} />
41
+ <ToolCallOutput label="Output" value={DEALS_OUTPUT} />
42
+ </ToolCall>
43
+ <ToolCall icon={<SquarePlus />} name="Create Branch" description="settings-page" />
44
+ <ToolCall
45
+ icon={<Wrench />}
46
+ name="Execute Resource Tool"
47
+ description="Post to #deploys"
48
+ status={TOOL_CALL_STATUSES.ERROR}
49
+ duration="2s"
50
+ >
51
+ <ToolCallOutput label="Input" value={POST_INPUT} />
52
+ <ToolCallOutput label="Error" value={POST_ERROR} isError />
53
+ </ToolCall>
54
+ </div>
55
+ );
56
+ }
57
+ ```
58
+
59
+ - **running**: the name and what it was called on shimmer together, and the line opens only once the call returns.
60
+ - **error**: the line reads in danger. It opens into what went wrong: an Error ToolCallOutput, or ToolResultError for a tool that has a ToolResult part.
61
+ - A call opens only when it has something to show: its children. Create Branch says it all on its line.
62
+ - Each call is its own Trace, so it is set the same in a turn's steps or on its own.
63
+
64
+ ### Input and output
65
+
66
+ A tool with no display of its own opens into its input and output: `ToolCallOutput` blocks on a small CodeBlock, wrapped, up to 240px tall, each with a copy button.
67
+
68
+ Example: `output`
69
+
70
+ ```tsx
71
+ "use client";
72
+
73
+ import { ToolCall, ToolCallOutput, formatToolOutput } from "@major-tech/ui/tool-call";
74
+ import { Wrench } from "lucide-react";
75
+
76
+ const INPUT = "resource: HubSpot\ntool: list_deals\nstage: open\nlimit: 2";
77
+ // As the tool returned it: JSON, which formatToolOutput shows without its braces.
78
+ const OUTPUT = JSON.stringify([
79
+ { id: "deal_8213", name: "Acme renewal", amount: 48000, stage: "Negotiation" },
80
+ { id: "deal_8240", name: "Globex pilot", amount: 12500, stage: "Proposal" },
81
+ ]);
82
+
83
+ export default function ToolCallOutputExample() {
84
+ return (
85
+ <div className="flex w-full max-w-2xl flex-col">
86
+ <ToolCall
87
+ icon={<Wrench />}
88
+ name="Execute Resource Tool"
89
+ description="List open deals in HubSpot"
90
+ duration="2s"
91
+ defaultOpen
92
+ >
93
+ <ToolCallOutput label="Input" value={INPUT} />
94
+ <ToolCallOutput label="Output" value={formatToolOutput(OUTPUT)} />
95
+ </ToolCall>
96
+ </div>
97
+ );
98
+ }
99
+ ```
100
+
101
+ - Input first, then Output. A failed call’s output is labelled Error and drawn in danger, with `isError`.
102
+ - Pass the output through `formatToolOutput`: a JSON object reads without its braces, a list of objects as those blocks one after another.
103
+ - Leave the description out of the input: it is on the line already.
104
+ - Bash, Read, Write, Edit, Grep and Major’s own tools open into a [ToolResult](tool-result.md) part instead: their command, file or diff, never raw input and output.
105
+
106
+ ### Several calls in a row
107
+
108
+ Calls in a row fold into one `ToolCallGroup` line that sums them up, “Ran 1 search, read 2 files”, and opens into the calls behind a line rule.
109
+
110
+ Example: `group`
111
+
112
+ ```tsx
113
+ "use client";
114
+
115
+ import { TOOL_CALL_STATUSES, ToolCall, ToolCallGroup } from "@major-tech/ui/tool-call";
116
+ import { Code, FileText, Search } from "lucide-react";
117
+
118
+ export default function ToolCallGroupExample() {
119
+ return (
120
+ <div className="flex w-full max-w-2xl flex-col">
121
+ <ToolCallGroup icon={<FileText />} title="Ran 1 search, read 2 files" duration="4s" defaultOpen>
122
+ <ToolCall icon={<Search />} name="Grep" description="useChatStore in src · 6 matches in 3 files" />
123
+ <ToolCall icon={<FileText />} name="Read" description="message/message-stream.tsx" />
124
+ <ToolCall icon={<FileText />} name="Read" description="store/store.ts" duration="1s" />
125
+ </ToolCallGroup>
126
+ <ToolCallGroup
127
+ icon={<Code />}
128
+ title="Read 3 files, edited 1 file"
129
+ activity="Edit"
130
+ status={TOOL_CALL_STATUSES.RUNNING}
131
+ duration="9s"
132
+ >
133
+ <ToolCall icon={<FileText />} name="Read" description="message/message-stream.tsx" />
134
+ <ToolCall icon={<FileText />} name="Read" description="store/store.ts" />
135
+ <ToolCall icon={<FileText />} name="Read" description="store/selectors.ts" />
136
+ <ToolCall
137
+ icon={<Code />}
138
+ name="Edit"
139
+ description="message/message-stream.tsx"
140
+ status={TOOL_CALL_STATUSES.RUNNING}
141
+ />
142
+ </ToolCallGroup>
143
+ </div>
144
+ );
145
+ }
146
+ ```
147
+
148
+ - The line wears the latest call's icon, so a running group shows what it is doing now.
149
+ - While it runs, `activity` names the running call after the title (“· Edit”), and the duration keeps counting.
150
+ - Calls group from two in a row. Sum them up by what they did, in the past tense, first word capitalised: “Read 3 files, edited 1 file”, “Ran 2 commands”; any other tool by its name, “Execute Resource Tool ×2”. After three kinds of call the rest is “+2 more”.
151
+ - The group reads in danger when any of its calls failed.
152
+ - Under a finished turn’s [TurnSummary](turn-summary.md) the steps are one flat list: a group gives up its row there and shows its calls.
153
+
154
+ ### Guidelines
155
+
156
+ Do:
157
+
158
+ - Name the tool as people know it: Read, Bash, Execute Resource Tool.
159
+ - Say what it was called on in a few words: a path's last two parts, a command's purpose, a pattern.
160
+ - Show a duration from one second up.
161
+
162
+ Don't:
163
+
164
+ - Show a tool's internal name (`mcp__major__execute_resource_tool`) or ids on the line.
165
+ - Show raw input and output for a tool that has a ToolResult display.
166
+ - Open the calls of a turn in history by default.
167
+
168
+ ## API
169
+
170
+ ```tsx
171
+ import { ToolCall, ToolCallOutput, ToolCallGroup, formatToolOutput, TOOL_CALL_STATUSES } from "@major-tech/ui/tool-call";
172
+ ```
173
+
174
+ ### `<ToolCall />`
175
+
176
+ Renders a Trace (a `<div>`) and takes every `<div>` attribute but `title`. Its children are what it opens into.
177
+
178
+ | Prop | Type | Default | Description |
179
+ | --- | --- | --- | --- |
180
+ | `icon`* | `ReactNode` | — | The tool's icon, 14px in muted. |
181
+ | `name`* | `string` | — | The tool as people know it: “Read”. |
182
+ | `description` | `ReactNode` | — | What it was called on, in muted after the name: “components/button.tsx”. |
183
+ | `status` | `"running" \| "error"` | — | No status means done. |
184
+ | `duration` | `string` | — | How long it took, formatted: “3s”. |
185
+ | `defaultOpen` | `boolean` | `false` | Open at first. |
186
+ | `children` | `ReactNode` | — | What it opens into: ToolCallOutput blocks or a ToolResult part. None: a plain line. |
187
+
188
+ `*` marks a required prop.
189
+
190
+ ### `<ToolCallOutput />`
191
+
192
+ A CodeBlock in the small size; takes every `<div>` attribute.
193
+
194
+ | Prop | Type | Default | Description |
195
+ | --- | --- | --- | --- |
196
+ | `label`* | `string` | — | “Input”, “Output” or “Error”. |
197
+ | `value`* | `string` | — | The text the block shows and copies. |
198
+ | `isError` | `boolean` | `false` | A failed call's output: the block in danger. |
199
+
200
+ `*` marks a required prop.
201
+
202
+ ### `<ToolCallGroup />`
203
+
204
+ Renders a Trace (a `<div>`) and takes every `<div>` attribute but `title`. Its children are the calls.
205
+
206
+ | Prop | Type | Default | Description |
207
+ | --- | --- | --- | --- |
208
+ | `icon`* | `ReactNode` | — | The latest call's icon. |
209
+ | `title`* | `ReactNode` | — | The calls summed up: “Read 3 files, edited 1 file”. |
210
+ | `activity` | `string` | — | The running call's name, after the title while the group runs: “· Edit”. |
211
+ | `status` | `"running" \| "error"` | — | Running while a call runs, error when any failed; none means done. |
212
+ | `duration` | `string` | — | How long the run took, or has so far: “9s”. |
213
+ | `defaultOpen` | `boolean` | `false` | Open at first. |
214
+
215
+ `*` marks a required prop.
216
+
217
+ ### `formatToolOutput(text)`
218
+
219
+ | Prop | Type | Default | Description |
220
+ | --- | --- | --- | --- |
221
+ | `text`* | `string` | — | A tool's output as it came. Returns it formatted for ToolCallOutput, or as it was. Call it in client code: tool-call is a client module. |
222
+
223
+ `*` marks a required prop.
224
+
225
+ ### `TOOL_CALL_STATUSES`
226
+
227
+ | Prop | Type | Default | Description |
228
+ | --- | --- | --- | --- |
229
+ | `RUNNING · ERROR` | `ToolCallStatus` | — | The status values. |
230
+
231
+ ### Accessibility
232
+
233
+ - A call that opens, and a group, are buttons with `aria-expanded` (Base UI Collapsible); a call with nothing to open is text.
234
+ - When what it was called on is text, the line's `title` attribute holds it with the name in full, for a truncated line.
235
+ - The icons and the chevron are decorative (`aria-hidden`); a running or failed call is read with “running” or “failed” after its title, since colour and shimmer say it only to the eye.
236
+ - The copy button is named Copy and says Copied in a live region.
237
+ - With reduced motion the shimmer stops; the text stays readable.
@@ -0,0 +1,418 @@
1
+ ---
2
+ name: ToolResult
3
+ slug: tool-result
4
+ description: "What an open tool call shows in place of raw output: a command and its output, a file, an edit's diff, search matches, a list, a created app, an error."
5
+ group: AI
6
+ layer: composed
7
+ status: beta
8
+ since: 0.4.0
9
+ import: import { ToolResultTerminal, ToolResultFile, ToolResultDiff, ToolResultMatches, ToolResultList, ToolResultListItem, ToolResultCreated, ToolResultError, summarizeMatches, TOOL_RESULT_SANDBOX_STATES } from "@major-tech/ui/tool-result";
10
+ source: packages/ui/src/components/tool-result.tsx
11
+ ---
12
+
13
+ # ToolResult
14
+
15
+ ## Usage
16
+
17
+ ### In an open tool call
18
+
19
+ What a ToolCall opens into for the tools the chat knows, in place of its raw input and output. Each part is a 12.5px CodeBlock (sm) that scrolls past 320px (an error past 240px), and takes plain data: the product reads the tool's result and passes strings and rows.
20
+
21
+ - **Bash**: `ToolResultTerminal`.
22
+ - **Read and Write**: `ToolResultFile`.
23
+ - **Edit**: `ToolResultDiff`.
24
+ - **Grep**: `ToolResultMatches`.
25
+ - **List apps, agents, sandboxes, branches**: `ToolResultList`.
26
+ - **Create app**: `ToolResultCreated`.
27
+ - **Any failed call**: `ToolResultError`, except Bash, whose terminal shows the failure itself.
28
+ - A tool with none of these shows its Input and Output (`ToolCallOutput`); a tool whose line says it all (Skill, Start sandbox, Create branch) opens nothing.
29
+ - Each part is the children of a [ToolCall](tool-call.md).
30
+
31
+ ### Terminal
32
+
33
+ The command after a faint $ prompt, then its output in `ink-2`. A non-zero exit code turns the block danger and says the code under it. Copy copies the command; lines wrap.
34
+
35
+ Example: `terminal`
36
+
37
+ ```tsx
38
+ import { ToolResultTerminal } from "@major-tech/ui/tool-result";
39
+
40
+ const TEST_OUTPUT = `> daily-joke@1.0.0 test
41
+ > vitest run
42
+
43
+ ✓ src/lib/format-joke.test.ts (3 tests) 12ms
44
+
45
+ Test Files 1 passed (1)
46
+ Tests 3 passed (3)
47
+ `;
48
+
49
+ const FAILED_OUTPUT = `Error: Cannot find module 'slack-sdk'
50
+ Require stack:
51
+ - /workspace/app/src/post.ts`;
52
+
53
+ export default function ToolResultTerminalExample() {
54
+ return (
55
+ <div className="flex w-full max-w-2xl flex-col gap-space-12">
56
+ <ToolResultTerminal command="pnpm test" output={TEST_OUTPUT} exitCode={0} />
57
+ <ToolResultTerminal command="node src/post.ts" output={FAILED_OUTPUT} exitCode={1} />
58
+ <ToolResultTerminal command="pnpm dev" isBackground />
59
+ </div>
60
+ );
61
+ }
62
+ ```
63
+
64
+ - A command left running reads “Running in the background” in place of its output.
65
+ - `isError` turns the block danger when the call itself failed, whatever the exit code.
66
+
67
+ ### File
68
+
69
+ The file's path with Wrap and Copy, then its numbered lines from `startLine` in the colours of the file's language, read off its path: what a Read showed, what a Write wrote.
70
+
71
+ Example: `file`
72
+
73
+ ```tsx
74
+ import { ToolResultFile } from "@major-tech/ui/tool-result";
75
+
76
+ const FIRST_LINE = 40;
77
+
78
+ const CODE = `export function formatJoke(joke: Joke): string {
79
+ // One line, no hashtags.
80
+ const text = joke.setup.trim();
81
+
82
+ return \`\${text} \${joke.punchline}\`;
83
+ }
84
+ `;
85
+
86
+ export default function ToolResultFileExample() {
87
+ return (
88
+ <div className="w-full max-w-2xl">
89
+ <ToolResultFile path="src/lib/format-joke.ts" code={CODE} startLine={FIRST_LINE} />
90
+ </div>
91
+ );
92
+ }
93
+ ```
94
+
95
+ ### Lines of your own
96
+
97
+ `language` sets the language when the path doesn't say it. CodeBlockLines as children of `ToolResultFile` and `ToolResultDiff` take the place of the highlighted lines, to point at a line an error names; `code` still feeds Copy.
98
+
99
+ Example: `own-lines`
100
+
101
+ ```tsx
102
+ "use client";
103
+
104
+ import { CODE_BLOCK_LINE_VARIANTS, CodeBlockLine } from "@major-tech/ui/code-block";
105
+ import { ToolResultFile } from "@major-tech/ui/tool-result";
106
+
107
+ const CODE = `const joke = await fetchJoke();
108
+ await slack.post(joke.text);
109
+ return joke;`;
110
+
111
+ /** The line the failing call pointed at. */
112
+ const POINTED_LINE_INDEX = 1;
113
+
114
+ export default function ToolResultOwnLines() {
115
+ return (
116
+ <div className="w-full max-w-2xl">
117
+ <ToolResultFile path="src/post.ts" code={CODE} startLine={12}>
118
+ {CODE.split("\n").map((line, index) => (
119
+ <CodeBlockLine
120
+ key={index}
121
+ variant={
122
+ index === POINTED_LINE_INDEX ? CODE_BLOCK_LINE_VARIANTS.HIGHLIGHTED : CODE_BLOCK_LINE_VARIANTS.DEFAULT
123
+ }
124
+ >
125
+ {line}
126
+ </CodeBlockLine>
127
+ ))}
128
+ </ToolResultFile>
129
+ </div>
130
+ );
131
+ }
132
+ ```
133
+
134
+ ### Diff
135
+
136
+ An Edit: the file's path with Wrap, then each replacement's removed lines and its added ones in the file's language's colours, with a ⋯ line between replacements.
137
+
138
+ Example: `diff`
139
+
140
+ ```tsx
141
+ import { ToolResultDiff, type ToolResultDiffEdit } from "@major-tech/ui/tool-result";
142
+
143
+ const EDITS: ToolResultDiffEdit[] = [
144
+ {
145
+ removed: ' "model": "haiku",',
146
+ added: ' "model": "sonnet",',
147
+ },
148
+ {
149
+ removed: ' "schedule": "0 9 * * *"',
150
+ added: ' "schedule": "0 9 * * 1-5",\n "timezone": "Europe/Berlin"',
151
+ },
152
+ ];
153
+
154
+ export default function ToolResultDiffExample() {
155
+ return (
156
+ <div className="w-full max-w-2xl">
157
+ <ToolResultDiff path="agent.jsonc" edits={EDITS} />
158
+ </div>
159
+ );
160
+ }
161
+ ```
162
+
163
+ ### Matches
164
+
165
+ A Grep: “3 matches in 2 files” with Wrap, then each file's path and count, and its matching lines with their numbers.
166
+
167
+ Example: `matches`
168
+
169
+ ```tsx
170
+ import { ToolResultMatches, type ToolResultMatchFile } from "@major-tech/ui/tool-result";
171
+
172
+ const FILES: ToolResultMatchFile[] = [
173
+ {
174
+ path: "src/app/pricing/page.tsx",
175
+ count: 2,
176
+ lines: [
177
+ { line: 4, text: 'import { PricingTable } from "@/components/pricing-table";' },
178
+ { line: 18, text: " <PricingTable plans={plans} />" },
179
+ ],
180
+ },
181
+ {
182
+ path: "src/components/pricing-table.tsx",
183
+ count: 1,
184
+ lines: [{ line: 12, text: "export function PricingTable({ plans }: PricingTableProps) {" }],
185
+ },
186
+ ];
187
+
188
+ export default function ToolResultMatchesExample() {
189
+ return (
190
+ <div className="w-full max-w-2xl">
191
+ <ToolResultMatches files={FILES} pattern="PricingTable" />
192
+ </div>
193
+ );
194
+ }
195
+ ```
196
+
197
+ - The matched text is marked in `warn-soft` when the pattern is a literal or literals joined by `|`. Any other regex marks nothing: a model’s pattern can hang the page if JavaScript runs it.
198
+ - `summarizeMatches` gives the same “3 matches in 2 files” for the call’s line.
199
+ - `note` goes under the matches: results capped, files skipped.
200
+
201
+ ### List
202
+
203
+ What a list call found, one row each: the name in ink and one line under it in muted, short facts in mono faint at the end.
204
+
205
+ Example: `list`
206
+
207
+ ```tsx
208
+ import { ToolResultList, ToolResultListItem } from "@major-tech/ui/tool-result";
209
+
210
+ const APPS = [
211
+ { id: "app_1", title: "Daily Joke", description: "Posts one joke a day to #random", meta: ["daily-joke"] },
212
+ {
213
+ id: "app_2",
214
+ title: "Lead tracker",
215
+ description: "New leads from HubSpot, by owner",
216
+ meta: ["lead-tracker", "view only"],
217
+ },
218
+ ];
219
+
220
+ const SANDBOXES = [
221
+ { id: "sbx_1", title: "Daily Joke", meta: ["App", "live"], isLive: true },
222
+ { id: "sbx_2", title: "Standup notes", meta: ["Agent", "starting"], isLive: false },
223
+ ];
224
+
225
+ export default function ToolResultListExample() {
226
+ return (
227
+ <div className="flex w-full max-w-2xl flex-col gap-space-12">
228
+ <ToolResultList>
229
+ {APPS.map((app) => (
230
+ <ToolResultListItem key={app.id} title={app.title} description={app.description} meta={app.meta} />
231
+ ))}
232
+ </ToolResultList>
233
+ <ToolResultList>
234
+ {SANDBOXES.map((sandbox) => (
235
+ <ToolResultListItem key={sandbox.id} title={sandbox.title} meta={sandbox.meta} isLive={sandbox.isLive} />
236
+ ))}
237
+ </ToolResultList>
238
+ </div>
239
+ );
240
+ }
241
+ ```
242
+
243
+ - A sandbox or a branch with one takes a dot: green when it's live, grey and pulsing while it starts.
244
+ - Facts are a slug, a status, a count or “view only”, joined by “ · ”.
245
+
246
+ ### Created app
247
+
248
+ The app a Create call made: its name in the header, its description, its URL handle in mono and whether its sandbox is up.
249
+
250
+ Example: `created`
251
+
252
+ ```tsx
253
+ "use client";
254
+
255
+ import { TOOL_RESULT_SANDBOX_STATES, ToolResultCreated } from "@major-tech/ui/tool-result";
256
+
257
+ export default function ToolResultCreatedExample() {
258
+ return (
259
+ <div className="flex w-full max-w-2xl flex-col gap-space-12">
260
+ <ToolResultCreated
261
+ name="Daily Joke"
262
+ description="Posts one programming joke a day to #random."
263
+ slug="daily-joke"
264
+ sandbox={TOOL_RESULT_SANDBOX_STATES.STARTING}
265
+ />
266
+ <ToolResultCreated name="Lead tracker" slug="lead-tracker" sandbox={TOOL_RESULT_SANDBOX_STATES.IN_USE} />
267
+ </div>
268
+ );
269
+ }
270
+ ```
271
+
272
+ - Ready and starting take a green dot (starting pulses); in use, no access and failed take warn.
273
+
274
+ ### Error
275
+
276
+ A failed call's error, as the tool returned it, in a destructive block under the file's path when the call was about one.
277
+
278
+ Example: `error`
279
+
280
+ ```tsx
281
+ import { ToolResultError } from "@major-tech/ui/tool-result";
282
+
283
+ export default function ToolResultErrorExample() {
284
+ return (
285
+ <div className="flex w-full max-w-2xl flex-col gap-space-12">
286
+ <ToolResultError path="src/lib/format-jokes.ts">
287
+ File does not exist. Did you mean src/lib/format-joke.ts?
288
+ </ToolResultError>
289
+ <ToolResultError>Request timed out after 30s.</ToolResultError>
290
+ </div>
291
+ );
292
+ }
293
+ ```
294
+
295
+ ### Guidelines
296
+
297
+ Do:
298
+
299
+ - Show what the tool did in the shape people read: a terminal, a file, a diff.
300
+ - Parse the tool's result in the product and pass plain strings and rows.
301
+ - Keep the tool's own error text: it says what to fix.
302
+
303
+ Don't:
304
+
305
+ - Show the raw JSON a tool returned when a part here fits.
306
+ - Show the instructions a tool returns for the model.
307
+ - Open a call whose line already says everything.
308
+
309
+ ## API
310
+
311
+ ```tsx
312
+ import { ToolResultTerminal, ToolResultFile, ToolResultDiff, ToolResultMatches, ToolResultList, ToolResultListItem, ToolResultCreated, ToolResultError, summarizeMatches, TOOL_RESULT_SANDBOX_STATES } from "@major-tech/ui/tool-result";
313
+ ```
314
+
315
+ ### `<ToolResultTerminal />`
316
+
317
+ Renders a CodeBlock.
318
+
319
+ | Prop | Type | Default | Description |
320
+ | --- | --- | --- | --- |
321
+ | `command`* | `string` | — | The command as it ran; Copy copies it. |
322
+ | `output` | `string` | `""` | What it printed. |
323
+ | `exitCode` | `number \| null` | `null` | Shown under the output in danger when it isn't 0. |
324
+ | `isBackground` | `boolean` | `false` | “Running in the background” stands for the output. |
325
+ | `isError` | `boolean` | `false` | The call failed: the block turns danger. |
326
+
327
+ `*` marks a required prop.
328
+
329
+ ### `<ToolResultFile />`
330
+
331
+ Renders a CodeBlock.
332
+
333
+ | Prop | Type | Default | Description |
334
+ | --- | --- | --- | --- |
335
+ | `path`* | `string` | — | The file's path, in the header. |
336
+ | `code`* | `string` | — | The file's text: what Copy copies, and the lines unless children gives them. |
337
+ | `startLine` | `number` | `1` | The first line's number. |
338
+ | `language` | `string` | — | The Prism language of the lines; by default read off the path's extension. |
339
+ | `children` | `ReactNode` | — | CodeBlockLines of your own, in place of the highlighted code. |
340
+
341
+ `*` marks a required prop.
342
+
343
+ ### `<ToolResultDiff />`
344
+
345
+ Renders a CodeBlock.
346
+
347
+ | Prop | Type | Default | Description |
348
+ | --- | --- | --- | --- |
349
+ | `path`* | `string` | — | The edited file's path, in the header. |
350
+ | `edits` | `{ removed?: string; added?: string }[]` | `[]` | Each replacement, in order. |
351
+ | `language` | `string` | — | The Prism language of the lines; by default read off the path's extension. |
352
+ | `children` | `ReactNode` | — | CodeBlockLines of your own (added and removed); replaces edits. |
353
+
354
+ `*` marks a required prop.
355
+
356
+ ### `<ToolResultMatches />`
357
+
358
+ Renders a CodeBlock.
359
+
360
+ | Prop | Type | Default | Description |
361
+ | --- | --- | --- | --- |
362
+ | `files`* | `{ path: string; lines: { line?: number \| null; text: string }[]; count?: number \| null }[]` | — | The matched files and their lines; count when the search counted more. |
363
+ | `pattern` | `string` | — | Its matches are marked when it is a literal. |
364
+ | `isCaseInsensitive` | `boolean` | `false` | Mark matches in any case. |
365
+ | `note` | `ReactNode` | — | A line under the matches. |
366
+
367
+ `*` marks a required prop.
368
+
369
+ ### `<ToolResultList /> · <ToolResultListItem />`
370
+
371
+ `ToolResultList` renders a CodeBlock with a `<ul>`; `ToolResultListItem` renders an `<li>`.
372
+
373
+ | Prop | Type | Default | Description |
374
+ | --- | --- | --- | --- |
375
+ | `title`* | `ReactNode` | — | The row's name. |
376
+ | `description` | `ReactNode` | — | One line under the name. |
377
+ | `meta` | `string[]` | `[]` | Short facts at the end of the row. |
378
+ | `isLive` | `boolean` | — | A green dot when true, grey and pulsing when false; none when left out. |
379
+
380
+ `*` marks a required prop.
381
+
382
+ ### `<ToolResultCreated />`
383
+
384
+ Renders a CodeBlock.
385
+
386
+ | Prop | Type | Default | Description |
387
+ | --- | --- | --- | --- |
388
+ | `name`* | `string` | — | The app's name, in the header. |
389
+ | `description` | `string` | — | What it does. |
390
+ | `slug` | `string` | — | Its URL handle. |
391
+ | `sandbox`* | `"ready" \| "starting" \| "in-use" \| "no-access" \| "failed"` | — | Whether its sandbox is up. |
392
+
393
+ `*` marks a required prop.
394
+
395
+ ### `<ToolResultError />`
396
+
397
+ Renders a destructive CodeBlock.
398
+
399
+ | Prop | Type | Default | Description |
400
+ | --- | --- | --- | --- |
401
+ | `path` | `string` | — | The file the call was about, as the header. |
402
+ | `children`* | `ReactNode` | — | The error's text. |
403
+
404
+ `*` marks a required prop.
405
+
406
+ ### `summarizeMatches · TOOL_RESULT_SANDBOX_STATES`
407
+
408
+ | Prop | Type | Default | Description |
409
+ | --- | --- | --- | --- |
410
+ | `summarizeMatches(files)` | `string` | — | “3 matches in 2 files”, “2 files” or “No matches”. Call it in client code: tool-result is a client module. |
411
+ | `TOOL_RESULT_SANDBOX_STATES` | `READY · STARTING · IN_USE · NO_ACCESS · FAILED` | — | The sandbox states of ToolResultCreated. |
412
+
413
+ ### Accessibility
414
+
415
+ - Wrap is a toggle button named Wrap lines, with `aria-pressed`.
416
+ - The code scrolls from the keyboard, and Copy announces Copied (CodeBlock).
417
+ - The prompt, line numbers and + and − are not selected with the text.
418
+ - Status dots come with a word: the sandbox's state; a list row's dot is read as Live or Starting.