@carbon/ai-chat-components 0.7.0 → 0.7.1
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/custom-elements.json +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.js +3 -3
- 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/content-sync.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.js +1 -1
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js +1 -1
- package/es-custom/components/card/index.d.ts +11 -0
- package/es-custom/components/card/index.js +11 -0
- package/es-custom/components/card/index.js.map +1 -0
- package/es-custom/components/card/src/card-footer.d.ts +43 -0
- package/es-custom/components/card/src/card-footer.js +141 -0
- package/es-custom/components/card/src/card-footer.js.map +1 -0
- package/es-custom/components/card/src/card-footer.scss.js +13 -0
- package/es-custom/components/card/src/card-footer.scss.js.map +1 -0
- package/es-custom/components/card/src/card-steps.d.ts +28 -0
- package/es-custom/components/card/src/card-steps.js +91 -0
- package/es-custom/components/card/src/card-steps.js.map +1 -0
- package/es-custom/components/card/src/card-steps.scss.js +13 -0
- package/es-custom/components/card/src/card-steps.scss.js.map +1 -0
- package/es-custom/components/card/src/card.d.ts +27 -0
- package/es-custom/components/card/src/card.js +65 -0
- package/es-custom/components/card/src/card.js.map +1 -0
- package/es-custom/components/card/src/card.scss.js +13 -0
- package/es-custom/components/card/src/card.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/defs.d.ts +54 -0
- package/es-custom/components/chain-of-thought/defs.js +38 -0
- package/es-custom/components/chain-of-thought/defs.js.map +1 -0
- package/es-custom/components/chain-of-thought/index.d.ts +10 -0
- package/es-custom/components/chain-of-thought/index.js +13 -0
- package/es-custom/components/chain-of-thought/index.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +41 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +132 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/chain-of-thought.scss.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +179 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
- package/es-custom/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
- package/es-custom/components/chat-button/defs.d.ts +25 -0
- package/es-custom/components/chat-button/defs.js +36 -0
- package/es-custom/components/chat-button/defs.js.map +1 -0
- package/es-custom/components/chat-button/index.d.ts +9 -0
- package/es-custom/components/chat-button/index.js +9 -0
- package/es-custom/components/chat-button/index.js.map +1 -0
- package/es-custom/components/chat-button/src/chat-button.d.ts +40 -0
- package/es-custom/components/chat-button/src/chat-button.js +78 -0
- package/es-custom/components/chat-button/src/chat-button.js.map +1 -0
- package/es-custom/components/chat-button/src/chat-button.scss.js +13 -0
- package/es-custom/components/chat-button/src/chat-button.scss.js.map +1 -0
- package/es-custom/components/code-snippet/index.d.ts +3 -0
- package/es-custom/components/code-snippet/index.js +10 -0
- package/es-custom/components/code-snippet/index.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.d.ts +63 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.js +186 -0
- package/es-custom/components/code-snippet/src/code-snippet-card.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +461 -0
- package/es-custom/components/code-snippet/src/code-snippet.js +678 -0
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -0
- package/es-custom/components/code-snippet/src/code-snippet.scss.js +13 -0
- package/es-custom/components/code-snippet/src/code-snippet.scss.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js +65 -0
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js +36 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +7 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js +13 -0
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.d.ts +12 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js +72 -0
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +28 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +75 -0
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +38 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +220 -0
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.d.ts +6 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.js +1043 -0
- package/es-custom/components/code-snippet/src/codemirror/language-data.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.d.ts +79 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js +219 -0
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.d.ts +123 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +183 -0
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +54 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js +320 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -0
- package/es-custom/components/code-snippet/src/dom-utils.d.ts +24 -0
- package/es-custom/components/code-snippet/src/dom-utils.js +63 -0
- package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/formatters.d.ts +4 -0
- package/es-custom/components/code-snippet/src/formatters.js +19 -0
- package/es-custom/components/code-snippet/src/formatters.js.map +1 -0
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +22 -0
- package/es-custom/components/code-snippet/src/layout-utils.js +63 -0
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -0
- package/es-custom/components/code-snippet/src/streaming-manager.d.ts +24 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js +120 -0
- package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -0
- package/es-custom/components/feedback/index.d.ts +4 -0
- package/es-custom/components/feedback/index.js +10 -0
- package/es-custom/components/feedback/index.js.map +1 -0
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +63 -0
- package/es-custom/components/feedback/src/feedback-buttons.js +113 -0
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -0
- 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-buttons.template.d.ts +4 -0
- package/es-custom/components/feedback/src/feedback-buttons.template.js +79 -0
- package/es-custom/components/feedback/src/feedback-buttons.template.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.d.ts +113 -0
- package/es-custom/components/feedback/src/feedback.js +195 -0
- package/es-custom/components/feedback/src/feedback.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.scss.js +13 -0
- package/es-custom/components/feedback/src/feedback.scss.js.map +1 -0
- package/es-custom/components/feedback/src/feedback.template.d.ts +12 -0
- package/es-custom/components/feedback/src/feedback.template.js +115 -0
- package/es-custom/components/feedback/src/feedback.template.js.map +1 -0
- package/es-custom/components/markdown/index.d.ts +2 -0
- package/es-custom/components/markdown/index.js +9 -0
- package/es-custom/components/markdown/index.js.map +1 -0
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +66 -0
- package/es-custom/components/markdown/src/markdown-renderer.js +359 -0
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -0
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +32 -0
- package/es-custom/components/markdown/src/markdown-token-tree.js +180 -0
- package/es-custom/components/markdown/src/markdown-token-tree.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.d.ts +72 -0
- package/es-custom/components/markdown/src/markdown.js +342 -0
- package/es-custom/components/markdown/src/markdown.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.scss.js +13 -0
- package/es-custom/components/markdown/src/markdown.scss.js.map +1 -0
- package/es-custom/components/markdown/src/markdown.template.d.ts +6 -0
- package/es-custom/components/markdown/src/markdown.template.js +29 -0
- package/es-custom/components/markdown/src/markdown.template.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.d.ts +7 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js +84 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.d.ts +7 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js +59 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.d.ts +12 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js +73 -0
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.d.ts +26 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.js +330 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/core.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.d.ts +6 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js +63 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/blocks.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.d.ts +6 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.js +43 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/code.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.d.ts +5 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.js +55 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/index.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.d.ts +19 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js +210 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/inline.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.d.ts +13 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js +156 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/lists.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.d.ts +13 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js +216 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/patterns/tables.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.d.ts +34 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.js +8 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/types.js.map +1 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.d.ts +25 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.js +62 -0
- package/es-custom/components/markdown/src/plugins/markdownItAttrs/utils.js.map +1 -0
- package/es-custom/components/markdown/src/utils/html-helpers.d.ts +2 -0
- package/es-custom/components/markdown/src/utils/html-helpers.js +204 -0
- package/es-custom/components/markdown/src/utils/html-helpers.js.map +1 -0
- package/es-custom/components/markdown/src/utils/table-helpers.d.ts +31 -0
- package/es-custom/components/markdown/src/utils/table-helpers.js +106 -0
- package/es-custom/components/markdown/src/utils/table-helpers.js.map +1 -0
- package/es-custom/components/markdown/src/utils.d.ts +8 -0
- package/es-custom/components/markdown/src/utils.js +31 -0
- package/es-custom/components/markdown/src/utils.js.map +1 -0
- package/es-custom/components/processing/index.d.ts +1 -0
- package/es-custom/components/processing/index.js +9 -0
- package/es-custom/components/processing/index.js.map +1 -0
- package/es-custom/components/processing/src/processing.d.ts +16 -0
- package/es-custom/components/processing/src/processing.js +59 -0
- package/es-custom/components/processing/src/processing.js.map +1 -0
- package/es-custom/components/processing/src/processing.scss.js +13 -0
- package/es-custom/components/processing/src/processing.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/index.d.ts +4 -0
- package/es-custom/components/reasoning-steps/index.js +11 -0
- package/es-custom/components/reasoning-steps/index.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +33 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +251 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +19 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +112 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js +13 -0
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
- package/es-custom/components/table/index.d.ts +3 -0
- package/es-custom/components/table/index.js +9 -0
- package/es-custom/components/table/index.js.map +1 -0
- package/es-custom/components/table/src/table-loader.d.ts +4 -0
- package/es-custom/components/table/src/table-loader.js +28 -0
- package/es-custom/components/table/src/table-loader.js.map +1 -0
- package/es-custom/components/table/src/table-pagination.template.d.ts +27 -0
- package/es-custom/components/table/src/table-pagination.template.js +55 -0
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -0
- package/es-custom/components/table/src/table-runtime.d.ts +2 -0
- package/es-custom/components/table/src/table-runtime.js +10 -0
- package/es-custom/components/table/src/table-runtime.js.map +1 -0
- package/es-custom/components/table/src/table-skeleton.template.d.ts +6 -0
- package/es-custom/components/table/src/table-skeleton.template.js +34 -0
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -0
- package/es-custom/components/table/src/table.d.ts +184 -0
- package/es-custom/components/table/src/table.js +543 -0
- package/es-custom/components/table/src/table.js.map +1 -0
- package/es-custom/components/table/src/table.scss.js +13 -0
- package/es-custom/components/table/src/table.scss.js.map +1 -0
- package/es-custom/components/table/src/table.template.d.ts +10 -0
- package/es-custom/components/table/src/table.template.js +89 -0
- package/es-custom/components/table/src/table.template.js.map +1 -0
- package/es-custom/components/table/src/types.d.ts +13 -0
- package/es-custom/components/table/src/types.js +8 -0
- package/es-custom/components/table/src/types.js.map +1 -0
- package/es-custom/components/toolbar/index.d.ts +1 -0
- package/es-custom/components/toolbar/index.js +9 -0
- package/es-custom/components/toolbar/index.js.map +1 -0
- package/es-custom/components/toolbar/src/toolbar.d.ts +38 -0
- package/es-custom/components/toolbar/src/toolbar.js +191 -0
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -0
- package/es-custom/components/toolbar/src/toolbar.scss.js +13 -0
- package/es-custom/components/toolbar/src/toolbar.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/index.d.ts +4 -0
- package/es-custom/components/workspace-shell/index.js +12 -0
- package/es-custom/components/workspace-shell/index.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +17 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +50 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +40 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +144 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +28 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +78 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +19 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.js +56 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.js.map +1 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js +13 -0
- package/es-custom/components/workspace-shell/src/workspace-shell.scss.js.map +1 -0
- package/es-custom/globals/decorators/carbon-element.d.ts +37 -0
- package/es-custom/globals/decorators/carbon-element.js +68 -0
- package/es-custom/globals/decorators/carbon-element.js.map +1 -0
- package/es-custom/globals/decorators/index.d.ts +1 -0
- package/es-custom/globals/decorators/index.js +9 -0
- package/es-custom/globals/decorators/index.js.map +1 -0
- package/es-custom/globals/settings.d.ts +2 -0
- package/es-custom/globals/settings.js +20 -0
- package/es-custom/globals/settings.js.map +1 -0
- package/es-custom/globals/utils/uuid.d.ts +5 -0
- package/es-custom/globals/utils/uuid.js +32 -0
- package/es-custom/globals/utils/uuid.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js +9 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js +11 -0
- package/es-custom/node_modules/@carbon/utilities/es/overflowHandler/overflowHandler.js.map +1 -0
- package/es-custom/react/ai-label.d.ts +4 -0
- package/es-custom/react/ai-label.js +28 -0
- package/es-custom/react/ai-label.js.map +1 -0
- package/es-custom/react/button.d.ts +6 -0
- package/es-custom/react/button.js +29 -0
- package/es-custom/react/button.js.map +1 -0
- package/es-custom/react/card.d.ts +9 -0
- package/es-custom/react/card.js +43 -0
- package/es-custom/react/card.js.map +1 -0
- package/es-custom/react/chain-of-thought-step.d.ts +4 -0
- package/es-custom/react/chain-of-thought-step.js +32 -0
- package/es-custom/react/chain-of-thought-step.js.map +1 -0
- package/es-custom/react/chain-of-thought-toggle.d.ts +6 -0
- package/es-custom/react/chain-of-thought-toggle.js +31 -0
- package/es-custom/react/chain-of-thought-toggle.js.map +1 -0
- package/es-custom/react/chain-of-thought.d.ts +7 -0
- package/es-custom/react/chain-of-thought.js +33 -0
- package/es-custom/react/chain-of-thought.js.map +1 -0
- package/es-custom/react/chat-button.d.ts +13 -0
- package/es-custom/react/chat-button.js +30 -0
- package/es-custom/react/chat-button.js.map +1 -0
- package/es-custom/react/code-snippet-card.d.ts +4 -0
- package/es-custom/react/code-snippet-card.js +31 -0
- package/es-custom/react/code-snippet-card.js.map +1 -0
- package/es-custom/react/code-snippet.d.ts +4 -0
- package/es-custom/react/code-snippet.js +31 -0
- package/es-custom/react/code-snippet.js.map +1 -0
- package/es-custom/react/content-switcher.d.ts +7 -0
- package/es-custom/react/content-switcher.js +37 -0
- package/es-custom/react/content-switcher.js.map +1 -0
- package/es-custom/react/feedback-buttons.d.ts +4 -0
- package/es-custom/react/feedback-buttons.js +31 -0
- package/es-custom/react/feedback-buttons.js.map +1 -0
- package/es-custom/react/feedback.d.ts +6 -0
- package/es-custom/react/feedback.js +32 -0
- package/es-custom/react/feedback.js.map +1 -0
- package/es-custom/react/icon-button.d.ts +4 -0
- package/es-custom/react/icon-button.js +28 -0
- package/es-custom/react/icon-button.js.map +1 -0
- package/es-custom/react/icon.d.ts +4 -0
- package/es-custom/react/icon.js +28 -0
- package/es-custom/react/icon.js.map +1 -0
- package/es-custom/react/inline-notification.d.ts +4 -0
- package/es-custom/react/inline-notification.js +28 -0
- package/es-custom/react/inline-notification.js.map +1 -0
- package/es-custom/react/markdown.d.ts +4 -0
- package/es-custom/react/markdown.js +28 -0
- package/es-custom/react/markdown.js.map +1 -0
- package/es-custom/react/overflow-menu.d.ts +9 -0
- package/es-custom/react/overflow-menu.js +40 -0
- package/es-custom/react/overflow-menu.js.map +1 -0
- package/es-custom/react/processing.d.ts +4 -0
- package/es-custom/react/processing.js +28 -0
- package/es-custom/react/processing.js.map +1 -0
- package/es-custom/react/reasoning-step.d.ts +4 -0
- package/es-custom/react/reasoning-step.js +32 -0
- package/es-custom/react/reasoning-step.js.map +1 -0
- package/es-custom/react/reasoning-steps-toggle.d.ts +6 -0
- package/es-custom/react/reasoning-steps-toggle.js +31 -0
- package/es-custom/react/reasoning-steps-toggle.js.map +1 -0
- package/es-custom/react/reasoning-steps.d.ts +4 -0
- package/es-custom/react/reasoning-steps.js +28 -0
- package/es-custom/react/reasoning-steps.js.map +1 -0
- package/es-custom/react/tag.d.ts +4 -0
- package/es-custom/react/tag.js +28 -0
- package/es-custom/react/tag.js.map +1 -0
- package/es-custom/react/tile.d.ts +7 -0
- package/es-custom/react/tile.js +34 -0
- package/es-custom/react/tile.js.map +1 -0
- package/es-custom/react/tool-call-data.d.ts +4 -0
- package/es-custom/react/tool-call-data.js +28 -0
- package/es-custom/react/tool-call-data.js.map +1 -0
- package/es-custom/react/toolbar.d.ts +4 -0
- package/es-custom/react/toolbar.js +28 -0
- package/es-custom/react/toolbar.js.map +1 -0
- package/es-custom/react/utils/withWebComponentBridge.d.ts +15 -0
- package/es-custom/react/utils/withWebComponentBridge.js +95 -0
- package/es-custom/react/utils/withWebComponentBridge.js.map +1 -0
- package/es-custom/react/workspace-shell.d.ts +11 -0
- package/es-custom/react/workspace-shell.js +49 -0
- package/es-custom/react/workspace-shell.js.map +1 -0
- package/es-custom/testing/load-all-lazy-deps.d.ts +10 -0
- package/es-custom/testing/load-all-lazy-deps.js +30 -0
- package/es-custom/testing/load-all-lazy-deps.js.map +1 -0
- package/package.json +8 -6
- package/dist/16-C9Ph5740.js +0 -91
- package/dist/16-Dw0Ci4Fd.js +0 -91
- package/dist/16-FH37w-8T.js +0 -91
- package/dist/apl-ugs9-gp6.js +0 -91
- package/dist/asciiarmor-BsIYfA6P.js +0 -91
- package/dist/asn1-HkF5z2_O.js +0 -91
- package/dist/asterisk-CAIjKZq6.js +0 -91
- package/dist/button-Bc3tNCYN.js +0 -157
- package/dist/button-skeleton-DH50p4bH.js +0 -131
- package/dist/carbon-element-C38isbCs.js +0 -91
- package/dist/card.min.js +0 -193
- package/dist/chain-of-thought.min.js +0 -294
- package/dist/chat-button.min.js +0 -107
- package/dist/checkbox-skeleton-CS3inOnf.js +0 -166
- package/dist/class-map-BE4cOc2X.js +0 -128
- package/dist/clike-BIFB3b_k.js +0 -91
- package/dist/clojure-CXNiCqqB.js +0 -91
- package/dist/cmake-CR9NkLsk.js +0 -91
- package/dist/cobol-Ck90O_9v.js +0 -91
- package/dist/code-snippet.min.js +0 -91
- package/dist/codemirror-runtime-D8qZsrKE.js +0 -173
- package/dist/coffeescript-C0nvD2I-.js +0 -91
- package/dist/collection-helpers-BqatNkHh.js +0 -91
- package/dist/commonlisp-BROP4IME.js +0 -91
- package/dist/crystal-D6K96_U-.js +0 -91
- package/dist/css-CdH_tvvW.js +0 -91
- package/dist/cypher-CtHiEXsa.js +0 -91
- package/dist/d-Dcs18F9P.js +0 -91
- package/dist/diff-Bp64yuxL.js +0 -91
- package/dist/dockerfile-1DOwDLks.js +0 -91
- package/dist/dtd-DBKuh-AW.js +0 -91
- package/dist/dylan-ZUYgifRI.js +0 -91
- package/dist/ebnf-CEelJcGq.js +0 -91
- package/dist/ecl-CphVX9Cq.js +0 -91
- package/dist/eiffel-BQPneqZH.js +0 -91
- package/dist/elm-DSPAgqOt.js +0 -91
- package/dist/erlang-D_rMo9WA.js +0 -91
- package/dist/factor-CMTQjKbR.js +0 -91
- package/dist/fcl-BX3Rw6-t.js +0 -91
- package/dist/feedback.min.js +0 -281
- package/dist/forth-BGhjMNd3.js +0 -91
- package/dist/fortran-AEBjaYMh.js +0 -91
- package/dist/gas-DZXAjJGb.js +0 -91
- package/dist/gherkin-DxJx7fVg.js +0 -91
- package/dist/groovy-dfLbXlDy.js +0 -91
- package/dist/haskell-DyZ9y283.js +0 -91
- package/dist/haxe-D47ScCJn.js +0 -91
- package/dist/http-CQ5YdFwi.js +0 -91
- package/dist/icon-button-jLtiwRb4.js +0 -143
- package/dist/icon-loader-BKTEuybf.js +0 -101
- package/dist/idl-DMLd56tu.js +0 -91
- package/dist/if-defined-Dk7gHH6I.js +0 -96
- package/dist/index--CctdwCC.js +0 -91
- package/dist/index--ktPsmev.js +0 -168
- package/dist/index-BHiWR-3B.js +0 -91
- package/dist/index-BI8bnAEd.js +0 -91
- package/dist/index-BbGF94cg.js +0 -91
- package/dist/index-BnQBLEPx.js +0 -91
- package/dist/index-BsUuLdXD.js +0 -91
- package/dist/index-C2xfmTPp.js +0 -91
- package/dist/index-C3BN0MYy.js +0 -91
- package/dist/index-CD4di8Cf.js +0 -91
- package/dist/index-CVyUt3LQ.js +0 -91
- package/dist/index-Cg7m4sg1.js +0 -91
- package/dist/index-ClimwzxW.js +0 -91
- package/dist/index-CrevYuI-.js +0 -91
- package/dist/index-D5kcnwm2.js +0 -91
- package/dist/index-DCbIO0Hl.js +0 -91
- package/dist/index-Db-BDibx.js +0 -91
- package/dist/index-DmpHBiKi.js +0 -91
- package/dist/index-DzPjFlOn.js +0 -91
- package/dist/index-MgVf_8OP.js +0 -91
- package/dist/index-WHfhssUV.js +0 -91
- package/dist/index-rdaURAlB.js +0 -91
- package/dist/index-tFrMu4B_.js +0 -278
- package/dist/index-yLnmvqXN.js +0 -91
- package/dist/javascript-CB_5CYW7.js +0 -91
- package/dist/julia-DmOIk9mc.js +0 -91
- package/dist/livescript-BkgLC0lL.js +0 -91
- package/dist/loading-icon-CmnM4I_H.js +0 -106
- package/dist/lua-CWM_r9JC.js +0 -91
- package/dist/markdown.min.js +0 -298
- package/dist/mathematica-BSatVfC1.js +0 -91
- package/dist/mbox-4am1R8hd.js +0 -91
- package/dist/mirc-pdtTGW9l.js +0 -91
- package/dist/mllike-C0YFsE1U.js +0 -91
- package/dist/modelica-DVTWSHR-.js +0 -91
- package/dist/mscgen-ByAgrjGx.js +0 -91
- package/dist/mumps-X97p0_h_.js +0 -91
- package/dist/nginx-CqUadVPT.js +0 -91
- package/dist/nsis-Urp7BrWk.js +0 -91
- package/dist/ntriples-CToxeTsT.js +0 -91
- package/dist/octave-Dc4mpp8A.js +0 -91
- package/dist/oz-DX2Pk_mI.js +0 -91
- package/dist/pascal-B9GL_nqz.js +0 -91
- package/dist/perl-BvZFpXKD.js +0 -91
- package/dist/pig-BxFxDHBk.js +0 -91
- package/dist/powershell-CwCLRM7O.js +0 -91
- package/dist/processing.min.js +0 -105
- package/dist/properties-3nFD-Vnh.js +0 -91
- package/dist/protobuf-RqEyuWlw.js +0 -91
- package/dist/pug-1L6dEUb3.js +0 -91
- package/dist/puppet-C-gxR1ON.js +0 -91
- package/dist/python-BSbm1-vO.js +0 -91
- package/dist/q-4yAbTbi2.js +0 -91
- package/dist/r-BxfoMXlJ.js +0 -91
- package/dist/reasoning-steps.min.js +0 -202
- package/dist/rpm-DOp6MTEb.js +0 -91
- package/dist/ruby-DD6QCAKT.js +0 -91
- package/dist/sas-Cb-4sFOe.js +0 -91
- package/dist/scheme-CZsCl8E_.js +0 -91
- package/dist/settings-e2aItLYn.js +0 -99
- package/dist/shell-Bba6ETw_.js +0 -91
- package/dist/sieve-DZz1QovM.js +0 -91
- package/dist/simple-mode-DAyX7kcU.js +0 -91
- package/dist/smalltalk-BVigbKw-.js +0 -91
- package/dist/solr-BRh8QRgo.js +0 -91
- package/dist/sparql-DPq9GGqu.js +0 -91
- package/dist/spreadsheet-DWXWohNi.js +0 -91
- package/dist/sql-HgNux1Fi.js +0 -91
- package/dist/state-Bv4FM_9B.js +0 -96
- package/dist/stex-DB306cTl.js +0 -91
- package/dist/stylus-BVbE3BhF.js +0 -91
- package/dist/swift-k2z0otOi.js +0 -91
- package/dist/sync-D3qEZKNY.js +0 -91
- package/dist/table-runtime-Q-ak_IZE.js +0 -510
- package/dist/table.min.js +0 -91
- package/dist/tcl-BJwoeXra.js +0 -91
- package/dist/text-input-BlCqTf_p.js +0 -158
- package/dist/textile-9DAvWy-Y.js +0 -91
- package/dist/throttle-Bst9TagJ.js +0 -91
- package/dist/tiddlywiki-CDJdAycW.js +0 -91
- package/dist/tiki-Dlg5DFIR.js +0 -91
- package/dist/toml-DGqt7oU6.js +0 -91
- package/dist/toolbar.min.js +0 -178
- package/dist/troff-xJv1Y_X_.js +0 -91
- package/dist/ttcn-cfg-CrKiCUlI.js +0 -91
- package/dist/ttcn-dBogkyiy.js +0 -91
- package/dist/turtle-qtDt5E0f.js +0 -91
- package/dist/vb-h5NatM2n.js +0 -91
- package/dist/vbscript-BnXXn72l.js +0 -91
- package/dist/velocity-C_ZqzMiT.js +0 -91
- package/dist/verilog-s8oM517K.js +0 -91
- package/dist/vhdl-BgZd0MBH.js +0 -91
- package/dist/webidl-CDRn4bGa.js +0 -91
- package/dist/workspace-shell.min.js +0 -157
- package/dist/xquery-DTfjYCD7.js +0 -91
- package/dist/yacas-DxV9-gAO.js +0 -91
- package/dist/z80-PFwavMao.js +0 -91
- package/es/node_modules/@codemirror/autocomplete/dist/index.js +0 -258
- package/es/node_modules/@codemirror/autocomplete/dist/index.js.map +0 -1
- package/es/node_modules/@codemirror/commands/dist/index.js +0 -1140
- package/es/node_modules/@codemirror/commands/dist/index.js.map +0 -1
- package/es/node_modules/@codemirror/lint/dist/index.js +0 -636
- package/es/node_modules/@codemirror/lint/dist/index.js.map +0 -1
- package/es/node_modules/@lezer/common/dist/index.js +0 -253
- package/es/node_modules/@lezer/common/dist/index.js.map +0 -1
- package/es/node_modules/crelt/index.js +0 -37
- package/es/node_modules/crelt/index.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
|
+
import styles from './chain-of-thought.scss.js';
|
|
12
|
+
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import { uuid } from '../../../globals/utils/uuid.js';
|
|
14
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright IBM Corp. 2025
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*
|
|
22
|
+
* @license
|
|
23
|
+
*/
|
|
24
|
+
const stepSelector = `${prefix}-chain-of-thought-step`;
|
|
25
|
+
let CDSAIChatChainOfThought = class CDSAIChatChainOfThought extends LitElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/**
|
|
29
|
+
* Indicates if the details panel for the chain of thought is open.
|
|
30
|
+
*/
|
|
31
|
+
this.open = false;
|
|
32
|
+
/**
|
|
33
|
+
* When true, each child step should be fully controlled by the host.
|
|
34
|
+
*/
|
|
35
|
+
this.controlled = false;
|
|
36
|
+
/**
|
|
37
|
+
* ID of the content panel. Useful for wiring to an external toggle.
|
|
38
|
+
*/
|
|
39
|
+
this.panelId = `${prefix}-chain-of-thought-panel-id-${uuid()}`;
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
if (!this.hasAttribute("role")) {
|
|
43
|
+
this.setAttribute("role", "list");
|
|
44
|
+
}
|
|
45
|
+
this.addEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
this.removeEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
|
|
50
|
+
super.disconnectedCallback();
|
|
51
|
+
}
|
|
52
|
+
get steps() {
|
|
53
|
+
return this.querySelectorAll(stepSelector);
|
|
54
|
+
}
|
|
55
|
+
updated(changedProperties) {
|
|
56
|
+
if (changedProperties.has("controlled")) {
|
|
57
|
+
this.propagateControlled();
|
|
58
|
+
}
|
|
59
|
+
if (changedProperties.has("open") &&
|
|
60
|
+
changedProperties.get("open") !== undefined) {
|
|
61
|
+
this.dispatchToggleEvent();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
handleStepToggle(event) {
|
|
65
|
+
const { detail, target } = event;
|
|
66
|
+
this.onStepToggle?.(Boolean(detail?.open), target);
|
|
67
|
+
}
|
|
68
|
+
propagateControlled() {
|
|
69
|
+
this.steps.forEach((step) => {
|
|
70
|
+
if (this.controlled) {
|
|
71
|
+
step.setAttribute("data-parent-controlled", "");
|
|
72
|
+
step.setAttribute("controlled", "");
|
|
73
|
+
}
|
|
74
|
+
else if (step.hasAttribute("data-parent-controlled")) {
|
|
75
|
+
step.removeAttribute("data-parent-controlled");
|
|
76
|
+
step.removeAttribute("controlled");
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
dispatchToggleEvent() {
|
|
81
|
+
const detail = {
|
|
82
|
+
open: this.open,
|
|
83
|
+
panelId: this.panelId,
|
|
84
|
+
};
|
|
85
|
+
this.dispatchEvent(new CustomEvent("chain-of-thought-toggled", {
|
|
86
|
+
detail,
|
|
87
|
+
bubbles: true,
|
|
88
|
+
composed: true,
|
|
89
|
+
}));
|
|
90
|
+
const panel = this.shadowRoot?.getElementById(this.panelId) ?? this;
|
|
91
|
+
this.onToggle?.(this.open, panel);
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return html `
|
|
95
|
+
<div class="${prefix}--chain-of-thought">
|
|
96
|
+
<div
|
|
97
|
+
id=${this.panelId}
|
|
98
|
+
class="${prefix}--chain-of-thought-content"
|
|
99
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
100
|
+
?hidden=${!this.open}
|
|
101
|
+
>
|
|
102
|
+
<div class="${prefix}--chain-of-thought-inner-content">
|
|
103
|
+
<slot></slot>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
CDSAIChatChainOfThought.styles = styles;
|
|
111
|
+
__decorate([
|
|
112
|
+
property({ type: Boolean, reflect: true })
|
|
113
|
+
], CDSAIChatChainOfThought.prototype, "open", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
property({ type: Boolean, reflect: true })
|
|
116
|
+
], CDSAIChatChainOfThought.prototype, "controlled", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
property({ type: String, attribute: "panel-id", reflect: true })
|
|
119
|
+
], CDSAIChatChainOfThought.prototype, "panelId", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: Function, attribute: false })
|
|
122
|
+
], CDSAIChatChainOfThought.prototype, "onToggle", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: Function, attribute: false })
|
|
125
|
+
], CDSAIChatChainOfThought.prototype, "onStepToggle", void 0);
|
|
126
|
+
CDSAIChatChainOfThought = __decorate([
|
|
127
|
+
carbonElement("cds-aichat-chain-of-thought")
|
|
128
|
+
], CDSAIChatChainOfThought);
|
|
129
|
+
var CDSAIChatChainOfThought$1 = CDSAIChatChainOfThought;
|
|
130
|
+
|
|
131
|
+
export { CDSAIChatChainOfThought, CDSAIChatChainOfThought$1 as default };
|
|
132
|
+
//# sourceMappingURL=chain-of-thought.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-of-thought.js","sources":["../../../../src/components/chain-of-thought/src/chain-of-thought.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAgBH,MAAM,YAAY,GAAG,CAAA,EAAG,MAAM,wBAAwB;AAGtD,IAAM,uBAAuB,GAA7B,MAA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AAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7B,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACvB,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAMnB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;AACN,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAM1D,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACZ,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMlC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACR,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AA/BlC,uBAAuB,GAAA,UAAA,CAAA;IAD5B,aAAa,CAAC,6BAA6B;AACtC,CAAA,EAAA,uBAAuB,CA4H5B;AASD,gCAAe,uBAAuB;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([":host{display:block}:host([open]) .cds-aichat--chain-of-thought-content{display:block;max-block-size:-moz-fit-content;max-block-size:fit-content;opacity:1;overflow:visible}.cds-aichat--chain-of-thought-content{display:none;max-block-size:0;opacity:0;overflow:hidden;transition:all allow-discrete .11s cubic-bezier(0,0,.38,.9)}.cds-aichat--chain-of-thought-inner-content{background-color:var(--cds-custom-layer-01,#f4f4f4);border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);margin-block-start:.5rem}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=chain-of-thought.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-of-thought.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class CDSAIChatToolCallData extends LitElement {
|
|
3
|
+
static styles: any;
|
|
4
|
+
/**
|
|
5
|
+
* Plain text name of the tool.
|
|
6
|
+
*/
|
|
7
|
+
toolName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Text string used to label step input.
|
|
10
|
+
*/
|
|
11
|
+
inputLabelText: string;
|
|
12
|
+
/**
|
|
13
|
+
* Text string used to label step output.
|
|
14
|
+
*/
|
|
15
|
+
outputLabelText: string;
|
|
16
|
+
/**
|
|
17
|
+
* Text string used to label the tool.
|
|
18
|
+
*/
|
|
19
|
+
toolLabelText: string;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
firstUpdated(): void;
|
|
22
|
+
private handleSlotChange;
|
|
23
|
+
private syncSlotContent;
|
|
24
|
+
private hasAssignedContent;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
"cds-aichat-tool-call-data": CDSAIChatToolCallData;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export { CDSAIChatToolCallData };
|
|
33
|
+
export default CDSAIChatToolCallData;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import styles from './tool-call-data.scss.js';
|
|
12
|
+
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright IBM Corp. 2025
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*
|
|
21
|
+
* @license
|
|
22
|
+
*/
|
|
23
|
+
const baseClass = `${prefix}--tool-call-data`;
|
|
24
|
+
let CDSAIChatToolCallData = class CDSAIChatToolCallData extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/**
|
|
28
|
+
* Plain text name of the tool.
|
|
29
|
+
*/
|
|
30
|
+
this.toolName = "";
|
|
31
|
+
/**
|
|
32
|
+
* Text string used to label step input.
|
|
33
|
+
*/
|
|
34
|
+
this.inputLabelText = "Input";
|
|
35
|
+
/**
|
|
36
|
+
* Text string used to label step output.
|
|
37
|
+
*/
|
|
38
|
+
this.outputLabelText = "Output";
|
|
39
|
+
/**
|
|
40
|
+
* Text string used to label the tool.
|
|
41
|
+
*/
|
|
42
|
+
this.toolLabelText = "Tool";
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
this.hasDescriptionSlot = false;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
this.hasInputSlot = false;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
this.hasOutputSlot = false;
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
super.connectedCallback();
|
|
58
|
+
queueMicrotask(() => this.syncSlotContent());
|
|
59
|
+
}
|
|
60
|
+
firstUpdated() {
|
|
61
|
+
this.syncSlotContent();
|
|
62
|
+
}
|
|
63
|
+
handleSlotChange(slot, event) {
|
|
64
|
+
const slotElement = event.target;
|
|
65
|
+
const nodes = slotElement.assignedNodes({ flatten: true });
|
|
66
|
+
const hasContent = this.hasAssignedContent(nodes);
|
|
67
|
+
if (slot === "description" && hasContent !== this.hasDescriptionSlot) {
|
|
68
|
+
this.hasDescriptionSlot = hasContent;
|
|
69
|
+
}
|
|
70
|
+
if (slot === "input" && hasContent !== this.hasInputSlot) {
|
|
71
|
+
this.hasInputSlot = hasContent;
|
|
72
|
+
}
|
|
73
|
+
if (slot === "output" && hasContent !== this.hasOutputSlot) {
|
|
74
|
+
this.hasOutputSlot = hasContent;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
syncSlotContent() {
|
|
78
|
+
const descriptionSlot = this.shadowRoot?.querySelector('slot[name="description"]');
|
|
79
|
+
const inputSlot = this.shadowRoot?.querySelector('slot[name="input"]');
|
|
80
|
+
const outputSlot = this.shadowRoot?.querySelector('slot[name="output"]');
|
|
81
|
+
if (descriptionSlot) {
|
|
82
|
+
this.hasDescriptionSlot = this.hasAssignedContent(descriptionSlot.assignedNodes({ flatten: true }));
|
|
83
|
+
}
|
|
84
|
+
if (inputSlot) {
|
|
85
|
+
this.hasInputSlot = this.hasAssignedContent(inputSlot.assignedNodes({ flatten: true }));
|
|
86
|
+
}
|
|
87
|
+
if (outputSlot) {
|
|
88
|
+
this.hasOutputSlot = this.hasAssignedContent(outputSlot.assignedNodes({ flatten: true }));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
hasAssignedContent(nodes) {
|
|
92
|
+
return nodes.some((node) => {
|
|
93
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
97
|
+
return Boolean(node.textContent?.trim());
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
render() {
|
|
103
|
+
const hasToolName = Boolean(this.toolName);
|
|
104
|
+
const hasContent = hasToolName ||
|
|
105
|
+
this.hasDescriptionSlot ||
|
|
106
|
+
this.hasInputSlot ||
|
|
107
|
+
this.hasOutputSlot;
|
|
108
|
+
if (!hasContent) {
|
|
109
|
+
return html ``;
|
|
110
|
+
}
|
|
111
|
+
return html `
|
|
112
|
+
<div
|
|
113
|
+
class="${baseClass} ${baseClass}-description"
|
|
114
|
+
part="description"
|
|
115
|
+
?hidden=${!this.hasDescriptionSlot}
|
|
116
|
+
>
|
|
117
|
+
<slot
|
|
118
|
+
name="description"
|
|
119
|
+
@slotchange=${(event) => this.handleSlotChange("description", event)}
|
|
120
|
+
></slot>
|
|
121
|
+
</div>
|
|
122
|
+
${hasToolName
|
|
123
|
+
? html `<div class="${baseClass} ${baseClass}-toolName">
|
|
124
|
+
<div class="${baseClass}-label">${this.toolLabelText}</div>
|
|
125
|
+
${this.toolName}
|
|
126
|
+
</div>`
|
|
127
|
+
: null}
|
|
128
|
+
<div
|
|
129
|
+
class="${baseClass} ${baseClass}-input"
|
|
130
|
+
?hidden=${!this.hasInputSlot}
|
|
131
|
+
>
|
|
132
|
+
<div class="${baseClass}-label">${this.inputLabelText}</div>
|
|
133
|
+
<slot
|
|
134
|
+
name="input"
|
|
135
|
+
@slotchange=${(event) => this.handleSlotChange("input", event)}
|
|
136
|
+
></slot>
|
|
137
|
+
</div>
|
|
138
|
+
<div
|
|
139
|
+
class="${baseClass} ${baseClass}-output"
|
|
140
|
+
?hidden=${!this.hasOutputSlot}
|
|
141
|
+
>
|
|
142
|
+
<div class="${baseClass}-label">${this.outputLabelText}</div>
|
|
143
|
+
<slot
|
|
144
|
+
name="output"
|
|
145
|
+
@slotchange=${(event) => this.handleSlotChange("output", event)}
|
|
146
|
+
></slot>
|
|
147
|
+
</div>
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
CDSAIChatToolCallData.styles = styles;
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: String, attribute: "tool-name" })
|
|
154
|
+
], CDSAIChatToolCallData.prototype, "toolName", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: String, attribute: "input-label-text", reflect: true })
|
|
157
|
+
], CDSAIChatToolCallData.prototype, "inputLabelText", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: String, attribute: "output-label-text", reflect: true })
|
|
160
|
+
], CDSAIChatToolCallData.prototype, "outputLabelText", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property({ type: String, attribute: "tool-label-text", reflect: true })
|
|
163
|
+
], CDSAIChatToolCallData.prototype, "toolLabelText", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
state()
|
|
166
|
+
], CDSAIChatToolCallData.prototype, "hasDescriptionSlot", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
state()
|
|
169
|
+
], CDSAIChatToolCallData.prototype, "hasInputSlot", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
state()
|
|
172
|
+
], CDSAIChatToolCallData.prototype, "hasOutputSlot", void 0);
|
|
173
|
+
CDSAIChatToolCallData = __decorate([
|
|
174
|
+
carbonElement("cds-aichat-tool-call-data")
|
|
175
|
+
], CDSAIChatToolCallData);
|
|
176
|
+
var CDSAIChatToolCallData_default = CDSAIChatToolCallData;
|
|
177
|
+
|
|
178
|
+
export { CDSAIChatToolCallData, CDSAIChatToolCallData_default as default };
|
|
179
|
+
//# sourceMappingURL=tool-call-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-data.js","sources":["../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|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([":host{display:block;font-size:var(--cds-custom-body-01-font-size,.875rem);font-weight:var(--cds-custom-body-01-font-weight,400);letter-spacing:var(--cds-custom-body-01-letter-spacing,.16px);line-height:var(--cds-custom-body-01-line-height,1.42857)}.cds-aichat--tool-call-data{padding-block-end:1rem}.cds-aichat--tool-call-data:last-child{padding-block-end:0}.cds-aichat--tool-call-data-label{font-size:var(--cds-custom-heading-01-font-size,.875rem);font-weight:var(--cds-custom-heading-01-font-weight,600);letter-spacing:var(--cds-custom-heading-01-letter-spacing,.16px);line-height:var(--cds-custom-heading-01-line-height,1.42857)}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=tool-call-data.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-data.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Chat Button size.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum CHAT_BUTTON_SIZE {
|
|
13
|
+
/**
|
|
14
|
+
* Small size.
|
|
15
|
+
*/
|
|
16
|
+
SMALL = "sm",
|
|
17
|
+
/**
|
|
18
|
+
* Medium size.
|
|
19
|
+
*/
|
|
20
|
+
MEDIUM = "md",
|
|
21
|
+
/**
|
|
22
|
+
* Large size.
|
|
23
|
+
*/
|
|
24
|
+
LARGE = "lg"
|
|
25
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
*
|
|
11
|
+
* Copyright IBM Corp. 2025
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Chat Button size.
|
|
18
|
+
*/
|
|
19
|
+
var CHAT_BUTTON_SIZE;
|
|
20
|
+
(function (CHAT_BUTTON_SIZE) {
|
|
21
|
+
/**
|
|
22
|
+
* Small size.
|
|
23
|
+
*/
|
|
24
|
+
CHAT_BUTTON_SIZE["SMALL"] = "sm";
|
|
25
|
+
/**
|
|
26
|
+
* Medium size.
|
|
27
|
+
*/
|
|
28
|
+
CHAT_BUTTON_SIZE["MEDIUM"] = "md";
|
|
29
|
+
/**
|
|
30
|
+
* Large size.
|
|
31
|
+
*/
|
|
32
|
+
CHAT_BUTTON_SIZE["LARGE"] = "lg";
|
|
33
|
+
})(CHAT_BUTTON_SIZE || (CHAT_BUTTON_SIZE = {}));
|
|
34
|
+
|
|
35
|
+
export { CHAT_BUTTON_SIZE };
|
|
36
|
+
//# sourceMappingURL=defs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.js","sources":["../../../src/components/chat-button/defs.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;IACS;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B;;AAEG;AACH,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AAEZ;;AAEG;AACH,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,IAAa;AAEb;;AAEG;AACH,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,IAAY;AACd,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import { PropertyValues } from "lit";
|
|
10
|
+
import { CHAT_BUTTON_SIZE } from "../defs";
|
|
11
|
+
import { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TYPE as CHAT_BUTTON_TYPE, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_POSITION } from "@carbon/web-components/es-custom/components/button/button.js";
|
|
12
|
+
import CDSButton from "@carbon/web-components/es-custom/components/button/button.js";
|
|
13
|
+
export { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLTIP_ALIGNMENT, CHAT_BUTTON_TOOLTIP_POSITION, };
|
|
14
|
+
type ChatButtonSize = CHAT_BUTTON_SIZE.SMALL | CHAT_BUTTON_SIZE.MEDIUM | CHAT_BUTTON_SIZE.LARGE;
|
|
15
|
+
/**
|
|
16
|
+
* Component extending the @carbon/web-components' button
|
|
17
|
+
*
|
|
18
|
+
* @element cds-aichat-button
|
|
19
|
+
*/
|
|
20
|
+
declare class CDSAIChatButton extends CDSButton {
|
|
21
|
+
static styles: any;
|
|
22
|
+
/**
|
|
23
|
+
* Specify whether the `ChatButton` should be rendered as a quick action button
|
|
24
|
+
*/
|
|
25
|
+
isQuickAction: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Button size.
|
|
28
|
+
* Options: "sm", "md", "lg".
|
|
29
|
+
*/
|
|
30
|
+
size: ChatButtonSize;
|
|
31
|
+
protected willUpdate(changedProps: PropertyValues<this>): void;
|
|
32
|
+
private _normalizeButtonState;
|
|
33
|
+
}
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
"cds-aichat-button": CDSAIChatButton;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export { CDSAIChatButton };
|
|
40
|
+
export default CDSAIChatButton;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { property } from 'lit/decorators.js';
|
|
10
|
+
import { CHAT_BUTTON_SIZE } from '../defs.js';
|
|
11
|
+
import CarbonButtonElement, { BUTTON_KIND } from '@carbon/web-components/es-custom/components/button/button.js';
|
|
12
|
+
export { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_POSITION, BUTTON_TYPE as CHAT_BUTTON_TYPE } from '@carbon/web-components/es-custom/components/button/button.js';
|
|
13
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
14
|
+
import styles from './chat-button.scss.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
*
|
|
19
|
+
* Copyright IBM Corp. 2025
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Component extending the @carbon/web-components' button
|
|
26
|
+
*
|
|
27
|
+
* @element cds-aichat-button
|
|
28
|
+
*/
|
|
29
|
+
let CDSAIChatButton = class CDSAIChatButton extends CarbonButtonElement {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
/**
|
|
33
|
+
* Specify whether the `ChatButton` should be rendered as a quick action button
|
|
34
|
+
*/
|
|
35
|
+
this.isQuickAction = false;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
this.allowedSizes = [
|
|
40
|
+
CHAT_BUTTON_SIZE.SMALL,
|
|
41
|
+
CHAT_BUTTON_SIZE.MEDIUM,
|
|
42
|
+
CHAT_BUTTON_SIZE.LARGE,
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
willUpdate(changedProps) {
|
|
46
|
+
if (changedProps.has("isQuickAction") || changedProps.has("size")) {
|
|
47
|
+
this._normalizeButtonState();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_normalizeButtonState() {
|
|
51
|
+
if (this.isQuickAction) {
|
|
52
|
+
this.kind = BUTTON_KIND.GHOST;
|
|
53
|
+
this.size = CHAT_BUTTON_SIZE.SMALL;
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// Do not allow size larger than `lg`
|
|
57
|
+
if (!this.allowedSizes.includes(this.size)) {
|
|
58
|
+
this.size = CHAT_BUTTON_SIZE.LARGE;
|
|
59
|
+
}
|
|
60
|
+
if (!Object.values(BUTTON_KIND).includes(this.kind)) {
|
|
61
|
+
this.kind = BUTTON_KIND.PRIMARY;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
CDSAIChatButton.styles = styles;
|
|
66
|
+
__decorate([
|
|
67
|
+
property({ type: Boolean, attribute: "is-quick-action" })
|
|
68
|
+
], CDSAIChatButton.prototype, "isQuickAction", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
property({ reflect: true, attribute: "size" })
|
|
71
|
+
], CDSAIChatButton.prototype, "size", void 0);
|
|
72
|
+
CDSAIChatButton = __decorate([
|
|
73
|
+
carbonElement("cds-aichat-button")
|
|
74
|
+
], CDSAIChatButton);
|
|
75
|
+
var AIChatButton = CDSAIChatButton;
|
|
76
|
+
|
|
77
|
+
export { CDSAIChatButton, CHAT_BUTTON_SIZE, AIChatButton as default };
|
|
78
|
+
//# sourceMappingURL=chat-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-button.js","sources":["../../../../src/components/chat-button/src/chat-button.ts"],"sourcesContent":[null],"names":["CDSButton","CHAT_BUTTON_KIND"],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AA6BH;;;;AAIG;AAEH,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQA,mBAAS,CAAA;AAAvC,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,aAAa,GAAG,KAAK;AASrB;;AAEG;AACc,QAAA,IAAA,CAAA,YAAY,GAAuB;AAClD,YAAA,gBAAgB,CAAC,KAAK;AACtB,YAAA,gBAAgB,CAAC,MAAM;AACvB,YAAA,gBAAgB,CAAC,KAAK;SACvB;IAyBH;AAvBY,IAAA,UAAU,CAAC,YAAkC,EAAA;AACrD,QAAA,IAAI,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACjE,IAAI,CAAC,qBAAqB,EAAE;QAC9B;IACF;IAEQ,qBAAqB,GAAA;AAC3B,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACtB,YAAA,IAAI,CAAC,IAAI,GAAGC,WAAgB,CAAC,KAAK;AAClC,YAAA,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,KAAK;YAClC;QACF;;AAEA,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAwB,CA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