@carbon/ai-chat-components 1.8.0-rc.0 → 1.9.0-alpha.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 +15967 -10853
- package/es/components/audio-player/src/audio-player.js +0 -1
- package/es/components/audio-player/src/audio-player.js.map +1 -1
- package/es/components/audio-player/src/providers/base-provider.js +0 -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 +0 -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 +0 -1
- package/es/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
- package/es/components/audio-player/src/transcript.js +1 -1
- package/es/components/audio-player/src/transcript.js.map +1 -1
- package/es/components/audio-player/src/utils/url-detector.js +0 -1
- package/es/components/audio-player/src/utils/url-detector.js.map +1 -1
- package/es/components/autocomplete/index.d.ts +15 -0
- package/es/components/autocomplete/index.js +11 -0
- package/es/components/autocomplete/index.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete-item-group.d.ts +44 -0
- package/es/components/autocomplete/src/autocomplete-item-group.js +139 -0
- package/es/components/autocomplete/src/autocomplete-item-group.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js +13 -0
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete-item.d.ts +54 -0
- package/es/components/autocomplete/src/autocomplete-item.js +197 -0
- package/es/components/autocomplete/src/autocomplete-item.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete-item.scss.js +13 -0
- package/es/components/autocomplete/src/autocomplete-item.scss.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete.d.ts +97 -0
- package/es/components/autocomplete/src/autocomplete.js +321 -0
- package/es/components/autocomplete/src/autocomplete.js.map +1 -0
- package/es/components/autocomplete/src/autocomplete.scss.js +13 -0
- package/es/components/autocomplete/src/autocomplete.scss.js.map +1 -0
- package/es/components/card/src/card.scss.js +1 -1
- package/es/components/chat-history/src/chat-history.scss.js +1 -1
- package/es/components/chat-shell/src/chat-header.js +0 -1
- package/es/components/chat-shell/src/chat-header.js.map +1 -1
- package/es/components/chat-shell/src/corner-manager.d.ts +1 -1
- package/es/components/chat-shell/src/corner-manager.js +1 -2
- package/es/components/chat-shell/src/corner-manager.js.map +1 -1
- package/es/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es/components/chat-shell/src/initialization-manager.js +1 -2
- package/es/components/chat-shell/src/initialization-manager.js.map +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.js +0 -1
- package/es/components/chat-shell/src/resize-observer-manager.js.map +1 -1
- package/es/components/chat-shell/src/shell.js +2 -2
- package/es/components/chat-shell/src/shell.js.map +1 -1
- package/es/components/chat-shell/src/slot-observer.d.ts +1 -1
- package/es/components/chat-shell/src/slot-observer.js +1 -2
- package/es/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es/components/chat-shell/src/workspace-manager-utils.d.ts +1 -1
- package/es/components/chat-shell/src/workspace-manager-utils.js +1 -2
- package/es/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
- package/es/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es/components/chat-shell/src/workspace-manager.js +1 -2
- package/es/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.d.ts +11 -0
- package/es/components/code-snippet/src/code-snippet.js +37 -5
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js +5 -0
- package/es/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es/components/code-snippet/src/layout-utils.js +21 -8
- package/es/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es/components/feedback/src/feedback.js +1 -0
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/file-uploads/index.d.ts +12 -0
- package/es/components/file-uploads/index.js +10 -0
- package/es/components/file-uploads/index.js.map +1 -0
- package/es/components/file-uploads/src/file-upload-item.d.ts +43 -0
- package/es/components/file-uploads/src/file-upload-item.js +267 -0
- package/es/components/file-uploads/src/file-upload-item.js.map +1 -0
- package/es/components/file-uploads/src/file-upload-item.scss.js +13 -0
- package/es/components/file-uploads/src/file-upload-item.scss.js.map +1 -0
- package/es/components/file-uploads/src/file-uploads.d.ts +87 -0
- package/es/components/file-uploads/src/file-uploads.js +213 -0
- package/es/components/file-uploads/src/file-uploads.js.map +1 -0
- package/es/components/file-uploads/src/file-uploads.scss.js +13 -0
- package/es/components/file-uploads/src/file-uploads.scss.js.map +1 -0
- package/es/components/markdown/index.d.ts +1 -0
- package/es/components/markdown/index.js +1 -0
- package/es/components/markdown/index.js.map +1 -1
- package/es/components/markdown/src/markdown-token-tree.d.ts +8 -0
- package/es/components/markdown/src/markdown-token-tree.js +12 -1
- package/es/components/markdown/src/markdown-token-tree.js.map +1 -1
- package/es/components/markdown/src/markdown.js +4 -0
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/prompt-line/index.d.ts +26 -0
- package/es/components/prompt-line/index.js +32 -0
- package/es/components/prompt-line/index.js.map +1 -0
- package/es/components/prompt-line/src/autocomplete-controller.d.ts +178 -0
- package/es/components/prompt-line/src/autocomplete-controller.js +548 -0
- package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -0
- package/es/components/prompt-line/src/error-message.d.ts +50 -0
- package/es/components/prompt-line/src/error-message.js +144 -0
- package/es/components/prompt-line/src/error-message.js.map +1 -0
- package/es/components/prompt-line/src/error-message.scss.js +13 -0
- package/es/components/prompt-line/src/error-message.scss.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-constants.d.ts +17 -0
- package/es/components/prompt-line/src/prompt-line-constants.js +27 -0
- package/es/components/prompt-line/src/prompt-line-constants.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-controller.d.ts +155 -0
- package/es/components/prompt-line/src/prompt-line-controller.js +394 -0
- package/es/components/prompt-line/src/prompt-line-controller.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-rich-loader.d.ts +34 -0
- package/es/components/prompt-line/src/prompt-line-rich-loader.js +51 -0
- package/es/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-rich-runtime.d.ts +14 -0
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js +340 -0
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-shell.d.ts +72 -0
- package/es/components/prompt-line/src/prompt-line-shell.js +227 -0
- package/es/components/prompt-line/src/prompt-line-shell.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line-shell.scss.js +13 -0
- package/es/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line.d.ts +147 -0
- package/es/components/prompt-line/src/prompt-line.js +391 -0
- package/es/components/prompt-line/src/prompt-line.js.map +1 -0
- package/es/components/prompt-line/src/prompt-line.scss.js +13 -0
- package/es/components/prompt-line/src/prompt-line.scss.js.map +1 -0
- package/es/components/prompt-line/src/send-control.d.ts +46 -0
- package/es/components/prompt-line/src/send-control.js +138 -0
- package/es/components/prompt-line/src/send-control.js.map +1 -0
- package/es/components/prompt-line/src/send-control.scss.js +13 -0
- package/es/components/prompt-line/src/send-control.scss.js.map +1 -0
- package/es/components/prompt-line/src/stop-streaming-button.d.ts +42 -0
- package/es/components/prompt-line/src/stop-streaming-button.js +93 -0
- package/es/components/prompt-line/src/stop-streaming-button.js.map +1 -0
- package/es/components/prompt-line/src/stop-streaming-button.scss.js +13 -0
- package/es/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/build-extensions.d.ts +30 -0
- package/es/components/prompt-line/src/tiptap/build-extensions.js +38 -0
- package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +21 -0
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js +127 -0
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/carbon-mention.d.ts +19 -0
- package/es/components/prompt-line/src/tiptap/carbon-mention.js +237 -0
- package/es/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +22 -0
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +64 -0
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/chat-enter.d.ts +17 -0
- package/es/components/prompt-line/src/tiptap/chat-enter.js +46 -0
- package/es/components/prompt-line/src/tiptap/chat-enter.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/editor-styles.d.ts +18 -0
- package/es/components/prompt-line/src/tiptap/editor-styles.js +83 -0
- package/es/components/prompt-line/src/tiptap/editor-styles.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/index.d.ts +42 -0
- package/es/components/prompt-line/src/tiptap/index.js +43 -0
- package/es/components/prompt-line/src/tiptap/index.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/json-utils.d.ts +61 -0
- package/es/components/prompt-line/src/tiptap/json-utils.js +158 -0
- package/es/components/prompt-line/src/tiptap/json-utils.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/keymap.d.ts +31 -0
- package/es/components/prompt-line/src/tiptap/keymap.js +59 -0
- package/es/components/prompt-line/src/tiptap/keymap.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/origin-meta.d.ts +11 -0
- package/es/components/prompt-line/src/tiptap/origin-meta.js +33 -0
- package/es/components/prompt-line/src/tiptap/origin-meta.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/plain-text-paste.d.ts +16 -0
- package/es/components/prompt-line/src/tiptap/plain-text-paste.js +85 -0
- package/es/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +87 -0
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.js +41 -0
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/render-token-chip.d.ts +57 -0
- package/es/components/prompt-line/src/tiptap/render-token-chip.js +95 -0
- package/es/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/token-node-view.d.ts +36 -0
- package/es/components/prompt-line/src/tiptap/token-node-view.js +41 -0
- package/es/components/prompt-line/src/tiptap/token-node-view.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/trigger-utils.d.ts +30 -0
- package/es/components/prompt-line/src/tiptap/trigger-utils.js +44 -0
- package/es/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/types.d.ts +161 -0
- package/es/components/prompt-line/src/tiptap/types.js +8 -0
- package/es/components/prompt-line/src/tiptap/types.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/typing-indicator.d.ts +30 -0
- package/es/components/prompt-line/src/tiptap/typing-indicator.js +104 -0
- package/es/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -0
- package/es/components/prompt-line/src/tiptap/value-sync.d.ts +25 -0
- package/es/components/prompt-line/src/tiptap/value-sync.js +65 -0
- package/es/components/prompt-line/src/tiptap/value-sync.js.map +1 -0
- package/es/components/prompt-line/src/types.d.ts +100 -0
- package/es/components/prompt-line/src/types.js +50 -0
- package/es/components/prompt-line/src/types.js.map +1 -0
- package/es/components/shared/media-utils/script-loader.js +0 -1
- package/es/components/shared/media-utils/script-loader.js.map +1 -1
- package/es/components/video-player/src/providers/base-provider.js +0 -1
- package/es/components/video-player/src/providers/base-provider.js.map +1 -1
- package/es/components/video-player/src/providers/kaltura-provider.js +0 -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 +0 -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 +0 -1
- package/es/components/video-player/src/providers/vimeo-provider.js.map +1 -1
- package/es/components/video-player/src/providers/youtube-provider.js +0 -1
- package/es/components/video-player/src/providers/youtube-provider.js.map +1 -1
- package/es/components/video-player/src/utils/url-detector.js +0 -1
- package/es/components/video-player/src/utils/url-detector.js.map +1 -1
- package/es/components/video-player/src/video-player.js +0 -1
- package/es/components/video-player/src/video-player.js.map +1 -1
- package/es/components/workspace-shell/src/header-collapsible-manager.js +0 -1
- package/es/components/workspace-shell/src/header-collapsible-manager.js.map +1 -1
- package/es/globals/utils/aria-announcer-manager.d.ts +62 -0
- package/es/globals/utils/aria-announcer-manager.js +125 -0
- package/es/globals/utils/aria-announcer-manager.js.map +1 -0
- package/es/globals/utils/browser-utils.d.ts +10 -0
- package/es/globals/utils/browser-utils.js +37 -0
- package/es/globals/utils/browser-utils.js.map +1 -0
- package/es/globals/utils/dom-utils.d.ts +6 -0
- package/es/globals/utils/dom-utils.js +39 -0
- package/es/globals/utils/dom-utils.js.map +1 -0
- package/{es-custom/react → es/globals}/utils/iconTransform.js +1 -2
- package/es/globals/utils/iconTransform.js.map +1 -0
- package/es/react/__tests__/jest.setup.js +1 -2
- package/es/react/__tests__/jest.setup.js.map +1 -1
- package/es/react/audio-player.js +0 -1
- package/es/react/audio-player.js.map +1 -1
- package/es/react/autocomplete.d.ts +11 -0
- package/es/react/autocomplete.js +36 -0
- package/es/react/autocomplete.js.map +1 -0
- package/es/react/chat-header.js +1 -1
- package/es/react/code-snippet.js +1 -1
- package/es/react/error-message.d.ts +11 -0
- package/es/react/error-message.js +28 -0
- package/es/react/error-message.js.map +1 -0
- package/es/react/file-uploads.d.ts +11 -0
- package/es/react/file-uploads.js +31 -0
- package/es/react/file-uploads.js.map +1 -0
- package/es/react/hooks/useChatAutocomplete.d.ts +41 -0
- package/es/react/hooks/useChatAutocomplete.js +178 -0
- package/es/react/hooks/useChatAutocomplete.js.map +1 -0
- package/es/react/input-send-control.d.ts +11 -0
- package/es/react/input-send-control.js +32 -0
- package/es/react/input-send-control.js.map +1 -0
- package/es/react/prompt-line-shell.d.ts +18 -0
- package/es/react/prompt-line-shell.js +36 -0
- package/es/react/prompt-line-shell.js.map +1 -0
- package/es/react/prompt-line.d.ts +25 -0
- package/es/react/prompt-line.js +52 -0
- package/es/react/prompt-line.js.map +1 -0
- package/es/react/stop-streaming-button.d.ts +11 -0
- package/es/react/stop-streaming-button.js +28 -0
- package/es/react/stop-streaming-button.js.map +1 -0
- package/es/react/toolbar.js +1 -1
- package/es/react/transcript.js +0 -1
- package/es/react/transcript.js.map +1 -1
- package/es/react/utils/transformSuggestionConfig.d.ts +21 -0
- package/es/react/utils/transformSuggestionConfig.js +67 -0
- package/es/react/utils/transformSuggestionConfig.js.map +1 -0
- package/es/react/video-player.js +0 -1
- package/es/react/video-player.js.map +1 -1
- package/es/testing/PageObjectId.js +1 -2
- package/es/testing/PageObjectId.js.map +1 -1
- package/es-custom/components/audio-player/src/audio-player.js +0 -1
- package/es-custom/components/audio-player/src/audio-player.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/base-provider.js +0 -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 +0 -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 +0 -1
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.js.map +1 -1
- package/es-custom/components/audio-player/src/transcript.js +1 -1
- package/es-custom/components/audio-player/src/transcript.js.map +1 -1
- package/es-custom/components/audio-player/src/utils/url-detector.js +0 -1
- package/es-custom/components/audio-player/src/utils/url-detector.js.map +1 -1
- package/es-custom/components/autocomplete/index.d.ts +15 -0
- package/es-custom/components/autocomplete/index.js +11 -0
- package/es-custom/components/autocomplete/index.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete-item-group.d.ts +44 -0
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js +139 -0
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js +13 -0
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete-item.d.ts +54 -0
- package/es-custom/components/autocomplete/src/autocomplete-item.js +197 -0
- package/es-custom/components/autocomplete/src/autocomplete-item.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js +13 -0
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete.d.ts +97 -0
- package/es-custom/components/autocomplete/src/autocomplete.js +321 -0
- package/es-custom/components/autocomplete/src/autocomplete.js.map +1 -0
- package/es-custom/components/autocomplete/src/autocomplete.scss.js +13 -0
- package/es-custom/components/autocomplete/src/autocomplete.scss.js.map +1 -0
- package/es-custom/components/card/src/card.scss.js +1 -1
- package/es-custom/components/chat-history/src/chat-history.scss.js +1 -1
- package/es-custom/components/chat-shell/src/chat-header.js +0 -1
- package/es-custom/components/chat-shell/src/chat-header.js.map +1 -1
- package/es-custom/components/chat-shell/src/corner-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/corner-manager.js +1 -2
- package/es-custom/components/chat-shell/src/corner-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/initialization-manager.js +1 -2
- package/es-custom/components/chat-shell/src/initialization-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.js +0 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.js.map +1 -1
- package/es-custom/components/chat-shell/src/shell.js +2 -2
- package/es-custom/components/chat-shell/src/shell.js.map +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.d.ts +1 -1
- package/es-custom/components/chat-shell/src/slot-observer.js +1 -2
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager-utils.d.ts +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager-utils.js +1 -2
- package/es-custom/components/chat-shell/src/workspace-manager-utils.js.map +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js +1 -2
- package/es-custom/components/chat-shell/src/workspace-manager.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +11 -0
- package/es-custom/components/code-snippet/src/code-snippet.js +37 -5
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.js +5 -0
- package/es-custom/components/code-snippet/src/codemirror/theme.js.map +1 -1
- package/es-custom/components/code-snippet/src/layout-utils.js +21 -8
- package/es-custom/components/code-snippet/src/layout-utils.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.js +1 -0
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.scss.js +1 -1
- package/es-custom/components/file-uploads/index.d.ts +12 -0
- package/es-custom/components/file-uploads/index.js +10 -0
- package/es-custom/components/file-uploads/index.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-upload-item.d.ts +43 -0
- package/es-custom/components/file-uploads/src/file-upload-item.js +267 -0
- package/es-custom/components/file-uploads/src/file-upload-item.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-upload-item.scss.js +13 -0
- package/es-custom/components/file-uploads/src/file-upload-item.scss.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-uploads.d.ts +87 -0
- package/es-custom/components/file-uploads/src/file-uploads.js +213 -0
- package/es-custom/components/file-uploads/src/file-uploads.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-uploads.scss.js +13 -0
- package/es-custom/components/file-uploads/src/file-uploads.scss.js.map +1 -0
- package/es-custom/components/markdown/index.d.ts +1 -0
- package/es-custom/components/markdown/index.js +1 -0
- package/es-custom/components/markdown/index.js.map +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +8 -0
- package/es-custom/components/markdown/src/markdown-token-tree.js +12 -1
- package/es-custom/components/markdown/src/markdown-token-tree.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.js +4 -0
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.scss.js +1 -1
- package/es-custom/components/prompt-line/index.d.ts +26 -0
- package/es-custom/components/prompt-line/index.js +32 -0
- package/es-custom/components/prompt-line/index.js.map +1 -0
- package/es-custom/components/prompt-line/src/autocomplete-controller.d.ts +178 -0
- package/es-custom/components/prompt-line/src/autocomplete-controller.js +548 -0
- package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -0
- package/es-custom/components/prompt-line/src/error-message.d.ts +50 -0
- package/es-custom/components/prompt-line/src/error-message.js +144 -0
- package/es-custom/components/prompt-line/src/error-message.js.map +1 -0
- package/es-custom/components/prompt-line/src/error-message.scss.js +13 -0
- package/es-custom/components/prompt-line/src/error-message.scss.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-constants.d.ts +17 -0
- package/es-custom/components/prompt-line/src/prompt-line-constants.js +27 -0
- package/es-custom/components/prompt-line/src/prompt-line-constants.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +155 -0
- package/es-custom/components/prompt-line/src/prompt-line-controller.js +394 -0
- package/es-custom/components/prompt-line/src/prompt-line-controller.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.d.ts +34 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js +51 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.d.ts +14 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +340 -0
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-shell.d.ts +72 -0
- package/es-custom/components/prompt-line/src/prompt-line-shell.js +227 -0
- package/es-custom/components/prompt-line/src/prompt-line-shell.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +13 -0
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line.d.ts +147 -0
- package/es-custom/components/prompt-line/src/prompt-line.js +391 -0
- package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -0
- package/es-custom/components/prompt-line/src/prompt-line.scss.js +13 -0
- package/es-custom/components/prompt-line/src/prompt-line.scss.js.map +1 -0
- package/es-custom/components/prompt-line/src/send-control.d.ts +46 -0
- package/es-custom/components/prompt-line/src/send-control.js +138 -0
- package/es-custom/components/prompt-line/src/send-control.js.map +1 -0
- package/es-custom/components/prompt-line/src/send-control.scss.js +13 -0
- package/es-custom/components/prompt-line/src/send-control.scss.js.map +1 -0
- package/es-custom/components/prompt-line/src/stop-streaming-button.d.ts +42 -0
- package/es-custom/components/prompt-line/src/stop-streaming-button.js +93 -0
- package/es-custom/components/prompt-line/src/stop-streaming-button.js.map +1 -0
- package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js +13 -0
- package/es-custom/components/prompt-line/src/stop-streaming-button.scss.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.d.ts +30 -0
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js +38 -0
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +21 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js +127 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.d.ts +19 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +237 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +22 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +64 -0
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.d.ts +17 -0
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.js +46 -0
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.d.ts +18 -0
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.js +83 -0
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/index.d.ts +42 -0
- package/es-custom/components/prompt-line/src/tiptap/index.js +43 -0
- package/es-custom/components/prompt-line/src/tiptap/index.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/json-utils.d.ts +61 -0
- package/es-custom/components/prompt-line/src/tiptap/json-utils.js +158 -0
- package/es-custom/components/prompt-line/src/tiptap/json-utils.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/keymap.d.ts +31 -0
- package/es-custom/components/prompt-line/src/tiptap/keymap.js +59 -0
- package/es-custom/components/prompt-line/src/tiptap/keymap.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.d.ts +11 -0
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.js +33 -0
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.d.ts +16 -0
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js +85 -0
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +87 -0
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js +41 -0
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.d.ts +57 -0
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js +95 -0
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.d.ts +36 -0
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.js +41 -0
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.d.ts +30 -0
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js +44 -0
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/types.d.ts +161 -0
- package/es-custom/components/prompt-line/src/tiptap/types.js +8 -0
- package/es-custom/components/prompt-line/src/tiptap/types.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.d.ts +30 -0
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js +104 -0
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js.map +1 -0
- package/es-custom/components/prompt-line/src/tiptap/value-sync.d.ts +25 -0
- package/es-custom/components/prompt-line/src/tiptap/value-sync.js +65 -0
- package/es-custom/components/prompt-line/src/tiptap/value-sync.js.map +1 -0
- package/es-custom/components/prompt-line/src/types.d.ts +100 -0
- package/es-custom/components/prompt-line/src/types.js +50 -0
- package/es-custom/components/prompt-line/src/types.js.map +1 -0
- package/es-custom/components/shared/media-utils/script-loader.js +0 -1
- package/es-custom/components/shared/media-utils/script-loader.js.map +1 -1
- package/es-custom/components/video-player/src/providers/base-provider.js +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -1
- package/es-custom/components/video-player/src/video-player.js.map +1 -1
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +0 -1
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js.map +1 -1
- package/es-custom/globals/utils/aria-announcer-manager.d.ts +62 -0
- package/es-custom/globals/utils/aria-announcer-manager.js +125 -0
- package/es-custom/globals/utils/aria-announcer-manager.js.map +1 -0
- package/es-custom/globals/utils/browser-utils.d.ts +10 -0
- package/es-custom/globals/utils/browser-utils.js +37 -0
- package/es-custom/globals/utils/browser-utils.js.map +1 -0
- package/es-custom/globals/utils/dom-utils.d.ts +6 -0
- package/es-custom/globals/utils/dom-utils.js +39 -0
- package/es-custom/globals/utils/dom-utils.js.map +1 -0
- package/{es/react → es-custom/globals}/utils/iconTransform.js +1 -2
- package/es-custom/globals/utils/iconTransform.js.map +1 -0
- package/es-custom/react/__tests__/jest.setup.js +1 -2
- package/es-custom/react/__tests__/jest.setup.js.map +1 -1
- package/es-custom/react/audio-player.js +0 -1
- package/es-custom/react/audio-player.js.map +1 -1
- package/es-custom/react/autocomplete.d.ts +11 -0
- package/es-custom/react/autocomplete.js +36 -0
- package/es-custom/react/autocomplete.js.map +1 -0
- package/es-custom/react/chat-header.js +1 -1
- package/es-custom/react/code-snippet.js +1 -1
- package/es-custom/react/error-message.d.ts +11 -0
- package/es-custom/react/error-message.js +28 -0
- package/es-custom/react/error-message.js.map +1 -0
- package/es-custom/react/file-uploads.d.ts +11 -0
- package/es-custom/react/file-uploads.js +31 -0
- package/es-custom/react/file-uploads.js.map +1 -0
- package/es-custom/react/hooks/useChatAutocomplete.d.ts +41 -0
- package/es-custom/react/hooks/useChatAutocomplete.js +178 -0
- package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -0
- package/es-custom/react/input-send-control.d.ts +11 -0
- package/es-custom/react/input-send-control.js +32 -0
- package/es-custom/react/input-send-control.js.map +1 -0
- package/es-custom/react/prompt-line-shell.d.ts +18 -0
- package/es-custom/react/prompt-line-shell.js +36 -0
- package/es-custom/react/prompt-line-shell.js.map +1 -0
- package/es-custom/react/prompt-line.d.ts +25 -0
- package/es-custom/react/prompt-line.js +52 -0
- package/es-custom/react/prompt-line.js.map +1 -0
- package/es-custom/react/stop-streaming-button.d.ts +11 -0
- package/es-custom/react/stop-streaming-button.js +28 -0
- package/es-custom/react/stop-streaming-button.js.map +1 -0
- package/es-custom/react/toolbar.js +1 -1
- package/es-custom/react/transcript.js +0 -1
- package/es-custom/react/transcript.js.map +1 -1
- package/es-custom/react/utils/transformSuggestionConfig.d.ts +21 -0
- package/es-custom/react/utils/transformSuggestionConfig.js +67 -0
- package/es-custom/react/utils/transformSuggestionConfig.js.map +1 -0
- package/es-custom/react/video-player.js +0 -1
- package/es-custom/react/video-player.js.map +1 -1
- package/es-custom/testing/PageObjectId.js +1 -2
- package/es-custom/testing/PageObjectId.js.map +1 -1
- package/package.json +24 -3
- package/scss/_custom-properties.scss +1 -3
- package/scss/_tokens-component.scss +1 -3
- package/scss/_tokens-layout.scss +1 -3
- package/scss/_utilities.scss +1 -3
- package/LICENSE +0 -201
- package/es/components/chat-shell/src/aria-announcer-manager.d.ts +0 -40
- package/es/components/chat-shell/src/aria-announcer-manager.js +0 -104
- package/es/components/chat-shell/src/aria-announcer-manager.js.map +0 -1
- package/es/react/utils/iconTransform.js.map +0 -1
- package/es-custom/components/chat-shell/src/aria-announcer-manager.d.ts +0 -40
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js +0 -104
- package/es-custom/components/chat-shell/src/aria-announcer-manager.js.map +0 -1
- package/es-custom/react/utils/iconTransform.js.map +0 -1
- /package/es/{react → globals}/utils/iconTransform.d.ts +0 -0
- /package/es-custom/{react → globals}/utils/iconTransform.d.ts +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { unsafeCSS, css, LitElement, html } from 'lit';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
|
12
|
+
import { iconLoader } from '@carbon/web-components/es-custom/globals/internal/icon-loader.js';
|
|
13
|
+
import WarningFilled16 from '@carbon/icons/es/warning--filled/16.js';
|
|
14
|
+
import ChevronDown16 from '@carbon/icons/es/chevron--down/16.js';
|
|
15
|
+
import ChevronUp16 from '@carbon/icons/es/chevron--up/16.js';
|
|
16
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
17
|
+
import prefix from '../../../globals/settings.js';
|
|
18
|
+
import styles from './error-message.scss.js';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @license
|
|
22
|
+
*
|
|
23
|
+
* Copyright IBM Corp. 2026
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
const blockClass = `${prefix}-error-message`;
|
|
29
|
+
/**
|
|
30
|
+
* Error message component for AI Chat prompt line.
|
|
31
|
+
*
|
|
32
|
+
* @element cds-custom-aichat-error-message
|
|
33
|
+
*/
|
|
34
|
+
let ErrorMessage = class ErrorMessage extends LitElement {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
/**
|
|
38
|
+
* The error title text to display.
|
|
39
|
+
*/
|
|
40
|
+
this.title = "";
|
|
41
|
+
/**
|
|
42
|
+
* The error description text to display.
|
|
43
|
+
*/
|
|
44
|
+
this.description = "";
|
|
45
|
+
/**
|
|
46
|
+
* Whether the error message is collapsible.
|
|
47
|
+
*/
|
|
48
|
+
this.collapsible = false;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the prompt line has alternate layout for expanded mode and/or message actions.
|
|
51
|
+
*/
|
|
52
|
+
this.actionsLayout = false;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the error message is in fullscreen layout.
|
|
55
|
+
*/
|
|
56
|
+
this.fullscreen = false;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the error message is currently expanded.
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
this._isExpanded = true;
|
|
62
|
+
}
|
|
63
|
+
updated(changedProps) {
|
|
64
|
+
super.updated(changedProps);
|
|
65
|
+
if (changedProps.has("collapsible")) {
|
|
66
|
+
this._isExpanded = !this.collapsible;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Toggles the expanded state to show more or less of the error message.
|
|
71
|
+
*/
|
|
72
|
+
_handleClickExpanded() {
|
|
73
|
+
this._isExpanded = !this._isExpanded;
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
const warningIcon = html `<span class="${blockClass}__warning-icon">
|
|
77
|
+
${iconLoader(WarningFilled16)}
|
|
78
|
+
</span>`;
|
|
79
|
+
const hasChevron = this.collapsible && this.description;
|
|
80
|
+
let expandButton = null;
|
|
81
|
+
if (hasChevron) {
|
|
82
|
+
const icon = this._isExpanded ? ChevronUp16 : ChevronDown16;
|
|
83
|
+
const label = `${this._isExpanded ? "Collapse" : "Expand"} error message`;
|
|
84
|
+
expandButton = html `<cds-custom-icon-button
|
|
85
|
+
class="${blockClass}__chevron"
|
|
86
|
+
kind="ghost"
|
|
87
|
+
size="sm"
|
|
88
|
+
align="top-end"
|
|
89
|
+
aria-label="${label}"
|
|
90
|
+
@click="${this._handleClickExpanded}"
|
|
91
|
+
>
|
|
92
|
+
${iconLoader(icon, { slot: "icon", focusable: "true", tabindex: "-1" })}
|
|
93
|
+
<span slot="tooltip-content">${label}</span>
|
|
94
|
+
</cds-custom-icon-button>`;
|
|
95
|
+
}
|
|
96
|
+
return html `
|
|
97
|
+
<div class="${blockClass}">
|
|
98
|
+
<div
|
|
99
|
+
class="${blockClass}__warning-icon-and-text${!hasChevron
|
|
100
|
+
? ` ${blockClass}__warning-icon-and-text--no-chevron`
|
|
101
|
+
: ""}"
|
|
102
|
+
>
|
|
103
|
+
${this.fullscreen ? null : warningIcon}
|
|
104
|
+
<div
|
|
105
|
+
class="${blockClass}__text${this._isExpanded ? ` ${blockClass}__text--expanded` : ""}"
|
|
106
|
+
>
|
|
107
|
+
${this.title}<br />
|
|
108
|
+
${this._isExpanded ? this.description : ""}
|
|
109
|
+
</div>
|
|
110
|
+
${this.fullscreen ? warningIcon : null}
|
|
111
|
+
</div>
|
|
112
|
+
${expandButton}
|
|
113
|
+
</div>
|
|
114
|
+
`;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
ErrorMessage.styles = css `
|
|
118
|
+
${unsafeCSS(styles)}
|
|
119
|
+
`;
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: String, attribute: "title" })
|
|
122
|
+
], ErrorMessage.prototype, "title", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: String, attribute: "description" })
|
|
125
|
+
], ErrorMessage.prototype, "description", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: Boolean, attribute: "collapsible" })
|
|
128
|
+
], ErrorMessage.prototype, "collapsible", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: Boolean, reflect: true, attribute: "actions-layout" })
|
|
131
|
+
], ErrorMessage.prototype, "actionsLayout", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: Boolean, attribute: "fullscreen" })
|
|
134
|
+
], ErrorMessage.prototype, "fullscreen", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
state()
|
|
137
|
+
], ErrorMessage.prototype, "_isExpanded", void 0);
|
|
138
|
+
ErrorMessage = __decorate([
|
|
139
|
+
carbonElement(`${prefix}-error-message`)
|
|
140
|
+
], ErrorMessage);
|
|
141
|
+
var ErrorMessage$1 = ErrorMessage;
|
|
142
|
+
|
|
143
|
+
export { ErrorMessage$1 as default };
|
|
144
|
+
//# sourceMappingURL=error-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-message.js","sources":["../../../../src/components/prompt-line/src/error-message.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([".cds-custom-aichat-error-message{align-items:flex-start;box-sizing:border-box;display:flex;gap:.5rem;inline-size:100%;position:relative}.cds-custom-aichat-error-message:after{background:var(--cds-border-subtle-00,#e0e0e0);block-size:1px;content:\"\";display:block;inline-size:calc(100% + 1.5rem);inset-block-end:0;inset-inline-start:-1rem;position:absolute;z-index:-1}:host([actions-layout]) .cds-custom-aichat-error-message{padding-inline-start:.5rem}:host([actions-layout]) .cds-custom-aichat-error-message:after{inline-size:calc(100% + 1rem);inset-inline-start:-.5rem}.cds-custom-aichat-error-message__warning-icon-and-text{align-items:flex-start;display:flex;flex:1;gap:1rem;margin-block-start:.75rem}.cds-custom-aichat-error-message__warning-icon-and-text--no-chevron{margin-inline-end:.5rem}:host([fullscreen]).cds-custom-aichat-error-message__warning-icon-and-text--no-chevron{margin-inline-end:1rem}.cds-custom-aichat-error-message__warning-icon{align-items:center;display:flex}.cds-custom-aichat-error-message__warning-icon svg{fill:var(--cds-support-error,#da1e28)}.cds-custom-aichat-error-message__text{color:var(--cds-support-error,#da1e28);flex:1;font-size:var(--cds-helper-text-01-font-size,.75rem);letter-spacing:var(--cds-helper-text-01-letter-spacing,.32px);line-height:var(--cds-helper-text-01-line-height,1.33333);max-block-size:1rem;overflow:hidden;padding-block-end:.75rem;text-overflow:ellipsis;white-space:nowrap}.cds-custom-aichat-error-message__text--expanded{max-block-size:5rem;overflow-y:auto;text-overflow:clip;white-space:normal}.cds-custom-aichat-error-message__chevron{margin-block:.25rem}.cds-custom-aichat-error-message__chevron svg{fill:var(--cds-icon-primary,#161616);pointer-events:none}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=error-message.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-message.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 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
|
+
/**
|
|
10
|
+
* Max block size the prompt line grows to before it caps and shows a vertical
|
|
11
|
+
* scrollbar. Shared by both editing surfaces — the lite `<textarea>`
|
|
12
|
+
* ([./prompt-line-controller.ts]) and the rich Tiptap content node
|
|
13
|
+
* ([./tiptap/editor-styles.ts]) — so the two modes cap at the same height and
|
|
14
|
+
* the textarea→rich swap stays imperceptible. Keep them reading this one
|
|
15
|
+
* constant so they can't drift.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PROMPT_LINE_MAX_BLOCK_SIZE = "157px";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
*
|
|
11
|
+
* Copyright IBM Corp. 2026
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Max block size the prompt line grows to before it caps and shows a vertical
|
|
18
|
+
* scrollbar. Shared by both editing surfaces — the lite `<textarea>`
|
|
19
|
+
* ([./prompt-line-controller.ts]) and the rich Tiptap content node
|
|
20
|
+
* ([./tiptap/editor-styles.ts]) — so the two modes cap at the same height and
|
|
21
|
+
* the textarea→rich swap stays imperceptible. Keep them reading this one
|
|
22
|
+
* constant so they can't drift.
|
|
23
|
+
*/
|
|
24
|
+
const PROMPT_LINE_MAX_BLOCK_SIZE = "157px";
|
|
25
|
+
|
|
26
|
+
export { PROMPT_LINE_MAX_BLOCK_SIZE };
|
|
27
|
+
//# sourceMappingURL=prompt-line-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-line-constants.js","sources":["../../../../src/components/prompt-line/src/prompt-line-constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;;;;;;;AAOG;AACI,MAAM,0BAA0B,GAAG;;;;"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright IBM Corp. 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
|
+
/**
|
|
10
|
+
* Editing-surface controller abstraction for `<cds-custom-aichat-prompt-line>`.
|
|
11
|
+
*
|
|
12
|
+
* The prompt-line shell ([./prompt-line.ts]) delegates all editing behavior to
|
|
13
|
+
* a `PromptLineController`. Two implementations exist:
|
|
14
|
+
*
|
|
15
|
+
* - `TextareaController` (this file) — a Tiptap-free `<textarea>`. It is the
|
|
16
|
+
* default and keeps the shell's static import graph free of `@tiptap/*`.
|
|
17
|
+
* - The rich controller ([./prompt-line-rich-runtime.ts]) — a Tiptap `Editor`,
|
|
18
|
+
* reached only through a dynamic `import()` so Tiptap lands in its own lazy
|
|
19
|
+
* chunk.
|
|
20
|
+
*
|
|
21
|
+
* Both controllers emit the **same** `cds-custom-aichat-prompt-*` events with the
|
|
22
|
+
* same detail shapes, so the React wrapper and `@carbon/ai-chat`'s `Input`
|
|
23
|
+
* handlers are identical regardless of mode. The shell can swap a
|
|
24
|
+
* `TextareaController` for the rich controller in place (text, caret, and
|
|
25
|
+
* focus transfer losslessly because the textarea holds plain text).
|
|
26
|
+
*
|
|
27
|
+
* `Editor` / `JSONContent` are **type-only** imports here — erased at compile,
|
|
28
|
+
* so this module carries no Tiptap runtime.
|
|
29
|
+
*/
|
|
30
|
+
import type { Editor, Extension, JSONContent } from "@tiptap/core";
|
|
31
|
+
/** Updater shape accepted by `setContent` for reduce-style edits. */
|
|
32
|
+
export type SetContentUpdater = (prev: JSONContent) => JSONContent;
|
|
33
|
+
/** Initial state handed to a controller when it mounts into the host. */
|
|
34
|
+
export interface PromptLineControllerInit {
|
|
35
|
+
/**
|
|
36
|
+
* Plain-text seed value. Always the textarea's source of truth and the
|
|
37
|
+
* lossless seed used when the rich editor mounts without richer `content`.
|
|
38
|
+
*/
|
|
39
|
+
value: string;
|
|
40
|
+
/**
|
|
41
|
+
* Optional structured seed (a `content` prop carrying mentions / custom
|
|
42
|
+
* nodes). Consumed by the rich controller; the textarea ignores it and
|
|
43
|
+
* relies on `value`.
|
|
44
|
+
*/
|
|
45
|
+
content?: JSONContent | string;
|
|
46
|
+
placeholder: string;
|
|
47
|
+
/** When `true`, the surface is non-editable (still focusable). */
|
|
48
|
+
disabled: boolean;
|
|
49
|
+
ariaLabel: string;
|
|
50
|
+
testId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Host-supplied Tiptap extensions. Consumed by the rich controller; ignored
|
|
53
|
+
* by the textarea controller.
|
|
54
|
+
*/
|
|
55
|
+
extensions?: Extension[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The surface the shell drives. Both the textarea and the rich editor satisfy
|
|
59
|
+
* it, so the shell never branches on mode beyond construction.
|
|
60
|
+
*/
|
|
61
|
+
export interface PromptLineController {
|
|
62
|
+
/** Mount the editing surface into the (already-slotted) light-DOM host. */
|
|
63
|
+
mount(host: HTMLElement, init: PromptLineControllerInit): void;
|
|
64
|
+
/** Tear down listeners / editor and remove the surface from the host. */
|
|
65
|
+
destroy(): void;
|
|
66
|
+
/** Current plain-text value (the lossless transfer + change payload). */
|
|
67
|
+
getValue(): string;
|
|
68
|
+
setContent(next: JSONContent | string | SetContentUpdater): void;
|
|
69
|
+
insertContent(content: JSONContent | string, opts?: {
|
|
70
|
+
at?: number;
|
|
71
|
+
}): void;
|
|
72
|
+
clearContent(): void;
|
|
73
|
+
/** Live Tiptap editor, or `null` in textarea mode. */
|
|
74
|
+
getEditor(): Editor | null;
|
|
75
|
+
focus(): void;
|
|
76
|
+
blur(): void;
|
|
77
|
+
hasFocus(): boolean;
|
|
78
|
+
/** Selection as plain-text offsets (used for seamless transfer). */
|
|
79
|
+
getSelection(): {
|
|
80
|
+
from: number;
|
|
81
|
+
to: number;
|
|
82
|
+
};
|
|
83
|
+
setTextSelection(pos: number | {
|
|
84
|
+
from: number;
|
|
85
|
+
to: number;
|
|
86
|
+
}): void;
|
|
87
|
+
selectAll(): void;
|
|
88
|
+
setEditable(editable: boolean): void;
|
|
89
|
+
setPlaceholder(placeholder: string): void;
|
|
90
|
+
setAriaLabel(ariaLabel: string): void;
|
|
91
|
+
setTestId(testId: string): void;
|
|
92
|
+
/**
|
|
93
|
+
* Apply a new host-extension list. Rich mode recreates the editor preserving
|
|
94
|
+
* content/selection/focus; textarea mode ignores it.
|
|
95
|
+
*/
|
|
96
|
+
setExtensions(extensions: Extension[]): void;
|
|
97
|
+
undo(): boolean;
|
|
98
|
+
redo(): boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* `<textarea>`-backed controller. Tiptap-free; emits the same prompt events as
|
|
102
|
+
* the rich editor. Auto-grows via a hidden mirror, capped at
|
|
103
|
+
* `PROMPT_LINE_MAX_BLOCK_SIZE` with the field scrolling past it — the same cap
|
|
104
|
+
* the rich contenteditable applies (see ./tiptap/editor-styles.ts), so the
|
|
105
|
+
* textarea→rich swap is imperceptible.
|
|
106
|
+
*/
|
|
107
|
+
export declare class TextareaController implements PromptLineController {
|
|
108
|
+
private _wrap;
|
|
109
|
+
private _textarea;
|
|
110
|
+
private _mirror;
|
|
111
|
+
private _host;
|
|
112
|
+
private _focusFromMouse;
|
|
113
|
+
private _isTyping;
|
|
114
|
+
private _typingTimer;
|
|
115
|
+
mount(host: HTMLElement, init: PromptLineControllerInit): void;
|
|
116
|
+
destroy(): void;
|
|
117
|
+
getValue(): string;
|
|
118
|
+
setContent(next: JSONContent | string | SetContentUpdater): void;
|
|
119
|
+
insertContent(content: JSONContent | string, opts?: {
|
|
120
|
+
at?: number;
|
|
121
|
+
}): void;
|
|
122
|
+
clearContent(): void;
|
|
123
|
+
getEditor(): Editor | null;
|
|
124
|
+
focus(): void;
|
|
125
|
+
blur(): void;
|
|
126
|
+
hasFocus(): boolean;
|
|
127
|
+
getSelection(): {
|
|
128
|
+
from: number;
|
|
129
|
+
to: number;
|
|
130
|
+
};
|
|
131
|
+
setTextSelection(pos: number | {
|
|
132
|
+
from: number;
|
|
133
|
+
to: number;
|
|
134
|
+
}): void;
|
|
135
|
+
selectAll(): void;
|
|
136
|
+
setEditable(editable: boolean): void;
|
|
137
|
+
setPlaceholder(placeholder: string): void;
|
|
138
|
+
setAriaLabel(ariaLabel: string): void;
|
|
139
|
+
setTestId(testId: string): void;
|
|
140
|
+
setExtensions(_extensions: Extension[]): void;
|
|
141
|
+
undo(): boolean;
|
|
142
|
+
redo(): boolean;
|
|
143
|
+
private _onInput;
|
|
144
|
+
private _onKeydown;
|
|
145
|
+
private _setMouseFlag;
|
|
146
|
+
private _onFocus;
|
|
147
|
+
private _onBlur;
|
|
148
|
+
/** Programmatic value write: updates the field, mirror, and emits change. */
|
|
149
|
+
private _setValue;
|
|
150
|
+
private _emitChange;
|
|
151
|
+
private _syncMirror;
|
|
152
|
+
private _markTyping;
|
|
153
|
+
private _clearTypingTimer;
|
|
154
|
+
private _dispatch;
|
|
155
|
+
}
|