@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-renderer.js","sources":["../../../../src/components/markdown/src/markdown-renderer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AA4BH;AACA,MAAM,WAAY,SAAQ,SAAS,CAAA;AACjC,IAAA,MAAM,CAAC,MAA+B,EAAA;AACpC,QAAA,OAAO,OAAO;IAChB;AACA,IAAA,MAAM,CAAC,IAAS,EAAE,CAAC,KAAK,CAA4B,EAAA;AAClD,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,OAAkB;AAClC,QAAA,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE;AAChD,YAAA,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,EAAE;AAChD,gBAAA,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;YACvB;AAAO,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OAAO,GAAG,mBAAmB;gBAC7B,SAAS,GAAG,gBAAgB;YAC9B;YAEA,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,KAAK;AAElD,YAAA,OAAO,IAAI,CAAA,CAAA;;qBAEI,OAAO;kBACV,SAAS;qBACN,SAAS;AACK,iCAAA,EAAA,qBAAqB,IAAI,iBAAiB;AAC/C,4BAAA,EAAA,gBAAgB,IAAI,eAAe;AACvC,wBAAA,EAAA,YAAY,IAAI,WAAW;AACvB,4BAAA,EAAA,gBAAgB,IAAI,iBAAiB;AACpC,6BAAA,EAAA,iBAAiB,IAAI,qBAAqB;AACrD,kBAAA,EAAA,MAAM,IAAI,IAAI;2CACS,6BAA6B;gBAC9D,oCAAoC;qCACT,uBAAuB;gBAClD,8BAA8B;gBACxB,UAAU;;aAEb;QACT;;AAGA,QAAA;YACE,OAAO,IAAI,CAAA,CAAA,KAAA,EAAQ,MAAM,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,OAAO,CAAA,MAAA,CAAQ;;AAEzD;;;;"}
|
|
1
|
+
{"version":3,"file":"markdown-renderer.js","sources":["../../../../src/components/markdown/src/markdown-renderer.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAyBH;AACA,MAAM,WAAY,SAAQ,SAAS,CAAA;AACjC,IAAA,MAAM,CAAC,MAA+B,EAAA;AACpC,QAAA,OAAO,OAAO;IAChB;AACA,IAAA,MAAM,CAAC,IAAS,EAAE,CAAC,KAAK,CAA4B,EAAA;AAClD,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,OAAkB;AAClC,QAAA,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE;AAChD,YAAA,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,EAAE;AAChD,gBAA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CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM;AAC3C,oBAAA,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAClD,iBAAA,CAAC,CAAC;YACL;;;;;AAMA,YAAA,OAAO,IAAI,CAAA,CAAA;;;qBAGI,OAAO;kBACV,SAAS;qBACN,SAAS;mCACK,0BAA0B;8BAC/B,qBAAqB;0BACzB,iBAAiB;8BACb,qBAAqB;+BACpB,sBAAsB;oBACjC,WAAW;2CACY,kCAAkC;qCACxC,4BAA4B;gBACjD,KAAK;;aAER;QACT;;AAGA,QAAA;YACE,OAAO,IAAI,CAAA,CAAA,KAAA,EAAQ,MAAM,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,OAAO,CAAA,MAAA,CAAQ;;AAEzD;;;;"}
|
|
@@ -4,7 +4,7 @@ import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
|
4
4
|
* @element cds-aichat-markdown
|
|
5
5
|
*/
|
|
6
6
|
declare class CDSAIChatMarkdown extends LitElement {
|
|
7
|
-
static styles: any;
|
|
7
|
+
static styles: any[];
|
|
8
8
|
/**
|
|
9
9
|
* Sanitize any HTML included in the markdown. e.g. remove script tags, onclick handlers, etc.
|
|
10
10
|
*/
|
|
@@ -13,57 +13,60 @@ declare class CDSAIChatMarkdown extends LitElement {
|
|
|
13
13
|
* Remove all HTML from included markdown.
|
|
14
14
|
*/
|
|
15
15
|
removeHTML: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Direct markdown source input.
|
|
18
|
+
*/
|
|
19
|
+
markdown: string;
|
|
16
20
|
/**
|
|
17
21
|
* If you are actively streaming, setting this to true can help prevent needless UI thrashing when writing
|
|
18
22
|
* complex components (like a sortable and filterable table).
|
|
19
23
|
*/
|
|
20
24
|
streaming: boolean;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
/** Enable syntax highlighting for any code fence blocks. */
|
|
26
|
+
codeSnippetHighlight: boolean;
|
|
27
|
+
/** Label for collapsing long code blocks. */
|
|
28
|
+
codeSnippetShowLessText: string;
|
|
29
|
+
/** Label for expanding long code blocks. */
|
|
30
|
+
codeSnippetShowMoreText: string;
|
|
31
|
+
/** Tooltip content for the copy action on code blocks. */
|
|
32
|
+
codeSnippetCopyButtonTooltipContent: string;
|
|
33
|
+
/** Formatter for the code block line count. */
|
|
34
|
+
codeSnippetGetLineCountText?: ({ count }: {
|
|
35
|
+
count: number;
|
|
36
|
+
}) => string;
|
|
37
|
+
/** Aria-label for code snippets when in read-only mode. */
|
|
38
|
+
codeSnippetAriaLabelReadOnly: string;
|
|
39
|
+
/** Aria-label for code snippets when in editable mode. */
|
|
40
|
+
codeSnippetAriaLabelEditable: string;
|
|
25
41
|
/** Placeholder text for table filters. */
|
|
26
|
-
|
|
42
|
+
tableFilterPlaceholderText: string;
|
|
27
43
|
/** Label for the previous page control in tables. */
|
|
28
|
-
|
|
44
|
+
tablePreviousPageText: string;
|
|
29
45
|
/** Label for the next page control in tables. */
|
|
30
|
-
|
|
46
|
+
tableNextPageText: string;
|
|
31
47
|
/** Label for the items-per-page control in tables. */
|
|
32
|
-
|
|
48
|
+
tableItemsPerPageText: string;
|
|
33
49
|
/** Label for download of CSV of table data. */
|
|
34
|
-
|
|
50
|
+
tableDownloadLabelText: string;
|
|
35
51
|
/** Locale used for table pagination and formatting. */
|
|
36
|
-
|
|
52
|
+
tableLocale: string;
|
|
37
53
|
/** Optional formatter for supplemental pagination text. */
|
|
38
|
-
|
|
54
|
+
tableGetPaginationSupplementalText?: ({ count }: {
|
|
39
55
|
count: number;
|
|
40
56
|
}) => string;
|
|
41
57
|
/** Optional formatter for pagination status text. */
|
|
42
|
-
|
|
58
|
+
tableGetPaginationStatusText?: ({ start, end, count, }: {
|
|
43
59
|
start: number;
|
|
44
60
|
end: number;
|
|
45
61
|
count: number;
|
|
46
62
|
}) => string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/** Label for expanding long code blocks. */
|
|
52
|
-
showMoreText: string;
|
|
53
|
-
/** Tooltip content for the copy action on code blocks. */
|
|
54
|
-
tooltipContent: string;
|
|
55
|
-
/** Formatter for the code block line count. */
|
|
56
|
-
getLineCountText?: ({ count }: {
|
|
57
|
-
count: number;
|
|
58
|
-
}) => string;
|
|
63
|
+
private hasRenderedStreamingTableLoadingFrame;
|
|
64
|
+
private stagedStreamingTokenTree;
|
|
65
|
+
private isStreamingTableLoadingMode;
|
|
66
|
+
private hasAdoptedLightDomMarkdown;
|
|
59
67
|
connectedCallback(): void;
|
|
60
|
-
|
|
68
|
+
private adoptLightDomMarkdown;
|
|
61
69
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
62
|
-
/**
|
|
63
|
-
* Reads slotted text content and uses it as the markdown source when provided.
|
|
64
|
-
*/
|
|
65
|
-
private _syncMarkdownFromLightDom;
|
|
66
|
-
protected firstUpdated(): void;
|
|
67
70
|
protected getUpdateComplete(): Promise<boolean>;
|
|
68
71
|
protected render(): TemplateResult<1>;
|
|
69
72
|
}
|
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
|
-
import { LitElement } from 'lit';
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
11
11
|
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
12
|
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import commonStyles from '../../../globals/scss/common.scss.js';
|
|
13
14
|
import styles from './markdown.scss.js';
|
|
14
15
|
import throttle from 'lodash-es/throttle.js';
|
|
15
|
-
import { createRef } from 'lit/directives/ref.js';
|
|
16
16
|
import { markdownToTokenTree } from './markdown-token-tree.js';
|
|
17
17
|
import { renderTokenTree } from './markdown-renderer.js';
|
|
18
18
|
import { consoleError } from './utils.js';
|
|
19
|
-
import { markdownTemplate } from './markdown.template.js';
|
|
20
19
|
|
|
21
20
|
/*
|
|
22
21
|
* Copyright IBM Corp. 2025
|
|
@@ -26,6 +25,50 @@ import { markdownTemplate } from './markdown.template.js';
|
|
|
26
25
|
*
|
|
27
26
|
* @license
|
|
28
27
|
*/
|
|
28
|
+
function hasTrailingTableToken(node) {
|
|
29
|
+
if (node.token.tag === "table") {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
const children = node.children || [];
|
|
33
|
+
if (children.length === 0) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
// Follow only the rightmost branch. A trailing table is one that sits at the
|
|
37
|
+
// end of the current markdown output, not just the end of an arbitrary subtree.
|
|
38
|
+
return hasTrailingTableToken(children[children.length - 1]);
|
|
39
|
+
}
|
|
40
|
+
function hasNodeAfterTable(node) {
|
|
41
|
+
const children = node.children || [];
|
|
42
|
+
for (let index = 0; index < children.length; index++) {
|
|
43
|
+
const child = children[index];
|
|
44
|
+
if (child.token.tag === "table" && index < children.length - 1) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
if (hasNodeAfterTable(child)) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
function hasLikelyPartialTableTail(markdown) {
|
|
54
|
+
const normalized = markdown.replace(/\r/g, "");
|
|
55
|
+
const lines = normalized.split("\n");
|
|
56
|
+
let index = lines.length - 1;
|
|
57
|
+
while (index >= 0 && lines[index].trim() === "") {
|
|
58
|
+
index--;
|
|
59
|
+
}
|
|
60
|
+
if (index < 0) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const lastLine = lines[index].trim();
|
|
64
|
+
// During streaming, partially emitted table rows frequently end with a pipe
|
|
65
|
+
// and markdown-it can temporarily stop recognizing the table token.
|
|
66
|
+
if (lastLine.startsWith("|") || lastLine.endsWith("|")) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
// Keep loading mode if the tail still looks like a table separator row.
|
|
70
|
+
return /^\|?[\s:-]+(\|[\s:-]+)+\|?$/.test(lastLine);
|
|
71
|
+
}
|
|
29
72
|
/**
|
|
30
73
|
* Markdown component
|
|
31
74
|
* @element cds-aichat-markdown
|
|
@@ -41,55 +84,55 @@ let CDSAIChatMarkdown = class CDSAIChatMarkdown extends LitElement {
|
|
|
41
84
|
* Remove all HTML from included markdown.
|
|
42
85
|
*/
|
|
43
86
|
this.removeHTML = false;
|
|
87
|
+
/**
|
|
88
|
+
* Direct markdown source input.
|
|
89
|
+
*/
|
|
90
|
+
this.markdown = "";
|
|
44
91
|
/**
|
|
45
92
|
* If you are actively streaming, setting this to true can help prevent needless UI thrashing when writing
|
|
46
93
|
* complex components (like a sortable and filterable table).
|
|
47
94
|
*/
|
|
48
95
|
this.streaming = false;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
96
|
+
// Code snippet properties
|
|
97
|
+
/** Enable syntax highlighting for any code fence blocks. */
|
|
98
|
+
this.codeSnippetHighlight = false;
|
|
99
|
+
/** Label for collapsing long code blocks. */
|
|
100
|
+
this.codeSnippetShowLessText = "Show less";
|
|
101
|
+
/** Label for expanding long code blocks. */
|
|
102
|
+
this.codeSnippetShowMoreText = "Show more";
|
|
103
|
+
/** Tooltip content for the copy action on code blocks. */
|
|
104
|
+
this.codeSnippetCopyButtonTooltipContent = "Copy code";
|
|
105
|
+
/** Aria-label for code snippets when in read-only mode. */
|
|
106
|
+
this.codeSnippetAriaLabelReadOnly = "Code snippet";
|
|
107
|
+
/** Aria-label for code snippets when in editable mode. */
|
|
108
|
+
this.codeSnippetAriaLabelEditable = "Code editor";
|
|
109
|
+
// Table properties
|
|
54
110
|
/** Placeholder text for table filters. */
|
|
55
|
-
this.
|
|
111
|
+
this.tableFilterPlaceholderText = "Filter table...";
|
|
56
112
|
/** Label for the previous page control in tables. */
|
|
57
|
-
this.
|
|
113
|
+
this.tablePreviousPageText = "Previous page";
|
|
58
114
|
/** Label for the next page control in tables. */
|
|
59
|
-
this.
|
|
115
|
+
this.tableNextPageText = "Next page";
|
|
60
116
|
/** Label for the items-per-page control in tables. */
|
|
61
|
-
this.
|
|
117
|
+
this.tableItemsPerPageText = "Items per page:";
|
|
62
118
|
/** Label for download of CSV of table data. */
|
|
63
|
-
this.
|
|
119
|
+
this.tableDownloadLabelText = "Download table data";
|
|
64
120
|
/** Locale used for table pagination and formatting. */
|
|
65
|
-
this.
|
|
66
|
-
// Code snippet strings
|
|
67
|
-
/** Feedback text shown after copying code blocks. */
|
|
68
|
-
this.feedback = "Copied!";
|
|
69
|
-
/** Label for collapsing long code blocks. */
|
|
70
|
-
this.showLessText = "Show less";
|
|
71
|
-
/** Label for expanding long code blocks. */
|
|
72
|
-
this.showMoreText = "Show more";
|
|
73
|
-
/** Tooltip content for the copy action on code blocks. */
|
|
74
|
-
this.tooltipContent = "Copy code";
|
|
121
|
+
this.tableLocale = "en";
|
|
75
122
|
/**
|
|
76
123
|
* @internal
|
|
77
124
|
*/
|
|
78
125
|
this.needsReparse = false;
|
|
79
|
-
/**
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
|
-
this.contentSlot = createRef();
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
*/
|
|
86
|
-
this._slottedMarkdown = "";
|
|
87
126
|
/**
|
|
88
127
|
* Tracks the latest asynchronous rendering work so callers waiting on `updateComplete` know when throttled updates are done.
|
|
89
128
|
*
|
|
90
129
|
* @internal
|
|
91
130
|
*/
|
|
92
131
|
this.renderTask = null;
|
|
132
|
+
this.hasRenderedStreamingTableLoadingFrame = false;
|
|
133
|
+
this.stagedStreamingTokenTree = null;
|
|
134
|
+
this.isStreamingTableLoadingMode = false;
|
|
135
|
+
this.hasAdoptedLightDomMarkdown = false;
|
|
93
136
|
/**
|
|
94
137
|
* @internal
|
|
95
138
|
*/
|
|
@@ -125,36 +168,94 @@ let CDSAIChatMarkdown = class CDSAIChatMarkdown extends LitElement {
|
|
|
125
168
|
*/
|
|
126
169
|
this.renderMarkdown = async () => {
|
|
127
170
|
try {
|
|
171
|
+
const markdownContent = this.markdown ?? "";
|
|
172
|
+
const previousTreeForDiff = this.stagedStreamingTokenTree ?? this.tokenTree;
|
|
173
|
+
let nextTokenTree = previousTreeForDiff;
|
|
128
174
|
if (this.needsReparse) {
|
|
129
175
|
// First, we take the markdown we were given and use the markdown-it parser to turn is into a tree we can
|
|
130
176
|
// transform into Lit components and compare smartly to avoid re-renders of components that were already
|
|
131
177
|
// rendered when the markdown is updated (likely by streaming, but possibly by an edit somewhere in the
|
|
132
178
|
// middle). It takes the current tokenTree as an argument for quick diffing to avoid re-creating parts
|
|
133
179
|
// of the tree.
|
|
134
|
-
|
|
180
|
+
nextTokenTree = markdownToTokenTree(markdownContent, previousTreeForDiff, !this.removeHTML);
|
|
135
181
|
this.needsReparse = false;
|
|
136
182
|
}
|
|
183
|
+
const hasStreamingTailTable = Boolean(this.streaming) && hasTrailingTableToken(nextTokenTree);
|
|
184
|
+
const hasParsedNodeAfterTable = hasNodeAfterTable(nextTokenTree);
|
|
185
|
+
if (!this.streaming) {
|
|
186
|
+
this.isStreamingTableLoadingMode = false;
|
|
187
|
+
}
|
|
188
|
+
else if (this.isStreamingTableLoadingMode) {
|
|
189
|
+
if (hasParsedNodeAfterTable &&
|
|
190
|
+
!hasLikelyPartialTableTail(markdownContent)) {
|
|
191
|
+
this.isStreamingTableLoadingMode = false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else if (hasStreamingTailTable) {
|
|
195
|
+
this.isStreamingTableLoadingMode = true;
|
|
196
|
+
}
|
|
197
|
+
if (this.streaming && this.isStreamingTableLoadingMode) {
|
|
198
|
+
if (!this.hasRenderedStreamingTableLoadingFrame) {
|
|
199
|
+
if (nextTokenTree !== this.tokenTree) {
|
|
200
|
+
this.tokenTree = nextTokenTree;
|
|
201
|
+
}
|
|
202
|
+
this.renderedContent = renderTokenTree(nextTokenTree, {
|
|
203
|
+
sanitize: this.sanitizeHTML,
|
|
204
|
+
streaming: this.streaming,
|
|
205
|
+
// Code snippet properties
|
|
206
|
+
codeSnippetHighlight: this.codeSnippetHighlight,
|
|
207
|
+
codeSnippetShowLessText: this.codeSnippetShowLessText,
|
|
208
|
+
codeSnippetShowMoreText: this.codeSnippetShowMoreText,
|
|
209
|
+
codeSnippetCopyButtonTooltipContent: this.codeSnippetCopyButtonTooltipContent,
|
|
210
|
+
codeSnippetGetLineCountText: this.codeSnippetGetLineCountText,
|
|
211
|
+
codeSnippetAriaLabelReadOnly: this.codeSnippetAriaLabelReadOnly,
|
|
212
|
+
codeSnippetAriaLabelEditable: this.codeSnippetAriaLabelEditable,
|
|
213
|
+
// Table properties
|
|
214
|
+
tableFilterPlaceholderText: this.tableFilterPlaceholderText,
|
|
215
|
+
tablePreviousPageText: this.tablePreviousPageText,
|
|
216
|
+
tableNextPageText: this.tableNextPageText,
|
|
217
|
+
tableItemsPerPageText: this.tableItemsPerPageText,
|
|
218
|
+
tableDownloadLabelText: this.tableDownloadLabelText,
|
|
219
|
+
tableLocale: this.tableLocale,
|
|
220
|
+
tableGetPaginationSupplementalText: this.tableGetPaginationSupplementalText,
|
|
221
|
+
tableGetPaginationStatusText: this.tableGetPaginationStatusText,
|
|
222
|
+
});
|
|
223
|
+
this.hasRenderedStreamingTableLoadingFrame = true;
|
|
224
|
+
this.stagedStreamingTokenTree = null;
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
this.stagedStreamingTokenTree = nextTokenTree;
|
|
228
|
+
}
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const renderTree = this.stagedStreamingTokenTree ?? nextTokenTree;
|
|
232
|
+
this.stagedStreamingTokenTree = null;
|
|
233
|
+
this.hasRenderedStreamingTableLoadingFrame = false;
|
|
234
|
+
if (renderTree !== this.tokenTree) {
|
|
235
|
+
this.tokenTree = renderTree;
|
|
236
|
+
}
|
|
137
237
|
// Next we take that tree and transform it into Lit content to be rendered into the template.
|
|
138
238
|
// this.renderedContent is what is rendered in the template directly.
|
|
139
|
-
this.renderedContent = renderTokenTree(
|
|
239
|
+
this.renderedContent = renderTokenTree(renderTree, {
|
|
140
240
|
sanitize: this.sanitizeHTML,
|
|
141
241
|
streaming: this.streaming,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
242
|
+
// Code snippet properties
|
|
243
|
+
codeSnippetHighlight: this.codeSnippetHighlight,
|
|
244
|
+
codeSnippetShowLessText: this.codeSnippetShowLessText,
|
|
245
|
+
codeSnippetShowMoreText: this.codeSnippetShowMoreText,
|
|
246
|
+
codeSnippetCopyButtonTooltipContent: this.codeSnippetCopyButtonTooltipContent,
|
|
247
|
+
codeSnippetGetLineCountText: this.codeSnippetGetLineCountText,
|
|
248
|
+
codeSnippetAriaLabelReadOnly: this.codeSnippetAriaLabelReadOnly,
|
|
249
|
+
codeSnippetAriaLabelEditable: this.codeSnippetAriaLabelEditable,
|
|
250
|
+
// Table properties
|
|
251
|
+
tableFilterPlaceholderText: this.tableFilterPlaceholderText,
|
|
252
|
+
tablePreviousPageText: this.tablePreviousPageText,
|
|
253
|
+
tableNextPageText: this.tableNextPageText,
|
|
254
|
+
tableItemsPerPageText: this.tableItemsPerPageText,
|
|
255
|
+
tableDownloadLabelText: this.tableDownloadLabelText,
|
|
256
|
+
tableLocale: this.tableLocale,
|
|
257
|
+
tableGetPaginationSupplementalText: this.tableGetPaginationSupplementalText,
|
|
258
|
+
tableGetPaginationStatusText: this.tableGetPaginationStatusText,
|
|
158
259
|
});
|
|
159
260
|
}
|
|
160
261
|
catch (error) {
|
|
@@ -179,27 +280,27 @@ let CDSAIChatMarkdown = class CDSAIChatMarkdown extends LitElement {
|
|
|
179
280
|
}
|
|
180
281
|
connectedCallback() {
|
|
181
282
|
super.connectedCallback();
|
|
283
|
+
this.adoptLightDomMarkdown();
|
|
182
284
|
this.needsReparse = true;
|
|
183
285
|
this.scheduleRender();
|
|
184
|
-
this._syncMarkdownFromLightDom();
|
|
185
|
-
this.mutationObserver = new MutationObserver(() => {
|
|
186
|
-
this._syncMarkdownFromLightDom();
|
|
187
|
-
});
|
|
188
|
-
this.mutationObserver.observe(this, {
|
|
189
|
-
childList: true,
|
|
190
|
-
characterData: true,
|
|
191
|
-
subtree: true,
|
|
192
|
-
});
|
|
193
286
|
}
|
|
194
|
-
|
|
195
|
-
this.
|
|
196
|
-
|
|
197
|
-
|
|
287
|
+
adoptLightDomMarkdown() {
|
|
288
|
+
if (this.hasAdoptedLightDomMarkdown || this.markdown) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
// Backward compatibility: treat static light-DOM text as initial markdown
|
|
292
|
+
// when the explicit `markdown` property was not provided.
|
|
293
|
+
const lightDomMarkdown = this.textContent?.trim() ?? "";
|
|
294
|
+
if (lightDomMarkdown) {
|
|
295
|
+
this.markdown = lightDomMarkdown;
|
|
296
|
+
}
|
|
297
|
+
this.hasAdoptedLightDomMarkdown = true;
|
|
198
298
|
}
|
|
199
299
|
willUpdate(changed) {
|
|
200
|
-
if (changed.has("removeHTML")) {
|
|
300
|
+
if (changed.has("removeHTML") || changed.has("markdown")) {
|
|
201
301
|
// Properties that affect token tree structure require full reparse
|
|
202
302
|
// - removeHTML: changes which parser is used (html: true vs false)
|
|
303
|
+
// - markdown: updates the source text to parse
|
|
203
304
|
this.needsReparse = true;
|
|
204
305
|
this.scheduleRender();
|
|
205
306
|
}
|
|
@@ -210,51 +311,26 @@ let CDSAIChatMarkdown = class CDSAIChatMarkdown extends LitElement {
|
|
|
210
311
|
// - streaming: affects loading states in rendered output
|
|
211
312
|
changed.has("sanitizeHTML") ||
|
|
212
313
|
changed.has("streaming") ||
|
|
213
|
-
|
|
214
|
-
changed.has("
|
|
215
|
-
changed.has("
|
|
216
|
-
changed.has("
|
|
217
|
-
changed.has("
|
|
218
|
-
changed.has("
|
|
219
|
-
changed.has("
|
|
220
|
-
changed.has("
|
|
221
|
-
|
|
222
|
-
changed.has("
|
|
223
|
-
changed.has("
|
|
224
|
-
changed.has("
|
|
225
|
-
changed.has("
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
* Reads slotted text content and uses it as the markdown source when provided.
|
|
231
|
-
*/
|
|
232
|
-
_syncMarkdownFromLightDom() {
|
|
233
|
-
const slotEl = this.contentSlot.value;
|
|
234
|
-
let content = "";
|
|
235
|
-
if (slotEl) {
|
|
236
|
-
content = slotEl
|
|
237
|
-
.assignedNodes({ flatten: true })
|
|
238
|
-
.map((node) => ("textContent" in node ? node.textContent || "" : ""))
|
|
239
|
-
.join("")
|
|
240
|
-
.trim();
|
|
241
|
-
}
|
|
242
|
-
else if (this.childNodes.length) {
|
|
243
|
-
// Fallback before the slot is stamped
|
|
244
|
-
content = Array.from(this.childNodes)
|
|
245
|
-
.map((node) => ("textContent" in node ? node.textContent || "" : ""))
|
|
246
|
-
.join("")
|
|
247
|
-
.trim();
|
|
248
|
-
}
|
|
249
|
-
if (content && content !== this._slottedMarkdown) {
|
|
250
|
-
this._slottedMarkdown = content;
|
|
251
|
-
this.needsReparse = true;
|
|
314
|
+
// Code snippet properties
|
|
315
|
+
changed.has("codeSnippetHighlight") ||
|
|
316
|
+
changed.has("codeSnippetShowLessText") ||
|
|
317
|
+
changed.has("codeSnippetShowMoreText") ||
|
|
318
|
+
changed.has("codeSnippetCopyButtonTooltipContent") ||
|
|
319
|
+
changed.has("codeSnippetGetLineCountText") ||
|
|
320
|
+
changed.has("codeSnippetAriaLabelReadOnly") ||
|
|
321
|
+
changed.has("codeSnippetAriaLabelEditable") ||
|
|
322
|
+
// Table properties
|
|
323
|
+
changed.has("tableFilterPlaceholderText") ||
|
|
324
|
+
changed.has("tablePreviousPageText") ||
|
|
325
|
+
changed.has("tableNextPageText") ||
|
|
326
|
+
changed.has("tableItemsPerPageText") ||
|
|
327
|
+
changed.has("tableDownloadLabelText") ||
|
|
328
|
+
changed.has("tableLocale") ||
|
|
329
|
+
changed.has("tableGetPaginationSupplementalText") ||
|
|
330
|
+
changed.has("tableGetPaginationStatusText")) {
|
|
252
331
|
this.scheduleRender();
|
|
253
332
|
}
|
|
254
333
|
}
|
|
255
|
-
firstUpdated() {
|
|
256
|
-
this._syncMarkdownFromLightDom();
|
|
257
|
-
}
|
|
258
334
|
async getUpdateComplete() {
|
|
259
335
|
// `updateComplete` is Lit's public hook for consumers/tests to await
|
|
260
336
|
// all pending work. Because we throttle renders, the base implementation
|
|
@@ -273,65 +349,72 @@ let CDSAIChatMarkdown = class CDSAIChatMarkdown extends LitElement {
|
|
|
273
349
|
}
|
|
274
350
|
render() {
|
|
275
351
|
const { renderedContent } = this;
|
|
276
|
-
return
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
renderedContent,
|
|
280
|
-
});
|
|
352
|
+
return html `<div class="cds-aichat-markdown-stack">
|
|
353
|
+
${renderedContent}
|
|
354
|
+
</div>`;
|
|
281
355
|
}
|
|
282
356
|
};
|
|
283
|
-
CDSAIChatMarkdown.styles = styles;
|
|
357
|
+
CDSAIChatMarkdown.styles = [commonStyles, styles];
|
|
284
358
|
__decorate([
|
|
285
359
|
property({ type: Boolean, attribute: "sanitize-html" })
|
|
286
360
|
], CDSAIChatMarkdown.prototype, "sanitizeHTML", void 0);
|
|
287
361
|
__decorate([
|
|
288
362
|
property({ type: Boolean, attribute: "remove-html" })
|
|
289
363
|
], CDSAIChatMarkdown.prototype, "removeHTML", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
property({ type: String })
|
|
366
|
+
], CDSAIChatMarkdown.prototype, "markdown", void 0);
|
|
290
367
|
__decorate([
|
|
291
368
|
property({ type: Boolean, attribute: "streaming" })
|
|
292
369
|
], CDSAIChatMarkdown.prototype, "streaming", void 0);
|
|
293
370
|
__decorate([
|
|
294
|
-
property({ type: Boolean, attribute: "highlight" })
|
|
295
|
-
], CDSAIChatMarkdown.prototype, "
|
|
371
|
+
property({ type: Boolean, attribute: "code-snippet-highlight" })
|
|
372
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetHighlight", void 0);
|
|
296
373
|
__decorate([
|
|
297
|
-
property({ type: String, attribute: "
|
|
298
|
-
], CDSAIChatMarkdown.prototype, "
|
|
374
|
+
property({ type: String, attribute: "code-snippet-show-less-text" })
|
|
375
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetShowLessText", void 0);
|
|
299
376
|
__decorate([
|
|
300
|
-
property({ type: String, attribute: "
|
|
301
|
-
], CDSAIChatMarkdown.prototype, "
|
|
377
|
+
property({ type: String, attribute: "code-snippet-show-more-text" })
|
|
378
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetShowMoreText", void 0);
|
|
302
379
|
__decorate([
|
|
303
|
-
property({
|
|
304
|
-
|
|
380
|
+
property({
|
|
381
|
+
type: String,
|
|
382
|
+
attribute: "code-snippet-copy-button-tooltip-content",
|
|
383
|
+
})
|
|
384
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetCopyButtonTooltipContent", void 0);
|
|
305
385
|
__decorate([
|
|
306
|
-
property({ type:
|
|
307
|
-
], CDSAIChatMarkdown.prototype, "
|
|
386
|
+
property({ type: Object, attribute: false })
|
|
387
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetGetLineCountText", void 0);
|
|
308
388
|
__decorate([
|
|
309
|
-
property({ type: String, attribute: "
|
|
310
|
-
], CDSAIChatMarkdown.prototype, "
|
|
389
|
+
property({ type: String, attribute: "code-snippet-aria-label-readonly" })
|
|
390
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetAriaLabelReadOnly", void 0);
|
|
311
391
|
__decorate([
|
|
312
|
-
property({ type: String, attribute: "
|
|
313
|
-
], CDSAIChatMarkdown.prototype, "
|
|
392
|
+
property({ type: String, attribute: "code-snippet-aria-label-editable" })
|
|
393
|
+
], CDSAIChatMarkdown.prototype, "codeSnippetAriaLabelEditable", void 0);
|
|
314
394
|
__decorate([
|
|
315
|
-
property({ type:
|
|
316
|
-
], CDSAIChatMarkdown.prototype, "
|
|
395
|
+
property({ type: String, attribute: "table-filter-placeholder-text" })
|
|
396
|
+
], CDSAIChatMarkdown.prototype, "tableFilterPlaceholderText", void 0);
|
|
317
397
|
__decorate([
|
|
318
|
-
property({ type:
|
|
319
|
-
], CDSAIChatMarkdown.prototype, "
|
|
398
|
+
property({ type: String, attribute: "table-previous-page-text" })
|
|
399
|
+
], CDSAIChatMarkdown.prototype, "tablePreviousPageText", void 0);
|
|
320
400
|
__decorate([
|
|
321
|
-
property({ type: String, attribute: "
|
|
322
|
-
], CDSAIChatMarkdown.prototype, "
|
|
401
|
+
property({ type: String, attribute: "table-next-page-text" })
|
|
402
|
+
], CDSAIChatMarkdown.prototype, "tableNextPageText", void 0);
|
|
323
403
|
__decorate([
|
|
324
|
-
property({ type: String, attribute: "
|
|
325
|
-
], CDSAIChatMarkdown.prototype, "
|
|
404
|
+
property({ type: String, attribute: "table-items-per-page-text" })
|
|
405
|
+
], CDSAIChatMarkdown.prototype, "tableItemsPerPageText", void 0);
|
|
326
406
|
__decorate([
|
|
327
|
-
property({ type: String, attribute: "
|
|
328
|
-
], CDSAIChatMarkdown.prototype, "
|
|
407
|
+
property({ type: String, attribute: "table-download-label-text" })
|
|
408
|
+
], CDSAIChatMarkdown.prototype, "tableDownloadLabelText", void 0);
|
|
329
409
|
__decorate([
|
|
330
|
-
property({ type: String, attribute: "
|
|
331
|
-
], CDSAIChatMarkdown.prototype, "
|
|
410
|
+
property({ type: String, attribute: "table-locale" })
|
|
411
|
+
], CDSAIChatMarkdown.prototype, "tableLocale", void 0);
|
|
412
|
+
__decorate([
|
|
413
|
+
property({ type: Object, attribute: false })
|
|
414
|
+
], CDSAIChatMarkdown.prototype, "tableGetPaginationSupplementalText", void 0);
|
|
332
415
|
__decorate([
|
|
333
416
|
property({ type: Object, attribute: false })
|
|
334
|
-
], CDSAIChatMarkdown.prototype, "
|
|
417
|
+
], CDSAIChatMarkdown.prototype, "tableGetPaginationStatusText", void 0);
|
|
335
418
|
__decorate([
|
|
336
419
|
state()
|
|
337
420
|
], CDSAIChatMarkdown.prototype, "tokenTree", void 0);
|