@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
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-area.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/rich-text-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,gCAAgC,CAAC;AASzF,OAAO,KAAK,EAAE,aAAa,EAAO,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB3D,eAAO,MAAM,cAAc,EAAE,iBAwB5B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AA+ED,eAAO,MAAM,YAAY,gHAEvB,CAAC"}
1
+ {"version":3,"file":"rich-text-area.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/rich-text-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,gCAAgC,CAAC;AASzF,OAAO,KAAK,EAAE,aAAa,EAAO,SAAS,EAAE,MAAM,OAAO,CAAC;AAoB3D,eAAO,MAAM,cAAc,EAAE,iBAwB5B,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,uFAAuF;IACvF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8EAA8E;IAC9E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC3D,6FAA6F;IAC7F,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAmFD;;;GAGG;AACH,eAAO,MAAM,YAAY,gHAEvB,CAAC"}
@@ -3,5 +3,57 @@ import { RichTextArea } from './rich-text-area';
3
3
  declare const meta: Meta<typeof RichTextArea>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof RichTextArea>;
6
+ /** A reply draft stored as Markdown: bold, italic and a list, edited without a toolbar. */
6
7
  export declare const Default: Story;
8
+ /** No value yet: the placeholder says what to write and goes away with the first character. */
9
+ export declare const Empty: Story;
10
+ /** A draft that can't be edited while it is being sent: dimmed, not selectable and out of the tab order. */
11
+ export declare const Disabled: Story;
12
+ /** `source="html"` for text a mail client renders: an email signature whose value and `onChange` are HTML. */
13
+ export declare const HtmlSource: Story;
14
+ interface ReplyDraftProps {
15
+ initialDraft: string;
16
+ onChange: (markdown: string) => void;
17
+ }
18
+ declare function ReplyDraft({ initialDraft, onChange }: ReplyDraftProps): import('react').JSX.Element;
19
+ type ReplyDraftStory = StoryObj<typeof ReplyDraft>;
20
+ /** The value kept in state: every edit comes back through `onChange` as Markdown, and setting `''` clears the editor. */
21
+ export declare const Controlled: ReplyDraftStory;
22
+ interface SignatureEditorProps {
23
+ signature: string;
24
+ onChange: (html: string) => void;
25
+ }
26
+ declare function SignatureEditor({ signature, onChange }: SignatureEditorProps): import('react').JSX.Element;
27
+ type SignatureEditorStory = StoryObj<typeof SignatureEditor>;
28
+ /** Plugins as children: `ImageDropPlugin` and `HtmlPastePlugin` insert a logo and an HTML snippet when the page dispatches their events. */
29
+ export declare const WithPlugins: SignatureEditorStory;
30
+ interface ScribeAssistFormProps {
31
+ /** The text the writer selected in the email, quoted above the instruction. */
32
+ selection: string;
33
+ onAssist: (instruction: string) => Promise<void>;
34
+ }
35
+ declare function ScribeAssistForm({ selection, onAssist }: ScribeAssistFormProps): import('react').JSX.Element;
36
+ type ScribeAssistStory = StoryObj<typeof ScribeAssistForm>;
37
+ /** An instruction field that submits on Enter through `onKeyDown`: the writing assistant under a quoted selection. */
38
+ export declare const SubmitOnEnter: ScribeAssistStory;
39
+ /** The editor in each place it goes: a form section, a reply composer and a document editor. */
40
+ export declare const Examples: Story;
41
+ /** Typing appends to the draft, reports the Markdown through `onChange`, and every styled element carries its slot name. */
42
+ export declare const DefaultTypeAndSlots: Story;
43
+ /** An empty editor shows the placeholder in its own slot, and the first character removes it. */
44
+ export declare const EmptyShowsPlaceholder: Story;
45
+ /** A disabled editor is marked disabled and read-only, and typing at it changes nothing. */
46
+ export declare const DisabledBlocksEditing: Story;
47
+ /** With `source="html"` the value is read as HTML and edits come back as HTML. */
48
+ export declare const HtmlSourceRoundTrip: Story;
49
+ /** An edit reaches the stored value, and setting the value to an empty string clears the editor. */
50
+ export declare const ControlledEditAndClear: ReplyDraftStory;
51
+ /** The plugins act on the events the page dispatches: a logo and an HTML snippet land in the editor. */
52
+ export declare const WithPluginsInsert: SignatureEditorStory;
53
+ /** Enter submits the instruction, Shift+Enter adds a line, and the field clears when the request succeeds. */
54
+ export declare const SubmitOnEnterSuccess: ScribeAssistStory;
55
+ /** A failed request keeps the instruction in the field and says what happened. */
56
+ export declare const SubmitOnEnterError: ScribeAssistStory;
57
+ /** Every prop on the Controls panel, starting from a signature editor with both plugins mounted. */
58
+ export declare const Playground: Story;
7
59
  //# sourceMappingURL=rich-text-area.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-area.stories.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/rich-text-area.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAoFnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAS3C,eAAO,MAAM,OAAO,EAAE,KAmCrB,CAAC"}
1
+ {"version":3,"file":"rich-text-area.stories.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/rich-text-area.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAqB5D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAiFnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,2FAA2F;AAC3F,eAAO,MAAM,OAAO,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AAE,KA8DtB,CAAC;AAKF,4HAA4H;AAC5H,eAAO,MAAM,mBAAmB,EAAE,KAuCjC,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,EAAE,KAsBnC,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB,EAAE,KAkBnC,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,EAAE,eAsBpC,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,EAAE,oBAwB/B,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,oBAAoB,EAAE,iBAwClC,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,iBAuBhC,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,UAAU,EAAE,KA8BxB,CAAC"}
@@ -1,3 +1,7 @@
1
- import { HTMLAttributes } from 'react';
2
- export declare const Wrapper: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ interface WrapperProps extends HTMLAttributes<HTMLDivElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare const Wrapper: import('react').ForwardRefExoticComponent<WrapperProps & import('react').RefAttributes<HTMLDivElement>>;
6
+ export {};
3
7
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/styled.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAIxD,eAAO,MAAM,OAAO,2HAanB,CAAC"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-area/styled.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxE,UAAU,YAAa,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,OAAO,yGAenB,CAAC"}
@@ -1,11 +1,18 @@
1
1
  import { ReactNode } from 'react';
2
- interface FormattingToolbarPluginProps {
2
+ export interface FormattingToolbarPluginProps {
3
+ /** Classes for the toolbar (`data-slot="rich-text-field-toolbar"`), merged last. */
3
4
  className?: string;
5
+ /** Renders the toolbar controls from `{ hasAttachments }`. Defaults to the full control set. */
4
6
  children?: ({ hasAttachments }: {
5
7
  hasAttachments: boolean;
6
8
  }) => ReactNode;
9
+ /** Handed to `children`; the default controls enable the attachment button with it. */
7
10
  hasAttachments?: boolean;
8
11
  }
12
+ /**
13
+ * The toolbar row `RichTextField` renders. Its controls read the field's formatting context, so it
14
+ * only works inside a `RichTextField`, which already renders one: pass controls through the
15
+ * field's `toolbarChildren` instead of rendering this yourself.
16
+ */
9
17
  export declare function FormattingToolbarPlugin({ className, children, hasAttachments, }: FormattingToolbarPluginProps): import('react').JSX.Element;
10
- export {};
11
18
  //# sourceMappingURL=formatting-toolbar-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formatting-toolbar-plugin.d.ts","sourceRoot":"","sources":["../../../../src/components/rich-text-field/components/formatting-toolbar-plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBvC,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAC;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6BD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAA2C,EAC3C,cAAsB,GACvB,EAAE,4BAA4B,+BAc9B"}
1
+ {"version":3,"file":"formatting-toolbar-plugin.d.ts","sourceRoot":"","sources":["../../../../src/components/rich-text-field/components/formatting-toolbar-plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBvC,MAAM,WAAW,4BAA4B;IAC3C,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,QAAQ,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAC;IAC1E,uFAAuF;IACvF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6BD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAA2C,EAC3C,cAAsB,GACvB,EAAE,4BAA4B,+BAe9B"}
@@ -1,11 +1,11 @@
1
- export { FormattingToolbarPlugin } from './formatting-toolbar-plugin';
2
- export { SizeSelect } from './size-select';
3
- export { TypographySelect } from './typography-select';
4
- export { AlignmentSelect } from './alignment-select';
1
+ export { FormattingToolbarPlugin, type FormattingToolbarPluginProps, } from './formatting-toolbar-plugin';
2
+ export { SizeSelect, type SizeSelectProps } from './size-select';
3
+ export { TypographySelect, type TypographySelectProps } from './typography-select';
4
+ export { AlignmentSelect, type AlignmentSelectProps } from './alignment-select';
5
5
  export { BoldButton } from './bold-button';
6
6
  export { ItalicButton } from './italic-button';
7
7
  export { UnderlineButton } from './underline-button';
8
- export { TextColorButton } from './text-color-button';
8
+ export { TextColorButton, type TextColorButtonProps } from './text-color-button';
9
9
  export { LinkButton } from './link-button';
10
10
  export { AttachmentButton } from './attachment-button';
11
11
  export { ImageButton } from './image-button';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/rich-text-field/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,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ACjF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,3 +1,14 @@
1
1
  import { ToolbarButtonProps } from './toolbar-button';
2
- export declare function TextColorButton({ ...props }: ToolbarButtonProps): import('react').JSX.Element;
2
+ export interface TextColorButtonProps extends ToolbarButtonProps {
3
+ /**
4
+ * Classes for the element around the button and its colour input
5
+ * (`data-slot="rich-text-field-text-color"`), merged last. `className` lands on the button.
6
+ */
7
+ wrapperClassName?: string;
8
+ }
9
+ /**
10
+ * Toolbar button that opens the browser's colour picker and applies the colour to the selected
11
+ * text; its icon takes the colour at the caret. Works only inside a `RichTextField` toolbar.
12
+ */
13
+ export declare function TextColorButton({ wrapperClassName, ...props }: TextColorButtonProps): import('react').JSX.Element;
3
14
  //# sourceMappingURL=text-color-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-color-button.d.ts","sourceRoot":"","sources":["../../../../src/components/rich-text-field/components/text-color-button.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,wBAAgB,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BA+B/D"}
1
+ {"version":3,"file":"text-color-button.d.ts","sourceRoot":"","sources":["../../../../src/components/rich-text-field/components/text-color-button.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,gBAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAgCnF"}
@@ -1,17 +1,39 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { RichTextAreaProps } from '../rich-text-area';
3
+ /** Where the formatting toolbar sits inside the field: above or below the text. */
3
4
  export type RichTextFieldToolbarPlacement = 'top' | 'bottom';
4
5
  export interface RichTextFieldProps extends Omit<RichTextAreaProps, 'children'> {
6
+ /** Accepted for type compatibility with `RichTextArea` but not rendered; use `toolbarChildren`. */
5
7
  children?: ReactNode;
8
+ /**
9
+ * Puts the toolbar above or below the text. The text padding and the placeholder offset follow
10
+ * it, and the root carries it as `data-toolbar-placement`.
11
+ * @default 'top'
12
+ */
6
13
  toolbarPlacement?: RichTextFieldToolbarPlacement;
14
+ /** Classes for the toolbar (`data-slot="rich-text-field-toolbar"`), merged last. */
7
15
  toolbarClassName?: string;
16
+ /**
17
+ * Replaces the default toolbar controls. Receives `{ hasAttachments }` (the `enableAttachments`
18
+ * value) and returns the toolbar content, built from the exported buttons and selects.
19
+ */
8
20
  toolbarChildren?: ({ hasAttachments }: {
9
21
  hasAttachments: boolean;
10
22
  }) => ReactNode;
23
+ /** Lets the file picker select several files; `onFileAttach` gets only the first otherwise. */
11
24
  isMultipleAttachments?: boolean;
25
+ /** Enables the attachment button of the default toolbar; it is shown disabled otherwise. */
12
26
  enableAttachments?: boolean;
27
+ /** File types the picker accepts, as extensions or MIME types (`['.pdf', 'image/*']`). */
13
28
  acceptedFiles?: string[];
29
+ /** Called with the picked files after the attachment button opens the file picker. */
14
30
  onFileAttach?: (files: File[]) => void;
15
31
  }
32
+ /**
33
+ * A fixed-height rich-text editor with a formatting toolbar above or below the text, built on
34
+ * `RichTextArea`. `className` styles the editable text, `containerClassName` the root
35
+ * (`data-slot="rich-text-field"`), `placeholderClassName` the placeholder and `toolbarClassName`
36
+ * the toolbar; each is merged last.
37
+ */
16
38
  export declare const RichTextField: import('react').ForwardRefExoticComponent<RichTextFieldProps & import('react').RefAttributes<HTMLInputElement>>;
17
39
  //# sourceMappingURL=rich-text-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-field.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-field/rich-text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAInD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAMzE,MAAM,MAAM,6BAA6B,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC7E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;IACjD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAC;IACjF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,aAAa,iHAmEzB,CAAC"}
1
+ {"version":3,"file":"rich-text-field.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-field/rich-text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAInD,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAMzE,mFAAmF;AACnF,MAAM,MAAM,6BAA6B,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC;IAC7E,mGAAmG;IACnG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,6BAA6B,CAAC;IACjD,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,EAAE,cAAc,EAAE,EAAE;QAAE,cAAc,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAC;IACjF,+FAA+F;IAC/F,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,4FAA4F;IAC5F,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;CACxC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,iHAoEzB,CAAC"}
@@ -1,10 +1,37 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
- import { RichTextField } from './rich-text-field';
2
+ import { RichTextField, RichTextFieldProps } from './rich-text-field';
3
3
  declare const meta: Meta<typeof RichTextField>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof RichTextField>;
6
+ /** An email reply with the full toolbar above the text, and the Markdown it is stored as underneath. */
6
7
  export declare const Default: Story;
8
+ /** A new reply: the placeholder says what to write and sits below the toolbar. */
7
9
  export declare const Empty: Story;
10
+ /** The reply while it is being sent: the text is dimmed and can't be edited. */
8
11
  export declare const Disabled: Story;
12
+ /** The toolbar under the text, for a reply written below the message it answers. */
9
13
  export declare const ToolbarBottom: Story;
14
+ /** A calendar event description with only the controls its HTML keeps: no typeface, size, link, attachment or image. */
15
+ export declare const CustomToolbar: Story;
16
+ /** An email body that takes several documents: the attachment button is enabled and the picker is limited to document types. */
17
+ export declare const WithAttachments: Story;
18
+ /** Typing fills the reply and reports it as Markdown; the bold shortcut formats the next words and lights the bold button. */
19
+ export declare const EmptyTypeAndFormat: Story;
20
+ /** A disabled field marks itself disabled and its text can't be edited or reached with Tab. */
21
+ export declare const DisabledIsReadOnly: Story;
22
+ /** The toolbar placement is on the root, and the toolbar follows the text in the bottom layout. */
23
+ export declare const ToolbarBottomPlacement: Story;
24
+ /** A custom toolbar renders only the controls it was given. */
25
+ export declare const CustomToolbarControls: Story;
26
+ /** Picking documents hands every file to `onFileAttach`, and the picker is limited to the accepted types. */
27
+ export declare const WithAttachmentsPickFiles: Story;
28
+ /** The field in each place it's used: a reply composer, a form section and a dialog body. */
29
+ export declare const Examples: Story;
30
+ type PlaygroundToolbar = 'Default' | 'Formatting only' | 'Every control';
31
+ interface RichTextFieldPlaygroundProps extends Omit<RichTextFieldProps, 'toolbarChildren'> {
32
+ toolbar: PlaygroundToolbar;
33
+ }
34
+ declare function RichTextFieldPlayground({ toolbar, ...rest }: RichTextFieldPlaygroundProps): import('react').JSX.Element;
35
+ /** Every toolbar control at once, including a custom `ToolbarButton`, with each prop of the field on the Controls panel. */
36
+ export declare const Playground: StoryObj<typeof RichTextFieldPlayground>;
10
37
  //# sourceMappingURL=rich-text-field.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-field.stories.d.ts","sourceRoot":"","sources":["../../../src/components/rich-text-field/rich-text-field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,aAAa,CA4HpC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,aAAa,CAAC,CAAC;AAW5C,eAAO,MAAM,OAAO,EAAE,KA2BrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE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AAK,iBAAiB,GAAG,SAAS,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAqCzE,UAAU,4BAA6B,SAAQ,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IACxF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,iBAAS,uBAAuB,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,4BAA4B,+BAElF;AAED,4HAA4H;AAC5H,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,uBAAuB,CA+B/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { TopMenu, TopMenuActions, type TopMenuActionsProps, type TopMenuProps } from './topmenu';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/topmenu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { ComponentProps } from 'react';
3
+ declare const topMenuActionsVariants: (props?: ({
4
+ size?: "lg" | "md" | null | undefined;
5
+ hasBorder?: boolean | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface TopMenuProps extends ComponentProps<'div'> {
8
+ }
9
+ /**
10
+ * The root of a trailing action cluster. Positions itself at the top right of the nearest
11
+ * positioned ancestor and stacks its `TopMenuActions` panels, aligned to the trailing edge.
12
+ */
13
+ export declare function TopMenu({ className, children, ...rest }: TopMenuProps): import('react').JSX.Element;
14
+ export interface TopMenuActionsProps extends ComponentProps<'div'>, VariantProps<typeof topMenuActionsVariants> {
15
+ }
16
+ /**
17
+ * One panel of icon actions inside `TopMenu`: the frosted 48px header panel at `lg` (the default),
18
+ * the compact overlay-tools pill at `md`. `hasBorder` only applies to `lg`.
19
+ */
20
+ export declare function TopMenuActions({ className, size, hasBorder, children, ...rest }: TopMenuActionsProps): import('react').JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=topmenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topmenu.d.ts","sourceRoot":"","sources":["../../../src/components/topmenu/topmenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,QAAA,MAAM,sBAAsB;;;8EAoB1B,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,KAAK,CAAC;CAAG;AAE9D;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,+BAWrE;AAED,MAAM,WAAW,mBACf,SAAQ,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC;CAAG;AAE/E;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,mBAAmB,+BAWrB"}
@@ -0,0 +1,31 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { TopMenu } from './topmenu';
3
+ declare const meta: Meta<typeof TopMenu>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TopMenu>;
6
+ /** The compact `md` pill floating over the chat: wallet and notifications, with unread notifications. */
7
+ export declare const Default: Story;
8
+ /** The `lg` frosted panel as the chat header's main trailing cluster: view mode, wallet, download and notifications. */
9
+ export declare const Large: Story;
10
+ /** The `lg` panel with its border turned off, as the chat header does when a chat background image is showing. */
11
+ export declare const LargeWithoutBorder: Story;
12
+ /** Action states in the header: the wallet panel is open (active, label flips to close) and download is disabled on a new, empty chat. */
13
+ export declare const WithActiveAndDisabledActions: Story;
14
+ /** The top menu in each place it's allowed: the corner of a page, the chat header and a toolbar row. */
15
+ export declare const Examples: Story;
16
+ /** A panel without a `size` is the `lg` header panel, and its actions are found by name inside the labelled group. */
17
+ export declare const LargeByDefault: Story;
18
+ /** Tab walks the header actions in order, skips the disabled one, and shows each action's tooltip on focus. */
19
+ export declare const WithActiveAndDisabledActionsKeyboard: Story;
20
+ interface TopMenuPlaygroundProps {
21
+ className: string;
22
+ 'aria-label': string;
23
+ size: 'md' | 'lg';
24
+ actionCount: number;
25
+ hasBorder: boolean;
26
+ onAction: (id: string) => void;
27
+ }
28
+ declare function TopMenuPlayground({ className, 'aria-label': ariaLabel, size, actionCount, hasBorder, onAction, }: TopMenuPlaygroundProps): import('react').JSX.Element;
29
+ /** The full chat header cluster, with the panel's size, border and action count on the Controls panel. */
30
+ export declare const Playground: StoryObj<typeof TopMenuPlayground>;
31
+ //# sourceMappingURL=topmenu.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topmenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/topmenu/topmenu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAmB5D,OAAO,EAAE,OAAO,EAAkB,MAAM,WAAW,CAAC;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CA0B9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAqCtC,yGAAyG;AACzG,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,wHAAwH;AACxH,eAAO,MAAM,KAAK,EAAE,KAanB,CAAC;AAEF,kHAAkH;AAClH,eAAO,MAAM,kBAAkB,EAAE,KAWhC,CAAC;AAEF,0IAA0I;AAC1I,eAAO,MAAM,4BAA4B,EAAE,KAY1C,CAAC;AAEF,wGAAwG;AACxG,eAAO,MAAM,QAAQ,EAAE,KA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AAC;CAC5B;AAED,KAAK,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErC,UAAU,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAiND,UAAU,eAAe;IACvB,0DAA0D;IAC1D,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,2FAA2F;IAC3F,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,iBAAS,UAAU,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,eAAe,+BA4GlE;AAkHD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA+BjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,KAkBnB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, Ref } from 'react';
2
2
  export interface ChatComposerProps {
3
3
  draft: string;
4
4
  onDraftChange: (value: string) => void;
@@ -7,10 +7,12 @@ export interface ChatComposerProps {
7
7
  /** While a reply is in progress: sending is disabled, or replaced by Stop when `onStop` is given */
8
8
  isBusy: boolean;
9
9
  onStop?: () => void;
10
+ /** The editable element, e.g. to return focus to it after a suggestion is sent */
11
+ inputRef?: Ref<HTMLDivElement>;
10
12
  className?: string;
11
13
  }
12
- /** The message input with its send button, which becomes Stop while busy when `onStop` is given. */
13
- export declare function ChatComposer({ draft, onDraftChange, onSend, placeholder, isBusy, onStop, className, }: ChatComposerProps): import('react').JSX.Element;
14
+ /** The prompt box with its send button, which becomes Stop while busy when `onStop` is given. */
15
+ export declare function ChatComposer({ draft, onDraftChange, onSend, placeholder, isBusy, onStop, inputRef, className, }: ChatComposerProps): import('react').JSX.Element;
14
16
  export interface ChatPanelFrameProps extends Omit<ChatComposerProps, 'className'> {
15
17
  /** Shown in the panel header */
16
18
  title: string;
@@ -26,8 +28,8 @@ export interface ChatPanelFrameProps extends Omit<ChatComposerProps, 'className'
26
28
  }
27
29
  /**
28
30
  * The right-hand side panel the Chatbot docs stories share: a CanvasShell with a header (full screen, close),
29
- * the conversation, and a footer with the message input and its send button. It fills its parent, so give
31
+ * the conversation, and a footer with the prompt box and its send button. It fills its parent, so give
30
32
  * the story a sized parent.
31
33
  */
32
- export declare function ChatPanelFrame({ title, label, openLabel, children, footerTop, draft, onDraftChange, onSend, placeholder, isBusy, onStop, onClose, }: ChatPanelFrameProps): import('react').JSX.Element;
34
+ export declare function ChatPanelFrame({ title, label, openLabel, children, footerTop, draft, onDraftChange, onSend, placeholder, isBusy, onStop, inputRef, onClose, }: ChatPanelFrameProps): import('react').JSX.Element;
33
35
  //# sourceMappingURL=chat-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-panel.d.ts","sourceRoot":"","sources":["../../src/docs/chat-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBjD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,oGAAoG;IACpG,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oGAAoG;AACpG,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,aAAa,EACb,MAAM,EACN,WAAW,EACX,MAAM,EACN,MAAM,EACN,SAAS,GACV,EAAE,iBAAiB,+BA2CnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,iBAAiB,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 {"version":3,"file":"chatbot-panel.d.ts","sourceRoot":"","sources":["../../src/docs/chatbot-panel.tsx"],"names":[],"mappings":"AA6CA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAMzC,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,mFAAmF;IACnF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,QAAQ,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAID,eAAO,MAAM,OAAO,EAAE,IAAI,EAkCzB,CAAC;AAEF,eAAO,MAAM,WAAW,UAIvB,CAAC;AA+EF,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,YAAY,EAAE,IAAI,EAAE,CAAC;IACrB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,EAAE,iBAAiB,+BA2HzF"}
@@ -1 +1 @@
1
- {"version":3,"file":"chatbot.stories.d.ts","sourceRoot":"","sources":["../../src/docs/chatbot.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAI5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAkCnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}
1
+ {"version":3,"file":"chatbot.stories.d.ts","sourceRoot":"","sources":["../../src/docs/chatbot.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAI5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAiCnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC"}