@carbon/ai-chat-components 0.7.1 → 0.8.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 (280) hide show
  1. package/README.md +4 -1
  2. package/custom-elements.json +1705 -467
  3. package/es/components/card/src/card-footer.d.ts +1 -0
  4. package/es/components/card/src/card-footer.js +3 -2
  5. package/es/components/card/src/card-footer.js.map +1 -1
  6. package/es/components/card/src/card-footer.scss.js +1 -1
  7. package/es/components/card/src/card-steps.d.ts +1 -0
  8. package/es/components/card/src/card-steps.js +2 -1
  9. package/es/components/card/src/card-steps.js.map +1 -1
  10. package/es/components/card/src/card.d.ts +1 -0
  11. package/es/components/card/src/card.js +3 -1
  12. package/es/components/card/src/card.js.map +1 -1
  13. package/es/components/card/src/card.scss.js +1 -1
  14. package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -0
  15. package/es/components/chain-of-thought/src/chain-of-thought-step.js +5 -1
  16. package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
  17. package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +4 -0
  18. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +5 -1
  19. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
  20. package/es/components/chain-of-thought/src/chain-of-thought.d.ts +4 -0
  21. package/es/components/chain-of-thought/src/chain-of-thought.js +5 -1
  22. package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
  23. package/es/components/chain-of-thought/src/tool-call-data.d.ts +4 -0
  24. package/es/components/chain-of-thought/src/tool-call-data.js +5 -1
  25. package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
  26. package/es/components/chat-button/src/chat-button.js +4 -3
  27. package/es/components/chat-button/src/chat-button.js.map +1 -1
  28. package/es/components/chat-shell/index.d.ts +10 -0
  29. package/es/{node_modules/@carbon/utilities/es/documentLang/documentLang.js → components/chat-shell/index.js} +3 -2
  30. package/es/components/chat-shell/index.js.map +1 -0
  31. package/es/components/chat-shell/src/cds-aichat-panel.d.ts +66 -0
  32. package/es/components/chat-shell/src/cds-aichat-panel.js +433 -0
  33. package/es/components/chat-shell/src/cds-aichat-panel.js.map +1 -0
  34. package/es/components/chat-shell/src/cds-aichat-panel.scss.js +13 -0
  35. package/es/components/chat-shell/src/cds-aichat-panel.scss.js.map +1 -0
  36. package/es/components/chat-shell/src/cds-aichat-shell.d.ts +73 -0
  37. package/es/components/chat-shell/src/cds-aichat-shell.js +554 -0
  38. package/es/components/chat-shell/src/cds-aichat-shell.js.map +1 -0
  39. package/es/components/chat-shell/src/cds-aichat-shell.scss.js +13 -0
  40. package/es/components/chat-shell/src/cds-aichat-shell.scss.js.map +1 -0
  41. package/es/components/chat-shell/src/panel-manager.d.ts +29 -0
  42. package/es/components/chat-shell/src/panel-manager.js +144 -0
  43. package/es/components/chat-shell/src/panel-manager.js.map +1 -0
  44. package/es/components/chat-shell/src/workspace-manager.d.ts +118 -0
  45. package/es/components/chat-shell/src/workspace-manager.js +465 -0
  46. package/es/components/chat-shell/src/workspace-manager.js.map +1 -0
  47. package/es/components/code-snippet/src/code-snippet-card.js +2 -1
  48. package/es/components/code-snippet/src/code-snippet-card.js.map +1 -1
  49. package/es/components/code-snippet/src/code-snippet.d.ts +1 -0
  50. package/es/components/code-snippet/src/code-snippet.js +3 -1
  51. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  52. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  53. package/es/components/feedback/src/feedback-buttons.d.ts +4 -0
  54. package/es/components/feedback/src/feedback-buttons.js +6 -1
  55. package/es/components/feedback/src/feedback-buttons.js.map +1 -1
  56. package/es/components/feedback/src/feedback.d.ts +1 -0
  57. package/es/components/feedback/src/feedback.js +3 -1
  58. package/es/components/feedback/src/feedback.js.map +1 -1
  59. package/es/components/feedback/src/feedback.scss.js +1 -1
  60. package/es/components/markdown/src/markdown-token-tree.js +1 -1
  61. package/es/components/markdown/src/markdown.d.ts +4 -0
  62. package/es/components/markdown/src/markdown.js +6 -1
  63. package/es/components/markdown/src/markdown.js.map +1 -1
  64. package/es/components/markdown/src/plugins/markdownItAttrs/patterns/code.js +1 -1
  65. package/es/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js +1 -1
  66. package/es/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js +1 -1
  67. package/es/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js +1 -1
  68. package/es/components/processing/src/processing.d.ts +4 -0
  69. package/es/components/processing/src/processing.js +6 -1
  70. package/es/components/processing/src/processing.js.map +1 -1
  71. package/es/components/reasoning-steps/src/reasoning-step.d.ts +4 -0
  72. package/es/components/reasoning-steps/src/reasoning-step.js +5 -1
  73. package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  74. package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +4 -0
  75. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +6 -1
  76. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
  77. package/es/components/reasoning-steps/src/reasoning-steps.d.ts +4 -0
  78. package/es/components/reasoning-steps/src/reasoning-steps.js +5 -1
  79. package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  80. package/es/components/table/src/table.d.ts +1 -0
  81. package/es/components/table/src/table.js +5 -3
  82. package/es/components/table/src/table.js.map +1 -1
  83. package/es/components/table/src/table.template.js +2 -2
  84. package/es/components/table/src/table.template.js.map +1 -1
  85. package/es/components/toolbar/src/toolbar.js +3 -4
  86. package/es/components/toolbar/src/toolbar.js.map +1 -1
  87. package/es/components/toolbar/src/toolbar.scss.js +1 -1
  88. package/es/components/workspace-shell/src/workspace-shell-body.js +2 -1
  89. package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
  90. package/es/components/workspace-shell/src/workspace-shell-footer.js +2 -2
  91. package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  92. package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  93. package/es/components/workspace-shell/src/workspace-shell-header.js +2 -2
  94. package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
  95. package/es/components/workspace-shell/src/workspace-shell.js +2 -1
  96. package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
  97. package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  98. package/es/react/__tests__/jest.setup.js +83 -0
  99. package/es/react/__tests__/jest.setup.js.map +1 -0
  100. package/es/react/chat-shell.d.ts +12 -0
  101. package/es/react/chat-shell.js +28 -0
  102. package/es/react/chat-shell.js.map +1 -0
  103. package/es/react/panel.d.ts +4 -0
  104. package/{es-custom/react/inline-notification.js → es/react/panel.js} +12 -6
  105. package/es/react/panel.js.map +1 -0
  106. package/es/react/toolbar.d.ts +14 -2
  107. package/es/react/toolbar.js +59 -9
  108. package/es/react/toolbar.js.map +1 -1
  109. package/es/react/utils/iconTransform.d.ts +37 -0
  110. package/es/react/utils/iconTransform.js +176 -0
  111. package/es/react/utils/iconTransform.js.map +1 -0
  112. package/es-custom/components/card/src/card-footer.d.ts +1 -0
  113. package/es-custom/components/card/src/card-footer.js +3 -2
  114. package/es-custom/components/card/src/card-footer.js.map +1 -1
  115. package/es-custom/components/card/src/card-footer.scss.js +1 -1
  116. package/es-custom/components/card/src/card-steps.d.ts +1 -0
  117. package/es-custom/components/card/src/card-steps.js +2 -1
  118. package/es-custom/components/card/src/card-steps.js.map +1 -1
  119. package/es-custom/components/card/src/card.d.ts +1 -0
  120. package/es-custom/components/card/src/card.js +3 -1
  121. package/es-custom/components/card/src/card.js.map +1 -1
  122. package/es-custom/components/card/src/card.scss.js +1 -1
  123. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -0
  124. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +5 -1
  125. package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
  126. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +4 -0
  127. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +5 -1
  128. package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
  129. package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +4 -0
  130. package/es-custom/components/chain-of-thought/src/chain-of-thought.js +5 -1
  131. package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
  132. package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +4 -0
  133. package/es-custom/components/chain-of-thought/src/tool-call-data.js +5 -1
  134. package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
  135. package/es-custom/components/chat-button/src/chat-button.js +4 -3
  136. package/es-custom/components/chat-button/src/chat-button.js.map +1 -1
  137. package/es-custom/components/chat-shell/index.d.ts +10 -0
  138. package/es-custom/{node_modules/@carbon/utilities/es/documentLang/documentLang.js → components/chat-shell/index.js} +3 -2
  139. package/es-custom/components/chat-shell/index.js.map +1 -0
  140. package/es-custom/components/chat-shell/src/cds-aichat-panel.d.ts +66 -0
  141. package/es-custom/components/chat-shell/src/cds-aichat-panel.js +433 -0
  142. package/es-custom/components/chat-shell/src/cds-aichat-panel.js.map +1 -0
  143. package/es-custom/components/chat-shell/src/cds-aichat-panel.scss.js +13 -0
  144. package/es-custom/components/chat-shell/src/cds-aichat-panel.scss.js.map +1 -0
  145. package/es-custom/components/chat-shell/src/cds-aichat-shell.d.ts +73 -0
  146. package/es-custom/components/chat-shell/src/cds-aichat-shell.js +554 -0
  147. package/es-custom/components/chat-shell/src/cds-aichat-shell.js.map +1 -0
  148. package/es-custom/components/chat-shell/src/cds-aichat-shell.scss.js +13 -0
  149. package/es-custom/components/chat-shell/src/cds-aichat-shell.scss.js.map +1 -0
  150. package/es-custom/components/chat-shell/src/panel-manager.d.ts +29 -0
  151. package/es-custom/components/chat-shell/src/panel-manager.js +144 -0
  152. package/es-custom/components/chat-shell/src/panel-manager.js.map +1 -0
  153. package/es-custom/components/chat-shell/src/workspace-manager.d.ts +118 -0
  154. package/es-custom/components/chat-shell/src/workspace-manager.js +465 -0
  155. package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -0
  156. package/es-custom/components/code-snippet/src/code-snippet-card.js +2 -1
  157. package/es-custom/components/code-snippet/src/code-snippet-card.js.map +1 -1
  158. package/es-custom/components/code-snippet/src/code-snippet.d.ts +1 -0
  159. package/es-custom/components/code-snippet/src/code-snippet.js +3 -1
  160. package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
  161. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  162. package/es-custom/components/feedback/src/feedback-buttons.d.ts +4 -0
  163. package/es-custom/components/feedback/src/feedback-buttons.js +6 -1
  164. package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
  165. package/es-custom/components/feedback/src/feedback.d.ts +1 -0
  166. package/es-custom/components/feedback/src/feedback.js +3 -1
  167. package/es-custom/components/feedback/src/feedback.js.map +1 -1
  168. package/es-custom/components/feedback/src/feedback.scss.js +1 -1
  169. package/es-custom/components/markdown/src/markdown-token-tree.js +1 -1
  170. package/es-custom/components/markdown/src/markdown.d.ts +4 -0
  171. package/es-custom/components/markdown/src/markdown.js +6 -1
  172. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  173. package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.js +1 -1
  174. package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js +1 -1
  175. package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js +1 -1
  176. package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js +1 -1
  177. package/es-custom/components/processing/src/processing.d.ts +4 -0
  178. package/es-custom/components/processing/src/processing.js +6 -1
  179. package/es-custom/components/processing/src/processing.js.map +1 -1
  180. package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +4 -0
  181. package/es-custom/components/reasoning-steps/src/reasoning-step.js +5 -1
  182. package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
  183. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +4 -0
  184. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +6 -1
  185. package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
  186. package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +4 -0
  187. package/es-custom/components/reasoning-steps/src/reasoning-steps.js +5 -1
  188. package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
  189. package/es-custom/components/table/src/table.d.ts +1 -0
  190. package/es-custom/components/table/src/table.js +5 -3
  191. package/es-custom/components/table/src/table.js.map +1 -1
  192. package/es-custom/components/table/src/table.template.js +2 -2
  193. package/es-custom/components/table/src/table.template.js.map +1 -1
  194. package/es-custom/components/toolbar/src/toolbar.js +3 -4
  195. package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
  196. package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
  197. package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -1
  198. package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
  199. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +2 -2
  200. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  201. package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  202. package/es-custom/components/workspace-shell/src/workspace-shell-header.js +2 -2
  203. package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
  204. package/es-custom/components/workspace-shell/src/workspace-shell.js +2 -1
  205. package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -1
  206. package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  207. package/es-custom/react/__tests__/jest.setup.js +83 -0
  208. package/es-custom/react/__tests__/jest.setup.js.map +1 -0
  209. package/es-custom/react/chat-shell.d.ts +12 -0
  210. package/es-custom/react/chat-shell.js +28 -0
  211. package/es-custom/react/chat-shell.js.map +1 -0
  212. package/es-custom/react/panel.d.ts +4 -0
  213. package/es-custom/react/{ai-label.js → panel.js} +12 -6
  214. package/es-custom/react/panel.js.map +1 -0
  215. package/es-custom/react/toolbar.d.ts +14 -2
  216. package/es-custom/react/toolbar.js +59 -9
  217. package/es-custom/react/toolbar.js.map +1 -1
  218. package/es-custom/react/utils/iconTransform.d.ts +37 -0
  219. package/es-custom/react/utils/iconTransform.js +176 -0
  220. package/es-custom/react/utils/iconTransform.js.map +1 -0
  221. package/package.json +21 -6
  222. package/telemetry.yml +125 -2
  223. package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +0 -1
  224. package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +0 -11
  225. package/es/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +0 -1
  226. package/es/react/ai-label.d.ts +0 -4
  227. package/es/react/ai-label.js +0 -28
  228. package/es/react/ai-label.js.map +0 -1
  229. package/es/react/button.d.ts +0 -6
  230. package/es/react/button.js +0 -29
  231. package/es/react/button.js.map +0 -1
  232. package/es/react/content-switcher.d.ts +0 -7
  233. package/es/react/content-switcher.js +0 -37
  234. package/es/react/content-switcher.js.map +0 -1
  235. package/es/react/icon-button.d.ts +0 -4
  236. package/es/react/icon-button.js +0 -28
  237. package/es/react/icon-button.js.map +0 -1
  238. package/es/react/icon.d.ts +0 -4
  239. package/es/react/icon.js +0 -28
  240. package/es/react/icon.js.map +0 -1
  241. package/es/react/inline-notification.d.ts +0 -4
  242. package/es/react/inline-notification.js +0 -28
  243. package/es/react/inline-notification.js.map +0 -1
  244. package/es/react/overflow-menu.d.ts +0 -9
  245. package/es/react/overflow-menu.js +0 -40
  246. package/es/react/overflow-menu.js.map +0 -1
  247. package/es/react/tag.d.ts +0 -4
  248. package/es/react/tag.js +0 -28
  249. package/es/react/tag.js.map +0 -1
  250. package/es/react/tile.d.ts +0 -7
  251. package/es/react/tile.js +0 -34
  252. package/es/react/tile.js.map +0 -1
  253. package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +0 -1
  254. package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +0 -11
  255. package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +0 -1
  256. package/es-custom/react/ai-label.d.ts +0 -4
  257. package/es-custom/react/ai-label.js.map +0 -1
  258. package/es-custom/react/button.d.ts +0 -6
  259. package/es-custom/react/button.js +0 -29
  260. package/es-custom/react/button.js.map +0 -1
  261. package/es-custom/react/content-switcher.d.ts +0 -7
  262. package/es-custom/react/content-switcher.js +0 -37
  263. package/es-custom/react/content-switcher.js.map +0 -1
  264. package/es-custom/react/icon-button.d.ts +0 -4
  265. package/es-custom/react/icon-button.js +0 -28
  266. package/es-custom/react/icon-button.js.map +0 -1
  267. package/es-custom/react/icon.d.ts +0 -4
  268. package/es-custom/react/icon.js +0 -28
  269. package/es-custom/react/icon.js.map +0 -1
  270. package/es-custom/react/inline-notification.d.ts +0 -4
  271. package/es-custom/react/inline-notification.js.map +0 -1
  272. package/es-custom/react/overflow-menu.d.ts +0 -9
  273. package/es-custom/react/overflow-menu.js +0 -40
  274. package/es-custom/react/overflow-menu.js.map +0 -1
  275. package/es-custom/react/tag.d.ts +0 -4
  276. package/es-custom/react/tag.js +0 -28
  277. package/es-custom/react/tag.js.map +0 -1
  278. package/es-custom/react/tile.d.ts +0 -7
  279. package/es-custom/react/tile.js +0 -34
  280. package/es-custom/react/tile.js.map +0 -1
@@ -5,5 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- const t=typeof document<"u";t?document.documentElement.lang:"";
9
- //# sourceMappingURL=documentLang.js.map
8
+ import './src/cds-aichat-shell.js';
9
+ import './src/cds-aichat-panel.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
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 { LitElement, PropertyValues } from "lit";
10
+ declare class CdsAiChatPanel extends LitElement {
11
+ static styles: any;
12
+ /**
13
+ * Controls whether the panel is open or closed
14
+ */
15
+ open: boolean;
16
+ /**
17
+ * Sets the stacking priority of the panel (higher values appear on top)
18
+ */
19
+ priority: number;
20
+ /**
21
+ * Makes the panel take up the full width of its container
22
+ */
23
+ fullWidth: boolean;
24
+ /**
25
+ * Shows the chat header in the panel
26
+ */
27
+ showChatHeader: boolean;
28
+ /**
29
+ * Shows a frame border around the panel
30
+ */
31
+ showFrame: boolean;
32
+ /**
33
+ * Specifies the animation to use when opening the panel
34
+ */
35
+ animationOnOpen?: string;
36
+ /**
37
+ * Specifies the animation to use when closing the panel
38
+ */
39
+ animationOnClose?: string;
40
+ /**
41
+ * Makes the panel inert (non-interactive)
42
+ */
43
+ inert: boolean;
44
+ connectedCallback(): void;
45
+ disconnectedCallback(): void;
46
+ protected firstUpdated(changedProps: PropertyValues): void;
47
+ protected updated(changedProperties: PropertyValues): void;
48
+ private updateVisibilityState;
49
+ private openPanel;
50
+ private closePanel;
51
+ private completeOpen;
52
+ private completeClose;
53
+ private updateHostClasses;
54
+ private updateAnimationClass;
55
+ private shouldWaitForAnimation;
56
+ private scheduleAnimationFallback;
57
+ private clearAnimationFallback;
58
+ private setupResizeObserver;
59
+ private cleanupResizeObserver;
60
+ private getMessagesMaxWidth;
61
+ private updateWidthClass;
62
+ private hasSlotContent;
63
+ private observeSlotContent;
64
+ render(): import("lit-html").TemplateResult<1>;
65
+ }
66
+ export default CdsAiChatPanel;
@@ -0,0 +1,433 @@
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 { __decorate } from 'tslib';
9
+ import { LitElement, html } from 'lit';
10
+ import { property } from 'lit/decorators.js';
11
+ import { carbonElement } from '../../../globals/decorators/carbon-element.js';
12
+ import styles from './cds-aichat-panel.scss.js';
13
+
14
+ /**
15
+ * @license
16
+ *
17
+ * Copyright IBM Corp. 2025
18
+ *
19
+ * This source code is licensed under the Apache-2.0 license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ var CdsAiChatPanel_1;
23
+ const ANIMATION_START_DETECTION_DELAY_MS = 120;
24
+ const MESSAGES_MAX_WIDTH_FALLBACK = 672; // Fallback if CSS custom property is not set
25
+ let CdsAiChatPanel = CdsAiChatPanel_1 = class CdsAiChatPanel extends LitElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ /**
29
+ * Controls whether the panel is open or closed
30
+ */
31
+ this.open = false;
32
+ /**
33
+ * Sets the stacking priority of the panel (higher values appear on top)
34
+ */
35
+ this.priority = 0;
36
+ /**
37
+ * Makes the panel take up the full width of its container
38
+ */
39
+ this.fullWidth = false;
40
+ /**
41
+ * Shows the chat header in the panel
42
+ */
43
+ this.showChatHeader = false;
44
+ /**
45
+ * Shows a frame border around the panel
46
+ */
47
+ this.showFrame = false;
48
+ /**
49
+ * Makes the panel inert (non-interactive)
50
+ */
51
+ this.inert = false;
52
+ /**
53
+ * @internal
54
+ */
55
+ this.pendingAnimation = null;
56
+ /**
57
+ * @internal
58
+ */
59
+ this.animationStarted = false;
60
+ /**
61
+ * @internal
62
+ */
63
+ this.animationFallbackId = null;
64
+ /**
65
+ * @internal
66
+ */
67
+ this.animationState = "closed";
68
+ /**
69
+ * @internal
70
+ */
71
+ this.hasHeaderContent = false;
72
+ /**
73
+ * @internal
74
+ */
75
+ this.hasBodyContent = false;
76
+ /**
77
+ * @internal
78
+ */
79
+ this.hasFooterContent = false;
80
+ /**
81
+ * @internal
82
+ */
83
+ this.handleAnimationStart = (event) => {
84
+ if (event.target !== this) {
85
+ return;
86
+ }
87
+ this.animationStarted = true;
88
+ };
89
+ /**
90
+ * @internal
91
+ */
92
+ this.handleAnimationEnd = (event) => {
93
+ if (event.target !== this) {
94
+ return;
95
+ }
96
+ if (this.pendingAnimation === "opening" &&
97
+ this.animationState === "opening") {
98
+ this.completeOpen();
99
+ return;
100
+ }
101
+ if (this.pendingAnimation === "closing" &&
102
+ this.animationState === "closing") {
103
+ this.completeClose();
104
+ }
105
+ };
106
+ }
107
+ connectedCallback() {
108
+ super.connectedCallback();
109
+ this.classList.add("panel", "panel-container");
110
+ this.addEventListener("animationstart", this.handleAnimationStart);
111
+ this.addEventListener("animationend", this.handleAnimationEnd);
112
+ this.setupResizeObserver();
113
+ }
114
+ disconnectedCallback() {
115
+ this.removeEventListener("animationstart", this.handleAnimationStart);
116
+ this.removeEventListener("animationend", this.handleAnimationEnd);
117
+ this.clearAnimationFallback();
118
+ this.pendingAnimation = null;
119
+ this.cleanupResizeObserver();
120
+ super.disconnectedCallback();
121
+ }
122
+ firstUpdated(changedProps) {
123
+ super.firstUpdated(changedProps);
124
+ if (this.open && !this.inert) {
125
+ this.animationState = "open";
126
+ }
127
+ else {
128
+ this.animationState = "closed";
129
+ }
130
+ this.classList.toggle("panel--with-chat-header", this.showChatHeader);
131
+ this.classList.toggle("panel--with-frame", this.showFrame);
132
+ this.classList.toggle("panel--full-width", this.fullWidth);
133
+ this.updateHostClasses();
134
+ this.observeSlotContent();
135
+ }
136
+ updated(changedProperties) {
137
+ if (changedProperties.has("open") || changedProperties.has("inert")) {
138
+ this.updateVisibilityState();
139
+ }
140
+ if (changedProperties.has("showChatHeader")) {
141
+ this.classList.toggle("panel--with-chat-header", this.showChatHeader);
142
+ }
143
+ if (changedProperties.has("showFrame")) {
144
+ this.classList.toggle("panel--with-frame", this.showFrame);
145
+ }
146
+ if (changedProperties.has("fullWidth")) {
147
+ this.classList.toggle("panel--full-width", this.fullWidth);
148
+ }
149
+ if (changedProperties.has("animationOnOpen") ||
150
+ changedProperties.has("animationOnClose")) {
151
+ this.updateHostClasses();
152
+ }
153
+ }
154
+ updateVisibilityState() {
155
+ const shouldBeOpen = this.open && !this.inert;
156
+ if (shouldBeOpen) {
157
+ if (this.animationState === "open" || this.animationState === "opening") {
158
+ this.updateHostClasses();
159
+ return;
160
+ }
161
+ this.openPanel();
162
+ }
163
+ else {
164
+ if (this.animationState === "closed" ||
165
+ this.animationState === "closing") {
166
+ this.updateHostClasses();
167
+ return;
168
+ }
169
+ this.closePanel();
170
+ }
171
+ }
172
+ openPanel() {
173
+ this.dispatchEvent(new CustomEvent("openstart", { bubbles: true, composed: true }));
174
+ this.clearAnimationFallback();
175
+ this.pendingAnimation = "opening";
176
+ this.animationStarted = false;
177
+ this.animationState = "opening";
178
+ this.updateHostClasses();
179
+ if (!this.shouldWaitForAnimation(this.animationOnOpen)) {
180
+ this.completeOpen();
181
+ return;
182
+ }
183
+ this.scheduleAnimationFallback();
184
+ }
185
+ closePanel() {
186
+ this.dispatchEvent(new CustomEvent("closestart", { bubbles: true, composed: true }));
187
+ this.clearAnimationFallback();
188
+ this.pendingAnimation = "closing";
189
+ this.animationStarted = false;
190
+ this.animationState = "closing";
191
+ this.updateHostClasses();
192
+ if (!this.shouldWaitForAnimation(this.animationOnClose)) {
193
+ this.completeClose();
194
+ return;
195
+ }
196
+ this.scheduleAnimationFallback();
197
+ }
198
+ completeOpen() {
199
+ this.clearAnimationFallback();
200
+ if (this.pendingAnimation === "opening") {
201
+ this.pendingAnimation = null;
202
+ }
203
+ if (this.animationState !== "opening") {
204
+ return;
205
+ }
206
+ this.animationStarted = false;
207
+ this.animationState = "open";
208
+ this.updateHostClasses();
209
+ this.dispatchEvent(new CustomEvent("openend", { bubbles: true, composed: true }));
210
+ }
211
+ completeClose() {
212
+ this.clearAnimationFallback();
213
+ if (this.pendingAnimation === "closing") {
214
+ this.pendingAnimation = null;
215
+ }
216
+ if (this.animationState !== "closing") {
217
+ return;
218
+ }
219
+ this.animationStarted = false;
220
+ this.animationState = "closed";
221
+ this.updateHostClasses();
222
+ this.dispatchEvent(new CustomEvent("closeend", { bubbles: true, composed: true }));
223
+ }
224
+ updateHostClasses() {
225
+ this.classList.toggle("panel-container--animating", this.animationState === "opening" || this.animationState === "closing");
226
+ this.classList.toggle("panel--open", this.animationState === "open");
227
+ this.classList.toggle("panel--closed", this.animationState === "closed");
228
+ this.updateAnimationClass("opening", this.animationOnOpen, this.animationState === "opening");
229
+ this.updateAnimationClass("closing", this.animationOnClose, this.animationState === "closing");
230
+ }
231
+ updateAnimationClass(type, animation, shouldApply) {
232
+ const prefix = `panel--${type}--`;
233
+ if (type === "opening" && this.currentOpeningClass) {
234
+ this.classList.remove(this.currentOpeningClass);
235
+ this.currentOpeningClass = undefined;
236
+ }
237
+ if (type === "closing" && this.currentClosingClass) {
238
+ this.classList.remove(this.currentClosingClass);
239
+ this.currentClosingClass = undefined;
240
+ }
241
+ if (!animation || !shouldApply) {
242
+ return;
243
+ }
244
+ const className = `${prefix}${animation}`;
245
+ this.classList.add(className);
246
+ if (type === "opening") {
247
+ this.currentOpeningClass = className;
248
+ }
249
+ else {
250
+ this.currentClosingClass = className;
251
+ }
252
+ }
253
+ shouldWaitForAnimation(animation) {
254
+ if (!animation) {
255
+ return false;
256
+ }
257
+ if (typeof window === "undefined") {
258
+ return false;
259
+ }
260
+ if (typeof window.matchMedia === "function" &&
261
+ window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
262
+ return false;
263
+ }
264
+ return true;
265
+ }
266
+ scheduleAnimationFallback() {
267
+ if (typeof window === "undefined") {
268
+ return;
269
+ }
270
+ this.clearAnimationFallback();
271
+ this.animationFallbackId = window.setTimeout(() => {
272
+ if (this.animationStarted) {
273
+ return;
274
+ }
275
+ if (this.pendingAnimation === "opening") {
276
+ this.completeOpen();
277
+ return;
278
+ }
279
+ if (this.pendingAnimation === "closing") {
280
+ this.completeClose();
281
+ }
282
+ }, ANIMATION_START_DETECTION_DELAY_MS);
283
+ }
284
+ clearAnimationFallback() {
285
+ if (this.animationFallbackId !== null && typeof window !== "undefined") {
286
+ window.clearTimeout(this.animationFallbackId);
287
+ }
288
+ this.animationFallbackId = null;
289
+ }
290
+ setupResizeObserver() {
291
+ if (typeof window === "undefined" ||
292
+ typeof ResizeObserver === "undefined") {
293
+ return;
294
+ }
295
+ this.resizeObserver = new ResizeObserver((entries) => {
296
+ for (const entry of entries) {
297
+ const width = entry.contentRect.width;
298
+ this.updateWidthClass(width);
299
+ }
300
+ });
301
+ this.resizeObserver.observe(this);
302
+ }
303
+ cleanupResizeObserver() {
304
+ if (this.resizeObserver) {
305
+ this.resizeObserver.disconnect();
306
+ this.resizeObserver = undefined;
307
+ }
308
+ }
309
+ getMessagesMaxWidth() {
310
+ if (typeof window === "undefined") {
311
+ return MESSAGES_MAX_WIDTH_FALLBACK;
312
+ }
313
+ const computedStyle = window.getComputedStyle(this);
314
+ const customPropValue = computedStyle
315
+ .getPropertyValue("--cds-aichat-messages-max-width")
316
+ .trim();
317
+ if (customPropValue) {
318
+ // Parse the value (e.g., "672px" -> 672)
319
+ const parsed = parseFloat(customPropValue);
320
+ if (!isNaN(parsed)) {
321
+ return parsed;
322
+ }
323
+ }
324
+ return MESSAGES_MAX_WIDTH_FALLBACK;
325
+ }
326
+ updateWidthClass(width) {
327
+ const maxWidth = this.getMessagesMaxWidth();
328
+ const isNarrow = width <= maxWidth;
329
+ this.classList.toggle("panel--with-less-than-messages-max-width", isNarrow);
330
+ }
331
+ hasSlotContent(slotName) {
332
+ const slot = this.renderRoot.querySelector(`slot[name="${slotName}"]`);
333
+ if (!slot) {
334
+ return false;
335
+ }
336
+ return slot
337
+ .assignedNodes({ flatten: true })
338
+ .some((node) => node.nodeType === Node.ELEMENT_NODE ||
339
+ (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()));
340
+ }
341
+ observeSlotContent() {
342
+ const updateSlotStates = () => {
343
+ const previousStates = new Map(CdsAiChatPanel_1.OBSERVED_SLOTS.map(({ stateKey }) => [
344
+ stateKey,
345
+ this[stateKey],
346
+ ]));
347
+ CdsAiChatPanel_1.OBSERVED_SLOTS.forEach(({ name, stateKey }) => {
348
+ this[stateKey] = this.hasSlotContent(name);
349
+ });
350
+ const hasChanged = CdsAiChatPanel_1.OBSERVED_SLOTS.some(({ stateKey }) => previousStates.get(stateKey) !== this[stateKey]);
351
+ if (hasChanged) {
352
+ this.requestUpdate();
353
+ }
354
+ };
355
+ // Initial check
356
+ updateSlotStates();
357
+ // Observe slot changes
358
+ const slots = CdsAiChatPanel_1.OBSERVED_SLOTS.map(({ name }) => this.renderRoot.querySelector(`slot[name="${name}"]`)).filter((slot) => slot !== null);
359
+ slots.forEach((slot) => {
360
+ slot.addEventListener("slotchange", updateSlotStates);
361
+ });
362
+ }
363
+ render() {
364
+ const headerClasses = [
365
+ "panel-header",
366
+ this.hasHeaderContent ? "has-content" : "",
367
+ ]
368
+ .filter(Boolean)
369
+ .join(" ");
370
+ const bodyClasses = ["panel-body", this.hasBodyContent ? "has-content" : ""]
371
+ .filter(Boolean)
372
+ .join(" ");
373
+ const footerClasses = [
374
+ "panel-footer",
375
+ this.hasFooterContent ? "has-content" : "",
376
+ ]
377
+ .filter(Boolean)
378
+ .join(" ");
379
+ return html `
380
+ <div class="panel-content">
381
+ <div class=${headerClasses}>
382
+ <slot name="header"></slot>
383
+ </div>
384
+ <div class=${bodyClasses}>
385
+ <slot name="body"></slot>
386
+ </div>
387
+ <div class=${footerClasses}>
388
+ <slot name="footer"></slot>
389
+ </div>
390
+ </div>
391
+ `;
392
+ }
393
+ };
394
+ CdsAiChatPanel.styles = styles;
395
+ /**
396
+ * @internal
397
+ */
398
+ CdsAiChatPanel.OBSERVED_SLOTS = [
399
+ { name: "header", stateKey: "hasHeaderContent" },
400
+ { name: "body", stateKey: "hasBodyContent" },
401
+ { name: "footer", stateKey: "hasFooterContent" },
402
+ ];
403
+ __decorate([
404
+ property({ type: Boolean, reflect: true })
405
+ ], CdsAiChatPanel.prototype, "open", void 0);
406
+ __decorate([
407
+ property({ type: Number, reflect: true })
408
+ ], CdsAiChatPanel.prototype, "priority", void 0);
409
+ __decorate([
410
+ property({ type: Boolean, attribute: "full-width", reflect: true })
411
+ ], CdsAiChatPanel.prototype, "fullWidth", void 0);
412
+ __decorate([
413
+ property({ type: Boolean, attribute: "show-chat-header", reflect: true })
414
+ ], CdsAiChatPanel.prototype, "showChatHeader", void 0);
415
+ __decorate([
416
+ property({ type: Boolean, attribute: "show-frame", reflect: true })
417
+ ], CdsAiChatPanel.prototype, "showFrame", void 0);
418
+ __decorate([
419
+ property({ type: String, attribute: "animation-on-open", reflect: true })
420
+ ], CdsAiChatPanel.prototype, "animationOnOpen", void 0);
421
+ __decorate([
422
+ property({ type: String, attribute: "animation-on-close", reflect: true })
423
+ ], CdsAiChatPanel.prototype, "animationOnClose", void 0);
424
+ __decorate([
425
+ property({ type: Boolean, reflect: true })
426
+ ], CdsAiChatPanel.prototype, "inert", void 0);
427
+ CdsAiChatPanel = CdsAiChatPanel_1 = __decorate([
428
+ carbonElement("cds-aichat-panel")
429
+ ], CdsAiChatPanel);
430
+ var CdsAiChatPanelElement = CdsAiChatPanel;
431
+
432
+ export { CdsAiChatPanelElement as default };
433
+ //# sourceMappingURL=cds-aichat-panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cds-aichat-panel.js","sources":["../../../../src/components/chat-shell/src/cds-aichat-panel.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;;AAOH,MAAM,kCAAkC,GAAG,GAAG;AAC9C,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAKxC,IAAM,cAAc,GAAA,gBAAA,GAApB,MAAM,cAAe,SAAQ,UAAU,CAAA;AAAvC,IAAA,WAAA,GAAA;;AAYE;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,KAAK;AAEZ;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAG,CAAC;AAEZ;;AAEG;QAEH,IAAA,CAAA,SAAS,GAAG,KAAK;AAEjB;;AAEG;QAEH,IAAA,CAAA,cAAc,GAAG,KAAK;AAEtB;;AAEG;QAEH,IAAA,CAAA,SAAS,GAAG,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,IAAI,EAAE;AAClD,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAMvB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE;AACjD,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAMlB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE;AAChD,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAMzB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE;AAChD,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AAM1B,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC5B,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AA1DV,cAAc,GAAA,gBAAA,GAAA,UAAA,CAAA;IADnB,aAAa,CAAC,kBAAkB;AAC3B,CAAA,EAAA,cAAc,CA0gBnB;AAED,4BAAe,cAAc;;;;"}
@@ -0,0 +1,13 @@
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 { css } from 'lit';
9
+
10
+ var styles = css([":host{block-size:100%;border-end-end-radius:var(--cds-aichat-rounded-modifier-radius-end-end,0);border-end-start-radius:var(--cds-aichat-rounded-modifier-radius-end-start,0);border-start-end-radius:var(--cds-aichat-rounded-modifier-radius-start-start,0);border-start-start-radius:var(--cds-aichat-rounded-modifier-radius-start-end,0);box-sizing:border-box;display:block;inline-size:100%;inset-block-start:0;inset-inline-start:0;margin:0;min-block-size:100%;position:absolute;text-align:start}:host(.panel--with-less-than-messages-max-width){--cds-aichat-rounded-modifier-radius-end-start:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem));--cds-aichat-rounded-modifier-radius-end-end:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem))}:host(.panel--full-width){--cds-aichat-rounded-modifier-radius-end-start:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem));--cds-aichat-rounded-modifier-radius-end-end:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem))}:host(.panel--full-width:not(.panel--with-chat-header)){--cds-aichat-rounded-modifier-radius-start-start:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem));--cds-aichat-rounded-modifier-radius-start-end:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem))}:host(.panel--with-less-than-messages-max-width:not(.panel--with-chat-header)){--cds-aichat-rounded-modifier-radius-start-start:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem));--cds-aichat-rounded-modifier-radius-start-end:var(--cds-aichat-rounded-radius,var(--cds-aichat-rounded-modifier-radius,0.5rem))}:host(.panel-container--animating){overflow:hidden}:host(.panel--closed){display:none}:host-context([dir=rtl]){inset-inline:unset 0;text-align:end}@media screen and (prefers-reduced-motion:no-preference){:host(.panel--opening--fade-in){animation:cds-aichat-fade-in .24s cubic-bezier(0,0,.3,1) both}:host(.panel--opening--slide-in-from-bottom){animation:cds-aichat-slide-in-from-bottom .24s cubic-bezier(.4,.14,1,1) both}:host(.panel--closing--fade-out){animation:cds-aichat-fade-out .24s cubic-bezier(.4,.14,1,1) both}:host(.panel--closing--slide-out-to-top){animation:cds-aichat-slide-out-to-top .15s cubic-bezier(.4,.14,1,1) both}:host(.panel--closing--slide-out-to-bottom){animation:cds-aichat-slide-out-to-bottom .15s cubic-bezier(.4,.14,1,1) both}}:host(.panel--with-chat-header){block-size:calc(100% - var(--cds-aichat--header-height, 0px));border-start-end-radius:0;border-start-start-radius:0;inline-size:100%;inset-block-start:var(--cds-aichat--header-height,0);inset-inline-start:50%;max-inline-size:var(--cds-aichat-max-width,100%);min-block-size:calc(100% - var(--cds-aichat--header-height, 0px));overflow:hidden;transform:translateX(-50%)}@media screen and (prefers-reduced-motion:no-preference){:host(.panel--with-chat-header.panel--opening--slide-in-from-bottom){animation:cds-aichat-slide-in-from-bottom-with-header .24s cubic-bezier(.4,.14,1,1) both}:host(.panel--with-chat-header.panel--closing--slide-out-to-bottom){animation:cds-aichat-slide-out-to-bottom-with-header .15s cubic-bezier(.4,.14,1,1) both}}.panel-content{block-size:100%;border-end-end-radius:var(--cds-aichat-rounded-modifier-radius-end-end,0);border-end-start-radius:var(--cds-aichat-rounded-modifier-radius-end-start,0);border-start-end-radius:var(--cds-aichat-rounded-modifier-radius-start-end,0);border-start-start-radius:var(--cds-aichat-rounded-modifier-radius-start-start,0);box-sizing:border-box;display:flex;flex-direction:column;inline-size:100%;margin:auto;max-inline-size:var(--cds-aichat-messages-max-width,672px)}:host([show-frame]) .panel-content{background-color:var(--cds-chat-shell-background,#fff);border:1px solid var(--cds-chat-bubble-border,#e0e0e0)}:host(.panel--full-width) .panel-content{background-color:transparent;max-inline-size:100%}.panel-footer,.panel-header{flex:0 0 auto}.panel-body{flex:1 1 auto}.panel-body.has-content{padding-block-end:1rem;padding-block-start:1rem;padding-inline-end:1rem;padding-inline-start:1rem}@keyframes cds-aichat-fade-in{0%{inset-inline-end:0;opacity:0}to{inset-inline-end:0;opacity:1}}@keyframes cds-aichat-fade-out{0%{opacity:1}to{opacity:0}}@keyframes cds-aichat-slide-in-from-bottom{0%{inset-block-start:100%}to{inset-block-start:0}}@keyframes cds-aichat-slide-out-to-bottom{0%{inset-block-start:0}to{inset-block-start:100%}}@keyframes cds-aichat-slide-in-from-bottom-with-header{0%{inset-block-start:100%}to{inset-block-start:var(--cds-aichat--header-height,0)}}@keyframes cds-aichat-slide-out-to-bottom-with-header{0%{inset-block-start:var(--cds-aichat--header-height,0)}to{inset-block-start:100%}}"]);
11
+
12
+ export { styles as default };
13
+ //# sourceMappingURL=cds-aichat-panel.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cds-aichat-panel.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2025
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 { LitElement, PropertyValues } from "lit";
10
+ import "./cds-aichat-panel.js";
11
+ type StartOrEnd = "start" | "end";
12
+ declare class CdsAiChatShell extends LitElement {
13
+ static styles: any;
14
+ /**
15
+ * Enables AI-specific theming for the chat shell
16
+ */
17
+ aiEnabled: boolean;
18
+ /**
19
+ * Shows a frame border around the chat shell
20
+ */
21
+ showFrame: boolean;
22
+ /**
23
+ * Applies rounded corners to the chat shell
24
+ */
25
+ roundedCorners: boolean;
26
+ /**
27
+ * Shows the history panel in the chat shell
28
+ */
29
+ showHistory: boolean;
30
+ /**
31
+ * Shows the workspace panel in the chat shell
32
+ */
33
+ showWorkspace: boolean;
34
+ /**
35
+ * Determines the location of the workspace panel ("start" or "end")
36
+ */
37
+ workspaceLocation: StartOrEnd;
38
+ /**
39
+ * Determines the location of the history panel ("start" or "end")
40
+ */
41
+ historyLocation: StartOrEnd;
42
+ private getWidgetClasses;
43
+ private getInputAndMessagesClasses;
44
+ private renderSlot;
45
+ private getSlotContentState;
46
+ private renderWorkspaceInline;
47
+ private renderWorkspacePanel;
48
+ private renderHeader;
49
+ private renderHeaderSlot;
50
+ private renderMessagesSection;
51
+ private renderHistory;
52
+ render(): import("lit-html").TemplateResult<1>;
53
+ protected firstUpdated(changedProperties: PropertyValues): void;
54
+ private hasSlotContent;
55
+ private observeSlotContent;
56
+ protected updated(changedProperties: PropertyValues): void;
57
+ disconnectedCallback(): void;
58
+ private observeInputAndMessagesWidth;
59
+ private observeMainContentBodyWidth;
60
+ private getCssLengthFromProperty;
61
+ private getMessagesMaxWidth;
62
+ private observeHeaderHeight;
63
+ /**
64
+ * Observe CSS custom properties that affect messages max width.
65
+ * When --cds-aichat-messages-max-width changes, recalculate the at-max-width state.
66
+ */
67
+ private observeCssProperties;
68
+ /**
69
+ * Check if --cds-aichat-messages-max-width has changed and trigger recalculation.
70
+ */
71
+ private checkMessagesMaxWidthChange;
72
+ }
73
+ export default CdsAiChatShell;