@carbon/ai-chat-components 0.10.0 → 0.11.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.
- package/README.md +0 -3
- package/custom-elements.json +4827 -2917
- package/es/components/card/src/card-footer.d.ts +1 -1
- package/es/components/card/src/card-footer.js +2 -1
- package/es/components/card/src/card-footer.js.map +1 -1
- package/es/components/card/src/card-footer.scss.js +1 -1
- package/es/components/card/src/card-steps.d.ts +1 -1
- package/es/components/card/src/card-steps.js +2 -1
- package/es/components/card/src/card-steps.js.map +1 -1
- package/es/components/card/src/card-steps.scss.js +1 -1
- package/es/components/card/src/card.d.ts +1 -1
- package/es/components/card/src/card.js +2 -1
- package/es/components/card/src/card.js.map +1 -1
- package/es/components/card/src/card.scss.js +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.js +3 -2
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.js +2 -1
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es/components/chat-button/src/chat-button.d.ts +2 -2
- package/es/components/chat-button/src/chat-button.js +3 -2
- package/es/components/chat-button/src/chat-button.js.map +1 -1
- package/es/components/chat-button/src/chat-button.scss.js +1 -1
- package/es/components/chat-shell/index.d.ts +2 -0
- package/es/components/chat-shell/index.js +1 -0
- package/es/components/chat-shell/index.js.map +1 -1
- package/es/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
- package/es/components/chat-shell/src/aria-announcer-manager.js +104 -0
- package/es/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
- package/es/components/chat-shell/src/chat-header.d.ts +177 -0
- package/es/components/chat-shell/src/chat-header.js +415 -0
- package/es/components/chat-shell/src/chat-header.js.map +1 -0
- package/es/components/chat-shell/src/chat-header.scss.js +13 -0
- package/es/components/chat-shell/src/chat-header.scss.js.map +1 -0
- package/es/components/chat-shell/src/corner-manager.d.ts +35 -0
- package/es/components/chat-shell/src/corner-manager.js +87 -0
- package/es/components/chat-shell/src/corner-manager.js.map +1 -0
- package/es/components/chat-shell/src/initialization-manager.d.ts +44 -0
- package/es/components/chat-shell/src/initialization-manager.js +88 -0
- package/es/components/chat-shell/src/initialization-manager.js.map +1 -0
- package/es/components/chat-shell/src/panel.d.ts +14 -1
- package/es/components/chat-shell/src/panel.js +32 -4
- package/es/components/chat-shell/src/panel.js.map +1 -1
- package/es/components/chat-shell/src/panel.scss.js +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
- package/es/components/chat-shell/src/resize-observer-manager.js +219 -0
- package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -0
- package/es/components/chat-shell/src/shell.d.ts +54 -21
- package/es/components/chat-shell/src/shell.js +297 -287
- package/es/components/chat-shell/src/shell.js.map +1 -1
- package/es/components/chat-shell/src/shell.scss.js +1 -1
- package/es/components/chat-shell/src/slot-observer.d.ts +53 -0
- package/es/components/chat-shell/src/slot-observer.js +156 -0
- package/es/components/chat-shell/src/slot-observer.js.map +1 -0
- package/es/components/chat-shell/src/types.d.ts +66 -0
- package/es/components/chat-shell/src/types.js +8 -0
- package/es/components/chat-shell/src/types.js.map +1 -0
- package/es/components/chat-shell/src/workspace-manager.d.ts +12 -1
- package/es/components/chat-shell/src/workspace-manager.js +42 -2
- package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +3 -2
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/src/code-snippet.d.ts +58 -15
- package/es/components/code-snippet/src/code-snippet.js +261 -95
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
- package/es/components/code-snippet/src/codemirror/editor-manager.js +18 -3
- package/es/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
- package/es/components/code-snippet/src/codemirror/language-controller.js +11 -5
- package/es/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js +2 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/theme.d.ts +12 -0
- package/es/components/code-snippet/src/codemirror/theme.js +26 -2
- package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es/components/code-snippet/src/dom-utils.d.ts +1 -0
- package/es/components/code-snippet/src/dom-utils.js +12 -1
- package/es/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es/components/code-snippet/src/layout-utils.d.ts +9 -1
- package/es/components/code-snippet/src/layout-utils.js +21 -16
- package/es/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es/components/code-snippet/src/streaming-manager.js +7 -0
- package/es/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.d.ts +2 -0
- package/es/components/feedback/src/feedback-buttons.js +65 -3
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es/components/feedback/src/feedback.d.ts +20 -10
- package/es/components/feedback/src/feedback.js +114 -20
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/markdown/src/markdown-renderer.d.ts +31 -21
- package/es/components/markdown/src/markdown-renderer.js +57 -48
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown.d.ts +34 -31
- package/es/components/markdown/src/markdown.js +221 -138
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/markdown/src/markdown.template.js +1 -1
- package/es/components/markdown/src/utils.d.ts +0 -4
- package/es/components/markdown/src/utils.js +1 -7
- package/es/components/markdown/src/utils.js.map +1 -1
- package/es/components/processing/src/processing.d.ts +1 -1
- package/es/components/processing/src/processing.js +2 -1
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.js +2 -1
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.js +3 -5
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es/components/table/src/table-pagination.template.js +3 -2
- package/es/components/table/src/table-pagination.template.js.map +1 -1
- package/es/components/table/src/table-skeleton.template.js +8 -6
- package/es/components/table/src/table-skeleton.template.js.map +1 -1
- package/es/components/table/src/table.d.ts +29 -3
- package/es/components/table/src/table.js +99 -6
- package/es/components/table/src/table.js.map +1 -1
- package/es/components/table/src/table.scss.js +1 -1
- package/es/components/table/src/table.template.js +11 -2
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +32 -5
- package/es/components/toolbar/src/toolbar.js +111 -47
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/truncated-text/index.d.ts +9 -0
- package/es/components/truncated-text/index.js +9 -0
- package/es/components/truncated-text/index.js.map +1 -0
- package/es/components/truncated-text/src/truncated-text.d.ts +81 -0
- package/es/components/truncated-text/src/truncated-text.js +282 -0
- package/es/components/truncated-text/src/truncated-text.js.map +1 -0
- package/es/components/truncated-text/src/truncated-text.scss.js +13 -0
- package/es/components/truncated-text/src/truncated-text.scss.js.map +1 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.js +223 -0
- package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js +2 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
- package/es/components/workspace-shell/src/workspace-shell-footer.js +8 -6
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
- package/es/components/workspace-shell/src/workspace-shell-header.js +88 -14
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
- package/es/components/workspace-shell/src/workspace-shell.d.ts +16 -2
- package/es/components/workspace-shell/src/workspace-shell.js +77 -7
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es/globals/scss/common.scss.js +13 -0
- package/es/globals/scss/common.scss.js.map +1 -0
- package/es/globals/utils/focus-utils.d.ts +57 -0
- package/es/globals/utils/focus-utils.js +180 -0
- package/es/globals/utils/focus-utils.js.map +1 -0
- package/es/react/card.d.ts +3 -6
- package/es/react/chain-of-thought-step.d.ts +1 -2
- package/es/react/chain-of-thought-toggle.d.ts +1 -2
- package/es/react/chain-of-thought.d.ts +1 -2
- package/es/react/chat-button.d.ts +2 -2
- package/es/react/chat-button.js +1 -1
- package/es/react/chat-header.d.ts +73 -0
- package/es/react/chat-header.js +55 -0
- package/es/react/chat-header.js.map +1 -0
- package/es/react/chat-shell.d.ts +1 -2
- package/es/react/code-snippet.d.ts +35 -2
- package/es/react/code-snippet.js +65 -9
- package/es/react/code-snippet.js.map +1 -1
- package/es/react/feedback-buttons.d.ts +1 -2
- package/es/react/feedback.d.ts +1 -2
- package/es/react/markdown.d.ts +1 -2
- package/es/react/markdown.js +11 -1
- package/es/react/markdown.js.map +1 -1
- package/es/react/panel.d.ts +1 -2
- package/es/react/processing.d.ts +1 -2
- package/es/react/reasoning-step.d.ts +1 -2
- package/es/react/reasoning-steps-toggle.d.ts +1 -2
- package/es/react/reasoning-steps.d.ts +1 -2
- package/es/react/tool-call-data.d.ts +1 -2
- package/es/react/toolbar.d.ts +14 -10
- package/es/react/toolbar.js +2 -0
- package/es/react/toolbar.js.map +1 -1
- package/es/react/utils/withWebComponentBridge.d.ts +5 -2
- package/es/react/utils/withWebComponentBridge.js +49 -1
- package/es/react/utils/withWebComponentBridge.js.map +1 -1
- package/es/react/workspace-shell.d.ts +4 -8
- package/es/testing/PageObjectId.d.ts +22 -0
- package/es/testing/PageObjectId.js +38 -0
- package/es/testing/PageObjectId.js.map +1 -0
- package/es/typings/overflow-menu.d.ts +30 -0
- package/es/typings/overflow-menu.js +8 -0
- package/es/typings/overflow-menu.js.map +1 -0
- package/es-custom/components/card/src/card-footer.d.ts +1 -1
- package/es-custom/components/card/src/card-footer.js +2 -1
- package/es-custom/components/card/src/card-footer.js.map +1 -1
- package/es-custom/components/card/src/card-footer.scss.js +1 -1
- package/es-custom/components/card/src/card-steps.d.ts +1 -1
- package/es-custom/components/card/src/card-steps.js +2 -1
- package/es-custom/components/card/src/card-steps.js.map +1 -1
- package/es-custom/components/card/src/card-steps.scss.js +1 -1
- package/es-custom/components/card/src/card.d.ts +1 -1
- package/es-custom/components/card/src/card.js +2 -1
- package/es-custom/components/card/src/card.js.map +1 -1
- package/es-custom/components/card/src/card.scss.js +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +4 -5
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +3 -3
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +3 -2
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +2 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es-custom/components/chat-button/src/chat-button.d.ts +2 -2
- package/es-custom/components/chat-button/src/chat-button.js +3 -2
- package/es-custom/components/chat-button/src/chat-button.js.map +1 -1
- package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
- package/es-custom/components/chat-shell/index.d.ts +2 -0
- package/es-custom/components/chat-shell/index.js +1 -0
- package/es-custom/components/chat-shell/index.js.map +1 -1
- package/es-custom/components/chat-shell/src/aria-announcer-manager.d.ts +40 -0
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js +104 -0
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/chat-header.d.ts +177 -0
- package/es-custom/components/chat-shell/src/chat-header.js +415 -0
- package/es-custom/components/chat-shell/src/chat-header.js.map +1 -0
- package/es-custom/components/chat-shell/src/chat-header.scss.js +13 -0
- package/es-custom/components/chat-shell/src/chat-header.scss.js.map +1 -0
- package/es-custom/components/chat-shell/src/corner-manager.d.ts +35 -0
- package/es-custom/components/chat-shell/src/corner-manager.js +87 -0
- package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/initialization-manager.d.ts +44 -0
- package/es-custom/components/chat-shell/src/initialization-manager.js +88 -0
- package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/panel.d.ts +14 -1
- package/es-custom/components/chat-shell/src/panel.js +32 -4
- package/es-custom/components/chat-shell/src/panel.js.map +1 -1
- package/es-custom/components/chat-shell/src/panel.scss.js +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +55 -0
- package/es-custom/components/chat-shell/src/resize-observer-manager.js +219 -0
- package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -0
- package/es-custom/components/chat-shell/src/shell.d.ts +54 -21
- package/es-custom/components/chat-shell/src/shell.js +297 -287
- package/es-custom/components/chat-shell/src/shell.js.map +1 -1
- package/es-custom/components/chat-shell/src/shell.scss.js +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.d.ts +53 -0
- package/es-custom/components/chat-shell/src/slot-observer.js +156 -0
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -0
- package/es-custom/components/chat-shell/src/types.d.ts +66 -0
- package/es-custom/components/chat-shell/src/types.js +8 -0
- package/es-custom/components/chat-shell/src/types.js.map +1 -0
- package/es-custom/components/chat-shell/src/workspace-manager.d.ts +12 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js +42 -2
- package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es-custom/components/code-snippet/index.d.ts +3 -2
- package/es-custom/components/code-snippet/index.js +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +58 -15
- package/es-custom/components/code-snippet/src/code-snippet.js +261 -95
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -2
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +18 -3
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +11 -5
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +2 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js +26 -2
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es-custom/components/code-snippet/src/dom-utils.d.ts +1 -0
- package/es-custom/components/code-snippet/src/dom-utils.js +12 -1
- package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +9 -1
- package/es-custom/components/code-snippet/src/layout-utils.js +21 -16
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/streaming-manager.js +7 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +2 -0
- package/es-custom/components/feedback/src/feedback-buttons.js +65 -3
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.scss.js +13 -0
- package/es-custom/components/feedback/src/feedback-buttons.scss.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.d.ts +20 -10
- package/es-custom/components/feedback/src/feedback.js +114 -20
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.scss.js +1 -1
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +31 -21
- package/es-custom/components/markdown/src/markdown-renderer.js +57 -48
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.d.ts +34 -31
- package/es-custom/components/markdown/src/markdown.js +221 -138
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.scss.js +1 -1
- package/es-custom/components/markdown/src/markdown.template.js +1 -1
- package/es-custom/components/markdown/src/utils.d.ts +0 -4
- package/es-custom/components/markdown/src/utils.js +1 -7
- package/es-custom/components/markdown/src/utils.js.map +1 -1
- package/es-custom/components/processing/src/processing.d.ts +1 -1
- package/es-custom/components/processing/src/processing.js +2 -1
- package/es-custom/components/processing/src/processing.js.map +1 -1
- package/es-custom/components/processing/src/processing.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +2 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +27 -4
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +3 -5
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es-custom/components/table/src/table-pagination.template.js +3 -2
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
- package/es-custom/components/table/src/table-skeleton.template.js +8 -6
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
- package/es-custom/components/table/src/table.d.ts +29 -3
- package/es-custom/components/table/src/table.js +99 -6
- package/es-custom/components/table/src/table.js.map +1 -1
- package/es-custom/components/table/src/table.scss.js +1 -1
- package/es-custom/components/table/src/table.template.js +11 -2
- package/es-custom/components/table/src/table.template.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.d.ts +32 -5
- package/es-custom/components/toolbar/src/toolbar.js +111 -47
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
- package/es-custom/components/truncated-text/index.d.ts +9 -0
- package/es-custom/components/truncated-text/index.js +9 -0
- package/es-custom/components/truncated-text/index.js.map +1 -0
- package/es-custom/components/truncated-text/src/truncated-text.d.ts +81 -0
- package/es-custom/components/truncated-text/src/truncated-text.js +282 -0
- package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -0
- package/es-custom/components/truncated-text/src/truncated-text.scss.js +13 -0
- package/es-custom/components/truncated-text/src/truncated-text.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.d.ts +77 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +223 -0
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +1 -3
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +8 -6
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +11 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +88 -14
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +16 -2
- package/es-custom/components/workspace-shell/src/workspace-shell.js +77 -7
- package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es-custom/globals/scss/common.scss.js +13 -0
- package/es-custom/globals/scss/common.scss.js.map +1 -0
- package/es-custom/globals/utils/focus-utils.d.ts +57 -0
- package/es-custom/globals/utils/focus-utils.js +180 -0
- package/es-custom/globals/utils/focus-utils.js.map +1 -0
- package/es-custom/react/card.d.ts +3 -6
- package/es-custom/react/chain-of-thought-step.d.ts +1 -2
- package/es-custom/react/chain-of-thought-toggle.d.ts +1 -2
- package/es-custom/react/chain-of-thought.d.ts +1 -2
- package/es-custom/react/chat-button.d.ts +2 -2
- package/es-custom/react/chat-button.js +1 -1
- package/es-custom/react/chat-header.d.ts +73 -0
- package/es-custom/react/chat-header.js +55 -0
- package/es-custom/react/chat-header.js.map +1 -0
- package/es-custom/react/chat-shell.d.ts +1 -2
- package/es-custom/react/code-snippet.d.ts +35 -2
- package/es-custom/react/code-snippet.js +65 -9
- package/es-custom/react/code-snippet.js.map +1 -1
- package/es-custom/react/feedback-buttons.d.ts +1 -2
- package/es-custom/react/feedback.d.ts +1 -2
- package/es-custom/react/markdown.d.ts +1 -2
- package/es-custom/react/markdown.js +11 -1
- package/es-custom/react/markdown.js.map +1 -1
- package/es-custom/react/panel.d.ts +1 -2
- package/es-custom/react/processing.d.ts +1 -2
- package/es-custom/react/reasoning-step.d.ts +1 -2
- package/es-custom/react/reasoning-steps-toggle.d.ts +1 -2
- package/es-custom/react/reasoning-steps.d.ts +1 -2
- package/es-custom/react/tool-call-data.d.ts +1 -2
- package/es-custom/react/toolbar.d.ts +14 -10
- package/es-custom/react/toolbar.js +2 -0
- package/es-custom/react/toolbar.js.map +1 -1
- package/es-custom/react/utils/withWebComponentBridge.d.ts +5 -2
- package/es-custom/react/utils/withWebComponentBridge.js +49 -1
- package/es-custom/react/utils/withWebComponentBridge.js.map +1 -1
- package/es-custom/react/workspace-shell.d.ts +4 -8
- package/es-custom/testing/PageObjectId.d.ts +22 -0
- package/es-custom/testing/PageObjectId.js +38 -0
- package/es-custom/testing/PageObjectId.js.map +1 -0
- package/es-custom/typings/overflow-menu.d.ts +30 -0
- package/es-custom/typings/overflow-menu.js +8 -0
- package/es-custom/typings/overflow-menu.js.map +1 -0
- package/package.json +6 -4
- package/scss/_custom-properties.scss +70 -0
- package/scss/_modifiers.scss +231 -0
- package/scss/_tokens-component.scss +30 -0
- package/scss/_tokens-layout.scss +29 -0
- package/scss/_utilities.scss +32 -0
- package/scss/common.scss +150 -0
- package/scss/grid.scss +11 -0
- package/scss/themes.scss +33 -0
- package/scss/vars.scss +12 -0
- package/telemetry.yml +73 -33
- package/es/components/code-snippet/src/code-snippet-card.d.ts +0 -63
- package/es/components/code-snippet/src/code-snippet-card.js +0 -187
- package/es/components/code-snippet/src/code-snippet-card.js.map +0 -1
- package/es/components/feedback/src/feedback-buttons.template.d.ts +0 -4
- package/es/components/feedback/src/feedback-buttons.template.js +0 -79
- package/es/components/feedback/src/feedback-buttons.template.js.map +0 -1
- package/es/components/feedback/src/feedback.template.d.ts +0 -12
- package/es/components/feedback/src/feedback.template.js +0 -115
- package/es/components/feedback/src/feedback.template.js.map +0 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
- package/es/react/code-snippet-card.d.ts +0 -4
- package/es/react/code-snippet-card.js +0 -31
- package/es/react/code-snippet-card.js.map +0 -1
- package/es-custom/components/code-snippet/src/code-snippet-card.d.ts +0 -63
- package/es-custom/components/code-snippet/src/code-snippet-card.js +0 -187
- package/es-custom/components/code-snippet/src/code-snippet-card.js.map +0 -1
- package/es-custom/components/feedback/src/feedback-buttons.template.d.ts +0 -4
- package/es-custom/components/feedback/src/feedback-buttons.template.js +0 -79
- package/es-custom/components/feedback/src/feedback-buttons.template.js.map +0 -1
- package/es-custom/components/feedback/src/feedback.template.d.ts +0 -12
- package/es-custom/components/feedback/src/feedback.template.js +0 -115
- package/es-custom/components/feedback/src/feedback.template.js.map +0 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +0 -3
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js +0 -43
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +0 -1
- package/es-custom/react/code-snippet-card.d.ts +0 -4
- package/es-custom/react/code-snippet-card.js +0 -31
- package/es-custom/react/code-snippet-card.js.map +0 -1
package/es/react/chat-shell.d.ts
CHANGED
|
@@ -7,6 +7,5 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import React from "react";
|
|
10
|
-
|
|
11
|
-
declare const CDSAIChatShell: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSChatShellElement>>;
|
|
10
|
+
declare const CDSAIChatShell: React.ComponentType<any>;
|
|
12
11
|
export default CDSAIChatShell;
|
|
@@ -1,4 +1,37 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { CarbonIcon } from "@carbon/web-components/es/globals/internal/icon-loader-utils.js";
|
|
3
|
+
import { BUTTON_SIZE } from "@carbon/web-components/es/components/button/defs.js";
|
|
4
|
+
export type { Action } from "../components/code-snippet/src/code-snippet.js";
|
|
5
|
+
/**
|
|
6
|
+
* React-specific Action interface that accepts both CarbonIcon and React icon components.
|
|
7
|
+
* This allows React developers to use @carbon/icons-react directly.
|
|
8
|
+
*/
|
|
9
|
+
export interface ReactAction {
|
|
10
|
+
text: string;
|
|
11
|
+
icon: CarbonIcon | React.ComponentType<any>;
|
|
12
|
+
size?: BUTTON_SIZE;
|
|
13
|
+
fixed?: boolean;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* CodeSnippet component with automatic icon transformation support.
|
|
18
|
+
*
|
|
19
|
+
* Accepts actions with either CarbonIcon objects or React icon components from @carbon/icons-react.
|
|
20
|
+
* React icons are automatically transformed to the CarbonIcon format expected by the web component.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { Download } from '@carbon/icons-react';
|
|
25
|
+
* import CodeSnippet from '@carbon/ai-chat-components/react/code-snippet';
|
|
26
|
+
*
|
|
27
|
+
* const actions = [
|
|
28
|
+
* { text: 'Download', icon: Download, onClick: () => console.log('Download') }
|
|
29
|
+
* ];
|
|
30
|
+
*
|
|
31
|
+
* <CodeSnippet language="typescript" highlight actions={actions} overflow>
|
|
32
|
+
* {code}
|
|
33
|
+
* </CodeSnippet>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const CodeSnippet: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
4
37
|
export default CodeSnippet;
|
package/es/react/code-snippet.js
CHANGED
|
@@ -5,20 +5,15 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
9
|
import { createComponent } from '@lit/react';
|
|
9
10
|
import React from 'react';
|
|
10
11
|
import CDSAIChatCodeSnippet from '../components/code-snippet/src/code-snippet.js';
|
|
11
12
|
import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
|
|
13
|
+
import { transformReactIconToCarbonIcon } from './utils/iconTransform.js';
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
* @license
|
|
20
|
-
*/
|
|
21
|
-
const CodeSnippet = withWebComponentBridge(createComponent({
|
|
15
|
+
// Base code snippet component from @lit/react
|
|
16
|
+
const BaseCodeSnippet = withWebComponentBridge(createComponent({
|
|
22
17
|
tagName: "cds-aichat-code-snippet",
|
|
23
18
|
elementClass: CDSAIChatCodeSnippet,
|
|
24
19
|
react: React,
|
|
@@ -26,6 +21,67 @@ const CodeSnippet = withWebComponentBridge(createComponent({
|
|
|
26
21
|
onChange: "content-change",
|
|
27
22
|
},
|
|
28
23
|
}));
|
|
24
|
+
/**
|
|
25
|
+
* CodeSnippet component with automatic icon transformation support.
|
|
26
|
+
*
|
|
27
|
+
* Accepts actions with either CarbonIcon objects or React icon components from @carbon/icons-react.
|
|
28
|
+
* React icons are automatically transformed to the CarbonIcon format expected by the web component.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { Download } from '@carbon/icons-react';
|
|
33
|
+
* import CodeSnippet from '@carbon/ai-chat-components/react/code-snippet';
|
|
34
|
+
*
|
|
35
|
+
* const actions = [
|
|
36
|
+
* { text: 'Download', icon: Download, onClick: () => console.log('Download') }
|
|
37
|
+
* ];
|
|
38
|
+
*
|
|
39
|
+
* <CodeSnippet language="typescript" highlight actions={actions} overflow>
|
|
40
|
+
* {code}
|
|
41
|
+
* </CodeSnippet>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
const CodeSnippet = React.forwardRef((props, ref) => {
|
|
45
|
+
const { actions, children, ...restProps } = props;
|
|
46
|
+
// Transform action icons if actions are provided
|
|
47
|
+
const transformedActions = React.useMemo(() => {
|
|
48
|
+
if (!actions || !Array.isArray(actions)) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
return actions.map((action) => ({
|
|
52
|
+
...action,
|
|
53
|
+
icon: transformReactIconToCarbonIcon(action.icon, 16),
|
|
54
|
+
}));
|
|
55
|
+
}, [actions]);
|
|
56
|
+
// Separate slotted children from default content
|
|
57
|
+
const { slottedChildren, defaultChildren } = React.useMemo(() => {
|
|
58
|
+
const slotted = {};
|
|
59
|
+
const defaultContent = [];
|
|
60
|
+
React.Children.forEach(children, (child) => {
|
|
61
|
+
if (React.isValidElement(child)) {
|
|
62
|
+
const childProps = child.props;
|
|
63
|
+
if (childProps.slot) {
|
|
64
|
+
const slotName = childProps.slot;
|
|
65
|
+
if (!slotted[slotName]) {
|
|
66
|
+
slotted[slotName] = [];
|
|
67
|
+
}
|
|
68
|
+
// Clone the element without the slot prop to avoid React warnings
|
|
69
|
+
const { slot: _slot, ...restChildProps } = childProps;
|
|
70
|
+
slotted[slotName].push(React.cloneElement(child, restChildProps));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
defaultContent.push(child);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
defaultContent.push(child);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return { slottedChildren: slotted, defaultChildren: defaultContent };
|
|
81
|
+
}, [children]);
|
|
82
|
+
return (jsxs(BaseCodeSnippet, { ref: ref, actions: transformedActions, ...restProps, children: [Object.entries(slottedChildren).map(([slotName, nodes]) => (jsx("div", { slot: slotName, children: nodes }, slotName))), defaultChildren] }));
|
|
83
|
+
});
|
|
84
|
+
CodeSnippet.displayName = "CodeSnippet";
|
|
29
85
|
|
|
30
86
|
export { CodeSnippet as default };
|
|
31
87
|
//# sourceMappingURL=code-snippet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-snippet.js","sources":["../../src/react/code-snippet.
|
|
1
|
+
{"version":3,"file":"code-snippet.js","sources":["../../src/react/code-snippet.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;AAkCA;AACA,MAAM,eA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BAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AACtB,wBAAA,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACxB;;oBAEA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,GAAG,UAAU;AACrD,oBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;gBACnE;qBAAO;AACL,oBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B;YACF;iBAAO;AACL,gBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5B;AACF,QAAA,CAAC,CAAC;QAEF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE;AACtE,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEd,QACEA,KAAC,eAAe,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,KAAM,SAAS,EAAA,QAAA,EAAA,CAClE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,MACrDC,GAAA,CAAA,KAAA,EAAA,EAAoB,IAAI,EAAE,QAAQ,YAC/B,KAAK,EAAA,EADE,QAAQ,CAEZ,CACP,CAAC,EACD,eAAe,CAAA,EAAA,CACA;AAEtB,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const FeedbackButtons: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatFeedbackButtons>>;
|
|
2
|
+
declare const FeedbackButtons: React.ComponentType<any>;
|
|
4
3
|
export default FeedbackButtons;
|
package/es/react/feedback.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import CDSAIChatFeedbackElement from "../components/feedback/src/feedback.js";
|
|
3
2
|
import { type FeedbackInitialValues, type FeedbackSubmitDetails } from "../components/feedback/src/feedback.js";
|
|
4
|
-
declare const Feedback: React.
|
|
3
|
+
declare const Feedback: React.ComponentType<any>;
|
|
5
4
|
export type { FeedbackInitialValues, FeedbackSubmitDetails };
|
|
6
5
|
export default Feedback;
|
package/es/react/markdown.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const Markdown: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatMarkdown>>;
|
|
2
|
+
declare const Markdown: React.ComponentType<any>;
|
|
4
3
|
export default Markdown;
|
package/es/react/markdown.js
CHANGED
|
@@ -18,11 +18,21 @@ import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
|
|
|
18
18
|
*
|
|
19
19
|
* @license
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const BaseMarkdown = createComponent({
|
|
22
22
|
tagName: "cds-aichat-markdown",
|
|
23
23
|
elementClass: CDSAIChatMarkdown,
|
|
24
24
|
react: React,
|
|
25
|
+
});
|
|
26
|
+
const ForwardedMarkdown = React.forwardRef(({ children, markdown, ...rest }, forwardedRef) => React.createElement(BaseMarkdown, {
|
|
27
|
+
...rest,
|
|
28
|
+
ref: forwardedRef,
|
|
29
|
+
markdown: markdown ??
|
|
30
|
+
(typeof children === "string" || typeof children === "number"
|
|
31
|
+
? String(children)
|
|
32
|
+
: undefined),
|
|
25
33
|
}));
|
|
34
|
+
ForwardedMarkdown.displayName = "Markdown";
|
|
35
|
+
const Markdown = withWebComponentBridge(ForwardedMarkdown);
|
|
26
36
|
|
|
27
37
|
export { Markdown as default };
|
|
28
38
|
//# sourceMappingURL=markdown.js.map
|
package/es/react/markdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.js","sources":["../../src/react/markdown.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,
|
|
1
|
+
{"version":3,"file":"markdown.js","sources":["../../src/react/markdown.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,YAAY,GAAG,eAAe,CAAC;AACnC,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;AAEF,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,KAC9C,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE;AAChC,IAAA,GAAG,IAAI;AACP,IAAA,GAAG,EAAE,YAAY;AACjB,IAAA,QAAQ,EACN,QAAQ;SACP,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK;AACnD,cAAE,MAAM,CAAC,QAAQ;cACf,SAAS,CAAC;AACjB,CAAA,CAAC,CACH;AAED,iBAAiB,CAAC,WAAW,GAAG,UAAU;AAE1C,MAAM,QAAQ,GAAG,sBAAsB,CAAC,iBAAiB;;;;"}
|
package/es/react/panel.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const CDSAIChatPanel: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CdsChatPanelElement>>;
|
|
2
|
+
declare const CDSAIChatPanel: React.ComponentType<any>;
|
|
4
3
|
export default CDSAIChatPanel;
|
package/es/react/processing.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const Processing: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatProcessing>>;
|
|
2
|
+
declare const Processing: React.ComponentType<any>;
|
|
4
3
|
export default Processing;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const ReasoningStep: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatReasoningStep>>;
|
|
2
|
+
declare const ReasoningStep: React.ComponentType<any>;
|
|
4
3
|
export default ReasoningStep;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import CDSAIChatReasoningStepsToggle from "../components/reasoning-steps/src/reasoning-steps-toggle.js";
|
|
3
2
|
import { type ReasoningStepsToggleEventDetail } from "../components/reasoning-steps/src/reasoning-steps-toggle.js";
|
|
4
|
-
declare const ReasoningStepsToggle: React.
|
|
3
|
+
declare const ReasoningStepsToggle: React.ComponentType<any>;
|
|
5
4
|
export type { ReasoningStepsToggleEventDetail };
|
|
6
5
|
export default ReasoningStepsToggle;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const ReasoningSteps: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatReasoningSteps>>;
|
|
2
|
+
declare const ReasoningSteps: React.ComponentType<any>;
|
|
4
3
|
export default ReasoningSteps;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
declare const ToolCallData: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatToolCallData>>;
|
|
2
|
+
declare const ToolCallData: React.ComponentType<any>;
|
|
4
3
|
export default ToolCallData;
|
package/es/react/toolbar.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ComponentType } from "react";
|
|
2
2
|
import { CarbonIcon } from "@carbon/web-components/es/globals/internal/icon-loader-utils.js";
|
|
3
|
-
|
|
3
|
+
import { Action } from "../components/toolbar/src/toolbar.js";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* This allows
|
|
5
|
+
* Toolbar action interface that accepts both CarbonIcon and React icon components.
|
|
6
|
+
* This allows developers to use either:
|
|
7
|
+
* - @carbon/icons-react (React components)
|
|
8
|
+
* - @carbon/web-components icons (CarbonIcon objects)
|
|
9
|
+
*
|
|
10
|
+
* Works with both React and web component implementations.
|
|
7
11
|
*/
|
|
8
|
-
export interface
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
onClick: () => void;
|
|
12
|
+
export interface ToolbarAction extends Omit<Action, "icon"> {
|
|
13
|
+
/**
|
|
14
|
+
* Either an icon from `@carbon/icons` or from `@carbon/icons-react`.
|
|
15
|
+
*/
|
|
16
|
+
icon: CarbonIcon | ComponentType<any>;
|
|
14
17
|
}
|
|
15
18
|
declare const Toolbar: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
19
|
+
export type { Action };
|
|
16
20
|
export default Toolbar;
|
package/es/react/toolbar.js
CHANGED
|
@@ -68,6 +68,8 @@ const Toolbar = React.forwardRef((props, ref) => {
|
|
|
68
68
|
return actions.map((action) => ({
|
|
69
69
|
...action,
|
|
70
70
|
icon: transformReactIconToCarbonIcon(action.icon, getSizeInPixels(action.size)),
|
|
71
|
+
// Preserve testId if provided
|
|
72
|
+
testId: action.testId,
|
|
71
73
|
}));
|
|
72
74
|
}, [actions]);
|
|
73
75
|
return jsx(BaseToolbar, { ref: ref, actions: transformedActions, ...restProps });
|
package/es/react/toolbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.js","sources":["../../src/react/toolbar.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AAiCA;AACA,MAAM,WAAW,GAAG,sB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S;;;;"}
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
* custom element instance so Lit receives the real values and behaves the same in shims and browsers until
|
|
6
6
|
* upstream fixes land.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* The bridge automatically detects test environments (happy-dom/jsdom) and only activates there.
|
|
9
|
+
* Set `AICHAT_DISABLE_WEB_COMPONENT_BRIDGE=true` to force disable (handy for verifying whether the
|
|
9
10
|
* workaround is still required).
|
|
10
11
|
*/
|
|
11
12
|
import React from "react";
|
|
12
13
|
/**
|
|
13
14
|
* Wrap a Lit `createComponent` result so that every prop is mirrored onto the underlying custom element as a property.
|
|
15
|
+
* This wrapper uses a generic type that preserves component compatibility across React 17-19.
|
|
16
|
+
* The return type is intentionally loose to avoid breaking existing code that relies on flexible prop types.
|
|
14
17
|
*/
|
|
15
|
-
export declare function withWebComponentBridge<
|
|
18
|
+
export declare function withWebComponentBridge<C extends React.ComponentType<any>>(Component: C): React.ComponentType<any>;
|
|
@@ -38,10 +38,55 @@ function mergeRefs(...refs) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Detects if we're running in a DOM shim (happy-dom/jsdom) vs a real browser.
|
|
43
|
+
* The bridge is only needed in DOM shims where Web Components don't work properly.
|
|
44
|
+
*/
|
|
45
|
+
function isInTestEnvironment() {
|
|
46
|
+
// Explicit override to disable
|
|
47
|
+
if (typeof process !== "undefined" &&
|
|
48
|
+
process.env?.AICHAT_DISABLE_WEB_COMPONENT_BRIDGE === "true") {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
// Check for happy-dom (most reliable for happy-dom detection)
|
|
52
|
+
if (typeof window !== "undefined" && window.happyDOM) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
// Check for jsdom via navigator.userAgent
|
|
56
|
+
if (typeof navigator !== "undefined" &&
|
|
57
|
+
navigator.userAgent?.includes("jsdom")) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
// Check for Jest environment variable
|
|
61
|
+
if (typeof process !== "undefined" &&
|
|
62
|
+
process.env?.JEST_WORKER_ID !== undefined) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
// Check if we're in Node.js with test environment
|
|
66
|
+
if (typeof process !== "undefined" &&
|
|
67
|
+
process.versions?.node &&
|
|
68
|
+
process.env?.NODE_ENV === "test") {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
// Fallback: check if we're in a Node.js environment at all
|
|
72
|
+
// (real browsers don't have process.versions)
|
|
73
|
+
if (typeof process !== "undefined" && process.versions?.node) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
const shouldEnableBridge = isInTestEnvironment();
|
|
41
79
|
/**
|
|
42
80
|
* Wrap a Lit `createComponent` result so that every prop is mirrored onto the underlying custom element as a property.
|
|
81
|
+
* This wrapper uses a generic type that preserves component compatibility across React 17-19.
|
|
82
|
+
* The return type is intentionally loose to avoid breaking existing code that relies on flexible prop types.
|
|
43
83
|
*/
|
|
44
84
|
function withWebComponentBridge(Component) {
|
|
85
|
+
// Early return if bridge is disabled (production browsers)
|
|
86
|
+
if (!shouldEnableBridge) {
|
|
87
|
+
return Component;
|
|
88
|
+
}
|
|
89
|
+
// eslint-disable-next-line react/display-name
|
|
45
90
|
const Bridged = React.forwardRef((props, forwardedRef) => {
|
|
46
91
|
const hostRef = React.useRef(null);
|
|
47
92
|
const mergedRef = React.useMemo(() => mergeRefs(hostRef, forwardedRef), [forwardedRef]);
|
|
@@ -82,7 +127,10 @@ function withWebComponentBridge(Component) {
|
|
|
82
127
|
}
|
|
83
128
|
});
|
|
84
129
|
}, [props]);
|
|
85
|
-
|
|
130
|
+
// Filter out any props that might cause issues with rendering
|
|
131
|
+
// Ensure the component never returns undefined by wrapping in a fragment
|
|
132
|
+
const result = jsx(Component, { ...props, ref: mergedRef });
|
|
133
|
+
return result ?? null;
|
|
86
134
|
});
|
|
87
135
|
Bridged.displayName =
|
|
88
136
|
Component.displayName ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withWebComponentBridge.js","sources":["../../../src/react/utils/withWebComponentBridge.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"withWebComponentBridge.js","sources":["../../../src/react/utils/withWebComponentBridge.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;AAuBA;AACA,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,UAAU;IACV,WAAW;IACX,OAAO;IACP,MAAM;IACN,KAAK;IACL,KAAK;IACL,gCAAgC;IAChC,0BAA0B;IAC1B,yBAAyB;AAC1B,CAAA,CAAC;AAEF;AACA,SAAS,SAAS,CAChB,GAAG,IAA4C,EAAA;IAE/C,OAAO,CAAC,KAAe,KAAI;;AAEzB,QAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACtB,IAAI,CAAC,GAAG,EAAE;gBACR;YACF;;AAEA,YAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;gBAC7B,GAAG,CAAC,KAAK,CAAC;YACZ;iBAAO;AACJ,gBAAA,GAAwC,CAAC,OAAO,GAAG,KAAK;YAC3D;QACF;AACF,IAAA,CAAC;AACH;AAEA;;;AAGG;AACH,SAAS,mBAAmB,GAAA;;IAE1B,IACE,OAAO,OAAO,KAAK,WAAW;AAC9B,QAAA,OAAO,CAAC,GAAG,EAAE,mCAAmC,KAAK,MAAM,EAC3D;AACA,QAAA,OAAO,KAAK;IACd;;IAGA,IAAI,OAAO,MAAM,KAAK,WAAW,IAAK,MAAc,CAAC,QAAQ,EAAE;AAC7D,QAAA,OAAO,IAAI;IACb;;IAGA,IACE,OAAO,SAAS,KAAK,WAAW;QAChC,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,EACtC;AACA,QAAA,OAA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<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatWorkspaceShell>>;
|
|
7
|
-
declare const WorkspaceShellHeader: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatWorkspaceShellHeader>>;
|
|
8
|
-
declare const WorkspaceShellBody: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatWorkspaceShellBody>>;
|
|
9
|
-
declare const WorkspaceShellFooter: React.ForwardRefExoticComponent<Omit<Record<string, unknown>, "ref"> & React.RefAttributes<CDSAIChatWorkspaceShellFooter>>;
|
|
2
|
+
declare const WorkspaceShell: React.ComponentType<any>;
|
|
3
|
+
declare const WorkspaceShellHeader: React.ComponentType<any>;
|
|
4
|
+
declare const WorkspaceShellBody: React.ComponentType<any>;
|
|
5
|
+
declare const WorkspaceShellFooter: React.ComponentType<any>;
|
|
10
6
|
export default WorkspaceShell;
|
|
11
7
|
export { WorkspaceShellHeader, WorkspaceShellBody, WorkspaceShellFooter };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base enum of data-testid values used in @carbon/ai-chat-components.
|
|
3
|
+
* This enum contains test IDs for low-level components.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum PageObjectId {
|
|
6
|
+
/**
|
|
7
|
+
* Chat header container element.
|
|
8
|
+
*/
|
|
9
|
+
CHAT_HEADER = "chat_header",
|
|
10
|
+
/**
|
|
11
|
+
* Header title element.
|
|
12
|
+
*/
|
|
13
|
+
HEADER_TITLE = "header_title",
|
|
14
|
+
/**
|
|
15
|
+
* Header name element.
|
|
16
|
+
*/
|
|
17
|
+
HEADER_NAME = "header_name"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Ids used for data-testid.
|
|
21
|
+
*/
|
|
22
|
+
export type TestId = PageObjectId;
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
* Copyright IBM Corp. 2025
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*
|
|
14
|
+
* @license
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Base enum of data-testid values used in @carbon/ai-chat-components.
|
|
18
|
+
* This enum contains test IDs for low-level components.
|
|
19
|
+
*/
|
|
20
|
+
var PageObjectId;
|
|
21
|
+
(function (PageObjectId) {
|
|
22
|
+
/**
|
|
23
|
+
* Chat header container element.
|
|
24
|
+
*/
|
|
25
|
+
PageObjectId["CHAT_HEADER"] = "chat_header";
|
|
26
|
+
/**
|
|
27
|
+
* Header title element.
|
|
28
|
+
*/
|
|
29
|
+
PageObjectId["HEADER_TITLE"] = "header_title";
|
|
30
|
+
/**
|
|
31
|
+
* Header name element.
|
|
32
|
+
*/
|
|
33
|
+
PageObjectId["HEADER_NAME"] = "header_name";
|
|
34
|
+
})(PageObjectId || (PageObjectId = {}));
|
|
35
|
+
// Made with Bob
|
|
36
|
+
|
|
37
|
+
export { PageObjectId };
|
|
38
|
+
//# sourceMappingURL=PageObjectId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageObjectId.js","sources":["../../src/testing/PageObjectId.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;AAGG;IACS;AAAZ,CAAA,UAAY,YAAY,EAAA;AACtB;;AAEG;AACH,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAE3B;;AAEG;AACH,IAAA,YAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAE7B;;AAEG;AACH,IAAA,YAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC7B,CAAC,EAfW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;AAsBxB;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type CDSOverflowMenuItem from "@carbon/web-components/es/components/overflow-menu/overflow-menu-item.js";
|
|
2
|
+
/**
|
|
3
|
+
* Base type for overflow menu items.
|
|
4
|
+
* Extends properties from CDSOverflowMenuItem to ensure type safety
|
|
5
|
+
* and compatibility with Carbon Design System components.
|
|
6
|
+
*
|
|
7
|
+
* This base type is used by:
|
|
8
|
+
* - Action (toolbar.ts) - for toolbar actions that can overflow
|
|
9
|
+
* - NavigationOverflowItem (chat-header.ts) - for navigation menu items
|
|
10
|
+
*/
|
|
11
|
+
export interface BaseOverflowMenuItem extends Partial<Pick<CDSOverflowMenuItem, "danger" | "dangerDescription" | "disabled" | "divider" | "href">> {
|
|
12
|
+
/**
|
|
13
|
+
* Display text for the menu item.
|
|
14
|
+
*/
|
|
15
|
+
text: string;
|
|
16
|
+
/**
|
|
17
|
+
* Click handler for the menu item.
|
|
18
|
+
* Optional to allow for link-only items (using href).
|
|
19
|
+
*/
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Link target attribute (e.g., '_blank', '_self').
|
|
23
|
+
* Used when href is provided.
|
|
24
|
+
*/
|
|
25
|
+
target?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional data-testid string for e2e testing.
|
|
28
|
+
*/
|
|
29
|
+
testId?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overflow-menu.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -14,6 +14,7 @@ import { repeat } from 'lit/directives/repeat.js';
|
|
|
14
14
|
import { BUTTON_SIZE } from '@carbon/web-components/es-custom/components/button/button.js';
|
|
15
15
|
import '@carbon/web-components/es-custom/components/icon-button/icon-button.js';
|
|
16
16
|
import { iconLoader } from '@carbon/web-components/es-custom/globals/internal/icon-loader.js';
|
|
17
|
+
import commonStyles from '../../../globals/scss/common.scss.js';
|
|
17
18
|
import styles from './card-footer.scss.js';
|
|
18
19
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
19
20
|
import prefix from '../../../globals/settings.js';
|
|
@@ -120,7 +121,7 @@ let CardFooter = class CardFooter extends LitElement {
|
|
|
120
121
|
`;
|
|
121
122
|
}
|
|
122
123
|
};
|
|
123
|
-
CardFooter.styles = styles;
|
|
124
|
+
CardFooter.styles = [commonStyles, styles];
|
|
124
125
|
__decorate([
|
|
125
126
|
property({ type: String, reflect: true })
|
|
126
127
|
], CardFooter.prototype, "slot", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-footer.js","sources":["../../../../src/components/card/src/card-footer.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-footer.js","sources":["../../../../src/components/card/src/card-footer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAgCH;;;;AAIG;AAEH,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU,CAAA;AAAnC,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,IAAI,GAAG,QAAQ;;QAIf,IAAA,CAAA,OAAO,GAAa,EAAE;AAGtB,QAAA,IAAA,CAAA,IAAI,GAAiB,WAAW,CAAC,KAAK;QAGtC,IAAA,CAAA,YAAY,GAAG,KAAK;IAmGtB;AAjGU,IAAA,YAAY,CAAC,MAAc,EAAA;AACjC,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,MAAM,CAAC,OAAO,EAAE;QAClB;AACA,QAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,+BAA+B,EAAE;AAC/C,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,QAAQ,EAAE,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