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

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 (355) 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 +27 -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-list/chat-list-item.d.ts +6 -0
  36. package/dist/components/chat-list/chat-list-item.d.ts.map +1 -1
  37. package/dist/components/chat-list/chat-list-items.d.ts +12 -1
  38. package/dist/components/chat-list/chat-list-items.d.ts.map +1 -1
  39. package/dist/components/chat-list/chat-list.d.ts +36 -2
  40. package/dist/components/chat-list/chat-list.d.ts.map +1 -1
  41. package/dist/components/chat-list/chat-list.stories.d.ts +67 -9
  42. package/dist/components/chat-list/chat-list.stories.d.ts.map +1 -1
  43. package/dist/components/chat-message/chat-message.d.ts +12 -1
  44. package/dist/components/chat-message/chat-message.d.ts.map +1 -1
  45. package/dist/components/chat-message/chat-message.stories.d.ts +31 -0
  46. package/dist/components/chat-message/chat-message.stories.d.ts.map +1 -1
  47. package/dist/components/chat-message/index.d.ts +1 -1
  48. package/dist/components/chat-message/index.d.ts.map +1 -1
  49. package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts +3 -0
  50. package/dist/components/chat-message-attachment-card/chat-message-attachment-card-icon.d.ts.map +1 -1
  51. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts +25 -5
  52. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.d.ts.map +1 -1
  53. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts +32 -1
  54. package/dist/components/chat-message-attachment-card/chat-message-attachment-card.stories.d.ts.map +1 -1
  55. package/dist/components/chat-message-attachment-card/index.d.ts +2 -2
  56. package/dist/components/chat-message-attachment-card/index.d.ts.map +1 -1
  57. package/dist/components/chat-message-attachment-card/utils.d.ts +1 -0
  58. package/dist/components/chat-message-attachment-card/utils.d.ts.map +1 -1
  59. package/dist/components/chat-message-response/chat-message-response.stories.d.ts +13 -0
  60. package/dist/components/chat-message-response/chat-message-response.stories.d.ts.map +1 -1
  61. package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts +22 -5
  62. package/dist/components/chat-message-toolbar/chat-message-toolbar.d.ts.map +1 -1
  63. package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts +42 -0
  64. package/dist/components/chat-message-toolbar/chat-message-toolbar.stories.d.ts.map +1 -1
  65. package/dist/components/chat-message-toolbar/index.d.ts +1 -1
  66. package/dist/components/chat-message-toolbar/index.d.ts.map +1 -1
  67. package/dist/components/chat-messages/chat-messages.d.ts +34 -2
  68. package/dist/components/chat-messages/chat-messages.d.ts.map +1 -1
  69. package/dist/components/chat-messages/chat-messages.stories.d.ts +33 -2
  70. package/dist/components/chat-messages/chat-messages.stories.d.ts.map +1 -1
  71. package/dist/components/chat-notification-card/chat-notification-card.d.ts +56 -4
  72. package/dist/components/chat-notification-card/chat-notification-card.d.ts.map +1 -1
  73. package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts +50 -1
  74. package/dist/components/chat-notification-card/chat-notification-card.stories.d.ts.map +1 -1
  75. package/dist/components/chat-notification-popup/chat-notification-popup.d.ts +6 -0
  76. package/dist/components/chat-notification-popup/chat-notification-popup.d.ts.map +1 -1
  77. package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts +43 -1
  78. package/dist/components/chat-notification-popup/chat-notification-popup.stories.d.ts.map +1 -1
  79. package/dist/components/chat-prompt-box/chat-prompt-box.d.ts +37 -17
  80. package/dist/components/chat-prompt-box/chat-prompt-box.d.ts.map +1 -1
  81. package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts +53 -1
  82. package/dist/components/chat-prompt-box/chat-prompt-box.stories.d.ts.map +1 -1
  83. package/dist/components/chat-reply/chat-reply.d.ts +11 -0
  84. package/dist/components/chat-reply/chat-reply.d.ts.map +1 -1
  85. package/dist/components/chat-reply/chat-reply.stories.d.ts +23 -0
  86. package/dist/components/chat-reply/chat-reply.stories.d.ts.map +1 -1
  87. package/dist/components/chat-reply/index.d.ts +1 -1
  88. package/dist/components/chat-reply/index.d.ts.map +1 -1
  89. package/dist/components/chat-suggestion/chat-suggestion.d.ts +36 -10
  90. package/dist/components/chat-suggestion/chat-suggestion.d.ts.map +1 -1
  91. package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts +66 -2
  92. package/dist/components/chat-suggestion/chat-suggestion.stories.d.ts.map +1 -1
  93. package/dist/components/chat-suggestion/index.d.ts +2 -1
  94. package/dist/components/chat-suggestion/index.d.ts.map +1 -1
  95. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts +26 -1
  96. package/dist/components/chat-thinking-process/chat-thinking-process.d.ts.map +1 -1
  97. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts +25 -1
  98. package/dist/components/chat-thinking-process/chat-thinking-process.stories.d.ts.map +1 -1
  99. package/dist/components/chat-thread/chat-thread.d.ts +17 -2
  100. package/dist/components/chat-thread/chat-thread.d.ts.map +1 -1
  101. package/dist/components/chat-thread/chat-thread.stories.d.ts +75 -10
  102. package/dist/components/chat-thread/chat-thread.stories.d.ts.map +1 -1
  103. package/dist/components/index.d.ts +1 -3
  104. package/dist/components/index.d.ts.map +1 -1
  105. package/dist/components/markdown-viewer/markdown-viewer.d.ts +8 -1
  106. package/dist/components/markdown-viewer/markdown-viewer.d.ts.map +1 -1
  107. package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts +18 -1
  108. package/dist/components/markdown-viewer/markdown-viewer.stories.d.ts.map +1 -1
  109. package/dist/components/rich-text-area/rich-text-area.d.ts +17 -0
  110. package/dist/components/rich-text-area/rich-text-area.d.ts.map +1 -1
  111. package/dist/components/rich-text-area/rich-text-area.stories.d.ts +52 -0
  112. package/dist/components/rich-text-area/rich-text-area.stories.d.ts.map +1 -1
  113. package/dist/components/rich-text-area/styled.d.ts +6 -2
  114. package/dist/components/rich-text-area/styled.d.ts.map +1 -1
  115. package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts +9 -2
  116. package/dist/components/rich-text-field/components/formatting-toolbar-plugin.d.ts.map +1 -1
  117. package/dist/components/rich-text-field/components/index.d.ts +5 -5
  118. package/dist/components/rich-text-field/components/index.d.ts.map +1 -1
  119. package/dist/components/rich-text-field/components/text-color-button.d.ts +12 -1
  120. package/dist/components/rich-text-field/components/text-color-button.d.ts.map +1 -1
  121. package/dist/components/rich-text-field/rich-text-field.d.ts +22 -0
  122. package/dist/components/rich-text-field/rich-text-field.d.ts.map +1 -1
  123. package/dist/components/rich-text-field/rich-text-field.stories.d.ts +28 -1
  124. package/dist/components/rich-text-field/rich-text-field.stories.d.ts.map +1 -1
  125. package/dist/components/topmenu/index.d.ts +2 -0
  126. package/dist/components/topmenu/index.d.ts.map +1 -0
  127. package/dist/components/topmenu/topmenu.d.ts +22 -0
  128. package/dist/components/topmenu/topmenu.d.ts.map +1 -0
  129. package/dist/components/topmenu/topmenu.stories.d.ts +31 -0
  130. package/dist/components/topmenu/topmenu.stories.d.ts.map +1 -0
  131. package/dist/docs/agent.stories.d.ts.map +1 -1
  132. package/dist/docs/chat-panel.d.ts +7 -5
  133. package/dist/docs/chat-panel.d.ts.map +1 -1
  134. package/dist/docs/chatbot-panel.d.ts.map +1 -1
  135. package/dist/docs/chatbot.stories.d.ts.map +1 -1
  136. package/dist/index.css +1 -1
  137. package/dist/index.es.js +1227 -1260
  138. package/dist/index.es.js.map +1 -1
  139. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts +9 -7
  140. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.d.ts.map +1 -1
  141. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts +37 -9
  142. package/dist/layouts/chat-card-list-layout/chat-card-list-layout.stories.d.ts.map +1 -1
  143. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts +41 -16
  144. package/dist/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.d.ts.map +1 -1
  145. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts +6 -0
  146. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.d.ts.map +1 -1
  147. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts +22 -1
  148. package/dist/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.d.ts.map +1 -1
  149. package/package.json +15 -9
  150. package/src/__storybook__/parent-block.tsx +21 -0
  151. package/src/components/canvas-shell/__stories__/canvas-panel.tsx +25 -0
  152. package/src/components/canvas-shell/__stories__/document-list.tsx +29 -0
  153. package/src/components/canvas-shell/__stories__/fixtures.ts +222 -0
  154. package/src/components/canvas-shell/__stories__/holdings-table.tsx +56 -0
  155. package/src/components/canvas-shell/__stories__/types.ts +47 -0
  156. package/src/components/canvas-shell/{canvas-shell.test.tsx → __tests__/canvas-shell.spec.tsx} +1 -1
  157. package/src/components/canvas-shell/canvas-shell.json +24 -0
  158. package/src/components/canvas-shell/canvas-shell.stories.tsx +581 -122
  159. package/src/components/canvas-shell/canvas-shell.tsx +44 -17
  160. package/src/components/chat-card/__stories__/fixtures.ts +119 -0
  161. package/src/components/chat-card/__stories__/types.ts +44 -0
  162. package/src/components/chat-card/chat-card.json +67 -3
  163. package/src/components/chat-card/chat-card.stories.tsx +872 -148
  164. package/src/components/chat-card/chat-card.tsx +2 -0
  165. package/src/components/chat-card/components/chat-card-body.tsx +12 -0
  166. package/src/components/chat-card/components/chat-card-footer.tsx +11 -0
  167. package/src/components/chat-card/components/chat-card-form.tsx +21 -2
  168. package/src/components/chat-card/components/chat-card-header.tsx +39 -2
  169. package/src/components/chat-card/contexts.tsx +2 -0
  170. package/src/components/chat-card/hooks.ts +1 -0
  171. package/src/components/chat-card/types.ts +3 -0
  172. package/src/components/chat-card-container/__stories__/fixtures.ts +54 -0
  173. package/src/components/chat-card-container/__stories__/resizable-chat-window.tsx +19 -0
  174. package/src/components/chat-card-container/__stories__/result-card.tsx +31 -0
  175. package/src/components/chat-card-container/__stories__/types.ts +16 -0
  176. package/src/components/chat-card-container/chat-card-container.json +7 -0
  177. package/src/components/chat-card-container/chat-card-container.stories.tsx +209 -56
  178. package/src/components/chat-card-container/chat-card-container.tsx +5 -0
  179. package/src/components/chat-container/__stories__/chat-composer.tsx +67 -0
  180. package/src/components/chat-container/__stories__/fixtures.ts +27 -0
  181. package/src/components/chat-container/__stories__/measure.ts +22 -0
  182. package/src/components/chat-container/__stories__/types.ts +7 -0
  183. package/src/components/chat-container/__stories__/variable-readout.tsx +64 -0
  184. package/src/components/chat-container/chat-container.json +9 -1
  185. package/src/components/chat-container/chat-container.stories.tsx +538 -106
  186. package/src/components/chat-container/chat-container.tsx +3 -0
  187. package/src/components/chat-input/__stories__/fixtures.ts +31 -0
  188. package/src/components/chat-input/chat-input.json +10 -2
  189. package/src/components/chat-input/chat-input.stories.tsx +660 -197
  190. package/src/components/chat-input/chat-input.tsx +32 -2
  191. package/src/components/chat-list/__stories__/chat-row.tsx +41 -0
  192. package/src/components/chat-list/__stories__/fixtures.ts +94 -0
  193. package/src/components/chat-list/__stories__/types.ts +13 -0
  194. package/src/components/chat-list/chat-list-item.tsx +6 -0
  195. package/src/components/chat-list/chat-list-items.tsx +16 -0
  196. package/src/components/chat-list/chat-list.json +24 -2
  197. package/src/components/chat-list/chat-list.stories.tsx +631 -215
  198. package/src/components/chat-list/chat-list.tsx +51 -4
  199. package/src/components/chat-message/__stories__/fixtures.ts +53 -0
  200. package/src/components/chat-message/__stories__/sent-attachment.tsx +22 -0
  201. package/src/components/chat-message/__stories__/tool-steps.tsx +37 -0
  202. package/src/components/chat-message/chat-message.json +10 -1
  203. package/src/components/chat-message/chat-message.stories.tsx +282 -20
  204. package/src/components/chat-message/chat-message.tsx +16 -1
  205. package/src/components/chat-message/index.ts +8 -1
  206. package/src/components/chat-message-attachment-card/__stories__/fixtures.ts +30 -0
  207. package/src/components/chat-message-attachment-card/__stories__/types.ts +14 -0
  208. package/src/components/chat-message-attachment-card/chat-message-attachment-card-icon.tsx +4 -0
  209. package/src/components/chat-message-attachment-card/chat-message-attachment-card.json +20 -0
  210. package/src/components/chat-message-attachment-card/chat-message-attachment-card.stories.tsx +266 -51
  211. package/src/components/chat-message-attachment-card/chat-message-attachment-card.tsx +37 -4
  212. package/src/components/chat-message-attachment-card/index.ts +6 -0
  213. package/src/components/chat-message-attachment-card/utils.ts +1 -0
  214. package/src/components/chat-message-response/__stories__/fixtures.ts +50 -0
  215. package/src/components/chat-message-response/chat-message-response.json +5 -0
  216. package/src/components/chat-message-response/chat-message-response.stories.tsx +135 -26
  217. package/src/components/chat-message-toolbar/chat-message-toolbar.json +21 -3
  218. package/src/components/chat-message-toolbar/chat-message-toolbar.stories.tsx +377 -6
  219. package/src/components/chat-message-toolbar/chat-message-toolbar.tsx +47 -12
  220. package/src/components/chat-message-toolbar/index.ts +4 -0
  221. package/src/components/chat-messages/__stories__/conversation-frame.tsx +25 -0
  222. package/src/components/chat-messages/__stories__/conversation-group.tsx +22 -0
  223. package/src/components/chat-messages/__stories__/fixtures.ts +70 -0
  224. package/src/components/chat-messages/__stories__/types.ts +5 -0
  225. package/src/components/chat-messages/chat-messages.json +30 -12
  226. package/src/components/chat-messages/chat-messages.stories.tsx +439 -212
  227. package/src/components/chat-messages/chat-messages.tsx +46 -3
  228. package/src/components/chat-notification-card/__stories__/fixtures.ts +38 -0
  229. package/src/components/chat-notification-card/__stories__/types.ts +13 -0
  230. package/src/components/chat-notification-card/chat-notification-card.json +52 -2
  231. package/src/components/chat-notification-card/chat-notification-card.stories.tsx +542 -62
  232. package/src/components/chat-notification-card/chat-notification-card.tsx +97 -6
  233. package/src/components/chat-notification-popup/__stories__/fixtures.ts +36 -0
  234. package/src/components/chat-notification-popup/__stories__/notification-item.tsx +93 -0
  235. package/src/components/chat-notification-popup/__stories__/types.ts +14 -0
  236. package/src/components/chat-notification-popup/chat-notification-popup.json +14 -1
  237. package/src/components/chat-notification-popup/chat-notification-popup.stories.tsx +467 -17
  238. package/src/components/chat-notification-popup/chat-notification-popup.tsx +18 -3
  239. package/src/components/chat-prompt-box/__stories__/fixtures.ts +16 -0
  240. package/src/components/chat-prompt-box/__stories__/types.ts +8 -0
  241. package/src/components/chat-prompt-box/chat-prompt-box.json +25 -2
  242. package/src/components/chat-prompt-box/chat-prompt-box.stories.tsx +535 -43
  243. package/src/components/chat-prompt-box/chat-prompt-box.tsx +73 -19
  244. package/src/components/chat-reply/chat-reply.json +10 -0
  245. package/src/components/chat-reply/chat-reply.stories.tsx +264 -21
  246. package/src/components/chat-reply/chat-reply.tsx +15 -0
  247. package/src/components/chat-reply/index.ts +10 -1
  248. package/src/components/chat-suggestion/__stories__/fixtures.ts +16 -0
  249. package/src/components/chat-suggestion/__tests__/chat-suggestion.spec.tsx +185 -0
  250. package/src/components/chat-suggestion/chat-suggestion.json +62 -20
  251. package/src/components/chat-suggestion/chat-suggestion.stories.tsx +542 -58
  252. package/src/components/chat-suggestion/chat-suggestion.tsx +154 -65
  253. package/src/components/chat-suggestion/index.ts +9 -0
  254. package/src/components/chat-thinking-process/__stories__/fixtures.ts +56 -0
  255. package/src/components/chat-thinking-process/chat-thinking-process.json +28 -3
  256. package/src/components/chat-thinking-process/chat-thinking-process.stories.tsx +354 -78
  257. package/src/components/chat-thinking-process/chat-thinking-process.tsx +55 -4
  258. package/src/components/chat-thread/__stories__/fixtures.ts +171 -0
  259. package/src/components/chat-thread/__stories__/scroll-position.ts +9 -0
  260. package/src/components/chat-thread/__stories__/snippets.ts +129 -0
  261. package/src/components/chat-thread/__stories__/thread-frame.tsx +22 -0
  262. package/src/components/chat-thread/__stories__/thread-turns.tsx +35 -0
  263. package/src/components/chat-thread/__stories__/types.ts +12 -0
  264. package/src/components/chat-thread/__stories__/use-turn-stream.ts +78 -0
  265. package/src/components/chat-thread/chat-thread.json +23 -3
  266. package/src/components/chat-thread/chat-thread.stories.tsx +804 -142
  267. package/src/components/chat-thread/chat-thread.tsx +64 -16
  268. package/src/components/index.ts +1 -3
  269. package/src/components/markdown-viewer/__stories__/fixtures.ts +67 -0
  270. package/src/components/markdown-viewer/markdown-viewer.json +7 -1
  271. package/src/components/markdown-viewer/markdown-viewer.stories.tsx +219 -50
  272. package/src/components/markdown-viewer/markdown-viewer.tsx +9 -0
  273. package/src/components/rich-text-area/__stories__/fixtures.ts +30 -0
  274. package/src/components/rich-text-area/rich-text-area.json +6 -4
  275. package/src/components/rich-text-area/rich-text-area.stories.tsx +597 -41
  276. package/src/components/rich-text-area/rich-text-area.tsx +22 -1
  277. package/src/components/rich-text-area/styled.tsx +11 -5
  278. package/src/components/rich-text-field/__stories__/fixtures.ts +29 -0
  279. package/src/components/rich-text-field/components/formatting-toolbar-plugin.tsx +10 -1
  280. package/src/components/rich-text-field/components/index.ts +8 -5
  281. package/src/components/rich-text-field/components/text-color-button.tsx +16 -2
  282. package/src/components/rich-text-field/rich-text-field.json +3 -1
  283. package/src/components/rich-text-field/rich-text-field.stories.tsx +452 -61
  284. package/src/components/rich-text-field/rich-text-field.tsx +23 -0
  285. package/src/components/topmenu/index.ts +1 -0
  286. package/src/components/topmenu/topmenu.json +107 -0
  287. package/src/components/topmenu/topmenu.stories.tsx +334 -0
  288. package/src/components/topmenu/topmenu.tsx +71 -0
  289. package/src/docs/agent.stories.tsx +16 -16
  290. package/src/docs/chat-panel.tsx +37 -32
  291. package/src/docs/chatbot-panel.tsx +11 -2
  292. package/src/docs/chatbot.mdx +17 -12
  293. package/src/docs/chatbot.stories.tsx +7 -8
  294. package/src/layouts/chat-card-list-layout/__stories__/fixtures.ts +112 -0
  295. package/src/layouts/chat-card-list-layout/__stories__/result-card.tsx +36 -0
  296. package/src/layouts/chat-card-list-layout/__stories__/types.ts +31 -0
  297. package/src/layouts/chat-card-list-layout/chat-card-list-layout.json +14 -1
  298. package/src/layouts/chat-card-list-layout/chat-card-list-layout.stories.tsx +316 -84
  299. package/src/layouts/chat-card-list-layout/chat-card-list-layout.tsx +11 -7
  300. package/src/layouts/chat-card-three-column-layout/__stories__/fixtures.ts +117 -0
  301. package/src/layouts/chat-card-three-column-layout/__stories__/resizable-chat-window.tsx +18 -0
  302. package/src/layouts/chat-card-three-column-layout/__stories__/stay-details.tsx +85 -0
  303. package/src/layouts/chat-card-three-column-layout/__stories__/stay-list.tsx +50 -0
  304. package/src/layouts/chat-card-three-column-layout/__stories__/stay-map.tsx +44 -0
  305. package/src/layouts/chat-card-three-column-layout/__stories__/stay-rooms.tsx +61 -0
  306. package/src/layouts/chat-card-three-column-layout/__stories__/types.ts +35 -0
  307. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.json +16 -0
  308. package/src/layouts/chat-card-three-column-layout/chat-card-three-column-layout.stories.tsx +603 -182
  309. package/src/layouts/chat-card-two-column-layout/__stories__/connection-itinerary.tsx +51 -0
  310. package/src/layouts/chat-card-two-column-layout/__stories__/fixtures.ts +83 -0
  311. package/src/layouts/chat-card-two-column-layout/__stories__/route-map.tsx +24 -0
  312. package/src/layouts/chat-card-two-column-layout/__stories__/types.ts +15 -0
  313. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.json +13 -1
  314. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.stories.tsx +368 -67
  315. package/src/layouts/chat-card-two-column-layout/chat-card-two-column-layout.tsx +11 -2
  316. package/dist/components/card-item-picker/card-item-picker-context.d.ts +0 -21
  317. package/dist/components/card-item-picker/card-item-picker-context.d.ts.map +0 -1
  318. package/dist/components/card-item-picker/card-item-picker-list.d.ts +0 -24
  319. package/dist/components/card-item-picker/card-item-picker-list.d.ts.map +0 -1
  320. package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts +0 -28
  321. package/dist/components/card-item-picker/card-item-picker-row-parts.d.ts.map +0 -1
  322. package/dist/components/card-item-picker/card-item-picker-row.d.ts +0 -12
  323. package/dist/components/card-item-picker/card-item-picker-row.d.ts.map +0 -1
  324. package/dist/components/card-item-picker/card-item-picker.stories.d.ts +0 -19
  325. package/dist/components/card-item-picker/card-item-picker.stories.d.ts.map +0 -1
  326. package/dist/components/card-item-picker/index.d.ts +0 -9
  327. package/dist/components/card-item-picker/index.d.ts.map +0 -1
  328. package/dist/components/chat-message-history/chat-message-history.d.ts +0 -48
  329. package/dist/components/chat-message-history/chat-message-history.d.ts.map +0 -1
  330. package/dist/components/chat-message-history/chat-message-history.stories.d.ts +0 -7
  331. package/dist/components/chat-message-history/chat-message-history.stories.d.ts.map +0 -1
  332. package/dist/components/chat-message-history/index.d.ts +0 -2
  333. package/dist/components/chat-message-history/index.d.ts.map +0 -1
  334. package/dist/components/spinner/index.d.ts +0 -2
  335. package/dist/components/spinner/index.d.ts.map +0 -1
  336. package/dist/components/spinner/spinner.d.ts +0 -9
  337. package/dist/components/spinner/spinner.d.ts.map +0 -1
  338. package/dist/components/spinner/spinner.stories.d.ts +0 -8
  339. package/dist/components/spinner/spinner.stories.d.ts.map +0 -1
  340. package/src/components/card-item-picker/__tests__/card-item-picker.spec.tsx +0 -279
  341. package/src/components/card-item-picker/card-item-picker-context.tsx +0 -44
  342. package/src/components/card-item-picker/card-item-picker-list.tsx +0 -95
  343. package/src/components/card-item-picker/card-item-picker-row-parts.tsx +0 -96
  344. package/src/components/card-item-picker/card-item-picker-row.tsx +0 -109
  345. package/src/components/card-item-picker/card-item-picker.json +0 -147
  346. package/src/components/card-item-picker/card-item-picker.stories.tsx +0 -158
  347. package/src/components/card-item-picker/index.ts +0 -24
  348. package/src/components/chat-message-history/chat-message-history.json +0 -99
  349. package/src/components/chat-message-history/chat-message-history.stories.tsx +0 -136
  350. package/src/components/chat-message-history/chat-message-history.tsx +0 -277
  351. package/src/components/chat-message-history/index.ts +0 -13
  352. package/src/components/spinner/index.ts +0 -1
  353. package/src/components/spinner/spinner.json +0 -73
  354. package/src/components/spinner/spinner.stories.tsx +0 -41
  355. package/src/components/spinner/spinner.tsx +0 -32
package/README.md CHANGED
@@ -167,10 +167,10 @@ Everything is exported from the package root. Each row names a component family:
167
167
  | `ChatContainer`, `ChatContainerPrompt`, `ChatContainerWelcome` | Root of a chat. Measures itself and publishes the chat window size, reading-column width and composer height as CSS variables, so cards and layouts size against the chat without prop drilling. |
168
168
  | `ChatThreadProvider`, `ChatThread`, `ChatThreadGroup`, `ChatThreadQuestion`, `ChatThreadAnswer`, `ChatThreadErrorState`, `useChatThread`, `useChatThreadScrollable` | The one scroller of a conversation. Opens at the latest message and anchors a new question at the top while its answer streams (`scrollMode="anchor"`), or follows output at the bottom for agents and logs (`"follow"`). |
169
169
  | `ChatMessages`, `ChatMessagesList`, `ChatMessagesScrollButton`, `ChatMessageListGroup`, `ChatConversationProvider`, `useChatConversationContext` | The earlier conversation scroller, driven by a render function per question/answer group. Kept for existing screens; new screens use `ChatThread`. |
170
- | `ChatMessageHistory` and its parts, `useChatMessageHistoryContext` | A scroller that always sticks to the newest message, for simple log-style lists and existing screens. |
171
170
  | `CanvasShell` and its parts, `canvasShellContentPadding` | The side panel beside the chat: a fixed header (title, options, full-screen, close), a content region that scrolls or clips, and an optional footer. |
172
171
  | `ChatList` and its parts, `useChatListContext` | The sidebar list of past conversations: virtualised, loads more pages on scroll, with skeleton, empty and error states driven by your fetch state. |
173
172
  | `NewChatTrigger` | A button (or `asChild` element) that starts a new chat in the nearest `ChatProvider`. |
173
+ | `TopMenu`, `TopMenuActions` | Groups top-level icon actions in a panel at the trailing edge of the chat header. |
174
174
 
175
175
  ### Messages
176
176
 
@@ -182,9 +182,8 @@ Everything is exported from the package root. Each row names a component family:
182
182
  | `ChatThinkingProcess` and its parts | A collapsible timeline of the model's reasoning or tool steps above its answer, with a live preview while it thinks. |
183
183
  | `ChatMessageToolbar` and its parts | The row under a message: timestamp plus small icon actions (copy, edit, feedback), each with an optional tooltip. |
184
184
  | `ChatMessageAttachmentCard` and its parts, `getAttachmentIcon` | A compact chip for a file attached to a prompt or message: file-type icon or image thumbnail, truncated name, remove button. |
185
- | `ChatSuggestions`, `ChatSuggestion` and its parts, `useChatSuggestionContext` | Numbered follow-up questions or quick replies above the composer; picking one sends it. |
185
+ | `ChatSuggestions`, `ChatSuggestion` and its parts, `useChatSuggestionContext` | Numbered follow-up questions or quick replies above the composer, keyboard-navigable; picking one (`onSelect`) sends it. |
186
186
  | `ChatReplies`, `ChatReply`, `ChatReplyLabel`, `ChatReplyValue` | Label/value rows summarising a drafted reply (subject, recipients) before it is sent. |
187
- | `Spinner`, `SOURCE_ANIMATION` | A Lottie loading animation in four sizes, for waits whose final layout is unknown. `SOURCE_ANIMATION` is the URL it loads. |
188
187
 
189
188
  ### Composer and editors
190
189
 
@@ -198,14 +197,13 @@ Everything is exported from the package root. Each row names a component family:
198
197
 
199
198
  ### Cards and layouts
200
199
 
201
- | Export | Why it exists |
202
- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
203
- | `ChatCard` and its parts, `EditableChatCardContextProvider`, `useEditableChatCardContext`, `useEditChatCard` | A collapsible card for a structured result in an answer (a booking, a draft, a set of options), with header, body, footer and collapsed-preview slots. |
204
- | `ChatCardContainer` | Sizes a card against the width `ChatContainer` publishes, so cards line up with the message text or take the whole chat window. |
205
- | `ChatCardListLayout` and its parts, `useChatCardListLayoutContext` | Shows the first few cards of a list and mounts the rest only behind a "show more" button. |
206
- | `ChatCardTwoColumnLayout` and its parts, `chatCardTwoColumnLayout*Variants` | A card body with an aside beside a main pane, stacked when the card is narrow. |
207
- | `ChatCardThreeColumnLayout` and its parts, `chatCardThreeColumnLayout*Variants` | A card body shaped like a collection, a canvas and a selected item (places on a map), which switches panes on its own measured width. |
208
- | `CardItemPickerList`, `CardItemPickerRow` and its parts, `useCardItemPickerListContext`, `useCardItemPickerRowContext` | A single-select listbox of cards for a card's collection pane, whose hover and selection can mirror another view such as map pins. |
200
+ | Export | Why it exists |
201
+ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
202
+ | `ChatCard` and its parts, `EditableChatCardContextProvider`, `useEditableChatCardContext`, `useEditChatCard` | A collapsible card for a structured result in an answer (a booking, a draft, a set of options), with header, body, footer and collapsed-preview slots. |
203
+ | `ChatCardContainer` | Sizes a card against the width `ChatContainer` publishes, so cards line up with the message text or take the whole chat window. |
204
+ | `ChatCardListLayout` and its parts, `useChatCardListLayoutContext` | Shows the first few cards of a list and mounts the rest only behind a "show more" button. |
205
+ | `ChatCardTwoColumnLayout` and its parts, `chatCardTwoColumnLayout*Variants` | A card body with an aside beside a main pane, stacked when the card is narrow. |
206
+ | `ChatCardThreeColumnLayout` and its parts, `chatCardThreeColumnLayout*Variants` | A card body shaped like a collection, a canvas and a selected item (places on a map), which switches panes on its own measured width. |
209
207
 
210
208
  ### Notifications
211
209
 
@@ -242,7 +240,6 @@ Everything is exported from the package root. Each row names a component family:
242
240
  | A new answer doesn't scroll into view, or an old message jumps to the top | `groupIds` doesn't match the rendered `ChatThreadGroup`s, so a group is treated as history or as a new turn by mistake | Pass every rendered `groupId` in order; change `conversationId` when switching conversations |
243
241
  | Markdown answers (code blocks, tables) are partly unstyled with Option A | `MarkdownViewer` renders through Streamdown, whose own class names live in `streamdown/dist`, which `tailwind.css` doesn't scan | Add an `@source` for `streamdown/dist/*.js` where your package manager installed it, or use the prebuilt `index.css`, which includes them |
244
242
  | A `<swi-*>` tag in an answer shows as plain text | The tag has no entry in `MarkdownViewer`'s `customComponents`, so the sanitiser strips it and keeps its text | Map the tag name to a component in `customComponents` |
245
- | The `Spinner` is blank under a strict CSP or offline | Its animation loads from `lottie.host` at runtime | Allow `https://lottie.host` in `connect-src`, or use another loading indicator |
246
243
  | Bundler error importing `katex/dist/katex.min.css` | `MarkdownViewer` imports KaTeX's stylesheet, and the bundler doesn't handle CSS imports from dependencies | Enable CSS imports for `node_modules` (Vite does by default) |
247
244
  | `Failed to resolve import "@swisper.ai/web-chat-ui/hooks"` | The `./hooks` subpath ships type declarations but no JavaScript | Import the hooks from `@swisper.ai/web-chat-ui` |
248
245
 
@@ -1,18 +1,29 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
2
  import { IconButtonProps, TypographyProps } from '@swisper.ai/ui';
3
- export type CanvasShellProps = ComponentProps<'section'>;
3
+ export interface CanvasShellProps extends ComponentProps<'section'> {
4
+ }
4
5
  /**
5
6
  * Three-row grid: header and footer size to their content, the content row takes the rest.
6
7
  * `minmax(0,1fr)` keeps a long list from growing the middle row past the shell's height.
8
+ * The single column is `minmax(0,1fr)` too, so a long title truncates instead of widening the header.
7
9
  */
8
- export declare function CanvasShell({ className, ...props }: CanvasShellProps): import('react').JSX.Element;
10
+ export declare function CanvasShell({ className, children, ...props }: CanvasShellProps): import('react').JSX.Element;
9
11
  export interface CanvasShellHeaderProps extends ComponentProps<'header'> {
12
+ /** Draw the separator under the header. Set false for a header that blends into the content. */
10
13
  hasBorder?: boolean;
11
14
  }
12
- export declare function CanvasShellHeader({ className, hasBorder, ...props }: CanvasShellHeaderProps): import('react').JSX.Element;
13
- export type CanvasShellTitleProps = Omit<TypographyProps, 'variant'>;
14
- export declare function CanvasShellTitle({ className, ...props }: CanvasShellTitleProps): import('react').JSX.Element;
15
- export type CanvasShellCloseTriggerProps = IconButtonProps;
15
+ /**
16
+ * Static top row: the title, then the panel's icon buttons.
17
+ */
18
+ export declare function CanvasShellHeader({ className, children, hasBorder, ...props }: CanvasShellHeaderProps): import('react').JSX.Element;
19
+ export interface CanvasShellTitleProps extends Omit<TypographyProps, 'variant'> {
20
+ }
21
+ /**
22
+ * Name of what the canvas shows. Takes the header's free width and truncates to one line.
23
+ */
24
+ export declare function CanvasShellTitle({ className, children, ...props }: CanvasShellTitleProps): import('react').JSX.Element;
25
+ export interface CanvasShellCloseTriggerProps extends IconButtonProps {
26
+ }
16
27
  /**
17
28
  * Icon-only close button; the host decides what closing means through `onClick`.
18
29
  */
@@ -36,6 +47,7 @@ export interface CanvasShellOptionsButtonProps extends Omit<IconButtonProps, 'ch
36
47
  children: ReactNode;
37
48
  /** Classes for the dropdown panel. */
38
49
  menuClassName?: string;
50
+ /** Called with the menu's next open state. */
39
51
  onOpenChange?: (isOpen: boolean) => void;
40
52
  }
41
53
  /**
@@ -43,13 +55,15 @@ export interface CanvasShellOptionsButtonProps extends Omit<IconButtonProps, 'ch
43
55
  */
44
56
  export declare function CanvasShellOptionsButton({ className, children, menuClassName, onOpenChange, ...props }: CanvasShellOptionsButtonProps): import('react').JSX.Element;
45
57
  export interface CanvasShellContentProps extends ComponentProps<'div'> {
58
+ /** Classes for the inner body, the element that pads and scrolls the children. */
59
+ bodyClassName?: string;
46
60
  /**
47
61
  * Apply the shell's horizontal padding (`canvasShellContentPadding`).
48
62
  * Set false for edge-to-edge children that pad themselves.
49
63
  */
50
64
  hasPadding?: boolean;
51
65
  /**
52
- * Scroll children that overflow the region, on either axis, with always-visible scrollbars.
66
+ * Scroll children that overflow the region, on either axis.
53
67
  * When false, the region clips overflow: for children that scroll themselves.
54
68
  */
55
69
  hasScroll?: boolean;
@@ -58,7 +72,15 @@ export interface CanvasShellContentProps extends ComponentProps<'div'> {
58
72
  * Horizontal padding of the content region; reuse it to align custom scroll areas with the shell.
59
73
  */
60
74
  export declare const canvasShellContentPadding = "px-[12px] md:px-[16px]";
61
- export declare function CanvasShellContent({ className, hasPadding, hasScroll, children, ...props }: CanvasShellContentProps): import('react').JSX.Element;
62
- export type CanvasShellFooterProps = ComponentProps<'footer'>;
63
- export declare function CanvasShellFooter({ className, ...props }: CanvasShellFooterProps): import('react').JSX.Element;
75
+ /**
76
+ * Middle row, the only part that moves: it scrolls or clips its children inside the shell's height.
77
+ * `className` goes to the region, `bodyClassName` to the inner element that pads and scrolls.
78
+ */
79
+ export declare function CanvasShellContent({ className, children, bodyClassName, hasPadding, hasScroll, ...props }: CanvasShellContentProps): import('react').JSX.Element;
80
+ export interface CanvasShellFooterProps extends ComponentProps<'footer'> {
81
+ }
82
+ /**
83
+ * Static bottom row; lines its children up at the end. Stack them with `flex-col items-stretch`.
84
+ */
85
+ export declare function CanvasShellFooter({ className, children, ...props }: CanvasShellFooterProps): import('react').JSX.Element;
64
86
  //# sourceMappingURL=canvas-shell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-shell.d.ts","sourceRoot":"","sources":["../../../src/components/canvas-shell/canvas-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAIxB,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAYpE;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,SAAgB,EAChB,GAAG,KAAK,EACT,EAAE,sBAAsB,+BAexB;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAU9E;AAED,MAAM,MAAM,4BAA4B,GAAG,eAAe,CAAC;AAE3D;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,4BAA4B,+BAc9B;AAED,MAAM,WAAW,iCAAkC,SAAQ,IAAI,CAC7D,eAAe,EACf,YAAY,GAAG,cAAc,CAC9B;IACC,4FAA4F;IAC5F,YAAY,EAAE,OAAO,CAAC;IACtB,2DAA2D;IAC3D,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,GAAG,KAAK,EACT,EAAE,iCAAiC,+BAiBnC;AAED,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACtF,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;IACpB,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,6BAA6B,+BA2B/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACpE;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,UAAiB,EACjB,SAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,+BAsBzB;AAED,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAE9D,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAchF"}
1
+ {"version":3,"file":"canvas-shell.d.ts","sourceRoot":"","sources":["../../../src/components/canvas-shell/canvas-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EA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B,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC;IACtF,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;IACpB,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,6BAA6B,+BA2B/B;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACpE,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,QAAQ,EACR,aAAa,EACb,UAAiB,EACjB,SAAgB,EAChB,GAAG,KAAK,EACT,EAAE,uBAAuB,+BAuBzB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,QAAQ,CAAC;CAAG;AAE3E;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAgB1F"}
@@ -1,26 +1,58 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
- interface CanvasShellStoryArgs {
2
+ import { CanvasShell } from './canvas-shell';
3
+ declare const meta: Meta<typeof CanvasShell>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof CanvasShell>;
6
+ /** A booked train ticket in the side panel: its name and a close button on top, the details in the scrolling region, the download action in the footer. */
7
+ export declare const Default: Story;
8
+ interface DocumentPreviewCanvasProps {
9
+ filename: string;
10
+ onDownload: () => void;
11
+ onRename: () => void;
12
+ onClose: () => void;
13
+ }
14
+ /** The canvas a document opens in. The host owns full screen: it flips the flag and widens the panel. */
15
+ declare function DocumentPreviewCanvas({ filename, onDownload, onRename, onClose, }: DocumentPreviewCanvasProps): import('react').JSX.Element;
16
+ type DocumentPreviewStory = StoryObj<typeof DocumentPreviewCanvas>;
17
+ /** A filename longer than the header: it truncates to one line instead of pushing the buttons out. */
18
+ export declare const LongTitle: DocumentPreviewStory;
19
+ interface DocumentsLibraryCanvasProps {
20
+ onClose: () => void;
21
+ }
22
+ /** The chat's documents library: a list longer than the panel and nothing to confirm, so no footer. */
23
+ declare function DocumentsLibraryCanvas({ onClose }: DocumentsLibraryCanvasProps): import('react').JSX.Element;
24
+ type DocumentsLibraryStory = StoryObj<typeof DocumentsLibraryCanvas>;
25
+ /** No footer: the content region extends to the bottom of the shell. */
26
+ export declare const WithoutFooter: DocumentsLibraryStory;
27
+ /** A table wider and taller than the shell: it scrolls on both axes instead of growing the shell, edge to edge with `hasPadding={false}`. */
28
+ export declare const WideContent: Story;
29
+ /** Options button in the header: the canvas's secondary actions, download and rename, in a dropdown. */
30
+ export declare const WithOptions: DocumentPreviewStory;
31
+ /** The shell in each place it goes: a side panel beside the chat, and a full-height aside holding a chat of its own. */
32
+ export declare const Examples: Story;
33
+ /** Picks an action from the options menu with the pointer, then opens and dismisses it from the keyboard. */
34
+ export declare const OptionsMenuPick: DocumentPreviewStory;
35
+ /** Toggles full screen: the button reports the state and the host's panel, not the shell, changes width. */
36
+ export declare const FullScreenToggle: DocumentPreviewStory;
37
+ /** A title too long for the header is cut to one line, and every header button stays inside the panel. */
38
+ export declare const LongTitleKeepsButtons: DocumentPreviewStory;
39
+ /** A list longer than the panel scrolls inside the content region: the shell keeps its parent's height and the header stays put. */
40
+ export declare const LongContentScrolls: DocumentsLibraryStory;
41
+ interface CanvasShellPlaygroundProps {
3
42
  title: string;
4
43
  itemCount: number;
44
+ hasBorder: boolean;
45
+ hasOptions: boolean;
46
+ hasFullScreenTrigger: boolean;
47
+ hasPadding: boolean;
5
48
  hasScroll: boolean;
6
49
  hasWideContent: boolean;
7
50
  hasFooter: boolean;
8
- hasOptions: boolean;
9
- onClose: () => void;
10
51
  onOption: (option: string) => void;
52
+ onOptionsOpenChange: (isOpen: boolean) => void;
53
+ onClose: () => void;
11
54
  }
12
- declare function CanvasShellStory({ title, itemCount, hasScroll, hasWideContent, hasFooter, hasOptions, onClose, onOption, }: CanvasShellStoryArgs): import('react').JSX.Element;
13
- declare const meta: Meta<typeof CanvasShellStory>;
14
- export default meta;
15
- type Story = StoryObj<typeof CanvasShellStory>;
16
- export declare const Default: Story;
17
- /** A title longer than the header: it truncates instead of pushing the close button out. */
18
- export declare const LongTitle: Story;
19
- /** No footer: the content region extends to the bottom of the shell. */
20
- export declare const WithoutFooter: Story;
21
- /** Content wider and taller than the shell: it scrolls on both axes instead of growing the shell. */
22
- export declare const WideContent: Story;
23
- /** Options button in the header: opens a dropdown of canvas actions. */
24
- export declare const WithOptions: Story;
25
- export declare const Playground: Story;
55
+ declare function CanvasShellPlayground({ title, itemCount, hasBorder, hasOptions, hasFullScreenTrigger, hasPadding, hasScroll, hasWideContent, hasFooter, onOption, onOptionsOpenChange, onClose, }: CanvasShellPlaygroundProps): import('react').JSX.Element;
56
+ /** Every part of the shell at once, with each part and prop on the Controls panel. */
57
+ export declare const Playground: StoryObj<typeof CanvasShellPlayground>;
26
58
  //# sourceMappingURL=canvas-shell.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-shell.stories.d.ts","sourceRoot":"","sources":["../../../src/components/canvas-shell/canvas-shell.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA0B5D,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,SAAS,EACT,SAAS,EACT,cAAc,EACd,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,GACT,EAAE,oBAAoB,+BAkDtB;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CA4DvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,4FAA4F;AAC5F,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"canvas-shell.stories.d.ts","sourceRoot":"","sources":["../../../src/components/canvas-shell/canvas-shell.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgD5D,OAAO,EACL,WAAW,EASZ,MAAM,gBAAgB,CAAC;AAExB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAmBlC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,2JAA2J;AAC3J,e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S,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,iBAAS,qBAAqB,CAAC,EAC7B,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,QAAQ,EACR,mBAAmB,EACnB,OAAO,GACR,EAAE,0BAA0B,+BAqD5B;AAED,sFAAsF;AACtF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,qBAAqB,CAqE7D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { ChatCardProps } from './types';
2
2
  export { useChatCardContext } from './context';
3
+ /** @deprecated Use `Card` from `@swisper.ai/cards-ui`. */
3
4
  export declare const ChatCard: import('react').ForwardRefExoticComponent<Omit<ChatCardProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
4
5
  //# sourceMappingURL=chat-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/chat-card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,eAAO,MAAM,QAAQ,oHA6FnB,CAAC"}
1
+ {"version":3,"file":"chat-card.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/chat-card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,oHA8FnB,CAAC"}
@@ -1,11 +1,57 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { EmailMessage } from './__stories__/types';
3
+ import { ChatCardProps } from './types';
2
4
  import { ChatCard } from '.';
3
5
  declare const meta: Meta<typeof ChatCard>;
4
6
  export default meta;
5
7
  type Story = StoryObj<typeof ChatCard>;
8
+ /** A drafted email the user reviews before it is sent: header, label and value rows, the message, and the decisions in the footer. */
6
9
  export declare const Default: Story;
10
+ /** Clicks the header to collapse the email and again to expand it, and checks a click in the open body leaves it open. */
11
+ export declare const DefaultCollapseAndExpand: Story;
12
+ /** Reaches the collapse button with Tab, collapses the email with Enter and expands it with Space. */
13
+ export declare const DefaultKeyboard: Story;
14
+ /** A booking card holding one level 2 card per trip: the nested cards stay open, so only the outer card folds. */
7
15
  export declare const Level2: Story;
16
+ /** An email from a search result, closed until the user opens it: the title and subtitle name it, and the preview shows how the message starts. */
8
17
  export declare const Collapsed: Story;
9
- export declare const Editable: Story;
18
+ interface EmailDraftCardProps {
19
+ email: EmailMessage;
20
+ isDefaultEditing?: boolean;
21
+ onSend: (subject: string) => void;
22
+ onCancel: () => void;
23
+ }
24
+ declare function EmailDraftCard({ email, isDefaultEditing, onSend, onCancel, }: EmailDraftCardProps): import('react').JSX.Element;
25
+ type EmailDraftStory = StoryObj<typeof EmailDraftCard>;
26
+ /** A drafted email being edited: `useEditChatCard` holds the edit state, and the card is selected while its field is open. */
27
+ export declare const Editable: EmailDraftStory;
28
+ /** Opens the editor, changes the subject and discards it: the card is selected only while editing and the subject is unchanged. */
29
+ export declare const EditableEditAndDiscard: EmailDraftStory;
30
+ /** Changes the subject and sends: the callback gets the new subject, and the card leaves edit mode with it in the title. */
31
+ export declare const EditableSend: EmailDraftStory;
32
+ /** A train connection that starts closed: `ChatCardPreview` summarises the journey, and the body holds the stops and the action. */
10
33
  export declare const WithPreview: Story;
34
+ /** Clicks the preview of the closed connection: the card expands, the preview goes and the stops and the action appear. */
35
+ export declare const WithPreviewExpand: Story;
36
+ /** The card in each place its spec allows: a card container, a card list, another card's content, and the chat contexts. */
37
+ export declare const Examples: Story;
38
+ interface ChatCardPlaygroundProps extends Omit<ChatCardProps, 'children' | 'title'> {
39
+ title: string;
40
+ subTitle: string;
41
+ preview: string;
42
+ hasIcon: boolean;
43
+ hasHeaderAction: boolean;
44
+ hasMedia: boolean;
45
+ hasAttributes: boolean;
46
+ hasFooterNotes: boolean;
47
+ hasFooterPrice: boolean;
48
+ hasFooterActions: boolean;
49
+ hasPreview: boolean;
50
+ hasPadding: boolean;
51
+ hasHeaderPadding: boolean;
52
+ onHeaderAction: () => void;
53
+ }
54
+ declare function ChatCardPlayground({ title, subTitle, preview, hasIcon, hasHeaderAction, hasMedia, hasAttributes, hasFooterNotes, hasFooterPrice, hasFooterActions, hasPreview, hasPadding, hasHeaderPadding, onHeaderAction, ...rest }: ChatCardPlaygroundProps): import('react').JSX.Element;
55
+ /** Every part of the card at once on a trip booking, with each root prop and each part on the Controls panel. */
56
+ export declare const Playground: StoryObj<typeof ChatCardPlayground>;
11
57
  //# sourceMappingURL=chat-card.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card.stories.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/chat-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAQ5D,OAAO,EACL,QAAQ,EAqBT,MAAM,GAAG,CAAC;AAEX,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAwF/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AA4CvC,eAAO,MA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,+BAmGzB;AAED,iHAAiH;AACjH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,kBAAkB,CAsD1D,CAAC"}
@@ -1,22 +1,30 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
+ /** @deprecated Use `CardMediaProps` from `@swisper.ai/cards-ui`. */
2
3
  export interface ChatCardMediaProps extends Omit<ComponentProps<'figure'>, 'aria-label'> {
3
4
  children: ReactNode;
4
5
  }
6
+ /** @deprecated Use `CardMedia` from `@swisper.ai/cards-ui`. */
5
7
  export declare function ChatCardMedia({ className, children, ...rest }: ChatCardMediaProps): import('react').JSX.Element;
8
+ /** @deprecated Use `CardBodyProps` from `@swisper.ai/cards-ui`. */
6
9
  export interface ChatCardBodyProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
7
10
  children: ReactNode;
8
11
  asChild?: boolean;
9
12
  }
13
+ /** @deprecated Use `CardBody` from `@swisper.ai/cards-ui`. */
10
14
  export declare function ChatCardBody({ className, children, asChild, ...rest }: ChatCardBodyProps): import('react').JSX.Element;
15
+ /** @deprecated Use `CardContentProps` from `@swisper.ai/cards-ui`. */
11
16
  export interface ChatCardContentProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
12
17
  children: ReactNode;
13
18
  asChild?: boolean;
14
19
  hasPadding?: boolean;
15
20
  hasHeaderPadding?: boolean;
16
21
  }
22
+ /** @deprecated Use `CardContent` from `@swisper.ai/cards-ui`. */
17
23
  export declare function ChatCardContent({ className, children, asChild, hasPadding, hasHeaderPadding, ...rest }: ChatCardContentProps): import('react').JSX.Element;
24
+ /** @deprecated Use `CardPreviewProps` from `@swisper.ai/cards-ui`. */
18
25
  export interface ChatCardPreviewProps extends ComponentProps<'div'> {
19
26
  children: ReactNode;
20
27
  }
28
+ /** @deprecated Use `CardPreview` from `@swisper.ai/cards-ui`. */
21
29
  export declare function ChatCardPreview({ className, children, ...rest }: ChatCardPreviewProps): import('react').JSX.Element;
22
30
  //# sourceMappingURL=chat-card-body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card-body.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-body.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACtF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAUjF;AAED,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAe,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAmBhG;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,OAAe,EACf,UAAiB,EACjB,gBAAuB,EACvB,GAAG,IAAI,EACR,EAAE,oBAAoB,+BAwBtB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAoBrF"}
1
+ {"version":3,"file":"chat-card-body.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-body.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvD,oEAAoE;AACpE,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACtF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,kBAAkB,+BAWjF;AAED,mEAAmE;AACnE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAe,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAoBhG;AAED,sEAAsE;AACtE,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,OAAe,EACf,UAAiB,EACjB,gBAAuB,EACvB,GAAG,IAAI,EACR,EAAE,oBAAoB,+BAyBtB;AAED,sEAAsE;AACtE,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAqBrF"}
@@ -1,20 +1,28 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
+ /** @deprecated Use `CardFooterProps` from `@swisper.ai/cards-ui`. */
2
3
  export interface ChatCardFooterProps extends ComponentProps<'footer'> {
3
4
  children: ReactNode;
4
5
  }
6
+ /** @deprecated Use `CardFooter` from `@swisper.ai/cards-ui`. */
5
7
  export declare function ChatCardFooter({ className, children, ...rest }: ChatCardFooterProps): import('react').JSX.Element;
8
+ /** @deprecated Put your own block in `CardFooterLeft` from `@swisper.ai/cards-ui`. */
6
9
  export interface ChatCardFooterNotesProps {
7
10
  children: ReactNode;
8
11
  className?: string;
9
12
  }
13
+ /** @deprecated Put your own block in `CardFooterLeft` from `@swisper.ai/cards-ui`. */
10
14
  export declare function ChatCardFooterNotes({ className, children }: ChatCardFooterNotesProps): import('react').JSX.Element;
15
+ /** @deprecated Put your own block in `CardFooterRight` from `@swisper.ai/cards-ui`. */
11
16
  export interface ChatCardFooterPriceProps {
12
17
  children: ReactNode;
13
18
  className?: string;
14
19
  }
20
+ /** @deprecated Put your own block in `CardFooterRight` from `@swisper.ai/cards-ui`. */
15
21
  export declare function ChatCardFooterPrice({ className, children }: ChatCardFooterPriceProps): import('react').JSX.Element;
22
+ /** @deprecated Use `CardFooterActionsProps` from `@swisper.ai/cards-ui`. */
16
23
  export interface ChatCardFooterActionsProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
17
24
  children: ReactNode;
18
25
  }
26
+ /** @deprecated Use `CardFooterActions` from `@swisper.ai/cards-ui`. */
19
27
  export declare function ChatCardFooterActions({ className, children, ...rest }: ChatCardFooterActionsProps): import('react').JSX.Element;
20
28
  //# sourceMappingURL=chat-card-footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card-footer.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAqBnF;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAcpF;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAcpF;AAED,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC3F,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,0BAA0B,+BAW5B"}
1
+ {"version":3,"file":"chat-card-footer.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvD,qEAAqE;AACrE,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACnE,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,mBAAmB,+BAqBnF;AAED,sFAAsF;AACtF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAepF;AAED,uFAAuF;AACvF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BAepF;AAED,4EAA4E;AAC5E,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC3F,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,0BAA0B,+BAY5B"}
@@ -1,28 +1,41 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
- export interface ChatCardForm extends ComponentProps<'form'> {
2
+ /** @deprecated Use `CardFieldsProps` from `@swisper.ai/cards-ui`. */
3
+ export interface ChatCardFormProps extends ComponentProps<'form'> {
3
4
  children: ReactNode;
4
5
  asChild?: boolean;
5
6
  }
6
- export declare const ChatCardForm: import('react').ForwardRefExoticComponent<Omit<ChatCardForm, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
7
+ /** @deprecated The props of `ChatCardForm` under the component's own name; use `ChatCardFormProps`. */
8
+ export interface ChatCardForm extends ChatCardFormProps {
9
+ }
10
+ /** @deprecated Use `CardFields` from `@swisper.ai/cards-ui`. */
11
+ export declare const ChatCardForm: import('react').ForwardRefExoticComponent<Omit<ChatCardFormProps, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
12
+ /** @deprecated Use `CardAttributesProps` from `@swisper.ai/cards-ui`. */
7
13
  export interface ChatCardAttributesProps {
8
14
  children: ReactNode;
9
15
  className?: string;
10
16
  }
17
+ /** @deprecated Use `CardAttributes` from `@swisper.ai/cards-ui`. */
11
18
  export declare function ChatCardAttributes({ className, children }: ChatCardAttributesProps): import('react').JSX.Element;
19
+ /** @deprecated Use `CardAttributeProps` from `@swisper.ai/cards-ui`. */
12
20
  export interface ChatCardAttributeProps {
13
21
  className?: string;
14
22
  children: ReactNode;
15
23
  }
24
+ /** @deprecated Use `CardAttribute` from `@swisper.ai/cards-ui`. */
16
25
  export declare function ChatCardAttribute({ className, children, ...rest }: ChatCardAttributeProps): import('react').JSX.Element;
26
+ /** @deprecated Use `CardAttributeLabelProps` from `@swisper.ai/cards-ui`. */
17
27
  export interface ChatCardAttributeLabelProps {
18
28
  children: ReactNode;
19
29
  className?: string;
20
30
  hasPadding?: boolean;
21
31
  }
32
+ /** @deprecated Use `CardAttributeLabel` from `@swisper.ai/cards-ui`. */
22
33
  export declare function ChatCardAttributeLabel({ className, children, hasPadding, ...rest }: ChatCardAttributeLabelProps): import('react').JSX.Element;
34
+ /** @deprecated Use `CardAttributeValueProps` from `@swisper.ai/cards-ui`. */
23
35
  export interface ChatCardAttributeValueProps extends Omit<ComponentProps<'dt'>, 'aria-Value'> {
24
36
  children: ReactNode;
25
37
  asChild?: boolean;
26
38
  }
39
+ /** @deprecated Use `CardAttributeValue` from `@swisper.ai/cards-ui`. */
27
40
  export declare function ChatCardAttributeValue({ className, children, asChild, ...rest }: ChatCardAttributeValueProps): import('react').JSX.Element;
28
41
  //# sourceMappingURL=chat-card-form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card-form.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,uHAsBvB,CAAC;AAEH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,uBAAuB,+BASlF;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,sBAAsB,+BAUzF;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,UAAkB,EAClB,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAc7B;AAED,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC3F,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,QAAQ,EACR,OAAe,EACf,GAAG,IAAI,EACR,EAAE,2BAA2B,+BAa7B"}
1
+ {"version":3,"file":"chat-card-form.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,qEAAqE;AACrE,MA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,2BAA2B,+BAa7B"}
@@ -1,36 +1,57 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
2
  import { IconButtonProps, TypographyProps } from '@swisper.ai/ui';
3
+ /** @deprecated Use `CardHeaderProps` from `@swisper.ai/cards-ui`. */
3
4
  export interface ChatCardHeaderProps extends Omit<ComponentProps<'header'>, 'aria-label'> {
4
5
  children: ReactNode;
5
- }
6
- export declare function ChatCardHeader({ className, children, ...rest }: ChatCardHeaderProps): import('react').JSX.Element;
6
+ /**
7
+ * Classes for the inner row that wraps the children (`data-slot="chat-card-header-hover-area"`):
8
+ * the element that highlights on hover and, in a collapsible card, toggles it.
9
+ */
10
+ hoverAreaClassName?: string;
11
+ }
12
+ /** @deprecated Use `CardHeader` from `@swisper.ai/cards-ui`. */
13
+ export declare function ChatCardHeader({ className, children, hoverAreaClassName, ...rest }: ChatCardHeaderProps): import('react').JSX.Element;
14
+ /** @deprecated Use `CardIconProps` from `@swisper.ai/cards-ui`. */
7
15
  export interface ChatCardIconProps extends ComponentProps<'div'> {
8
16
  children: ReactNode;
9
17
  }
18
+ /** @deprecated Use `CardIcon` from `@swisper.ai/cards-ui`. */
10
19
  export declare function ChatCardIcon({ className, children, ...rest }: ChatCardIconProps): import('react').JSX.Element;
20
+ /** @deprecated Use `CardHeaderContentProps` from `@swisper.ai/cards-ui`. */
11
21
  export interface ChatCardHeaderContentProps extends ComponentProps<'div'> {
12
22
  children: ReactNode;
13
23
  }
24
+ /** @deprecated Use `CardHeaderContent` from `@swisper.ai/cards-ui`. */
14
25
  export declare function ChatCardHeaderContent({ className, children, ...rest }: ChatCardHeaderContentProps): import('react').JSX.Element;
26
+ /** @deprecated Use `CardTitleProps` from `@swisper.ai/cards-ui`. */
15
27
  export interface ChatCardTitleProps extends Omit<TypographyProps, 'variant'> {
16
28
  children: ReactNode;
17
29
  }
30
+ /** @deprecated Use `CardTitle` from `@swisper.ai/cards-ui`. */
18
31
  export declare function ChatCardTitle({ className, children, ...rest }: ChatCardTitleProps): import('react').JSX.Element;
32
+ /** @deprecated Use `CardSubTitleProps` from `@swisper.ai/cards-ui`. */
19
33
  export interface ChatCardSubTitleProps extends Omit<TypographyProps, 'variant'> {
20
34
  children: ReactNode;
21
35
  }
36
+ /** @deprecated Use `CardSubTitle` from `@swisper.ai/cards-ui`. */
22
37
  export declare function ChatCardSubTitle({ className, children, ...rest }: ChatCardSubTitleProps): import('react').JSX.Element;
38
+ /** @deprecated Use `CardActionsProps` from `@swisper.ai/cards-ui`. */
23
39
  export interface ChatCardActionsProps extends Omit<ComponentProps<'div'>, 'aria-label'> {
24
40
  children: ReactNode;
25
41
  }
42
+ /** @deprecated Use `CardActions` from `@swisper.ai/cards-ui`. */
26
43
  export declare function ChatCardActions({ className, children, ...rest }: ChatCardActionsProps): import('react').JSX.Element;
44
+ /** @deprecated Use `CardActionButtonProps` from `@swisper.ai/cards-ui`. */
27
45
  export interface ChatCardActionButtonProps extends Omit<IconButtonProps, 'variant' | 'size'> {
28
46
  children: ReactNode;
29
47
  shouldPreventCollapse?: boolean;
30
48
  tooltip?: ReactNode;
31
49
  }
50
+ /** @deprecated Use `CardActionButton` from `@swisper.ai/cards-ui`. */
32
51
  export declare function ChatCardActionButton({ className, children, shouldPreventCollapse, tooltip, onClick, ...rest }: ChatCardActionButtonProps): import('react').JSX.Element;
52
+ /** @deprecated Use `CardCollapsibleButtonProps` from `@swisper.ai/cards-ui`. */
33
53
  export interface ChatCardCollapsibleButtonProps extends Omit<ChatCardActionButtonProps, 'children' | 'shouldPreventCollapse'> {
34
54
  }
55
+ /** @deprecated Use `CardCollapsibleButton` from `@swisper.ai/cards-ui`. */
35
56
  export declare function ChatCardCollapsibleButton({ className, ...rest }: ChatCardCollapsibleButtonProps): import('react').JSX.Element | undefined;
36
57
  //# sourceMappingURL=chat-card-header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-card-header.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-header.tsx"],"names":[],"mappings":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C,EAAE,YAAY,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,oBAAoB,+BAoBrF;AAED,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1F,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,QAAQ,EACR,qBAA4B,EAC5B,OAAO,EACP,OAAO,EACP,GAAG,IAAI,EACR,EAAE,yBAAyB,+BA0B3B;AAED,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAC1D,yBAAyB,EACzB,UAAU,GAAG,uBAAuB,CACrC;CAAG;AAEJ,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,8BAA8B,2CAoB/F"}
1
+ {"version":3,"file":"chat-card-header.d.ts","sourceRoot":"","sources":["../../../../src/components/chat-card/components/chat-card-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAKxB,qEAAqE;AACrE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACvF,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,GAAG,IAAI,EACR,EAAE,mBAAmB,+BA0CrB;AAED,mE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SAAS,GAAG,MAAM,CAAC;IAC1F,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,QAAQ,EACR,qBAA4B,EAC5B,OAAO,EACP,OAAO,EACP,GAAG,IAAI,EACR,EAAE,yBAAyB,+BA2B3B;AAED,gFAAgF;AAChF,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAC1D,yBAAyB,EACzB,UAAU,GAAG,uBAAuB,CACrC;CAAG;AAEJ,2EAA2E;AAC3E,wBAAgB,yBAAyB,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,8BAA8B,2CAqB/F"}
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ /** @deprecated `@swisper.ai/cards-ui` holds no edit state: keep `isEditing` in the app and pass it to `Card`'s `isSelected`. */
2
3
  export declare function useEditableChatCardContext(): {
3
4
  isEditable: boolean;
4
5
  isEditing: boolean;
@@ -11,6 +12,7 @@ interface EditableChatCardContextProviderProps {
11
12
  defaultEditing?: boolean;
12
13
  isEditable?: boolean;
13
14
  }
15
+ /** @deprecated `@swisper.ai/cards-ui` holds no edit state: keep `isEditing` in the app and pass it to `Card`'s `isSelected`. */
14
16
  export declare function EditableChatCardContextProvider({ children, defaultEditing, isEditable, }: EditableChatCardContextProviderProps): import('react').JSX.Element;
15
17
  export {};
16
18
  //# sourceMappingURL=contexts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/contexts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAQlE,wBAAgB,0BAA0B;;;;;;EAUzC;AAED,UAAU,oCAAoC;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,cAAsB,EACtB,UAAkB,GACnB,EAAE,oCAAoC,+BAWtC"}
1
+ {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/contexts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAQlE,gIAAgI;AAChI,wBAAgB,0BAA0B;;;;;;EAUzC;AAED,UAAU,oCAAoC;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,gIAAgI;AAChI,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,cAAsB,EACtB,UAAkB,GACnB,EAAE,oCAAoC,+BAWtC"}
@@ -2,6 +2,7 @@ interface UseEditChatCardProps {
2
2
  isEditable: boolean;
3
3
  defaultEditing?: boolean;
4
4
  }
5
+ /** @deprecated `@swisper.ai/cards-ui` holds no edit state: keep `isEditing` in the app and pass it to `Card`'s `isSelected`. */
5
6
  export declare function useEditChatCard({ isEditable, defaultEditing }: UseEditChatCardProps): {
6
7
  isEditable: boolean;
7
8
  isEditing: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/hooks.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,cAAsB,EAAE,EAAE,oBAAoB;;;;;;EA2C3F"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/hooks.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,gIAAgI;AAChI,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,cAAsB,EAAE,EAAE,oBAAoB;;;;;;EA2C3F"}
@@ -1,6 +1,9 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
+ /** @deprecated Use `CardVariant` from `@swisper.ai/cards-ui`. */
2
3
  export type ChatCardVariant = 'default' | 'action';
4
+ /** @deprecated Use `CardLevel` from `@swisper.ai/cards-ui`. */
3
5
  export type ChatCardLevel = 1 | 2;
6
+ /** @deprecated Use `CardProps` from `@swisper.ai/cards-ui`. */
4
7
  export interface ChatCardProps extends Omit<ComponentProps<'section'>, 'aria-label'> {
5
8
  children: ReactNode;
6
9
  variant?: ChatCardVariant;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/chat-card/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;AAElC,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,YAAY,CAAC;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAA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