@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,59 @@
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 { Extension } from '@tiptap/core';
9
+
10
+ /**
11
+ * @license
12
+ *
13
+ * Copyright IBM Corp. 2026
14
+ *
15
+ * This source code is licensed under the Apache-2.0 license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ /**
19
+ * Tiptap keymap extension for the prompt-line.
20
+ *
21
+ * - `Mod-Enter` → emit `cds-custom-aichat-prompt-send-intent`. The shell decides
22
+ * whether to honor (re-dispatch as `cds-custom-aichat-input-send`) or gate
23
+ * (`isSendDisabled` per PLAN.md decision 19).
24
+ * - `Escape` → blur the editor.
25
+ * - Plain `Enter` is not bound here. `<cds-custom-aichat-prompt-line>` adds
26
+ * `carbonChatEnter` to its base bundle for "Enter sends, Shift-Enter
27
+ * newlines"; this extension stays Enter-agnostic so it can be reused on its
28
+ * own.
29
+ *
30
+ * Undo / redo come from the `UndoRedo` extension. ArrowUp / ArrowDown /
31
+ * Enter / Escape forwarding to the active autocomplete list is **not** done
32
+ * here — the `AutocompleteController` (see ../autocomplete-controller.ts)
33
+ * installs its own capture-phase keydown listener on the editor view DOM
34
+ * when a trigger is active and a list element is registered, and
35
+ * re-dispatches those keys on the list. The Tiptap suggestion factories
36
+ * (`carbonMention`, `carbonAutocomplete`) deliberately return `false` from
37
+ * `onKeyDown` so they don't consume those keys either.
38
+ */
39
+ const Keymap = Extension.create({
40
+ name: "carbonChatKeymap",
41
+ addKeyboardShortcuts() {
42
+ return {
43
+ "Mod-Enter": ({ editor }) => {
44
+ editor.view.dom.dispatchEvent(new CustomEvent("cds-custom-aichat-prompt-send-intent", {
45
+ bubbles: true,
46
+ composed: true,
47
+ }));
48
+ return true;
49
+ },
50
+ Escape: ({ editor }) => {
51
+ editor.view.dom.blur();
52
+ return true;
53
+ },
54
+ };
55
+ },
56
+ });
57
+
58
+ export { Keymap };
59
+ //# sourceMappingURL=keymap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keymap.js","sources":["../../../../../src/components/prompt-line/src/tiptap/keymap.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;;;;;;;;;;;;;;;AAoBG;AAII,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,kBAAkB;IAExB,oBAAoB,GAAA;QAClB,OAAO;AACL,YAAA,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,KAAI;gBAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAC3B,IAAI,WAAW,CAAC,+BAA+B,EAAE;AAC/C,oBAAA,OAAO,EAAE,IAAI;AACb,oBAAA,QAAQ,EAAE,IAAI;AACf,iBAAA,CAAC,CACH;AACD,gBAAA,OAAO,IAAI;YACb,CAAC;AACD,YAAA,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAI;AACpB,gBAAA,MAAM,CAAC,IAAI,CAAC,GAAmB,CAAC,IAAI,EAAE;AACvC,gBAAA,OAAO,IAAI;YACb,CAAC;SACF;IACH,CAAC;AACF,CAAA;;;;"}
@@ -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 type { Transaction } from "@tiptap/pm/state";
10
+ export declare function setHostOriginMeta(tr: Transaction): Transaction;
11
+ export declare function isHostOrigin(tr: Transaction): boolean;
@@ -0,0 +1,33 @@
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
+ /**
9
+ * @license
10
+ *
11
+ * Copyright IBM Corp. 2026
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ /**
17
+ * Tag a transaction as host-originated so the value-sync extension (and any
18
+ * other origin-aware reader) can suppress its own change-event emission for
19
+ * the round-trip. Replaces the legacy `external-update-flag.ts` WeakMap; the
20
+ * meta key is shared with consumer code that dispatches transactions via
21
+ * `getEditor()?.view.dispatch(tr)` and wants to opt out of the change loop.
22
+ */
23
+ const HOST_ORIGIN_META_KEY = "aichatOrigin";
24
+ const HOST_ORIGIN_VALUE = "host";
25
+ function setHostOriginMeta(tr) {
26
+ return tr.setMeta(HOST_ORIGIN_META_KEY, HOST_ORIGIN_VALUE);
27
+ }
28
+ function isHostOrigin(tr) {
29
+ return tr.getMeta(HOST_ORIGIN_META_KEY) === HOST_ORIGIN_VALUE;
30
+ }
31
+
32
+ export { isHostOrigin, setHostOriginMeta };
33
+ //# sourceMappingURL=origin-meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"origin-meta.js","sources":["../../../../../src/components/prompt-line/src/tiptap/origin-meta.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;;;;;;AAMG;AACH,MAAM,oBAAoB,GAAG,cAAc;AAC3C,MAAM,iBAAiB,GAAG,MAAM;AAE1B,SAAU,iBAAiB,CAAC,EAAe,EAAA;IAC/C,OAAO,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;AAC5D;AAEM,SAAU,YAAY,CAAC,EAAe,EAAA;IAC1C,OAAO,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,KAAK,iBAAiB;AAC/D;;;;"}
@@ -0,0 +1,16 @@
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
+ /**
10
+ * Tiptap plain-text-paste extension. Intercepts paste/drop events,
11
+ * extracts plain text, and inserts it as paragraph nodes split on
12
+ * newlines. Schema-agnostic — only requires `paragraph` and `text`
13
+ * nodes.
14
+ */
15
+ import { Extension } from "@tiptap/core";
16
+ export declare const PlainTextPaste: Extension<any, any>;
@@ -0,0 +1,85 @@
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 { Extension } from '@tiptap/core';
9
+ import { Plugin } from '@tiptap/pm/state';
10
+
11
+ /**
12
+ * @license
13
+ *
14
+ * Copyright IBM Corp. 2026
15
+ *
16
+ * This source code is licensed under the Apache-2.0 license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */
19
+ /**
20
+ * Tiptap plain-text-paste extension. Intercepts paste/drop events,
21
+ * extracts plain text, and inserts it as paragraph nodes split on
22
+ * newlines. Schema-agnostic — only requires `paragraph` and `text`
23
+ * nodes.
24
+ */
25
+ function linesToNodes(schema, lines) {
26
+ return lines.map((line) => {
27
+ if (line.length === 0) {
28
+ return schema.nodes.paragraph.create();
29
+ }
30
+ return schema.nodes.paragraph.create(null, schema.text(line));
31
+ });
32
+ }
33
+ function createPastePlugin() {
34
+ return new Plugin({
35
+ props: {
36
+ handlePaste(view, event, _slice) {
37
+ const text = event.clipboardData?.getData("text/plain");
38
+ if (text == null) {
39
+ return false;
40
+ }
41
+ const { schema } = view.state;
42
+ const lines = text.replace(/\r\n?/g, "\n").split("\n");
43
+ const nodes = linesToNodes(schema, lines);
44
+ const { from, to } = view.state.selection;
45
+ const tr = view.state.tr.replaceWith(from, to, nodes);
46
+ view.dispatch(tr.scrollIntoView());
47
+ return true;
48
+ },
49
+ handleDrop(view, event, _slice, moved) {
50
+ // Allow internal drag-and-drop (moved content within the editor)
51
+ if (moved) {
52
+ return false;
53
+ }
54
+ // Block external drops to prevent rich content
55
+ const text = event.dataTransfer?.getData("text/plain");
56
+ if (!text) {
57
+ return true; // block the drop
58
+ }
59
+ const { schema } = view.state;
60
+ const lines = text.replace(/\r\n?/g, "\n").split("\n");
61
+ const nodes = linesToNodes(schema, lines);
62
+ const pos = view.posAtCoords({
63
+ left: event.clientX,
64
+ top: event.clientY,
65
+ });
66
+ if (!pos) {
67
+ return true;
68
+ }
69
+ const tr = view.state.tr.replaceWith(pos.pos, pos.pos, nodes);
70
+ view.dispatch(tr.scrollIntoView());
71
+ event.preventDefault();
72
+ return true;
73
+ },
74
+ },
75
+ });
76
+ }
77
+ const PlainTextPaste = Extension.create({
78
+ name: "carbonPlainTextPaste",
79
+ addProseMirrorPlugins() {
80
+ return [createPastePlugin()];
81
+ },
82
+ });
83
+
84
+ export { PlainTextPaste };
85
+ //# sourceMappingURL=plain-text-paste.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plain-text-paste.js","sources":["../../../../../src/components/prompt-line/src/tiptap/plain-text-paste.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
@@ -0,0 +1,87 @@
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
+ /**
10
+ * `renderInLightDom` is the generic light-DOM portal handshake. The chat —
11
+ * including the Tiptap editor — runs inside a shadow root, so a host-authored
12
+ * `addNodeView` cannot reach the page's stylesheet. This helper builds a
13
+ * shadow-side container and dispatches a `cds-custom-aichat-light-dom-portal` event;
14
+ * the chat's portal container catches it, mounts the supplied content into the
15
+ * page's LIGHT DOM, and projects it back into the container via a `<slot>`.
16
+ *
17
+ * `renderTokenChip` is a thin token-specific wrapper over this primitive.
18
+ */
19
+ import type { ReactNode } from "react";
20
+ /** Wire event for the generic light-DOM portal handshake. */
21
+ export declare const LIGHT_DOM_PORTAL_EVENT = "cds-custom-aichat-light-dom-portal";
22
+ export interface RenderInLightDomArgs {
23
+ /**
24
+ * Content to render in the page's light DOM. An `HTMLElement` is appended
25
+ * directly. A `ReactNode` is `createPortal`-ed by the chat's React tree —
26
+ * the same path the token `renderCustomToken` ReactNode case uses; it relies
27
+ * on the host and chat sharing a single React instance.
28
+ */
29
+ content: HTMLElement | ReactNode;
30
+ /**
31
+ * Where to dispatch the handshake event. A host `addNodeView` should pass
32
+ * `editor.view.dom` so the event reaches the listener on the chat wrapper.
33
+ * Defaults to the returned `container` (the event bubbles and is composed).
34
+ */
35
+ dispatchTarget?: EventTarget;
36
+ /**
37
+ * Optional element shown inside the `<slot>` until the portal commits on the
38
+ * next frame.
39
+ */
40
+ fallback?: HTMLElement;
41
+ /**
42
+ * Opaque metadata forwarded verbatim in the event detail. The portal
43
+ * container does not read it; listeners may.
44
+ */
45
+ meta?: Record<string, unknown>;
46
+ /**
47
+ * Tag used for the shadow-side container AND the page-light-DOM host
48
+ * element the portal creates. Defaults to `"span"`, which suits inline
49
+ * content like a token chip. Use `"div"` when the projected content is
50
+ * block-level (e.g. an atom-block Tiptap node containing a
51
+ * `<cds-custom-aichat-code-snippet>`) — a `<span>` wrapper would otherwise wrap a
52
+ * `display: block` child in an inline line-box, adding the parent's
53
+ * line-height as phantom leading.
54
+ */
55
+ containerTag?: "span" | "div";
56
+ }
57
+ export interface RenderInLightDomResult {
58
+ /**
59
+ * The shadow-side container. Place it where the content should appear (e.g.
60
+ * return it as a Tiptap node view `dom`). The portal container injects a
61
+ * `<slot>` into it that projects the light-DOM content into position.
62
+ */
63
+ container: HTMLElement;
64
+ }
65
+ /**
66
+ * Detail payload for {@link LIGHT_DOM_PORTAL_EVENT}. Exactly one of
67
+ * `htmlElement` / `reactNode` is set.
68
+ */
69
+ export interface LightDomPortalEventDetail {
70
+ /** Shadow-side container the listener injects a `<slot>` into. */
71
+ container: HTMLElement;
72
+ /** Optional `<slot>` fallback content. */
73
+ fallback?: HTMLElement;
74
+ /** Opaque caller metadata. */
75
+ meta?: Record<string, unknown>;
76
+ /** Set when the caller passed an `HTMLElement`. */
77
+ htmlElement?: HTMLElement;
78
+ /** Set when the caller passed a `ReactNode`. */
79
+ reactNode?: ReactNode;
80
+ /** Tag the listener should use for the page-light-DOM `slot` host element. */
81
+ hostTag?: "span" | "div";
82
+ }
83
+ /**
84
+ * Bridge `content` into the page's light DOM via the slot-projection portal.
85
+ * Returns the shadow-side `container` to place where the content belongs.
86
+ */
87
+ export declare function renderInLightDom(args: RenderInLightDomArgs): RenderInLightDomResult;
@@ -0,0 +1,41 @@
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
+ /**
9
+ * @license
10
+ *
11
+ * Copyright IBM Corp. 2026
12
+ *
13
+ * This source code is licensed under the Apache-2.0 license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */
16
+ /** Wire event for the generic light-DOM portal handshake. */
17
+ const LIGHT_DOM_PORTAL_EVENT = "cds-custom-aichat-light-dom-portal";
18
+ /**
19
+ * Bridge `content` into the page's light DOM via the slot-projection portal.
20
+ * Returns the shadow-side `container` to place where the content belongs.
21
+ */
22
+ function renderInLightDom(args) {
23
+ const containerTag = args.containerTag ?? "span";
24
+ const container = document.createElement(containerTag);
25
+ container.className = "cds-custom-aichat--light-dom-portal-container";
26
+ const detail = {
27
+ container,
28
+ fallback: args.fallback,
29
+ meta: args.meta,
30
+ hostTag: containerTag,
31
+ ...(args.content instanceof HTMLElement
32
+ ? { htmlElement: args.content }
33
+ : { reactNode: args.content }),
34
+ };
35
+ const event = new CustomEvent(LIGHT_DOM_PORTAL_EVENT, { detail, bubbles: true, composed: true });
36
+ (args.dispatchTarget ?? container).dispatchEvent(event);
37
+ return { container };
38
+ }
39
+
40
+ export { LIGHT_DOM_PORTAL_EVENT, renderInLightDom };
41
+ //# sourceMappingURL=render-in-light-dom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-in-light-dom.js","sources":["../../../../../src/components/prompt-line/src/tiptap/render-in-light-dom.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAeH;AACO,MAAM,sBAAsB,GAAG;AAkEtC;;;AAGG;AACG,SAAU,gBAAgB,CAC9B,IAA0B,EAAA;AAE1B,IAAA,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,IAAI,MAAM;IAChD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC;AACtD,IAAA,SAAS,CAAC,SAAS,GAAG,wCAAwC;AAE9D,IAAA,MAAM,MAAM,GAA8B;QACxC,SAAS;QACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;AACf,QAAA,OAAO,EAAE,YAAY;AACrB,QAAA,IAAI,IAAI,CAAC,OAAO,YAAY;AAC1B,cAAE,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO;cAC3B,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;KACjC;AAED,IAAA,MAAM,KAAK,GAAG,IAAI,WAAW,CAC3B,sBAAsB,EACtB,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAC1C;IAED,CAAC,IAAI,CAAC,cAAc,IAAI,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC;IAEvD,OAAO,EAAE,SAAS,EAAE;AACtB;;;;"}
@@ -0,0 +1,57 @@
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 { TriggerSuggestionConfig } from "./types.js";
10
+ /**
11
+ * Attributes carried by a mention/command JSONContent node. Matches the
12
+ * Tiptap mention shape (`id`, `label`) plus the carbon-specific `value`,
13
+ * `data`, and `trigger` extensions added by `carbonMention`/`carbonCommand`.
14
+ */
15
+ export interface TokenChipAttrs {
16
+ id?: string;
17
+ label?: string;
18
+ value?: string;
19
+ data?: unknown;
20
+ /**
21
+ * Trigger character to prefix onto the default chip text (e.g.
22
+ * `/summarize` vs `summarize`). Set at insert time by
23
+ * `resolveShowTriggerInChip` — defaults to command nodes only, but is
24
+ * overridable per-config or per-item via `TriggerSuggestionConfig`/
25
+ * `SuggestionItem`'s `showTriggerInChip`.
26
+ */
27
+ trigger?: string | null;
28
+ }
29
+ export interface RenderTokenChipArgs {
30
+ /** Node attrs in mention shape. */
31
+ attrs: TokenChipAttrs;
32
+ /**
33
+ * Subset of the trigger-suggestion config relevant to chip rendering. Only
34
+ * `renderCustomToken` is read; other config fields are ignored.
35
+ */
36
+ config?: Pick<TriggerSuggestionConfig, "renderCustomToken">;
37
+ /** Token type — usually `"mention"` or `"command"`. */
38
+ type: "mention" | "command" | string;
39
+ /**
40
+ * Where to dispatch the light-DOM portal event when `renderCustomToken`
41
+ * returns custom content. The NodeView passes the editor's `view.dom`
42
+ * (already mounted under the chat wrapper) so the event reaches the portal
43
+ * listener synchronously. When omitted, the event fires from the portal
44
+ * container element itself with `bubbles: true, composed: true` — callers
45
+ * that mount the chip lazily must ensure it lives under a listener subtree
46
+ * before connection.
47
+ */
48
+ dispatchTarget?: EventTarget;
49
+ /**
50
+ * Visual variant to render. `"composer"` is the live, being-typed token in
51
+ * the prompt-line editor; `"historical"` is a token inside an already-sent
52
+ * message in the transcript. Drives the default chip's color/highlight —
53
+ * see `ensureTokenStyleRules`.
54
+ */
55
+ context: "composer" | "historical";
56
+ }
57
+ export declare function renderTokenChip(args: RenderTokenChipArgs): HTMLElement;
@@ -0,0 +1,95 @@
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 { setVarsForSelector } from '../../../shared/dynamic-css-var-sheet.js';
9
+ import { renderInLightDom } from './render-in-light-dom.js';
10
+
11
+ /**
12
+ * @license
13
+ *
14
+ * Copyright IBM Corp. 2026
15
+ *
16
+ * This source code is licensed under the Apache-2.0 license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */
19
+ let tokenStyleRulesInstalled = false;
20
+ function ensureTokenStyleRules() {
21
+ if (tokenStyleRulesInstalled) {
22
+ return;
23
+ }
24
+ setVarsForSelector(".cds-custom-aichat--token", { "white-space": "normal" });
25
+ setVarsForSelector('.cds-custom-aichat--token[data-token-context="composer"]', {
26
+ color: "var(--cds-tag-color-blue)",
27
+ });
28
+ setVarsForSelector('.cds-custom-aichat--token[data-token-context="composer"]::selection', { "background-color": "var(--cds-tag-background-blue)" });
29
+ setVarsForSelector('.cds-custom-aichat--token[data-token-context="historical"]', {
30
+ color: "var(--cds-link-secondary)",
31
+ });
32
+ tokenStyleRulesInstalled = true;
33
+ }
34
+ function renderTokenChip(args) {
35
+ const dom = createTokenContainer(args.attrs, args.type, args.context);
36
+ const renderer = args.config?.renderCustomToken;
37
+ if (!renderer) {
38
+ dom.appendChild(createDefaultChip(args.attrs));
39
+ return dom;
40
+ }
41
+ const item = {
42
+ id: typeof args.attrs.id === "string" ? args.attrs.id : "",
43
+ label: typeof args.attrs.label === "string" ? args.attrs.label : "",
44
+ ...(args.attrs.data ?? {}),
45
+ };
46
+ let result;
47
+ try {
48
+ result = renderer(item);
49
+ }
50
+ catch (error) {
51
+ // eslint-disable-next-line no-console
52
+ console.error("Error in renderCustomToken, falling back to default chip:", error);
53
+ dom.appendChild(createDefaultChip(args.attrs));
54
+ return dom;
55
+ }
56
+ if (result == null) {
57
+ dom.appendChild(createDefaultChip(args.attrs));
58
+ return dom;
59
+ }
60
+ // Bridge the custom chip into the page's light DOM via the shared portal
61
+ // handshake. The default chip rides along as the `<slot>` fallback so the
62
+ // token still shows something until the portal commits.
63
+ const { container } = renderInLightDom({
64
+ content: result,
65
+ dispatchTarget: args.dispatchTarget ?? dom,
66
+ fallback: createDefaultChip(args.attrs),
67
+ });
68
+ dom.appendChild(container);
69
+ return dom;
70
+ }
71
+ function createTokenContainer(attrs, type, context) {
72
+ ensureTokenStyleRules();
73
+ const dom = document.createElement("span");
74
+ const value = typeof attrs.value === "string" ? attrs.value : null;
75
+ const label = typeof attrs.label === "string" ? attrs.label : null;
76
+ dom.setAttribute("contenteditable", "false");
77
+ dom.setAttribute("data-token-type", type);
78
+ dom.setAttribute("data-token-context", context);
79
+ dom.setAttribute("data-raw-value", value ?? label ?? "");
80
+ dom.setAttribute("role", "img");
81
+ dom.setAttribute("aria-label", label || value || "");
82
+ dom.className = "cds-custom-aichat--token";
83
+ return dom;
84
+ }
85
+ function createDefaultChip(attrs) {
86
+ const chip = document.createElement("span");
87
+ const label = typeof attrs.label === "string" ? attrs.label : null;
88
+ const value = typeof attrs.value === "string" ? attrs.value : null;
89
+ const trigger = typeof attrs.trigger === "string" ? attrs.trigger : "";
90
+ chip.textContent = `${trigger}${label || value || ""}`;
91
+ return chip;
92
+ }
93
+
94
+ export { renderTokenChip };
95
+ //# sourceMappingURL=render-token-chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-token-chip.js","sources":["../../../../../src/components/prompt-line/src/tiptap/render-token-chip.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
@@ -0,0 +1,36 @@
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
+ /**
10
+ * `CarbonTokenNodeView` is Tiptap's NodeView for inline tokens (mentions,
11
+ * commands). Via {@link renderTokenChip} it dispatches the light-DOM portal
12
+ * event that consumer-side React portal listeners (`LightDomPortalsContainer`)
13
+ * hydrate into chips.
14
+ *
15
+ * The actual chip-DOM construction (default chip, `renderCustomToken`
16
+ * honoring, and the light-DOM portal handshake) lives in {@link renderTokenChip},
17
+ * which is shared with the chat-side rich user message bubble.
18
+ */
19
+ import type { Node as PMNode } from "@tiptap/pm/model";
20
+ import type { EditorView, NodeView } from "@tiptap/pm/view";
21
+ import type { TriggerSuggestionConfig } from "./types.js";
22
+ export interface CarbonTokenNodeViewOptions {
23
+ /**
24
+ * Custom renderer from the trigger-suggestion config. When omitted, the
25
+ * default text chip is used.
26
+ */
27
+ renderCustomToken?: TriggerSuggestionConfig["renderCustomToken"];
28
+ }
29
+ export declare class CarbonTokenNodeView implements NodeView {
30
+ dom: HTMLElement;
31
+ constructor(node: PMNode, view: EditorView, options: CarbonTokenNodeViewOptions);
32
+ stopEvent(): boolean;
33
+ ignoreMutation(): boolean;
34
+ /** Atomic: PM does not track interior content. */
35
+ get contentDOM(): null;
36
+ }
@@ -0,0 +1,41 @@
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 { renderTokenChip } from './render-token-chip.js';
9
+
10
+ /**
11
+ * @license
12
+ *
13
+ * Copyright IBM Corp. 2026
14
+ *
15
+ * This source code is licensed under the Apache-2.0 license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ class CarbonTokenNodeView {
19
+ constructor(node, view, options) {
20
+ this.dom = renderTokenChip({
21
+ attrs: node.attrs,
22
+ config: { renderCustomToken: options.renderCustomToken },
23
+ type: node.type.name,
24
+ dispatchTarget: view.dom,
25
+ context: "composer",
26
+ });
27
+ }
28
+ stopEvent() {
29
+ return true;
30
+ }
31
+ ignoreMutation() {
32
+ return true;
33
+ }
34
+ /** Atomic: PM does not track interior content. */
35
+ get contentDOM() {
36
+ return null;
37
+ }
38
+ }
39
+
40
+ export { CarbonTokenNodeView };
41
+ //# sourceMappingURL=token-node-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-node-view.js","sources":["../../../../../src/components/prompt-line/src/tiptap/token-node-view.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;MA2BU,mBAAmB,CAAA;AAG9B,IAAA,WAAA,CACE,IAAY,EACZ,IAAgB,EAChB,OAAmC,EAAA;AAEnC,QAAA,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC;YACzB,KAAK,EAAE,IAAI,CAAC,KAAuB;AACnC,YAAA,MAAM,EAAE,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,EAAE;AACxD,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,cAAc,EAAE,IAAI,CAAC,GAAG;AACxB,YAAA,OAAO,EAAE,UAAU;AACpB,SAAA,CAAC;IACJ;IAEA,SAAS,GAAA;AACP,QAAA,OAAO,IAAI;IACb;IAEA,cAAc,GAAA;AACZ,QAAA,OAAO,IAAI;IACb;;AAGA,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI;IACb;AACD;;;;"}
@@ -0,0 +1,30 @@
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
+ /**
10
+ * Shared helper for the carbon factories' suggestion-render lifecycles to
11
+ * dispatch `cds-custom-aichat-trigger-change` events directly. There is no central
12
+ * bridge extension (per PLAN.md decision 4) — each factory calls this helper
13
+ * from its own `onStart`/`onUpdate`/`onExit` callbacks.
14
+ *
15
+ * **Concurrent transitions:** if two factories transition in the same
16
+ * transaction (rare — would require a host-driven setContent that crosses
17
+ * two trigger contexts), each emits independently and listeners observe a
18
+ * sequence of detail values. Consumers tracking "current trigger" stay
19
+ * correct because the final `onStart`/`onUpdate` wins; `onExit` listeners
20
+ * receive a `null` between the two activations only if the previous trigger's
21
+ * range was actually exited.
22
+ */
23
+ import type { Editor } from "@tiptap/core";
24
+ import type { TriggerChangeEventDetail } from "./types.js";
25
+ /**
26
+ * Dispatch `cds-custom-aichat-trigger-change` on the editor's DOM if the detail has
27
+ * changed since the last call for the same editor. No-op transitions are
28
+ * coalesced.
29
+ */
30
+ export declare function dispatchTriggerChange(editor: Editor, detail: TriggerChangeEventDetail | null): void;