@swisper.ai/web-chat-ui 0.0.2 → 0.0.5

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 (369) hide show
  1. package/README.md +9 -12
  2. package/dist/components/canvas-shell/canvas-shell.d.ts +32 -10
  3. package/dist/components/canvas-shell/canvas-shell.d.ts.map +1 -1
  4. package/dist/components/canvas-shell/canvas-shell.stories.d.ts +49 -17
  5. package/dist/components/canvas-shell/canvas-shell.stories.d.ts.map +1 -1
  6. package/dist/components/chat-card/chat-card.d.ts +1 -0
  7. package/dist/components/chat-card/chat-card.d.ts.map +1 -1
  8. package/dist/components/chat-card/chat-card.stories.d.ts +47 -1
  9. package/dist/components/chat-card/chat-card.stories.d.ts.map +1 -1
  10. package/dist/components/chat-card/components/chat-card-body.d.ts +8 -0
  11. package/dist/components/chat-card/components/chat-card-body.d.ts.map +1 -1
  12. package/dist/components/chat-card/components/chat-card-footer.d.ts +8 -0
  13. package/dist/components/chat-card/components/chat-card-footer.d.ts.map +1 -1
  14. package/dist/components/chat-card/components/chat-card-form.d.ts +15 -2
  15. package/dist/components/chat-card/components/chat-card-form.d.ts.map +1 -1
  16. package/dist/components/chat-card/components/chat-card-header.d.ts +23 -2
  17. package/dist/components/chat-card/components/chat-card-header.d.ts.map +1 -1
  18. package/dist/components/chat-card/contexts.d.ts +2 -0
  19. package/dist/components/chat-card/contexts.d.ts.map +1 -1
  20. package/dist/components/chat-card/hooks.d.ts +1 -0
  21. package/dist/components/chat-card/hooks.d.ts.map +1 -1
  22. package/dist/components/chat-card/types.d.ts +3 -0
  23. package/dist/components/chat-card/types.d.ts.map +1 -1
  24. package/dist/components/chat-card-container/chat-card-container.d.ts +4 -0
  25. package/dist/components/chat-card-container/chat-card-container.d.ts.map +1 -1
  26. package/dist/components/chat-card-container/chat-card-container.stories.d.ts +12 -1
  27. package/dist/components/chat-card-container/chat-card-container.stories.d.ts.map +1 -1
  28. package/dist/components/chat-container/chat-container.d.ts.map +1 -1
  29. package/dist/components/chat-container/chat-container.stories.d.ts +36 -11
  30. package/dist/components/chat-container/chat-container.stories.d.ts.map +1 -1
  31. package/dist/components/chat-input/chat-input.d.ts +30 -2
  32. package/dist/components/chat-input/chat-input.d.ts.map +1 -1
  33. package/dist/components/chat-input/chat-input.stories.d.ts +63 -3
  34. package/dist/components/chat-input/chat-input.stories.d.ts.map +1 -1
  35. package/dist/components/chat-input/plugins/controlled-value-plugin.d.ts +4 -1
  36. package/dist/components/chat-input/plugins/controlled-value-plugin.d.ts.map +1 -1
  37. package/dist/components/chat-input/plugins/value-plugin.d.ts +4 -1
  38. package/dist/components/chat-input/plugins/value-plugin.d.ts.map +1 -1
  39. package/dist/components/chat-list/chat-list-item.d.ts +6 -0
  40. package/dist/components/chat-list/chat-list-item.d.ts.map +1 -1
  41. package/dist/components/chat-list/chat-list-items.d.ts +12 -1
  42. package/dist/components/chat-list/chat-list-items.d.ts.map +1 -1
  43. package/dist/components/chat-list/chat-list.d.ts +36 -2
  44. package/dist/components/chat-list/chat-list.d.ts.map +1 -1
  45. package/dist/components/chat-list/chat-list.stories.d.ts +67 -9
  46. package/dist/components/chat-list/chat-list.stories.d.ts.map +1 -1
  47. package/dist/components/chat-message/chat-message.d.ts +12 -1
  48. package/dist/components/chat-message/chat-message.d.ts.map +1 -1
  49. package/dist/components/chat-message/chat-message.stories.d.ts +31 -0
  50. package/dist/components/chat-message/chat-message.stories.d.ts.map +1 -1
  51. package/dist/components/chat-message/index.d.ts +1 -1
  52. package/dist/components/chat-message/index.d.ts.map +1 -1
  53. package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts +3 -0
  54. package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts.map +1 -1
  55. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts +25 -5
  56. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts.map +1 -1
  57. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts +32 -1
  58. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts.map +1 -1
  59. package/dist/components/chat-message-attachment-card/index.d.ts +2 -2
  60. package/dist/components/chat-message-attachment-card/index.d.ts.map +1 -1
  61. package/dist/components/chat-message-attachment-card/utils.d.ts +1 -0
  62. package/dist/components/chat-message-attachment-card/utils.d.ts.map +1 -1
  63. package/dist/components/chat-message-response/chat-message-response.stories.d.ts +13 -0
  64. package/dist/components/chat-message-response/chat-message-response.stories.d.ts.map +1 -1
  65. package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts +22 -5
  66. package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts.map +1 -1
  67. package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts +42 -0
  68. package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts.map +1 -1
  69. package/dist/components/chat-message-toolbar/index.d.ts +1 -1
  70. package/dist/components/chat-message-toolbar/index.d.ts.map +1 -1
  71. package/dist/components/chat-messages/chat-messages.d.ts +34 -2
  72. package/dist/components/chat-messages/chat-messages.d.ts.map +1 -1
  73. package/dist/components/chat-messages/chat-messages.stories.d.ts +33 -2
  74. package/dist/components/chat-messages/chat-messages.stories.d.ts.map +1 -1
  75. package/dist/components/chat-notification-card/chat-notification-card.d.ts +56 -4
  76. package/dist/components/chat-notification-card/chat-notification-card.d.ts.map +1 -1
  77. package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts +50 -1
  78. package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts.map +1 -1
  79. package/dist/components/chat-notification-popup/chat-notification-popup.d.ts +6 -0
  80. package/dist/components/chat-notification-popup/chat-notification-popup.d.ts.map +1 -1
  81. package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts +43 -1
  82. package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts.map +1 -1
  83. package/dist/components/chat-prompt-box/chat-prompt-box.d.ts +37 -17
  84. package/dist/components/chat-prompt-box/chat-prompt-box.d.ts.map +1 -1
  85. package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts +53 -1
  86. package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts.map +1 -1
  87. package/dist/components/chat-reply/chat-reply.d.ts +11 -0
  88. package/dist/components/chat-reply/chat-reply.d.ts.map +1 -1
  89. package/dist/components/chat-reply/chat-reply.stories.d.ts +23 -0
  90. package/dist/components/chat-reply/chat-reply.stories.d.ts.map +1 -1
  91. package/dist/components/chat-reply/index.d.ts +1 -1
  92. package/dist/components/chat-reply/index.d.ts.map +1 -1
  93. package/dist/components/chat-suggestion/chat-suggestion.d.ts +36 -10
  94. package/dist/components/chat-suggestion/chat-suggestion.d.ts.map +1 -1
  95. package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts +66 -2
  96. package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts.map +1 -1
  97. package/dist/components/chat-suggestion/index.d.ts +2 -1
  98. package/dist/components/chat-suggestion/index.d.ts.map +1 -1
  99. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts +26 -1
  100. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts.map +1 -1
  101. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts +25 -1
  102. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts.map +1 -1
  103. package/dist/components/chat-thread/chat-thread.d.ts +17 -2
  104. package/dist/components/chat-thread/chat-thread.d.ts.map +1 -1
  105. package/dist/components/chat-thread/chat-thread.stories.d.ts +75 -10
  106. package/dist/components/chat-thread/chat-thread.stories.d.ts.map +1 -1
  107. package/dist/components/index.d.ts +1 -3
  108. package/dist/components/index.d.ts.map +1 -1
  109. package/dist/components/markdown-viewer/markdown-viewer.d.ts +8 -1
  110. package/dist/components/markdown-viewer/markdown-viewer.d.ts.map +1 -1
  111. package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts +18 -1
  112. package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts.map +1 -1
  113. package/dist/components/rich-text-area/plugins/controlled-value-plugin.d.ts +4 -1
  114. package/dist/components/rich-text-area/plugins/controlled-value-plugin.d.ts.map +1 -1
  115. package/dist/components/rich-text-area/plugins/value-plugin.d.ts +4 -1
  116. package/dist/components/rich-text-area/plugins/value-plugin.d.ts.map +1 -1
  117. package/dist/components/rich-text-area/rich-text-area.d.ts +17 -0
  118. package/dist/components/rich-text-area/rich-text-area.d.ts.map +1 -1
  119. package/dist/components/rich-text-area/rich-text-area.stories.d.ts +52 -0
  120. package/dist/components/rich-text-area/rich-text-area.stories.d.ts.map +1 -1
  121. package/dist/components/rich-text-area/styled.d.ts +6 -2
  122. package/dist/components/rich-text-area/styled.d.ts.map +1 -1
  123. package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts +9 -2
  124. package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts.map +1 -1
  125. package/dist/components/rich-text-field/components/index.d.ts +5 -5
  126. package/dist/components/rich-text-field/components/index.d.ts.map +1 -1
  127. package/dist/components/rich-text-field/components/text-color-button.d.ts +12 -1
  128. package/dist/components/rich-text-field/components/text-color-button.d.ts.map +1 -1
  129. package/dist/components/rich-text-field/rich-text-field.d.ts +22 -0
  130. package/dist/components/rich-text-field/rich-text-field.d.ts.map +1 -1
  131. package/dist/components/rich-text-field/rich-text-field.stories.d.ts +28 -1
  132. package/dist/components/rich-text-field/rich-text-field.stories.d.ts.map +1 -1
  133. package/dist/components/topmenu/index.d.ts +2 -0
  134. package/dist/components/topmenu/index.d.ts.map +1 -0
  135. package/dist/components/topmenu/topmenu.d.ts +22 -0
  136. package/dist/components/topmenu/topmenu.d.ts.map +1 -0
  137. package/dist/components/topmenu/topmenu.stories.d.ts +31 -0
  138. package/dist/components/topmenu/topmenu.stories.d.ts.map +1 -0
  139. package/dist/docs/agent.stories.d.ts.map +1 -1
  140. package/dist/docs/chat-panel.d.ts +7 -5
  141. package/dist/docs/chat-panel.d.ts.map +1 -1
  142. package/dist/docs/chatbot-panel.d.ts.map +1 -1
  143. package/dist/docs/chatbot.stories.d.ts.map +1 -1
  144. package/dist/index.css +1 -1
  145. package/dist/index.es.js +1801 -1806
  146. package/dist/index.es.js.map +1 -1
  147. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts +9 -7
  148. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts.map +1 -1
  149. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts +37 -9
  150. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts.map +1 -1
  151. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts +41 -16
  152. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts.map +1 -1
  153. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts +6 -0
  154. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts.map +1 -1
  155. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts +22 -1
  156. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts.map +1 -1
  157. package/package.json +16 -10
  158. package/src/__storybook__/parent-block.tsx +21 -0
  159. package/src/components/canvas-shell/__stories__/canvas-panel.tsx +25 -0
  160. package/src/components/canvas-shell/__stories__/document-list.tsx +29 -0
  161. package/src/components/canvas-shell/__stories__/fixtures.ts +222 -0
  162. package/src/components/canvas-shell/__stories__/holdings-table.tsx +56 -0
  163. package/src/components/canvas-shell/__stories__/types.ts +47 -0
  164. package/src/components/canvas-shell/{canvas-shell.test.tsx → __tests__/canvas-shell.spec.tsx} +1 -1
  165. package/src/components/canvas-shell/canvas-shell.json +24 -0
  166. package/src/components/canvas-shell/canvas-shell.stories.tsx +581 -122
  167. package/src/components/canvas-shell/canvas-shell.tsx +44 -17
  168. package/src/components/chat-card/__stories__/fixtures.ts +119 -0
  169. package/src/components/chat-card/__stories__/types.ts +44 -0
  170. package/src/components/chat-card/chat-card.json +67 -3
  171. package/src/components/chat-card/chat-card.stories.tsx +872 -148
  172. package/src/components/chat-card/chat-card.tsx +2 -0
  173. package/src/components/chat-card/components/chat-card-body.tsx +12 -0
  174. package/src/components/chat-card/components/chat-card-footer.tsx +11 -0
  175. package/src/components/chat-card/components/chat-card-form.tsx +21 -2
  176. package/src/components/chat-card/components/chat-card-header.tsx +39 -2
  177. package/src/components/chat-card/contexts.tsx +2 -0
  178. package/src/components/chat-card/hooks.ts +1 -0
  179. package/src/components/chat-card/types.ts +3 -0
  180. package/src/components/chat-card-container/__stories__/fixtures.ts +54 -0
  181. package/src/components/chat-card-container/__stories__/resizable-chat-window.tsx +19 -0
  182. package/src/components/chat-card-container/__stories__/result-card.tsx +31 -0
  183. package/src/components/chat-card-container/__stories__/types.ts +16 -0
  184. package/src/components/chat-card-container/chat-card-container.json +7 -0
  185. package/src/components/chat-card-container/chat-card-container.stories.tsx +209 -56
  186. package/src/components/chat-card-container/chat-card-container.tsx +5 -0
  187. package/src/components/chat-container/__stories__/chat-composer.tsx +67 -0
  188. package/src/components/chat-container/__stories__/fixtures.ts +27 -0
  189. package/src/components/chat-container/__stories__/measure.ts +22 -0
  190. package/src/components/chat-container/__stories__/types.ts +7 -0
  191. package/src/components/chat-container/__stories__/variable-readout.tsx +64 -0
  192. package/src/components/chat-container/chat-container.json +9 -1
  193. package/src/components/chat-container/chat-container.stories.tsx +538 -106
  194. package/src/components/chat-container/chat-container.tsx +3 -0
  195. package/src/components/chat-input/__stories__/fixtures.ts +31 -0
  196. package/src/components/chat-input/__tests__/chat-input.spec.tsx +100 -0
  197. package/src/components/chat-input/chat-input.json +11 -2
  198. package/src/components/chat-input/chat-input.stories.tsx +660 -197
  199. package/src/components/chat-input/chat-input.tsx +39 -5
  200. package/src/components/chat-input/plugins/controlled-value-plugin.tsx +16 -3
  201. package/src/components/chat-input/plugins/value-plugin.tsx +19 -4
  202. package/src/components/chat-list/__stories__/chat-row.tsx +41 -0
  203. package/src/components/chat-list/__stories__/fixtures.ts +94 -0
  204. package/src/components/chat-list/__stories__/types.ts +13 -0
  205. package/src/components/chat-list/chat-list-item.tsx +6 -0
  206. package/src/components/chat-list/chat-list-items.tsx +16 -0
  207. package/src/components/chat-list/chat-list.json +24 -2
  208. package/src/components/chat-list/chat-list.stories.tsx +631 -215
  209. package/src/components/chat-list/chat-list.tsx +51 -4
  210. package/src/components/chat-message/__stories__/fixtures.ts +53 -0
  211. package/src/components/chat-message/__stories__/sent-attachment.tsx +22 -0
  212. package/src/components/chat-message/__stories__/tool-steps.tsx +37 -0
  213. package/src/components/chat-message/chat-message.json +10 -1
  214. package/src/components/chat-message/chat-message.stories.tsx +282 -20
  215. package/src/components/chat-message/chat-message.tsx +16 -1
  216. package/src/components/chat-message/index.ts +8 -1
  217. package/src/components/chat-message-attachment-card/__stories__/fixtures.ts +30 -0
  218. package/src/components/chat-message-attachment-card/__stories__/types.ts +14 -0
  219. package/src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx +4 -0
  220. package/src/components/chat-message-attachment-card/chat-message-attachment-card.json +20 -0
  221. package/src/components/chat-message-attachment-card/chat-message-attachment-card.stories.tsx +266 -51
  222. package/src/components/chat-message-attachment-card/chat-message-attachment-card.tsx +37 -4
  223. package/src/components/chat-message-attachment-card/index.ts +6 -0
  224. package/src/components/chat-message-attachment-card/utils.ts +1 -0
  225. package/src/components/chat-message-response/__stories__/fixtures.ts +50 -0
  226. package/src/components/chat-message-response/chat-message-response.json +5 -0
  227. package/src/components/chat-message-response/chat-message-response.stories.tsx +135 -26
  228. package/src/components/chat-message-toolbar/chat-message-toolbar.json +21 -3
  229. package/src/components/chat-message-toolbar/chat-message-toolbar.stories.tsx +377 -6
  230. package/src/components/chat-message-toolbar/chat-message-toolbar.tsx +47 -12
  231. package/src/components/chat-message-toolbar/index.ts +4 -0
  232. package/src/components/chat-messages/__stories__/conversation-frame.tsx +25 -0
  233. package/src/components/chat-messages/__stories__/conversation-group.tsx +22 -0
  234. package/src/components/chat-messages/__stories__/fixtures.ts +70 -0
  235. package/src/components/chat-messages/__stories__/types.ts +5 -0
  236. package/src/components/chat-messages/chat-messages.json +30 -12
  237. package/src/components/chat-messages/chat-messages.stories.tsx +439 -212
  238. package/src/components/chat-messages/chat-messages.tsx +46 -3
  239. package/src/components/chat-notification-card/__stories__/fixtures.ts +38 -0
  240. package/src/components/chat-notification-card/__stories__/types.ts +13 -0
  241. package/src/components/chat-notification-card/chat-notification-card.json +52 -2
  242. package/src/components/chat-notification-card/chat-notification-card.stories.tsx +542 -62
  243. package/src/components/chat-notification-card/chat-notification-card.tsx +97 -6
  244. package/src/components/chat-notification-popup/__stories__/fixtures.ts +36 -0
  245. package/src/components/chat-notification-popup/__stories__/notification-item.tsx +93 -0
  246. package/src/components/chat-notification-popup/__stories__/types.ts +14 -0
  247. package/src/components/chat-notification-popup/chat-notification-popup.json +14 -1
  248. package/src/components/chat-notification-popup/chat-notification-popup.stories.tsx +467 -17
  249. package/src/components/chat-notification-popup/chat-notification-popup.tsx +18 -3
  250. package/src/components/chat-prompt-box/__stories__/fixtures.ts +16 -0
  251. package/src/components/chat-prompt-box/__stories__/types.ts +8 -0
  252. package/src/components/chat-prompt-box/chat-prompt-box.json +25 -2
  253. package/src/components/chat-prompt-box/chat-prompt-box.stories.tsx +535 -43
  254. package/src/components/chat-prompt-box/chat-prompt-box.tsx +73 -19
  255. package/src/components/chat-reply/chat-reply.json +10 -0
  256. package/src/components/chat-reply/chat-reply.stories.tsx +264 -21
  257. package/src/components/chat-reply/chat-reply.tsx +15 -0
  258. package/src/components/chat-reply/index.ts +10 -1
  259. package/src/components/chat-suggestion/__stories__/fixtures.ts +16 -0
  260. package/src/components/chat-suggestion/__tests__/chat-suggestion.spec.tsx +185 -0
  261. package/src/components/chat-suggestion/chat-suggestion.json +62 -20
  262. package/src/components/chat-suggestion/chat-suggestion.stories.tsx +542 -58
  263. package/src/components/chat-suggestion/chat-suggestion.tsx +154 -65
  264. package/src/components/chat-suggestion/index.ts +9 -0
  265. package/src/components/chat-thinking-process/__stories__/fixtures.ts +56 -0
  266. package/src/components/chat-thinking-process/chat-thinking-process.json +28 -3
  267. package/src/components/chat-thinking-process/chat-thinking-process.stories.tsx +354 -78
  268. package/src/components/chat-thinking-process/chat-thinking-process.tsx +55 -4
  269. package/src/components/chat-thread/__stories__/fixtures.ts +171 -0
  270. package/src/components/chat-thread/__stories__/scroll-position.ts +9 -0
  271. package/src/components/chat-thread/__stories__/snippets.ts +129 -0
  272. package/src/components/chat-thread/__stories__/thread-frame.tsx +22 -0
  273. package/src/components/chat-thread/__stories__/thread-turns.tsx +35 -0
  274. package/src/components/chat-thread/__stories__/types.ts +12 -0
  275. package/src/components/chat-thread/__stories__/use-turn-stream.ts +78 -0
  276. package/src/components/chat-thread/chat-thread.json +23 -3
  277. package/src/components/chat-thread/chat-thread.stories.tsx +804 -142
  278. package/src/components/chat-thread/chat-thread.tsx +64 -16
  279. package/src/components/index.ts +1 -3
  280. package/src/components/markdown-viewer/__stories__/fixtures.ts +67 -0
  281. package/src/components/markdown-viewer/markdown-viewer.json +7 -1
  282. package/src/components/markdown-viewer/markdown-viewer.stories.tsx +219 -50
  283. package/src/components/markdown-viewer/markdown-viewer.tsx +9 -0
  284. package/src/components/rich-text-area/__stories__/fixtures.ts +30 -0
  285. package/src/components/rich-text-area/__tests__/rich-text-area.spec.tsx +114 -0
  286. package/src/components/rich-text-area/plugins/controlled-value-plugin.tsx +20 -3
  287. package/src/components/rich-text-area/plugins/value-plugin.tsx +16 -3
  288. package/src/components/rich-text-area/rich-text-area.json +7 -4
  289. package/src/components/rich-text-area/rich-text-area.stories.tsx +597 -41
  290. package/src/components/rich-text-area/rich-text-area.tsx +27 -4
  291. package/src/components/rich-text-area/styled.tsx +11 -5
  292. package/src/components/rich-text-field/__stories__/fixtures.ts +29 -0
  293. package/src/components/rich-text-field/components/formatting-toolbar-plugin.tsx +10 -1
  294. package/src/components/rich-text-field/components/index.ts +8 -5
  295. package/src/components/rich-text-field/components/text-color-button.tsx +16 -2
  296. package/src/components/rich-text-field/rich-text-field.json +3 -1
  297. package/src/components/rich-text-field/rich-text-field.stories.tsx +452 -61
  298. package/src/components/rich-text-field/rich-text-field.tsx +23 -0
  299. package/src/components/topmenu/index.ts +1 -0
  300. package/src/components/topmenu/topmenu.json +107 -0
  301. package/src/components/topmenu/topmenu.stories.tsx +334 -0
  302. package/src/components/topmenu/topmenu.tsx +71 -0
  303. package/src/docs/agent.stories.tsx +16 -16
  304. package/src/docs/chat-panel.tsx +37 -32
  305. package/src/docs/chatbot-panel.tsx +11 -2
  306. package/src/docs/chatbot.mdx +17 -12
  307. package/src/docs/chatbot.stories.tsx +7 -8
  308. package/src/layouts/chat-card-list-layout/__stories__/fixtures.ts +112 -0
  309. package/src/layouts/chat-card-list-layout/__stories__/result-card.tsx +36 -0
  310. package/src/layouts/chat-card-list-layout/__stories__/types.ts +31 -0
  311. package/src/layouts/chat-card-list-layout/chat-card-list-layout.json +14 -1
  312. package/src/layouts/chat-card-list-layout/chat-card-list-layout.stories.tsx +316 -84
  313. package/src/layouts/chat-card-list-layout/chat-card-list-layout.tsx +11 -7
  314. package/src/layouts/chat-card-three-column-layout/__stories__/fixtures.ts +117 -0
  315. package/src/layouts/chat-card-three-column-layout/__stories__/resizable-chat-window.tsx +18 -0
  316. package/src/layouts/chat-card-three-column-layout/__stories__/stay-details.tsx +85 -0
  317. package/src/layouts/chat-card-three-column-layout/__stories__/stay-list.tsx +50 -0
  318. package/src/layouts/chat-card-three-column-layout/__stories__/stay-map.tsx +44 -0
  319. package/src/layouts/chat-card-three-column-layout/__stories__/stay-rooms.tsx +61 -0
  320. package/src/layouts/chat-card-three-column-layout/__stories__/types.ts +35 -0
  321. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.json +16 -0
  322. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.tsx +603 -182
  323. package/src/layouts/chat-card-two-column-layout/__stories__/connection-itinerary.tsx +51 -0
  324. package/src/layouts/chat-card-two-column-layout/__stories__/fixtures.ts +83 -0
  325. package/src/layouts/chat-card-two-column-layout/__stories__/route-map.tsx +24 -0
  326. package/src/layouts/chat-card-two-column-layout/__stories__/types.ts +15 -0
  327. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.json +13 -1
  328. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.tsx +368 -67
  329. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.tsx +11 -2
  330. package/dist/components/card-item-picker/card-item-picker-context.d.ts +0 -21
  331. package/dist/components/card-item-picker/card-item-picker-context.d.ts.map +0 -1
  332. package/dist/components/card-item-picker/card-item-picker-list.d.ts +0 -24
  333. package/dist/components/card-item-picker/card-item-picker-list.d.ts.map +0 -1
  334. package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts +0 -28
  335. package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts.map +0 -1
  336. package/dist/components/card-item-picker/card-item-picker-row.d.ts +0 -12
  337. package/dist/components/card-item-picker/card-item-picker-row.d.ts.map +0 -1
  338. package/dist/components/card-item-picker/card-item-picker.stories.d.ts +0 -19
  339. package/dist/components/card-item-picker/card-item-picker.stories.d.ts.map +0 -1
  340. package/dist/components/card-item-picker/index.d.ts +0 -9
  341. package/dist/components/card-item-picker/index.d.ts.map +0 -1
  342. package/dist/components/chat-message-history/chat-message-history.d.ts +0 -48
  343. package/dist/components/chat-message-history/chat-message-history.d.ts.map +0 -1
  344. package/dist/components/chat-message-history/chat-message-history.stories.d.ts +0 -7
  345. package/dist/components/chat-message-history/chat-message-history.stories.d.ts.map +0 -1
  346. package/dist/components/chat-message-history/index.d.ts +0 -2
  347. package/dist/components/chat-message-history/index.d.ts.map +0 -1
  348. package/dist/components/spinner/index.d.ts +0 -2
  349. package/dist/components/spinner/index.d.ts.map +0 -1
  350. package/dist/components/spinner/spinner.d.ts +0 -9
  351. package/dist/components/spinner/spinner.d.ts.map +0 -1
  352. package/dist/components/spinner/spinner.stories.d.ts +0 -8
  353. package/dist/components/spinner/spinner.stories.d.ts.map +0 -1
  354. package/src/components/card-item-picker/__tests__/card-item-picker.spec.tsx +0 -279
  355. package/src/components/card-item-picker/card-item-picker-context.tsx +0 -44
  356. package/src/components/card-item-picker/card-item-picker-list.tsx +0 -95
  357. package/src/components/card-item-picker/card-item-picker-row-parts.tsx +0 -96
  358. package/src/components/card-item-picker/card-item-picker-row.tsx +0 -109
  359. package/src/components/card-item-picker/card-item-picker.json +0 -147
  360. package/src/components/card-item-picker/card-item-picker.stories.tsx +0 -158
  361. package/src/components/card-item-picker/index.ts +0 -24
  362. package/src/components/chat-message-history/chat-message-history.json +0 -99
  363. package/src/components/chat-message-history/chat-message-history.stories.tsx +0 -136
  364. package/src/components/chat-message-history/chat-message-history.tsx +0 -277
  365. package/src/components/chat-message-history/index.ts +0 -13
  366. package/src/components/spinner/index.ts +0 -1
  367. package/src/components/spinner/spinner.json +0 -73
  368. package/src/components/spinner/spinner.stories.tsx +0 -41
  369. package/src/components/spinner/spinner.tsx +0 -32
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message/chat-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,gBAAgB,qBAehF;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,uBAAuB,qBAevE;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,qBAYlF"}
1
+ {"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message/chat-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,gBAAgB;IAC/B,sGAAsG;IACtG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4FAA4F;IAC5F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,8GAA8G;AAC9G,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,gBAAgB,qBAgBhF;AAED,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,4FAA4F;AAC5F,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,qBAiBlF;AAED,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kGAAkG;AAClG,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,qBAalF"}
@@ -3,9 +3,40 @@ import { ChatMessage } from './chat-message';
3
3
  declare const meta: Meta<typeof ChatMessage>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof ChatMessage>;
6
+ /** The user's question: right-aligned, with its content in a filled bubble. */
7
+ export declare const Default: Story;
8
+ /** A question shows the user's text exactly as sent, in a bubble at the end of the row. */
6
9
  export declare const Question: Story;
10
+ /** The assistant's answer: start-aligned with no bubble, its Markdown rendered by a `MarkdownViewer`. */
7
11
  export declare const Answer: Story;
12
+ interface AssistantAnswerProps {
13
+ answer: string;
14
+ /** When the answer finished, as the toolbar shows it */
15
+ time: string;
16
+ onCopy: () => void;
17
+ }
18
+ declare function AssistantAnswer({ answer, time, onCopy }: AssistantAnswerProps): import('react').JSX.Element;
19
+ /** A finished answer with its toolbar in `ChatMessageActions`; from `md` up, hover the message to show it. */
8
20
  export declare const WithActions: Story;
21
+ /** The actions stay reachable by keyboard while hover has not revealed them. */
22
+ export declare const WithActionsKeyboard: StoryObj<typeof AssistantAnswer>;
23
+ /** One turn of a conversation: the question bubble, then the answer under it. */
9
24
  export declare const History: Story;
25
+ /** A long question wraps inside its bubble and keeps to the width of the thread. */
10
26
  export declare const LongMessage: Story;
27
+ /** The message in each parent it's allowed in, then in a chat thread, an agent transcript and a side panel. */
28
+ export declare const Examples: Story;
29
+ interface ChatMessagePlaygroundProps {
30
+ isQuestion: boolean;
31
+ className: string;
32
+ text: string;
33
+ hasThinkingProcess: boolean;
34
+ hasAttachment: boolean;
35
+ hasActions: boolean;
36
+ time: string;
37
+ onCopy: () => void;
38
+ }
39
+ declare function ChatMessagePlayground({ isQuestion, className, text, hasThinkingProcess, hasAttachment, hasActions, time, onCopy, }: ChatMessagePlaygroundProps): import('react').JSX.Element;
40
+ /** Every part of a message at once, with each part and prop on the Controls panel. */
41
+ export declare const Playground: StoryObj<typeof ChatMessagePlayground>;
11
42
  //# sourceMappingURL=chat-message.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message/chat-message.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,WAAW,EAA0C,MAAM,gBAAgB,CAAC;AAErF,QAAA,MAAM,IAAI,EAAE,IAA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,eAAe,CAoBhE,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,+GAA+G;AAC/G,eAAO,MAAM,QAAQ,EAAE,KAqFtB,CAAC;AAEF,UAAU,0BAA0B;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,iBAAS,qBAAqB,CAAC,EAC7B,UAAU,EACV,SAAS,EACT,IAAI,EACJ,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,IAAI,EACJ,MAAM,GACP,EAAE,0BAA0B,+BAsB5B;AAED,sFAAsF;AACtF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,qBAAqB,CA8B7D,CAAC"}
@@ -1,2 +1,2 @@
1
- export { ChatMessage, ChatMessageContent, ChatMessageActions } from './chat-message';
1
+ export { ChatMessage, ChatMessageContent, ChatMessageActions, type ChatMessageProps, type ChatMessageContentProps, type ChatMessageActionsProps, } from './chat-message';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,GAC7B,MAAM,gBAAgB,CAAC"}
@@ -1,9 +1,12 @@
1
1
  import { SvgIconProps } from '@mui/material/SvgIcon';
2
2
  type IconProps = SvgIconProps;
3
+ /** The file types the card has an icon for. `image` has no icon: show a `ChatMessageAttachmentCardPreview`. */
3
4
  export type ChatMessageAttachmentCardIconType = 'spreadsheet' | 'pdf' | 'presentation' | 'document' | 'code' | 'image' | 'unknown';
4
5
  export interface ChatMessageAttachmentCardIconProps extends IconProps {
6
+ /** The file type, which picks the icon and its background colour. `getAttachmentIcon(file)` returns it. */
5
7
  icon: Exclude<ChatMessageAttachmentCardIconType, 'image'>;
6
8
  }
9
+ /** The file-type icon on its coloured tile. `className` goes to the tile, every other prop to the icon. */
7
10
  export declare function ChatMessageAttachmentCardIcon({ icon, className, ...rest }: ChatMessageAttachmentCardIconProps): import('react').JSX.Element;
8
11
  export {};
9
12
  //# sourceMappingURL=chat-message-attachment-card-icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-attachment-card-icon.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,KAAK,SAAS,GAAG,YAAY,CAAC;AAE9B,MAAM,MAAM,iCAAiC,GAC3C,aAAa,GAAG,KAAK,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAmCrF,MAAM,WAAW,kCAAmC,SAAQ,SAAS;IACnE,IAAI,EAAE,OAAO,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;CAC3D;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,IAAI,EACJ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,kCAAkC,+BAqBpC"}
1
+ {"version":3,"file":"chat-message-attachment-card-icon.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,KAAK,SAAS,GAAG,YAAY,CAAC;AAE9B,+GAA+G;AAC/G,MAAM,MAAM,iCAAiC,GAC3C,aAAa,GAAG,KAAK,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAmCrF,MAAM,WAAW,kCAAmC,SAAQ,SAAS;IACnE,2GAA2G;IAC3G,IAAI,EAAE,OAAO,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;CAC3D;AAED,2GAA2G;AAC3G,wBAAgB,6BAA6B,CAAC,EAC5C,IAAI,EACJ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,kCAAkC,+BAsBpC"}
@@ -1,30 +1,50 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface ChatMessageAttachmentCardProps {
3
+ /** Classes merged last onto the card root, e.g. `w-fit max-w-60` to cap the chip's width. */
3
4
  className?: string;
5
+ /** The card parts: an icon or a preview, the content with the file name, and the actions. */
4
6
  children?: ReactNode;
7
+ /** Shrinks the card to a 56px square for an image shown through `ChatMessageAttachmentCardPreview`. */
5
8
  isPreview?: boolean;
9
+ /** Shows a pointer cursor, a hover background and the remove action on hover. Set `false` for a sent message's attachments. */
6
10
  isInteractive?: boolean;
7
11
  }
12
+ /** A compact chip for a file attached to a chat prompt or message. */
8
13
  export declare function ChatMessageAttachmentCard({ className, children, isPreview, isInteractive, }: ChatMessageAttachmentCardProps): import('react').JSX.Element;
9
14
  export interface ChatMessageAttachmentCardContentProps {
15
+ /** Classes merged last onto the content element. */
10
16
  className?: string;
17
+ /** The file name, usually a `ChatMessageAttachmentCardTitle`. */
11
18
  children?: ReactNode;
12
19
  }
20
+ /** The text area of the card: takes the width left beside the icon and clips what overflows. */
13
21
  export declare function ChatMessageAttachmentCardContent({ className, children, }: ChatMessageAttachmentCardContentProps): import('react').JSX.Element;
14
- interface ChatMessageAttachmentCardTitleProps {
22
+ export interface ChatMessageAttachmentCardTitleProps {
23
+ /** Classes merged last onto the title element. */
15
24
  className?: string;
25
+ /** The file name as uploaded, including its extension. */
16
26
  children?: ReactNode;
17
27
  }
28
+ /** The file name, truncated to one line. */
18
29
  export declare function ChatMessageAttachmentCardTitle({ className, children, }: ChatMessageAttachmentCardTitleProps): import('react').JSX.Element;
19
- interface ChatMessageAttachmentCardPreviewProps {
30
+ export interface ChatMessageAttachmentCardPreviewProps {
31
+ /** Classes merged last onto the `figure` that covers the card. */
20
32
  className?: string;
33
+ /** Classes merged last onto the image inside the figure, e.g. `object-contain`. */
34
+ imageClassName?: string;
35
+ /** URL of the image, e.g. a data URL read from the attached file. */
21
36
  previewSrc: string;
22
37
  }
23
- export declare function ChatMessageAttachmentCardPreview({ className, previewSrc, }: ChatMessageAttachmentCardPreviewProps): import('react').JSX.Element;
38
+ /** An image thumbnail that covers the whole card. Use it on a card with `isPreview`. */
39
+ export declare function ChatMessageAttachmentCardPreview({ className, imageClassName, previewSrc, }: ChatMessageAttachmentCardPreviewProps): import('react').JSX.Element;
24
40
  export interface ChatMessageAttachmentCardActionsProps {
41
+ /** Classes merged last onto the wrapper pinned to the card's top-right corner. */
25
42
  className?: string;
43
+ /** Classes merged last onto the remove button inside the wrapper. */
44
+ buttonClassName?: string;
45
+ /** Called when the remove button is clicked. The consumer removes the attachment. */
26
46
  onDelete?: () => void;
27
47
  }
28
- export declare function ChatMessageAttachmentCardActions({ className, onDelete, }: ChatMessageAttachmentCardActionsProps): import('react').JSX.Element;
29
- export {};
48
+ /** The remove button of an interactive card, shown while the card is hovered. */
49
+ export declare function ChatMessageAttachmentCardActions({ className, buttonClassName, onDelete, }: ChatMessageAttachmentCardActionsProps): import('react').JSX.Element;
30
50
  //# sourceMappingURL=chat-message-attachment-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-attachment-card.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,8BAA8B;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CAAC,EACxC,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAoB,GACrB,EAAE,8BAA8B,+BAuBhC;AAED,MAAM,WAAW,qCAAqC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,SAAS,EACT,QAAQ,GACT,EAAE,qCAAqC,+BASvC;AAED,UAAU,mCAAmC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,EACT,QAAQ,GACT,EAAE,mCAAmC,+BAUrC;AAED,UAAU,qCAAqC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,SAAS,EACT,UAAU,GACX,EAAE,qCAAqC,+BAevC;AAED,MAAM,WAAW,qCAAqC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,gCAAgC,CAAC,EAC/C,SAAS,EACT,QAAQ,GACT,EAAE,qCAAqC,+BA0BvC"}
1
+ {"version":3,"file":"chat-message-attachment-card.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA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IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,iFAAiF;AACjF,wBAAgB,gCAAgC,CAAC,EAC/C,SAAS,EACT,eAAe,EACf,QAAQ,GACT,EAAE,qCAAqC,+BA2BvC"}
@@ -1,11 +1,42 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { AttachedFile } from './__stories__/types';
2
3
  import { ChatMessageAttachmentCard } from './chat-message-attachment-card';
4
+ import { ChatMessageAttachmentCardIconProps } from './chat-message-attachment-card-icon';
3
5
  declare const meta: Meta<typeof ChatMessageAttachmentCard>;
4
6
  export default meta;
5
7
  type Story = StoryObj<typeof ChatMessageAttachmentCard>;
8
+ /** A file attached to the prompt before sending: its type icon, its name, and a remove button that shows on hover. */
6
9
  export declare const Default: Story;
10
+ /** A file that was sent with a question: static, with no hover background and no remove action. */
7
11
  export declare const NonInteractive: Story;
12
+ /** An attached image as a 56px square thumbnail, in place of the icon and file name. */
8
13
  export declare const WithPreview: Story;
9
- export declare const Playground: Story;
14
+ /** Every file type the card has an icon for, each with a file name that `getAttachmentIcon` maps to it. */
10
15
  export declare const Icon: Story;
16
+ interface UploadedFilesPreviewProps {
17
+ initialFiles: AttachedFile[];
18
+ onRemove: (fileName: string) => void;
19
+ }
20
+ /** The prompt's attachment row: a chip per file, a thumbnail per image, each with a remove action. */
21
+ declare function UploadedFilesPreview({ initialFiles, onRemove }: UploadedFilesPreviewProps): import('react').JSX.Element | null;
22
+ type AttachmentRowStory = StoryObj<typeof UploadedFilesPreview>;
23
+ /** The files of one prompt in a row: the icon follows each file's extension, a long name truncates, and removing a file takes its chip out. */
24
+ export declare const AttachmentRow: AttachmentRowStory;
25
+ /** Checks that a long file name truncates and that pressing a file's remove button takes its chip out of the row. */
26
+ export declare const AttachmentRowRemove: AttachmentRowStory;
27
+ /** The card in each place it's allowed: the prompt box toolbar, a chat message, the prompt box attachment row and a sent question's attachments. */
28
+ export declare const Examples: Story;
29
+ interface ChatMessageAttachmentCardPlaygroundProps {
30
+ className?: string;
31
+ icon: ChatMessageAttachmentCardIconProps['icon'];
32
+ title: string;
33
+ previewSrc: string;
34
+ isPreview: boolean;
35
+ isInteractive: boolean;
36
+ hasActions: boolean;
37
+ onDelete: () => void;
38
+ }
39
+ declare function ChatMessageAttachmentCardPlayground({ className, icon, title, previewSrc, isPreview, isInteractive, hasActions, onDelete, }: ChatMessageAttachmentCardPlaygroundProps): import('react').JSX.Element;
40
+ /** Every part and prop on the Controls panel. `isPreview` swaps the icon and file name for the image, because the two never go together. */
41
+ export declare const Playground: StoryObj<typeof ChatMessageAttachmentCardPlayground>;
11
42
  //# sourceMappingURL=chat-message-attachment-card.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-attachment-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,yBAAyB,EAK1B,MAAM,gCAAgC,CAAC;AAMxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,yBAAyB,CAwChD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAExD,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAoBlB,CAAC"}
1
+ {"version":3,"file":"chat-message-attachment-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/chat-message-attachment-card.stories.tsx"],"names":[],"mappings":"AAAA,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AAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iBAAS,mCAAmC,CAAC,EAC3C,SAAS,EACT,IAAI,EACJ,KAAK,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,UAAU,EACV,QAAQ,GACT,EAAE,wCAAwC,+BAoB1C;AAED,4IAA4I;AAC5I,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,mCAAmC,CAkC3E,CAAC"}
@@ -1,4 +1,4 @@
1
- export { ChatMessageAttachmentCard, ChatMessageAttachmentCardContent, ChatMessageAttachmentCardTitle, ChatMessageAttachmentCardPreview, ChatMessageAttachmentCardActions, } from './chat-message-attachment-card';
2
- export { ChatMessageAttachmentCardIcon, type ChatMessageAttachmentCardIconType, } from './chat-message-attachment-card-icon';
1
+ export { ChatMessageAttachmentCard, ChatMessageAttachmentCardContent, ChatMessageAttachmentCardTitle, ChatMessageAttachmentCardPreview, ChatMessageAttachmentCardActions, type ChatMessageAttachmentCardProps, type ChatMessageAttachmentCardContentProps, type ChatMessageAttachmentCardTitleProps, type ChatMessageAttachmentCardPreviewProps, type ChatMessageAttachmentCardActionsProps, } from './chat-message-attachment-card';
2
+ export { ChatMessageAttachmentCardIcon, type ChatMessageAttachmentCardIconProps, type ChatMessageAttachmentCardIconType, } from './chat-message-attachment-card-icon';
3
3
  export { getAttachmentIcon } from './utils';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,6BAA6B,EAC7B,KAAK,iCAAiC,GACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,gCAAgC,EAChC,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,mCAAmC,EACxC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,GAC3C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,6BAA6B,EAC7B,KAAK,kCAAkC,EACvC,KAAK,iCAAiC,GACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ChatMessageAttachmentCardIconType } from './chat-message-attachment-card-icon';
2
2
  type IconType = Exclude<ChatMessageAttachmentCardIconType, 'image'>;
3
+ /** Picks the icon type for a file from its name's extension; a file it doesn't recognise is `unknown`. */
3
4
  export declare function getAttachmentIcon(file: File): IconType;
4
5
  export {};
5
6
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,KAAK,QAAQ,GAAG,OAAO,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;AAgBpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAoBtD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-attachment-card/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAE7F,KAAK,QAAQ,GAAG,OAAO,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;AAgBpE,0GAA0G;AAC1G,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAoBtD"}
@@ -3,5 +3,18 @@ import { ChatMessageResponse } from './chat-message-response';
3
3
  declare const meta: Meta<typeof ChatMessageResponse>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof ChatMessageResponse>;
6
+ /** A finished assistant reply: a short answer that quotes its evidence, rendered as page content. */
6
7
  export declare const Default: Story;
8
+ /** A reply that is still arriving: the half-received bold run is closed, and no caret is shown. */
9
+ export declare const Streaming: Story;
10
+ /** The reply in each place it's allowed: a message's content, a chat thread and an assistant answer. */
11
+ export declare const Examples: Story;
12
+ /** The Markdown renders as semantic HTML: a heading, a list, a table and a native link. */
13
+ export declare const RendersSemanticMarkdown: Story;
14
+ /** A half-received bold run is closed while streaming, so no raw `**` reaches the reader. */
15
+ export declare const StreamingClosesPartialMarkdown: Story;
16
+ /** A `<swi-reply>` block never becomes a widget: the tag is stripped and no suggestion button appears. */
17
+ export declare const KeepsSwiBlocksAsText: Story;
18
+ /** Both props on the Controls panel, starting from the longest reply: heading, list, table, code and a link. */
19
+ export declare const Playground: Story;
7
20
  //# sourceMappingURL=chat-message-response.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-response.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-response/chat-message-response.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAgB9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAwB1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElD,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC"}
1
+ {"version":3,"file":"chat-message-response.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-response/chat-message-response.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAwB1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElD,qGAAqG;AACrG,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,QAAQ,EAAE,KAgCtB,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,EAAE,KAuBrC,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,8BAA8B,EAAE,KAkB5C,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,oBAAoB,EAAE,KAkBlC,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC"}
@@ -1,25 +1,42 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
2
  import { IconButtonProps } from '@swisper.ai/ui';
3
3
  export interface ChatMessageToolbarProps extends ComponentProps<'div'> {
4
+ /** The toolbar parts: a `ChatMessageToolbarTimestamp` and a `ChatMessageToolbarActions`. */
4
5
  children: ReactNode;
6
+ /** Classes merged last onto the row. */
5
7
  className?: string;
8
+ /** Flips the row, so the first part sits at the end. Set it under an end-aligned question. */
6
9
  reverse?: boolean;
7
10
  }
11
+ /** The row under a chat message: its timestamp at one end, its icon actions at the other. */
8
12
  export declare function ChatMessageToolbar({ children, className, reverse, ...rest }: ChatMessageToolbarProps): import('react').JSX.Element;
9
- export interface ChatMessageToolbarActionsProps {
13
+ export interface ChatMessageToolbarActionsProps extends ComponentProps<'div'> {
14
+ /** The actions, each a `ChatMessageToolbarActionButton`. */
10
15
  children: ReactNode;
16
+ /** Classes merged last onto the group. */
11
17
  className?: string;
12
18
  }
13
- export declare function ChatMessageToolbarActions({ children, className }: ChatMessageToolbarActionsProps): import('react').JSX.Element;
19
+ /** Groups the toolbar's action buttons in a `role="group"` row. */
20
+ export declare function ChatMessageToolbarActions({ children, className, ...rest }: ChatMessageToolbarActionsProps): import('react').JSX.Element;
14
21
  export interface ChatMessageToolbarActionButtonProps extends Omit<IconButtonProps, 'variant' | 'size'> {
22
+ /** The action's icon. */
15
23
  children: ReactNode;
24
+ /** Classes merged last onto the button. */
16
25
  className?: string;
26
+ /** Text of the hover tooltip. It is not the accessible name: pass `aria-label` as well. */
17
27
  tooltip?: string;
18
28
  }
19
- export declare function ChatMessageToolbarActionButton({ children, className, tooltip, ...rest }: ChatMessageToolbarActionButtonProps): import('react').JSX.Element;
20
- export interface ChatMessageToolbarTimestampProps {
29
+ /**
30
+ * One icon action in the toolbar: an extra-small tertiary `IconButton`, in a `Tooltip` when
31
+ * `tooltip` is set. The ref reaches the button, so it can be an `asChild` menu or popover trigger.
32
+ */
33
+ export declare const ChatMessageToolbarActionButton: import('react').ForwardRefExoticComponent<Omit<ChatMessageToolbarActionButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement | HTMLSpanElement>>;
34
+ export interface ChatMessageToolbarTimestampProps extends ComponentProps<'div'> {
35
+ /** The time, already formatted. */
21
36
  children: ReactNode;
37
+ /** Classes merged last onto the timestamp. */
22
38
  className?: string;
23
39
  }
24
- export declare function ChatMessageToolbarTimestamp({ className, children, }: ChatMessageToolbarTimestampProps): import('react').JSX.Element;
40
+ /** When the message was sent. Renders its children as given. */
41
+ export declare function ChatMessageToolbarTimestamp({ className, children, ...rest }: ChatMessageToolbarTimestampProps): import('react').JSX.Element;
25
42
  //# sourceMappingURL=chat-message-toolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/chat-message-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG3E,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,OAAe,EACf,GAAG,IAAI,EACR,EAAE,uBAAuB,+BAiBzB;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,yBAAyB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,8BAA8B,+BAUhG;AAED,MAAM,WAAW,mCAAoC,SAAQ,IAAI,CAC/D,eAAe,EACf,SAAS,GAAG,MAAM,CACnB;IACC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,QAAQ,EACR,SAAS,EACT,OAAO,EACP,GAAG,IAAI,EACR,EAAE,mCAAmC,+BAkBrC;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,QAAQ,GACT,EAAE,gCAAgC,+BAElC"}
1
+ {"version":3,"file":"chat-message-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/chat-message-toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG3E,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACpE,4FAA4F;IAC5F,QAAQ,EAAE,SAAS,CAAC;IACpB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,SAAS,EACT,OAAe,EACf,GAAG,IAAI,EACR,EAAE,uBAAuB,+BAkBzB;AAED,MAAM,WAAW,8BAA+B,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC3E,4DAA4D;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mEAAmE;AACnE,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,8BAA8B,+BAYhC;AAED,MAAM,WAAW,mCAAoC,SAAQ,IAAI,CAC/D,eAAe,EACf,SAAS,GAAG,MAAM,CACnB;IACC,yBAAyB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,kKAuBzC,CAAC;AAIH,MAAM,WAAW,gCAAiC,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC7E,mCAAmC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gEAAgE;AAChE,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,gCAAgC,+BAUlC"}
@@ -3,5 +3,47 @@ import { ChatMessageToolbar } from './chat-message-toolbar';
3
3
  declare const meta: Meta<typeof ChatMessageToolbar>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof ChatMessageToolbar>;
6
+ /** The row under a message: when it was sent on one side, its edit and copy actions on the other. */
6
7
  export declare const Default: Story;
8
+ /** `reverse` under the user's own question: the actions move to the left, the time to the right. */
9
+ export declare const Reversed: Story;
10
+ /** A disabled action stays in the row but takes no click and leaves the tab order. */
11
+ export declare const Disabled: Story;
12
+ type DownloadFormat = 'markdown' | 'pdf';
13
+ interface MessageActionsToolbarProps {
14
+ /** When the message was sent, already formatted */
15
+ time: string;
16
+ onCopy: () => void;
17
+ onDownload: (format: DownloadFormat) => void;
18
+ }
19
+ declare function MessageActionsToolbar({ time, onCopy, onDownload }: MessageActionsToolbarProps): import('react').JSX.Element;
20
+ type MessageActionsStory = StoryObj<typeof MessageActionsToolbar>;
21
+ /** An action that opens a menu: the button is the menu's `asChild` trigger and keeps its tooltip. */
22
+ export declare const WithMenuAction: MessageActionsStory;
23
+ /** A click calls the action's handler, and the menu action opens its menu and reports the pick. */
24
+ export declare const WithMenuActionSelect: MessageActionsStory;
25
+ /** Tab reaches each action and opens its tooltip; Enter and Space activate it, ArrowDown opens a menu. */
26
+ export declare const WithMenuActionKeyboard: MessageActionsStory;
27
+ /** A disabled action ignores clicks and is skipped by Tab. */
28
+ export declare const DisabledAction: StoryObj<{
29
+ onBookmark: () => void;
30
+ }>;
31
+ /**
32
+ * The toolbar in each place it's allowed: inside `ChatMessageActions`, under an answer, under a
33
+ * question and on an agent transcript turn. `ChatMessageActions` hides the row until its message is
34
+ * hovered from `md` up; these blocks keep it visible.
35
+ */
36
+ export declare const Examples: Story;
37
+ interface ChatMessageToolbarPlaygroundProps {
38
+ reverse: boolean;
39
+ timestamp: string;
40
+ hasTimestamp: boolean;
41
+ hasTooltips: boolean;
42
+ actionCount: number;
43
+ isDisabled: boolean;
44
+ onAction: (label: string) => void;
45
+ }
46
+ declare function ChatMessageToolbarPlayground({ reverse, timestamp, hasTimestamp, hasTooltips, actionCount, isDisabled, onAction, }: ChatMessageToolbarPlaygroundProps): import('react').JSX.Element;
47
+ /** Every part of the toolbar at once, with each part and prop on the Controls panel. */
48
+ export declare const Playground: StoryObj<typeof ChatMessageToolbarPlayground>;
7
49
  //# sourceMappingURL=chat-message-toolbar.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-message-toolbar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/chat-message-toolbar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EACL,kBAAkB,EAInB,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CA6CzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEjD,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"chat-message-toolbar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/chat-message-toolbar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA2B5D,OAAO,EACL,kBAAkB,EAInB,MAAM,wBAAwB,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAoDzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK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iBAAS,4BAA4B,CAAC,EACpC,OAAO,EACP,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,GACT,EAAE,iCAAiC,+BAmBnC;AAED,wFAAwF;AACxF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,4BAA4B,CA8BpE,CAAC"}
@@ -1,2 +1,2 @@
1
- export { ChatMessageToolbar, ChatMessageToolbarActions, ChatMessageToolbarActionButton, ChatMessageToolbarTimestamp, } from './chat-message-toolbar';
1
+ export { ChatMessageToolbar, ChatMessageToolbarActions, ChatMessageToolbarActionButton, ChatMessageToolbarTimestamp, type ChatMessageToolbarProps, type ChatMessageToolbarActionsProps, type ChatMessageToolbarActionButtonProps, type ChatMessageToolbarTimestampProps, } from './chat-message-toolbar';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/chat-message-toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAC9B,2BAA2B,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACxC,KAAK,gCAAgC,GACtC,MAAM,wBAAwB,CAAC"}
@@ -1,24 +1,56 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
2
  export interface ChatMessagesProps {
3
+ /** A `ChatMessagesList` and an optional `ChatMessagesScrollButton`. */
3
4
  children: ReactNode;
5
+ /** Classes merged last onto the root (`data-slot="chat-messages"`). */
4
6
  className?: string;
7
+ /** Number of rows `ChatMessagesList` renders; changing it scrolls the last row into view. */
5
8
  messageCount?: number;
9
+ /** Space in px between rows and between the messages inside a `ChatMessageListGroup`. */
6
10
  gap?: number;
7
11
  }
12
+ /**
13
+ * Root of a conversation that scrolls itself. It holds the row count and the gap, and has to be
14
+ * rendered inside a `ChatConversationProvider`, which owns the scroll state.
15
+ */
8
16
  export declare function ChatMessages({ children, className, messageCount, gap, }: ChatMessagesProps): import('react').JSX.Element;
9
17
  export interface ChatMessagesListProps {
18
+ /** Render function for one row; it gets the row's index and returns a `ChatMessageListGroup`. */
10
19
  children: (index: number) => ReactNode;
20
+ /** Classes merged last onto the `role="log"` list (`data-slot="chat-messages-list"`). */
11
21
  className?: string;
22
+ /** Classes merged last onto the scroll container (`data-slot="chat-messages-scroll-area"`). */
23
+ scrollAreaClassName?: string;
24
+ /** Classes merged last onto the scrolling viewport (`data-slot="chat-messages-viewport"`). */
25
+ viewportClassName?: string;
26
+ /** Classes merged last onto the hidden end sentinel the list uses to detect the bottom. */
12
27
  bottomTriggerClassName?: string;
13
28
  }
14
- export declare function ChatMessagesList({ children, className, bottomTriggerClassName, }: ChatMessagesListProps): import('react').JSX.Element;
29
+ /**
30
+ * The scrolling list: renders `messageCount` rows from its render function inside a `role="log"`
31
+ * list, and scrolls the last row to the top of the view when the count changes.
32
+ */
33
+ export declare function ChatMessagesList({ children, className, scrollAreaClassName, viewportClassName, bottomTriggerClassName, }: ChatMessagesListProps): import('react').JSX.Element;
15
34
  export interface ChatMessageListGroupProps extends ComponentProps<'div'> {
16
35
  }
36
+ /**
37
+ * One row's content: a question with its answer. The last group is at least as tall as the
38
+ * viewport, so a new question can settle at the top while its answer grows below it.
39
+ */
17
40
  export declare function ChatMessageListGroup({ children, className, ...rest }: ChatMessageListGroupProps): import('react').JSX.Element;
18
41
  export interface ChatMessagesScrollButtonProps {
42
+ /** Classes merged last onto the positioned wrapper (`data-slot="chat-messages-scroll-button"`). */
19
43
  className?: string;
44
+ /** Classes merged last onto the icon button inside the wrapper. */
45
+ buttonClassName?: string;
46
+ /** The button's tooltip and its `aria-label`. */
20
47
  tooltip?: string;
48
+ /** Replaces the chevron icon. */
21
49
  children?: ReactNode;
22
50
  }
23
- export declare const ChatMessagesScrollButton: import('react').MemoExoticComponent<({ className, tooltip, children, }: ChatMessagesScrollButtonProps) => import('react').JSX.Element>;
51
+ /**
52
+ * Scroll-to-latest button over the list. It is hidden while the view is at the bottom and scrolls
53
+ * there when clicked.
54
+ */
55
+ export declare const ChatMessagesScrollButton: import('react').MemoExoticComponent<({ className, buttonClassName, tooltip, children, }: ChatMessagesScrollButtonProps) => import('react').JSX.Element>;
24
56
  //# sourceMappingURL=chat-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-messages.d.ts","sourceRoot":"","sources":["../../../src/components/chat-messages/chat-messages.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAyBf,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,YAAgB,EAChB,GAAQ,GACT,EAAE,iBAAiB,+BAmBnB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,EACT,sBAAsB,GACvB,EAAE,qBAAqB,+BAoDvB;AAsBD,MAAM,WAAW,yBAA0B,SAAQ,cAAc,CAAC,KAAK,CAAC;CAAG;AAE3E,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,yBAAyB,+BAkB/F;AAED,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6CD,eAAO,MAAM,wBAAwB,0EAIlC,6BAA6B,iCAoC9B,CAAC"}
1
+ {"version":3,"file":"chat-messages.d.ts","sourceRoot":"","sources":["../../../src/components/chat-messages/chat-messages.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAyBf,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,QAAQ,EAAE,SAAS,CAAC;IACpB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yFAAyF;IACzF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,YAAgB,EAChB,GAAQ,GACT,EAAE,iBAAiB,+BAoBnB;AAED,MAAM,WAAW,qBAAqB;IACpC,iGAAiG;IACjG,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACvC,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+FAA+F;IAC/F,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,GACvB,EAAE,qBAAqB,+BAyDvB;AAsBD,MAAM,WAAW,yBAA0B,SAAQ,cAAc,CAAC,KAAK,CAAC;CAAG;AAE3E;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,yBAAyB,+BAmB/F;AAED,MAAM,WAAW,6BAA6B;IAC5C,mGAAmG;IACnG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA6CD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,2FAKlC,6BAA6B,iCAqC9B,CAAC"}
@@ -1,8 +1,39 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
- import { ChatMessages } from './chat-messages';
2
+ import { ReactNode } from 'react';
3
+ import { ConversationTurn } from './__stories__/types';
4
+ import { ChatMessages, ChatMessagesProps } from './chat-messages';
3
5
  declare const meta: Meta<typeof ChatMessages>;
4
6
  export default meta;
5
7
  type Story = StoryObj<typeof ChatMessages>;
8
+ /** A finished conversation in a fixed-height panel: one row per question with its answer, opened at the latest one. Raise `messageCount` to add the next question. */
6
9
  export declare const Default: Story;
7
- export declare const Streaming: Story;
10
+ /** Scrolls up through the history, which shows the scroll button, then clicks it to return to the end. */
11
+ export declare const DefaultScrollToLatest: Story;
12
+ interface AssistantConversationProps {
13
+ initialTurns: ConversationTurn[];
14
+ followUps: ConversationTurn[];
15
+ onAsk: (question: string) => void;
16
+ }
17
+ declare function AssistantConversation({ initialTurns, followUps, onAsk }: AssistantConversationProps): import('react').JSX.Element;
18
+ type StreamingStory = StoryObj<typeof AssistantConversation>;
19
+ /** A new question settles at the top of the view and its answer streams in below it, past the end of the viewport. */
20
+ export declare const Streaming: StreamingStory;
21
+ /** Sends a follow-up and checks that the new question's group fills the viewport and settles at its top. */
22
+ export declare const StreamingNewQuestion: StreamingStory;
23
+ /** The conversation in each place it's allowed: under its provider, in a canvas shell, in an assistant side panel and on a full-page chat. */
24
+ export declare const Examples: Story;
25
+ interface ChatMessagesPlaygroundProps extends Omit<ChatMessagesProps, 'children'> {
26
+ listClassName: string;
27
+ scrollAreaClassName: string;
28
+ viewportClassName: string;
29
+ bottomTriggerClassName: string;
30
+ hasScrollButton: boolean;
31
+ tooltip: string;
32
+ scrollButtonClassName: string;
33
+ buttonClassName: string;
34
+ icon: ReactNode;
35
+ }
36
+ declare function ChatMessagesPlayground({ listClassName, scrollAreaClassName, viewportClassName, bottomTriggerClassName, hasScrollButton, tooltip, scrollButtonClassName, buttonClassName, icon, ...rest }: ChatMessagesPlaygroundProps): import('react').JSX.Element;
37
+ /** Every part at once, with each prop of the root, the list and the scroll button on the Controls panel. */
38
+ export declare const Playground: StoryObj<typeof ChatMessagesPlayground>;
8
39
  //# sourceMappingURL=chat-messages.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-messages.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-messages/chat-messages.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAEL,YAAY,EAGb,MAAM,iBAAiB,CAAC;AA6DzB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAwCnC,CAAC;AAcF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,OAAO,EAAE,KA0CrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA6GvB,CAAC"}
1
+ {"version":3,"file":"chat-messages.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-messages/chat-messages.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC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