@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":"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,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,CAAC;AAExE,YAAA,CAAC,CAAC;YACF,IAAI,eAAe,EAAE;gBACnB,aAAa,GAAG,eAAe;gBAC/B;YACF;QACF;;AAGA,QAAA,MAAM,UAAU,GAAI,aAAqB,CAAC,UAAU;AACpD,QAAA,IAAI,UAAU,EAAE,aAAa,EAAE;AAC7B,YAAA,aAAa,GAAG,UAAU,CAAC,aAAa;YACxC;QACF;;QAGA;IACF;AAEA,IAAA,OAAO,aAAa;AACtB;AAEA;;;;;;AAMG;AACH,SAAS,kBAAkB,CACzB,OAAgB,EAChB,aAAuB,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAA;IA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;AAEjD,IAAA,KAAK,MAAM,WAAW,IAAI,MAAM,EAAE;QAChC,IAAI,CAAC,mBAAmB,EAAE;YACxB,mBAAmB,GAAG,WAAW;QACnC;QACA,kBAAkB,GAAG,WAAW;IAClC;AAEA,IAAA,OAAO,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;AAClD;AAEA;;;;;;;;;;AAUG;AACH,SAAS,wBAAwB,CAC/B,UAA8D,EAC9D,QAAgB,EAAA;IAEhB,qBAAqB,CAAC,MAAK;QACzB,qBAAqB,CAAC,MAAK;YACzB,MAAM,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC7C,YAAA,IAAI,EAAE,EAAE,YAAY,WAAW,CAAC,EAAE;gBAChC;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,GA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,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
|
+
{"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/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,Y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/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/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-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-aichat-audio-player',\n elementClass: CDSAIChatAudioPlayer,\n react: React,\n events: {\n onPlay: 'cds-aichat-audio-player-play',\n onPause: 'cds-aichat-audio-player-pause',\n onReady: 'cds-aichat-audio-player-ready',\n onError: 'cds-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-aichat-autocomplete',\n elementClass: AutocompleteElement,\n react: React,\n events: {\n onSelect: 'cds-aichat-autocomplete-select',\n onSend: 'cds-aichat-autocomplete-send',\n onDismiss: 'cds-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;;"}
|
package/es/react/card.js.map
CHANGED
|
@@ -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-aichat-card',\n elementClass: CDSAIChatCard,\n react: React,\n })\n);\n\nconst CardFooter = withWebComponentBridge(\n createComponent({\n tagName: 'cds-aichat-card-footer',\n elementClass: CDSAIChatCardFooter,\n react: React,\n events: {\n onFooterAction: 'cds-aichat-card-footer-action',\n },\n })\n);\n\nconst CardSteps = withWebComponentBridge(\n createComponent({\n tagName: 'cds-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;;"}
|
package/es/react/carousel.js.map
CHANGED
|
@@ -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-aichat-carousel',\n elementClass: CDSAICarousel,\n react: React,\n events: {\n onChange: 'cds-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-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-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-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-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-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-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;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-header.js","sources":["../../src/react/chat-header.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AA4FA;AACA,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC,CACH;AAED;;;;;AAKG;AACH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAW,CAAC,KAAK,EAAE,GAAG,KAAI;AAC3D,IAAA,MAAM,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GACzE,KAAK;;AAGP,IAAA,MAAM,6BAA6B,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AACvD,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,kBAAkB,EAAE,EAAE;cACrD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAExB,IAAA,MAAM,iCAAiC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AAC3D,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,sBAAsB,EAAE,EAAE;cACzD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC;;AAG5B,IAAA,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;QAC5C,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,SAAS;QAClB;QAEA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAqB,MAAM;AAC7C,YAAA,GAAG,MAAM;YACT,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,SAAA,CAAC,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,QACEA,IAAC,cAAc,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-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={transformedActions}\n {...restProps}\n />\n );\n});\n\nChatHeader.displayName = 'ChatHeader';\n\nexport default ChatHeader;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;;AA4FA;AACA,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC,CACH;AAED;;;;;AAKG;AACH,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAW,CAAC,KAAK,EAAE,GAAG,KAAI;AAC3D,IAAA,MAAM,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GACzE,KAAK;;AAGP,IAAA,MAAM,6BAA6B,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AACvD,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,kBAAkB,EAAE,EAAE;cACrD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAExB,IAAA,MAAM,iCAAiC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;AAC3D,QAAA,OAAO;AACL,cAAE,8BAA8B,CAAC,sBAAsB,EAAE,EAAE;cACzD,SAAS;AACf,IAAA,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC;;AAG5B,IAAA,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;QAC5C,IAAI,CAAC,OAAO,EAAE;AACZ,YAAA,OAAO,SAAS;QAClB;QAEA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAqB,MAAM;AAC7C,YAAA,GAAG,MAAM;YACT,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,SAAA,CAAC,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAEb,QACEA,IAAC,cAAc,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 +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-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') }
|
package/es/react/code-snippet.js
CHANGED
|
@@ -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/globals/internal/icon-loader-utils.js';\nimport { BUTTON_SIZE } from '@carbon/web-components/es/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-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":";;;;;;;;;;;;;;AAkCA;AACA,MAAM,eAAe,GAAG,sBAAsB,CAC5C,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,yBAAyB;AAClC,IAAA,YAAY,EAAE,oBAAoB;AAClC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,gBAAgB;AAC3B,KAAA;AACF,CAAA,CAAC,CACH;AAED;;;;;;;;;;;;;;;;;;;AAmBG;AACH,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAAW,CAAC,KAAK,EAAE,GAAG,KAAI;IAC5D,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;;AAGjD,IAAA,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAK;QAC5C,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;AACvC,YAAA,OAAO,EAAE;QACX;QAEA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAmB,MAAM;AAC3C,YAAA,GAAG,MAAM;YACT,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;AACtD,SAAA,CAAC,CAAC;AACL,IAAA,CAAC,EAAE,CAAC,O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,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-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-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;;"}
|
package/es/react/feedback.js.map
CHANGED
|
@@ -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-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-aichat-file-upload-item',\n elementClass: FileUploadItemElement,\n react: React,\n events: {\n onFileRemove: 'cds-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-aichat-file-uploads',\n elementClass: FileUploadsElement,\n react: React,\n events: {\n onFileRemove: 'cds-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-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-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-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-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-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-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-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-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-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-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-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-aichat-history-toolbar',\n elementClass: CDSAIChatHistoryToolbar,\n react: React,\n events: {\n onSearchInput: 'cds-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;;"}
|
|
@@ -9,7 +9,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import CDSAIChatAutocomplete from '../autocomplete.js';
|
|
12
|
-
import { AutocompleteController } from '../../components/prompt-line/src/autocomplete-controller.js';
|
|
12
|
+
import { AutocompleteController, itemsToGroups } from '../../components/prompt-line/src/autocomplete-controller.js';
|
|
13
13
|
|
|
14
14
|
function useChatAutocomplete(options) {
|
|
15
15
|
const { mention, command, autocomplete, starters, promptLineRef, isSendDisabled, onStarterSelected, onSelectItem, onSendItem, attached = true, maxHeight, } = options;
|
|
@@ -106,6 +106,7 @@ function useChatAutocomplete(options) {
|
|
|
106
106
|
if (!state.trigger || state.items.length === 0) {
|
|
107
107
|
return null;
|
|
108
108
|
}
|
|
109
|
+
const { items: flatItems, groups } = itemsToGroups(state.items);
|
|
109
110
|
if (state.renderCustomList) {
|
|
110
111
|
const result = state.renderCustomList({
|
|
111
112
|
items: state.items,
|
|
@@ -120,9 +121,9 @@ function useChatAutocomplete(options) {
|
|
|
120
121
|
if (result instanceof HTMLElement) {
|
|
121
122
|
return (jsx(CustomElementHost, { slot: "autocomplete-content", element: result, onMount: setListElement, onMousedown: handleContainerMousedown }));
|
|
122
123
|
}
|
|
123
|
-
return (jsx(CustomReactNodePortal, { slot: "autocomplete-content", node: result, onMount: setListElement, onMousedown:
|
|
124
|
+
return (jsx(CustomReactNodePortal, { slot: "autocomplete-content", node: result, onMount: setListElement, onMousedown: handleContainerMousedown }));
|
|
124
125
|
}
|
|
125
|
-
return (jsx(CDSAIChatAutocomplete, { ref: setListElement, slot: "autocomplete-content", items:
|
|
126
|
+
return (jsx(CDSAIChatAutocomplete, { ref: setListElement, slot: "autocomplete-content", items: flatItems, groups: groups, attached: attached, disableDirectSend: state.disableDirectSend, onDismiss: dismiss, onSelect: (e) => handleSelect(e.detail.item), onSend: (e) => handleSend(e.detail?.text) }));
|
|
126
127
|
}, [
|
|
127
128
|
state,
|
|
128
129
|
handleSelect,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatAutocomplete.js","sources":["../../../src/react/hooks/useChatAutocomplete.tsx"],"sourcesContent":[null],"names":["_jsx","Autocomplete"],"mappings":";;;;;;;;;;;;;AA2EM,SAAU,mBAAmB,CACjC,OAAmC,EAAA;IAEnC,MAAM,EACJ,OAAO,EACP,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,QAAQ,GAAG,IAAI,EACf,SAAS,GACV,GAAG,OAAO;IAEX,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA8B;AACpE,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,KAAK,EAAE,EAAE;AACV,KAAA,CAAC;;;IAIF,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAgC,IAAI,CAAC;;;I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Q,CAAC;QACrC,IAAI,WAAW,EAAE;AACf,YAAA,MAAM,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC;QACnD;AACA,QAAA,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC;QAE/B,cAAc,CAAC,MAAM,CAAC;AACtB,QAAA,OAAO,MAAK;AACV,YAAA,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;AACf,gBAAA,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,WAAW,CAAC;YACtD;YACA,MAAM,CAAC,MAAM,EAAE;YACf,MAAM,CAAC,MAAM,EAAE;YACf,cAAc,CAAC,IAAI,CAAC;AACtB,QAAA,CAAC;;;;;IAKH,CAAC,EAAE,EAAE,CAAC;;;;;;;;AASN,IAAA,KAAK,CAAC,SAAS,CAAC,MAAK;QACnB,IAAI,CAAC,WAAW,EAAE;YAChB;QACF;AACA,QAAA,MAAM,KAAK,GAAG,WAAW,CAAC,iBAAuC;AACjE,QAAA,OAAO,GAAG,KAAK,IAAI,WAAW,CAAC;AACjC,IAAA,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAE1B,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAK,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAA,QAAA,EAC/B,WAAW,GAAG,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,IAAI,EAAA,CAC1D;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"useChatAutocomplete.js","sources":["../../../src/react/hooks/useChatAutocomplete.tsx"],"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\n/**\n * React hook for the chat-input autocomplete overlay. Thin wrapper around\n * the framework-agnostic `AutocompleteController` co-located in\n * [../../components/prompt-line/src/autocomplete-controller.ts] (which also exports\n * the `<cds-aichat-autocomplete-controller>` element). The controller owns\n * trigger handling, async resolution, and selection routing; this hook\n * adapts those callbacks into React state and returns a JSX node to slot\n * into `<PromptLineShell>`.\n */\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport type { JSX, ReactNode, RefObject } from 'react';\n\nimport Autocomplete from '../autocomplete.js';\nimport type PromptLineElement from '../../components/prompt-line/src/prompt-line.js';\nimport {\n AutocompleteController,\n itemsToGroups,\n type AutocompleteControllerState,\n} from '../../components/prompt-line/src/autocomplete-controller.js';\nimport type {\n AutocompleteConfig,\n StartersConfig,\n SuggestionItem,\n TriggerChangeEventDetail,\n TriggerSuggestionConfig,\n} from '../../components/prompt-line/src/tiptap/types.js';\n\nexport interface UseChatAutocompleteOptions {\n mention?: TriggerSuggestionConfig;\n command?: TriggerSuggestionConfig;\n autocomplete?: AutocompleteConfig;\n starters?: StartersConfig;\n /** Ref to the slotted `<cds-aichat-prompt-line>`. */\n promptLineRef: RefObject<PromptLineElement | null>;\n /** When true, starter selection inserts the text but does not auto-send. */\n isSendDisabled?: boolean;\n /** Fired after a starter is selected and inserted (used to trigger send). */\n onStarterSelected?: (text: string) => void;\n /**\n * Fired when an autocomplete suggestion item is selected.\n * Called after the controller has already inserted the item.\n */\n onSelectItem?: (item: SuggestionItem) => void;\n /**\n * Fired when the send button inside an autocomplete suggestion item is clicked.\n */\n onSendItem?: (text: string) => void;\n /** Whether the autocomplete is attached to the input (affects corner rounding). */\n attached?: boolean;\n /** Maximum height for the autocomplete popover */\n maxHeight?: string;\n}\n\nexport interface UseChatAutocompleteResult {\n /** Attach to `<PromptLine onTriggerChange={...} />`. */\n onTriggerChange: (\n event: CustomEvent<TriggerChangeEventDetail | null>\n ) => void;\n /**\n * JSX to render with `slot=\"autocomplete-content\"` inside `<PromptLineShell>`.\n * `null` while no trigger is active.\n */\n autocompleteContent: ReactNode;\n}\n\nexport function useChatAutocomplete(\n options: UseChatAutocompleteOptions\n): UseChatAutocompleteResult {\n const {\n mention,\n command,\n autocomplete,\n starters,\n promptLineRef,\n isSendDisabled,\n onStarterSelected,\n onSelectItem,\n onSendItem,\n attached = true,\n maxHeight,\n } = options;\n\n const [state, setState] = React.useState<AutocompleteControllerState>({\n trigger: null,\n items: [],\n });\n\n // Keep the controller stable for the hook's lifetime — set in a layout\n // effect so it's wired before any event handler can fire.\n const controllerRef = React.useRef<AutocompleteController | null>(null);\n // Latest config / callback values; the controller stores its own copies\n // but reading them out of refs avoids re-instantiation churn.\n const onStarterRef = React.useRef(onStarterSelected);\n onStarterRef.current = onStarterSelected;\n const onSelectItemRef = React.useRef(onSelectItem);\n onSelectItemRef.current = onSelectItem;\n const onSendItemRef = React.useRef(onSendItem);\n onSendItemRef.current = onSendItem;\n\n if (!controllerRef.current) {\n controllerRef.current = new AutocompleteController({\n mention,\n command,\n autocomplete,\n starters,\n isSendDisabled,\n onStarterSelected: (text) => onStarterRef.current?.(text),\n onChange: setState,\n });\n }\n\n // Push prop changes into the controller without recreating it.\n React.useEffect(() => {\n controllerRef.current?.setConfigs({\n mention,\n command,\n autocomplete,\n starters,\n isSendDisabled,\n });\n }, [mention, command, autocomplete, starters, isSendDisabled]);\n\n // Keep the controller pointed at the live prompt-line element.\n React.useEffect(() => {\n controllerRef.current?.setPromptLine(promptLineRef.current);\n });\n\n React.useEffect(() => {\n return () => {\n controllerRef.current?.destroy();\n controllerRef.current = null;\n };\n }, []);\n\n const onTriggerChange = React.useCallback(\n (event: CustomEvent<TriggerChangeEventDetail | null>) => {\n // Pin the controller to the current prompt-line ref before handing\n // off the detail — the React caller's ref is authoritative.\n controllerRef.current?.setPromptLine(promptLineRef.current);\n controllerRef.current?.handleTriggerChange(event.detail ?? null);\n },\n [promptLineRef]\n );\n\n const handleSelect = React.useCallback((item: SuggestionItem) => {\n controllerRef.current?.select(item);\n onSelectItemRef.current?.(item);\n }, []);\n\n const isSendDisabledRef = React.useRef(isSendDisabled);\n isSendDisabledRef.current = isSendDisabled;\n\n const handleSend = React.useCallback((text: string) => {\n if (!text || isSendDisabledRef.current) {\n return;\n }\n controllerRef.current?.dismiss(true);\n onSendItemRef.current?.(text);\n }, []);\n\n const dismiss = React.useCallback(() => {\n controllerRef.current?.dismiss();\n }, []);\n\n // Register / unregister the rendered list element with the controller so\n // arrow / Enter / Escape on the editor DOM get forwarded to it.\n // Also set the max-height CSS variable if provided.\n const setListElement = React.useCallback(\n (el: HTMLElement | null) => {\n controllerRef.current?.setListElement(el);\n // Pass the editor DOM as anchorElement so outside-click detection on the\n // autocomplete element doesn't dismiss the list when the user clicks the\n // editor (the editor is not inside the autocomplete element).\n if (el && 'anchorElement' in el) {\n (el as HTMLElement & { anchorElement: Element | null }).anchorElement =\n promptLineRef.current?.getEditor?.()?.view.dom ?? null;\n }\n if (el && maxHeight) {\n el.style.setProperty('--cds-aichat-autocomplete-max-height', maxHeight);\n }\n },\n [maxHeight, promptLineRef]\n );\n\n // Prevent mousedown on the autocomplete container from stealing focus from\n // the editor.\n const handleContainerMousedown = React.useCallback(\n (e: Event | React.MouseEvent) => {\n e.preventDefault();\n },\n []\n );\n\n const autocompleteContent = React.useMemo<ReactNode>(() => {\n if (!state.trigger || state.items.length === 0) {\n return null;\n }\n const { items: flatItems, groups } = itemsToGroups(state.items);\n if (state.renderCustomList) {\n const result = state.renderCustomList({\n items: state.items,\n query: state.trigger.query,\n onDismiss: dismiss,\n onSelect: handleSelect,\n onSend: handleSend,\n });\n if (result == null) {\n return null;\n }\n if (result instanceof HTMLElement) {\n return (\n <CustomElementHost\n slot=\"autocomplete-content\"\n element={result}\n onMount={setListElement}\n onMousedown={handleContainerMousedown}\n />\n );\n }\n return (\n <CustomReactNodePortal\n slot=\"autocomplete-content\"\n node={result as ReactNode}\n onMount={setListElement}\n onMousedown={handleContainerMousedown}\n />\n );\n }\n return (\n <Autocomplete\n ref={setListElement}\n slot=\"autocomplete-content\"\n items={flatItems}\n groups={groups}\n attached={attached}\n disableDirectSend={state.disableDirectSend}\n onDismiss={dismiss}\n onSelect={(e: CustomEvent<{ item: SuggestionItem }>) =>\n handleSelect(e.detail.item)\n }\n onSend={(e: CustomEvent<{ text: string }>) =>\n handleSend(e.detail?.text)\n }\n />\n );\n }, [\n state,\n handleSelect,\n handleSend,\n dismiss,\n setListElement,\n attached,\n handleContainerMousedown,\n ]);\n\n return { onTriggerChange, autocompleteContent };\n}\n\ninterface CustomElementHostProps {\n slot: string;\n element: HTMLElement;\n /** Notify the parent which element is the key-forwarding target. */\n onMount?: (el: HTMLElement | null) => void;\n onMousedown?: (e: React.MouseEvent) => void;\n}\n\n/** Mounts a host-provided HTMLElement into the React tree at `slot`. */\nfunction CustomElementHost({\n slot,\n element,\n onMount,\n onMousedown,\n}: CustomElementHostProps): JSX.Element {\n const containerRef = React.useRef<HTMLDivElement | null>(null);\n React.useEffect(() => {\n const container = containerRef.current;\n if (!container) {\n return undefined;\n }\n container.appendChild(element);\n onMount?.(element);\n return () => {\n onMount?.(null);\n if (element.parentNode === container) {\n container.removeChild(element);\n }\n };\n }, [element, onMount]);\n return (\n <div\n ref={containerRef}\n role=\"presentation\"\n slot={slot}\n onMouseDown={onMousedown}\n />\n );\n}\n\ninterface CustomReactNodePortalProps {\n slot: string;\n node: ReactNode;\n onMount?: (el: HTMLElement | null) => void;\n onMousedown?: (e: MouseEvent) => void;\n}\n\nlet autocompletePortalCounter = 0;\n\n/**\n * Projects a consumer-supplied React node into the page's light DOM via a\n * two-level slot/host pair so external `<style>` tags reach it. The rendered\n * `<div>` is a slot-projected anchor in the shell's `autocomplete-content`\n * slot; a sibling `<div slot=\"…\">` is appended to the chatWrapper (the host\n * of the surrounding shadow root) and receives the React node via\n * `createPortal`. Without this hop the node would mount inside the chat's\n * shadow root, hidden from page CSS.\n */\nfunction CustomReactNodePortal({\n slot,\n node,\n onMount,\n onMousedown,\n}: CustomReactNodePortalProps): JSX.Element {\n const containerRef = React.useRef<HTMLDivElement | null>(null);\n const [hostElement, setHostElement] = React.useState<HTMLElement | null>(\n null\n );\n\n React.useEffect(() => {\n const container = containerRef.current;\n if (!container) {\n return undefined;\n }\n const rootNode = container.getRootNode();\n const chatWrapper =\n rootNode instanceof ShadowRoot ? (rootNode.host as HTMLElement) : null;\n if (!chatWrapper) {\n return undefined;\n }\n\n const slotName = `cds-aichat-autocomplete-${++autocompletePortalCounter}`;\n const slotEl = document.createElement('slot');\n slotEl.setAttribute('name', slotName);\n container.appendChild(slotEl);\n\n const hostEl = document.createElement('div');\n hostEl.setAttribute('slot', slotName);\n if (onMousedown) {\n hostEl.addEventListener('mousedown', onMousedown);\n }\n chatWrapper.appendChild(hostEl);\n\n setHostElement(hostEl);\n return () => {\n onMount?.(null);\n if (onMousedown) {\n hostEl.removeEventListener('mousedown', onMousedown);\n }\n slotEl.remove();\n hostEl.remove();\n setHostElement(null);\n };\n // Empty deps: the slot/host pair is owned by this mount cycle and should\n // not churn as `node` updates — React's portal reconciliation handles\n // those updates in place.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // After the portal content is committed into hostElement, hand the first\n // child element to the controller. This is typically a custom element (e.g.\n // <cds-aichat-autocomplete>) whose properties (anchorElement, keydown\n // forwarding) only work on the element itself — not on the plain <div>\n // wrapper that createPortal renders into. Custom elements are defined\n // synchronously at module load, so by the time useEffect fires (post-paint)\n // the element is fully upgraded and its properties are available.\n React.useEffect(() => {\n if (!hostElement) {\n return;\n }\n const child = hostElement.firstElementChild as HTMLElement | null;\n onMount?.(child ?? hostElement);\n }, [hostElement, onMount]);\n\n return (\n <div slot={slot} ref={containerRef}>\n {hostElement ? ReactDOM.createPortal(node, hostElement) : null}\n </div>\n );\n}\n"],"names":["_jsx","Autocomplete"],"mappings":";;;;;;;;;;;;;AA4EM,SAAU,mBAAmB,CACjC,OAAmC,EAAA;IAEnC,MAAM,EACJ,OAAO,EACP,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,QAAQ,GAAG,IAAI,EACf,SAAS,GACV,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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-send-control.js","sources":["../../src/react/input-send-control.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"input-send-control.js","sources":["../../src/react/input-send-control.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 InputSendControlElement from '../components/prompt-line/src/send-control.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatInputSendControl = withWebComponentBridge(\n createComponent({\n tagName: 'cds-aichat-input-send-control',\n elementClass: InputSendControlElement,\n react: React,\n events: {\n onSend: 'cds-aichat-input-send',\n onStopStreaming: 'cds-aichat-input-stop-streaming',\n },\n })\n);\n\nexport default CDSAIChatInputSendControl;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAOH,MAAM,yBAAyB,GAAG,sBAAsB,CACtD,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,+BAA+B;AACxC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,MAAM,EAAE,uBAAuB;AAC/B,QAAA,eAAe,EAAE,iCAAiC;AACnD,KAAA;AACF,CAAA,CAAC;;"}
|
package/es/react/launcher.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.js","sources":["../../src/react/launcher.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"launcher.js","sources":["../../src/react/launcher.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\nimport CDSAIChatLauncher from '../components/launcher/src/launcher.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst Launcher = withWebComponentBridge(\n createComponent({\n tagName: 'cds-aichat-launcher',\n elementClass: CDSAIChatLauncher,\n react: React,\n events: {\n onToggle: 'cds-aichat-launcher-toggle',\n },\n })\n);\n\nexport default Launcher;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AAQH,MAAM,QAAQ,GAAG,sBAAsB,CACrC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,4BAA4B;AACvC,KAAA;AACF,CAAA,CAAC;;"}
|