@carbon/ai-chat-components 1.8.0-rc.0 → 1.9.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/custom-elements.json +15967 -10853
  2. package/es/components/audio-player/src/audio-player.js +0 -1
  3. package/es/components/audio-player/src/audio-player.js.map +1 -1
  4. package/es/components/audio-player/src/providers/base-provider.js +0 -1
  5. package/es/components/audio-player/src/providers/base-provider.js.map +1 -1
  6. package/es/components/audio-player/src/providers/native-audio-provider.js +0 -1
  7. package/es/components/audio-player/src/providers/native-audio-provider.js.map +1 -1
  8. package/es/components/audio-player/src/providers/soundcloud-provider.js +0 -1
  9. package/es/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
  10. package/es/components/audio-player/src/transcript.js +1 -1
  11. package/es/components/audio-player/src/transcript.js.map +1 -1
  12. package/es/components/audio-player/src/utils/url-detector.js +0 -1
  13. package/es/components/audio-player/src/utils/url-detector.js.map +1 -1
  14. package/es/components/autocomplete/index.d.ts +15 -0
  15. package/es/components/autocomplete/index.js +11 -0
  16. package/es/components/autocomplete/index.js.map +1 -0
  17. package/es/components/autocomplete/src/autocomplete-item-group.d.ts +44 -0
  18. package/es/components/autocomplete/src/autocomplete-item-group.js +139 -0
  19. package/es/components/autocomplete/src/autocomplete-item-group.js.map +1 -0
  20. package/es/components/autocomplete/src/autocomplete-item-group.scss.js +13 -0
  21. package/es/components/autocomplete/src/autocomplete-item-group.scss.js.map +1 -0
  22. package/es/components/autocomplete/src/autocomplete-item.d.ts +54 -0
  23. package/es/components/autocomplete/src/autocomplete-item.js +197 -0
  24. package/es/components/autocomplete/src/autocomplete-item.js.map +1 -0
  25. package/es/components/autocomplete/src/autocomplete-item.scss.js +13 -0
  26. package/es/components/autocomplete/src/autocomplete-item.scss.js.map +1 -0
  27. package/es/components/autocomplete/src/autocomplete.d.ts +97 -0
  28. package/es/components/autocomplete/src/autocomplete.js +321 -0
  29. package/es/components/autocomplete/src/autocomplete.js.map +1 -0
  30. package/es/components/autocomplete/src/autocomplete.scss.js +13 -0
  31. package/es/components/autocomplete/src/autocomplete.scss.js.map +1 -0
  32. package/es/components/card/src/card.scss.js +1 -1
  33. package/es/components/chat-history/src/chat-history.scss.js +1 -1
  34. package/es/components/chat-shell/src/chat-header.js +0 -1
  35. package/es/components/chat-shell/src/chat-header.js.map +1 -1
  36. package/es/components/chat-shell/src/corner-manager.d.ts +1 -1
  37. package/es/components/chat-shell/src/corner-manager.js +1 -2
  38. package/es/components/chat-shell/src/corner-manager.js.map +1 -1
  39. package/es/components/chat-shell/src/initialization-manager.d.ts +1 -1
  40. package/es/components/chat-shell/src/initialization-manager.js +1 -2
  41. package/es/components/chat-shell/src/initialization-manager.js.map +1 -1
  42. package/es/components/chat-shell/src/resize-observer-manager.js +0 -1
  43. package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -1
  44. package/es/components/chat-shell/src/shell.js +2 -2
  45. package/es/components/chat-shell/src/shell.js.map +1 -1
  46. package/es/components/chat-shell/src/slot-observer.d.ts +1 -1
  47. package/es/components/chat-shell/src/slot-observer.js +1 -2
  48. package/es/components/chat-shell/src/slot-observer.js.map +1 -1
  49. package/es/components/chat-shell/src/workspace-manager-utils.d.ts +1 -1
  50. package/es/components/chat-shell/src/workspace-manager-utils.js +1 -2
  51. package/es/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
  52. package/es/components/chat-shell/src/workspace-manager.d.ts +1 -1
  53. package/es/components/chat-shell/src/workspace-manager.js +1 -2
  54. package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
  55. package/es/components/code-snippet/src/code-snippet.d.ts +11 -0
  56. package/es/components/code-snippet/src/code-snippet.js +37 -5
  57. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  58. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  59. package/es/components/code-snippet/src/codemirror/theme.js +5 -0
  60. package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
  61. package/es/components/code-snippet/src/layout-utils.js +21 -8
  62. package/es/components/code-snippet/src/layout-utils.js.map +1 -1
  63. package/es/components/feedback/src/feedback.js +1 -0
  64. package/es/components/feedback/src/feedback.js.map +1 -1
  65. package/es/components/feedback/src/feedback.scss.js +1 -1
  66. package/es/components/file-uploads/index.d.ts +12 -0
  67. package/es/components/file-uploads/index.js +10 -0
  68. package/es/components/file-uploads/index.js.map +1 -0
  69. package/es/components/file-uploads/src/file-upload-item.d.ts +43 -0
  70. package/es/components/file-uploads/src/file-upload-item.js +267 -0
  71. package/es/components/file-uploads/src/file-upload-item.js.map +1 -0
  72. package/es/components/file-uploads/src/file-upload-item.scss.js +13 -0
  73. package/es/components/file-uploads/src/file-upload-item.scss.js.map +1 -0
  74. package/es/components/file-uploads/src/file-uploads.d.ts +87 -0
  75. package/es/components/file-uploads/src/file-uploads.js +213 -0
  76. package/es/components/file-uploads/src/file-uploads.js.map +1 -0
  77. package/es/components/file-uploads/src/file-uploads.scss.js +13 -0
  78. package/es/components/file-uploads/src/file-uploads.scss.js.map +1 -0
  79. package/es/components/markdown/index.d.ts +1 -0
  80. package/es/components/markdown/index.js +1 -0
  81. package/es/components/markdown/index.js.map +1 -1
  82. package/es/components/markdown/src/markdown-token-tree.d.ts +8 -0
  83. package/es/components/markdown/src/markdown-token-tree.js +12 -1
  84. package/es/components/markdown/src/markdown-token-tree.js.map +1 -1
  85. package/es/components/markdown/src/markdown.js +4 -0
  86. package/es/components/markdown/src/markdown.js.map +1 -1
  87. package/es/components/markdown/src/markdown.scss.js +1 -1
  88. package/es/components/prompt-line/index.d.ts +26 -0
  89. package/es/components/prompt-line/index.js +32 -0
  90. package/es/components/prompt-line/index.js.map +1 -0
  91. package/es/components/prompt-line/src/autocomplete-controller.d.ts +178 -0
  92. package/es/components/prompt-line/src/autocomplete-controller.js +548 -0
  93. package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -0
  94. package/es/components/prompt-line/src/error-message.d.ts +50 -0
  95. package/es/components/prompt-line/src/error-message.js +144 -0
  96. package/es/components/prompt-line/src/error-message.js.map +1 -0
  97. package/es/components/prompt-line/src/error-message.scss.js +13 -0
  98. package/es/components/prompt-line/src/error-message.scss.js.map +1 -0
  99. package/es/components/prompt-line/src/prompt-line-constants.d.ts +17 -0
  100. package/es/components/prompt-line/src/prompt-line-constants.js +27 -0
  101. package/es/components/prompt-line/src/prompt-line-constants.js.map +1 -0
  102. package/es/components/prompt-line/src/prompt-line-controller.d.ts +155 -0
  103. package/es/components/prompt-line/src/prompt-line-controller.js +394 -0
  104. package/es/components/prompt-line/src/prompt-line-controller.js.map +1 -0
  105. package/es/components/prompt-line/src/prompt-line-rich-loader.d.ts +34 -0
  106. package/es/components/prompt-line/src/prompt-line-rich-loader.js +51 -0
  107. package/es/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -0
  108. package/es/components/prompt-line/src/prompt-line-rich-runtime.d.ts +14 -0
  109. package/es/components/prompt-line/src/prompt-line-rich-runtime.js +340 -0
  110. package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -0
  111. package/es/components/prompt-line/src/prompt-line-shell.d.ts +72 -0
  112. package/es/components/prompt-line/src/prompt-line-shell.js +227 -0
  113. package/es/components/prompt-line/src/prompt-line-shell.js.map +1 -0
  114. package/es/components/prompt-line/src/prompt-line-shell.scss.js +13 -0
  115. package/es/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -0
  116. package/es/components/prompt-line/src/prompt-line.d.ts +147 -0
  117. package/es/components/prompt-line/src/prompt-line.js +391 -0
  118. package/es/components/prompt-line/src/prompt-line.js.map +1 -0
  119. package/es/components/prompt-line/src/prompt-line.scss.js +13 -0
  120. package/es/components/prompt-line/src/prompt-line.scss.js.map +1 -0
  121. package/es/components/prompt-line/src/send-control.d.ts +46 -0
  122. package/es/components/prompt-line/src/send-control.js +138 -0
  123. package/es/components/prompt-line/src/send-control.js.map +1 -0
  124. package/es/components/prompt-line/src/send-control.scss.js +13 -0
  125. package/es/components/prompt-line/src/send-control.scss.js.map +1 -0
  126. package/es/components/prompt-line/src/stop-streaming-button.d.ts +42 -0
  127. package/es/components/prompt-line/src/stop-streaming-button.js +93 -0
  128. package/es/components/prompt-line/src/stop-streaming-button.js.map +1 -0
  129. package/es/components/prompt-line/src/stop-streaming-button.scss.js +13 -0
  130. package/es/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -0
  131. package/es/components/prompt-line/src/tiptap/build-extensions.d.ts +30 -0
  132. package/es/components/prompt-line/src/tiptap/build-extensions.js +38 -0
  133. package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -0
  134. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +21 -0
  135. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js +127 -0
  136. package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -0
  137. package/es/components/prompt-line/src/tiptap/carbon-mention.d.ts +19 -0
  138. package/es/components/prompt-line/src/tiptap/carbon-mention.js +237 -0
  139. package/es/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -0
  140. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +22 -0
  141. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +64 -0
  142. package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -0
  143. package/es/components/prompt-line/src/tiptap/chat-enter.d.ts +17 -0
  144. package/es/components/prompt-line/src/tiptap/chat-enter.js +46 -0
  145. package/es/components/prompt-line/src/tiptap/chat-enter.js.map +1 -0
  146. package/es/components/prompt-line/src/tiptap/editor-styles.d.ts +18 -0
  147. package/es/components/prompt-line/src/tiptap/editor-styles.js +83 -0
  148. package/es/components/prompt-line/src/tiptap/editor-styles.js.map +1 -0
  149. package/es/components/prompt-line/src/tiptap/index.d.ts +42 -0
  150. package/es/components/prompt-line/src/tiptap/index.js +43 -0
  151. package/es/components/prompt-line/src/tiptap/index.js.map +1 -0
  152. package/es/components/prompt-line/src/tiptap/json-utils.d.ts +61 -0
  153. package/es/components/prompt-line/src/tiptap/json-utils.js +158 -0
  154. package/es/components/prompt-line/src/tiptap/json-utils.js.map +1 -0
  155. package/es/components/prompt-line/src/tiptap/keymap.d.ts +31 -0
  156. package/es/components/prompt-line/src/tiptap/keymap.js +59 -0
  157. package/es/components/prompt-line/src/tiptap/keymap.js.map +1 -0
  158. package/es/components/prompt-line/src/tiptap/origin-meta.d.ts +11 -0
  159. package/es/components/prompt-line/src/tiptap/origin-meta.js +33 -0
  160. package/es/components/prompt-line/src/tiptap/origin-meta.js.map +1 -0
  161. package/es/components/prompt-line/src/tiptap/plain-text-paste.d.ts +16 -0
  162. package/es/components/prompt-line/src/tiptap/plain-text-paste.js +85 -0
  163. package/es/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -0
  164. package/es/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +87 -0
  165. package/es/components/prompt-line/src/tiptap/render-in-light-dom.js +41 -0
  166. package/es/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -0
  167. package/es/components/prompt-line/src/tiptap/render-token-chip.d.ts +57 -0
  168. package/es/components/prompt-line/src/tiptap/render-token-chip.js +95 -0
  169. package/es/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -0
  170. package/es/components/prompt-line/src/tiptap/token-node-view.d.ts +36 -0
  171. package/es/components/prompt-line/src/tiptap/token-node-view.js +41 -0
  172. package/es/components/prompt-line/src/tiptap/token-node-view.js.map +1 -0
  173. package/es/components/prompt-line/src/tiptap/trigger-utils.d.ts +30 -0
  174. package/es/components/prompt-line/src/tiptap/trigger-utils.js +44 -0
  175. package/es/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -0
  176. package/es/components/prompt-line/src/tiptap/types.d.ts +161 -0
  177. package/es/components/prompt-line/src/tiptap/types.js +8 -0
  178. package/es/components/prompt-line/src/tiptap/types.js.map +1 -0
  179. package/es/components/prompt-line/src/tiptap/typing-indicator.d.ts +30 -0
  180. package/es/components/prompt-line/src/tiptap/typing-indicator.js +104 -0
  181. package/es/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -0
  182. package/es/components/prompt-line/src/tiptap/value-sync.d.ts +25 -0
  183. package/es/components/prompt-line/src/tiptap/value-sync.js +65 -0
  184. package/es/components/prompt-line/src/tiptap/value-sync.js.map +1 -0
  185. package/es/components/prompt-line/src/types.d.ts +100 -0
  186. package/es/components/prompt-line/src/types.js +50 -0
  187. package/es/components/prompt-line/src/types.js.map +1 -0
  188. package/es/components/shared/media-utils/script-loader.js +0 -1
  189. package/es/components/shared/media-utils/script-loader.js.map +1 -1
  190. package/es/components/video-player/src/providers/base-provider.js +0 -1
  191. package/es/components/video-player/src/providers/base-provider.js.map +1 -1
  192. package/es/components/video-player/src/providers/kaltura-provider.js +0 -1
  193. package/es/components/video-player/src/providers/kaltura-provider.js.map +1 -1
  194. package/es/components/video-player/src/providers/native-video-provider.js +0 -1
  195. package/es/components/video-player/src/providers/native-video-provider.js.map +1 -1
  196. package/es/components/video-player/src/providers/vimeo-provider.js +0 -1
  197. package/es/components/video-player/src/providers/vimeo-provider.js.map +1 -1
  198. package/es/components/video-player/src/providers/youtube-provider.js +0 -1
  199. package/es/components/video-player/src/providers/youtube-provider.js.map +1 -1
  200. package/es/components/video-player/src/utils/url-detector.js +0 -1
  201. package/es/components/video-player/src/utils/url-detector.js.map +1 -1
  202. package/es/components/video-player/src/video-player.js +0 -1
  203. package/es/components/video-player/src/video-player.js.map +1 -1
  204. package/es/components/workspace-shell/src/header-collapsible-manager.js +0 -1
  205. package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -1
  206. package/es/globals/utils/aria-announcer-manager.d.ts +62 -0
  207. package/es/globals/utils/aria-announcer-manager.js +125 -0
  208. package/es/globals/utils/aria-announcer-manager.js.map +1 -0
  209. package/es/globals/utils/browser-utils.d.ts +10 -0
  210. package/es/globals/utils/browser-utils.js +37 -0
  211. package/es/globals/utils/browser-utils.js.map +1 -0
  212. package/es/globals/utils/dom-utils.d.ts +6 -0
  213. package/es/globals/utils/dom-utils.js +39 -0
  214. package/es/globals/utils/dom-utils.js.map +1 -0
  215. package/{es-custom/react → es/globals}/utils/iconTransform.js +1 -2
  216. package/es/globals/utils/iconTransform.js.map +1 -0
  217. package/es/react/__tests__/jest.setup.js +1 -2
  218. package/es/react/__tests__/jest.setup.js.map +1 -1
  219. package/es/react/audio-player.js +0 -1
  220. package/es/react/audio-player.js.map +1 -1
  221. package/es/react/autocomplete.d.ts +11 -0
  222. package/es/react/autocomplete.js +36 -0
  223. package/es/react/autocomplete.js.map +1 -0
  224. package/es/react/chat-header.js +1 -1
  225. package/es/react/code-snippet.js +1 -1
  226. package/es/react/error-message.d.ts +11 -0
  227. package/es/react/error-message.js +28 -0
  228. package/es/react/error-message.js.map +1 -0
  229. package/es/react/file-uploads.d.ts +11 -0
  230. package/es/react/file-uploads.js +31 -0
  231. package/es/react/file-uploads.js.map +1 -0
  232. package/es/react/hooks/useChatAutocomplete.d.ts +41 -0
  233. package/es/react/hooks/useChatAutocomplete.js +178 -0
  234. package/es/react/hooks/useChatAutocomplete.js.map +1 -0
  235. package/es/react/input-send-control.d.ts +11 -0
  236. package/es/react/input-send-control.js +32 -0
  237. package/es/react/input-send-control.js.map +1 -0
  238. package/es/react/prompt-line-shell.d.ts +18 -0
  239. package/es/react/prompt-line-shell.js +36 -0
  240. package/es/react/prompt-line-shell.js.map +1 -0
  241. package/es/react/prompt-line.d.ts +25 -0
  242. package/es/react/prompt-line.js +52 -0
  243. package/es/react/prompt-line.js.map +1 -0
  244. package/es/react/stop-streaming-button.d.ts +11 -0
  245. package/es/react/stop-streaming-button.js +28 -0
  246. package/es/react/stop-streaming-button.js.map +1 -0
  247. package/es/react/toolbar.js +1 -1
  248. package/es/react/transcript.js +0 -1
  249. package/es/react/transcript.js.map +1 -1
  250. package/es/react/utils/transformSuggestionConfig.d.ts +21 -0
  251. package/es/react/utils/transformSuggestionConfig.js +67 -0
  252. package/es/react/utils/transformSuggestionConfig.js.map +1 -0
  253. package/es/react/video-player.js +0 -1
  254. package/es/react/video-player.js.map +1 -1
  255. package/es/testing/PageObjectId.js +1 -2
  256. package/es/testing/PageObjectId.js.map +1 -1
  257. package/es-custom/components/audio-player/src/audio-player.js +0 -1
  258. package/es-custom/components/audio-player/src/audio-player.js.map +1 -1
  259. package/es-custom/components/audio-player/src/providers/base-provider.js +0 -1
  260. package/es-custom/components/audio-player/src/providers/base-provider.js.map +1 -1
  261. package/es-custom/components/audio-player/src/providers/native-audio-provider.js +0 -1
  262. package/es-custom/components/audio-player/src/providers/native-audio-provider.js.map +1 -1
  263. package/es-custom/components/audio-player/src/providers/soundcloud-provider.js +0 -1
  264. package/es-custom/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
  265. package/es-custom/components/audio-player/src/transcript.js +1 -1
  266. package/es-custom/components/audio-player/src/transcript.js.map +1 -1
  267. package/es-custom/components/audio-player/src/utils/url-detector.js +0 -1
  268. package/es-custom/components/audio-player/src/utils/url-detector.js.map +1 -1
  269. package/es-custom/components/autocomplete/index.d.ts +15 -0
  270. package/es-custom/components/autocomplete/index.js +11 -0
  271. package/es-custom/components/autocomplete/index.js.map +1 -0
  272. package/es-custom/components/autocomplete/src/autocomplete-item-group.d.ts +44 -0
  273. package/es-custom/components/autocomplete/src/autocomplete-item-group.js +139 -0
  274. package/es-custom/components/autocomplete/src/autocomplete-item-group.js.map +1 -0
  275. package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js +13 -0
  276. package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js.map +1 -0
  277. package/es-custom/components/autocomplete/src/autocomplete-item.d.ts +54 -0
  278. package/es-custom/components/autocomplete/src/autocomplete-item.js +197 -0
  279. package/es-custom/components/autocomplete/src/autocomplete-item.js.map +1 -0
  280. package/es-custom/components/autocomplete/src/autocomplete-item.scss.js +13 -0
  281. package/es-custom/components/autocomplete/src/autocomplete-item.scss.js.map +1 -0
  282. package/es-custom/components/autocomplete/src/autocomplete.d.ts +97 -0
  283. package/es-custom/components/autocomplete/src/autocomplete.js +321 -0
  284. package/es-custom/components/autocomplete/src/autocomplete.js.map +1 -0
  285. package/es-custom/components/autocomplete/src/autocomplete.scss.js +13 -0
  286. package/es-custom/components/autocomplete/src/autocomplete.scss.js.map +1 -0
  287. package/es-custom/components/card/src/card.scss.js +1 -1
  288. package/es-custom/components/chat-history/src/chat-history.scss.js +1 -1
  289. package/es-custom/components/chat-shell/src/chat-header.js +0 -1
  290. package/es-custom/components/chat-shell/src/chat-header.js.map +1 -1
  291. package/es-custom/components/chat-shell/src/corner-manager.d.ts +1 -1
  292. package/es-custom/components/chat-shell/src/corner-manager.js +1 -2
  293. package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -1
  294. package/es-custom/components/chat-shell/src/initialization-manager.d.ts +1 -1
  295. package/es-custom/components/chat-shell/src/initialization-manager.js +1 -2
  296. package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -1
  297. package/es-custom/components/chat-shell/src/resize-observer-manager.js +0 -1
  298. package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -1
  299. package/es-custom/components/chat-shell/src/shell.js +2 -2
  300. package/es-custom/components/chat-shell/src/shell.js.map +1 -1
  301. package/es-custom/components/chat-shell/src/slot-observer.d.ts +1 -1
  302. package/es-custom/components/chat-shell/src/slot-observer.js +1 -2
  303. package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -1
  304. package/es-custom/components/chat-shell/src/workspace-manager-utils.d.ts +1 -1
  305. package/es-custom/components/chat-shell/src/workspace-manager-utils.js +1 -2
  306. package/es-custom/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
  307. package/es-custom/components/chat-shell/src/workspace-manager.d.ts +1 -1
  308. package/es-custom/components/chat-shell/src/workspace-manager.js +1 -2
  309. package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
  310. package/es-custom/components/code-snippet/src/code-snippet.d.ts +11 -0
  311. package/es-custom/components/code-snippet/src/code-snippet.js +37 -5
  312. package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
  313. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  314. package/es-custom/components/code-snippet/src/codemirror/theme.js +5 -0
  315. package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
  316. package/es-custom/components/code-snippet/src/layout-utils.js +21 -8
  317. package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
  318. package/es-custom/components/feedback/src/feedback.js +1 -0
  319. package/es-custom/components/feedback/src/feedback.js.map +1 -1
  320. package/es-custom/components/feedback/src/feedback.scss.js +1 -1
  321. package/es-custom/components/file-uploads/index.d.ts +12 -0
  322. package/es-custom/components/file-uploads/index.js +10 -0
  323. package/es-custom/components/file-uploads/index.js.map +1 -0
  324. package/es-custom/components/file-uploads/src/file-upload-item.d.ts +43 -0
  325. package/es-custom/components/file-uploads/src/file-upload-item.js +267 -0
  326. package/es-custom/components/file-uploads/src/file-upload-item.js.map +1 -0
  327. package/es-custom/components/file-uploads/src/file-upload-item.scss.js +13 -0
  328. package/es-custom/components/file-uploads/src/file-upload-item.scss.js.map +1 -0
  329. package/es-custom/components/file-uploads/src/file-uploads.d.ts +87 -0
  330. package/es-custom/components/file-uploads/src/file-uploads.js +213 -0
  331. package/es-custom/components/file-uploads/src/file-uploads.js.map +1 -0
  332. package/es-custom/components/file-uploads/src/file-uploads.scss.js +13 -0
  333. package/es-custom/components/file-uploads/src/file-uploads.scss.js.map +1 -0
  334. package/es-custom/components/markdown/index.d.ts +1 -0
  335. package/es-custom/components/markdown/index.js +1 -0
  336. package/es-custom/components/markdown/index.js.map +1 -1
  337. package/es-custom/components/markdown/src/markdown-token-tree.d.ts +8 -0
  338. package/es-custom/components/markdown/src/markdown-token-tree.js +12 -1
  339. package/es-custom/components/markdown/src/markdown-token-tree.js.map +1 -1
  340. package/es-custom/components/markdown/src/markdown.js +4 -0
  341. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  342. package/es-custom/components/markdown/src/markdown.scss.js +1 -1
  343. package/es-custom/components/prompt-line/index.d.ts +26 -0
  344. package/es-custom/components/prompt-line/index.js +32 -0
  345. package/es-custom/components/prompt-line/index.js.map +1 -0
  346. package/es-custom/components/prompt-line/src/autocomplete-controller.d.ts +178 -0
  347. package/es-custom/components/prompt-line/src/autocomplete-controller.js +548 -0
  348. package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -0
  349. package/es-custom/components/prompt-line/src/error-message.d.ts +50 -0
  350. package/es-custom/components/prompt-line/src/error-message.js +144 -0
  351. package/es-custom/components/prompt-line/src/error-message.js.map +1 -0
  352. package/es-custom/components/prompt-line/src/error-message.scss.js +13 -0
  353. package/es-custom/components/prompt-line/src/error-message.scss.js.map +1 -0
  354. package/es-custom/components/prompt-line/src/prompt-line-constants.d.ts +17 -0
  355. package/es-custom/components/prompt-line/src/prompt-line-constants.js +27 -0
  356. package/es-custom/components/prompt-line/src/prompt-line-constants.js.map +1 -0
  357. package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +155 -0
  358. package/es-custom/components/prompt-line/src/prompt-line-controller.js +394 -0
  359. package/es-custom/components/prompt-line/src/prompt-line-controller.js.map +1 -0
  360. package/es-custom/components/prompt-line/src/prompt-line-rich-loader.d.ts +34 -0
  361. package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js +51 -0
  362. package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -0
  363. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.d.ts +14 -0
  364. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +340 -0
  365. package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -0
  366. package/es-custom/components/prompt-line/src/prompt-line-shell.d.ts +72 -0
  367. package/es-custom/components/prompt-line/src/prompt-line-shell.js +227 -0
  368. package/es-custom/components/prompt-line/src/prompt-line-shell.js.map +1 -0
  369. package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +13 -0
  370. package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -0
  371. package/es-custom/components/prompt-line/src/prompt-line.d.ts +147 -0
  372. package/es-custom/components/prompt-line/src/prompt-line.js +391 -0
  373. package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -0
  374. package/es-custom/components/prompt-line/src/prompt-line.scss.js +13 -0
  375. package/es-custom/components/prompt-line/src/prompt-line.scss.js.map +1 -0
  376. package/es-custom/components/prompt-line/src/send-control.d.ts +46 -0
  377. package/es-custom/components/prompt-line/src/send-control.js +138 -0
  378. package/es-custom/components/prompt-line/src/send-control.js.map +1 -0
  379. package/es-custom/components/prompt-line/src/send-control.scss.js +13 -0
  380. package/es-custom/components/prompt-line/src/send-control.scss.js.map +1 -0
  381. package/es-custom/components/prompt-line/src/stop-streaming-button.d.ts +42 -0
  382. package/es-custom/components/prompt-line/src/stop-streaming-button.js +93 -0
  383. package/es-custom/components/prompt-line/src/stop-streaming-button.js.map +1 -0
  384. package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js +13 -0
  385. package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -0
  386. package/es-custom/components/prompt-line/src/tiptap/build-extensions.d.ts +30 -0
  387. package/es-custom/components/prompt-line/src/tiptap/build-extensions.js +38 -0
  388. package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -0
  389. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +21 -0
  390. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js +127 -0
  391. package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -0
  392. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.d.ts +19 -0
  393. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +237 -0
  394. package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -0
  395. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +22 -0
  396. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +64 -0
  397. package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -0
  398. package/es-custom/components/prompt-line/src/tiptap/chat-enter.d.ts +17 -0
  399. package/es-custom/components/prompt-line/src/tiptap/chat-enter.js +46 -0
  400. package/es-custom/components/prompt-line/src/tiptap/chat-enter.js.map +1 -0
  401. package/es-custom/components/prompt-line/src/tiptap/editor-styles.d.ts +18 -0
  402. package/es-custom/components/prompt-line/src/tiptap/editor-styles.js +83 -0
  403. package/es-custom/components/prompt-line/src/tiptap/editor-styles.js.map +1 -0
  404. package/es-custom/components/prompt-line/src/tiptap/index.d.ts +42 -0
  405. package/es-custom/components/prompt-line/src/tiptap/index.js +43 -0
  406. package/es-custom/components/prompt-line/src/tiptap/index.js.map +1 -0
  407. package/es-custom/components/prompt-line/src/tiptap/json-utils.d.ts +61 -0
  408. package/es-custom/components/prompt-line/src/tiptap/json-utils.js +158 -0
  409. package/es-custom/components/prompt-line/src/tiptap/json-utils.js.map +1 -0
  410. package/es-custom/components/prompt-line/src/tiptap/keymap.d.ts +31 -0
  411. package/es-custom/components/prompt-line/src/tiptap/keymap.js +59 -0
  412. package/es-custom/components/prompt-line/src/tiptap/keymap.js.map +1 -0
  413. package/es-custom/components/prompt-line/src/tiptap/origin-meta.d.ts +11 -0
  414. package/es-custom/components/prompt-line/src/tiptap/origin-meta.js +33 -0
  415. package/es-custom/components/prompt-line/src/tiptap/origin-meta.js.map +1 -0
  416. package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.d.ts +16 -0
  417. package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js +85 -0
  418. package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -0
  419. package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +87 -0
  420. package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js +41 -0
  421. package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -0
  422. package/es-custom/components/prompt-line/src/tiptap/render-token-chip.d.ts +57 -0
  423. package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js +95 -0
  424. package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -0
  425. package/es-custom/components/prompt-line/src/tiptap/token-node-view.d.ts +36 -0
  426. package/es-custom/components/prompt-line/src/tiptap/token-node-view.js +41 -0
  427. package/es-custom/components/prompt-line/src/tiptap/token-node-view.js.map +1 -0
  428. package/es-custom/components/prompt-line/src/tiptap/trigger-utils.d.ts +30 -0
  429. package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js +44 -0
  430. package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -0
  431. package/es-custom/components/prompt-line/src/tiptap/types.d.ts +161 -0
  432. package/es-custom/components/prompt-line/src/tiptap/types.js +8 -0
  433. package/es-custom/components/prompt-line/src/tiptap/types.js.map +1 -0
  434. package/es-custom/components/prompt-line/src/tiptap/typing-indicator.d.ts +30 -0
  435. package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js +104 -0
  436. package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -0
  437. package/es-custom/components/prompt-line/src/tiptap/value-sync.d.ts +25 -0
  438. package/es-custom/components/prompt-line/src/tiptap/value-sync.js +65 -0
  439. package/es-custom/components/prompt-line/src/tiptap/value-sync.js.map +1 -0
  440. package/es-custom/components/prompt-line/src/types.d.ts +100 -0
  441. package/es-custom/components/prompt-line/src/types.js +50 -0
  442. package/es-custom/components/prompt-line/src/types.js.map +1 -0
  443. package/es-custom/components/shared/media-utils/script-loader.js +0 -1
  444. package/es-custom/components/shared/media-utils/script-loader.js.map +1 -1
  445. package/es-custom/components/video-player/src/providers/base-provider.js +0 -1
  446. package/es-custom/components/video-player/src/providers/base-provider.js.map +1 -1
  447. package/es-custom/components/video-player/src/providers/kaltura-provider.js +0 -1
  448. package/es-custom/components/video-player/src/providers/kaltura-provider.js.map +1 -1
  449. package/es-custom/components/video-player/src/providers/native-video-provider.js +0 -1
  450. package/es-custom/components/video-player/src/providers/native-video-provider.js.map +1 -1
  451. package/es-custom/components/video-player/src/providers/vimeo-provider.js +0 -1
  452. package/es-custom/components/video-player/src/providers/vimeo-provider.js.map +1 -1
  453. package/es-custom/components/video-player/src/providers/youtube-provider.js +0 -1
  454. package/es-custom/components/video-player/src/providers/youtube-provider.js.map +1 -1
  455. package/es-custom/components/video-player/src/utils/url-detector.js +0 -1
  456. package/es-custom/components/video-player/src/utils/url-detector.js.map +1 -1
  457. package/es-custom/components/video-player/src/video-player.js +0 -1
  458. package/es-custom/components/video-player/src/video-player.js.map +1 -1
  459. package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +0 -1
  460. package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -1
  461. package/es-custom/globals/utils/aria-announcer-manager.d.ts +62 -0
  462. package/es-custom/globals/utils/aria-announcer-manager.js +125 -0
  463. package/es-custom/globals/utils/aria-announcer-manager.js.map +1 -0
  464. package/es-custom/globals/utils/browser-utils.d.ts +10 -0
  465. package/es-custom/globals/utils/browser-utils.js +37 -0
  466. package/es-custom/globals/utils/browser-utils.js.map +1 -0
  467. package/es-custom/globals/utils/dom-utils.d.ts +6 -0
  468. package/es-custom/globals/utils/dom-utils.js +39 -0
  469. package/es-custom/globals/utils/dom-utils.js.map +1 -0
  470. package/{es/react → es-custom/globals}/utils/iconTransform.js +1 -2
  471. package/es-custom/globals/utils/iconTransform.js.map +1 -0
  472. package/es-custom/react/__tests__/jest.setup.js +1 -2
  473. package/es-custom/react/__tests__/jest.setup.js.map +1 -1
  474. package/es-custom/react/audio-player.js +0 -1
  475. package/es-custom/react/audio-player.js.map +1 -1
  476. package/es-custom/react/autocomplete.d.ts +11 -0
  477. package/es-custom/react/autocomplete.js +36 -0
  478. package/es-custom/react/autocomplete.js.map +1 -0
  479. package/es-custom/react/chat-header.js +1 -1
  480. package/es-custom/react/code-snippet.js +1 -1
  481. package/es-custom/react/error-message.d.ts +11 -0
  482. package/es-custom/react/error-message.js +28 -0
  483. package/es-custom/react/error-message.js.map +1 -0
  484. package/es-custom/react/file-uploads.d.ts +11 -0
  485. package/es-custom/react/file-uploads.js +31 -0
  486. package/es-custom/react/file-uploads.js.map +1 -0
  487. package/es-custom/react/hooks/useChatAutocomplete.d.ts +41 -0
  488. package/es-custom/react/hooks/useChatAutocomplete.js +178 -0
  489. package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -0
  490. package/es-custom/react/input-send-control.d.ts +11 -0
  491. package/es-custom/react/input-send-control.js +32 -0
  492. package/es-custom/react/input-send-control.js.map +1 -0
  493. package/es-custom/react/prompt-line-shell.d.ts +18 -0
  494. package/es-custom/react/prompt-line-shell.js +36 -0
  495. package/es-custom/react/prompt-line-shell.js.map +1 -0
  496. package/es-custom/react/prompt-line.d.ts +25 -0
  497. package/es-custom/react/prompt-line.js +52 -0
  498. package/es-custom/react/prompt-line.js.map +1 -0
  499. package/es-custom/react/stop-streaming-button.d.ts +11 -0
  500. package/es-custom/react/stop-streaming-button.js +28 -0
  501. package/es-custom/react/stop-streaming-button.js.map +1 -0
  502. package/es-custom/react/toolbar.js +1 -1
  503. package/es-custom/react/transcript.js +0 -1
  504. package/es-custom/react/transcript.js.map +1 -1
  505. package/es-custom/react/utils/transformSuggestionConfig.d.ts +21 -0
  506. package/es-custom/react/utils/transformSuggestionConfig.js +67 -0
  507. package/es-custom/react/utils/transformSuggestionConfig.js.map +1 -0
  508. package/es-custom/react/video-player.js +0 -1
  509. package/es-custom/react/video-player.js.map +1 -1
  510. package/es-custom/testing/PageObjectId.js +1 -2
  511. package/es-custom/testing/PageObjectId.js.map +1 -1
  512. package/package.json +24 -3
  513. package/scss/_custom-properties.scss +1 -3
  514. package/scss/_tokens-component.scss +1 -3
  515. package/scss/_tokens-layout.scss +1 -3
  516. package/scss/_utilities.scss +1 -3
  517. package/LICENSE +0 -201
  518. package/es/components/chat-shell/src/aria-announcer-manager.d.ts +0 -40
  519. package/es/components/chat-shell/src/aria-announcer-manager.js +0 -104
  520. package/es/components/chat-shell/src/aria-announcer-manager.js.map +0 -1
  521. package/es/react/utils/iconTransform.js.map +0 -1
  522. package/es-custom/components/chat-shell/src/aria-announcer-manager.d.ts +0 -40
  523. package/es-custom/components/chat-shell/src/aria-announcer-manager.js +0 -104
  524. package/es-custom/components/chat-shell/src/aria-announcer-manager.js.map +0 -1
  525. package/es-custom/react/utils/iconTransform.js.map +0 -1
  526. /package/es/{react → globals}/utils/iconTransform.d.ts +0 -0
  527. /package/es-custom/{react → globals}/utils/iconTransform.d.ts +0 -0
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import AutocompleteElement from '../components/autocomplete/src/autocomplete.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ // TODO: Icon transformation for suggestion items is handled upstream in prompt-line-shell.tsx.
22
+ // When icon rendering is added to the autocomplete web component, no additional
23
+ // React-side transformation is needed here.
24
+ const CDSAIChatAutocomplete = withWebComponentBridge(createComponent({
25
+ tagName: "cds-aichat-autocomplete",
26
+ elementClass: AutocompleteElement,
27
+ react: React,
28
+ events: {
29
+ onSelect: "cds-aichat-autocomplete-select",
30
+ onSend: "cds-aichat-autocomplete-send",
31
+ onDismiss: "cds-aichat-autocomplete-dismiss",
32
+ },
33
+ }));
34
+
35
+ export { CDSAIChatAutocomplete as default };
36
+ //# sourceMappingURL=autocomplete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete.js","sources":["../../src/react/autocomplete.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,sBAAsB,CAClD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,gCAAgC;AAC1C,QAAA,MAAM,EAAE,8BAA8B;AACtC,QAAA,SAAS,EAAE,iCAAiC;AAC7C,KAAA;AACF,CAAA,CAAC;;;;"}
@@ -10,7 +10,7 @@ import { createComponent } from '@lit/react';
10
10
  import React from 'react';
11
11
  import CdsAiChatChatHeader from '../components/chat-shell/src/chat-header.js';
12
12
  import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
13
- import { transformReactIconToCarbonIcon } from './utils/iconTransform.js';
13
+ import { transformReactIconToCarbonIcon } from '../globals/utils/iconTransform.js';
14
14
 
15
15
  // Base chat header component from @lit/react
16
16
  const BaseChatHeader = withWebComponentBridge(createComponent({
@@ -10,7 +10,7 @@ import { createComponent } from '@lit/react';
10
10
  import React from 'react';
11
11
  import CDSAIChatCodeSnippet from '../components/code-snippet/src/code-snippet.js';
12
12
  import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
13
- import { transformReactIconToCarbonIcon } from './utils/iconTransform.js';
13
+ import { transformReactIconToCarbonIcon } from '../globals/utils/iconTransform.js';
14
14
 
15
15
  // Base code snippet component from @lit/react
16
16
  const BaseCodeSnippet = withWebComponentBridge(createComponent({
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ declare const CDSAIChatErrorMessage: React.ComponentType<any>;
11
+ export default CDSAIChatErrorMessage;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import ErrorMessage from '../components/prompt-line/src/error-message.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ const CDSAIChatErrorMessage = withWebComponentBridge(createComponent({
22
+ tagName: "cds-aichat-error-message",
23
+ elementClass: ErrorMessage,
24
+ react: React,
25
+ }));
26
+
27
+ export { CDSAIChatErrorMessage as default };
28
+ //# sourceMappingURL=error-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-message.js","sources":["../../src/react/error-message.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,qBAAqB,GAAG,sBAAsB,CAClD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,YAAY;AAC1B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ declare const CDSAIChatFileUploads: React.ComponentType<any>;
11
+ export default CDSAIChatFileUploads;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import FileUploadsElement from '../components/file-uploads/src/file-uploads.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ const CDSAIChatFileUploads = withWebComponentBridge(createComponent({
22
+ tagName: "cds-aichat-file-uploads",
23
+ elementClass: FileUploadsElement,
24
+ react: React,
25
+ events: {
26
+ onFileRemove: "cds-aichat-file-remove",
27
+ },
28
+ }));
29
+
30
+ export { CDSAIChatFileUploads as default };
31
+ //# sourceMappingURL=file-uploads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-uploads.js","sources":["../../src/react/file-uploads.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,oBAAoB,GAAG,sBAAsB,CACjD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,YAAY,EAAE,wBAAwB;AACvC,KAAA;AACF,CAAA,CAAC;;;;"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import type { ReactNode, RefObject } from "react";
10
+ import type PromptLineElement from "../../components/prompt-line/src/prompt-line.js";
11
+ import type { AutocompleteConfig, SuggestionItem, TriggerChangeEventDetail, TriggerSuggestionConfig } from "../../components/prompt-line/src/tiptap/types.js";
12
+ export interface UseChatAutocompleteOptions {
13
+ mention?: TriggerSuggestionConfig;
14
+ command?: TriggerSuggestionConfig;
15
+ autocomplete?: AutocompleteConfig;
16
+ starters?: SuggestionItem[];
17
+ /** Ref to the slotted `<cds-aichat-prompt-line>`. */
18
+ promptLineRef: RefObject<PromptLineElement | null>;
19
+ /** When true, starter selection inserts the text but does not auto-send. */
20
+ isSendDisabled?: boolean;
21
+ /** Fired after a starter is selected and inserted (used to trigger send). */
22
+ onStarterSelected?: (text: string) => void;
23
+ /**
24
+ * Fired when the send button inside an autocomplete suggestion item is clicked.
25
+ */
26
+ onSendItem?: (text: string) => void;
27
+ /** Whether the autocomplete is attached to the input (affects corner rounding). */
28
+ attached?: boolean;
29
+ /** Maximum height for the autocomplete popover */
30
+ maxHeight?: string;
31
+ }
32
+ export interface UseChatAutocompleteResult {
33
+ /** Attach to `<PromptLine onTriggerChange={...} />`. */
34
+ onTriggerChange: (event: CustomEvent<TriggerChangeEventDetail | null>) => void;
35
+ /**
36
+ * JSX to render with `slot="autocomplete-content"` inside `<PromptLineShell>`.
37
+ * `null` while no trigger is active.
38
+ */
39
+ autocompleteContent: ReactNode;
40
+ }
41
+ export declare function useChatAutocomplete(options: UseChatAutocompleteOptions): UseChatAutocompleteResult;
@@ -0,0 +1,178 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { jsx } from 'react/jsx-runtime';
9
+ import React from 'react';
10
+ import ReactDOM from 'react-dom';
11
+ import CDSAIChatAutocomplete from '../autocomplete.js';
12
+ import { AutocompleteController } from '../../components/prompt-line/src/autocomplete-controller.js';
13
+
14
+ function useChatAutocomplete(options) {
15
+ const { mention, command, autocomplete, starters, promptLineRef, isSendDisabled, onStarterSelected, onSendItem, attached = true, maxHeight, } = options;
16
+ const [state, setState] = React.useState({
17
+ trigger: null,
18
+ items: [],
19
+ });
20
+ // Keep the controller stable for the hook's lifetime — set in a layout
21
+ // effect so it's wired before any event handler can fire.
22
+ const controllerRef = React.useRef(null);
23
+ // Latest config / callback values; the controller stores its own copies
24
+ // but reading them out of refs avoids re-instantiation churn.
25
+ const onStarterRef = React.useRef(onStarterSelected);
26
+ onStarterRef.current = onStarterSelected;
27
+ const onSendItemRef = React.useRef(onSendItem);
28
+ onSendItemRef.current = onSendItem;
29
+ if (!controllerRef.current) {
30
+ controllerRef.current = new AutocompleteController({
31
+ mention,
32
+ command,
33
+ autocomplete,
34
+ starters,
35
+ isSendDisabled,
36
+ onStarterSelected: (text) => onStarterRef.current?.(text),
37
+ onChange: setState,
38
+ });
39
+ }
40
+ // Push prop changes into the controller without recreating it.
41
+ React.useEffect(() => {
42
+ controllerRef.current?.setConfigs({
43
+ mention,
44
+ command,
45
+ autocomplete,
46
+ starters,
47
+ isSendDisabled,
48
+ });
49
+ }, [mention, command, autocomplete, starters, isSendDisabled]);
50
+ // Keep the controller pointed at the live prompt-line element.
51
+ React.useEffect(() => {
52
+ controllerRef.current?.setPromptLine(promptLineRef.current);
53
+ });
54
+ React.useEffect(() => {
55
+ return () => {
56
+ controllerRef.current?.destroy();
57
+ controllerRef.current = null;
58
+ };
59
+ }, []);
60
+ const onTriggerChange = React.useCallback((event) => {
61
+ // Pin the controller to the current prompt-line ref before handing
62
+ // off the detail — the React caller's ref is authoritative.
63
+ controllerRef.current?.setPromptLine(promptLineRef.current);
64
+ controllerRef.current?.handleTriggerChange(event.detail ?? null);
65
+ }, [promptLineRef]);
66
+ const handleSelect = React.useCallback((item) => {
67
+ controllerRef.current?.select(item);
68
+ }, []);
69
+ const handleSend = React.useCallback((e) => {
70
+ const text = e.detail?.text;
71
+ if (!text) {
72
+ return;
73
+ }
74
+ controllerRef.current?.dismiss();
75
+ onSendItemRef.current?.(text);
76
+ }, []);
77
+ const dismiss = React.useCallback(() => {
78
+ controllerRef.current?.dismiss();
79
+ }, []);
80
+ // Register / unregister the rendered list element with the controller so
81
+ // arrow / Enter / Escape on the editor DOM get forwarded to it.
82
+ // Also set the max-height CSS variable if provided.
83
+ const setListElement = React.useCallback((el) => {
84
+ controllerRef.current?.setListElement(el);
85
+ if (el && maxHeight) {
86
+ el.style.setProperty("--cds-aichat-autocomplete-max-height", maxHeight);
87
+ }
88
+ }, [maxHeight]);
89
+ const autocompleteContent = React.useMemo(() => {
90
+ if (!state.trigger || state.items.length === 0) {
91
+ return null;
92
+ }
93
+ if (state.renderCustomList) {
94
+ const result = state.renderCustomList({
95
+ items: state.items,
96
+ query: state.trigger.query,
97
+ onSelect: handleSelect,
98
+ onDismiss: dismiss,
99
+ });
100
+ if (result == null) {
101
+ return null;
102
+ }
103
+ if (result instanceof HTMLElement) {
104
+ return (jsx(CustomElementHost, { slot: "autocomplete-content", element: result, onMount: setListElement }));
105
+ }
106
+ return (jsx(CustomReactNodePortal, { slot: "autocomplete-content", node: result, onMount: setListElement }));
107
+ }
108
+ return (jsx(CDSAIChatAutocomplete, { ref: setListElement, slot: "autocomplete-content", items: state.items, attached: attached, onSelect: (e) => handleSelect(e.detail.item), onSend: handleSend, onDismiss: dismiss }));
109
+ }, [state, handleSelect, handleSend, dismiss, setListElement, attached]);
110
+ return { onTriggerChange, autocompleteContent };
111
+ }
112
+ /** Mounts a host-provided HTMLElement into the React tree at `slot`. */
113
+ function CustomElementHost({ slot, element, onMount, }) {
114
+ const containerRef = React.useRef(null);
115
+ React.useEffect(() => {
116
+ const container = containerRef.current;
117
+ if (!container) {
118
+ return undefined;
119
+ }
120
+ container.appendChild(element);
121
+ onMount?.(element);
122
+ return () => {
123
+ onMount?.(null);
124
+ if (element.parentNode === container) {
125
+ container.removeChild(element);
126
+ }
127
+ };
128
+ }, [element, onMount]);
129
+ return jsx("div", { ref: containerRef, slot: slot });
130
+ }
131
+ let autocompletePortalCounter = 0;
132
+ /**
133
+ * Projects a consumer-supplied React node into the page's light DOM via a
134
+ * two-level slot/host pair so external `<style>` tags reach it. The rendered
135
+ * `<div>` is a slot-projected anchor in the shell's `autocomplete-content`
136
+ * slot; a sibling `<div slot="…">` is appended to the chatWrapper (the host
137
+ * of the surrounding shadow root) and receives the React node via
138
+ * `createPortal`. Without this hop the node would mount inside the chat's
139
+ * shadow root, hidden from page CSS.
140
+ */
141
+ function CustomReactNodePortal({ slot, node, onMount, }) {
142
+ const containerRef = React.useRef(null);
143
+ const [hostElement, setHostElement] = React.useState(null);
144
+ React.useEffect(() => {
145
+ const container = containerRef.current;
146
+ if (!container) {
147
+ return undefined;
148
+ }
149
+ const rootNode = container.getRootNode();
150
+ const chatWrapper = rootNode instanceof ShadowRoot ? rootNode.host : null;
151
+ if (!chatWrapper) {
152
+ return undefined;
153
+ }
154
+ const slotName = `cds-aichat-autocomplete-${++autocompletePortalCounter}`;
155
+ const slotEl = document.createElement("slot");
156
+ slotEl.setAttribute("name", slotName);
157
+ container.appendChild(slotEl);
158
+ const hostEl = document.createElement("div");
159
+ hostEl.setAttribute("slot", slotName);
160
+ chatWrapper.appendChild(hostEl);
161
+ setHostElement(hostEl);
162
+ onMount?.(hostEl);
163
+ return () => {
164
+ onMount?.(null);
165
+ slotEl.remove();
166
+ hostEl.remove();
167
+ setHostElement(null);
168
+ };
169
+ // Empty deps: the slot/host pair is owned by this mount cycle and should
170
+ // not churn as `node` updates — React's portal reconciliation handles
171
+ // those updates in place.
172
+ // eslint-disable-next-line react-hooks/exhaustive-deps
173
+ }, []);
174
+ return (jsx("div", { slot: slot, ref: containerRef, children: hostElement ? ReactDOM.createPortal(node, hostElement) : null }));
175
+ }
176
+
177
+ export { useChatAutocomplete };
178
+ //# sourceMappingURL=useChatAutocomplete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatAutocomplete.js","sources":["../../../src/react/hooks/useChatAutocomplete.tsx"],"sourcesContent":[null],"names":["_jsx","Autocomplete"],"mappings":";;;;;;;;;;;;;AAqEM,SAAU,mBAAmB,CACjC,OAAmC,EAAA;IAEnC,MAAM,EACJ,OAAO,EACP,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,QAAQ,GAAG,IAAI,EACf,SAAS,GACV,GAAG,OAAO;IAEX,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA8B;AACpE,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,KAAK,EAAE,EAAE;AACV,KAAA,C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AG,IAAI;QACxE,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,OAAO,SAAS;QAClB;AAEA,QAAA,MAAM,QAAQ,GAAG,CAAA,wBAAA,EAA2B,EAAE,yBAAyB,EAAE;QACzE,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;AAC7C,QAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;AACrC,QAAA,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;QAE7B,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC5C,QAAA,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;AACrC,QAAA,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC;QAE/B,cAAc,CAAC,MAAM,CAAC;AACtB,QAAA,OAAO,GAAG,MAAM,CAAC;AAEjB,QAAA,OAAO,MAAK;AACV,YAAA,OAAO,GAAG,IAAI,CAAC;YACf,MAAM,CAAC,MAAM,EAAE;YACf,MAAM,CAAC,MAAM,EAAE;YACf,cAAc,CAAC,IAAI,CAAC;AACtB,QAAA,CAAC;;;;;IAKH,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAA,QAAA,EAC/B,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,IAAI,EAAA,CAC1D;AAEV;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ declare const CDSAIChatInputSendControl: React.ComponentType<any>;
11
+ export default CDSAIChatInputSendControl;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import InputSendControlElement from '../components/prompt-line/src/send-control.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ const CDSAIChatInputSendControl = withWebComponentBridge(createComponent({
22
+ tagName: "cds-aichat-input-send-control",
23
+ elementClass: InputSendControlElement,
24
+ react: React,
25
+ events: {
26
+ onSend: "cds-aichat-input-send",
27
+ onStopStreaming: "cds-aichat-input-stop-streaming",
28
+ },
29
+ }));
30
+
31
+ export { CDSAIChatInputSendControl as default };
32
+ //# sourceMappingURL=input-send-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-send-control.js","sources":["../../src/react/input-send-control.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,yBAAyB,GAAG,sBAAsB,CACtD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,+BAA+B;AACxC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,eAAe,EAAE,iCAAiC;AACnD,KAAA;AACF,CAAA,CAAC;;;;"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ /**
11
+ * React wrapper for `<cds-aichat-prompt-line-shell>`. The shell is layout-only —
12
+ * named slots plus the `rounded` flag — so this wrapper carries no event
13
+ * mappings or prop transformations. Consumers compose `<PromptLine>`,
14
+ * autocomplete content, file-uploads, send-control, etc. into the named
15
+ * slots themselves.
16
+ */
17
+ declare const PromptLineShell: React.ComponentType<any>;
18
+ export default PromptLineShell;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import PromptLineShellElement from '../components/prompt-line/src/prompt-line-shell.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ /**
22
+ * React wrapper for `<cds-aichat-prompt-line-shell>`. The shell is layout-only —
23
+ * named slots plus the `rounded` flag — so this wrapper carries no event
24
+ * mappings or prop transformations. Consumers compose `<PromptLine>`,
25
+ * autocomplete content, file-uploads, send-control, etc. into the named
26
+ * slots themselves.
27
+ */
28
+ const PromptLineShell = withWebComponentBridge(createComponent({
29
+ tagName: "cds-aichat-prompt-line-shell",
30
+ elementClass: PromptLineShellElement,
31
+ react: React,
32
+ events: {},
33
+ }));
34
+
35
+ export { PromptLineShell as default };
36
+ //# sourceMappingURL=prompt-line-shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-line-shell.js","sources":["../../src/react/prompt-line-shell.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH;;;;;;AAMG;AACH,MAAM,eAAe,GAAG,sBAAsB,CAC5C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,8BAA8B;AACvC,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE,EAAE;AACX,CAAA,CAAC;;;;"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ /**
11
+ * React wrapper for `<cds-aichat-prompt-line>`. Mirrors the WC's prompt-line
12
+ * surface verbatim — no host-side prop transformation required. The element
13
+ * renders a Tiptap-free textarea by default and upgrades to the rich Tiptap
14
+ * editor in place when the `rich` prop is set (or `extensions` are supplied);
15
+ * chat-domain config layering happens one level up at the shell. Imperative
16
+ * methods are reachable via ref.
17
+ *
18
+ * Wrapped in `withWebComponentBridge` so testId / rich / extensions / content
19
+ * props land on the underlying custom element in happy-dom / jsdom, where
20
+ * `@lit/react` doesn't reliably flush properties on its own.
21
+ *
22
+ * @experimental
23
+ */
24
+ declare const PromptLine: React.ComponentType<any>;
25
+ export default PromptLine;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import PromptLineElement from '../components/prompt-line/src/prompt-line.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ /**
22
+ * React wrapper for `<cds-aichat-prompt-line>`. Mirrors the WC's prompt-line
23
+ * surface verbatim — no host-side prop transformation required. The element
24
+ * renders a Tiptap-free textarea by default and upgrades to the rich Tiptap
25
+ * editor in place when the `rich` prop is set (or `extensions` are supplied);
26
+ * chat-domain config layering happens one level up at the shell. Imperative
27
+ * methods are reachable via ref.
28
+ *
29
+ * Wrapped in `withWebComponentBridge` so testId / rich / extensions / content
30
+ * props land on the underlying custom element in happy-dom / jsdom, where
31
+ * `@lit/react` doesn't reliably flush properties on its own.
32
+ *
33
+ * @experimental
34
+ */
35
+ const PromptLine = withWebComponentBridge(createComponent({
36
+ tagName: "cds-aichat-prompt-line",
37
+ elementClass: PromptLineElement,
38
+ react: React,
39
+ events: {
40
+ onChange: "cds-aichat-prompt-change",
41
+ onFocus: "cds-aichat-prompt-focus",
42
+ onBlur: "cds-aichat-prompt-blur",
43
+ onTyping: "cds-aichat-prompt-typing",
44
+ onKeyDown: "cds-aichat-prompt-keydown",
45
+ onSendIntent: "cds-aichat-prompt-send-intent",
46
+ onTriggerChange: "cds-aichat-trigger-change",
47
+ onLightDomPortal: "cds-aichat-light-dom-portal",
48
+ },
49
+ }));
50
+
51
+ export { PromptLine as default };
52
+ //# sourceMappingURL=prompt-line.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-line.js","sources":["../../src/react/prompt-line.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH;;;;;;;;;;;;;AAaG;AACH,MAAM,UAAU,GAAG,sBAAsB,CACvC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,0BAA0B;AACpC,QAAA,OAAO,EAAE,yBAAyB;AAClC,QAAA,MAAM,EAAE,wBAAwB;AAChC,QAAA,QAAQ,EAAE,0BAA0B;AACpC,QAAA,SAAS,EAAE,2BAA2B;AACtC,QAAA,YAAY,EAAE,+BAA+B;AAC7C,QAAA,eAAe,EAAE,2BAA2B;AAC5C,QAAA,gBAAgB,EAAE,6BAA6B;AAChD,KAAA;AACF,CAAA,CAAC;;;;"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2026
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import React from "react";
10
+ declare const CDSAIChatStopStreamingButton: React.ComponentType<any>;
11
+ export default CDSAIChatStopStreamingButton;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { createComponent } from '@lit/react';
9
+ import React from 'react';
10
+ import StopStreamingButton from '../components/prompt-line/src/stop-streaming-button.js';
11
+ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
12
+
13
+ /**
14
+ * @license
15
+ *
16
+ * Copyright IBM Corp. 2026
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ const CDSAIChatStopStreamingButton = withWebComponentBridge(createComponent({
22
+ tagName: "cds-aichat-stop-streaming-button",
23
+ elementClass: StopStreamingButton,
24
+ react: React,
25
+ }));
26
+
27
+ export { CDSAIChatStopStreamingButton as default };
28
+ //# sourceMappingURL=stop-streaming-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop-streaming-button.js","sources":["../../src/react/stop-streaming-button.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,4BAA4B,GAAG,sBAAsB,CACzD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,kCAAkC;AAC3C,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;;;"}
@@ -10,7 +10,7 @@ import { createComponent } from '@lit/react';
10
10
  import React from 'react';
11
11
  import CDSAIChatToolbar from '../components/toolbar/src/toolbar.js';
12
12
  import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
13
- import { transformReactIconToCarbonIcon } from './utils/iconTransform.js';
13
+ import { transformReactIconToCarbonIcon } from '../globals/utils/iconTransform.js';
14
14
 
15
15
  // Base toolbar component from @lit/react
16
16
  const BaseToolbar = withWebComponentBridge(createComponent({
@@ -26,7 +26,6 @@ const Transcript = createComponent({
26
26
  },
27
27
  displayName: "Transcript",
28
28
  });
29
- // Made with Bob
30
29
 
31
30
  export { Transcript, Transcript as default };
32
31
  //# sourceMappingURL=transcript.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.js","sources":["../../src/react/transcript.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AAMH,MAAM,UAAU,GAAG,eAAe,CAAC;AACjC,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,kBAAkB,EAAE,8BAA8B;AACnD,KAAA;AACD,IAAA,WAAW,EAAE,YAAY;AAC1B,CAAA;AAKD;;;;"}
1
+ {"version":3,"file":"transcript.js","sources":["../../src/react/transcript.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AAMH,MAAM,UAAU,GAAG,eAAe,CAAC;AACjC,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,kBAAkB,EAAE,8BAA8B;AACnD,KAAA;AACD,IAAA,WAAW,EAAE,YAAY;AAC1B,CAAA;;;;"}