@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
@@ -3,7 +3,7 @@ import { Button } from "../../ui/button/button.js";
3
3
  import { ActionButton } from "../action-button/action-button.js";
4
4
  import { Input } from "../../ui/input/input.js";
5
5
  import { Sheet, SheetBody, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "../../ui/sheet/sheet.js";
6
- import { Switch } from "../../ui/switch/switch.js";
6
+ import { Switch as Switch$1 } from "../../ui/switch/switch.js";
7
7
  import { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from "../../../lib/appearance-font-settings.js";
8
8
  import { AppearanceFontSettingsGroup } from "./font-settings-group.js";
9
9
  import { AccentChoices, GlassChoices, ModeChoices, isCustomAccent } from "./appearance-choices.js";
@@ -204,7 +204,7 @@ function AppearanceEditor(props) {
204
204
  },
205
205
  description: "Prefer solid surfaces, including during live preview.",
206
206
  get children() {
207
- return createComponent(Switch, {
207
+ return createComponent(Switch$1, {
208
208
  get checked() {
209
209
  return props.draft.reduceTransparency;
210
210
  },
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-editor.js","names":["EyeOff","Palette","PanelsTopLeft","SlidersHorizontal","Show","createSignal","createUniqueId","cn","ActionButton","Button","Input","AppearanceFontSettingsGroup","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","Switch","Sheet","SheetBody","SheetContent","SheetDescription","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","AppearanceEditorProps","AppearancePopoverProps","ModeChoices","AccentChoices","GlassChoices","isCustomAccent","SettingsRow","TerminalRow","ThemeRow","AppearanceEditor","props","errorId","custom","accentDescription","draft","accent","preset","accentOptions","find","option","id","label","offered","themeAccentOptions","toLowerCase","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$6","_el$3","firstChild","_$insert","_$createComponent","when","recoveryNotice","children","_el$2","_tmpl$","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","terminalThemeId","undefined","_$memo","resolvedAppearance","title","icon","description","_el$4","_tmpl$3","_el$5","_$setAttribute","value","aria-invalid","customAccentError","aria-describedby","onInput","event","currentTarget","_el$6","_tmpl$2","fontSettingsPlacement","settings","fonts","menuPortalMount","frosted","reason","_el$7","_tmpl$4","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","hideActions","_el$8","_tmpl$5","AppearanceEditorActions","_$effect","_$className","class","saveReasonId","_el$9","_tmpl$8","_el$1","_el$10","saveDisabledReason","_el$0","_tmpl$7","onReset","onCancel","aria-busy","onSave","AppearancePopover","setMenuPortalMount","HTMLElement","open","onOpenChange","onOpen","onDismiss","as","triggerVariant","tooltip","tooltipIcon","side","closeLabel","ref","_$mergeProps","_$createComponent","_$memo","_$className","_$mergeProps"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from 'lucide-solid'\nimport { Show, createSignal, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../action-button'\nimport { Button } from '../../ui/button/button'\nimport { Input } from '../../ui/input/input'\nimport { AppearanceFontSettingsGroup } from './font-settings-group'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\n\nimport { Switch } from '../../ui/switch/switch'\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '../../ui/sheet/sheet'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices, isCustomAccent } from './appearance-choices'\nimport { SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Density remains outside the\n * accepted appearance surface; typeface settings are shared and host-persisted.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const custom = () => isCustomAccent(props)\n const accentDescription = () => {\n if (props.draft.accent === 'theme') return \"Theme default · Uses the palette's intended color.\"\n const preset = props.accentOptions.find((option) => option.id === props.draft.accent)\n if (preset) return `${preset.label} · Controls, glyphs, selections, code, and activity.`\n if (custom()) return 'Custom · Controls, glyphs, selections, code, and activity.'\n const offered = props.themeAccentOptions?.find((option) => option.id === props.draft.accent)\n // A stored theme accent survives a theme switch by id; when the new pair\n // cannot offer that slot the host falls back to the theme's own primary,\n // and the description says so rather than naming a colour not on screen.\n return offered\n ? `Theme ${offered.label.toLowerCase()} · The theme's own color, on controls and activity.`\n : \"Theme default · This theme does not carry that accent, so it uses the palette's intended color.\"\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {props.recoveryNotice}\n </p>\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n {/* The row exists only when the host carries a terminal preference:\n the draft field is the show/hide switch, so the editor can never\n render a terminal row that writes nothing. */}\n <Show when={props.draft.terminalThemeId !== undefined}>\n <TerminalRow\n selectedId={props.draft.terminalThemeId ?? 'theme'}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}\n />\n </Show>\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {props.customAccentError}\n </p>\n </Show>\n </div>\n </Show>\n {/* Inline, the typefaces read as one more palette choice; `end` hands\n the closing slot to them for hosts whose order is palette and\n surface first, text last. */}\n <Show when={props.fontSettingsPlacement !== 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n <Show when={props.fontSettingsPlacement === 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n </div>\n <Show when={!props.hideActions}>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. */}\n <div class=\"sticky bottom-0 z-10 mt-2 border-t bg-background px-4 py-3\">\n <AppearanceEditorActions {...props} />\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Reset, Cancel and Save, with the reason Save is unavailable. Rendered by the\n * editor itself, or — with `hideActions` — by a host that pins them in its own\n * footer, as `AppearancePopover` does.\n */\nexport function AppearanceEditorActions(props: AppearanceEditorProps) {\n const saveReasonId = createUniqueId()\n return (\n <div class=\"flex w-full flex-col gap-2\">\n <Show when={props.saveDisabledReason}>\n <p id={saveReasonId} role=\"status\" class=\"text-xs text-muted-foreground\">\n {props.saveDisabledReason}\n </p>\n </Show>\n {/* `global-appearance-editor-actions` lets these buttons grow with the UI\n font preference, like the rest of Appearance's own controls. */}\n <div class=\"global-appearance-editor-actions flex flex-wrap items-center gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** The editor in an inset Sheet docked beside the main view: the body scrolls and\n * Reset/Cancel/Save sit in the panel's full-width footer, always reachable.\n * Dismissal (Escape, the close button, an outside click) is `onDismiss`. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n const [menuPortalMount, setMenuPortalMount] = createSignal<HTMLElement>()\n\n return (\n <Sheet open={props.open} onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}>\n {/* The trigger is an icon-only action, so it explains itself through the\n shared ActionButton's tooltip (keyboard focus included) rather than a\n bare aria-label. `toolbar` also holds the pressed rung while Kobalte\n marks the trigger `data-expanded`, and repeats the glyph in the\n tooltip like the other toolbar actions. */}\n <SheetTrigger\n as={ActionButton}\n variant={props.triggerVariant === 'toolbar' ? 'toolbar' : 'ghost'}\n size=\"icon-sm\"\n tooltip=\"Open appearance settings\"\n tooltipIcon={\n props.triggerVariant === 'toolbar' ? <Palette aria-hidden=\"true\" /> : undefined\n }\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </SheetTrigger>\n <SheetContent side=\"end\" closeLabel=\"Close appearance settings\" ref={setMenuPortalMount}>\n <SheetHeader>\n <SheetTitle>Appearance</SheetTitle>\n <SheetDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.\n </SheetDescription>\n </SheetHeader>\n <SheetBody>\n <AppearanceEditor {...props} menuPortalMount={menuPortalMount()} hideActions />\n </SheetBody>\n <SheetFooter>\n <AppearanceEditorActions {...props} />\n </SheetFooter>\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,SAAgB+B,iBAAiBC,OAA8B;CAC7D,MAAMC,UAAU3B,eAAe;CAC/B,MAAM4B,eAAeP,eAAeK,KAAK;CACzC,MAAMG,0BAA0B;EAC9B,IAAIH,MAAMI,MAAMC,WAAW,SAAS,OAAO;EAC3C,MAAMC,SAASN,MAAMO,cAAcC,MAAMC,WAAWA,OAAOC,OAAOV,MAAMI,MAAMC,MAAM;EACpF,IAAIC,QAAQ,OAAO,GAAGA,OAAOK,MAAK;EAClC,IAAIT,OAAO,GAAG,OAAO;EACrB,MAAMU,UAAUZ,MAAMa,oBAAoBL,MAAMC,WAAWA,OAAOC,OAAOV,MAAMI,MAAMC,MAAM;EAI3F,OAAOO,UACH,SAASA,QAAQD,MAAMG,YAAY,EAAC,uDACpC;CACN;CACA,MAAMC,yBACJf,MAAMI,MAAMY,YAAY,WACpB,oCACAhB,MAAMI,MAAMY,YAAY,YACtB,yCACChB,MAAMiB,kBAAkBC,2BAA2B;CAC5D,cAAA;EAAA,IAAAC,OAAAC,QAAA,GAAAC,QAAAF,KAAAG;EAAAC,OAAAJ,MAAAK,gBAEKpD,MAAI;GAAA,IAACqD,OAAI;IAAA,OAAEzB,MAAM0B;GAAc;GAAA,IAAAC,WAAA;IAAA,IAAAC,QAAAC,OAAA;IAAAN,OAAAK,aAE3B5B,MAAM0B,cAAc;IAAA,OAAAE;GAAA;EAAA,CAAA,GAAAP,KAAA;EAAAE,OAAAJ,MAAAK,gBAGxBhC,aAAgBQ,KAAK,GAAAqB,KAAA;EAAAE,OAAAF,OAAAG,gBAEnB1B,UAAQ;GACPgC,YAAU;GAAA,IACVC,aAAU;IAAA,OAAE/B,MAAMI,MAAM4B;GA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A,CAAA;EAAA;CAAA,CAAA;AAK5C"}
1
+ {"version":3,"file":"appearance-editor.js","names":["EyeOff","Palette","PanelsTopLeft","SlidersHorizontal","Show","createSignal","createUniqueId","cn","ActionButton","Button","Input","AppearanceFontSettingsGroup","DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS","Switch","Sheet","SheetBody","SheetContent","SheetDescription","SheetFooter","SheetHeader","SheetTitle","SheetTrigger","AppearanceEditorProps","AppearancePopoverProps","ModeChoices","AccentChoices","GlassChoices","isCustomAccent","SettingsRow","TerminalRow","ThemeRow","AppearanceEditor","props","errorId","custom","accentDescription","draft","accent","preset","accentOptions","find","option","id","label","offered","themeAccentOptions","toLowerCase","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$6","_el$3","firstChild","_$insert","_$createComponent","when","recoveryNotice","children","_el$2","_tmpl$","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","terminalThemeId","undefined","_$memo","resolvedAppearance","title","icon","description","_el$4","_tmpl$3","_el$5","_$setAttribute","value","aria-invalid","customAccentError","aria-describedby","onInput","event","currentTarget","_el$6","_tmpl$2","fontSettingsPlacement","settings","fonts","menuPortalMount","frosted","reason","_el$7","_tmpl$4","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","hideActions","_el$8","_tmpl$5","AppearanceEditorActions","_$effect","_$className","class","saveReasonId","_el$9","_tmpl$8","_el$1","_el$10","saveDisabledReason","_el$0","_tmpl$7","onReset","onCancel","aria-busy","onSave","AppearancePopover","setMenuPortalMount","HTMLElement","open","onOpenChange","onOpen","onDismiss","as","triggerVariant","tooltip","tooltipIcon","side","closeLabel","ref","_$mergeProps","_$createComponent","_$memo","Switch","_$className","_$mergeProps"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from 'lucide-solid'\nimport { Show, createSignal, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { ActionButton } from '../action-button'\nimport { Button } from '../../ui/button/button'\nimport { Input } from '../../ui/input/input'\nimport { AppearanceFontSettingsGroup } from './font-settings-group'\nimport { DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS } from '#lib/appearance-font-settings'\n\nimport { Switch } from '../../ui/switch/switch'\nimport {\n Sheet,\n SheetBody,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n} from '../../ui/sheet/sheet'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices, isCustomAccent } from './appearance-choices'\nimport { SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Density remains outside the\n * accepted appearance surface; typeface settings are shared and host-persisted.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const custom = () => isCustomAccent(props)\n const accentDescription = () => {\n if (props.draft.accent === 'theme') return \"Theme default · Uses the palette's intended color.\"\n const preset = props.accentOptions.find((option) => option.id === props.draft.accent)\n if (preset) return `${preset.label} · Controls, glyphs, selections, code, and activity.`\n if (custom()) return 'Custom · Controls, glyphs, selections, code, and activity.'\n const offered = props.themeAccentOptions?.find((option) => option.id === props.draft.accent)\n // A stored theme accent survives a theme switch by id; when the new pair\n // cannot offer that slot the host falls back to the theme's own primary,\n // and the description says so rather than naming a colour not on screen.\n return offered\n ? `Theme ${offered.label.toLowerCase()} · The theme's own color, on controls and activity.`\n : \"Theme default · This theme does not carry that accent, so it uses the palette's intended color.\"\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {props.recoveryNotice}\n </p>\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n {/* The row exists only when the host carries a terminal preference:\n the draft field is the show/hide switch, so the editor can never\n render a terminal row that writes nothing. */}\n <Show when={props.draft.terminalThemeId !== undefined}>\n <TerminalRow\n selectedId={props.draft.terminalThemeId ?? 'theme'}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}\n />\n </Show>\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {props.customAccentError}\n </p>\n </Show>\n </div>\n </Show>\n {/* Inline, the typefaces read as one more palette choice; `end` hands\n the closing slot to them for hosts whose order is palette and\n surface first, text last. */}\n <Show when={props.fontSettingsPlacement !== 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n <Show when={props.fontSettingsPlacement === 'end'}>\n <AppearanceFontSettingsGroup\n settings={props.draft.fonts ?? DEFAULT_APPEARANCE_EDITOR_FONT_SETTINGS}\n menuPortalMount={props.menuPortalMount}\n disabled={props.saving}\n onChange={(fonts) => props.onChange({ fonts })}\n />\n </Show>\n </div>\n <Show when={!props.hideActions}>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. */}\n <div class=\"sticky bottom-0 z-10 mt-2 border-t bg-background px-4 py-3\">\n <AppearanceEditorActions {...props} />\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Reset, Cancel and Save, with the reason Save is unavailable. Rendered by the\n * editor itself, or — with `hideActions` — by a host that pins them in its own\n * footer, as `AppearancePopover` does.\n */\nexport function AppearanceEditorActions(props: AppearanceEditorProps) {\n const saveReasonId = createUniqueId()\n return (\n <div class=\"flex w-full flex-col gap-2\">\n <Show when={props.saveDisabledReason}>\n <p id={saveReasonId} role=\"status\" class=\"text-xs text-muted-foreground\">\n {props.saveDisabledReason}\n </p>\n </Show>\n {/* `global-appearance-editor-actions` lets these buttons grow with the UI\n font preference, like the rest of Appearance's own controls. */}\n <div class=\"global-appearance-editor-actions flex flex-wrap items-center gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** The editor in an inset Sheet docked beside the main view: the body scrolls and\n * Reset/Cancel/Save sit in the panel's full-width footer, always reachable.\n * Dismissal (Escape, the close button, an outside click) is `onDismiss`. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n const [menuPortalMount, setMenuPortalMount] = createSignal<HTMLElement>()\n\n return (\n <Sheet open={props.open} onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}>\n {/* The trigger is an icon-only action, so it explains itself through the\n shared ActionButton's tooltip (keyboard focus included) rather than a\n bare aria-label. `toolbar` also holds the pressed rung while Kobalte\n marks the trigger `data-expanded`, and repeats the glyph in the\n tooltip like the other toolbar actions. */}\n <SheetTrigger\n as={ActionButton}\n variant={props.triggerVariant === 'toolbar' ? 'toolbar' : 'ghost'}\n size=\"icon-sm\"\n tooltip=\"Open appearance settings\"\n tooltipIcon={\n props.triggerVariant === 'toolbar' ? <Palette aria-hidden=\"true\" /> : undefined\n }\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </SheetTrigger>\n <SheetContent side=\"end\" closeLabel=\"Close appearance settings\" ref={setMenuPortalMount}>\n <SheetHeader>\n <SheetTitle>Appearance</SheetTitle>\n <SheetDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.\n </SheetDescription>\n </SheetHeader>\n <SheetBody>\n <AppearanceEditor {...props} menuPortalMount={menuPortalMount()} hideActions />\n </SheetBody>\n <SheetFooter>\n <AppearanceEditorActions {...props} />\n </SheetFooter>\n </SheetContent>\n </Sheet>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,SAAgB+B,iBAAiBC,OAA8B;CAC7D,MAAMC,UAAU3B,eAAe;CAC/B,MAAM4B,eAAeP,eAAeK,KAAK;CACzC,MAAMG,0BAA0B;EAC9B,IAAIH,MAAMI,MAAMC,WAAW,SAAS,OAAO;EAC3C,MAAMC,SAASN,MAAMO,cAAcC,MAAMC,WAAWA,OAAOC,OAAOV,MAAMI,MAAMC,MAAM;EACpF,IAAIC,QAAQ,OAAO,GAAGA,OAAOK,MAAK;EAClC,IAAIT,OAAO,GAAG,OAAO;EACrB,MAAMU,UAAUZ,MAAMa,oBAAoBL,MAAMC,WAAWA,OAAOC,OAAOV,MAAMI,MAAMC,MAAM;EAI3F,OAAOO,UACH,SAASA,QAAQD,MAAMG,YAAY,EAAC,uDACpC;CACN;CACA,MAAMC,yBACJf,MAAMI,MAAMY,YAAY,WACpB,oCACAhB,MAAMI,MAAMY,YAAY,YACtB,yCACChB,MAAMiB,kBAAkBC,2BAA2B;CAC5D,cAAA;EAAA,IAAAC,OAAAC,QAAA,GAAAC,QAAAF,KAAAG;EAAAC,OAAAJ,MAAAK,gBAEKpD,MAAI;GAAA,IAACqD,OAAI;IAAA,OAAEzB,MAAM0B;GAAc;GAAA,IAAAC,WAAA;IAAA,IAAAC,QAAAC,OAAA;IAAAN,OAAAK,aAE3B5B,MAAM0B,cAAc;IAAA,OAAAE;GAAA;EAAA,CAAA,GAAAP,KAAA;EAAAE,OAAAJ,M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AA,CAAA;MAAA,EAAA,CAAA;MAAArD,gBAE7EtC,aAAW,EAAA,IAAAyC,WAAA;OAAA,OAAAH,gBACTwD,yBAA4BhF,KAAK;MAAA,EAAA,CAAA;KAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAK5C"}
@@ -1,5 +1,5 @@
1
- import { Badge } from "../../ui/badge/badge.js";
2
1
  import { Button } from "../../ui/button/button.js";
2
+ import { Badge } from "../../ui/badge/badge.js";
3
3
  import { Skeleton } from "../../ui/skeleton/skeleton.js";
4
4
  import { keyedRows } from "../../../lib/keyed-rows.js";
5
5
  import { createComponent, effect, insert, memo, setAttribute, template } from "solid-js/web";
@@ -0,0 +1,56 @@
1
+ import { type ComponentProps, type JSX } from 'solid-js';
2
+ import { type TraceLineProps } from '../../ui/trace';
3
+ /**
4
+ * ChainOfThought.
5
+ *
6
+ * A summary line that opens onto the steps behind it: "Searched 3 sources and
7
+ * compared them", then each source and each comparison as its own line. Reach for
8
+ * `Reasoning` when the thinking is prose, for `Plan` when the steps are a
9
+ * proposal still to be carried out, and for a plain `Trace` when each line is a
10
+ * tool call — a step here is a statement about the agent's *method*, whatever
11
+ * the host chooses to put in it.
12
+ *
13
+ * Nothing here knows how the steps were produced. The host passes the summary and
14
+ * the steps it wants shown; the component does not imply there is more, and a
15
+ * summary with no steps is a plain line.
16
+ *
17
+ * ## Steps
18
+ *
19
+ * A `ChainOfThoughtStep` is a `TraceLine` with a three-state `status` — `complete`
20
+ * (keeps its own icon, or a tick), `active` (running mark and shimmer) and
21
+ * `pending` (dashed mark). Every status is also spoken. A step without a status
22
+ * makes no claim at all. A step's `children` are its evidence — search-result
23
+ * badges, a snippet — and are open by default: someone who unfolded the summary
24
+ * to see the working wants to see what the working found, and one more click per
25
+ * step to read it defeats the point of the summary.
26
+ *
27
+ * `description` is a single truncated row beside the label. Anything longer
28
+ * belongs in `children`.
29
+ *
30
+ * Both parts are lines: put a `ChainOfThought` inside a `Trace`, next to the
31
+ * other activity of the turn.
32
+ */
33
+ export type ChainOfThoughtStepStatus = 'complete' | 'active' | 'pending';
34
+ /** The words spoken for each step status. */
35
+ export declare const CHAIN_OF_THOUGHT_STATUS_LABELS: Readonly<Record<ChainOfThoughtStepStatus, string>>;
36
+ export type ChainOfThoughtProps = Omit<TraceLineProps, 'title' | 'href' | 'onSelect' | 'selectHaspopup'> & {
37
+ /** The one-line account of what the steps add up to. */
38
+ summary?: JSX.Element;
39
+ /** The steps' accessible name. */
40
+ stepsLabel?: string;
41
+ };
42
+ export declare function ChainOfThought(props: ChainOfThoughtProps): JSX.Element;
43
+ export type ChainOfThoughtStepProps = Omit<TraceLineProps, 'title' | 'status' | 'href' | 'onSelect' | 'selectHaspopup'> & {
44
+ label: JSX.Element;
45
+ status?: ChainOfThoughtStepStatus;
46
+ };
47
+ export declare function ChainOfThoughtStep(props: ChainOfThoughtStepProps): JSX.Element;
48
+ /** Evidence for a step: the sources it searched, as a wrapping row of badges. */
49
+ export declare function ChainOfThoughtResults(props: ComponentProps<'ul'>): JSX.Element;
50
+ export type ChainOfThoughtResultProps = Omit<ComponentProps<'li'>, 'children'> & {
51
+ /** Rendered as text. A long label truncates and keeps its full text in `title`. */
52
+ label: string;
53
+ icon?: JSX.Element;
54
+ };
55
+ export declare function ChainOfThoughtResult(props: ChainOfThoughtResultProps): JSX.Element;
56
+ //# sourceMappingURL=chain-of-thought.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-of-thought.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/chain-of-thought/chain-of-thought.tsx"],"names":[],"mappings":"AACA,OAAO,EAA2C,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAGjG,OAAO,EAAoB,KAAK,cAAc,EAAoB,MAAM,gBAAgB,CAAA;AAKxF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExE,6CAA6C;AAC7C,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAI7F,CAAA;AAQD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,cAAc,EACd,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,CACjD,GAAG;IACF,wDAAwD;IACxD,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAkBxD;AAED,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,cAAc,EACd,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,gBAAgB,CAC5D,GAAG;IACF,KAAK,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,wBAAwB,CAAA;CAClC,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAehE;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,eAYhE;AAED,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC/E,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,eAUpE"}
@@ -0,0 +1,117 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { Badge } from "../../ui/badge/badge.js";
3
+ import { Trace, TraceLine } from "../../ui/trace/trace.js";
4
+ import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
5
+ import { ListOrdered } from "lucide-solid";
6
+ import { children, splitProps } from "solid-js";
7
+ //#region src/components/composites/chain-of-thought/chain-of-thought.tsx
8
+ var _tmpl$ = /*#__PURE__*/ template(`<ul role=list data-slot=chain-of-thought-results>`);
9
+ var _tmpl$2 = /*#__PURE__*/ template(`<span class=truncate>`);
10
+ var _tmpl$3 = /*#__PURE__*/ template(`<li data-slot=chain-of-thought-result>`);
11
+ var deferred = (render) => render;
12
+ /** The words spoken for each step status. */
13
+ var CHAIN_OF_THOUGHT_STATUS_LABELS = {
14
+ complete: "Done",
15
+ active: "In progress",
16
+ pending: "Pending"
17
+ };
18
+ var TRACE_STATUS = {
19
+ complete: "success",
20
+ active: "running",
21
+ pending: "pending"
22
+ };
23
+ function ChainOfThought(props) {
24
+ const [local, rest] = splitProps(props, [
25
+ "summary",
26
+ "stepsLabel",
27
+ "icon",
28
+ "children"
29
+ ]);
30
+ const steps = children(() => local.children);
31
+ const hasSteps = () => steps.toArray().length > 0;
32
+ const stepList = () => createComponent(Trace, {
33
+ size: "sm",
34
+ get ["aria-label"]() {
35
+ return local.stepsLabel ?? "Steps";
36
+ },
37
+ get children() {
38
+ return steps();
39
+ }
40
+ });
41
+ return createComponent(TraceLine, mergeProps({
42
+ get icon() {
43
+ return local.icon ?? createComponent(ListOrdered, {});
44
+ },
45
+ get title() {
46
+ return local.summary ?? "Steps";
47
+ }
48
+ }, rest, { get children() {
49
+ return memo(() => !!hasSteps())() ? deferred(stepList) : void 0;
50
+ } }));
51
+ }
52
+ function ChainOfThoughtStep(props) {
53
+ const [local, rest] = splitProps(props, [
54
+ "label",
55
+ "status",
56
+ "statusLabel",
57
+ "defaultOpen"
58
+ ]);
59
+ return createComponent(TraceLine, mergeProps({
60
+ get title() {
61
+ return local.label;
62
+ },
63
+ get status() {
64
+ return memo(() => !!local.status)() ? TRACE_STATUS[local.status] : void 0;
65
+ },
66
+ get statusLabel() {
67
+ return memo(() => !!local.status)() ? local.statusLabel ?? CHAIN_OF_THOUGHT_STATUS_LABELS[local.status] : void 0;
68
+ },
69
+ get defaultOpen() {
70
+ return local.defaultOpen ?? true;
71
+ }
72
+ }, rest));
73
+ }
74
+ /** Evidence for a step: the sources it searched, as a wrapping row of badges. */
75
+ function ChainOfThoughtResults(props) {
76
+ const [local, rest] = splitProps(props, ["class", "children"]);
77
+ return (() => {
78
+ var _el$ = _tmpl$();
79
+ spread(_el$, mergeProps({ get ["class"]() {
80
+ return cn("m-0 flex min-w-0 list-none flex-wrap gap-1.5 p-0", local.class);
81
+ } }, rest), false, true);
82
+ insert(_el$, () => local.children);
83
+ return _el$;
84
+ })();
85
+ }
86
+ function ChainOfThoughtResult(props) {
87
+ const [local, rest] = splitProps(props, [
88
+ "class",
89
+ "label",
90
+ "icon"
91
+ ]);
92
+ return (() => {
93
+ var _el$2 = _tmpl$3();
94
+ spread(_el$2, mergeProps({ get ["class"]() {
95
+ return cn("min-w-0 max-w-full", local.class);
96
+ } }, rest), false, true);
97
+ insert(_el$2, createComponent(Badge, {
98
+ variant: "outline",
99
+ "class": "max-w-full min-w-0",
100
+ get title() {
101
+ return local.label;
102
+ },
103
+ get children() {
104
+ return [memo(() => local.icon), (() => {
105
+ var _el$3 = _tmpl$2();
106
+ insert(_el$3, () => local.label);
107
+ return _el$3;
108
+ })()];
109
+ }
110
+ }));
111
+ return _el$2;
112
+ })();
113
+ }
114
+ //#endregion
115
+ export { CHAIN_OF_THOUGHT_STATUS_LABELS, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep };
116
+
117
+ //# sourceMappingURL=chain-of-thought.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-of-thought.js","names":["ListOrdered","children","resolveChildren","splitProps","ComponentProps","JSX","cn","Badge","Trace","TraceLine","TraceLineProps","TraceStatus","deferred","render","Element","ChainOfThoughtStepStatus","CHAIN_OF_THOUGHT_STATUS_LABELS","Readonly","Record","complete","active","pending","TRACE_STATUS","ChainOfThoughtProps","Omit","summary","stepsLabel","ChainOfThought","props","local","rest","steps","hasSteps","toArray","length","stepList","_$createComponent","size","aria-label","_$mergeProps","icon","title","_$memo","undefined","ChainOfThoughtStepProps","label","status","ChainOfThoughtStep","statusLabel","defaultOpen","ChainOfThoughtResults","_el$","_tmpl$","_$spread","class","_$insert","ChainOfThoughtResultProps","ChainOfThoughtResult","_el$2","_tmpl$3","variant","_el$3","_tmpl$2","resolveChildren","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/composites/chain-of-thought/chain-of-thought.tsx"],"sourcesContent":["import { ListOrdered } from 'lucide-solid'\nimport { children as resolveChildren, splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Badge } from '../../ui/badge'\nimport { Trace, TraceLine, type TraceLineProps, type TraceStatus } from '../../ui/trace'\n\n// A function child runs once, when the content mounts (see `deferred` in `tool.tsx`).\nconst deferred = (render: () => JSX.Element) => render as unknown as JSX.Element\n\n/**\n * ChainOfThought.\n *\n * A summary line that opens onto the steps behind it: \"Searched 3 sources and\n * compared them\", then each source and each comparison as its own line. Reach for\n * `Reasoning` when the thinking is prose, for `Plan` when the steps are a\n * proposal still to be carried out, and for a plain `Trace` when each line is a\n * tool call — a step here is a statement about the agent's *method*, whatever\n * the host chooses to put in it.\n *\n * Nothing here knows how the steps were produced. The host passes the summary and\n * the steps it wants shown; the component does not imply there is more, and a\n * summary with no steps is a plain line.\n *\n * ## Steps\n *\n * A `ChainOfThoughtStep` is a `TraceLine` with a three-state `status` — `complete`\n * (keeps its own icon, or a tick), `active` (running mark and shimmer) and\n * `pending` (dashed mark). Every status is also spoken. A step without a status\n * makes no claim at all. A step's `children` are its evidence — search-result\n * badges, a snippet — and are open by default: someone who unfolded the summary\n * to see the working wants to see what the working found, and one more click per\n * step to read it defeats the point of the summary.\n *\n * `description` is a single truncated row beside the label. Anything longer\n * belongs in `children`.\n *\n * Both parts are lines: put a `ChainOfThought` inside a `Trace`, next to the\n * other activity of the turn.\n */\nexport type ChainOfThoughtStepStatus = 'complete' | 'active' | 'pending'\n\n/** The words spoken for each step status. */\nexport const CHAIN_OF_THOUGHT_STATUS_LABELS: Readonly<Record<ChainOfThoughtStepStatus, string>> = {\n complete: 'Done',\n active: 'In progress',\n pending: 'Pending',\n}\n\nconst TRACE_STATUS: Readonly<Record<ChainOfThoughtStepStatus, TraceStatus>> = {\n complete: 'success',\n active: 'running',\n pending: 'pending',\n}\n\nexport type ChainOfThoughtProps = Omit<\n TraceLineProps,\n 'title' | 'href' | 'onSelect' | 'selectHaspopup'\n> & {\n /** The one-line account of what the steps add up to. */\n summary?: JSX.Element\n /** The steps' accessible name. */\n stepsLabel?: string\n}\n\nexport function ChainOfThought(props: ChainOfThoughtProps) {\n const [local, rest] = splitProps(props, ['summary', 'stepsLabel', 'icon', 'children'])\n // Resolved once so the steps are created once: a step keeps its own open state\n // and its DOM while the summary is folded and unfolded.\n const steps = resolveChildren(() => local.children)\n const hasSteps = () => steps.toArray().length > 0\n // A function child runs only when the content mounts, and once.\n const stepList = () => (\n <Trace size=\"sm\" aria-label={local.stepsLabel ?? 'Steps'}>\n {steps()}\n </Trace>\n )\n\n return (\n <TraceLine icon={local.icon ?? <ListOrdered />} title={local.summary ?? 'Steps'} {...rest}>\n {hasSteps() ? deferred(stepList) : undefined}\n </TraceLine>\n )\n}\n\nexport type ChainOfThoughtStepProps = Omit<\n TraceLineProps,\n 'title' | 'status' | 'href' | 'onSelect' | 'selectHaspopup'\n> & {\n label: JSX.Element\n status?: ChainOfThoughtStepStatus\n}\n\nexport function ChainOfThoughtStep(props: ChainOfThoughtStepProps) {\n const [local, rest] = splitProps(props, ['label', 'status', 'statusLabel', 'defaultOpen'])\n return (\n <TraceLine\n title={local.label}\n status={local.status ? TRACE_STATUS[local.status] : undefined}\n statusLabel={\n local.status\n ? (local.statusLabel ?? CHAIN_OF_THOUGHT_STATUS_LABELS[local.status])\n : undefined\n }\n defaultOpen={local.defaultOpen ?? true}\n {...rest}\n />\n )\n}\n\n/** Evidence for a step: the sources it searched, as a wrapping row of badges. */\nexport function ChainOfThoughtResults(props: ComponentProps<'ul'>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <ul\n role=\"list\"\n data-slot=\"chain-of-thought-results\"\n class={cn('m-0 flex min-w-0 list-none flex-wrap gap-1.5 p-0', local.class)}\n {...rest}\n >\n {local.children}\n </ul>\n )\n}\n\nexport type ChainOfThoughtResultProps = Omit<ComponentProps<'li'>, 'children'> & {\n /** Rendered as text. A long label truncates and keeps its full text in `title`. */\n label: string\n icon?: JSX.Element\n}\n\nexport function ChainOfThoughtResult(props: ChainOfThoughtResultProps) {\n const [local, rest] = splitProps(props, ['class', 'label', 'icon'])\n return (\n <li data-slot=\"chain-of-thought-result\" class={cn('min-w-0 max-w-full', local.class)} {...rest}>\n <Badge variant=\"outline\" class=\"max-w-full min-w-0\" title={local.label}>\n {local.icon}\n <span class=\"truncate\">{local.label}</span>\n </Badge>\n </li>\n )\n}\n"],"mappings":";;;;;;;;;;AAOA,IAAMY,YAAYC,WAA8BA;;AAmChD,IAAaG,iCAAqF;CAChGG,UAAU;CACVC,QAAQ;CACRC,SAAS;AACX;AAEA,IAAMC,eAAwE;CAC5EH,UAAU;CACVC,QAAQ;CACRC,SAAS;AACX;AAYA,SAAgBM,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQ3B,WAAWyB,OAAO;EAAC;EAAW;EAAc;EAAQ;CAAU,CAAC;CAGrF,MAAMG,QAAQ7B,eAAsB2B,MAAM5B,QAAQ;CAClD,MAAM+B,iBAAiBD,MAAME,QAAQ,CAAC,CAACC,SAAS;CAEhD,MAAMC,iBAAWC,gBACd5B,OAAK;EAAC6B,MAAI;EAAA,KAAA,gBAAA;GAAA,OAAkBR,MAAMH,cAAc;EAAO;EAAA,IAAAzB,WAAA;GAAA,OACrD8B,MAAM;EAAC;CAAA,CAAA;CAIZ,OAAAK,gBACG3B,WAAS8B,WAAA;EAAA,IAACC,OAAI;GAAA,OAAEX,MAAMW,QAAIJ,gBAAKpC,aAAW,CAAA,CAAA;E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AC;EAAS;EAAS;CAAM,CAAC;CAClE,cAAA;EAAA,IAAA8B,QAAAC,QAAA;EAAAN,OAAAK,OAAAnB,WAAA,EAAA,KAAA,WAAA;GAAA,OACiDjC,GAAG,sBAAsBuB,MAAMyB,KAAK;EAAC,EAAA,GAAMxB,IAAI,GAAA,OAAA,IAAA;EAAAyB,OAAAG,OAAAtB,gBAC3F7B,OAAK;GAACqD,SAAO;GAAA,SAAA;GAAA,IAAsCnB,QAAK;IAAA,OAAEZ,MAAMgB;GAAK;GAAA,IAAA5C,WAAA;IAAA,OAAA,CAAAyC,WACnEb,MAAMW,IAAI,UAAA;KAAA,IAAAqB,QAAAC,QAAA;KAAAP,OAAAM,aACahC,MAAMgB,KAAK;KAAA,OAAAgB;IAAA,EAAA,CAAA,CAAA;GAAA;EAAA,CAAA,CAAA;EAAA,OAAAH;CAAA,EAAA,CAAA;AAI3C"}
@@ -0,0 +1,2 @@
1
+ export { CHAIN_OF_THOUGHT_STATUS_LABELS, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep, type ChainOfThoughtProps, type ChainOfThoughtResultProps, type ChainOfThoughtStepProps, type ChainOfThoughtStepStatus, } from './chain-of-thought';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/chain-of-thought/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { CHAIN_OF_THOUGHT_STATUS_LABELS, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep } from "./chain-of-thought.js";
2
+ export { CHAIN_OF_THOUGHT_STATUS_LABELS, ChainOfThought, ChainOfThoughtResult, ChainOfThoughtResults, ChainOfThoughtStep };
@@ -0,0 +1,67 @@
1
+ import { type ComponentProps, type JSX } from 'solid-js';
2
+ import { type VariantProps } from '#lib/variants';
3
+ /**
4
+ * Chat.
5
+ *
6
+ * The frame a conversation lives in: a header, a strip for things the reader
7
+ * must know before reading anything else, the thread, and the composer. It is a
8
+ * layout and nothing more — the thread is a `MessageScroller`, the input is a
9
+ * composer, and what happens in between is the host's — which is why it takes
10
+ * slots instead of data.
11
+ *
12
+ * ## Why notices have their own row
13
+ *
14
+ * "The connection dropped", "this transcript has a gap", "this session is
15
+ * read-only" are about the whole conversation, not about a turn, and they must
16
+ * not scroll away with the turns. They sit between the header and the thread in
17
+ * their own grid track, so a notice appearing never steals the thread's row and
18
+ * collapses to zero height when there are none. Each notice states its cause in
19
+ * words and carries its own remedy (`action`); one that reports a *change*
20
+ * (`live`) is announced, one that describes a standing condition is not.
21
+ *
22
+ * ## Layout
23
+ *
24
+ * `h-full min-h-0`, so the thread scrolls inside the frame rather than the page
25
+ * growing, and a `min-w-0` track, so a long unbroken token in a turn cannot widen
26
+ * the whole conversation. Nothing here sets a width: the reading column is the
27
+ * turn's, and the composer sets its own measure.
28
+ */
29
+ export type ChatProps = ComponentProps<'section'> & {
30
+ header?: JSX.Element;
31
+ /** `ChatNotice`s. The row collapses when this is empty. */
32
+ notices?: JSX.Element;
33
+ /** The composer. */
34
+ composer?: JSX.Element;
35
+ };
36
+ export declare function Chat(props: ChatProps): JSX.Element;
37
+ export type ChatHeaderProps = Omit<ComponentProps<'header'>, 'title'> & {
38
+ title: JSX.Element;
39
+ /** One line under the title: identity, scope, generation. */
40
+ subtitle?: JSX.Element;
41
+ /** The conversation's state in words (a `StatusChip`). */
42
+ status?: JSX.Element;
43
+ /** Host actions: rename, archive, hand off. */
44
+ actions?: JSX.Element;
45
+ };
46
+ export declare function ChatHeader(props: ChatHeaderProps): JSX.Element;
47
+ export declare const chatNoticeVariants: (props?: ({
48
+ tone?: "warning" | "info" | "danger" | null | undefined;
49
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
50
+ export type ChatNoticeProps = Omit<ComponentProps<'div'>, 'title'> & VariantProps<typeof chatNoticeVariants> & {
51
+ title: JSX.Element;
52
+ description?: JSX.Element;
53
+ /** The remedy: Reconnect, Jump to terminal. */
54
+ action?: JSX.Element;
55
+ /** Announce it. Use for a change (connection lost), not a standing condition. */
56
+ live?: 'polite' | 'assertive';
57
+ };
58
+ export declare function ChatNotice(props: ChatNoticeProps): JSX.Element;
59
+ export type ChatEmptyProps = Omit<ComponentProps<'div'>, 'title'> & {
60
+ title: JSX.Element;
61
+ description?: JSX.Element;
62
+ /** Prompt chips (`Suggestions`), shown only when the host has real ones. */
63
+ suggestions?: JSX.Element;
64
+ };
65
+ /** A conversation with no turns yet. Centred in the thread, never in a card. */
66
+ export declare function ChatEmpty(props: ChatEmptyProps): JSX.Element;
67
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/chat/chat.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAG1E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG;IAClD,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACvB,CAAA;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,eAiBpC;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG;IACtE,KAAK,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACtB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB,CAAA;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAuBhD;AAED,eAAO,MAAM,kBAAkB;;8EAY9B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAChE,YAAY,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACxC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACpB,iFAAiF;IACjF,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;CAC9B,CAAA;AAEH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,eAyChD;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,EAAE,GAAG,CAAC,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAC1B,CAAA;AAED,gFAAgF;AAChF,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,eAoB9C"}
@@ -0,0 +1,179 @@
1
+ import { cn } from "../../../lib/utils.js";
2
+ import { cva } from "../../../lib/variants.js";
3
+ import { Dynamic, className, createComponent, effect, insert, memo, mergeProps, spread, template } from "solid-js/web";
4
+ import { CircleAlert, Info, TriangleAlert } from "lucide-solid";
5
+ import { Show, splitProps } from "solid-js";
6
+ //#region src/components/composites/chat/chat.tsx
7
+ var _tmpl$ = /*#__PURE__*/ template(`<section data-slot=chat><div class="row-start-1 min-w-0"></div><div class="row-start-2 flex min-w-0 flex-col"></div><div class="row-start-3 flex min-h-0 min-w-0 flex-col"></div><div class="row-start-4 min-w-0">`);
8
+ var _tmpl$2 = /*#__PURE__*/ template(`<p class="m-0 truncate text-xs text-muted-foreground">`);
9
+ var _tmpl$3 = /*#__PURE__*/ template(`<div class="flex shrink-0 items-center gap-1">`);
10
+ var _tmpl$4 = /*#__PURE__*/ template(`<header data-slot=chat-header><div class="flex min-w-0 flex-1 flex-col"><h2 class="m-0 truncate text-sm font-semibold tracking-tight">`);
11
+ var _tmpl$5 = /*#__PURE__*/ template(`<p class="m-0 text-xs text-muted-foreground [overflow-wrap:anywhere]">`);
12
+ var _tmpl$6 = /*#__PURE__*/ template(`<div class="flex shrink-0 items-center gap-1.5">`);
13
+ var _tmpl$7 = /*#__PURE__*/ template(`<div data-slot=chat-notice><span aria-hidden=true></span><div class="min-w-0 flex-1"><p class="m-0 font-medium [overflow-wrap:anywhere]">`);
14
+ var _tmpl$8 = /*#__PURE__*/ template(`<p class="m-0 text-sm text-muted-foreground text-balance">`);
15
+ var _tmpl$9 = /*#__PURE__*/ template(`<div data-slot=chat-empty><div class="flex flex-col gap-1"><h3 class="m-0 text-base font-semibold tracking-tight text-balance">`);
16
+ function Chat(props) {
17
+ const [local, rest] = splitProps(props, [
18
+ "class",
19
+ "header",
20
+ "notices",
21
+ "composer",
22
+ "children"
23
+ ]);
24
+ return (() => {
25
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
26
+ spread(_el$, mergeProps({ get ["class"]() {
27
+ return cn("grid h-full min-h-0 min-w-0 grid-cols-[minmax(0,1fr)] grid-rows-[auto_auto_minmax(0,1fr)_auto] bg-background text-foreground", local.class);
28
+ } }, rest), false, true);
29
+ insert(_el$2, () => local.header);
30
+ insert(_el$3, () => local.notices);
31
+ insert(_el$4, () => local.children);
32
+ insert(_el$5, () => local.composer);
33
+ return _el$;
34
+ })();
35
+ }
36
+ function ChatHeader(props) {
37
+ const [local, rest] = splitProps(props, [
38
+ "class",
39
+ "title",
40
+ "subtitle",
41
+ "status",
42
+ "actions"
43
+ ]);
44
+ return (() => {
45
+ var _el$6 = _tmpl$4(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild;
46
+ spread(_el$6, mergeProps({ get ["class"]() {
47
+ return cn("flex min-h-topbar min-w-0 items-center gap-3 border-b border-border px-4 py-2", local.class);
48
+ } }, rest), false, true);
49
+ insert(_el$8, () => local.title);
50
+ insert(_el$7, createComponent(Show, {
51
+ get when() {
52
+ return local.subtitle;
53
+ },
54
+ get children() {
55
+ var _el$9 = _tmpl$2();
56
+ insert(_el$9, () => local.subtitle);
57
+ return _el$9;
58
+ }
59
+ }), null);
60
+ insert(_el$6, createComponent(Show, {
61
+ get when() {
62
+ return local.status;
63
+ },
64
+ get children() {
65
+ return local.status;
66
+ }
67
+ }), null);
68
+ insert(_el$6, createComponent(Show, {
69
+ get when() {
70
+ return local.actions;
71
+ },
72
+ get children() {
73
+ var _el$0 = _tmpl$3();
74
+ insert(_el$0, () => local.actions);
75
+ return _el$0;
76
+ }
77
+ }), null);
78
+ return _el$6;
79
+ })();
80
+ }
81
+ var chatNoticeVariants = cva("flex min-w-0 items-start gap-2.5 border-b px-4 py-2 text-sm", {
82
+ variants: { tone: {
83
+ info: "border-border bg-muted/40",
84
+ warning: "border-warning/30 bg-warning-subtle",
85
+ danger: "border-destructive/30 bg-destructive-subtle"
86
+ } },
87
+ defaultVariants: { tone: "info" }
88
+ });
89
+ function ChatNotice(props) {
90
+ const [local, rest] = splitProps(props, [
91
+ "class",
92
+ "tone",
93
+ "title",
94
+ "description",
95
+ "action",
96
+ "live"
97
+ ]);
98
+ const Glyph = () => local.tone === "danger" ? CircleAlert : local.tone === "warning" ? TriangleAlert : Info;
99
+ return (() => {
100
+ var _el$1 = _tmpl$7(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild;
101
+ spread(_el$1, mergeProps({
102
+ get role() {
103
+ return memo(() => local.live === "assertive")() ? "alert" : local.live === "polite" ? "status" : void 0;
104
+ },
105
+ get ["class"]() {
106
+ return cn(chatNoticeVariants({ tone: local.tone }), local.class);
107
+ }
108
+ }, rest), false, true);
109
+ insert(_el$10, createComponent(Dynamic, { get component() {
110
+ return Glyph();
111
+ } }));
112
+ insert(_el$12, () => local.title);
113
+ insert(_el$11, createComponent(Show, {
114
+ get when() {
115
+ return local.description;
116
+ },
117
+ get children() {
118
+ var _el$13 = _tmpl$5();
119
+ insert(_el$13, () => local.description);
120
+ return _el$13;
121
+ }
122
+ }), null);
123
+ insert(_el$1, createComponent(Show, {
124
+ get when() {
125
+ return local.action;
126
+ },
127
+ get children() {
128
+ var _el$14 = _tmpl$6();
129
+ insert(_el$14, () => local.action);
130
+ return _el$14;
131
+ }
132
+ }), null);
133
+ effect(() => className(_el$10, cn("mt-0.5 shrink-0 [&_svg]:size-4", {
134
+ "text-muted-foreground": (local.tone ?? "info") === "info",
135
+ "text-warning": local.tone === "warning",
136
+ "text-destructive": local.tone === "danger"
137
+ })));
138
+ return _el$1;
139
+ })();
140
+ }
141
+ /** A conversation with no turns yet. Centred in the thread, never in a card. */
142
+ function ChatEmpty(props) {
143
+ const [local, rest] = splitProps(props, [
144
+ "class",
145
+ "title",
146
+ "description",
147
+ "suggestions"
148
+ ]);
149
+ return (() => {
150
+ var _el$15 = _tmpl$9(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild;
151
+ spread(_el$15, mergeProps({ get ["class"]() {
152
+ return cn("mx-auto flex min-h-full w-full max-w-xl flex-col items-center justify-center gap-4 px-6 py-10 text-center", local.class);
153
+ } }, rest), false, true);
154
+ insert(_el$17, () => local.title);
155
+ insert(_el$16, createComponent(Show, {
156
+ get when() {
157
+ return local.description;
158
+ },
159
+ get children() {
160
+ var _el$18 = _tmpl$8();
161
+ insert(_el$18, () => local.description);
162
+ return _el$18;
163
+ }
164
+ }), null);
165
+ insert(_el$15, createComponent(Show, {
166
+ get when() {
167
+ return local.suggestions;
168
+ },
169
+ get children() {
170
+ return local.suggestions;
171
+ }
172
+ }), null);
173
+ return _el$15;
174
+ })();
175
+ }
176
+ //#endregion
177
+ export { Chat, ChatEmpty, ChatHeader, ChatNotice, chatNoticeVariants };
178
+
179
+ //# sourceMappingURL=chat.js.map