@carbon/ai-chat-components 1.9.0 → 1.10.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2362 -2201
- 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.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.js.map +1 -1
- 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.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 +16 -3
- 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.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.js.map +1 -1
- 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.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 +16 -3
- 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":"iconTransform.js","sources":["../../../src/globals/utils/iconTransform.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AA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C,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,YAAY,CAAC,IAAS,EAAA;IACpC,OAAO,OAAO,CACZ,IAAI;QACJ,OAAO,IAAI,KAAK,QAAQ;AACxB,QAAA,MAAM,IAAI,IAAI;AACd,QAAA,OAAO,IAAI,IAAI;AACf,QAAA,SAAS,IAAI,IAAI;AACjB,QAAA,IAAI,CAAC,IAAI,KAAK,KAAK,CACpB;AACH;AAEA;;;;AAIG;SACa,8BAA8B,CAC5C,IAA2C,EAC3C,IAAI,GAAG,EAAE,EAAA;;AAGT,IAAA,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE;AACtB,QAAA,OAAO,IAAI;IACb;IAEA,MAAM,SAAS,GAAG,IAAgC;;IA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AChC;AACF,gBAAA,CAAC,CAAC;YACJ;AAEA,YAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;QAC3B;AACF,IAAA,CAAC,CAAC;IAEF,OAAO;AACL,QAAA,IAAI,EAAE,KAAK;QACX,KAAK;QACL,OAAO;AACP,QAAA,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC;QAC5B,IAAI;KACL;AACH;AAEA;;AAEG;AACH,SAAS,iBAAiB,CAAC,UAAe,EAAA;AACxC,IAAA,QACE,UAAU;QACV,UAAU,CAAC,IAAI,KAAK,KAAK;AACzB,QAAA,UAAU,CAAC,KAAK;AAChB,QAAA,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ;AACpC,QAAA,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;AACjC,QAAA,UAAU,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;AAC7B,QAAA,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AACnC,QAAA,OAAO,UAAU,CAAC,IAAI,KAAK,QAAQ;AAEvC;AAEA;;AAEG;AACH,SAAS,eAAe,CAAC,KAAU,EAAA;;AAEjC,IAAA,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,IAAI,IAAI,MAAM;AAC/E;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rtl-utils.js","sources":["../../../src/globals/utils/rtl-utils.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"rtl-utils.js","sources":["../../../src/globals/utils/rtl-utils.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Determines if the document is in RTL (right-to-left) mode.\n * Checks both document.dir and document.documentElement.dir for maximum compatibility.\n *\n * @returns true if the document is in RTL mode, false otherwise\n */\nexport function isDirectionRTL(): boolean {\n if (!document) {\n return false;\n }\n\n return document.dir === 'rtl' || document.documentElement.dir === 'rtl';\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;AAKG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,OAAO,QAAQ,CAAC,GAAG,KAAK,KAAK,IAAI,QAAQ,CAAC,eAAe,CAAC,GAAG,KAAK,KAAK;AACzE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sources":["../../../src/globals/utils/uuid.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"uuid.js","sources":["../../../src/globals/utils/uuid.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n/**\n * Generates a v4 UUID. Uses `crypto.randomUUID` when available, otherwise falls back to a simple implementation.\n */\nfunction uuid(): string {\n if (\n typeof crypto !== 'undefined' &&\n typeof crypto.randomUUID === 'function'\n ) {\n return crypto.randomUUID();\n }\n\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n (character) => {\n const random = (Math.random() * 16) | 0;\n const value = character === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n }\n );\n}\n\nexport { uuid };\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;AAEG;AACH,SAAS,IAAI,GAAA;IACX,IACE,OAAO,MAAM,KAAK,WAAW;AAC7B,QAAA,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EACvC;AACA,QAAA,OAAO,MAAM,CAAC,UAAU,EAAE;IAC5B;IAEA,OAAO,sCAAsC,CAAC,OAAO,CACnD,OAAO,EACP,CAAC,SAAS,KAAI;AACZ,QAAA,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;AACvC,QAAA,MAAM,KAAK,GAAG,SAAS,KAAK,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,GAAG;AAC/D,QAAA,OAAO,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC3B,IAAA,CAAC,CACF;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-label-action-button.js","sources":["../../src/react/ai-label-action-button.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"ai-label-action-button.js","sources":["../../src/react/ai-label-action-button.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2026, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\nimport '@carbon/web-components/es/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;;"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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={trans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AAG,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":";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Q,GAAG,UAAU,CAAC,IAAc;AAC1C,oBAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AACtB,wBAAA,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACxB;;oBAEA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE,GAAG,UAAU;AACrD,oBAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;gBACnE;qBAAO;AACL,oBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC5B;YACF;iBAAO;AACL,gBAAA,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAC5B;AACF,QAAA,CAAC,CAAC;QAEF,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE;AACtE,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAEd,QACEA,KAAC,eAAe,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,KAAM,SAAS,EAAA,QAAA,EAAA,CAClE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,MACrDC,GAAA,CAAA,KAAA,EAAA,EAAoB,IAAI,EAAE,QAAQ,YAC/B,KAAK,EAAA,EADE,QAAQ,CAEZ,CACP,CAAC,EACD,eAAe,CAAA,EAAA,CACA;AAEtB,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message.js","sources":["../../src/react/error-message.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"error-message.js","sources":["../../src/react/error-message.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { createComponent } from '@lit/react';\nimport React from 'react';\nimport ErrorMessage from '../components/prompt-line/src/error-message.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatErrorMessage = withWebComponentBridge(\n createComponent({\n tagName: 'cds-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;;;IAGvE,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC;AACpD,IAAA,YAAY,CAAC,OAAO,GAAG,iBAAiB;IACxC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;AAClD,IAAA,eAAe,CAAC,OAAO,GAAG,YAAY;IACtC,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;AAC9C,IAAA,aAAa,CAAC,OAAO,GAAG,UAAU;AAElC,IAAA,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;AAC1B,QAAA,aAAa,CAAC,OAAO,GAAG,IAAI,sBAAsB,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AC;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,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;;;IAGvE,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC;AACpD,IAAA,YAAY,CAAC,OAAO,GAAG,iBAAiB;IACxC,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;AAClD,IAAA,eA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W,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 +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;;"}
|
package/es/react/markdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.js","sources":["../../src/react/markdown.tsx"],"sourcesContent":[null],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;AA+BA,MAAM,WAAW,GAAG,eAAe,CAAC;AAClC,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,KAAI;IAClD,MAAM,cAAc,GAClB,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;AAC9D,IAAA,OAAO,KAAK,CAAC,aAAa,CACxB,WAAW,EACX;AACE,QAAA,GAAG,IAAI;AACP,QAAA,GAAG,EAAE,YAAY;AACjB,QAAA,QAAQ,EAAE,QAAQ,KAAK,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;AACtE,KAAA;;;;IAID,cAAc,GAAG,IAAI,GAAG,QAAQ,CACjC;AACH,CAAC,CAAC;AAEF,qBAAqB,CAAC,WAAW,GAAG,cAAc;AAElD;;;;;AAKG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC;AA4DlE,SAAS,SAAS,CAAC,KAAc,EAAA;AAC/B,IAAA,QACE,OAAO,OAAO,KAAK,WAAW;AAC9B,QAAA,KAAK,YAAY,OAAO;QACxB,SAAS,IAAI,KAAK;AAEtB;AAEA,MAAM,QAAQ,GAAG,UAAU,CAAmC,SAAS,QAAQ,CAC7E,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,EAC5B,YAAY,EAAA;IAEZ,MAAM,QAAQ,G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EAAA,EAAA,QAAA,EAAA,CACEC,GAAA,CAAC,YAAY,OACP,IAAI,EACR,GAAG,EAAE,cAAwC,EAC7C,eAAe,EAAE,gBAAyB,YACzC,eAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,MAC5BA,GAAA,CAAA,MAAA,EAAA,EAAqB,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAA,EAAxC,QAAQ,CAAoC,CACxD,CAAC,EAAA,CACW,EACd,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,MACvBA,GAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,EAAA,QAAA,EACZ,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAA,EADlB,KAAK,CAAC,QAAQ,CAElB,CAClB,CAAC,CAAA,EAAA,CACD;AAEP,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
1
|
+
{"version":3,"file":"markdown.js","sources":["../../src/react/markdown.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, {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport { createPortal, flushSync } from 'react-dom';\n\n// Export the actual class for the component that will *directly* be wrapped with React.\nimport CDSAIChatMarkdown from '../components/markdown/src/markdown.js';\nimport type {\n MarkdownCustomRenderers,\n MarkdownRendererCodeBlockArgs,\n MarkdownRendererTableArgs,\n} from '../components/markdown/src/markdown-renderer-types.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge';\n\nconst LitMarkdown = createComponent({\n tagName: 'cds-aichat-markdown',\n elementClass: CDSAIChatMarkdown,\n react: React,\n});\n\nconst ForwardedBaseMarkdown = React.forwardRef<\n CDSAIChatMarkdown,\n React.ComponentProps<typeof LitMarkdown> & { markdown?: string }\n>(({ children, markdown, ...rest }, forwardedRef) => {\n const isTextChildren =\n typeof children === 'string' || typeof children === 'number';\n return React.createElement(\n LitMarkdown,\n {\n ...rest,\n ref: forwardedRef,\n markdown: markdown ?? (isTextChildren ? String(children) : undefined),\n },\n // Text children become the `markdown` prop; element children pass through\n // as light-DOM slot children (used by the React wrapper to mount plugin\n // slot forwarders inside the underlying `<cds-aichat-markdown>`).\n isTextChildren ? null : children\n );\n});\n\nForwardedBaseMarkdown.displayName = 'BaseMarkdown';\n\n/**\n * Thin `@lit/react` bridge around `<cds-aichat-markdown>`. Handles text vs.\n * element children and the web-component prop bridge, but performs no\n * React-specific `customRenderers` portaling — that is layered on by the\n * `Markdown` wrapper below.\n */\nconst BaseMarkdown = withWebComponentBridge(ForwardedBaseMarkdown);\n\n/**\n * React-flavored variant of {@link MarkdownCustomRenderers}. The element\n * replacements (`table`, `codeBlock`) may additionally return a `ReactNode`\n * (portaled into a light-DOM slot host) on top of the framework-neutral\n * `HTMLElement | null`. The attribute transforms (`link`, `image`) and the\n * `checklist` behavior hook return plain data, so they keep the base\n * signatures unchanged.\n */\nexport interface MarkdownReactCustomRenderers {\n /**\n * Override the default `cds-aichat-table` rendering. Return a `ReactNode`\n * (rendered via portal into a light-DOM slot host) or an `HTMLElement`\n * (adopted into the slot host as-is); return `null` to fall back to the\n * default Carbon table renderer.\n */\n table?: (args: MarkdownRendererTableArgs) => ReactNode | HTMLElement | null;\n /**\n * Override the default `cds-aichat-code-snippet` rendering. Return a\n * `ReactNode` (rendered via portal into a light-DOM slot host) or an\n * `HTMLElement` (adopted into the slot host as-is); return `null` to fall\n * back to the default Carbon code snippet renderer.\n */\n codeBlock?: (\n args: MarkdownRendererCodeBlockArgs\n ) => ReactNode | HTMLElement | null;\n /** Transform how links render. See {@link MarkdownCustomRenderers.link}. */\n link?: MarkdownCustomRenderers['link'];\n /** Transform how images render. See {@link MarkdownCustomRenderers.image}. */\n image?: MarkdownCustomRenderers['image'];\n /** Make task-list checkboxes actionable. See {@link MarkdownCustomRenderers.checklist}. */\n checklist?: MarkdownCustomRenderers['checklist'];\n}\n\ntype BaseMarkdownProps = Omit<\n ComponentPropsWithoutRef<typeof BaseMarkdown>,\n 'customRenderers'\n>;\n\n/**\n * Props for the React `<Markdown>` wrapper around `<cds-aichat-markdown>`.\n */\nexport interface MarkdownProps extends BaseMarkdownProps {\n /**\n * Per-element render overrides. Each callback returns either a `ReactNode`\n * (rendered via portal into a light-DOM slot host) or an `HTMLElement`\n * (adopted into the slot host as-is). Return `null` to fall back to the\n * default Carbon rendering. Pass a stable reference (e.g. `useMemo`) — a\n * new object identity each render forces a full re-reconcile.\n */\n customRenderers?: MarkdownReactCustomRenderers;\n}\n\ntype PortalEntry = {\n slotName: string;\n host: HTMLDivElement;\n node: ReactNode;\n};\n\nfunction isElement(value: unknown): value is HTMLElement {\n return (\n typeof Element !== 'undefined' &&\n value instanceof Element &&\n 'tagName' in value\n );\n}\n\nconst Markdown = forwardRef<CDSAIChatMarkdown, MarkdownProps>(function Markdown(\n { customRenderers, ...rest },\n forwardedRef\n) {\n const hostsRef = useRef<Map<string, HTMLDivElement>>(new Map());\n const [portalEntries, setPortalEntries] = useState<PortalEntry[]>([]);\n\n // Active plugin-fallback slot names that an outer chat container is hosting\n // in page light DOM. When a chat-container ancestor catches the\n // `cds-aichat-markdown-plugin-host-mount` event (and calls preventDefault),\n // the markdown element skips its own local-host fallback and relies on\n // these forwarders to project the page-level host element through every\n // shadow boundary into its named slot. Storybook standalone usage stays on\n // the local-host path — no listener consumes the event there.\n const [pluginSlotNames, setPluginSlotNames] = useState<string[]>([]);\n const markdownRef = useRef<CDSAIChatMarkdown | null>(null);\n const setMarkdownRef = useCallback(\n (node: CDSAIChatMarkdown | null) => {\n markdownRef.current = node;\n if (typeof forwardedRef === 'function') {\n forwardedRef(node);\n } else if (forwardedRef && 'current' in forwardedRef) {\n (\n forwardedRef as React.MutableRefObject<CDSAIChatMarkdown | null>\n ).current = node;\n }\n },\n [forwardedRef]\n );\n\n useEffect(() => {\n const node = markdownRef.current;\n if (!node) {\n return undefined;\n }\n const handleMount = (event: Event) => {\n const slotName = (event as CustomEvent<{ slotName: string }>).detail\n ?.slotName;\n if (!slotName) {\n return;\n }\n setPluginSlotNames((prev) =>\n prev.includes(slotName) ? prev : [...prev, slotName]\n );\n };\n const handleUnmount = (event: Event) => {\n const slotName = (event as CustomEvent<{ slotName: string }>).detail\n ?.slotName;\n if (!slotName) {\n return;\n }\n setPluginSlotNames((prev) =>\n prev.includes(slotName) ? prev.filter((n) => n !== slotName) : prev\n );\n };\n // Optimistic: we render a `<slot>` forwarder for every slot the markdown\n // element emits. If a chat container ancestor takes over hosting (by\n // calling `preventDefault()` on the mount event), the forwarder projects\n // the page-level host through the chain. If nothing intercepts\n // (standalone storybook), the markdown element creates its own local host\n // alongside, and the empty forwarder is harmless.\n node.addEventListener('cds-aichat-markdown-plugin-host-mount', handleMount);\n node.addEventListener(\n 'cds-aichat-markdown-plugin-host-unmount',\n handleUnmount\n );\n return () => {\n node.removeEventListener(\n 'cds-aichat-markdown-plugin-host-mount',\n handleMount\n );\n node.removeEventListener(\n 'cds-aichat-markdown-plugin-host-unmount',\n handleUnmount\n );\n };\n }, []);\n\n const setPortalForSlot = useCallback(\n (slotName: string, host: HTMLDivElement, node: ReactNode) => {\n setPortalEntries((prev) => {\n const idx = prev.findIndex((e) => e.slotName === slotName);\n if (idx >= 0 && prev[idx].node === node && prev[idx].host === host) {\n return prev;\n }\n if (idx >= 0) {\n const next = prev.slice();\n next[idx] = { slotName, host, node };\n return next;\n }\n return [...prev, { slotName, host, node }];\n });\n },\n []\n );\n\n const bridgedRenderers = useMemo<MarkdownCustomRenderers | undefined>(() => {\n if (!customRenderers) {\n return undefined;\n }\n const bridge = <Args extends { slotName: string }>(\n callback: (args: Args) => ReactNode | HTMLElement | null\n ) => {\n return (args: Args): HTMLElement | null => {\n const rendered = callback(args);\n if (rendered == null) {\n return null;\n }\n if (isElement(rendered)) {\n return rendered;\n }\n // Mint or reuse a stable host for this slot, then flush a portal\n // update synchronously so the host is populated before the Lit\n // element adopts it (no empty-host flash).\n let host = hostsRef.current.get(args.slotName);\n if (!host) {\n host = document.createElement('div');\n hostsRef.current.set(args.slotName, host);\n }\n flushSync(() => {\n setPortalForSlot(args.slotName, host as HTMLDivElement, rendered);\n });\n return host;\n };\n };\n\n const out: MarkdownCustomRenderers = {};\n if (customRenderers.table) {\n out.table = bridge(customRenderers.table);\n }\n if (customRenderers.codeBlock) {\n out.codeBlock = bridge(customRenderers.codeBlock);\n }\n // Attribute transforms / behavior hook return plain data (not DOM), so\n // they skip the portal bridge and pass straight through.\n if (customRenderers.link) {\n out.link = customRenderers.link;\n }\n if (customRenderers.image) {\n out.image = customRenderers.image;\n }\n if (customRenderers.checklist) {\n out.checklist = customRenderers.checklist;\n }\n return out;\n }, [customRenderers, setPortalForSlot]);\n\n // After every commit, prune portals whose host Lit has removed (its slot\n // dropped out of the descriptor batch, leaving the host detached). The\n // connectivity check is deferred to a microtask on purpose: `bridge` mints a\n // host, `flushSync`s the portal into it while it is still detached, and only\n // *returns* it to Lit — which appends it synchronously afterwards. That\n // `flushSync` runs this effect once while the host is not yet adopted, so a\n // synchronous `isConnected` check would prune the entry we just added and\n // leave the slot permanently empty (e.g. a streaming table custom renderer\n // flickering out as later content arrives). Reading `isConnected` a\n // microtask later lets Lit's adoption land first, so we only drop\n // genuinely-removed hosts.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useEffect(() => {\n let cancelled = false;\n queueMicrotask(() => {\n if (cancelled) {\n return;\n }\n let pruned = false;\n const aliveHosts = new Map<string, HTMLDivElement>();\n for (const [slotName, host] of hostsRef.current) {\n if (host.isConnected) {\n aliveHosts.set(slotName, host);\n } else {\n pruned = true;\n }\n }\n if (pruned) {\n hostsRef.current = aliveHosts;\n }\n setPortalEntries((prev) => {\n const filtered = prev.filter((e) => e.host.isConnected);\n return filtered.length === prev.length ? prev : filtered;\n });\n });\n return () => {\n cancelled = true;\n };\n });\n\n return (\n <>\n <BaseMarkdown\n {...rest}\n ref={setMarkdownRef as React.Ref<HTMLElement>}\n customRenderers={bridgedRenderers as never}>\n {pluginSlotNames.map((slotName) => (\n <slot key={slotName} name={slotName} slot={slotName} />\n ))}\n </BaseMarkdown>\n {portalEntries.map((entry) => (\n <React.Fragment key={entry.slotName}>\n {createPortal(entry.node, entry.host)}\n </React.Fragment>\n ))}\n </>\n );\n});\n\nMarkdown.displayName = 'Markdown';\n\nexport default Markdown;\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;AA+BA,MAAM,WAAW,GAAG,eAAe,CAAC;AAClC,IAAA,OAAO,EAAE,qBAAqB;AAC9B,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;AAEF,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,KAAI;IAClD,MAAM,cAAc,GAClB,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;AAC9D,IAAA,OAAO,KAAK,CAAC,aAAa,CACxB,WAAW,EACX;AACE,QAAA,GAAG,IAAI;AACP,QAAA,GAAG,EAAE,YAAY;AACjB,QAAA,QAAQ,EAAE,QAAQ,KAAK,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;AACtE,KAAA;;;;IAID,cAAc,GAAG,IAAI,GAAG,QAAQ,CACjC;AACH,CAAC,CAAC;AAEF,qBAAqB,CAAC,WAAW,GAAG,cAAc;AAElD;;;;;AAKG;AACH,MAAM,YAAY,GAAG,sBAAsB,CAAC,qBAAqB,CAAC;AA4DlE,SAAS,SAAS,CAAC,KAAc,EAAA;AAC/B,IAAA,QACE,OAAO,OAAO,KAAK,WAAW;AAC9B,QA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I,GAAG,QAAQ;AAC1D,YAAA,CAAC,CAAC;AACJ,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,MAAK;YACV,SAAS,GAAG,IAAI;AAClB,QAAA,CAAC;AACH,IAAA,CAAC,CAAC;AAEF,IAAA,QACEA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACEC,GAAA,CAAC,YAAY,OACP,IAAI,EACR,GAAG,EAAE,cAAwC,EAC7C,eAAe,EAAE,gBAAyB,YACzC,eAAe,CAAC,GAAG,CAAC,CAAC,QAAQ,MAC5BA,GAAA,CAAA,MAAA,EAAA,EAAqB,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAA,EAAxC,QAAQ,CAAoC,CACxD,CAAC,EAAA,CACW,EACd,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,MACvBA,GAAA,CAAC,KAAK,CAAC,QAAQ,EAAA,EAAA,QAAA,EACZ,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAA,EADlB,KAAK,CAAC,QAAQ,CAElB,CAClB,CAAC,CAAA,EAAA,CACD;AAEP,CAAC;AAED,QAAQ,CAAC,WAAW,GAAG,UAAU;;"}
|
package/es/react/panel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.js","sources":["../../src/react/panel.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"panel.js","sources":["../../src/react/panel.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';\nimport CdsChatPanelElement from '../components/chat-shell/src/panel.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst CDSAIChatPanel = withWebComponentBridge(\n createComponent({\n tagName: 'cds-aichat-panel',\n elementClass: CdsChatPanelElement,\n react: React,\n events: {\n onOpenStart: 'openstart',\n onOpenEnd: 'openend',\n onCloseStart: 'closestart',\n onCloseEnd: 'closeend',\n onBodyScroll: 'body-scroll',\n },\n })\n);\n\nexport default CDSAIChatPanel;\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;AACZ,IAAA,MAAM,EAAE;AACN,QAAA,WAAW,EAAE,WAAW;AACxB,QAAA,SAAS,EAAE,SAAS;AACpB,QAAA,YAAY,EAAE,YAAY;AAC1B,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,YAAY,EAAE,aAAa;AAC5B,KAAA;AACF,CAAA,CAAC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processing.js","sources":["../../src/react/processing.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"processing.js","sources":["../../src/react/processing.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 CDSAIChatProcessing from '../components/processing/src/processing.js';\nimport { withWebComponentBridge } from './utils/withWebComponentBridge.js';\n\nconst Processing = withWebComponentBridge(\n createComponent({\n tagName: 'cds-aichat-processing',\n elementClass: CDSAIChatProcessing,\n react: React,\n })\n);\n\nexport default Processing;\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAOG;AASH,MAAM,UAAU,GAAG,sBAAsB,CACvC,eAAe,CAAC;AACd,IAAA,OAAO,EAAE,uBAAuB;AAChC,IAAA,YAAY,EAAE,mBAAmB;AACjC,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,CAAC;;"}
|