@carbon/ai-chat-components 1.9.0 → 1.10.0-rc.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 +163 -2
- package/es/components/audio-player/src/audio-player.js.map +1 -1
- package/es/components/audio-player/src/audio-player.scss.js.map +1 -1
- package/es/components/audio-player/src/providers/base-provider.js.map +1 -1
- package/es/components/audio-player/src/providers/native-audio-provider.js.map +1 -1
- package/es/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
- package/es/components/audio-player/src/transcript.js.map +1 -1
- package/es/components/audio-player/src/transcript.scss.js.map +1 -1
- package/es/components/audio-player/src/utils/url-detector.js.map +1 -1
- package/es/components/card/src/card-footer.js.map +1 -1
- package/es/components/card/src/card-footer.scss.js.map +1 -1
- package/es/components/card/src/card-steps.js.map +1 -1
- package/es/components/card/src/card-steps.scss.js.map +1 -1
- package/es/components/card/src/card.js.map +1 -1
- package/es/components/card/src/card.scss.js.map +1 -1
- package/es/components/carousel/src/carousel.js.map +1 -1
- package/es/components/carousel/src/carousel.scss.js.map +1 -1
- package/es/components/chain-of-thought/defs.js.map +1 -1
- 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-step.scss.js.map +1 -1
- 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-toggle.scss.js.map +1 -1
- 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.map +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -1
- package/es/components/chat-button/defs.js.map +1 -1
- package/es/components/chat-button/index.d.ts +1 -0
- package/es/components/chat-button/index.js +1 -0
- package/es/components/chat-button/index.js.map +1 -1
- package/es/components/chat-button/src/chat-button-skeleton.d.ts +30 -0
- package/es/components/chat-button/src/chat-button-skeleton.js +41 -0
- package/es/components/chat-button/src/chat-button-skeleton.js.map +1 -0
- package/es/components/chat-button/src/chat-button.d.ts +4 -1
- package/es/components/chat-button/src/chat-button.js +30 -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-button/src/chat-button.scss.js.map +1 -1
- package/es/components/chat-history/src/chat-history.scss.js +1 -1
- package/es/components/chat-history/src/chat-history.scss.js.map +1 -1
- package/es/components/chat-history/src/history-content.js.map +1 -1
- package/es/components/chat-history/src/history-delete-panel.js +1 -0
- package/es/components/chat-history/src/history-delete-panel.js.map +1 -1
- package/es/components/chat-history/src/history-header.js.map +1 -1
- package/es/components/chat-history/src/history-loading.js.map +1 -1
- package/es/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es/components/chat-history/src/history-panel-items.js.map +1 -1
- package/es/components/chat-history/src/history-panel-menu.js.map +1 -1
- package/es/components/chat-history/src/history-panel.js.map +1 -1
- package/es/components/chat-history/src/history-search-item.js.map +1 -1
- package/es/components/chat-history/src/history-shell.js.map +1 -1
- package/es/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es/components/chat-shell/src/chat-header.js.map +1 -1
- package/es/components/chat-shell/src/chat-header.scss.js.map +1 -1
- package/es/components/chat-shell/src/corner-manager.js.map +1 -1
- package/es/components/chat-shell/src/initialization-manager.js.map +1 -1
- package/es/components/chat-shell/src/panel-manager.js.map +1 -1
- package/es/components/chat-shell/src/panel.js.map +1 -1
- package/es/components/chat-shell/src/panel.scss.js.map +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -1
- package/es/components/chat-shell/src/shell.js.map +1 -1
- package/es/components/chat-shell/src/shell.scss.js.map +1 -1
- package/es/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
- package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-loader.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/content-sync.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/detect-language.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/diff-decorator.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/language-data.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es/components/code-snippet/src/formatters.js.map +1 -1
- package/es/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.scss.js.map +1 -1
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js.map +1 -1
- package/es/components/file-uploads/src/file-type-icon.js.map +1 -1
- package/es/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es/components/file-uploads/src/file-upload-item.scss.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.scss.js.map +1 -1
- package/es/components/launcher/src/launcher.js +1 -0
- package/es/components/launcher/src/launcher.js.map +1 -1
- package/es/components/launcher/src/launcher.scss.js +1 -1
- package/es/components/launcher/src/launcher.scss.js.map +1 -1
- package/es/components/markdown/src/markdown-renderer-types.d.ts +3 -14
- package/es/components/markdown/src/markdown-renderer.js +0 -4
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown-token-tree.d.ts +0 -2
- package/es/components/markdown/src/markdown-token-tree.js.map +1 -1
- package/es/components/markdown/src/markdown.js +0 -1
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js.map +1 -1
- package/es/components/markdown/src/markdown.template.js.map +1 -1
- package/es/components/markdown/src/plugins/markdown-it-attrs.js +2 -3
- package/es/components/markdown/src/plugins/markdown-it-attrs.js.map +1 -1
- package/es/components/markdown/src/plugins/markdown-it-highlight.js.map +1 -1
- package/es/components/markdown/src/plugins/markdown-it-task-lists.js.map +1 -1
- package/es/components/markdown/src/utils/html-helpers.js.map +1 -1
- package/es/components/markdown/src/utils/lit-directives.js.map +1 -1
- package/es/components/markdown/src/utils/plugin-fallback.js +0 -1
- package/es/components/markdown/src/utils/plugin-fallback.js.map +1 -1
- package/es/components/markdown/src/utils/slot-names.js.map +1 -1
- package/es/components/markdown/src/utils/streaming-table.js.map +1 -1
- package/es/components/markdown/src/utils/table-helpers.d.ts +10 -0
- package/es/components/markdown/src/utils/table-helpers.js +0 -1
- package/es/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js.map +1 -1
- package/es/components/prompt-line/autocomplete/src/autocomplete.d.ts +10 -3
- package/es/components/prompt-line/autocomplete/src/autocomplete.js +95 -48
- package/es/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
- package/es/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
- package/es/components/prompt-line/autocomplete/src/autocomplete.scss.js.map +1 -1
- package/es/components/prompt-line/index.d.ts +1 -1
- package/es/components/prompt-line/src/autocomplete-controller.d.ts +12 -1
- package/es/components/prompt-line/src/autocomplete-controller.js +42 -6
- package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es/components/prompt-line/src/error-message.js.map +1 -1
- package/es/components/prompt-line/src/error-message.scss.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-constants.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-controller.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line.scss.js.map +1 -1
- package/es/components/prompt-line/src/send-control.js.map +1 -1
- package/es/components/prompt-line/src/send-control.scss.js.map +1 -1
- package/es/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/build-extensions.d.ts +17 -0
- package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +12 -0
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/carbon-mention.js +1 -0
- package/es/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +2 -3
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/chat-enter.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/editor-styles.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/extension-equivalence.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/index.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/json-utils.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/keymap.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/origin-meta.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/render-token-chip.d.ts +12 -0
- package/es/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/token-node-view.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/types.d.ts +18 -4
- package/es/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/value-sync.js.map +1 -1
- package/es/components/prompt-line/src/types.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.scss.js +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -1
- package/es/components/shared/dynamic-css-var-sheet.js +24 -2
- package/es/components/shared/dynamic-css-var-sheet.js.map +1 -1
- package/es/components/shared/media-utils/script-loader.js.map +1 -1
- package/es/components/table/src/table-loader.js.map +1 -1
- package/es/components/table/src/table-pagination.template.js.map +1 -1
- package/es/components/table/src/table-skeleton.template.js.map +1 -1
- package/es/components/table/src/table.js.map +1 -1
- package/es/components/table/src/table.scss.js.map +1 -1
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/toolbar/src/toolbar.scss.js.map +1 -1
- package/es/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es/components/truncated-text/src/truncated-text.scss.js.map +1 -1
- package/es/components/video-player/src/providers/base-provider.js.map +1 -1
- package/es/components/video-player/src/providers/kaltura-provider.js.map +1 -1
- package/es/components/video-player/src/providers/native-video-provider.js.map +1 -1
- package/es/components/video-player/src/providers/vimeo-provider.js.map +1 -1
- package/es/components/video-player/src/providers/youtube-provider.js.map +1 -1
- package/es/components/video-player/src/utils/url-detector.js.map +1 -1
- package/es/components/video-player/src/video-player.js.map +1 -1
- package/es/components/video-player/src/video-player.scss.js.map +1 -1
- package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.js +2 -1
- 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-header.scss.js.map +1 -1
- 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/components/workspace-shell/src/workspace-shell.scss.js.map +1 -1
- package/es/globals/decorators/carbon-element.js.map +1 -1
- package/es/globals/scss/common.scss.js.map +1 -1
- package/es/globals/settings.js.map +1 -1
- package/es/globals/utils/aria-announcer-manager.js.map +1 -1
- package/es/globals/utils/browser-utils.js.map +1 -1
- package/es/globals/utils/csv.js.map +1 -1
- package/es/globals/utils/dom-utils.js.map +1 -1
- package/es/globals/utils/focus-utils.js.map +1 -1
- package/es/globals/utils/iconTransform.js.map +1 -1
- package/es/globals/utils/rtl-utils.js.map +1 -1
- package/es/globals/utils/uuid.js.map +1 -1
- package/es/react/ai-label-action-button.js.map +1 -1
- package/es/react/audio-player.js.map +1 -1
- package/es/react/autocomplete.js.map +1 -1
- package/es/react/card.js.map +1 -1
- package/es/react/carousel.js.map +1 -1
- package/es/react/chain-of-thought-step.js.map +1 -1
- package/es/react/chain-of-thought-toggle.js.map +1 -1
- package/es/react/chain-of-thought.js.map +1 -1
- package/es/react/chat-button-skeleton.d.ts +11 -0
- package/es/react/chat-button-skeleton.js +28 -0
- package/es/react/chat-button-skeleton.js.map +1 -0
- package/es/react/chat-button.js.map +1 -1
- package/es/react/chat-header.js.map +1 -1
- package/es/react/chat-shell.js.map +1 -1
- package/es/react/code-snippet.d.ts +1 -1
- package/es/react/code-snippet.js +1 -1
- package/es/react/code-snippet.js.map +1 -1
- package/es/react/error-message.js.map +1 -1
- package/es/react/feedback-buttons.js.map +1 -1
- package/es/react/feedback.js.map +1 -1
- package/es/react/file-upload-item.js.map +1 -1
- package/es/react/file-uploads.js.map +1 -1
- package/es/react/history/history-content.js.map +1 -1
- package/es/react/history/history-delete-panel.js.map +1 -1
- package/es/react/history/history-header.js.map +1 -1
- package/es/react/history/history-loading.js.map +1 -1
- package/es/react/history/history-panel-item-input.js.map +1 -1
- package/es/react/history/history-panel-item.js.map +1 -1
- package/es/react/history/history-panel-items.js.map +1 -1
- package/es/react/history/history-panel-menu.js.map +1 -1
- package/es/react/history/history-panel.js.map +1 -1
- package/es/react/history/history-search-item.js.map +1 -1
- package/es/react/history/history-shell.js.map +1 -1
- package/es/react/history/history-toolbar.js.map +1 -1
- package/es/react/hooks/useChatAutocomplete.js +4 -3
- package/es/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es/react/input-send-control.js.map +1 -1
- package/es/react/launcher.js.map +1 -1
- package/es/react/markdown.js.map +1 -1
- package/es/react/panel.js.map +1 -1
- package/es/react/processing.js.map +1 -1
- package/es/react/prompt-line-shell.js.map +1 -1
- package/es/react/prompt-line.js.map +1 -1
- package/es/react/reasoning-step.js.map +1 -1
- package/es/react/reasoning-steps-toggle.js.map +1 -1
- package/es/react/reasoning-steps.js.map +1 -1
- package/es/react/stop-streaming-button.js.map +1 -1
- package/es/react/table.js.map +1 -1
- package/es/react/tool-call-data.js.map +1 -1
- package/es/react/toolbar.js +1 -1
- package/es/react/toolbar.js.map +1 -1
- package/es/react/transcript.js.map +1 -1
- package/es/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es/react/utils/withWebComponentBridge.js.map +1 -1
- package/es/react/video-player.js.map +1 -1
- package/es/react/workspace-shell.js.map +1 -1
- package/es/testing/PageObjectId.js.map +1 -1
- package/es/testing/load-all-lazy-deps.js.map +1 -1
- package/es-custom/components/audio-player/src/audio-player.js.map +1 -1
- package/es-custom/components/audio-player/src/audio-player.scss.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/base-provider.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/native-audio-provider.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
- package/es-custom/components/audio-player/src/transcript.js.map +1 -1
- package/es-custom/components/audio-player/src/transcript.scss.js.map +1 -1
- package/es-custom/components/audio-player/src/utils/url-detector.js.map +1 -1
- package/es-custom/components/card/src/card-footer.js.map +1 -1
- package/es-custom/components/card/src/card-footer.scss.js.map +1 -1
- package/es-custom/components/card/src/card-steps.js.map +1 -1
- package/es-custom/components/card/src/card-steps.scss.js.map +1 -1
- package/es-custom/components/card/src/card.js.map +1 -1
- package/es-custom/components/card/src/card.scss.js.map +1 -1
- package/es-custom/components/carousel/src/carousel.js.map +1 -1
- package/es-custom/components/carousel/src/carousel.scss.js.map +1 -1
- package/es-custom/components/chain-of-thought/defs.js.map +1 -1
- 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-step.scss.js.map +1 -1
- 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-toggle.scss.js.map +1 -1
- 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.map +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -1
- package/es-custom/components/chat-button/defs.js.map +1 -1
- package/es-custom/components/chat-button/index.d.ts +1 -0
- package/es-custom/components/chat-button/index.js +1 -0
- package/es-custom/components/chat-button/index.js.map +1 -1
- package/es-custom/components/chat-button/src/chat-button-skeleton.d.ts +30 -0
- package/es-custom/components/chat-button/src/chat-button-skeleton.js +41 -0
- package/es-custom/components/chat-button/src/chat-button-skeleton.js.map +1 -0
- package/es-custom/components/chat-button/src/chat-button.d.ts +4 -1
- package/es-custom/components/chat-button/src/chat-button.js +30 -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-button/src/chat-button.scss.js.map +1 -1
- package/es-custom/components/chat-history/src/chat-history.scss.js +1 -1
- package/es-custom/components/chat-history/src/chat-history.scss.js.map +1 -1
- package/es-custom/components/chat-history/src/history-content.js.map +1 -1
- package/es-custom/components/chat-history/src/history-delete-panel.js +1 -0
- package/es-custom/components/chat-history/src/history-delete-panel.js.map +1 -1
- package/es-custom/components/chat-history/src/history-header.js.map +1 -1
- package/es-custom/components/chat-history/src/history-loading.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-items.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-menu.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel.js.map +1 -1
- package/es-custom/components/chat-history/src/history-search-item.js.map +1 -1
- package/es-custom/components/chat-history/src/history-shell.js.map +1 -1
- package/es-custom/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es-custom/components/chat-shell/src/chat-header.js.map +1 -1
- package/es-custom/components/chat-shell/src/chat-header.scss.js.map +1 -1
- package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/panel-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/panel.js.map +1 -1
- package/es-custom/components/chat-shell/src/panel.scss.js.map +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/shell.js.map +1 -1
- package/es-custom/components/chat-shell/src/shell.scss.js.map +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.scss.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/detect-language.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/diff-decorator.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-data.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es-custom/components/code-snippet/src/dom-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/formatters.js.map +1 -1
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/streaming-manager.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es-custom/components/feedback/src/feedback-buttons.scss.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.scss.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-type-icon.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-upload-item.scss.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.scss.js.map +1 -1
- package/es-custom/components/launcher/src/launcher.js +1 -0
- package/es-custom/components/launcher/src/launcher.js.map +1 -1
- package/es-custom/components/launcher/src/launcher.scss.js +1 -1
- package/es-custom/components/launcher/src/launcher.scss.js.map +1 -1
- package/es-custom/components/markdown/src/markdown-renderer-types.d.ts +3 -14
- package/es-custom/components/markdown/src/markdown-renderer.js +0 -4
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +0 -2
- package/es-custom/components/markdown/src/markdown-token-tree.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.js +0 -1
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.scss.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.template.js.map +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js +2 -3
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js.map +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js.map +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js.map +1 -1
- package/es-custom/components/markdown/src/utils/html-helpers.js.map +1 -1
- package/es-custom/components/markdown/src/utils/lit-directives.js.map +1 -1
- package/es-custom/components/markdown/src/utils/plugin-fallback.js +0 -1
- package/es-custom/components/markdown/src/utils/plugin-fallback.js.map +1 -1
- package/es-custom/components/markdown/src/utils/slot-names.js.map +1 -1
- package/es-custom/components/markdown/src/utils/streaming-table.js.map +1 -1
- package/es-custom/components/markdown/src/utils/table-helpers.d.ts +10 -0
- package/es-custom/components/markdown/src/utils/table-helpers.js +0 -1
- package/es-custom/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es-custom/components/processing/src/processing.js.map +1 -1
- package/es-custom/components/processing/src/processing.scss.js.map +1 -1
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.d.ts +10 -3
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js +95 -48
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -1
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.scss.js +1 -1
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.scss.js.map +1 -1
- package/es-custom/components/prompt-line/index.d.ts +1 -1
- package/es-custom/components/prompt-line/src/autocomplete-controller.d.ts +12 -1
- package/es-custom/components/prompt-line/src/autocomplete-controller.js +42 -6
- package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.scss.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-constants.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-controller.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line.scss.js.map +1 -1
- package/es-custom/components/prompt-line/src/send-control.js.map +1 -1
- package/es-custom/components/prompt-line/src/send-control.scss.js.map +1 -1
- package/es-custom/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.d.ts +17 -0
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +12 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +1 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +2 -3
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/extension-equivalence.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/index.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/json-utils.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/keymap.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.d.ts +12 -0
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/types.d.ts +18 -4
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/value-sync.js.map +1 -1
- package/es-custom/components/prompt-line/src/types.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -1
- 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.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -1
- package/es-custom/components/shared/dynamic-css-var-sheet.js +24 -2
- package/es-custom/components/shared/dynamic-css-var-sheet.js.map +1 -1
- package/es-custom/components/shared/media-utils/script-loader.js.map +1 -1
- package/es-custom/components/table/src/table-loader.js.map +1 -1
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
- package/es-custom/components/table/src/table.js.map +1 -1
- package/es-custom/components/table/src/table.scss.js.map +1 -1
- package/es-custom/components/table/src/table.template.js.map +1 -1
- 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/toolbar/src/toolbar.scss.js.map +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.scss.js.map +1 -1
- package/es-custom/components/video-player/src/providers/base-provider.js.map +1 -1
- package/es-custom/components/video-player/src/providers/kaltura-provider.js.map +1 -1
- package/es-custom/components/video-player/src/providers/native-video-provider.js.map +1 -1
- package/es-custom/components/video-player/src/providers/vimeo-provider.js.map +1 -1
- package/es-custom/components/video-player/src/providers/youtube-provider.js.map +1 -1
- package/es-custom/components/video-player/src/utils/url-detector.js.map +1 -1
- package/es-custom/components/video-player/src/video-player.js.map +1 -1
- package/es-custom/components/video-player/src/video-player.scss.js.map +1 -1
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -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.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +2 -1
- 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-header.scss.js.map +1 -1
- 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/components/workspace-shell/src/workspace-shell.scss.js.map +1 -1
- package/es-custom/globals/decorators/carbon-element.js.map +1 -1
- package/es-custom/globals/scss/common.scss.js.map +1 -1
- package/es-custom/globals/settings.js.map +1 -1
- package/es-custom/globals/utils/aria-announcer-manager.js.map +1 -1
- package/es-custom/globals/utils/browser-utils.js.map +1 -1
- package/es-custom/globals/utils/csv.js.map +1 -1
- package/es-custom/globals/utils/dom-utils.js.map +1 -1
- package/es-custom/globals/utils/focus-utils.js.map +1 -1
- package/es-custom/globals/utils/iconTransform.js.map +1 -1
- package/es-custom/globals/utils/rtl-utils.js.map +1 -1
- package/es-custom/globals/utils/uuid.js.map +1 -1
- package/es-custom/react/ai-label-action-button.js.map +1 -1
- package/es-custom/react/audio-player.js.map +1 -1
- package/es-custom/react/autocomplete.js.map +1 -1
- package/es-custom/react/card.js.map +1 -1
- package/es-custom/react/carousel.js.map +1 -1
- package/es-custom/react/chain-of-thought-step.js.map +1 -1
- package/es-custom/react/chain-of-thought-toggle.js.map +1 -1
- package/es-custom/react/chain-of-thought.js.map +1 -1
- package/es-custom/react/chat-button-skeleton.d.ts +11 -0
- package/es-custom/react/chat-button-skeleton.js +28 -0
- package/es-custom/react/chat-button-skeleton.js.map +1 -0
- package/es-custom/react/chat-button.js.map +1 -1
- package/es-custom/react/chat-header.js.map +1 -1
- package/es-custom/react/chat-shell.js.map +1 -1
- package/es-custom/react/code-snippet.d.ts +1 -1
- package/es-custom/react/code-snippet.js +1 -1
- package/es-custom/react/code-snippet.js.map +1 -1
- package/es-custom/react/error-message.js.map +1 -1
- package/es-custom/react/feedback-buttons.js.map +1 -1
- package/es-custom/react/feedback.js.map +1 -1
- package/es-custom/react/file-upload-item.js.map +1 -1
- package/es-custom/react/file-uploads.js.map +1 -1
- package/es-custom/react/history/history-content.js.map +1 -1
- package/es-custom/react/history/history-delete-panel.js.map +1 -1
- package/es-custom/react/history/history-header.js.map +1 -1
- package/es-custom/react/history/history-loading.js.map +1 -1
- package/es-custom/react/history/history-panel-item-input.js.map +1 -1
- package/es-custom/react/history/history-panel-item.js.map +1 -1
- package/es-custom/react/history/history-panel-items.js.map +1 -1
- package/es-custom/react/history/history-panel-menu.js.map +1 -1
- package/es-custom/react/history/history-panel.js.map +1 -1
- package/es-custom/react/history/history-search-item.js.map +1 -1
- package/es-custom/react/history/history-shell.js.map +1 -1
- package/es-custom/react/history/history-toolbar.js.map +1 -1
- package/es-custom/react/hooks/useChatAutocomplete.js +4 -3
- package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es-custom/react/input-send-control.js.map +1 -1
- package/es-custom/react/launcher.js.map +1 -1
- package/es-custom/react/markdown.js.map +1 -1
- package/es-custom/react/panel.js.map +1 -1
- package/es-custom/react/processing.js.map +1 -1
- package/es-custom/react/prompt-line-shell.js.map +1 -1
- package/es-custom/react/prompt-line.js.map +1 -1
- package/es-custom/react/reasoning-step.js.map +1 -1
- package/es-custom/react/reasoning-steps-toggle.js.map +1 -1
- package/es-custom/react/reasoning-steps.js.map +1 -1
- package/es-custom/react/stop-streaming-button.js.map +1 -1
- package/es-custom/react/table.js.map +1 -1
- package/es-custom/react/tool-call-data.js.map +1 -1
- package/es-custom/react/toolbar.js +1 -1
- package/es-custom/react/toolbar.js.map +1 -1
- package/es-custom/react/transcript.js.map +1 -1
- package/es-custom/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es-custom/react/utils/withWebComponentBridge.js.map +1 -1
- package/es-custom/react/video-player.js.map +1 -1
- package/es-custom/react/workspace-shell.js.map +1 -1
- package/es-custom/testing/PageObjectId.js.map +1 -1
- package/es-custom/testing/load-all-lazy-deps.js.map +1 -1
- package/package.json +3 -3
- package/es/react/__tests__/jest.setup.js +0 -82
- package/es/react/__tests__/jest.setup.js.map +0 -1
- package/es-custom/react/__tests__/jest.setup.js +0 -82
- package/es-custom/react/__tests__/jest.setup.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell-header.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-shell-header.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"workspace-shell.js","sources":["../../../../src/components/workspace-shell/src/workspace-shell.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { LitElement, html, PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { carbonElement } from '../../../globals/decorators/index.js';\nimport prefix from '../../../globals/settings.js';\nimport commonStyles from '../../../globals/scss/common.scss?lit';\nimport styles from './workspace-shell.scss?lit';\nimport { HeaderCollapsibleManager } from './header-collapsible-manager.js';\n\n/**\n * Workspace Shell.\n *\n * @element cds-custom-aichat-workspace-shell\n * @slot toolbar - Represents the toolbar area of the workspace.\n * @slot header - Represents the header section, containing title, subtitle and actions.\n * @slot notification - Area for displaying workspace notifications.\n * @slot body - The main content area of the workspace.\n * @slot footer - Represents the footer section, usually containing action buttons.\n *\n */\n@carbonElement(`${prefix}-workspace-shell`)\nclass CDSAIChatWorkspaceShell extends LitElement {\n static styles = [commonStyles, styles];\n\n /**\n * Enable automatic header collapsible behavior based on available space.\n * When true, the header will automatically become collapsible when the\n * body would have less space than the header.\n *\n */\n @property({ type: Boolean, attribute: 'auto-collapsible-header' })\n autoCollapsibleHeader = false;\n\n /**\n * @internal\n */\n private headerCollapsibleManager?: HeaderCollapsibleManager;\n\n connectedCallback() {\n super.connectedCallback();\n this.setupHeaderCollapsibleManager();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.headerCollapsibleManager?.disconnect();\n }\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n // If autoCollapsibleHeader changes, setup or teardown manager\n if (changedProperties.has('autoCollapsibleHeader')) {\n if (this.autoCollapsibleHeader) {\n this.setupHeaderCollapsibleManager();\n } else {\n // Clean up: remove collapsible attribute from header before disconnecting\n this.cleanupHeaderCollapsible();\n this.headerCollapsibleManager?.disconnect();\n this.headerCollapsibleManager = undefined;\n }\n }\n }\n\n private cleanupHeaderCollapsible(): void {\n if (!this.shadowRoot) {\n return;\n }\n\n const headerSlot = this.shadowRoot.querySelector<HTMLSlotElement>(\n 'slot[name=\"header\"]'\n );\n const headerElement = headerSlot?.assignedElements()[0] as HTMLElement;\n\n if (headerElement) {\n headerElement.removeAttribute('collapsible');\n }\n }\n\n private setupHeaderCollapsibleManager(): void {\n // Only setup if feature is enabled\n if (!this.autoCollapsibleHeader) {\n return;\n }\n\n // Don't create a new manager if one already exists\n if (this.headerCollapsibleManager) {\n return;\n }\n\n this.updateComplete.then(() => {\n if (!this.shadowRoot) {\n return;\n }\n\n // Double-check in case manager was created while waiting for updateComplete\n if (this.headerCollapsibleManager) {\n return;\n }\n\n this.headerCollapsibleManager = new HeaderCollapsibleManager(\n this.shadowRoot,\n this\n );\n\n this.headerCollapsibleManager.connect((state) => {\n this.headerCollapsibleManager?.updateHeaderCollapsible(\n state.shouldCollapse\n );\n });\n });\n }\n\n render() {\n return html`\n <slot name=\"toolbar\"></slot>\n <slot name=\"notification\"></slot>\n <slot name=\"header\"></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n `;\n }\n}\n\nexport { CDSAIChatWorkspaceShell };\nexport default CDSAIChatWorkspa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ACF;;AAGA,QAAA,IAAI,IAAI,CAAC,wBAAwB,EAAE;YACjC;QACF;AAEA,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAK;AAC5B,YAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB;YACF;;AAGA,YAAA,IAAI,IAAI,CAAC,wBAAwB,EAAE;gBACjC;YACF;AAEA,YAAA,IAAI,CAAC,wBAAwB,GAAG,IAAI,wBAAwB,CAC1D,IAAI,CAAC,UAAU,EACf,IAAI,CACL;YAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;gBAC9C,IAAI,CAAC,wBAAwB,EAAE,uBAAuB,CACpD,KAAK,CAAC,cAAc,CACrB;AACH,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;IACJ;IAEA,MAAM,GAAA;AACJ,QAAA,OAAO,IAAI,CAAA;;;;;;KAMV;IACH;;AAnGO,uBAAA,CAAA,MAAM,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC;AAStC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,yBAAyB,EAAE;AACnC,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,uBAAA,EAAA,MAAA,CAAA;AAV1B,uBAAuB,GAAA,UAAA,CAAA;AAD5B,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB;AACpC,CAAA,EAAA,uBAAuB,CAqG5B;AAGD,gCAAe,uBAAuB;;"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
9
|
|
|
10
|
-
var styles = css([":host(cds-custom-aichat-workspace-shell){background-color:var(--cds-chat-shell-background);block-size:100%;border:.0625rem solid var(--cds-chat-bubble-border,#e0e0e0);border-radius:.5rem;box-shadow:-10px 0 100px -24px var(--cds-ai-popover-shadow-outer-01,rgba(0,67,206,.06)),0 10px 40px -24px var(--cds-ai-popover-shadow-outer-02,rgba(0,0,0,.04));box-sizing:border-box!important;color:var(--cds-text-secondary,#525252);display:flex;flex-direction:column;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);inline-size:100%;letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);overflow:auto}:host(cds-custom-aichat-workspace-shell) slot[name=toolbar]{flex-shrink:0;min-inline-size:0}:host(cds-custom-aichat-workspace-shell) slot[name=notification]{flex-shrink:0}:host(cds-custom-aichat-workspace-shell)
|
|
10
|
+
var styles = css([":host(cds-custom-aichat-workspace-shell){background-color:var(--cds-chat-shell-background);block-size:100%;border:.0625rem solid var(--cds-chat-bubble-border,#e0e0e0);border-radius:.5rem;box-shadow:-10px 0 100px -24px var(--cds-ai-popover-shadow-outer-01,rgba(0,67,206,.06)),0 10px 40px -24px var(--cds-ai-popover-shadow-outer-02,rgba(0,0,0,.04));box-sizing:border-box!important;color:var(--cds-text-secondary,#525252);display:flex;flex-direction:column;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);inline-size:100%;letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);overflow:auto}:host(cds-custom-aichat-workspace-shell) slot[name=toolbar]{flex-shrink:0;min-inline-size:0}:host(cds-custom-aichat-workspace-shell) slot[name=notification]{flex-shrink:0}:host(cds-custom-aichat-workspace-shell) slot[name=header]{flex-shrink:0}:host(cds-custom-aichat-workspace-shell) slot[name=body]{flex:1 1 auto;min-block-size:0}:host(cds-custom-aichat-workspace-shell) slot[name=footer]{flex-shrink:0}::slotted([slot=notification]){box-sizing:border-box;margin-block-end:0;max-inline-size:100%!important}::slotted(cds-custom-aichat-toolbar){--cds-aichat-toolbar-title-padding-inline-start:2rem;border-block-end:.0625rem solid var(--cds-chat-bubble-border);box-sizing:border-box;font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);inline-size:100%;letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-heading-03-line-height,1.4);max-inline-size:100%;min-inline-size:0}.cds-custom-aichat-workspace-shell__toolbar-action{display:grid;grid-auto-columns:2.5rem;grid-auto-flow:column}.cds-custom-aichat-workspace-shell__toolbar-action ::slotted(cds-custom-ai-label){block-size:2.5rem}:host(cds-custom-aichat-workspace-shell-body){display:flex;flex-direction:column;padding:1.5rem 2rem}"]);
|
|
11
11
|
|
|
12
12
|
export { styles as default };
|
|
13
13
|
//# sourceMappingURL=workspace-shell.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-shell.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-shell.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carbon-element.js","sources":["../../../src/globals/decorators/carbon-element.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"carbon-element.js","sources":["../../../src/globals/decorators/carbon-element.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/*\n * IMPORTANT: For compatibility with tsickle and the Closure JS compiler, all\n * property decorators (but not class decorators) in this file that have\n * an @ExportDecoratedItems annotation must be defined as a regular function,\n * not an arrow function.\n */\ndeclare type Constructor<T> = {\n new (...args: any[]): T;\n};\ninterface ClassDescriptor {\n kind: 'class';\n elements: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;\n}\ninterface ClassElement {\n kind: 'field' | 'method';\n key: PropertyKey;\n placement: 'static' | 'prototype' | 'own';\n // eslint-disable-next-line @typescript-eslint/ban-types\n initializer?: Function;\n extras?: ClassElement[];\n finisher?: <T>(clazz: Constructor<T>) => void | Constructor<T>;\n descriptor?: PropertyDescriptor;\n}\n\n/**\n * Allow for custom element classes with private constructors\n */\ntype CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nconst legacyCustomElement = (tagName: string, clazz: CustomElementClass) => {\n try {\n customElements.define(tagName, clazz as CustomElementConstructor);\n } catch (error) {\n // console.warn(`Attempting to re-define ${tagName}`);\n }\n // Cast as any because TS doesn't recognize the return type as being a\n // subtype of the decorated class when clazz is typed as\n // `Constructor<HTMLElement>` for some reason.\n // `Constructor<HTMLElement>` is helpful to make sure the decorator is\n // applied to elements however.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n};\n\nconst standardCustomElement = (\n tagName: string,\n descriptor: ClassDescriptor\n) => {\n const { kind, elements } = descriptor;\n return {\n kind,\n elements,\n // This callback is called once the class is otherwise fully defined\n finisher(clazz: Constructor<HTMLElement>) {\n try {\n customElements.define(tagName, clazz);\n } catch (error) {\n // console.warn(`Attempting to re-define ${tagName}`);\n }\n },\n };\n};\n\n/**\n * Class decorator factory that defines the decorated class as a custom element.\n *\n * ```js\n * @carbonElement('my-element')\n * class MyElement extends LitElement {\n * render() {\n * return html``;\n * }\n * }\n * ```\n *\n * @param tagName The tag name of the custom element to define.\n */\nexport function carbonElement(tagName: string) {\n return (classOrDescriptor: CustomElementClass | ClassDescriptor) =>\n typeof classOrDescriptor === 'function'\n ? legacyCustomElement(tagName, classOrDescriptor)\n : standardCustomElement(tagName, classOrDescriptor as ClassDescriptor);\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAgCH,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAE,KAAyB,KAAI;AACzE,IAAA,IAAI;AACF,QAAA,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAiC,CAAC;IACnE;IAAE,OAAO,KAAK,EAAE;;IAEhB;;;;;;;AAOA,IAAA,OAAO,KAAY;AACrB,CAAC;AAED,MAAM,qBAAqB,GAAG,CAC5B,OAAe,EACf,UAA2B,KACzB;AACF,IAAA,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,UAAU;IACrC,OAAO;QACL,IAAI;QACJ,QAAQ;;AAER,QAAA,QAAQ,CAAC,KAA+B,EAAA;AACtC,YAAA,IAAI;AACF,gBAAA,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC;YACvC;YAAE,OAAO,KAAK,EAAE;;YAEhB;QACF,CAAC;KACF;AACH,CAAC;AAED;;;;;;;;;;;;;AAaG;AACG,SAAU,aAAa,CAAC,OAAe,EAAA;IAC3C,OAAO,CAAC,iBAAuD,KAC7D,OAAO,iBAAiB,KAAK;AAC3B,UAAE,mBAAmB,CAAC,OAAO,EAAE,iBAAiB;AAChD,UAAE,qBAAqB,CAAC,OAAO,EAAE,iBAAoC,CAAC;AAC5E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"settings.js","sources":["../../src/globals/settings.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n// Set this to a suitable prefix for your project to use in TS files\nconst prefix = 'cds-custom-aichat';\n\nexport default prefix;\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;AACA,MAAM,MAAM,GAAG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria-announcer-manager.js","sources":["../../../src/globals/utils/aria-announcer-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAuBH,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E;AAC5C,gBAAA,MAAM,CAAC,WAAW,GAAG,EAAE;YACzB;AACF,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,CAAC,YAAY,GAAG,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM;IAC5E;AACD
|
|
1
|
+
{"version":3,"file":"aria-announcer-manager.js","sources":["../../../src/globals/utils/aria-announcer-manager.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * Politeness of a live-region announcement.\n *\n * - `polite` — status/content updates the user benefits from but shouldn't have\n * interrupted. The default.\n * - `assertive` — errors that block the user's progress; interrupts whatever the\n * screen reader is currently reading. Use sparingly.\n */\ntype AnnouncerPoliteness = 'polite' | 'assertive';\n\n/**\n * One live-region channel: the regions it rotates through plus the pending-queue\n * and timer state used to coalesce same-tick announcements.\n */\ninterface AnnouncerChannel {\n regions: HTMLDivElement[];\n currentIndex: number;\n pendingAnnouncements: string[];\n announcementTimeoutId: number | null;\n}\n\nfunction createChannel(): AnnouncerChannel {\n return {\n regions: [],\n currentIndex: 0,\n pendingAnnouncements: [],\n announcementTimeoutId: null,\n };\n}\n\n/**\n * Manages ARIA live region announcements for screen readers.\n *\n * Rotates writes across N visually-hidden live regions. Rotation forces\n * assistive tech to re-announce identical messages and lets us clear\n * previous content without racing the announcement.\n *\n * Two independent channels are maintained — `polite` and `assertive` — each with\n * its own regions, rotation, and coalescing queue, so an assertive (blocking)\n * message never coalesces with a polite one. Assertive is opt-in: pass assertive\n * regions to {@link connect} and a politeness to {@link announce}. The politeness\n * of the rendered region (its `aria-live` value) is owned by the consumer's\n * markup; the channel only routes text to the right set of regions.\n *\n * `chat-shell` connects two polite regions; the React announcer in\n * `@carbon/ai-chat` connects three polite regions (the extra region helps NVDA +\n * JAWS reliably pick up back-to-back identical messages) plus assertive regions.\n *\n * Both consumers share this implementation so a fix to the screen-reader\n * workarounds (250 ms NVDA delay, dual-clear pattern) propagates to both.\n */\nexport class AriaAnnouncerManager {\n private polite = createChannel();\n private assertive = createChannel();\n\n /**\n * Initialize the manager with the live-region elements it should rotate\n * through. `politeRegions` must contain at least one element; two or three is\n * typical. `assertiveRegions` is optional — omit it for polite-only consumers.\n */\n connect(\n politeRegions: HTMLDivElement[],\n assertiveRegions: HTMLDivElement[] = []\n ): void {\n this.polite.regions = politeRegions.slice();\n this.polite.currentIndex = 0;\n this.assertive.regions = assertiveRegions.slice();\n this.assertive.currentIndex = 0;\n }\n\n /**\n * Cancel any pending announcements and detach from the regions.\n */\n disconnect(): void {\n this.clearChannel(this.polite);\n this.clearChannel(this.assertive);\n this.polite.regions = [];\n this.assertive.regions = [];\n }\n\n /**\n * Queue a message to be announced on the next tick. Multiple calls in the\n * same tick (and politeness) are coalesced into a single announcement.\n * Defaults to polite; falls back to polite if assertive is requested but no\n * assertive regions are connected.\n */\n announce(message: string, politeness: AnnouncerPoliteness = 'polite'): void {\n if (!message || typeof window === 'undefined') {\n return;\n }\n\n const channel =\n politeness === 'assertive' && this.assertive.regions.length > 0\n ? this.assertive\n : this.polite;\n\n channel.pendingAnnouncements.push(message);\n\n if (channel.announcementTimeoutId === null) {\n // 250 ms delay works around an NVDA bug: a focus change at the same\n // time as a live-region update can drop the announcement entirely.\n // Smaller numbers were less reliable in testing.\n channel.announcementTimeoutId = window.setTimeout(() => {\n this.doAnnouncements(channel);\n }, 250);\n }\n }\n\n private clearChannel(channel: AnnouncerChannel): void {\n if (\n channel.announcementTimeoutId !== null &&\n typeof window !== 'undefined'\n ) {\n window.clearTimeout(channel.announcementTimeoutId);\n channel.announcementTimeoutId = null;\n }\n channel.pendingAnnouncements = [];\n }\n\n private doAnnouncements(channel: AnnouncerChannel): void {\n channel.announcementTimeoutId = null;\n\n if (\n channel.pendingAnnouncements.length === 0 ||\n channel.regions.length === 0\n ) {\n channel.pendingAnnouncements = [];\n return;\n }\n\n const message = channel.pendingAnnouncements.join(' ');\n channel.pendingAnnouncements = [];\n\n const writeRegion = channel.regions[channel.currentIndex];\n if (writeRegion) {\n writeRegion.textContent = message;\n }\n\n // Clear every other region so the active one stands out as the change.\n channel.regions.forEach((region, index) => {\n if (index !== channel.currentIndex && region) {\n region.textContent = '';\n }\n });\n\n channel.currentIndex = (channel.currentIndex + 1) % channel.regions.length;\n }\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAuBH,SAAS,aAAa,GAAA;IACpB,OAAO;AACL,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,YAAY,EAAE,CAAC;AACf,QAAA,oBAAoB,EAAE,EAAE;AACxB,QAAA,qBAAqB,EAAE,IAAI;KAC5B;AACH;AAEA;;;;;;;;;;;;;;;;;;;;AAoBG;MACU,oBAAoB,CAAA;AAAjC,IAAA,WAAA,GAAA;QACU,IAAA,CAAA,MAAM,GAAG,aAAa,EAAE;QACxB,IAAA,CAAA,SAAS,GAAG,aAAa,EAAE;IA8FrC;AA5FE;;;;AAIG;AACH,IAAA,OAAO,CACL,aAA+B,EAC/B,gBAAA,GAAqC,EAAE,EAAA;QAEvC,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC,KAAK,EAAE;AAC3C,QAAA,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,gBAAgB,CAAC,KAAK,EAAE;AACjD,QAAA,IAAI,CAAC,SAAS,CAAC,YAAY,GAAG,CAAC;IACjC;AAEA;;AAEG;IACH,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;AACjC,QAAA,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,EAAE;AACxB,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG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AAA,OAAO,CAAC,oBAAoB,GAAG,EAAE;QAEjC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC;QACzD,IAAI,WAAW,EAAE;AACf,YAAA,WAAW,CAAC,WAAW,GAAG,OAAO;QACnC;;QAGA,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,KAAI;YACxC,IAAI,KAAK,KAAK,OAAO,CAAC,YAAY,IAAI,MAAM,EAAE;AAC5C,gBAAA,MAAM,CAAC,WAAW,GAAG,EAAE;YACzB;AACF,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,CAAC,YAAY,GAAG,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM;IAC5E;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-utils.js","sources":["../../../src/globals/utils/browser-utils.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"browser-utils.js","sources":["../../../src/globals/utils/browser-utils.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Device detection utilities.\n */\n\nfunction isBrowser(): boolean {\n return typeof window !== 'undefined' && typeof navigator !== 'undefined';\n}\n\nlet screenWidth = 0;\nlet screenHeight = 0;\n\nif (isBrowser()) {\n screenWidth = window.screen.width;\n screenHeight = window.screen.height;\n}\n\nconst IS_IOS = isBrowser() && /iPad|iPhone|iPod/.test(navigator.userAgent);\nconst IS_ANDROID = isBrowser() && /Android/.test(navigator.userAgent);\nconst IS_MOBILE = IS_IOS || IS_ANDROID;\n// The width and height checks here are how we differentiate between mobile android devices and tablets.\nconst IS_PHONE = IS_MOBILE && (screenWidth < 500 || screenHeight < 500);\n// Assume the phone is in portrait mode if the width is small.\nconst IS_PHONE_IN_PORTRAIT_MODE = IS_PHONE && screenWidth < 500;\n\nexport {\n isBrowser,\n IS_IOS,\n IS_ANDROID,\n IS_MOBILE,\n IS_PHONE,\n IS_PHONE_IN_PORTRAIT_MODE,\n};\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;AAEH,SAAS,SAAS,GAAA;IAChB,OAAO,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,SAAS,KAAK,WAAW;AAC1E;AAEA,IAAI,WAAW,GAAG,CAAC;AACnB,IAAI,YAAY,GAAG,CAAC;AAEpB,IAAI,SAAS,EAAE,EAAE;AACf,IAAA,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK;AACjC,IAAA,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM;AACrC;AAEA,MAAM,MAAM,GAAG,SAAS,EAAE,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS;AACzE,MAAM,UAAU,GAAG,SAAS,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS;AACpE,MAAM,SAAS,GAAG,MAAM,IAAI;AAC5B;AACA,MAAM,QAAQ,GAAG,SAAS,KAAK,WAAW,GAAG,GAAG,IAAI,YAAY,GAAG,GAAG;AACtE;AACA,MAAM,yBAAyB,GAAG,QAAQ,IAAI,WAAW,GAAG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csv.js","sources":["../../../src/globals/utils/csv.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;AACA,MAAM,aAAa,GAAG,UAAU;AAEhC,SAAS,WAAW,CAAC,KAAe,EAAA;IAClC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAE3B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;IAEA,OAAO,CAAA,CAAA,EAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA,CAAA,CAAG;AACzC;AAEA;;;AAGG;AACH,SAAS,YAAY,CAAC,IAAkB,EAAA;AACtC,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA,EAAG,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,EAAA,CAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1E
|
|
1
|
+
{"version":3,"file":"csv.js","sources":["../../../src/globals/utils/csv.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\ntype CSVValue = string | number | null | undefined;\n\n// A field needs quoting when it contains the delimiter, a quote, or a line break.\nconst NEEDS_QUOTING = /[\",\\r\\n]/;\n\nfunction formatField(value: CSVValue): string {\n if (value === null || value === undefined) {\n return '';\n }\n\n const field = String(value);\n\n if (!NEEDS_QUOTING.test(field)) {\n return field;\n }\n\n return `\"${field.replace(/\"/g, '\"\"')}\"`;\n}\n\n/**\n * Serializes rows into an RFC 4180 CSV string. Every record, including the last, is terminated by a\n * newline; an empty input produces an empty string.\n */\nfunction stringifyCSV(rows: CSVValue[][]): string {\n return rows.map((row) => `${row.map(formatField).join(',')}\\n`).join('');\n}\n\nexport { stringifyCSV };\nexport type { CSVValue };\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAIH;AACA,MAAM,aAAa,GAAG,UAAU;AAEhC,SAAS,WAAW,CAAC,KAAe,EAAA;IAClC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;AACzC,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAE3B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;IAEA,OAAO,CAAA,CAAA,EAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA,CAAA,CAAG;AACzC;AAEA;;;AAGG;AACH,SAAS,YAAY,CAAC,IAAkB,EAAA;AACtC,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAA,EAAG,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,EAAA,CAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-utils.js","sources":["../../../src/globals/utils/dom-utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;AAIG;AACG,SAAU,iBAAiB,CAC/B,IAAqC,EACrC,QAAgB,EAAA;IAEhB,MAAM,MAAM,GAAI,IAAgB,CAAC,aAAa,CAAC,QAAQ,CAAC;IACxD,IAAI,MAAM,EAAE;AACV,QAAA,OAAO,MAAM;IACf;AACA,IAAA,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE;AACvD,QAAA,MAAM,MAAM,GAAI,EAAkB,CAAC,UAAU;QAC7C,IAAI,MAAM,EAAE;YACV,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC;YACjD,IAAI,KAAK,EAAE;AACT,gBAAA,OAAO,KAAK;YACd;QACF;IACF;AACA,IAAA,OAAO,IAAI;AACb
|
|
1
|
+
{"version":3,"file":"dom-utils.js","sources":["../../../src/globals/utils/dom-utils.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Recursively search through shadow DOMs for a matching element.\n * Useful for querying elements nested inside multiple layers of\n * shadow roots (e.g. in tests or cross-component coordination).\n */\nexport function deepQuerySelector(\n root: ShadowRoot | Element | Document,\n selector: string\n): Element | null {\n const direct = (root as Element).querySelector(selector);\n if (direct) {\n return direct;\n }\n for (const el of Array.from(root.querySelectorAll('*'))) {\n const shadow = (el as HTMLElement).shadowRoot;\n if (shadow) {\n const found = deepQuerySelector(shadow, selector);\n if (found) {\n return found;\n }\n }\n }\n return null;\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;AAIG;AACG,SAAU,iBAAiB,CAC/B,IAAqC,EACrC,QAAgB,EAAA;IAEhB,MAAM,MAAM,GAAI,IAAgB,CAAC,aAAa,CAAC,QAAQ,CAAC;IACxD,IAAI,MAAM,EAAE;AACV,QAAA,OAAO,MAAM;IACf;AACA,IAAA,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE;AACvD,QAAA,MAAM,MAAM,GAAI,EAAkB,CAAC,UAAU;QAC7C,IAAI,MAAM,EAAE;YACV,MAAM,KAAK,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC;YACjD,IAAI,KAAK,EAAE;AACT,gBAAA,OAAO,KAAK;YACd;QACF;IACF;AACA,IAAA,OAAO,IAAI;AACb;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-utils.js","sources":["../../../src/globals/utils/focus-utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;AAMG;AACH,SAAS,oBAAoB,GAAA;AAC3B,IAAA,IAAI,aAAa,GAAG,QAAQ,CAAC,aAAa;;IAG1C,OAAO,aAAa,EAAE;;AAEpB,QAAA,IAAI,aAA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;YACF;AACA,YAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;gBACjB,EAAE,CAAC,KAAK,EAAE;YACZ;AACF,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"focus-utils.js","sources":["../../../src/globals/utils/focus-utils.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Gets the deepest active element, traversing through all shadow DOM boundaries.\n * This handles nested shadow roots, slotted elements, and will return the actual\n * focused element regardless of how many shadow DOM levels exist.\n *\n * @returns The deepest active element, or null if no element has focus\n */\nfunction getDeepActiveElement(): Element | null {\n let activeElement = document.activeElement;\n\n // Traverse through all shadow DOM levels and handle slotted elements\n while (activeElement) {\n // If the active element is a slot, get the actual assigned element that has focus\n if (activeElement instanceof HTMLSlotElement) {\n const assignedElements = activeElement.assignedElements({\n flatten: true,\n });\n // Find which assigned element actually has focus\n const focusedAssigned = assignedElements.find((el) => {\n if ((el as any).shadowRoot?.activeElement) {\n return true;\n }\n return (\n el === document.activeElement || el.contains(document.activeElement)\n );\n });\n if (focusedAssigned) {\n activeElement = focusedAssigned;\n continue;\n }\n }\n\n // Check if there's a shadow root with an active element\n const shadowRoot = (activeElement as any).shadowRoot;\n if (shadowRoot?.activeElement) {\n activeElement = shadowRoot.activeElement;\n continue;\n }\n\n // No deeper level found\n break;\n }\n\n return activeElement;\n}\n\n/**\n * Checks if an element should be ignored due to visibility or accessibility attributes.\n *\n * @param element - The DOM element to check\n * @param exceptions - Array of selectors to ignore when checking the element (e.g., 'dialog', '[popover]')\n * @returns True if the element should be ignored by focus management, false otherwise\n */\nfunction isElementInvisible(\n element: Element,\n exceptions: string[] = ['dialog', '[popover]']\n): boolean {\n if (!element || !(element instanceof HTMLElement)) {\n return false;\n }\n\n if (exceptions.length > 0 && element.matches(exceptions.join(','))) {\n return false;\n }\n\n const computedStyle = window.getComputedStyle(element);\n const isStyleHidden =\n computedStyle.display === 'none' || computedStyle.visibility === 'hidden';\n const isAttributeHidden = element.matches(\n '[disabled], [hidden], [inert], [aria-hidden=\"true\"]'\n );\n\n return isStyleHidden || isAttributeHidden;\n}\n\n/**\n * Checks if an element is focusable. An element is considered focusable if it matches\n * standard focusable elements criteria (such as buttons, inputs, etc., that are not disabled\n * and do not have a negative tabindex) or is a custom element with a shadow root that delegates focus.\n * Based on https://gist.github.com/oscarmarina/9ce95f491a4c53ed01d989de4a87c0c9\n *\n * @param element - The DOM element to check for focusability\n * @returns True if the element is focusable, false otherwise\n */\nfunction isFocusable(element: Element): boolean {\n if (!(element instanceof HTMLElement)) {\n return false;\n }\n\n // https://stackoverflow.com/a/30753870/76472\n const knownFocusableElements =\n 'a[href],area[href],button:not([disabled]),details,iframe,object,input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[contentEditable=\"true\"],[tabindex]:not([tabindex^=\"-\"])';\n\n if (element.matches(knownFocusableElements)) {\n return true;\n }\n\n const isDisabledCustomElement =\n element.localName.includes('-') &&\n element.matches('[disabled], [aria-disabled=\"true\"]');\n\n if (isDisabledCustomElement) {\n return false;\n }\n\n return element.shadowRoot?.delegatesFocus ?? false;\n}\n\n/**\n * Attempts to focus an element if it's focusable, visible, and not disabled.\n * This is an enhanced version that checks visibility, accessibility attributes,\n * and proper focusability before attempting to set focus. It is shadow DOM aware\n * and handles slotted elements correctly.\n *\n * @param element - The element to attempt to focus\n * @param exceptions - Array of selectors to ignore when checking visibility (e.g., 'dialog', '[popover]')\n * @returns True if focus was successfully set, false otherwise\n */\nfunction tryFocus(\n element: Element | null | undefined,\n exceptions?: string[]\n): boolean {\n if (!element || !(element instanceof HTMLElement)) {\n return false;\n }\n\n // Check if element is invisible or should be ignored\n if (isElementInvisible(element, exceptions)) {\n return false;\n }\n\n // Check if element is focusable\n if (!isFocusable(element)) {\n return false;\n }\n\n // Get the current deep active element (shadow DOM aware)\n const previousActiveElement = getDeepActiveElement();\n\n // Only call focus if the element doesn't already have focus\n if (previousActiveElement !== element) {\n element.focus();\n }\n\n // Verify focus was actually set by checking the deep active element\n // This works across shadow DOM boundaries, with slotted elements, and delegatesFocus configurations\n const currentActiveElement = getDeepActiveElement();\n return (\n currentActiveElement === element || element.contains(currentActiveElement)\n );\n}\n\n/**\n * Traverse the composed tree from the root, selecting elements that meet the provided filter criteria.\n * This function properly handles Shadow DOM boundaries.\n * Based on https://github.com/JanMiksovsky/elix/blob/main/src/core/dom.js#L320\n *\n * @param node - The root node for traversal\n * @param whatToShow - NodeFilter code for node types to include (use 0 to retrieve all nodes)\n * @param filter - Filters nodes. Child nodes are considered even if parent does not satisfy the filter\n * @param skipNode - Determines whether to skip a node and its children\n * @returns An iterator yielding nodes meeting the filter criteria\n */\nfunction* walkComposedTree(\n node: Node,\n whatToShow = 0,\n filter: (node: Node) => boolean = () => true,\n skipNode: (node: Node) => boolean = () => false\n): IterableIterator<Node> {\n if ((whatToShow && node.nodeType !== whatToShow) || skipNode(node)) {\n return;\n }\n\n if (filter(node)) {\n yield node;\n }\n\n const children =\n // eslint-disable-next-line no-nested-ternary\n node instanceof HTMLElement && node.shadowRoot\n ? node.shadowRoot.children\n : node instanceof HTMLSlotElement\n ? node.assignedNodes({ flatten: true })\n : node.childNodes;\n\n for (const child of children) {\n yield* walkComposedTree(child, whatToShow, filter, skipNode);\n }\n}\n\n/**\n * Retrieves the first and last focusable children of a node using a TreeWalker.\n *\n * @param walker - The TreeWalker object used to traverse the node's children\n * @returns A tuple containing the first and last focusable children. If no focusable children are found, `null` is returned for both\n */\nfunction getFirstAndLastFocusableChildren(\n walker: IterableIterator<HTMLElement>\n): [first: HTMLElement | null, last: HTMLElement | null] {\n let firstFocusableChild: HTMLElement | null = null;\n let lastFocusableChild: HTMLElement | null = null;\n\n for (const currentNode of walker) {\n if (!firstFocusableChild) {\n firstFocusableChild = currentNode;\n }\n lastFocusableChild = currentNode;\n }\n\n return [firstFocusableChild, lastFocusableChild];\n}\n\n/**\n * Finds a descendant of `searchRoot` via `selector` and focuses it after the next\n * two animation frames. Use when DOM updates (Lit, React, reorder) replace or move\n * nodes so the previous focused element is detached (e.g. list pin/unpin).\n *\n * Tries {@link tryFocus} first for visibility/focusability checks; if that does\n * not take focus (e.g. some custom element hosts), falls back to {@link HTMLElement.focus}.\n *\n * @param searchRoot - Root to query (`Element`, `ShadowRoot`, `Document`, or `DocumentFragment`, e.g. Lit `renderRoot`)\n * @param selector - CSS selector that resolves to the node to focus.\n */\nfunction focusElementAfterRepaint(\n searchRoot: Document | Element | ShadowRoot | DocumentFragment,\n selector: string\n): void {\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n const el = searchRoot.querySelector(selector);\n if (!(el instanceof HTMLElement)) {\n return;\n }\n if (!tryFocus(el)) {\n el.focus();\n }\n });\n });\n}\n\nexport {\n getDeepActiveElement,\n isElementInvisible,\n isFocusable,\n tryFocus,\n walkComposedTree,\n getFirstAndLastFocusableChildren,\n focusElementAfterRepaint,\n};\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;AAMG;AACH,SAAS,oBAAoB,GAAA;AAC3B,IAAA,IAAI,aAAa,GAAG,QAAQ,CAAC,aAAa;;IAG1C,OAAO,aAAa,EAAE;;AAEpB,QAAA,IAAI,aAAa,YAAY,eAAe,EAAE;AAC5C,YAAA,MAAM,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAC;AACtD,gBAAA,OAAO,EAAE,IAAI;AACd,aAAA,CAAC;;YAEF,MAAM,eAAe,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAAE,KAAI;AACnD,gBAAA,IAAK,EAAU,CAAC,UAAU,EAAE,aAAa,EAAE;AACzC,oBAAA,OAAO,IAAI;gBACb;AACA,gBAAA,QACE,EAAE,KAAK,QAAQ,CAAC,aAAa,IAAI,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CA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AC,IAAI,IAAI,MAAM;AAC/E
|
|
1
|
+
{"version":3,"file":"iconTransform.js","sources":["../../../src/globals/utils/iconTransform.tsx"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Icon Transformation Utility\n *\n * This module provides utilities to transform React icon components from @carbon/icons-react\n * into the CarbonIcon descriptor format used by @carbon/icons. This enables React developers\n * to use their familiar React icon components while maintaining compatibility with web components\n * that expect the plain JavaScript CarbonIcon format.\n *\n * Key features:\n * - Automatic transformation of React icon components to CarbonIcon descriptors\n * - No-op pass-through for CarbonIcon objects (already in correct format)\n * - Global caching to prevent redundant transformations\n * - Type guards for runtime icon format detection\n * - Support for forwardRef and memo-wrapped components\n *\n * Usage:\n * ```tsx\n * import { Add } from '@carbon/icons-react';\n * import { transformReactIconToCarbonIcon } from './iconTransform';\n *\n * const carbonIcon = transformReactIconToCarbonIcon(Add);\n * // carbonIcon is now in CarbonIcon format, ready for web components\n * ```\n */\n\nimport React from 'react';\nimport { CarbonIcon } from '@carbon/web-components/es-custom/globals/internal/icon-loader-utils';\n\n// Global cache for transformed icons using WeakMap to key by component reference\nconst iconCache = new WeakMap<\n React.ComponentType<any>,\n Map<number, CarbonIcon>\n>();\n\n/**\n * Type guard to detect if icon is already a CarbonIcon descriptor.\n * If true, the icon should be passed through unchanged (no-op).\n */\nexport function isCarbonIcon(icon: any): icon is CarbonIcon {\n return Boolean(\n icon &&\n typeof icon === 'object' &&\n 'elem' in icon &&\n 'attrs' in icon &&\n 'content' in icon &&\n icon.elem === 'svg'\n );\n}\n\n/**\n * Transforms a React icon component to CarbonIcon format.\n * Returns the icon unchanged if it's already a CarbonIcon (no-op).\n * Caches results to avoid repeated transformations.\n */\nexport function transformReactIconToCarbonIcon(\n icon: CarbonIcon | React.ComponentType<any>,\n size = 16\n): CarbonIcon {\n // No-op: If already a CarbonIcon, return unchanged\n if (isCarbonIcon(icon)) {\n return icon;\n }\n\n const ReactIcon = icon as React.ComponentType<any>;\n\n // Get or create size map for this component\n let sizeMap = iconCache.get(ReactIcon);\n if (!sizeMap) {\n sizeMap = new Map<number, CarbonIcon>();\n iconCache.set(ReactIcon, sizeMap);\n }\n\n // Return cached result if available for this size\n const cached = sizeMap.get(size);\n if (cached) {\n return cached;\n }\n\n try {\n // Call the React component to get the React element\n const element = React.createElement(ReactIcon, { size });\n\n // Extract CarbonIcon descriptor from React element\n const descriptor = extractCarbonIconFromReactElement(element, size);\n\n // Validate descriptor\n if (!isValidCarbonIcon(descriptor)) {\n throw new Error('Generated descriptor is invalid');\n }\n\n // Cache and return\n sizeMap.set(size, descriptor);\n return descriptor;\n } catch (error) {\n const iconName = ReactIcon.displayName || ReactIcon.name || 'Unknown';\n throw new Error(\n `Failed to transform React icon \"${iconName}\": ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n\n/**\n * Extracts CarbonIcon descriptor from a React element tree\n */\nfunction extractCarbonIconFromReactElement(\n element: React.ReactElement,\n size: number\n): CarbonIcon {\n // The element should be an SVG or Icon component\n // Navigate through forwardRef and other wrappers if needed\n let currentElement = element;\n\n // Handle forwardRef wrapper\n if (\n typeof currentElement.type === 'object' &&\n 'render' in currentElement.type\n ) {\n // This is a forwardRef, call the render function\n const renderFn = (currentElement.type as any).render;\n currentElement = renderFn(currentElement.props, null);\n }\n\n // Now we should have the actual Icon element\n const props = currentElement.props as any;\n\n if (!props) {\n throw new Error('Unable to extract props from React element');\n }\n\n // Extract SVG attributes from props\n const attrs: Record<string, string | number> = {\n xmlns: props.xmlns || 'http://www.w3.org/2000/svg',\n viewBox: props.viewBox || '0 0 32 32',\n fill: props.fill || 'currentColor',\n width: size,\n height: size,\n };\n\n // Extract children (paths, circles, etc.)\n const content: any[] = [];\n const children = React.Children.toArray(props.children);\n\n children.forEach((child) => {\n if (React.isValidElement(child)) {\n const childElement = child as React.ReactElement;\n const contentItem: any = {\n elem:\n typeof childElement.type === 'string' ? childElement.type : 'path',\n attrs: {},\n };\n\n // Copy all props as attributes\n if (childElement.props) {\n Object.entries(childElement.props).forEach(([key, value]) => {\n // Skip children and other React-specific props\n if (key !== 'children' && value !== undefined && value !== null) {\n contentItem.attrs[key] = value;\n }\n });\n }\n\n content.push(contentItem);\n }\n });\n\n return {\n elem: 'svg',\n attrs,\n content,\n name: extractIconName(props),\n size,\n };\n}\n\n/**\n * Validates that a descriptor has all required CarbonIcon fields\n */\nfunction isValidCarbonIcon(descriptor: any): descriptor is CarbonIcon {\n return (\n descriptor &&\n descriptor.elem === 'svg' &&\n descriptor.attrs &&\n typeof descriptor.attrs === 'object' &&\n Array.isArray(descriptor.content) &&\n descriptor.content.length > 0 &&\n typeof descriptor.name === 'string' &&\n typeof descriptor.size === 'number'\n );\n}\n\n/**\n * Attempts to extract icon name from props\n */\nfunction extractIconName(props: any): string {\n // Try various properties that might contain the icon name\n return props['data-icon-name'] || props['aria-label'] || props.name || 'icon';\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AAKH;AACA,MAAM,SAAS,GAAG,IAAI,OAAO,EAG1B;AAEH;;;AAGG;AACG,SAAU,YAAY,CAAC,IAAS,EAAA;IACpC,OAAO,OAAO,CACZ,IAAI;QACJ,OAAO,IAAI,KAAK,QAAQ;AACxB,QAAA,MAAM,IAAI,IAAI;AACd,QAAA,OAAO,IAAI,IAAI;AACf,QAAA,SAAS,IAAI,IAAI;AACjB,QAAA,IAAI,CAAC,IAAI,KAAK,KAAK,CACpB;AACH;AAEA;;;;AAIG;SACa,8BAA8B,CAC5C,IAA2C,EAC3C,IAAI,GAAG,EAAE,EAAA;;AAGT,IAAA,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE;AACtB,QAAA,OAAO,IAAI;IACb;IAEA,MAAM,SAAS,GAAG,IAAgC;;IAGlD,IAAI,OAAO,GAAG,SAAS,CAAC,GAAG,CA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AA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;QAC3B;AACF,IAAA,CAAC,CAAC;IAEF,OAAO;AACL,QAAA,IAAI,EAAE,KAAK;QACX,KAAK;QACL,OAAO;AACP,QAAA,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC;QAC5B,IAAI;KACL;AACH;AAEA;;AAEG;AACH,SAAS,iBAAiB,CAAC,UAAe,EAAA;AACxC,IAAA,QACE,UAAU;QACV,UAAU,CAAC,IAAI,KAAK,KAAK;AACzB,QAAA,UAAU,CAAC,KAAK;AAChB,QAAA,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ;AACpC,QAAA,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;AACjC,QAAA,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;AAC7B,QAAA,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AACnC,QAAA,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AAEvC;AAEA;;AAEG;AACH,SAAS,eAAe,CAAC,KAAU,EAAA;;AAEjC,IAAA,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,MAAM;AAC/E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtl-utils.js","sources":["../../../src/globals/utils/rtl-utils.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"rtl-utils.js","sources":["../../../src/globals/utils/rtl-utils.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Determines if the document is in RTL (right-to-left) mode.\n * Checks both document.dir and document.documentElement.dir for maximum compatibility.\n *\n * @returns true if the document is in RTL mode, false otherwise\n */\nexport function isDirectionRTL(): boolean {\n if (!document) {\n return false;\n }\n\n return document.dir === 'rtl' || document.documentElement.dir === 'rtl';\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;AAKG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,OAAO,QAAQ,CAAC,GAAG,KAAK,KAAK,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,KAAK,KAAK;AACzE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sources":["../../../src/globals/utils/uuid.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"uuid.js","sources":["../../../src/globals/utils/uuid.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Generates a v4 UUID. Uses `crypto.randomUUID` when available, otherwise falls back to a simple implementation.\n */\nfunction uuid(): string {\n if (\n typeof crypto !== 'undefined' &&\n typeof crypto.randomUUID === 'function'\n ) {\n return crypto.randomUUID();\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n (character) => {\n const random = (Math.random() * 16) | 0;\n const value = character === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n }\n );\n}\n\nexport { uuid };\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;AACH,SAAS,IAAI,GAAA;IACX,IACE,OAAO,MAAM,KAAK,WAAW;AAC7B,QAAA,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EACvC;AACA,QAAA,OAAO,MAAM,CAAC,UAAU,EAAE;IAC5B;IAEA,OAAO,sCAAsC,CAAC,OAAO,CACnD,OAAO,EACP,CAAC,SAAS,KAAI;AACZ,QAAA,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;AACvC,QAAA,MAAM,KAAK,GAAG,SAAS,KAAK,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,GAAG;AAC/D,QAAA,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3B,IAAA,CAAC,CACF;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-label-action-button.js","sources":["../../src/react/ai-label-action-button.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"ai-label-action-button.js","sources":["../../src/react/ai-label-action-button.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport '@carbon/web-components/es-custom/components/ai-label/ai-label-action-button.js';\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nconst AILabelActionButton = createComponent({\n tagName: 'cds-custom-ai-label-action-button',\n elementClass: HTMLElement,\n react: React,\n});\n\nexport default AILabelActionButton;\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAC1C,IAAA,OAAO,EAAE,4BAA4B;AACrC,IAAA,YAAY,EAAE,WAAW;AACzB,IAAA,KAAK,EAAE,KAAK;AACb,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio-player.js","sources":["../../src/react/audio-player.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"audio-player.js","sources":["../../src/react/audio-player.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport CDSAIChatAudioPlayer from '../components/audio-player/src/audio-player.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst AudioPlayer = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-audio-player',\n elementClass: CDSAIChatAudioPlayer,\n react: React,\n events: {\n onPlay: 'cds-custom-aichat-audio-player-play',\n onPause: 'cds-custom-aichat-audio-player-pause',\n onReady: 'cds-custom-aichat-audio-player-ready',\n onError: 'cds-custom-aichat-audio-player-error',\n },\n })\n);\n\nexport { AudioPlayer };\nexport default AudioPlayer;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,WAAW,GAAG,sBAAsB,CACxC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,MAAM,EAAE,8BAA8B;AACtC,QAAA,OAAO,EAAE,+BAA+B;AACxC,QAAA,OAAO,EAAE,+BAA+B;AACxC,QAAA,OAAO,EAAE,+BAA+B;AACzC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.js","sources":["../../src/react/autocomplete.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"autocomplete.js","sources":["../../src/react/autocomplete.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport AutocompleteElement from '../components/prompt-line/autocomplete/src/autocomplete.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\n// TODO: Icon transformation for suggestion items is handled upstream in prompt-line-shell.tsx.\n// When icon rendering is added to the autocomplete web component, no additional\n// React-side transformation is needed here.\nconst CDSAIChatAutocomplete = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-autocomplete',\n elementClass: AutocompleteElement,\n react: React,\n events: {\n onSelect: 'cds-custom-aichat-autocomplete-select',\n onSend: 'cds-custom-aichat-autocomplete-send',\n onDismiss: 'cds-custom-aichat-autocomplete-dismiss',\n },\n })\n);\n\nexport default CDSAIChatAutocomplete;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,sBAAsB,CAClD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,gCAAgC;AAC1C,QAAA,MAAM,EAAE,8BAA8B;AACtC,QAAA,SAAS,EAAE,iCAAiC;AAC7C,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sources":["../../src/react/card.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../src/react/card.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport CDSAIChatCard from '../components/card/src/card.js';\nimport CDSAIChatCardFooter from '../components/card/src/card-footer.js';\nimport CDSAIChatCardSteps from '../components/card/src/card-steps.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst Card = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-card',\n elementClass: CDSAIChatCard,\n react: React,\n })\n);\n\nconst CardFooter = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-card-footer',\n elementClass: CDSAIChatCardFooter,\n react: React,\n events: {\n onFooterAction: 'cds-custom-aichat-card-footer-action',\n },\n })\n);\n\nconst CardSteps = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-card-steps',\n elementClass: CDSAIChatCardSteps,\n react: React,\n })\n);\n\nexport { Card, CardFooter, CardSteps };\nexport default Card;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAWH,MAAM,IAAI,GAAG,sBAAsB,CACjC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,YAAY,EAAE,aAAa;AAC3B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;AAGJ,MAAM,UAAU,GAAG,sBAAsB,CACvC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,cAAc,EAAE,+BAA+B;AAChD,KAAA;AACF,CAAA,CAAC;AAGJ,MAAM,SAAS,GAAG,sBAAsB,CACtC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sources":["../../src/react/carousel.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"carousel.js","sources":["../../src/react/carousel.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport CDSAICarousel from '../components/carousel/src/carousel';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst Carousel = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-carousel',\n elementClass: CDSAICarousel,\n react: React,\n events: {\n onChange: 'cds-custom-aichat-carousel-onchange',\n },\n })\n);\n\nexport { Carousel };\nexport default Carousel;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,QAAQ,GAAG,sBAAsB,CACrC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,aAAa;AAC3B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,8BAA8B;AACzC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-of-thought-step.js","sources":["../../src/react/chain-of-thought-step.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"chain-of-thought-step.js","sources":["../../src/react/chain-of-thought-step.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nimport { CDSAIChatChainOfThoughtStep } from '../components/chain-of-thought/src/chain-of-thought-step.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst ChainOfThoughtStep = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-chain-of-thought-step',\n elementClass: CDSAIChatChainOfThoughtStep,\n react: React,\n events: {\n onBeforeToggle: 'chain-of-thought-step-beingtoggled',\n onToggle: 'chain-of-thought-step-toggled',\n },\n })\n);\n\nexport default ChainOfThoughtStep;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH,MAAM,kBAAkB,GAAG,sBAAsB,CAC/C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,kCAAkC;AAC3C,IAAA,YAAY,EAAE,2BAA2B;AACzC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,cAAc,EAAE,oCAAoC;AACpD,QAAA,QAAQ,EAAE,+BAA+B;AAC1C,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-of-thought-toggle.js","sources":["../../src/react/chain-of-thought-toggle.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"chain-of-thought-toggle.js","sources":["../../src/react/chain-of-thought-toggle.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nimport CDSAIChatChainOfThoughtToggle from '../components/chain-of-thought/src/chain-of-thought-toggle.js';\nimport { type ChainOfThoughtToggleEventDetail } from '../components/chain-of-thought/defs.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst ChainOfThoughtToggle = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-chain-of-thought-toggle',\n elementClass: CDSAIChatChainOfThoughtToggle,\n react: React,\n events: {\n onToggle: 'chain-of-thought-toggle',\n },\n })\n);\n\nexport type { ChainOfThoughtToggleEventDetail };\nexport default ChainOfThoughtToggle;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,oBAAoB,GAAG,sBAAsB,CACjD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,oCAAoC;AAC7C,IAAA,YAAY,EAAE,6BAA6B;AAC3C,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,yBAAyB;AACpC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-of-thought.js","sources":["../../src/react/chain-of-thought.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"chain-of-thought.js","sources":["../../src/react/chain-of-thought.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nimport CDSAIChatChainOfThought from '../components/chain-of-thought/src/chain-of-thought.js';\nimport {\n type ChainOfThoughtOnToggle,\n ChainOfThoughtStepStatus,\n type ChainOfThoughtStepToggleEventDetail,\n type ChainOfThoughtToggleEventDetail,\n} from '../components/chain-of-thought/defs.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst ChainOfThought = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-chain-of-thought',\n elementClass: CDSAIChatChainOfThought,\n react: React,\n events: {\n onToggle: 'chain-of-thought-toggled',\n onStepToggle: 'chain-of-thought-step-toggled',\n },\n })\n);\n\nexport type {\n ChainOfThoughtOnToggle,\n ChainOfThoughtStepToggleEventDetail,\n ChainOfThoughtToggleEventDetail,\n};\nexport { ChainOfThoughtStepStatus };\nexport default ChainOfThought;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,6BAA6B;AACtC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,0BAA0B;AACpC,QAAA,YAAY,EAAE,+BAA+B;AAC9C,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 2025, 2026
|
|
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 React from 'react';
|
|
10
|
+
declare const ChatButtonSkeleton: React.ComponentType<any>;
|
|
11
|
+
export default ChatButtonSkeleton;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { createComponent } from '@lit/react';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { withWebComponentBridge } from './utils/withWebComponentBridge.js';
|
|
11
|
+
import CDSAIChatButtonSkeleton from '../components/chat-button/src/chat-button-skeleton.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @license
|
|
15
|
+
*
|
|
16
|
+
* Copyright IBM Corp. 2025, 2026
|
|
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
|
+
const ChatButtonSkeleton = withWebComponentBridge(createComponent({
|
|
22
|
+
tagName: 'cds-custom-aichat-button-skeleton',
|
|
23
|
+
elementClass: CDSAIChatButtonSkeleton,
|
|
24
|
+
react: React,
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export { ChatButtonSkeleton as default };
|
|
28
|
+
//# sourceMappingURL=chat-button-skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-button-skeleton.js","sources":["../../src/react/chat-button-skeleton.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\nimport CDSAIChatButtonSkeleton from '../components/chat-button/src/chat-button-skeleton.js';\n\nconst ChatButtonSkeleton = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-button-skeleton',\n elementClass: CDSAIChatButtonSkeleton,\n react: React,\n })\n);\n\nexport default ChatButtonSkeleton;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,kBAAkB,GAAG,sBAAsB,CAC/C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,4BAA4B;AACrC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-button.js","sources":["../../src/react/chat-button.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"chat-button.js","sources":["../../src/react/chat-button.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport AIChatButton, {\n CHAT_BUTTON_KIND,\n CHAT_BUTTON_TYPE,\n CHAT_BUTTON_SIZE,\n CHAT_BUTTON_TOOLTIP_ALIGNMENT,\n CHAT_BUTTON_TOOLTIP_POSITION,\n} from '../components/chat-button/src/chat-button.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst ChatButton = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-button',\n elementClass: AIChatButton,\n react: React,\n })\n);\n\nexport default ChatButton;\nexport {\n CHAT_BUTTON_KIND,\n CHAT_BUTTON_TYPE,\n CHAT_BUTTON_SIZE,\n CHAT_BUTTON_TOOLTIP_ALIGNMENT,\n CHAT_BUTTON_TOOLTIP_POSITION,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAeH,MAAM,UAAU,GAAG,sBAAsB,CACvC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,YAAY,EAAE,YAAY;AAC1B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|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EAAA,EACb,GAAG,EAAE,GAAG,EACR,kBAAkB,EAAE,6BAA6B,EACjD,sBAAsB,EAAE,iCAAiC,EACzD,OAAO,EAAE,kBAAkB,EAAA,GACvB,SAAS,EAAA,CACb;AAEN,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,YAAY
|
|
1
|
+
{"version":3,"file":"chat-header.js","sources":["../../src/react/chat-header.tsx"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CdsAiChatChatHeader from '../components/chat-shell/src/chat-header.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\nimport { transformReactIconToCarbonIcon } from '../globals/utils/iconTransform.js';\nimport type { ToolbarAction } from './toolbar.js';\n\nexport interface ChatHeaderProps {\n /** Array of actions that can overflow into a menu when space is limited. */\n actions?: ToolbarAction[];\n\n /** Enable overflow behavior for actions. */\n overflow?: boolean;\n\n /** Optional header title text to display. */\n headerTitle?: string;\n\n /** Optional name text to display after the title. */\n headerName?: string;\n\n /** Type of navigation to display: 'back', 'overflow', or 'none'. */\n navigationType?: 'back' | 'overflow' | 'none';\n\n /** Icon for the back button (CarbonIcon object). */\n navigationBackIcon?: any;\n\n /** Label/tooltip text for the back button. */\n navigationBackLabel?: string;\n\n /** Click handler for the back button. */\n navigationBackOnClick?: () => void;\n\n /** Array of overflow menu items with text and onClick handlers. */\n navigationOverflowItems?: Array<{\n text: string;\n onClick?: () => void;\n href?: string;\n target?: string;\n disabled?: boolean;\n testId?: string;\n }>;\n\n /** Label/tooltip text for the overflow menu button. */\n navigationOverflowLabel?: string;\n\n /** ARIA label for the overflow menu. */\n navigationOverflowAriaLabel?: string;\n\n /** Click handler for when the overflow menu button is clicked (menu opened). */\n navigationOverflowOnClick?: () => void;\n}\n\n/**\n * Extended interface that includes the imperative handle methods.\n * Use with React.useRef<ChatHeaderHandle>() to access focus management.\n *\n * @example\n * ```tsx\n * const headerRef = useRef<ChatHeaderHandle>(null);\n *\n * const handleFocusRequest = () => {\n * const focused = headerRef.current?.requestFocus();\n * if (!focused) {\n * // Try focusing somewhere else, like the input field\n * inputRef.current?.focus();\n * }\n * };\n * ```\n */\nexport interface ChatHeaderHandle {\n /**\n * Requests focus on the best available focusable element within the component.\n * Returns true if focus was successfully set, false otherwise.\n *\n * Priority order:\n * 1. First enabled button in fixed-actions slot (usually close button)\n * 2. First enabled button in navigation slot (back button or overflow menu)\n * 3. First enabled action button from actions array\n * 4. Any other focusable element\n */\n requestFocus(): boolean;\n}\n\n// Base chat header component from @lit/react\nconst BaseChatHeader = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-chat-header',\n elementClass: CdsAiChatChatHeader,\n react: React,\n })\n);\n\n/**\n * ChatHeader component with automatic icon transformation support.\n *\n * Accepts navigation icons as either CarbonIcon objects or React icon components from @carbon/icons-react.\n * React icons are automatically transformed to the CarbonIcon format expected by the web component.\n */\nconst ChatHeader = React.forwardRef<any, any>((props, ref) => {\n const { navigationBackIcon, navigationOverflowIcon, actions, ...restProps } =\n props;\n\n // Transform navigation icons if they're React components\n const transformedNavigationBackIcon = React.useMemo(() => {\n return navigationBackIcon\n ? transformReactIconToCarbonIcon(navigationBackIcon, 16)\n : undefined;\n }, [navigationBackIcon]);\n\n const transformedNavigationOverflowIcon = React.useMemo(() => {\n return navigationOverflowIcon\n ? transformReactIconToCarbonIcon(navigationOverflowIcon, 16)\n : undefined;\n }, [navigationOverflowIcon]);\n\n // Transform action icons if actions are provided\n const transformedActions = React.useMemo(() => {\n if (!actions) {\n return undefined;\n }\n\n return actions.map((action: ToolbarAction) => ({\n ...action,\n icon: transformReactIconToCarbonIcon(action.icon, 16),\n }));\n }, [actions]);\n\n return (\n <BaseChatHeader\n ref={ref}\n navigationBackIcon={transformedNavigationBackIcon}\n navigationOverflowIcon={transformedNavigationOverflowIcon}\n actions={transformed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G,EAAE,GAAG,EACR,kBAAkB,EAAE,6BAA6B,EACjD,sBAAsB,EAAE,iCAAiC,EACzD,OAAO,EAAE,kBAAkB,EAAA,GACvB,SAAS,EAAA,CACb;AAEN,CAAC;AAED,UAAU,CAAC,WAAW,GAAG,YAAY;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-shell.js","sources":["../../src/react/chat-shell.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"chat-shell.js","sources":["../../src/react/chat-shell.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSChatShellElement from '../components/chat-shell/src/shell.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatShell = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-shell',\n elementClass: CDSChatShellElement,\n react: React,\n })\n);\n\nexport default CDSAIChatShell;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -22,7 +22,7 @@ export interface ReactAction {
|
|
|
22
22
|
* @example
|
|
23
23
|
* ```tsx
|
|
24
24
|
* import { Download } from '@carbon/icons-react';
|
|
25
|
-
* import CodeSnippet from '@carbon/ai-chat-components/react/code-snippet';
|
|
25
|
+
* import CodeSnippet from '@carbon/ai-chat-components/es/react/code-snippet.js';
|
|
26
26
|
*
|
|
27
27
|
* const actions = [
|
|
28
28
|
* { text: 'Download', icon: Download, onClick: () => console.log('Download') }
|
|
@@ -30,7 +30,7 @@ const BaseCodeSnippet = withWebComponentBridge(createComponent({
|
|
|
30
30
|
* @example
|
|
31
31
|
* ```tsx
|
|
32
32
|
* import { Download } from '@carbon/icons-react';
|
|
33
|
-
* import CodeSnippet from '@carbon/ai-chat-components/react/code-snippet';
|
|
33
|
+
* import CodeSnippet from '@carbon/ai-chat-components/es/react/code-snippet.js';
|
|
34
34
|
*
|
|
35
35
|
* const actions = [
|
|
36
36
|
* { text: 'Download', icon: Download, onClick: () => console.log('Download') }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-snippet.js","sources":["../../src/react/code-snippet.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"code-snippet.js","sources":["../../src/react/code-snippet.tsx"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport { CarbonIcon } from '@carbon/web-components/es-custom/globals/internal/icon-loader-utils.js';\nimport { BUTTON_SIZE } from '@carbon/web-components/es-custom/components/button/defs.js';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport CDSAIChatCodeSnippet from '../components/code-snippet/src/code-snippet.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\nimport { transformReactIconToCarbonIcon } from '../globals/utils/iconTransform.js';\n\n// Re-export the Action interface from the web component\nexport type { Action } from '../components/code-snippet/src/code-snippet.js';\n\n/**\n * React-specific Action interface that accepts both CarbonIcon and React icon components.\n * This allows React developers to use @carbon/icons-react directly.\n */\nexport interface ReactAction {\n text: string;\n icon: CarbonIcon | React.ComponentType<any>;\n size?: BUTTON_SIZE;\n fixed?: boolean;\n onClick: () => void;\n}\n\n// Base code snippet component from @lit/react\nconst BaseCodeSnippet = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-code-snippet',\n elementClass: CDSAIChatCodeSnippet,\n react: React,\n events: {\n onChange: 'content-change',\n },\n })\n);\n\n/**\n * CodeSnippet component with automatic icon transformation support.\n *\n * Accepts actions with either CarbonIcon objects or React icon components from @carbon/icons-react.\n * React icons are automatically transformed to the CarbonIcon format expected by the web component.\n *\n * @example\n * ```tsx\n * import { Download } from '@carbon/icons-react';\n * import CodeSnippet from '@carbon/ai-chat-components/es/react/code-snippet.js';\n *\n * const actions = [\n * { text: 'Download', icon: Download, onClick: () => console.log('Download') }\n * ];\n *\n * <CodeSnippet language=\"typescript\" highlight actions={actions} overflow>\n * {code}\n * </CodeSnippet>\n * ```\n */\nconst CodeSnippet = React.forwardRef<any, any>((props, ref) => {\n const { actions, children, ...restProps } = props;\n\n // Transform action icons if actions are provided\n const transformedActions = React.useMemo(() => {\n if (!actions || !Array.isArray(actions)) {\n return [];\n }\n\n return actions.map((action: ReactAction) => ({\n ...action,\n icon: transformReactIconToCarbonIcon(action.icon, 16),\n }));\n }, [actions]);\n\n // Separate slotted children from default content\n const { slottedChildren, defaultChildren } = React.useMemo(() => {\n const slotted: Record<string, React.ReactNode[]> = {};\n const defaultContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (React.isValidElement(child)) {\n const childProps = child.props as any;\n if (childProps.slot) {\n const slotName = childProps.slot as string;\n if (!slotted[slotName]) {\n slotted[slotName] = [];\n }\n // Clone the element without the slot prop to avoid React warnings\n const { slot: _slot, ...restChildProps } = childProps;\n slotted[slotName].push(React.cloneElement(child, restChildProps));\n } else {\n defaultContent.push(child);\n }\n } else {\n defaultContent.push(child);\n }\n });\n\n return { slottedChildren: slotted, defaultChildren: defaultContent };\n }, [children]);\n\n return (\n <BaseCodeSnippet ref={ref} actions={transformedActions} {...restProps}>\n {Object.entries(slottedChildren).map(([slotName, nodes]) => (\n <div key={slotName} slot={slotName}>\n {nodes}\n </div>\n ))}\n {defaultChildren}\n </BaseCodeSnippet>\n );\n});\n\nCodeSnippet.displayName = 'CodeSnippet';\n\nexport default CodeSnippet;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;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AU,CAAC,IAAc;AAC1C,oBAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AACtB,wBAAA,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACxB;;oBAEA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,GAAG,UAAU;AACrD,oBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;gBACnE;qBAAO;AACL,oBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B;YACF;iBAAO;AACL,gBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5B;AACF,QAAA,CAAC,CAAC;QAEF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE;AACtE,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEd,QACEA,KAAC,eAAe,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,KAAM,SAAS,EAAA,QAAA,EAAA,CAClE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,MACrDC,GAAA,CAAA,KAAA,EAAA,EAAoB,IAAI,EAAE,QAAQ,YAC/B,KAAK,EAAA,EADE,QAAQ,CAEZ,CACP,CAAC,EACD,eAAe,CAAA,EAAA,CACA;AAEtB,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message.js","sources":["../../src/react/error-message.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"error-message.js","sources":["../../src/react/error-message.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport ErrorMessage from '../components/prompt-line/src/error-message.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatErrorMessage = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-error-message',\n elementClass: ErrorMessage,\n react: React,\n })\n);\n\nexport default CDSAIChatErrorMessage;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,qBAAqB,GAAG,sBAAsB,CAClD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,YAAY;AAC1B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-buttons.js","sources":["../../src/react/feedback-buttons.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"feedback-buttons.js","sources":["../../src/react/feedback-buttons.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nimport CDSAIChatFeedbackButtons from '../components/feedback/src/feedback-buttons.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst FeedbackButtons = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-feedback-buttons',\n elementClass: CDSAIChatFeedbackButtons,\n react: React,\n events: {\n onClick: 'feedback-buttons-click',\n },\n })\n);\n\nexport default FeedbackButtons;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH,MAAM,eAAe,GAAG,sBAAsB,CAC5C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,6BAA6B;AACtC,IAAA,YAAY,EAAE,wBAAwB;AACtC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,wBAAwB;AAClC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.js","sources":["../../src/react/feedback.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"feedback.js","sources":["../../src/react/feedback.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\n\nimport CDSAIChatFeedbackElement from '../components/feedback/src/feedback.js';\nimport {\n type FeedbackInitialValues,\n type FeedbackSubmitDetails,\n} from '../components/feedback/src/feedback.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst Feedback = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-feedback',\n elementClass: CDSAIChatFeedbackElement,\n react: React,\n events: {\n onClose: 'feedback-close',\n onSubmit: 'feedback-submit',\n },\n })\n);\n\nexport type { FeedbackInitialValues, FeedbackSubmitDetails };\nexport default Feedback;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAYH,MAAM,QAAQ,GAAG,sBAAsB,CACrC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,wBAAwB;AACtC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,gBAAgB;AACzB,QAAA,QAAQ,EAAE,iBAAiB;AAC5B,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-item.js","sources":["../../src/react/file-upload-item.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"file-upload-item.js","sources":["../../src/react/file-upload-item.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport FileUploadItemElement from '../components/file-uploads/src/file-upload-item.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatFileUploadItem = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-file-upload-item',\n elementClass: FileUploadItemElement,\n react: React,\n events: {\n onFileRemove: 'cds-custom-aichat-file-remove',\n },\n })\n);\n\nexport default CDSAIChatFileUploadItem;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,uBAAuB,GAAG,sBAAsB,CACpD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,6BAA6B;AACtC,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,YAAY,EAAE,wBAAwB;AACvC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-uploads.js","sources":["../../src/react/file-uploads.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"file-uploads.js","sources":["../../src/react/file-uploads.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport FileUploadsElement from '../components/file-uploads/src/file-uploads.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatFileUploads = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-file-uploads',\n elementClass: FileUploadsElement,\n react: React,\n events: {\n onFileRemove: 'cds-custom-aichat-file-remove',\n },\n })\n);\n\nexport default CDSAIChatFileUploads;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,oBAAoB,GAAG,sBAAsB,CACjD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,YAAY,EAAE,wBAAwB;AACvC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-content.js","sources":["../../../src/react/history/history-content.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-content.js","sources":["../../../src/react/history/history-content.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryContent from '../../components/chat-history/src/history-content.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryContent = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-content',\n elementClass: CDSAIChatHistoryContent,\n react: React,\n })\n);\n\nexport default HistoryContent;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,4BAA4B;AACrC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-delete-panel.js","sources":["../../../src/react/history/history-delete-panel.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-delete-panel.js","sources":["../../../src/react/history/history-delete-panel.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryDeletePanel from '../../components/chat-history/src/history-delete-panel.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryDeletePanel = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-delete-panel',\n elementClass: CDSAIChatHistoryDeletePanel,\n react: React,\n events: {\n onCancel: 'history-delete-cancel',\n onConfirm: 'history-delete-confirm',\n },\n })\n);\n\nexport default HistoryDeletePanel;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,kBAAkB,GAAG,sBAAsB,CAC/C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,iCAAiC;AAC1C,IAAA,YAAY,EAAE,2BAA2B;AACzC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,uBAAuB;AACjC,QAAA,SAAS,EAAE,wBAAwB;AACpC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-header.js","sources":["../../../src/react/history/history-header.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-header.js","sources":["../../../src/react/history/history-header.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryHeader from '../../components/chat-history/src/history-header.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryHeader = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-header',\n elementClass: CDSAIChatHistoryHeader,\n react: React,\n events: {\n onClose: 'history-header-close-click',\n },\n })\n);\n\nexport default HistoryHeader;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,aAAa,GAAG,sBAAsB,CAC1C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,2BAA2B;AACpC,IAAA,YAAY,EAAE,sBAAsB;AACpC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,OAAO,EAAE,4BAA4B;AACtC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-loading.js","sources":["../../../src/react/history/history-loading.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-loading.js","sources":["../../../src/react/history/history-loading.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryLoading from '../../components/chat-history/src/history-loading.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryLoading = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-loading',\n elementClass: CDSAIChatHistoryLoading,\n react: React,\n })\n);\n\nexport default HistoryLoading;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,4BAA4B;AACrC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-panel-item-input.js","sources":["../../../src/react/history/history-panel-item-input.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-panel-item-input.js","sources":["../../../src/react/history/history-panel-item-input.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryPanelItemInput from '../../components/chat-history/src/history-panel-item-input.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryPanelItemInput = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-panel-item-input',\n elementClass: CDSAIChatHistoryPanelItemInput,\n react: React,\n events: {\n onChange: 'history-panel-item-input-change',\n onCancel: 'history-panel-item-input-cancel',\n onSave: 'history-panel-item-input-save',\n },\n })\n);\n\nexport default HistoryPanelItemInput;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,qBAAqB,GAAG,sBAAsB,CAClD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,qCAAqC;AAC9C,IAAA,YAAY,EAAE,8BAA8B;AAC5C,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,iCAAiC;AAC3C,QAAA,QAAQ,EAAE,iCAAiC;AAC3C,QAAA,MAAM,EAAE,+BAA+B;AACxC,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-panel-item.js","sources":["../../../src/react/history/history-panel-item.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-panel-item.js","sources":["../../../src/react/history/history-panel-item.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryPanelItem from '../../components/chat-history/src/history-panel-item.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryPanelItem = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-panel-item',\n elementClass: CDSAIChatHistoryPanelItem,\n react: React,\n events: {\n onMenuAction: 'history-item-menu-action',\n onSelected: 'history-item-selected',\n onRenameCancel: 'history-panel-item-input-cancel',\n onRenameSave: 'history-panel-item-input-save',\n onRenameChange: 'history-panel-item-input-change',\n },\n })\n);\n\nexport default HistoryPanelItem;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,gBAAgB,GAAG,sBAAsB,CAC7C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,+BAA+B;AACxC,IAAA,YAAY,EAAE,yBAAyB;AACvC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,YAAY,EAAE,0BAA0B;AACxC,QAAA,UAAU,EAAE,uBAAuB;AACnC,QAAA,cAAc,EAAE,iCAAiC;AACjD,QAAA,YAAY,EAAE,+BAA+B;AAC7C,QAAA,cAAc,EAAE,iCAAiC;AAClD,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-panel-items.js","sources":["../../../src/react/history/history-panel-items.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-panel-items.js","sources":["../../../src/react/history/history-panel-items.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryPanelItems from '../../components/chat-history/src/history-panel-items.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryPanelItems = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-panel-items',\n elementClass: CDSAIChatHistoryPanelItems,\n react: React,\n })\n);\n\nexport default HistoryPanelItems;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,iBAAiB,GAAG,sBAAsB,CAC9C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-panel-menu.js","sources":["../../../src/react/history/history-panel-menu.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-panel-menu.js","sources":["../../../src/react/history/history-panel-menu.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryPanelMenu from '../../components/chat-history/src/history-panel-menu.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryPanelMenu = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-panel-menu',\n elementClass: CDSAIChatHistoryPanelMenu,\n react: React,\n })\n);\n\nexport default HistoryPanelMenu;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,gBAAgB,GAAG,sBAAsB,CAC7C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,+BAA+B;AACxC,IAAA,YAAY,EAAE,yBAAyB;AACvC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-panel.js","sources":["../../../src/react/history/history-panel.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-panel.js","sources":["../../../src/react/history/history-panel.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryPanel from '../../components/chat-history/src/history-panel.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryPanel = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-panel',\n elementClass: CDSAIChatHistoryPanel,\n react: React,\n })\n);\n\nexport default HistoryPanel;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,YAAY,GAAG,sBAAsB,CACzC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-search-item.js","sources":["../../../src/react/history/history-search-item.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-search-item.js","sources":["../../../src/react/history/history-search-item.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistorySearchItem from '../../components/chat-history/src/history-search-item.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistorySearchItem = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-search-item',\n elementClass: CDSAIChatHistorySearchItem,\n react: React,\n events: {\n onSelected: 'history-search-item-selected',\n },\n })\n);\n\nexport default HistorySearchItem;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,iBAAiB,GAAG,sBAAsB,CAC9C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,gCAAgC;AACzC,IAAA,YAAY,EAAE,0BAA0B;AACxC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,UAAU,EAAE,8BAA8B;AAC3C,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-shell.js","sources":["../../../src/react/history/history-shell.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-shell.js","sources":["../../../src/react/history/history-shell.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryShell from '../../components/chat-history/src/history-shell.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryShell = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-shell',\n elementClass: CDSAIChatHistoryShell,\n react: React,\n })\n);\n\nexport default HistoryShell;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,YAAY,GAAG,sBAAsB,CACzC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,0BAA0B;AACnC,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history-toolbar.js","sources":["../../../src/react/history/history-toolbar.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"history-toolbar.js","sources":["../../../src/react/history/history-toolbar.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport CDSAIChatHistoryToolbar from '../../components/chat-history/src/history-toolbar.js';\nimport { withWebComponentBridge } from '../utils/withWebComponentBridge.js';\n\nconst HistoryToolbar = withWebComponentBridge(\n createComponent({\n tagName: 'cds-custom-aichat-history-toolbar',\n elementClass: CDSAIChatHistoryToolbar,\n react: React,\n events: {\n onSearchInput: 'cds-custom-search-input',\n onNewChatClick: 'chat-history-new-chat-click',\n },\n })\n);\n\nexport default HistoryToolbar;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,4BAA4B;AACrC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,aAAa,EAAE,kBAAkB;AACjC,QAAA,cAAc,EAAE,6BAA6B;AAC9C,KAAA;AACF,CAAA,CAAC;;"}
|