@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,391 @@
|
|
|
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 } from 'lit/decorators.js';
|
|
11
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
12
|
+
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import { adoptOnRoot } from '../../shared/dynamic-css-var-sheet.js';
|
|
14
|
+
import { TextareaController } from './prompt-line-controller.js';
|
|
15
|
+
import { getRichRuntimeIfLoaded, loadRichRuntime } from './prompt-line-rich-loader.js';
|
|
16
|
+
import { getRawText } from './tiptap/json-utils.js';
|
|
17
|
+
import styles from './prompt-line.scss.js';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @license
|
|
21
|
+
*
|
|
22
|
+
* Copyright IBM Corp. 2026
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/
|
|
27
|
+
let PromptLineElement = class PromptLineElement extends LitElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
/**
|
|
31
|
+
* Host-supplied Tiptap extensions, appended to the carbon bundle when the
|
|
32
|
+
* rich editor mounts. These are *staged*, not a rich-mode trigger: setting
|
|
33
|
+
* them while in textarea mode does not load Tiptap. Select rich explicitly
|
|
34
|
+
* with `rich` or call `ensureEditor()`; the upgrade mounts with these
|
|
35
|
+
* already installed. Memoize on the host side — a reference change recreates
|
|
36
|
+
* a live editor.
|
|
37
|
+
*/
|
|
38
|
+
this.extensions = [];
|
|
39
|
+
/**
|
|
40
|
+
* Selects the rich Tiptap editor. The element lazy-loads Tiptap and upgrades
|
|
41
|
+
* the textarea in place; the upgrade is sticky (clearing `rich` later keeps
|
|
42
|
+
* the editor). Defaults to the textarea.
|
|
43
|
+
*/
|
|
44
|
+
this.rich = false;
|
|
45
|
+
/** Disables editing. The surface stays mounted but non-editable. */
|
|
46
|
+
this.disabled = false;
|
|
47
|
+
/** Placeholder text shown when the surface is empty. */
|
|
48
|
+
this.placeholder = "";
|
|
49
|
+
/** Accessible label for the editing surface. */
|
|
50
|
+
this.ariaLabel = "";
|
|
51
|
+
/** Test id, applied to the inner editable element. */
|
|
52
|
+
this.testId = "";
|
|
53
|
+
/** Focus the surface on mount. */
|
|
54
|
+
this.autofocus = false;
|
|
55
|
+
this._controller = null;
|
|
56
|
+
this._mode = "textarea";
|
|
57
|
+
this._editorHost = null;
|
|
58
|
+
this._lastExtensionsRef = null;
|
|
59
|
+
/** Sticky latch — once rich is wanted it never reverts. */
|
|
60
|
+
this._richLatched = false;
|
|
61
|
+
this._upgrading = false;
|
|
62
|
+
this._isComposing = false;
|
|
63
|
+
this._pendingUpgrade = false;
|
|
64
|
+
/**
|
|
65
|
+
* Shared promise for in-flight `ensureEditor()` callers. Created lazily on the
|
|
66
|
+
* first `ensureEditor()` call that needs an upgrade, settled once the rich
|
|
67
|
+
* editor is mounted (`_swapToRich`) or the upgrade can't complete.
|
|
68
|
+
*/
|
|
69
|
+
this._richReady = null;
|
|
70
|
+
this._resolveRichReady = null;
|
|
71
|
+
this._rejectRichReady = null;
|
|
72
|
+
this._onCompositionStart = () => {
|
|
73
|
+
this._isComposing = true;
|
|
74
|
+
};
|
|
75
|
+
this._onCompositionEnd = () => {
|
|
76
|
+
this._isComposing = false;
|
|
77
|
+
if (this._pendingUpgrade) {
|
|
78
|
+
this._pendingUpgrade = false;
|
|
79
|
+
void this._upgradeToRich();
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Lifecycle
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
firstUpdated() {
|
|
87
|
+
const host = this._mountEditorHost();
|
|
88
|
+
this._lastExtensionsRef = this.extensions;
|
|
89
|
+
this._richLatched = this._wantsRich();
|
|
90
|
+
const warmRuntime = this._richLatched ? getRichRuntimeIfLoaded() : null;
|
|
91
|
+
if (warmRuntime) {
|
|
92
|
+
// Runtime already loaded (e.g. preloaded at boot) — mount rich directly,
|
|
93
|
+
// no textarea flash.
|
|
94
|
+
this._mode = "rich";
|
|
95
|
+
this._controller = warmRuntime.createRichController();
|
|
96
|
+
this._controller.mount(host, this._makeInit());
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this._mode = "textarea";
|
|
100
|
+
this._controller = new TextareaController();
|
|
101
|
+
this._controller.mount(host, this._makeInit());
|
|
102
|
+
if (this._richLatched) {
|
|
103
|
+
void this._upgradeToRich();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (this.autofocus) {
|
|
107
|
+
// Defer so consumer listeners are attached first.
|
|
108
|
+
Promise.resolve().then(() => this._controller?.focus());
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
updated(changed) {
|
|
112
|
+
if (!this._controller) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if ((changed.has("rich") || changed.has("extensions")) &&
|
|
116
|
+
this._wantsRich()) {
|
|
117
|
+
this._richLatched = true;
|
|
118
|
+
if (this._mode === "textarea") {
|
|
119
|
+
void this._upgradeToRich();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (changed.has("extensions") &&
|
|
123
|
+
this.extensions !== this._lastExtensionsRef) {
|
|
124
|
+
this._lastExtensionsRef = this.extensions;
|
|
125
|
+
if (this._mode === "rich") {
|
|
126
|
+
this._controller.setExtensions(this.extensions);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (changed.has("disabled")) {
|
|
130
|
+
this._controller.setEditable(!this.disabled);
|
|
131
|
+
}
|
|
132
|
+
if (changed.has("content") && !changed.has("extensions")) {
|
|
133
|
+
this._controller.setContent(this.content ?? "");
|
|
134
|
+
}
|
|
135
|
+
if (changed.has("placeholder")) {
|
|
136
|
+
this._controller.setPlaceholder(this.placeholder);
|
|
137
|
+
}
|
|
138
|
+
if (changed.has("testId")) {
|
|
139
|
+
this._controller.setTestId(this.testId);
|
|
140
|
+
}
|
|
141
|
+
if (changed.has("ariaLabel")) {
|
|
142
|
+
this._controller.setAriaLabel(this.ariaLabel);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
disconnectedCallback() {
|
|
146
|
+
super.disconnectedCallback();
|
|
147
|
+
this._failRichReady(new Error("Input is not currently rendered"));
|
|
148
|
+
this._controller?.destroy();
|
|
149
|
+
this._controller = null;
|
|
150
|
+
this._editorHost?.remove();
|
|
151
|
+
this._editorHost = null;
|
|
152
|
+
this._lastExtensionsRef = null;
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
return html `
|
|
156
|
+
<div class="frame">
|
|
157
|
+
<slot name="editor"></slot>
|
|
158
|
+
</div>
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
// ---------------------------------------------------------------------------
|
|
162
|
+
// Public methods (delegate to the active controller)
|
|
163
|
+
// ---------------------------------------------------------------------------
|
|
164
|
+
/** Returns the live Tiptap editor, or `null` in textarea mode. */
|
|
165
|
+
getEditor() {
|
|
166
|
+
return this._controller?.getEditor() ?? null;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Lazily load Tiptap (if not already loaded), upgrade the textarea to the
|
|
170
|
+
* rich editor in place, and resolve with the live editor. Resolves
|
|
171
|
+
* immediately when already rich. Rejects when the surface isn't mounted or
|
|
172
|
+
* the runtime can't load (SSR). Concurrent callers share one in-flight
|
|
173
|
+
* upgrade.
|
|
174
|
+
*/
|
|
175
|
+
ensureEditor() {
|
|
176
|
+
if (this._mode === "rich") {
|
|
177
|
+
const editor = this._controller?.getEditor();
|
|
178
|
+
if (editor) {
|
|
179
|
+
return Promise.resolve(editor);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Connected but not yet rendered, or already torn down — nothing to upgrade.
|
|
183
|
+
if (!this._editorHost || !this._controller) {
|
|
184
|
+
return Promise.reject(new Error("Input is not currently rendered"));
|
|
185
|
+
}
|
|
186
|
+
this._richLatched = true;
|
|
187
|
+
if (!this._richReady) {
|
|
188
|
+
this._richReady = new Promise((resolve, reject) => {
|
|
189
|
+
this._resolveRichReady = resolve;
|
|
190
|
+
this._rejectRichReady = reject;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
void this._upgradeToRich();
|
|
194
|
+
return this._richReady;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Current plain-text value. Works in both modes (in rich mode this mirrors
|
|
198
|
+
* `getEditor()?.getText()`), so callers don't need to branch on `getEditor()`
|
|
199
|
+
* being `null`.
|
|
200
|
+
*/
|
|
201
|
+
getValue() {
|
|
202
|
+
return this._controller?.getValue() ?? "";
|
|
203
|
+
}
|
|
204
|
+
focus() {
|
|
205
|
+
this._controller?.focus();
|
|
206
|
+
}
|
|
207
|
+
blur() {
|
|
208
|
+
this._controller?.blur();
|
|
209
|
+
}
|
|
210
|
+
/** Returns `true` if the editing surface currently holds focus. */
|
|
211
|
+
hasFocus() {
|
|
212
|
+
return this._controller?.hasFocus() ?? false;
|
|
213
|
+
}
|
|
214
|
+
clearContent() {
|
|
215
|
+
this._controller?.clearContent();
|
|
216
|
+
}
|
|
217
|
+
setContent(next) {
|
|
218
|
+
this._controller?.setContent(next);
|
|
219
|
+
}
|
|
220
|
+
insertContent(content, opts = {}) {
|
|
221
|
+
this._controller?.insertContent(content, opts);
|
|
222
|
+
}
|
|
223
|
+
setTextSelection(pos) {
|
|
224
|
+
this._controller?.setTextSelection(pos);
|
|
225
|
+
}
|
|
226
|
+
selectAll() {
|
|
227
|
+
this._controller?.selectAll();
|
|
228
|
+
}
|
|
229
|
+
undo() {
|
|
230
|
+
return this._controller?.undo() ?? false;
|
|
231
|
+
}
|
|
232
|
+
redo() {
|
|
233
|
+
return this._controller?.redo() ?? false;
|
|
234
|
+
}
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
// Internals
|
|
237
|
+
// ---------------------------------------------------------------------------
|
|
238
|
+
_wantsRich() {
|
|
239
|
+
return this._richLatched || this.rich;
|
|
240
|
+
}
|
|
241
|
+
_mountEditorHost() {
|
|
242
|
+
const host = document.createElement("div");
|
|
243
|
+
host.setAttribute("slot", "editor");
|
|
244
|
+
host.dataset.aichatEditorHost = "";
|
|
245
|
+
this.appendChild(host);
|
|
246
|
+
this._editorHost = host;
|
|
247
|
+
// Defer an upgrade requested mid-IME-composition so we don't tear the
|
|
248
|
+
// field out from under the user.
|
|
249
|
+
host.addEventListener("compositionstart", this._onCompositionStart);
|
|
250
|
+
host.addEventListener("compositionend", this._onCompositionEnd);
|
|
251
|
+
const root = host.getRootNode();
|
|
252
|
+
if (root instanceof ShadowRoot || root instanceof Document) {
|
|
253
|
+
adoptOnRoot(root);
|
|
254
|
+
}
|
|
255
|
+
return host;
|
|
256
|
+
}
|
|
257
|
+
/** Build the controller init from current props (rich seed by default). */
|
|
258
|
+
_makeInit(valueOverride) {
|
|
259
|
+
const value = valueOverride ??
|
|
260
|
+
(typeof this.content === "string"
|
|
261
|
+
? this.content
|
|
262
|
+
: this.content
|
|
263
|
+
? getRawText(this.content)
|
|
264
|
+
: "");
|
|
265
|
+
return {
|
|
266
|
+
value,
|
|
267
|
+
// On an upgrade we seed losslessly from the textarea's plain text, so
|
|
268
|
+
// the structured `content` prop is only used for the initial mount.
|
|
269
|
+
content: valueOverride === undefined ? this.content : undefined,
|
|
270
|
+
placeholder: this.placeholder,
|
|
271
|
+
disabled: this.disabled,
|
|
272
|
+
ariaLabel: this.ariaLabel,
|
|
273
|
+
testId: this.testId,
|
|
274
|
+
extensions: this.extensions,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
/** Resolve any pending `ensureEditor()` callers with the live editor. */
|
|
278
|
+
_settleRichReady() {
|
|
279
|
+
const editor = this._controller?.getEditor();
|
|
280
|
+
if (editor && this._resolveRichReady) {
|
|
281
|
+
this._resolveRichReady(editor);
|
|
282
|
+
this._resolveRichReady = null;
|
|
283
|
+
this._rejectRichReady = null;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Reject any pending `ensureEditor()` callers and clear the shared promise so
|
|
288
|
+
* a later call can retry.
|
|
289
|
+
*/
|
|
290
|
+
_failRichReady(reason) {
|
|
291
|
+
if (this._rejectRichReady) {
|
|
292
|
+
this._rejectRichReady(reason);
|
|
293
|
+
}
|
|
294
|
+
this._resolveRichReady = null;
|
|
295
|
+
this._rejectRichReady = null;
|
|
296
|
+
this._richReady = null;
|
|
297
|
+
}
|
|
298
|
+
/** Lazily load Tiptap and swap the textarea for the rich editor in place. */
|
|
299
|
+
async _upgradeToRich() {
|
|
300
|
+
if (this._mode === "rich" || this._upgrading) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
this._upgrading = true;
|
|
304
|
+
try {
|
|
305
|
+
const module = getRichRuntimeIfLoaded() ?? (await loadRichRuntime());
|
|
306
|
+
// Bail if disconnected or runtime unavailable (SSR). The `_upgrading`
|
|
307
|
+
// latch already prevents a concurrent upgrade.
|
|
308
|
+
if (!module || !this._editorHost || !this._controller) {
|
|
309
|
+
this._failRichReady(new Error(module
|
|
310
|
+
? "Input is not currently rendered"
|
|
311
|
+
: "Input editor runtime is unavailable"));
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (this._isComposing) {
|
|
315
|
+
// Defer until composition ends; `_richReady` stays pending and settles
|
|
316
|
+
// when `_onCompositionEnd` re-runs the upgrade.
|
|
317
|
+
this._pendingUpgrade = true;
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
this._swapToRich(module.createRichController());
|
|
321
|
+
}
|
|
322
|
+
catch (error) {
|
|
323
|
+
// A failed runtime load or mount must reject pending `ensureEditor()`
|
|
324
|
+
// callers rather than leave them hanging.
|
|
325
|
+
this._failRichReady(error instanceof Error ? error : new Error(String(error)));
|
|
326
|
+
}
|
|
327
|
+
finally {
|
|
328
|
+
this._upgrading = false;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
_swapToRich(rich) {
|
|
332
|
+
const previous = this._controller;
|
|
333
|
+
const host = this._editorHost;
|
|
334
|
+
if (!previous || !host) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const value = previous.getValue();
|
|
338
|
+
const selection = previous.getSelection();
|
|
339
|
+
const hadFocus = previous.hasFocus();
|
|
340
|
+
previous.destroy();
|
|
341
|
+
this._controller = rich;
|
|
342
|
+
this._mode = "rich";
|
|
343
|
+
rich.mount(host, this._makeInit(value));
|
|
344
|
+
// Map plain-text caret offsets into the seeded doc. `textToDoc` makes one
|
|
345
|
+
// paragraph per line, so a position costs +1 for the doc/first-paragraph
|
|
346
|
+
// start plus +1 for every newline before it (each opens a new paragraph).
|
|
347
|
+
const toDocPos = (offset) => offset + 1 + (value.slice(0, offset).split("\n").length - 1);
|
|
348
|
+
rich.setTextSelection({
|
|
349
|
+
from: toDocPos(selection.from),
|
|
350
|
+
to: toDocPos(selection.to),
|
|
351
|
+
});
|
|
352
|
+
if (hadFocus) {
|
|
353
|
+
rich.focus();
|
|
354
|
+
}
|
|
355
|
+
this._settleRichReady();
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
PromptLineElement.styles = css `
|
|
359
|
+
${unsafeCSS(styles)}
|
|
360
|
+
`;
|
|
361
|
+
__decorate([
|
|
362
|
+
property({ type: Array, attribute: false })
|
|
363
|
+
], PromptLineElement.prototype, "extensions", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
property({ type: Object, attribute: false })
|
|
366
|
+
], PromptLineElement.prototype, "content", void 0);
|
|
367
|
+
__decorate([
|
|
368
|
+
property({ type: Boolean, reflect: true })
|
|
369
|
+
], PromptLineElement.prototype, "rich", void 0);
|
|
370
|
+
__decorate([
|
|
371
|
+
property({ type: Boolean, reflect: true })
|
|
372
|
+
], PromptLineElement.prototype, "disabled", void 0);
|
|
373
|
+
__decorate([
|
|
374
|
+
property({ type: String })
|
|
375
|
+
], PromptLineElement.prototype, "placeholder", void 0);
|
|
376
|
+
__decorate([
|
|
377
|
+
property({ type: String, attribute: "aria-label", reflect: true })
|
|
378
|
+
], PromptLineElement.prototype, "ariaLabel", void 0);
|
|
379
|
+
__decorate([
|
|
380
|
+
property({ type: String, attribute: "test-id" })
|
|
381
|
+
], PromptLineElement.prototype, "testId", void 0);
|
|
382
|
+
__decorate([
|
|
383
|
+
property({ type: Boolean })
|
|
384
|
+
], PromptLineElement.prototype, "autofocus", void 0);
|
|
385
|
+
PromptLineElement = __decorate([
|
|
386
|
+
carbonElement(`${prefix}-prompt-line`)
|
|
387
|
+
], PromptLineElement);
|
|
388
|
+
var PromptLineElement$1 = PromptLineElement;
|
|
389
|
+
|
|
390
|
+
export { PromptLineElement, PromptLineElement$1 as default };
|
|
391
|
+
//# sourceMappingURL=prompt-line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-line.js","sources":["../../../../src/components/prompt-line/src/prompt-line.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAqDI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;AAKL;;;;;;;AAOG;QAEH,IAAA,CAAA,UAAU,GAAgB,E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A,EAAA,iBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAIb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAIjB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACT,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAIR,UAAA,CAAA;AADR,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1C,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAIxB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE;AACpC,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAIH,UAAA,CAAA;AADR,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACA,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAjDhB,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,YAAA,CAAc;AACzB,CAAA,EAAA,iBAAiB,CA+Y7B;AAQD,0BAAe,iBAAiB;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([":host{display:block;inline-size:100%}.frame{display:flex;inline-size:100%}::slotted([slot=editor]){display:block;inline-size:100%}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=prompt-line.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-line.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import { LitElement } from "lit";
|
|
10
|
+
import "@carbon/web-components/es-custom/components/button/index.js";
|
|
11
|
+
import "./stop-streaming-button.js";
|
|
12
|
+
/**
|
|
13
|
+
* Send control component — renders the send button or stop streaming button.
|
|
14
|
+
*
|
|
15
|
+
* @element cds-custom-aichat-input-send-control
|
|
16
|
+
* @fires {CustomEvent} cds-custom-aichat-input-send - Fired when the send button is clicked
|
|
17
|
+
* @fires {CustomEvent} cds-custom-aichat-input-stop-streaming - Fired when the stop streaming button is clicked
|
|
18
|
+
*/
|
|
19
|
+
declare class InputSendControlElement extends LitElement {
|
|
20
|
+
static styles: import("lit").CSSResult;
|
|
21
|
+
/** Whether the input has valid content that can be sent. */
|
|
22
|
+
hasValidInput: boolean;
|
|
23
|
+
/** Whether the entire input is disabled. */
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
/** Whether sending is disabled (separate from overall disabled state). */
|
|
26
|
+
disableSend: boolean;
|
|
27
|
+
/** Show the stop streaming button instead of the send button. */
|
|
28
|
+
isStopStreamingButtonVisible: boolean;
|
|
29
|
+
/** Whether the stop streaming button is disabled. */
|
|
30
|
+
isStopStreamingButtonDisabled: boolean;
|
|
31
|
+
/** Label for the send button tooltip. */
|
|
32
|
+
buttonLabel: string;
|
|
33
|
+
/** Label for the stop streaming button tooltip. */
|
|
34
|
+
stopResponseLabel: string;
|
|
35
|
+
/** Test identifier. */
|
|
36
|
+
testId?: string;
|
|
37
|
+
private _handleSendClick;
|
|
38
|
+
private _handleStopStreamingClick;
|
|
39
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
40
|
+
}
|
|
41
|
+
declare global {
|
|
42
|
+
interface HTMLElementTagNameMap {
|
|
43
|
+
"cds-custom-aichat-input-send-control": InputSendControlElement;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export default InputSendControlElement;
|
|
@@ -0,0 +1,138 @@
|
|
|
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 } from 'lit/decorators.js';
|
|
11
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
12
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
13
|
+
import prefix from '../../../globals/settings.js';
|
|
14
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
|
15
|
+
import { iconLoader } from '@carbon/web-components/es-custom/globals/internal/icon-loader.js';
|
|
16
|
+
import Send16 from '@carbon/icons/es/send/16.js';
|
|
17
|
+
import SendFilled16 from '@carbon/icons/es/send--filled/16.js';
|
|
18
|
+
import { BUTTON_KIND, BUTTON_SIZE, BUTTON_TYPE, BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TOOLTIP_POSITION } from '@carbon/web-components/es-custom/components/button/defs.js';
|
|
19
|
+
import './stop-streaming-button.js';
|
|
20
|
+
import styles from './send-control.scss.js';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @license
|
|
24
|
+
*
|
|
25
|
+
* Copyright IBM Corp. 2026
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Send control component — renders the send button or stop streaming button.
|
|
32
|
+
*
|
|
33
|
+
* @element cds-custom-aichat-input-send-control
|
|
34
|
+
* @fires {CustomEvent} cds-custom-aichat-input-send - Fired when the send button is clicked
|
|
35
|
+
* @fires {CustomEvent} cds-custom-aichat-input-stop-streaming - Fired when the stop streaming button is clicked
|
|
36
|
+
*/
|
|
37
|
+
let InputSendControlElement = class InputSendControlElement extends LitElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
/** Whether the input has valid content that can be sent. */
|
|
41
|
+
this.hasValidInput = false;
|
|
42
|
+
/** Whether the entire input is disabled. */
|
|
43
|
+
this.disabled = false;
|
|
44
|
+
/** Whether sending is disabled (separate from overall disabled state). */
|
|
45
|
+
this.disableSend = false;
|
|
46
|
+
/** Show the stop streaming button instead of the send button. */
|
|
47
|
+
this.isStopStreamingButtonVisible = false;
|
|
48
|
+
/** Whether the stop streaming button is disabled. */
|
|
49
|
+
this.isStopStreamingButtonDisabled = false;
|
|
50
|
+
/** Label for the send button tooltip. */
|
|
51
|
+
this.buttonLabel = "Send";
|
|
52
|
+
/** Label for the stop streaming button tooltip. */
|
|
53
|
+
this.stopResponseLabel = "Stop response";
|
|
54
|
+
this._handleSendClick = () => {
|
|
55
|
+
if (this.disabled || this.disableSend || !this.hasValidInput) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.dispatchEvent(new CustomEvent("cds-custom-aichat-input-send", {
|
|
59
|
+
bubbles: true,
|
|
60
|
+
composed: true,
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
63
|
+
this._handleStopStreamingClick = () => {
|
|
64
|
+
this.dispatchEvent(new CustomEvent("cds-custom-aichat-input-stop-streaming", {
|
|
65
|
+
bubbles: true,
|
|
66
|
+
composed: true,
|
|
67
|
+
}));
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
// Check if RTL direction is set
|
|
72
|
+
const isRTL = document.dir === "rtl" || document.documentElement.dir === "rtl";
|
|
73
|
+
const showDisabledSend = !this.hasValidInput || this.disabled || this.disableSend;
|
|
74
|
+
if (this.isStopStreamingButtonVisible) {
|
|
75
|
+
return html `
|
|
76
|
+
<cds-custom-aichat-stop-streaming-button
|
|
77
|
+
label="${this.stopResponseLabel}"
|
|
78
|
+
?disabled="${this.isStopStreamingButtonDisabled}"
|
|
79
|
+
tooltip-alignment="${isRTL ? "top-left" : "top-right"}"
|
|
80
|
+
@click="${this._handleStopStreamingClick}"
|
|
81
|
+
></cds-custom-aichat-stop-streaming-button>
|
|
82
|
+
`;
|
|
83
|
+
}
|
|
84
|
+
return html `
|
|
85
|
+
<cds-custom-button
|
|
86
|
+
class="${prefix}--input-send-button"
|
|
87
|
+
kind="${BUTTON_KIND.GHOST}"
|
|
88
|
+
size="${BUTTON_SIZE.SMALL}"
|
|
89
|
+
type="${BUTTON_TYPE.BUTTON}"
|
|
90
|
+
?disabled="${showDisabledSend}"
|
|
91
|
+
tooltip-text="${this.buttonLabel}"
|
|
92
|
+
tooltip-alignment="${isRTL ? BUTTON_TOOLTIP_ALIGNMENT.START : BUTTON_TOOLTIP_ALIGNMENT.END}"
|
|
93
|
+
tooltip-position="${BUTTON_TOOLTIP_POSITION.TOP}"
|
|
94
|
+
@click="${this._handleSendClick}"
|
|
95
|
+
aria-label="${this.buttonLabel}"
|
|
96
|
+
data-testid="${ifDefined(this.testId)}"
|
|
97
|
+
>
|
|
98
|
+
${this.hasValidInput
|
|
99
|
+
? iconLoader(SendFilled16, { slot: "icon" })
|
|
100
|
+
: iconLoader(Send16, { slot: "icon" })}
|
|
101
|
+
</cds-custom-button>
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
InputSendControlElement.styles = css `
|
|
106
|
+
${unsafeCSS(styles)}
|
|
107
|
+
`;
|
|
108
|
+
__decorate([
|
|
109
|
+
property({ type: Boolean, attribute: "has-valid-input" })
|
|
110
|
+
], InputSendControlElement.prototype, "hasValidInput", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
property({ type: Boolean, attribute: "disabled" })
|
|
113
|
+
], InputSendControlElement.prototype, "disabled", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
property({ type: Boolean, attribute: "disable-send" })
|
|
116
|
+
], InputSendControlElement.prototype, "disableSend", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
property({ type: Boolean, attribute: "show-stop-streaming" })
|
|
119
|
+
], InputSendControlElement.prototype, "isStopStreamingButtonVisible", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
property({ type: Boolean, attribute: "disable-stop-streaming" })
|
|
122
|
+
], InputSendControlElement.prototype, "isStopStreamingButtonDisabled", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ type: String, attribute: "button-label" })
|
|
125
|
+
], InputSendControlElement.prototype, "buttonLabel", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ type: String, attribute: "stop-response-label" })
|
|
128
|
+
], InputSendControlElement.prototype, "stopResponseLabel", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ type: String, attribute: "test-id" })
|
|
131
|
+
], InputSendControlElement.prototype, "testId", void 0);
|
|
132
|
+
InputSendControlElement = __decorate([
|
|
133
|
+
carbonElement(`${prefix}-input-send-control`)
|
|
134
|
+
], InputSendControlElement);
|
|
135
|
+
var InputSendControlElement$1 = InputSendControlElement;
|
|
136
|
+
|
|
137
|
+
export { InputSendControlElement$1 as default };
|
|
138
|
+
//# sourceMappingURL=send-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-control.js","sources":["../../../../src/components/prompt-line/src/send-control.ts"],"sourcesContent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e,uBAAuB;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([":host{align-self:flex-start;display:flex;flex:0 1}cds-custom-button.cds-custom-aichat--input-send-button svg{fill:var(--cds-interactive,#0f62fe);block-size:1rem;cursor:inherit;inline-size:1rem}cds-custom-button.cds-custom-aichat--input-send-button[disabled] svg{fill:var(--cds-icon-disabled,hsla(0,0%,9%,.25))}cds-custom-button.cds-custom-aichat--input-send-button:active svg,cds-custom-button.cds-custom-aichat--input-send-button:focus svg{fill:var(--cds-interactive,#0f62fe)}:host(:dir(rtl)) cds-custom-button.cds-custom-aichat--input-send-button svg{transform:scaleX(-1)}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=send-control.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-control.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|