@adea-ai/ui 0.140.0 → 0.142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/dist/components/composites/appearance-editor/appearance-editor.js +2 -2
  2. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  3. package/dist/components/composites/catalog-browser/catalog-browser-group.js +1 -1
  4. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts +56 -0
  5. package/dist/components/composites/chain-of-thought/chain-of-thought.d.ts.map +1 -0
  6. package/dist/components/composites/chain-of-thought/chain-of-thought.js +117 -0
  7. package/dist/components/composites/chain-of-thought/chain-of-thought.js.map +1 -0
  8. package/dist/components/composites/chain-of-thought/index.d.ts +2 -0
  9. package/dist/components/composites/chain-of-thought/index.d.ts.map +1 -0
  10. package/dist/components/composites/chain-of-thought/index.js +2 -0
  11. package/dist/components/composites/chat/chat.d.ts +67 -0
  12. package/dist/components/composites/chat/chat.d.ts.map +1 -0
  13. package/dist/components/composites/chat/chat.js +179 -0
  14. package/dist/components/composites/chat/chat.js.map +1 -0
  15. package/dist/components/composites/chat/index.d.ts +2 -0
  16. package/dist/components/composites/chat/index.d.ts.map +1 -0
  17. package/dist/components/composites/chat/index.js +2 -0
  18. package/dist/components/composites/checkpoint/checkpoint-model.d.ts +34 -0
  19. package/dist/components/composites/checkpoint/checkpoint-model.d.ts.map +1 -0
  20. package/dist/components/composites/checkpoint/checkpoint-model.js +48 -0
  21. package/dist/components/composites/checkpoint/checkpoint-model.js.map +1 -0
  22. package/dist/components/composites/checkpoint/checkpoint.d.ts +48 -0
  23. package/dist/components/composites/checkpoint/checkpoint.d.ts.map +1 -0
  24. package/dist/components/composites/checkpoint/checkpoint.js +160 -0
  25. package/dist/components/composites/checkpoint/checkpoint.js.map +1 -0
  26. package/dist/components/composites/checkpoint/index.d.ts +3 -0
  27. package/dist/components/composites/checkpoint/index.d.ts.map +1 -0
  28. package/dist/components/composites/checkpoint/index.js +3 -0
  29. package/dist/components/composites/confirmation/confirmation-model.d.ts +45 -0
  30. package/dist/components/composites/confirmation/confirmation-model.d.ts.map +1 -0
  31. package/dist/components/composites/confirmation/confirmation-model.js +51 -0
  32. package/dist/components/composites/confirmation/confirmation-model.js.map +1 -0
  33. package/dist/components/composites/confirmation/confirmation.d.ts +72 -0
  34. package/dist/components/composites/confirmation/confirmation.d.ts.map +1 -0
  35. package/dist/components/composites/confirmation/confirmation.js +300 -0
  36. package/dist/components/composites/confirmation/confirmation.js.map +1 -0
  37. package/dist/components/composites/confirmation/index.d.ts +3 -0
  38. package/dist/components/composites/confirmation/index.d.ts.map +1 -0
  39. package/dist/components/composites/confirmation/index.js +3 -0
  40. package/dist/components/composites/context/context-model.d.ts +69 -0
  41. package/dist/components/composites/context/context-model.d.ts.map +1 -0
  42. package/dist/components/composites/context/context-model.js +122 -0
  43. package/dist/components/composites/context/context-model.js.map +1 -0
  44. package/dist/components/composites/context/context.d.ts +38 -0
  45. package/dist/components/composites/context/context.d.ts.map +1 -0
  46. package/dist/components/composites/context/context.js +234 -0
  47. package/dist/components/composites/context/context.js.map +1 -0
  48. package/dist/components/composites/context/index.d.ts +3 -0
  49. package/dist/components/composites/context/index.d.ts.map +1 -0
  50. package/dist/components/composites/context/index.js +3 -0
  51. package/dist/components/composites/file-tree/build-file-tree.d.ts +138 -0
  52. package/dist/components/composites/file-tree/build-file-tree.d.ts.map +1 -0
  53. package/dist/components/composites/file-tree/build-file-tree.js +325 -0
  54. package/dist/components/composites/file-tree/build-file-tree.js.map +1 -0
  55. package/dist/components/composites/file-tree/file-tree.d.ts +74 -0
  56. package/dist/components/composites/file-tree/file-tree.d.ts.map +1 -0
  57. package/dist/components/composites/file-tree/file-tree.js +389 -0
  58. package/dist/components/composites/file-tree/file-tree.js.map +1 -0
  59. package/dist/components/composites/file-tree/index.d.ts +3 -0
  60. package/dist/components/composites/file-tree/index.d.ts.map +1 -0
  61. package/dist/components/composites/file-tree/index.js +3 -0
  62. package/dist/components/composites/inline-citation/citation.d.ts +37 -0
  63. package/dist/components/composites/inline-citation/citation.d.ts.map +1 -0
  64. package/dist/components/composites/inline-citation/citation.js +52 -0
  65. package/dist/components/composites/inline-citation/citation.js.map +1 -0
  66. package/dist/components/composites/inline-citation/index.d.ts +3 -0
  67. package/dist/components/composites/inline-citation/index.d.ts.map +1 -0
  68. package/dist/components/composites/inline-citation/index.js +3 -0
  69. package/dist/components/composites/inline-citation/inline-citation.d.ts +64 -0
  70. package/dist/components/composites/inline-citation/inline-citation.d.ts.map +1 -0
  71. package/dist/components/composites/inline-citation/inline-citation.js +272 -0
  72. package/dist/components/composites/inline-citation/inline-citation.js.map +1 -0
  73. package/dist/components/composites/message-scroller/index.d.ts +3 -0
  74. package/dist/components/composites/message-scroller/index.d.ts.map +1 -0
  75. package/dist/components/composites/message-scroller/index.js +3 -0
  76. package/dist/components/composites/message-scroller/message-scroller.d.ts +55 -0
  77. package/dist/components/composites/message-scroller/message-scroller.d.ts.map +1 -0
  78. package/dist/components/composites/message-scroller/message-scroller.js +201 -0
  79. package/dist/components/composites/message-scroller/message-scroller.js.map +1 -0
  80. package/dist/components/composites/message-scroller/scroll-anchor.d.ts +66 -0
  81. package/dist/components/composites/message-scroller/scroll-anchor.d.ts.map +1 -0
  82. package/dist/components/composites/message-scroller/scroll-anchor.js +122 -0
  83. package/dist/components/composites/message-scroller/scroll-anchor.js.map +1 -0
  84. package/dist/components/composites/model-selector/index.d.ts +3 -0
  85. package/dist/components/composites/model-selector/index.d.ts.map +1 -0
  86. package/dist/components/composites/model-selector/index.js +3 -0
  87. package/dist/components/composites/model-selector/model-selector.d.ts +55 -0
  88. package/dist/components/composites/model-selector/model-selector.d.ts.map +1 -0
  89. package/dist/components/composites/model-selector/model-selector.js +490 -0
  90. package/dist/components/composites/model-selector/model-selector.js.map +1 -0
  91. package/dist/components/composites/model-selector/models.d.ts +51 -0
  92. package/dist/components/composites/model-selector/models.d.ts.map +1 -0
  93. package/dist/components/composites/model-selector/models.js +71 -0
  94. package/dist/components/composites/model-selector/models.js.map +1 -0
  95. package/dist/components/composites/plan/index.d.ts +2 -0
  96. package/dist/components/composites/plan/index.d.ts.map +1 -0
  97. package/dist/components/composites/plan/index.js +2 -0
  98. package/dist/components/composites/plan/plan.d.ts +61 -0
  99. package/dist/components/composites/plan/plan.d.ts.map +1 -0
  100. package/dist/components/composites/plan/plan.js +130 -0
  101. package/dist/components/composites/plan/plan.js.map +1 -0
  102. package/dist/components/composites/queue/index.d.ts +2 -0
  103. package/dist/components/composites/queue/index.d.ts.map +1 -0
  104. package/dist/components/composites/queue/index.js +2 -0
  105. package/dist/components/composites/queue/queue.d.ts +77 -0
  106. package/dist/components/composites/queue/queue.d.ts.map +1 -0
  107. package/dist/components/composites/queue/queue.js +271 -0
  108. package/dist/components/composites/queue/queue.js.map +1 -0
  109. package/dist/components/composites/reasoning/index.d.ts +2 -0
  110. package/dist/components/composites/reasoning/index.d.ts.map +1 -0
  111. package/dist/components/composites/reasoning/index.js +2 -0
  112. package/dist/components/composites/reasoning/reasoning.d.ts +62 -0
  113. package/dist/components/composites/reasoning/reasoning.d.ts.map +1 -0
  114. package/dist/components/composites/reasoning/reasoning.js +156 -0
  115. package/dist/components/composites/reasoning/reasoning.js.map +1 -0
  116. package/dist/components/composites/sources/index.d.ts +3 -0
  117. package/dist/components/composites/sources/index.d.ts.map +1 -0
  118. package/dist/components/composites/sources/index.js +3 -0
  119. package/dist/components/composites/sources/source.d.ts +46 -0
  120. package/dist/components/composites/sources/source.d.ts.map +1 -0
  121. package/dist/components/composites/sources/source.js +74 -0
  122. package/dist/components/composites/sources/source.js.map +1 -0
  123. package/dist/components/composites/sources/sources.d.ts +45 -0
  124. package/dist/components/composites/sources/sources.d.ts.map +1 -0
  125. package/dist/components/composites/sources/sources.js +175 -0
  126. package/dist/components/composites/sources/sources.js.map +1 -0
  127. package/dist/components/composites/stack-trace/index.d.ts +3 -0
  128. package/dist/components/composites/stack-trace/index.d.ts.map +1 -0
  129. package/dist/components/composites/stack-trace/index.js +3 -0
  130. package/dist/components/composites/stack-trace/parse-stack-trace.d.ts +118 -0
  131. package/dist/components/composites/stack-trace/parse-stack-trace.d.ts.map +1 -0
  132. package/dist/components/composites/stack-trace/parse-stack-trace.js +376 -0
  133. package/dist/components/composites/stack-trace/parse-stack-trace.js.map +1 -0
  134. package/dist/components/composites/stack-trace/stack-trace.d.ts +63 -0
  135. package/dist/components/composites/stack-trace/stack-trace.d.ts.map +1 -0
  136. package/dist/components/composites/stack-trace/stack-trace.js +491 -0
  137. package/dist/components/composites/stack-trace/stack-trace.js.map +1 -0
  138. package/dist/components/composites/subagent/index.d.ts +2 -0
  139. package/dist/components/composites/subagent/index.d.ts.map +1 -0
  140. package/dist/components/composites/subagent/index.js +2 -0
  141. package/dist/components/composites/subagent/subagent.d.ts +55 -0
  142. package/dist/components/composites/subagent/subagent.d.ts.map +1 -0
  143. package/dist/components/composites/subagent/subagent.js +138 -0
  144. package/dist/components/composites/subagent/subagent.js.map +1 -0
  145. package/dist/components/composites/suggestion/index.d.ts +2 -0
  146. package/dist/components/composites/suggestion/index.d.ts.map +1 -0
  147. package/dist/components/composites/suggestion/index.js +2 -0
  148. package/dist/components/composites/suggestion/suggestion.d.ts +37 -0
  149. package/dist/components/composites/suggestion/suggestion.d.ts.map +1 -0
  150. package/dist/components/composites/suggestion/suggestion.js +100 -0
  151. package/dist/components/composites/suggestion/suggestion.js.map +1 -0
  152. package/dist/components/composites/task/index.d.ts +2 -0
  153. package/dist/components/composites/task/index.d.ts.map +1 -0
  154. package/dist/components/composites/task/index.js +2 -0
  155. package/dist/components/composites/task/task.d.ts +96 -0
  156. package/dist/components/composites/task/task.d.ts.map +1 -0
  157. package/dist/components/composites/task/task.js +311 -0
  158. package/dist/components/composites/task/task.js.map +1 -0
  159. package/dist/components/composites/terminal/ansi.d.ts +101 -0
  160. package/dist/components/composites/terminal/ansi.d.ts.map +1 -0
  161. package/dist/components/composites/terminal/ansi.js +544 -0
  162. package/dist/components/composites/terminal/ansi.js.map +1 -0
  163. package/dist/components/composites/terminal/index.d.ts +4 -0
  164. package/dist/components/composites/terminal/index.d.ts.map +1 -0
  165. package/dist/components/composites/terminal/index.js +4 -0
  166. package/dist/components/composites/terminal/terminal-model.d.ts +63 -0
  167. package/dist/components/composites/terminal/terminal-model.d.ts.map +1 -0
  168. package/dist/components/composites/terminal/terminal-model.js +69 -0
  169. package/dist/components/composites/terminal/terminal-model.js.map +1 -0
  170. package/dist/components/composites/terminal/terminal.d.ts +88 -0
  171. package/dist/components/composites/terminal/terminal.d.ts.map +1 -0
  172. package/dist/components/composites/terminal/terminal.js +500 -0
  173. package/dist/components/composites/terminal/terminal.js.map +1 -0
  174. package/dist/components/composites/test-results/index.d.ts +3 -0
  175. package/dist/components/composites/test-results/index.d.ts.map +1 -0
  176. package/dist/components/composites/test-results/index.js +3 -0
  177. package/dist/components/composites/test-results/test-results-model.d.ts +154 -0
  178. package/dist/components/composites/test-results/test-results-model.d.ts.map +1 -0
  179. package/dist/components/composites/test-results/test-results-model.js +252 -0
  180. package/dist/components/composites/test-results/test-results-model.js.map +1 -0
  181. package/dist/components/composites/test-results/test-results.d.ts +60 -0
  182. package/dist/components/composites/test-results/test-results.d.ts.map +1 -0
  183. package/dist/components/composites/test-results/test-results.js +631 -0
  184. package/dist/components/composites/test-results/test-results.js.map +1 -0
  185. package/dist/components/composites/tool/format-tool-value.d.ts +37 -0
  186. package/dist/components/composites/tool/format-tool-value.d.ts.map +1 -0
  187. package/dist/components/composites/tool/format-tool-value.js +135 -0
  188. package/dist/components/composites/tool/format-tool-value.js.map +1 -0
  189. package/dist/components/composites/tool/index.d.ts +3 -0
  190. package/dist/components/composites/tool/index.d.ts.map +1 -0
  191. package/dist/components/composites/tool/index.js +3 -0
  192. package/dist/components/composites/tool/tool.d.ts +69 -0
  193. package/dist/components/composites/tool/tool.d.ts.map +1 -0
  194. package/dist/components/composites/tool/tool.js +214 -0
  195. package/dist/components/composites/tool/tool.js.map +1 -0
  196. package/dist/components/composites/update-dialog/update-dialog.js +1 -1
  197. package/dist/components/conversation/conversation-surface.d.ts +7 -0
  198. package/dist/components/conversation/conversation-surface.d.ts.map +1 -1
  199. package/dist/components/conversation/conversation-surface.js +2 -0
  200. package/dist/components/conversation/conversation-surface.js.map +1 -1
  201. package/dist/components/conversation/scroll-follow-core.d.ts +24 -0
  202. package/dist/components/conversation/scroll-follow-core.d.ts.map +1 -1
  203. package/dist/components/conversation/scroll-follow-core.js +23 -1
  204. package/dist/components/conversation/scroll-follow-core.js.map +1 -1
  205. package/dist/components/conversation/scroll-follow.d.ts +3 -0
  206. package/dist/components/conversation/scroll-follow.d.ts.map +1 -1
  207. package/dist/components/conversation/scroll-follow.js +80 -1
  208. package/dist/components/conversation/scroll-follow.js.map +1 -1
  209. package/dist/components/ui/attachment/attachment.d.ts +58 -0
  210. package/dist/components/ui/attachment/attachment.d.ts.map +1 -0
  211. package/dist/components/ui/attachment/attachment.js +279 -0
  212. package/dist/components/ui/attachment/attachment.js.map +1 -0
  213. package/dist/components/ui/attachment/index.d.ts +2 -0
  214. package/dist/components/ui/attachment/index.d.ts.map +1 -0
  215. package/dist/components/ui/attachment/index.js +2 -0
  216. package/dist/components/ui/badge/badge.d.ts +1 -1
  217. package/dist/components/ui/bubble/bubble.d.ts +33 -0
  218. package/dist/components/ui/bubble/bubble.d.ts.map +1 -0
  219. package/dist/components/ui/bubble/bubble.js +95 -0
  220. package/dist/components/ui/bubble/bubble.js.map +1 -0
  221. package/dist/components/ui/bubble/index.d.ts +2 -0
  222. package/dist/components/ui/bubble/index.d.ts.map +1 -0
  223. package/dist/components/ui/bubble/index.js +2 -0
  224. package/dist/components/ui/button/button.d.ts +1 -1
  225. package/dist/components/ui/code-block/code-block.d.ts +56 -3
  226. package/dist/components/ui/code-block/code-block.d.ts.map +1 -1
  227. package/dist/components/ui/code-block/code-block.js +231 -50
  228. package/dist/components/ui/code-block/code-block.js.map +1 -1
  229. package/dist/components/ui/code-block/index.d.ts +1 -1
  230. package/dist/components/ui/code-block/index.d.ts.map +1 -1
  231. package/dist/components/ui/code-block/index.js +2 -2
  232. package/dist/components/ui/field/number-field.d.ts +21 -4
  233. package/dist/components/ui/field/number-field.d.ts.map +1 -1
  234. package/dist/components/ui/field/number-field.js +22 -11
  235. package/dist/components/ui/field/number-field.js.map +1 -1
  236. package/dist/components/ui/marker/index.d.ts +2 -0
  237. package/dist/components/ui/marker/index.d.ts.map +1 -0
  238. package/dist/components/ui/marker/index.js +2 -0
  239. package/dist/components/ui/marker/marker.d.ts +35 -0
  240. package/dist/components/ui/marker/marker.d.ts.map +1 -0
  241. package/dist/components/ui/marker/marker.js +123 -0
  242. package/dist/components/ui/marker/marker.js.map +1 -0
  243. package/dist/components/ui/message/cite-ranges.d.ts +42 -0
  244. package/dist/components/ui/message/cite-ranges.d.ts.map +1 -0
  245. package/dist/components/ui/message/cite-ranges.js +105 -0
  246. package/dist/components/ui/message/cite-ranges.js.map +1 -0
  247. package/dist/components/ui/message/index.d.ts +4 -0
  248. package/dist/components/ui/message/index.d.ts.map +1 -0
  249. package/dist/components/ui/message/index.js +4 -0
  250. package/dist/components/ui/message/message.d.ts +95 -0
  251. package/dist/components/ui/message/message.d.ts.map +1 -0
  252. package/dist/components/ui/message/message.js +443 -0
  253. package/dist/components/ui/message/message.js.map +1 -0
  254. package/dist/components/ui/message/parse-message-text.d.ts +93 -0
  255. package/dist/components/ui/message/parse-message-text.d.ts.map +1 -0
  256. package/dist/components/ui/message/parse-message-text.js +365 -0
  257. package/dist/components/ui/message/parse-message-text.js.map +1 -0
  258. package/dist/components/ui/questionnaire/index.d.ts +2 -0
  259. package/dist/components/ui/questionnaire/index.d.ts.map +1 -0
  260. package/dist/components/ui/questionnaire/index.js +2 -0
  261. package/dist/components/ui/questionnaire/questionnaire.d.ts +83 -0
  262. package/dist/components/ui/questionnaire/questionnaire.d.ts.map +1 -0
  263. package/dist/components/ui/questionnaire/questionnaire.js +470 -0
  264. package/dist/components/ui/questionnaire/questionnaire.js.map +1 -0
  265. package/dist/components/ui/status-chip/status-chip.d.ts +1 -1
  266. package/dist/components/ui/switch/switch.js +11 -11
  267. package/dist/components/ui/switch/switch.js.map +1 -1
  268. package/dist/components/ui/trace/index.d.ts +2 -0
  269. package/dist/components/ui/trace/index.d.ts.map +1 -0
  270. package/dist/components/ui/trace/index.js +2 -0
  271. package/dist/components/ui/trace/trace.d.ts +72 -0
  272. package/dist/components/ui/trace/trace.d.ts.map +1 -0
  273. package/dist/components/ui/trace/trace.js +340 -0
  274. package/dist/components/ui/trace/trace.js.map +1 -0
  275. package/dist/index.d.ts +26 -0
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +46 -5
  278. package/dist/r/attachment.json +25 -0
  279. package/dist/r/bubble.json +22 -0
  280. package/dist/r/chain-of-thought.json +26 -0
  281. package/dist/r/chat.json +24 -0
  282. package/dist/r/checkpoint.json +35 -0
  283. package/dist/r/confirmation.json +34 -0
  284. package/dist/r/context.json +33 -0
  285. package/dist/r/file-tree.json +32 -0
  286. package/dist/r/inline-citation.json +35 -0
  287. package/dist/r/marker.json +22 -0
  288. package/dist/r/message-scroller.json +31 -0
  289. package/dist/r/message.json +33 -0
  290. package/dist/r/model-selector.json +34 -0
  291. package/dist/r/plan.json +26 -0
  292. package/dist/r/questionnaire.json +28 -0
  293. package/dist/r/queue.json +26 -0
  294. package/dist/r/reasoning.json +26 -0
  295. package/dist/r/registry.json +811 -52
  296. package/dist/r/sources.json +32 -0
  297. package/dist/r/src/components/composites/chain-of-thought/chain-of-thought.tsx +141 -0
  298. package/dist/r/src/components/composites/chain-of-thought/index.ts +11 -0
  299. package/dist/r/src/components/composites/chat/chat.tsx +190 -0
  300. package/dist/r/src/components/composites/chat/index.ts +11 -0
  301. package/dist/r/src/components/composites/checkpoint/checkpoint-model.ts +71 -0
  302. package/dist/r/src/components/composites/checkpoint/checkpoint.tsx +214 -0
  303. package/dist/r/src/components/composites/checkpoint/index.ts +8 -0
  304. package/dist/r/src/components/composites/confirmation/confirmation-model.ts +83 -0
  305. package/dist/r/src/components/composites/confirmation/confirmation.tsx +311 -0
  306. package/dist/r/src/components/composites/confirmation/index.ts +9 -0
  307. package/dist/r/src/components/composites/context/context-model.ts +168 -0
  308. package/dist/r/src/components/composites/context/context.tsx +187 -0
  309. package/dist/r/src/components/composites/context/index.ts +18 -0
  310. package/dist/r/src/components/composites/file-tree/build-file-tree.ts +456 -0
  311. package/dist/r/src/components/composites/file-tree/file-tree.tsx +405 -0
  312. package/dist/r/src/components/composites/file-tree/index.ts +25 -0
  313. package/dist/r/src/components/composites/inline-citation/citation.ts +78 -0
  314. package/dist/r/src/components/composites/inline-citation/index.ts +9 -0
  315. package/dist/r/src/components/composites/inline-citation/inline-citation.tsx +285 -0
  316. package/dist/r/src/components/composites/message-scroller/index.ts +2 -0
  317. package/dist/r/src/components/composites/message-scroller/message-scroller.tsx +301 -0
  318. package/dist/r/src/components/composites/message-scroller/scroll-anchor.ts +170 -0
  319. package/dist/r/src/components/composites/model-selector/index.ts +14 -0
  320. package/dist/r/src/components/composites/model-selector/model-selector.tsx +420 -0
  321. package/dist/r/src/components/composites/model-selector/models.ts +103 -0
  322. package/dist/r/src/components/composites/plan/index.ts +1 -0
  323. package/dist/r/src/components/composites/plan/plan.tsx +155 -0
  324. package/dist/r/src/components/composites/queue/index.ts +10 -0
  325. package/dist/r/src/components/composites/queue/queue.tsx +264 -0
  326. package/dist/r/src/components/composites/reasoning/index.ts +1 -0
  327. package/dist/r/src/components/composites/reasoning/reasoning.tsx +176 -0
  328. package/dist/r/src/components/composites/sources/index.ts +11 -0
  329. package/dist/r/src/components/composites/sources/source.ts +116 -0
  330. package/dist/r/src/components/composites/sources/sources.tsx +163 -0
  331. package/dist/r/src/components/composites/stack-trace/index.ts +19 -0
  332. package/dist/r/src/components/composites/stack-trace/parse-stack-trace.ts +507 -0
  333. package/dist/r/src/components/composites/stack-trace/stack-trace.tsx +395 -0
  334. package/dist/r/src/components/composites/subagent/index.ts +1 -0
  335. package/dist/r/src/components/composites/subagent/subagent.tsx +159 -0
  336. package/dist/r/src/components/composites/suggestion/index.ts +1 -0
  337. package/dist/r/src/components/composites/suggestion/suggestion.tsx +140 -0
  338. package/dist/r/src/components/composites/task/index.ts +14 -0
  339. package/dist/r/src/components/composites/task/task.tsx +317 -0
  340. package/dist/r/src/components/composites/terminal/ansi.ts +674 -0
  341. package/dist/r/src/components/composites/terminal/index.ts +20 -0
  342. package/dist/r/src/components/composites/terminal/terminal-model.ts +111 -0
  343. package/dist/r/src/components/composites/terminal/terminal.tsx +574 -0
  344. package/dist/r/src/components/composites/test-results/index.ts +20 -0
  345. package/dist/r/src/components/composites/test-results/test-results-model.ts +368 -0
  346. package/dist/r/src/components/composites/test-results/test-results.tsx +586 -0
  347. package/dist/r/src/components/composites/tool/format-tool-value.ts +221 -0
  348. package/dist/r/src/components/composites/tool/index.ts +2 -0
  349. package/dist/r/src/components/composites/tool/tool.tsx +228 -0
  350. package/dist/r/src/components/conversation/conversation-surface.tsx +9 -0
  351. package/dist/r/src/components/conversation/scroll-follow-core.ts +31 -0
  352. package/dist/r/src/components/conversation/scroll-follow.ts +92 -0
  353. package/dist/r/src/components/ui/attachment/attachment.tsx +282 -0
  354. package/dist/r/src/components/ui/attachment/index.ts +10 -0
  355. package/dist/r/src/components/ui/bubble/bubble.tsx +86 -0
  356. package/dist/r/src/components/ui/bubble/index.ts +1 -0
  357. package/dist/r/src/components/ui/code-block/code-block.tsx +256 -26
  358. package/dist/r/src/components/ui/code-block/index.ts +9 -1
  359. package/dist/r/src/components/ui/field/number-field.tsx +51 -14
  360. package/dist/r/src/components/ui/marker/index.ts +1 -0
  361. package/dist/r/src/components/ui/marker/marker.tsx +90 -0
  362. package/dist/r/src/components/ui/message/cite-ranges.ts +144 -0
  363. package/dist/r/src/components/ui/message/index.ts +23 -0
  364. package/dist/r/src/components/ui/message/message.tsx +434 -0
  365. package/dist/r/src/components/ui/message/parse-message-text.ts +450 -0
  366. package/dist/r/src/components/ui/questionnaire/index.ts +10 -0
  367. package/dist/r/src/components/ui/questionnaire/questionnaire.tsx +446 -0
  368. package/dist/r/src/components/ui/trace/index.ts +9 -0
  369. package/dist/r/src/components/ui/trace/trace.tsx +334 -0
  370. package/dist/r/src/styles/base.css +34 -0
  371. package/dist/r/stack-trace.json +32 -0
  372. package/dist/r/subagent.json +27 -0
  373. package/dist/r/suggestion.json +24 -0
  374. package/dist/r/task.json +28 -0
  375. package/dist/r/terminal.json +35 -0
  376. package/dist/r/test-results.json +33 -0
  377. package/dist/r/tool.json +31 -0
  378. package/dist/r/trace.json +25 -0
  379. package/package.json +6 -3
  380. package/registry.json +811 -52
  381. package/src/components/composites/chain-of-thought/chain-of-thought.tsx +141 -0
  382. package/src/components/composites/chain-of-thought/index.ts +11 -0
  383. package/src/components/composites/chat/chat.tsx +190 -0
  384. package/src/components/composites/chat/index.ts +11 -0
  385. package/src/components/composites/checkpoint/checkpoint-model.ts +71 -0
  386. package/src/components/composites/checkpoint/checkpoint.tsx +214 -0
  387. package/src/components/composites/checkpoint/index.ts +8 -0
  388. package/src/components/composites/confirmation/confirmation-model.ts +83 -0
  389. package/src/components/composites/confirmation/confirmation.tsx +311 -0
  390. package/src/components/composites/confirmation/index.ts +9 -0
  391. package/src/components/composites/context/context-model.ts +168 -0
  392. package/src/components/composites/context/context.tsx +187 -0
  393. package/src/components/composites/context/index.ts +18 -0
  394. package/src/components/composites/file-tree/build-file-tree.ts +456 -0
  395. package/src/components/composites/file-tree/file-tree.tsx +405 -0
  396. package/src/components/composites/file-tree/index.ts +25 -0
  397. package/src/components/composites/inline-citation/citation.ts +78 -0
  398. package/src/components/composites/inline-citation/index.ts +9 -0
  399. package/src/components/composites/inline-citation/inline-citation.tsx +285 -0
  400. package/src/components/composites/message-scroller/index.ts +2 -0
  401. package/src/components/composites/message-scroller/message-scroller.tsx +301 -0
  402. package/src/components/composites/message-scroller/scroll-anchor.ts +170 -0
  403. package/src/components/composites/model-selector/index.ts +14 -0
  404. package/src/components/composites/model-selector/model-selector.tsx +420 -0
  405. package/src/components/composites/model-selector/models.ts +103 -0
  406. package/src/components/composites/plan/index.ts +1 -0
  407. package/src/components/composites/plan/plan.tsx +155 -0
  408. package/src/components/composites/queue/index.ts +10 -0
  409. package/src/components/composites/queue/queue.tsx +264 -0
  410. package/src/components/composites/reasoning/index.ts +1 -0
  411. package/src/components/composites/reasoning/reasoning.tsx +176 -0
  412. package/src/components/composites/sources/index.ts +11 -0
  413. package/src/components/composites/sources/source.ts +116 -0
  414. package/src/components/composites/sources/sources.tsx +163 -0
  415. package/src/components/composites/stack-trace/index.ts +19 -0
  416. package/src/components/composites/stack-trace/parse-stack-trace.ts +507 -0
  417. package/src/components/composites/stack-trace/stack-trace.tsx +395 -0
  418. package/src/components/composites/subagent/index.ts +1 -0
  419. package/src/components/composites/subagent/subagent.tsx +159 -0
  420. package/src/components/composites/suggestion/index.ts +1 -0
  421. package/src/components/composites/suggestion/suggestion.tsx +140 -0
  422. package/src/components/composites/task/index.ts +14 -0
  423. package/src/components/composites/task/task.tsx +317 -0
  424. package/src/components/composites/terminal/ansi.ts +674 -0
  425. package/src/components/composites/terminal/index.ts +20 -0
  426. package/src/components/composites/terminal/terminal-model.ts +111 -0
  427. package/src/components/composites/terminal/terminal.tsx +574 -0
  428. package/src/components/composites/test-results/index.ts +20 -0
  429. package/src/components/composites/test-results/test-results-model.ts +368 -0
  430. package/src/components/composites/test-results/test-results.tsx +586 -0
  431. package/src/components/composites/tool/format-tool-value.ts +221 -0
  432. package/src/components/composites/tool/index.ts +2 -0
  433. package/src/components/composites/tool/tool.tsx +228 -0
  434. package/src/components/conversation/conversation-surface.tsx +9 -0
  435. package/src/components/conversation/scroll-follow-core.ts +31 -0
  436. package/src/components/conversation/scroll-follow.ts +92 -0
  437. package/src/components/ui/attachment/attachment.tsx +282 -0
  438. package/src/components/ui/attachment/index.ts +10 -0
  439. package/src/components/ui/bubble/bubble.tsx +86 -0
  440. package/src/components/ui/bubble/index.ts +1 -0
  441. package/src/components/ui/code-block/code-block.tsx +256 -26
  442. package/src/components/ui/code-block/index.ts +9 -1
  443. package/src/components/ui/field/number-field.tsx +51 -14
  444. package/src/components/ui/marker/index.ts +1 -0
  445. package/src/components/ui/marker/marker.tsx +90 -0
  446. package/src/components/ui/message/cite-ranges.ts +144 -0
  447. package/src/components/ui/message/index.ts +23 -0
  448. package/src/components/ui/message/message.tsx +434 -0
  449. package/src/components/ui/message/parse-message-text.ts +450 -0
  450. package/src/components/ui/questionnaire/index.ts +10 -0
  451. package/src/components/ui/questionnaire/questionnaire.tsx +446 -0
  452. package/src/components/ui/trace/index.ts +9 -0
  453. package/src/components/ui/trace/trace.tsx +334 -0
  454. package/src/index.ts +26 -0
  455. package/src/styles/base.css +34 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The terminal's pure decisions: what its status says, which lines are mounted,
3
+ * and whether the reader is at the end. They live apart from the component so
4
+ * the rules that are easy to get subtly wrong — an off-by-one in "N earlier
5
+ * lines", a tolerance that yanks the reader back to the bottom — have tests.
6
+ */
7
+ /**
8
+ * What the host knows about the command. Absent means no statement: a terminal
9
+ * handed output with no status does not say whether the command is still running.
10
+ */
11
+ export type TerminalStatus = {
12
+ state: 'running';
13
+ } | {
14
+ state: 'exited';
15
+ code: number;
16
+ } | {
17
+ state: 'cancelled';
18
+ };
19
+ /** The words for a status, which are also what a screen reader hears. */
20
+ export declare function terminalStatusLabel(status: TerminalStatus): string;
21
+ /** Whether a status is a non-zero exit — the one thing the header tones as a failure. */
22
+ export declare function isFailedExit(status: TerminalStatus | undefined): boolean;
23
+ export type TerminalWindow = Readonly<{
24
+ /** Index of the first mounted finished line. */
25
+ start: number;
26
+ /** Index after the last mounted finished line. */
27
+ end: number;
28
+ /** Retained lines before `start` that "show earlier" can reveal. */
29
+ revealable: number;
30
+ /** Every earlier line not on screen, including those the parser discarded. */
31
+ hidden: number;
32
+ /** Retained finished lines after `end`: output that arrived while the view was parked. */
33
+ later: number;
34
+ /** Lines of the parked view that retention discarded before the reader moved on. */
35
+ evicted: number;
36
+ /** The whole parked view was discarded, so the oldest retained lines are shown instead. */
37
+ lost: boolean;
38
+ }>;
39
+ /**
40
+ * The slice of the retained lines that is mounted. `limit` is how many finished
41
+ * lines to show; the rest are counted, not rendered, because a terminal that
42
+ * mounts every line of a long build is a frozen page.
43
+ *
44
+ * While the reader follows the tail the slice ends at the newest line. Once they
45
+ * have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting
46
+ * the ones retention already discarded) that existed when they left, and the
47
+ * slice stays ending there while output keeps arriving, so what they are reading
48
+ * does not move under them. If retention discards the lines they were reading,
49
+ * `evicted` says how many, and when all of them are gone `lost` is set and the
50
+ * oldest retained lines are shown, because the nearest thing that still exists
51
+ * is better than a blank box.
52
+ */
53
+ export declare function terminalWindow(retained: number, dropped: number, limit: number, anchorEnd?: number): TerminalWindow;
54
+ /** The limit after one "show earlier" press: one more page, never past what exists. */
55
+ export declare function revealEarlier(limit: number, page: number, retained: number): number;
56
+ /** Subpixel scroll positions and zoom make "exactly at the bottom" unreliable. */
57
+ export declare const BOTTOM_TOLERANCE_PX = 4;
58
+ /**
59
+ * Whether a scroller is showing its end. This decides whether new output
60
+ * follows the reader: at the bottom it does, anywhere else the view is theirs.
61
+ */
62
+ export declare function isAtBottom(scrollHeight: number, scrollTop: number, clientHeight: number): boolean;
63
+ //# sourceMappingURL=terminal-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-model.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/terminal/terminal-model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,CAAA;AAE1B,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAIlE;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAExE;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAA;IACd,0FAA0F;IAC1F,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAA;IACf,2FAA2F;IAC3F,IAAI,EAAE,OAAO,CAAA;CACd,CAAC,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CA8BhB;AAED,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAEjG"}
@@ -0,0 +1,69 @@
1
+ //#region src/components/composites/terminal/terminal-model.ts
2
+ /** The words for a status, which are also what a screen reader hears. */
3
+ function terminalStatusLabel(status) {
4
+ if (status.state === "running") return "Running";
5
+ if (status.state === "cancelled") return "Cancelled";
6
+ return Number.isInteger(status.code) ? `Exited with code ${status.code}` : "Exited";
7
+ }
8
+ /** Whether a status is a non-zero exit — the one thing the header tones as a failure. */
9
+ function isFailedExit(status) {
10
+ return status?.state === "exited" && Number.isInteger(status.code) && status.code !== 0;
11
+ }
12
+ /**
13
+ * The slice of the retained lines that is mounted. `limit` is how many finished
14
+ * lines to show; the rest are counted, not rendered, because a terminal that
15
+ * mounts every line of a long build is a frozen page.
16
+ *
17
+ * While the reader follows the tail the slice ends at the newest line. Once they
18
+ * have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting
19
+ * the ones retention already discarded) that existed when they left, and the
20
+ * slice stays ending there while output keeps arriving, so what they are reading
21
+ * does not move under them. If retention discards the lines they were reading,
22
+ * `evicted` says how many, and when all of them are gone `lost` is set and the
23
+ * oldest retained lines are shown, because the nearest thing that still exists
24
+ * is better than a blank box.
25
+ */
26
+ function terminalWindow(retained, dropped, limit, anchorEnd) {
27
+ const size = Math.max(1, Math.floor(limit));
28
+ if (anchorEnd === void 0 || anchorEnd >= dropped + retained) {
29
+ const start = Math.max(0, retained - size);
30
+ return {
31
+ start,
32
+ end: retained,
33
+ revealable: start,
34
+ hidden: start + dropped,
35
+ later: 0,
36
+ evicted: 0,
37
+ lost: false
38
+ };
39
+ }
40
+ const wantedStart = Math.max(0, anchorEnd - size);
41
+ const lost = anchorEnd <= dropped;
42
+ const end = lost ? Math.min(retained, size) : anchorEnd - dropped;
43
+ const start = lost ? 0 : Math.max(0, end - size);
44
+ const evicted = lost ? anchorEnd - wantedStart : Math.max(0, Math.min(dropped, anchorEnd) - wantedStart);
45
+ return {
46
+ start,
47
+ end,
48
+ revealable: start,
49
+ hidden: start + dropped,
50
+ later: retained - end,
51
+ evicted,
52
+ lost
53
+ };
54
+ }
55
+ /** The limit after one "show earlier" press: one more page, never past what exists. */
56
+ function revealEarlier(limit, page, retained) {
57
+ return Math.min(Math.max(retained, 1), limit + Math.max(1, Math.floor(page)));
58
+ }
59
+ /**
60
+ * Whether a scroller is showing its end. This decides whether new output
61
+ * follows the reader: at the bottom it does, anywhere else the view is theirs.
62
+ */
63
+ function isAtBottom(scrollHeight, scrollTop, clientHeight) {
64
+ return scrollHeight - scrollTop - clientHeight <= 4;
65
+ }
66
+ //#endregion
67
+ export { isAtBottom, isFailedExit, revealEarlier, terminalStatusLabel, terminalWindow };
68
+
69
+ //# sourceMappingURL=terminal-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-model.js","names":[],"sources":["../../../../src/components/composites/terminal/terminal-model.ts"],"sourcesContent":["/**\n * The terminal's pure decisions: what its status says, which lines are mounted,\n * and whether the reader is at the end. They live apart from the component so\n * the rules that are easy to get subtly wrong — an off-by-one in \"N earlier\n * lines\", a tolerance that yanks the reader back to the bottom — have tests.\n */\n\n/**\n * What the host knows about the command. Absent means no statement: a terminal\n * handed output with no status does not say whether the command is still running.\n */\nexport type TerminalStatus =\n | { state: 'running' }\n | { state: 'exited'; code: number }\n | { state: 'cancelled' }\n\n/** The words for a status, which are also what a screen reader hears. */\nexport function terminalStatusLabel(status: TerminalStatus): string {\n if (status.state === 'running') return 'Running'\n if (status.state === 'cancelled') return 'Cancelled'\n return Number.isInteger(status.code) ? `Exited with code ${status.code}` : 'Exited'\n}\n\n/** Whether a status is a non-zero exit — the one thing the header tones as a failure. */\nexport function isFailedExit(status: TerminalStatus | undefined): boolean {\n return status?.state === 'exited' && Number.isInteger(status.code) && status.code !== 0\n}\n\nexport type TerminalWindow = Readonly<{\n /** Index of the first mounted finished line. */\n start: number\n /** Index after the last mounted finished line. */\n end: number\n /** Retained lines before `start` that \"show earlier\" can reveal. */\n revealable: number\n /** Every earlier line not on screen, including those the parser discarded. */\n hidden: number\n /** Retained finished lines after `end`: output that arrived while the view was parked. */\n later: number\n /** Lines of the parked view that retention discarded before the reader moved on. */\n evicted: number\n /** The whole parked view was discarded, so the oldest retained lines are shown instead. */\n lost: boolean\n}>\n\n/**\n * The slice of the retained lines that is mounted. `limit` is how many finished\n * lines to show; the rest are counted, not rendered, because a terminal that\n * mounts every line of a long build is a frozen page.\n *\n * While the reader follows the tail the slice ends at the newest line. Once they\n * have scrolled away it is *parked*: `anchorEnd` is the number of lines (counting\n * the ones retention already discarded) that existed when they left, and the\n * slice stays ending there while output keeps arriving, so what they are reading\n * does not move under them. If retention discards the lines they were reading,\n * `evicted` says how many, and when all of them are gone `lost` is set and the\n * oldest retained lines are shown, because the nearest thing that still exists\n * is better than a blank box.\n */\nexport function terminalWindow(\n retained: number,\n dropped: number,\n limit: number,\n anchorEnd?: number\n): TerminalWindow {\n const size = Math.max(1, Math.floor(limit))\n if (anchorEnd === undefined || anchorEnd >= dropped + retained) {\n const start = Math.max(0, retained - size)\n return {\n start,\n end: retained,\n revealable: start,\n hidden: start + dropped,\n later: 0,\n evicted: 0,\n lost: false,\n }\n }\n const wantedStart = Math.max(0, anchorEnd - size)\n const lost = anchorEnd <= dropped\n const end = lost ? Math.min(retained, size) : anchorEnd - dropped\n const start = lost ? 0 : Math.max(0, end - size)\n const evicted = lost\n ? anchorEnd - wantedStart\n : Math.max(0, Math.min(dropped, anchorEnd) - wantedStart)\n return {\n start,\n end,\n revealable: start,\n hidden: start + dropped,\n later: retained - end,\n evicted,\n lost,\n }\n}\n\n/** The limit after one \"show earlier\" press: one more page, never past what exists. */\nexport function revealEarlier(limit: number, page: number, retained: number): number {\n return Math.min(Math.max(retained, 1), limit + Math.max(1, Math.floor(page)))\n}\n\n/** Subpixel scroll positions and zoom make \"exactly at the bottom\" unreliable. */\nexport const BOTTOM_TOLERANCE_PX = 4\n\n/**\n * Whether a scroller is showing its end. This decides whether new output\n * follows the reader: at the bottom it does, anywhere else the view is theirs.\n */\nexport function isAtBottom(scrollHeight: number, scrollTop: number, clientHeight: number): boolean {\n return scrollHeight - scrollTop - clientHeight <= BOTTOM_TOLERANCE_PX\n}\n"],"mappings":";;AAiBA,SAAgB,oBAAoB,QAAgC;CAClE,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,IAAI,OAAO,UAAU,aAAa,OAAO;CACzC,OAAO,OAAO,UAAU,OAAO,IAAI,IAAI,oBAAoB,OAAO,SAAS;AAC7E;;AAGA,SAAgB,aAAa,QAA6C;CACxE,OAAO,QAAQ,UAAU,YAAY,OAAO,UAAU,OAAO,IAAI,KAAK,OAAO,SAAS;AACxF;;;;;;;;;;;;;;;AAiCA,SAAgB,eACd,UACA,SACA,OACA,WACgB;CAChB,MAAM,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,CAAC;CAC1C,IAAI,cAAc,KAAA,KAAa,aAAa,UAAU,UAAU;EAC9D,MAAM,QAAQ,KAAK,IAAI,GAAG,WAAW,IAAI;EACzC,OAAO;GACL;GACA,KAAK;GACL,YAAY;GACZ,QAAQ,QAAQ;GAChB,OAAO;GACP,SAAS;GACT,MAAM;EACR;CACF;CACA,MAAM,cAAc,KAAK,IAAI,GAAG,YAAY,IAAI;CAChD,MAAM,OAAO,aAAa;CAC1B,MAAM,MAAM,OAAO,KAAK,IAAI,UAAU,IAAI,IAAI,YAAY;CAC1D,MAAM,QAAQ,OAAO,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI;CAC/C,MAAM,UAAU,OACZ,YAAY,cACZ,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,SAAS,IAAI,WAAW;CAC1D,OAAO;EACL;EACA;EACA,YAAY;EACZ,QAAQ,QAAQ;EAChB,OAAO,WAAW;EAClB;EACA;CACF;AACF;;AAGA,SAAgB,cAAc,OAAe,MAAc,UAA0B;CACnF,OAAO,KAAK,IAAI,KAAK,IAAI,UAAU,CAAC,GAAG,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,IAAI,CAAC,CAAC;AAC9E;;;;;AASA,SAAgB,WAAW,cAAsB,WAAmB,cAA+B;CACjG,OAAO,eAAe,YAAY,gBAAA;AACpC"}
@@ -0,0 +1,88 @@
1
+ import { type ComponentProps } from 'solid-js';
2
+ import { type TerminalStatus } from './terminal-model';
3
+ /**
4
+ * Terminal.
5
+ *
6
+ * A command and its output, as it arrives. It is the thing to put inside an
7
+ * agent's "ran a command" line (a `TraceLine`, with `size="sm"`) when the output
8
+ * is the evidence; reach for `CodeBlock` instead when the text is source or a
9
+ * finished log that needs no live behaviour, and for `TestResults` when the
10
+ * output is a test run the host can structure.
11
+ *
12
+ * It does not wrap `CodeBlock`. A block's `highlight` seam re-renders the whole
13
+ * body whenever the code changes, which is exactly wrong for output that grows a
14
+ * line at a time, and a terminal has to own its scroller to follow the tail. It
15
+ * keeps the block's header and surface vocabulary so the two read as one family.
16
+ *
17
+ * ## What the output is allowed to do
18
+ *
19
+ * Output is untrusted bytes. It is parsed by `createAnsiParser` into plain text
20
+ * and a fixed set of styles — sixteen theme colours, bold, dim, italic,
21
+ * underline, strike-through, reverse — and everything else (cursor movement,
22
+ * title and clipboard sequences, anything malformed) is dropped, never echoed.
23
+ * Colours come from the theme's `--terminal-ansi-*` tokens, painted on the
24
+ * theme's own terminal background, so a program's colours keep the contrast the
25
+ * theme measured for them. Nothing is rendered as markup.
26
+ *
27
+ * ## Streaming
28
+ *
29
+ * `output` is the whole string so far. When the new value begins with the old
30
+ * one, only the appended text is parsed, so a chunk costs the size of the chunk
31
+ * and not of the transcript. Finished lines are keyed by identity and are never
32
+ * re-rendered; only the line still being written changes, which is what makes a
33
+ * `\r` progress bar redraw in place. Batch appends per frame — the host sees a
34
+ * prefix check proportional to the output on every change.
35
+ *
36
+ * Only the last `maxLines` finished lines are mounted. The rest are counted in
37
+ * an explicit note with a control to show them a page at a time, because tens of
38
+ * thousands of row elements are a frozen page, not a transcript. Copy still
39
+ * writes `output` exactly as given — not the rendered lines, not the visible tail.
40
+ *
41
+ * ## Following the tail
42
+ *
43
+ * The terminal scrolls inside its own bounded box and follows new output only
44
+ * while the reader is at the bottom of that box. Scrolling up *parks* the view:
45
+ * the lines mounted are the ones that were there when they left, however much
46
+ * output arrives, and "Jump to latest" is the only way back to the tail (reaching
47
+ * the bottom of a parked view with nothing newer resumes it, because nothing was
48
+ * missed). If retention discards the lines they were reading the note says how
49
+ * many, and when none are left the oldest retained lines are shown. The page
50
+ * itself is never scrolled. Scrolling is instant, so there is no animation to
51
+ * reduce.
52
+ *
53
+ * ## Status is a claim
54
+ *
55
+ * `status` is drawn only when the host passes it, in words as well as an icon,
56
+ * and only a non-zero exit is toned as a failure: this component does not decide
57
+ * that a command "passed". Without a status the header says nothing about whether
58
+ * the command is still running. `onClear` adds a clear button; without it the
59
+ * output is the host's record and nothing here offers to erase it.
60
+ */
61
+ export type TerminalProps = Omit<ComponentProps<'div'>, 'children'> & {
62
+ /** Everything the command has printed so far, exactly as received. */
63
+ output: string;
64
+ /** The command line. Shown as text; the prompt glyph is decoration. */
65
+ command?: string;
66
+ status?: TerminalStatus;
67
+ /** Finished lines mounted at once; earlier ones are counted and revealed a page at a time. */
68
+ maxLines?: number;
69
+ /** Finished lines kept at all; older ones are discarded and counted. Default 200 000. */
70
+ retainLines?: number;
71
+ /** Height of the output box, which scrolls past it. A number is pixels. Default `20rem`. */
72
+ maxHeight?: number | string;
73
+ /** Soft-wrap long lines instead of scrolling sideways. Off: terminal columns keep their alignment. */
74
+ wrap?: boolean;
75
+ /** `sm` is the compact chrome for output nested inside a Trace line. */
76
+ size?: 'default' | 'sm';
77
+ /** Show a clear button. The host empties `output`; the terminal erases nothing itself. */
78
+ onClear?: () => void;
79
+ copyLabel?: string;
80
+ copiedLabel?: string;
81
+ clearLabel?: string;
82
+ /** Called after each copy attempt with whether the clipboard accepted it. */
83
+ onCopy?: (ok: boolean) => void;
84
+ };
85
+ /** Finished lines mounted by default. */
86
+ export declare const TERMINAL_MAX_LINES = 1000;
87
+ export declare function Terminal(props: TerminalProps): import("solid-js").JSX.Element;
88
+ //# sourceMappingURL=terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/terminal/terminal.tsx"],"names":[],"mappings":"AASA,OAAO,EAQL,KAAK,cAAc,EACpB,MAAM,UAAU,CAAA;AAWjB,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACpE,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAA;IACd,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,yFAAyF;IACzF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,sGAAsG;IACtG,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACvB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,yCAAyC;AACzC,eAAO,MAAM,kBAAkB,OAAO,CAAA;AAwItC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCA2T5C"}