@carbon/ai-chat-components 0.8.0 → 0.9.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 (105) hide show
  1. package/README.md +1 -0
  2. package/custom-elements.json +917 -258
  3. package/es/components/card/src/card-footer.scss.js +1 -1
  4. package/es/components/card/src/card-steps.scss.js +1 -1
  5. package/es/components/card/src/card.scss.js +1 -1
  6. package/es/components/chat-button/src/chat-button.scss.js +1 -1
  7. package/es/components/chat-shell/index.d.ts +2 -2
  8. package/es/components/chat-shell/index.js +2 -2
  9. package/es/components/chat-shell/src/{cds-aichat-panel.d.ts → panel.d.ts} +11 -2
  10. package/es/components/chat-shell/src/{cds-aichat-panel.js → panel.js} +79 -26
  11. package/es/components/chat-shell/src/panel.js.map +1 -0
  12. package/es/components/chat-shell/src/panel.scss.js +13 -0
  13. package/es/components/chat-shell/src/panel.scss.js.map +1 -0
  14. package/es/components/chat-shell/src/{cds-aichat-shell.d.ts → shell.d.ts} +20 -3
  15. package/es/components/chat-shell/src/{cds-aichat-shell.js → shell.js} +298 -97
  16. package/es/components/chat-shell/src/shell.js.map +1 -0
  17. package/es/components/chat-shell/src/shell.scss.js +13 -0
  18. package/es/components/chat-shell/src/shell.scss.js.map +1 -0
  19. package/es/components/chat-shell/src/workspace-manager-utils.d.ts +90 -0
  20. package/es/components/chat-shell/src/workspace-manager-utils.js +120 -0
  21. package/es/components/chat-shell/src/workspace-manager-utils.js.map +1 -0
  22. package/es/components/chat-shell/src/workspace-manager.d.ts +52 -8
  23. package/es/components/chat-shell/src/workspace-manager.js +330 -117
  24. package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
  25. package/es/components/code-snippet/src/code-snippet.d.ts +27 -11
  26. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  27. package/es/components/markdown/src/markdown.js +1 -1
  28. package/es/components/markdown/src/markdown.js.map +1 -1
  29. package/es/components/toolbar/src/toolbar.d.ts +4 -0
  30. package/es/components/toolbar/src/toolbar.js +62 -28
  31. package/es/components/toolbar/src/toolbar.js.map +1 -1
  32. package/es/components/toolbar/src/toolbar.scss.js +1 -1
  33. package/es/components/workspace-shell/src/workspace-shell-footer.js +6 -1
  34. package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  35. package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  36. package/es/components/workspace-shell/src/workspace-shell.d.ts +0 -1
  37. package/es/components/workspace-shell/src/workspace-shell.js +0 -6
  38. package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
  39. package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  40. package/es/react/chat-shell.d.ts +3 -3
  41. package/es/react/chat-shell.js +4 -4
  42. package/es/react/chat-shell.js.map +1 -1
  43. package/es/react/panel.d.ts +3 -3
  44. package/es/react/panel.js +5 -4
  45. package/es/react/panel.js.map +1 -1
  46. package/es/react/toolbar.js +1 -1
  47. package/es/react/toolbar.js.map +1 -1
  48. package/es-custom/components/card/src/card-footer.scss.js +1 -1
  49. package/es-custom/components/card/src/card-steps.scss.js +1 -1
  50. package/es-custom/components/card/src/card.scss.js +1 -1
  51. package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
  52. package/es-custom/components/chat-shell/index.d.ts +2 -2
  53. package/es-custom/components/chat-shell/index.js +2 -2
  54. package/es-custom/components/chat-shell/src/{cds-aichat-panel.d.ts → panel.d.ts} +11 -2
  55. package/es-custom/components/chat-shell/src/{cds-aichat-panel.js → panel.js} +79 -26
  56. package/es-custom/components/chat-shell/src/panel.js.map +1 -0
  57. package/es-custom/components/chat-shell/src/panel.scss.js +13 -0
  58. package/es-custom/components/chat-shell/src/panel.scss.js.map +1 -0
  59. package/es-custom/components/chat-shell/src/{cds-aichat-shell.d.ts → shell.d.ts} +20 -3
  60. package/es-custom/components/chat-shell/src/{cds-aichat-shell.js → shell.js} +298 -97
  61. package/es-custom/components/chat-shell/src/shell.js.map +1 -0
  62. package/es-custom/components/chat-shell/src/shell.scss.js +13 -0
  63. package/es-custom/components/chat-shell/src/shell.scss.js.map +1 -0
  64. package/es-custom/components/chat-shell/src/workspace-manager-utils.d.ts +90 -0
  65. package/es-custom/components/chat-shell/src/workspace-manager-utils.js +120 -0
  66. package/es-custom/components/chat-shell/src/workspace-manager-utils.js.map +1 -0
  67. package/es-custom/components/chat-shell/src/workspace-manager.d.ts +52 -8
  68. package/es-custom/components/chat-shell/src/workspace-manager.js +330 -117
  69. package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
  70. package/es-custom/components/code-snippet/src/code-snippet.d.ts +27 -11
  71. package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
  72. package/es-custom/components/markdown/src/markdown.js +1 -1
  73. package/es-custom/components/markdown/src/markdown.js.map +1 -1
  74. package/es-custom/components/toolbar/src/toolbar.d.ts +4 -0
  75. package/es-custom/components/toolbar/src/toolbar.js +62 -28
  76. package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
  77. package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
  78. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +6 -1
  79. package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  80. package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
  81. package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +0 -1
  82. package/es-custom/components/workspace-shell/src/workspace-shell.js +0 -6
  83. package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -1
  84. package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  85. package/es-custom/react/chat-shell.d.ts +3 -3
  86. package/es-custom/react/chat-shell.js +4 -4
  87. package/es-custom/react/chat-shell.js.map +1 -1
  88. package/es-custom/react/panel.d.ts +3 -3
  89. package/es-custom/react/panel.js +5 -4
  90. package/es-custom/react/panel.js.map +1 -1
  91. package/es-custom/react/toolbar.js +1 -1
  92. package/es-custom/react/toolbar.js.map +1 -1
  93. package/package.json +13 -10
  94. package/es/components/chat-shell/src/cds-aichat-panel.js.map +0 -1
  95. package/es/components/chat-shell/src/cds-aichat-panel.scss.js +0 -13
  96. package/es/components/chat-shell/src/cds-aichat-panel.scss.js.map +0 -1
  97. package/es/components/chat-shell/src/cds-aichat-shell.js.map +0 -1
  98. package/es/components/chat-shell/src/cds-aichat-shell.scss.js +0 -13
  99. package/es/components/chat-shell/src/cds-aichat-shell.scss.js.map +0 -1
  100. package/es-custom/components/chat-shell/src/cds-aichat-panel.js.map +0 -1
  101. package/es-custom/components/chat-shell/src/cds-aichat-panel.scss.js +0 -13
  102. package/es-custom/components/chat-shell/src/cds-aichat-panel.scss.js.map +0 -1
  103. package/es-custom/components/chat-shell/src/cds-aichat-shell.js.map +0 -1
  104. package/es-custom/components/chat-shell/src/cds-aichat-shell.scss.js +0 -13
  105. package/es-custom/components/chat-shell/src/cds-aichat-shell.scss.js.map +0 -1
@@ -8,11 +8,11 @@
8
8
  import { __decorate } from 'tslib';
9
9
  import { LitElement, nothing, html } from 'lit';
10
10
  import { property } from 'lit/decorators.js';
11
- import styles from './cds-aichat-shell.scss.js';
11
+ import styles from './shell.scss.js';
12
12
  import { PanelManager } from './panel-manager.js';
13
13
  import { WorkspaceManager } from './workspace-manager.js';
14
14
  import { carbonElement } from '../../../globals/decorators/carbon-element.js';
15
- import './cds-aichat-panel.js';
15
+ import './panel.js';
16
16
 
17
17
  /**
18
18
  * @license
@@ -22,8 +22,8 @@ import './cds-aichat-panel.js';
22
22
  * This source code is licensed under the Apache-2.0 license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
24
  */
25
- var CdsAiChatShell_1;
26
- let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement {
25
+ var CDSAIChatShell_1;
26
+ let CDSAIChatShell = CDSAIChatShell_1 = class CDSAIChatShell extends LitElement {
27
27
  constructor() {
28
28
  super(...arguments);
29
29
  /**
@@ -55,17 +55,25 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
55
55
  */
56
56
  this.historyLocation = "start";
57
57
  /**
58
- * @internal
58
+ * ARIA label for the workspace region
59
59
  */
60
- this.hasHeaderContent = false;
60
+ this.workspaceAriaLabel = "Workspace panel";
61
+ /**
62
+ * ARIA label for the history region
63
+ */
64
+ this.historyAriaLabel = "Conversation history";
65
+ /**
66
+ * ARIA label for the messages region
67
+ */
68
+ this.messagesAriaLabel = "Chat messages";
61
69
  /**
62
70
  * @internal
63
71
  */
64
- this.hasHeaderAfterContent = false;
72
+ this.hasHeaderContent = false;
65
73
  /**
66
74
  * @internal
67
75
  */
68
- this.hasMessagesBeforeContent = false;
76
+ this.hasHeaderAfterContent = false;
69
77
  /**
70
78
  * @internal
71
79
  */
@@ -85,15 +93,55 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
85
93
  /**
86
94
  * @internal
87
95
  */
88
- this.hasMessagesAfterContent = false;
96
+ this.inputAndMessagesAtMaxWidth = false;
89
97
  /**
90
98
  * @internal
91
99
  */
92
- this.inputAndMessagesAtMaxWidth = false;
100
+ this.shouldRenderHistory = true;
93
101
  /**
94
102
  * @internal
95
103
  */
96
- this.shouldRenderHistory = true;
104
+ this.workspacePanelRendering = false;
105
+ /**
106
+ * @internal
107
+ */
108
+ this.workspacePanelOpen = false;
109
+ /**
110
+ * @internal
111
+ */
112
+ this.lastShouldRenderWorkspacePanel = false;
113
+ /**
114
+ * @internal
115
+ */
116
+ this.workspacePanelOpenScheduled = false;
117
+ /**
118
+ * @internal
119
+ */
120
+ this.workspacePanelOpenRafId = null;
121
+ /**
122
+ * @internal
123
+ */
124
+ this.lastWorkspaceInPanel = false;
125
+ /**
126
+ * @internal
127
+ */
128
+ this.lastWorkspaceContainerVisible = false;
129
+ /**
130
+ * @internal
131
+ */
132
+ this.suppressWorkspacePanelOpenAnimation = false;
133
+ /**
134
+ * @internal
135
+ */
136
+ this.suppressWorkspacePanelCloseAnimation = false;
137
+ this.handleWorkspacePanelCloseEnd = () => {
138
+ if (this.workspaceManager?.shouldRenderPanel()) {
139
+ return;
140
+ }
141
+ this.workspacePanelRendering = false;
142
+ this.suppressWorkspacePanelCloseAnimation = false;
143
+ this.requestUpdate();
144
+ };
97
145
  }
98
146
  getWidgetClasses() {
99
147
  const workspaceState = this.workspaceManager?.getState();
@@ -106,6 +154,7 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
106
154
  ? "has-header-content"
107
155
  : "",
108
156
  this.hasFooterContent ? "has-footer-content" : "",
157
+ workspaceState?.isCheckingExpansion ? "workspace-checking" : "",
109
158
  workspaceState?.isContracting ? "workspace-closing" : "",
110
159
  workspaceState?.isExpanding ? "workspace-opening" : "",
111
160
  ]
@@ -115,8 +164,6 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
115
164
  getInputAndMessagesClasses() {
116
165
  return [
117
166
  "input-and-messages",
118
- this.hasMessagesBeforeContent ? "has-messages-before-content" : "",
119
- this.hasMessagesAfterContent ? "has-messages-after-content" : "",
120
167
  this.hasInputBeforeContent ? "has-input-before-content" : "",
121
168
  this.hasInputContent ? "has-input-content" : "",
122
169
  this.hasInputAfterContent ? "has-input-after-content" : "",
@@ -146,8 +193,6 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
146
193
  return this.hasHeaderContent;
147
194
  case "header-after":
148
195
  return this.hasHeaderAfterContent;
149
- case "messages-before":
150
- return this.hasMessagesBeforeContent;
151
196
  case "footer":
152
197
  return this.hasFooterContent;
153
198
  case "input-after":
@@ -156,8 +201,6 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
156
201
  return this.hasInputContent;
157
202
  case "input-before":
158
203
  return this.hasInputBeforeContent;
159
- case "messages-after":
160
- return this.hasMessagesAfterContent;
161
204
  case "messages":
162
205
  return true; // messages slot is always considered to have content
163
206
  default:
@@ -165,13 +208,20 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
165
208
  }
166
209
  }
167
210
  renderWorkspaceInline() {
168
- const shouldRender = this.workspaceManager?.shouldRenderInline() ?? false;
169
- if (!shouldRender) {
211
+ const shouldRenderInline = this.workspaceManager?.shouldRenderInline() ?? false;
212
+ const shouldSuppressInline = this.workspacePanelRendering && !this.workspacePanelOpen;
213
+ if (!shouldRenderInline || shouldSuppressInline) {
170
214
  return nothing;
171
215
  }
172
216
  const workspaceState = this.workspaceManager?.getState();
173
217
  return html `
174
- <div class="workspace" part="slot-workspace" data-panel-slot="workspace">
218
+ <div
219
+ class="workspace"
220
+ part="slot-workspace"
221
+ data-panel-slot="workspace"
222
+ role="region"
223
+ aria-label=${this.workspaceAriaLabel}
224
+ >
175
225
  <div
176
226
  class=${workspaceState?.contentVisible
177
227
  ? "workspace-content"
@@ -184,19 +234,26 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
184
234
  `;
185
235
  }
186
236
  renderWorkspacePanel() {
187
- const shouldRender = this.workspaceManager?.shouldRenderPanel() ?? false;
188
- if (!shouldRender) {
237
+ if (!this.workspacePanelRendering) {
189
238
  return nothing;
190
239
  }
240
+ // When switching from container to panel view, don't animate
241
+ // Only animate when opening from closed state
242
+ const animationOnOpen = this.suppressWorkspacePanelOpenAnimation
243
+ ? "none"
244
+ : "slide-in-from-bottom";
191
245
  return html `
192
246
  <cds-aichat-panel
193
247
  data-internal-panel
194
- open
195
- priority="0"
248
+ ?open=${this.workspacePanelOpen}
196
249
  full-width
197
250
  show-chat-header
198
- animation-on-open="slide-in-from-bottom"
199
- animation-on-close="slide-out-to-bottom"
251
+ body-no-padding
252
+ animation-on-open=${animationOnOpen}
253
+ animation-on-close=${this.suppressWorkspacePanelCloseAnimation
254
+ ? "none"
255
+ : "slide-out-to-bottom"}
256
+ @closeend=${this.handleWorkspacePanelCloseEnd}
200
257
  >
201
258
  <div slot="body" class="workspace-slot">
202
259
  <slot name="workspace"></slot>
@@ -229,13 +286,15 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
229
286
  }
230
287
  renderMessagesSection() {
231
288
  return html `
232
- <div class=${this.getInputAndMessagesClasses()}>
233
- ${this.renderSlot("messages-before", "messages-before")}
289
+ <div
290
+ class=${this.getInputAndMessagesClasses()}
291
+ role="region"
292
+ aria-label=${this.messagesAriaLabel}
293
+ >
234
294
  ${this.renderSlot("messages", "messages")}
235
- ${this.renderSlot("messages-after", "messages-after")}
236
- ${this.renderSlot("input-before", "input-before")}
237
- ${this.renderSlot("input", "input")}
238
- ${this.renderSlot("input-after", "input-after")}
295
+ ${this.renderSlot("input-before", "input-before messages-max-width")}
296
+ ${this.renderSlot("input", "input messages-max-width")}
297
+ ${this.renderSlot("input-after", "input-after messages-max-width")}
239
298
  </div>
240
299
  `;
241
300
  }
@@ -243,7 +302,11 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
243
302
  if (!this.showHistory || !this.shouldRenderHistory) {
244
303
  return nothing;
245
304
  }
246
- return html `<div class="history">
305
+ return html `<div
306
+ class="history"
307
+ role="region"
308
+ aria-label=${this.historyAriaLabel}
309
+ >
247
310
  ${this.renderSlot("history", "history")}
248
311
  </div>`;
249
312
  }
@@ -291,27 +354,73 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
291
354
  this.observeMainContentBodyWidth();
292
355
  this.observeSlotContent();
293
356
  this.observeCssProperties();
357
+ this.syncWorkspacePanelState();
294
358
  }
295
359
  hasSlotContent(slotName) {
296
360
  const slot = this.renderRoot.querySelector(`slot[name="${slotName}"]`);
297
361
  if (!slot) {
298
362
  return false;
299
363
  }
300
- return slot
301
- .assignedNodes({ flatten: true })
302
- .some((node) => node.nodeType === Node.ELEMENT_NODE ||
303
- (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()));
364
+ return slot.assignedNodes({ flatten: true }).some((node) => {
365
+ // Check for non-empty text nodes
366
+ if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) {
367
+ return true;
368
+ }
369
+ // Check for element nodes
370
+ if (node.nodeType === Node.ELEMENT_NODE) {
371
+ const element = node;
372
+ return this.hasElementContent(element);
373
+ }
374
+ return false;
375
+ });
376
+ }
377
+ hasElementContent(element) {
378
+ // Check if element has child nodes with meaningful content (light DOM)
379
+ const hasChildContent = Array.from(element.childNodes).some((child) => {
380
+ if (child.nodeType === Node.TEXT_NODE) {
381
+ return child.textContent?.trim();
382
+ }
383
+ if (child.nodeType === Node.ELEMENT_NODE) {
384
+ const childElement = child;
385
+ // Check slot elements recursively - they may have assigned content
386
+ if (childElement.tagName.toLowerCase() === "slot") {
387
+ const slotElement = childElement;
388
+ const assignedNodes = slotElement.assignedNodes({ flatten: true });
389
+ return assignedNodes.some((node) => {
390
+ if (node.nodeType === Node.TEXT_NODE) {
391
+ return node.textContent?.trim();
392
+ }
393
+ if (node.nodeType === Node.ELEMENT_NODE) {
394
+ return this.hasElementContent(node);
395
+ }
396
+ return false;
397
+ });
398
+ }
399
+ return true;
400
+ }
401
+ return false;
402
+ });
403
+ if (hasChildContent) {
404
+ return true;
405
+ }
406
+ // If no light DOM children, check if element has shadow root (Shadow DOM content)
407
+ if (element.shadowRoot) {
408
+ return true;
409
+ }
410
+ // Check text content as fallback
411
+ const textContent = element.textContent?.trim();
412
+ return Boolean(textContent);
304
413
  }
305
414
  observeSlotContent() {
306
415
  const updateSlotStates = () => {
307
- const previousStates = new Map(CdsAiChatShell_1.OBSERVED_SLOTS.map(({ stateKey }) => [
416
+ const previousStates = new Map(CDSAIChatShell_1.OBSERVED_SLOTS.map(({ stateKey }) => [
308
417
  stateKey,
309
418
  this[stateKey],
310
419
  ]));
311
- CdsAiChatShell_1.OBSERVED_SLOTS.forEach(({ name, stateKey }) => {
420
+ CDSAIChatShell_1.OBSERVED_SLOTS.forEach(({ name, stateKey }) => {
312
421
  this[stateKey] = this.hasSlotContent(name);
313
422
  });
314
- const hasChanged = CdsAiChatShell_1.OBSERVED_SLOTS.some(({ stateKey }) => previousStates.get(stateKey) !== this[stateKey]);
423
+ const hasChanged = CDSAIChatShell_1.OBSERVED_SLOTS.some(({ stateKey }) => previousStates.get(stateKey) !== this[stateKey]);
315
424
  if (hasChanged) {
316
425
  this.requestUpdate();
317
426
  }
@@ -319,7 +428,7 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
319
428
  // Initial check
320
429
  updateSlotStates();
321
430
  // Observe slot changes
322
- const slots = CdsAiChatShell_1.OBSERVED_SLOTS.map(({ name }) => this.renderRoot.querySelector(`slot[name="${name}"]`)).filter((slot) => slot !== null);
431
+ const slots = CDSAIChatShell_1.OBSERVED_SLOTS.map(({ name }) => this.renderRoot.querySelector(`slot[name="${name}"]`)).filter((slot) => slot !== null);
323
432
  slots.forEach((slot) => {
324
433
  slot.addEventListener("slotchange", updateSlotStates);
325
434
  });
@@ -337,6 +446,7 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
337
446
  roundedCorners: this.roundedCorners,
338
447
  });
339
448
  }
449
+ this.syncWorkspacePanelState();
340
450
  this.panelManager?.refresh();
341
451
  }
342
452
  disconnectedCallback() {
@@ -346,6 +456,7 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
346
456
  this.inputAndMessagesResizeObserver?.disconnect();
347
457
  this.mainContentBodyResizeObserver?.disconnect();
348
458
  this.cssPropertyObserver?.disconnect();
459
+ this.cancelWorkspacePanelOpenSchedule();
349
460
  super.disconnectedCallback();
350
461
  }
351
462
  observeInputAndMessagesWidth() {
@@ -368,20 +479,23 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
368
479
  updateAtMaxWidth(rect.width);
369
480
  };
370
481
  this.inputAndMessagesResizeObserver = new ResizeObserver((entries) => {
371
- for (const entry of entries) {
372
- if (entry.target !== this) {
373
- continue;
374
- }
375
- const borderBoxSize = Array.isArray(entry.borderBoxSize)
376
- ? entry.borderBoxSize[0]
377
- : entry.borderBoxSize;
378
- if (borderBoxSize?.inlineSize) {
379
- updateAtMaxWidth(borderBoxSize.inlineSize);
380
- }
381
- else {
382
- updateAtMaxWidth(entry.contentRect.width);
482
+ // Use requestAnimationFrame to avoid ResizeObserver loop errors
483
+ requestAnimationFrame(() => {
484
+ for (const entry of entries) {
485
+ if (entry.target !== this) {
486
+ continue;
487
+ }
488
+ const borderBoxSize = Array.isArray(entry.borderBoxSize)
489
+ ? entry.borderBoxSize[0]
490
+ : entry.borderBoxSize;
491
+ if (borderBoxSize?.inlineSize) {
492
+ updateAtMaxWidth(borderBoxSize.inlineSize);
493
+ }
494
+ else {
495
+ updateAtMaxWidth(entry.contentRect.width);
496
+ }
383
497
  }
384
- }
498
+ });
385
499
  });
386
500
  this.inputAndMessagesResizeObserver.observe(this);
387
501
  measure();
@@ -405,20 +519,23 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
405
519
  }
406
520
  };
407
521
  this.mainContentBodyResizeObserver = new ResizeObserver((entries) => {
408
- for (const entry of entries) {
409
- if (entry.target !== mainContentBody) {
410
- continue;
411
- }
412
- const borderBoxSize = Array.isArray(entry.borderBoxSize)
413
- ? entry.borderBoxSize[0]
414
- : entry.borderBoxSize;
415
- if (borderBoxSize?.inlineSize) {
416
- updateHistoryVisibility(borderBoxSize.inlineSize);
522
+ // Use requestAnimationFrame to avoid ResizeObserver loop errors
523
+ requestAnimationFrame(() => {
524
+ for (const entry of entries) {
525
+ if (entry.target !== mainContentBody) {
526
+ continue;
527
+ }
528
+ const borderBoxSize = Array.isArray(entry.borderBoxSize)
529
+ ? entry.borderBoxSize[0]
530
+ : entry.borderBoxSize;
531
+ if (borderBoxSize?.inlineSize) {
532
+ updateHistoryVisibility(borderBoxSize.inlineSize);
533
+ }
534
+ else {
535
+ updateHistoryVisibility(entry.contentRect.width);
536
+ }
417
537
  }
418
- else {
419
- updateHistoryVisibility(entry.contentRect.width);
420
- }
421
- }
538
+ });
422
539
  });
423
540
  this.mainContentBodyResizeObserver.observe(mainContentBody);
424
541
  // Initial measurement
@@ -449,27 +566,30 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
449
566
  return;
450
567
  }
451
568
  const updateHeight = (height) => {
452
- this.style.setProperty("--cds-aichat--header-height", `${height}px`);
569
+ this.style.setProperty("--cds-aichat-header-height", `${height}px`);
453
570
  };
454
571
  const measure = () => {
455
572
  const rect = headerWrapper.getBoundingClientRect();
456
573
  updateHeight(rect.height);
457
574
  };
458
575
  this.headerResizeObserver = new ResizeObserver((entries) => {
459
- for (const entry of entries) {
460
- if (entry.target !== headerWrapper) {
461
- continue;
576
+ // Use requestAnimationFrame to avoid ResizeObserver loop errors
577
+ requestAnimationFrame(() => {
578
+ for (const entry of entries) {
579
+ if (entry.target !== headerWrapper) {
580
+ continue;
581
+ }
582
+ const borderBoxSize = Array.isArray(entry.borderBoxSize)
583
+ ? entry.borderBoxSize[0]
584
+ : entry.borderBoxSize;
585
+ if (borderBoxSize?.blockSize) {
586
+ updateHeight(borderBoxSize.blockSize);
587
+ }
588
+ else {
589
+ updateHeight(entry.contentRect.height);
590
+ }
462
591
  }
463
- const borderBoxSize = Array.isArray(entry.borderBoxSize)
464
- ? entry.borderBoxSize[0]
465
- : entry.borderBoxSize;
466
- if (borderBoxSize?.blockSize) {
467
- updateHeight(borderBoxSize.blockSize);
468
- }
469
- else {
470
- updateHeight(entry.contentRect.height);
471
- }
472
- }
592
+ });
473
593
  });
474
594
  this.headerResizeObserver.observe(headerWrapper);
475
595
  measure();
@@ -509,46 +629,127 @@ let CdsAiChatShell = CdsAiChatShell_1 = class CdsAiChatShell extends LitElement
509
629
  }
510
630
  }
511
631
  }
632
+ syncWorkspacePanelState() {
633
+ const shouldRenderPanel = this.workspaceManager?.shouldRenderPanel() ?? false;
634
+ const workspaceState = this.workspaceManager?.getState();
635
+ if (shouldRenderPanel && !this.lastShouldRenderWorkspacePanel) {
636
+ // Suppress animation when switching from inline container to panel
637
+ // (workspace was visible inline and now moving to panel)
638
+ const shouldSuppressAnimation = !this.lastWorkspaceInPanel && this.lastWorkspaceContainerVisible;
639
+ // IMPORTANT: Set the flag BEFORE updating state that triggers render
640
+ this.suppressWorkspacePanelOpenAnimation = shouldSuppressAnimation;
641
+ // Now update the state
642
+ this.workspacePanelRendering = true;
643
+ this.workspacePanelOpen = false;
644
+ this.cancelWorkspacePanelOpenSchedule();
645
+ // Request update to render the panel with the correct animation attribute
646
+ this.requestUpdate();
647
+ // Schedule opening after the panel is rendered
648
+ this.scheduleWorkspacePanelOpen();
649
+ }
650
+ else if (!shouldRenderPanel && this.lastShouldRenderWorkspacePanel) {
651
+ // Suppress animation when switching from panel to inline container
652
+ // (workspace was in panel and now moving to inline)
653
+ const shouldSuppressAnimation = this.lastWorkspaceInPanel &&
654
+ (workspaceState?.containerVisible ?? false);
655
+ console.log("[syncWorkspacePanelState] CLOSING PANEL", {
656
+ shouldSuppressAnimation,
657
+ });
658
+ this.suppressWorkspacePanelCloseAnimation = shouldSuppressAnimation;
659
+ this.cancelWorkspacePanelOpenSchedule();
660
+ if (this.workspacePanelOpen) {
661
+ this.workspacePanelOpen = false;
662
+ this.requestUpdate();
663
+ }
664
+ else {
665
+ this.workspacePanelRendering = false;
666
+ this.requestUpdate();
667
+ }
668
+ this.suppressWorkspacePanelOpenAnimation = false;
669
+ }
670
+ this.lastShouldRenderWorkspacePanel = shouldRenderPanel;
671
+ this.lastWorkspaceInPanel = workspaceState?.inPanel ?? false;
672
+ this.lastWorkspaceContainerVisible =
673
+ workspaceState?.containerVisible ?? false;
674
+ }
675
+ scheduleWorkspacePanelOpen() {
676
+ if (this.workspacePanelOpenScheduled) {
677
+ return;
678
+ }
679
+ this.workspacePanelOpenScheduled = true;
680
+ if (typeof window === "undefined") {
681
+ this.workspacePanelOpenScheduled = false;
682
+ this.workspacePanelOpen = true;
683
+ return;
684
+ }
685
+ // Use double RAF to ensure the panel element is fully rendered with correct attributes
686
+ this.workspacePanelOpenRafId = window.requestAnimationFrame(() => {
687
+ this.workspacePanelOpenRafId = window.requestAnimationFrame(() => {
688
+ this.workspacePanelOpenRafId = null;
689
+ this.workspacePanelOpenScheduled = false;
690
+ if (!this.workspaceManager?.shouldRenderPanel()) {
691
+ return;
692
+ }
693
+ this.workspacePanelOpen = true;
694
+ this.requestUpdate();
695
+ });
696
+ });
697
+ }
698
+ cancelWorkspacePanelOpenSchedule() {
699
+ if (this.workspacePanelOpenRafId !== null &&
700
+ typeof window !== "undefined") {
701
+ window.cancelAnimationFrame(this.workspacePanelOpenRafId);
702
+ }
703
+ this.workspacePanelOpenRafId = null;
704
+ this.workspacePanelOpenScheduled = false;
705
+ }
512
706
  };
513
- CdsAiChatShell.styles = styles;
707
+ CDSAIChatShell.styles = styles;
514
708
  /**
515
709
  * @internal
516
710
  */
517
- CdsAiChatShell.OBSERVED_SLOTS = [
711
+ CDSAIChatShell.OBSERVED_SLOTS = [
518
712
  { name: "header", stateKey: "hasHeaderContent" },
519
713
  { name: "header-after", stateKey: "hasHeaderAfterContent" },
520
- { name: "messages-before", stateKey: "hasMessagesBeforeContent" },
521
714
  { name: "footer", stateKey: "hasFooterContent" },
522
715
  { name: "input-after", stateKey: "hasInputAfterContent" },
523
716
  { name: "input", stateKey: "hasInputContent" },
524
717
  { name: "input-before", stateKey: "hasInputBeforeContent" },
525
- { name: "messages-after", stateKey: "hasMessagesAfterContent" },
526
718
  ];
527
719
  __decorate([
528
720
  property({ type: Boolean, attribute: "ai-enabled", reflect: true })
529
- ], CdsAiChatShell.prototype, "aiEnabled", void 0);
721
+ ], CDSAIChatShell.prototype, "aiEnabled", void 0);
530
722
  __decorate([
531
723
  property({ type: Boolean, attribute: "show-frame", reflect: true })
532
- ], CdsAiChatShell.prototype, "showFrame", void 0);
724
+ ], CDSAIChatShell.prototype, "showFrame", void 0);
533
725
  __decorate([
534
726
  property({ type: Boolean, attribute: "rounded-corners", reflect: true })
535
- ], CdsAiChatShell.prototype, "roundedCorners", void 0);
727
+ ], CDSAIChatShell.prototype, "roundedCorners", void 0);
536
728
  __decorate([
537
729
  property({ type: Boolean, attribute: "show-history", reflect: true })
538
- ], CdsAiChatShell.prototype, "showHistory", void 0);
730
+ ], CDSAIChatShell.prototype, "showHistory", void 0);
539
731
  __decorate([
540
732
  property({ type: Boolean, attribute: "show-workspace", reflect: true })
541
- ], CdsAiChatShell.prototype, "showWorkspace", void 0);
733
+ ], CDSAIChatShell.prototype, "showWorkspace", void 0);
542
734
  __decorate([
543
735
  property({ type: String, attribute: "workspace-location", reflect: true })
544
- ], CdsAiChatShell.prototype, "workspaceLocation", void 0);
736
+ ], CDSAIChatShell.prototype, "workspaceLocation", void 0);
545
737
  __decorate([
546
738
  property({ type: String, attribute: "history-location", reflect: true })
547
- ], CdsAiChatShell.prototype, "historyLocation", void 0);
548
- CdsAiChatShell = CdsAiChatShell_1 = __decorate([
739
+ ], CDSAIChatShell.prototype, "historyLocation", void 0);
740
+ __decorate([
741
+ property({ type: String, attribute: "workspace-aria-label" })
742
+ ], CDSAIChatShell.prototype, "workspaceAriaLabel", void 0);
743
+ __decorate([
744
+ property({ type: String, attribute: "history-aria-label" })
745
+ ], CDSAIChatShell.prototype, "historyAriaLabel", void 0);
746
+ __decorate([
747
+ property({ type: String, attribute: "messages-aria-label" })
748
+ ], CDSAIChatShell.prototype, "messagesAriaLabel", void 0);
749
+ CDSAIChatShell = CDSAIChatShell_1 = __decorate([
549
750
  carbonElement("cds-aichat-shell")
550
- ], CdsAiChatShell);
551
- var CdsAiChatShellElement = CdsAiChatShell;
751
+ ], CDSAIChatShell);
752
+ var CDSChatShellElement = CDSAIChatShell;
552
753
 
553
- export { CdsAiChatShellElement as default };
554
- //# sourceMappingURL=cds-aichat-shell.js.map
754
+ export { CDSChatShellElement as default };
755
+ //# sourceMappingURL=shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.js","sources":["../../../../src/components/chat-shell/src/shell.ts"],"sourcesContent":[null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