@carbon/ai-chat-components 1.9.0-alpha.0 → 1.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +1 -5
- package/custom-elements.json +3838 -3356
- package/es/components/audio-player/index.d.ts +4 -4
- package/es/components/audio-player/src/audio-player.d.ts +1 -1
- package/es/components/audio-player/src/audio-player.js +33 -38
- package/es/components/audio-player/src/audio-player.js.map +1 -1
- package/es/components/audio-player/src/providers/base-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/base-provider.js +9 -9
- package/es/components/audio-player/src/providers/native-audio-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/native-audio-provider.js +18 -18
- package/es/components/audio-player/src/providers/soundcloud-provider.d.ts +2 -2
- package/es/components/audio-player/src/providers/soundcloud-provider.js +14 -14
- package/es/components/audio-player/src/transcript.d.ts +2 -2
- package/es/components/audio-player/src/transcript.js +13 -16
- package/es/components/audio-player/src/transcript.js.map +1 -1
- package/es/components/audio-player/src/utils/url-detector.js +1 -1
- package/es/components/card/index.d.ts +4 -4
- package/es/components/card/src/card-footer.d.ts +5 -5
- package/es/components/card/src/card-footer.js +12 -16
- package/es/components/card/src/card-footer.js.map +1 -1
- package/es/components/card/src/card-footer.scss.js +1 -1
- package/es/components/card/src/card-steps.d.ts +4 -4
- package/es/components/card/src/card-steps.js +3 -5
- package/es/components/card/src/card-steps.js.map +1 -1
- package/es/components/card/src/card-steps.scss.js +1 -1
- package/es/components/card/src/card.d.ts +2 -2
- package/es/components/card/src/card.js +3 -3
- package/es/components/card/src/card.scss.js +1 -1
- package/es/components/carousel/index.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +2 -2
- package/es/components/carousel/src/carousel.js +4 -6
- package/es/components/carousel/src/carousel.js.map +1 -1
- package/es/components/carousel/src/carousel.scss.js +1 -1
- package/es/components/chain-of-thought/defs.js +1 -1
- package/es/components/chain-of-thought/index.d.ts +10 -10
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -4
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +36 -42
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +2 -2
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +11 -14
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +4 -4
- package/es/components/chain-of-thought/src/chain-of-thought.js +16 -17
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +2 -2
- package/es/components/chain-of-thought/src/tool-call-data.js +17 -23
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es/components/chat-button/defs.d.ts +1 -1
- package/es/components/chat-button/defs.js +1 -1
- package/es/components/chat-button/index.d.ts +2 -2
- package/es/components/chat-button/src/chat-button.d.ts +5 -5
- package/es/components/chat-button/src/chat-button.js +6 -6
- package/es/components/chat-button/src/chat-button.scss.js +1 -1
- package/es/components/chat-history/index.d.ts +11 -11
- package/es/components/chat-history/src/history-content.d.ts +1 -1
- package/es/components/chat-history/src/history-content.js +6 -6
- package/es/components/chat-history/src/history-delete-panel.d.ts +2 -2
- package/es/components/chat-history/src/history-delete-panel.js +11 -11
- package/es/components/chat-history/src/history-header.d.ts +2 -2
- package/es/components/chat-history/src/history-header.js +9 -10
- package/es/components/chat-history/src/history-header.js.map +1 -1
- package/es/components/chat-history/src/history-loading.d.ts +2 -2
- package/es/components/chat-history/src/history-loading.js +1 -1
- package/es/components/chat-history/src/history-panel-item-input.d.ts +2 -2
- package/es/components/chat-history/src/history-panel-item-input.js +21 -22
- package/es/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es/components/chat-history/src/history-panel-item.d.ts +5 -5
- package/es/components/chat-history/src/history-panel-item.js +39 -41
- package/es/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es/components/chat-history/src/history-panel-items.d.ts +1 -1
- package/es/components/chat-history/src/history-panel-items.js +1 -1
- package/es/components/chat-history/src/history-panel-menu.d.ts +1 -1
- package/es/components/chat-history/src/history-panel.d.ts +1 -1
- package/es/components/chat-history/src/history-panel.js +3 -3
- package/es/components/chat-history/src/history-search-item.d.ts +1 -1
- package/es/components/chat-history/src/history-search-item.js +4 -4
- package/es/components/chat-history/src/history-shell.d.ts +1 -1
- package/es/components/chat-history/src/history-shell.js +3 -3
- package/es/components/chat-history/src/history-toolbar.d.ts +9 -5
- package/es/components/chat-history/src/history-toolbar.js +13 -10
- package/es/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es/components/chat-shell/index.d.ts +5 -5
- package/es/components/chat-shell/src/chat-header.d.ts +8 -8
- package/es/components/chat-shell/src/chat-header.js +37 -44
- 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 +30 -30
- package/es/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es/components/chat-shell/src/panel-manager.d.ts +1 -1
- package/es/components/chat-shell/src/panel-manager.js +12 -12
- package/es/components/chat-shell/src/panel.d.ts +2 -2
- package/es/components/chat-shell/src/panel.js +99 -100
- package/es/components/chat-shell/src/panel.js.map +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
- package/es/components/chat-shell/src/resize-observer-manager.js +10 -10
- package/es/components/chat-shell/src/shell.d.ts +8 -8
- package/es/components/chat-shell/src/shell.js +128 -135
- 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 +4 -7
- package/es/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es/components/chat-shell/src/types.d.ts +4 -4
- package/es/components/chat-shell/src/workspace-manager-utils.js +4 -4
- package/es/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es/components/chat-shell/src/workspace-manager.js +32 -32
- package/es/components/code-snippet/index.d.ts +4 -4
- package/es/components/code-snippet/src/code-snippet.d.ts +8 -8
- package/es/components/code-snippet/src/code-snippet.js +87 -93
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/base-setup.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-loader.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-loader.js +1 -1
- package/es/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +8 -8
- package/es/components/code-snippet/src/codemirror/content-sync.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/content-sync.js +2 -2
- package/es/components/code-snippet/src/codemirror/detect-language.d.ts +6 -0
- package/es/components/code-snippet/src/codemirror/detect-language.js +77 -0
- package/es/components/code-snippet/src/codemirror/detect-language.js.map +1 -0
- package/es/components/code-snippet/src/codemirror/diff-decorator.d.ts +2 -2
- package/es/components/code-snippet/src/codemirror/diff-decorator.js +4 -4
- package/es/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -4
- package/es/components/code-snippet/src/codemirror/editor-manager.js +4 -4
- package/es/components/code-snippet/src/codemirror/language-controller.d.ts +3 -3
- package/es/components/code-snippet/src/codemirror/language-controller.js +3 -3
- package/es/components/code-snippet/src/codemirror/language-data.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/language-data.js +299 -299
- package/es/components/code-snippet/src/codemirror/language-utils.d.ts +2 -2
- package/es/components/code-snippet/src/codemirror/language-utils.js +60 -66
- package/es/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es/components/code-snippet/src/codemirror/marker-utils.js +15 -15
- package/es/components/code-snippet/src/codemirror/theme.d.ts +1 -1
- package/es/components/code-snippet/src/codemirror/theme.js +163 -163
- package/es/components/code-snippet/src/dom-utils.js +6 -6
- package/es/components/code-snippet/src/layout-utils.d.ts +2 -2
- package/es/components/code-snippet/src/layout-utils.js +9 -9
- package/es/components/code-snippet/src/streaming-manager.js +5 -5
- package/es/components/feedback/index.d.ts +4 -4
- package/es/components/feedback/src/feedback-buttons.d.ts +3 -3
- package/es/components/feedback/src/feedback-buttons.js +17 -19
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback.d.ts +9 -9
- package/es/components/feedback/src/feedback.js +38 -45
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/file-uploads/index.d.ts +5 -4
- package/es/components/file-uploads/src/file-type-icon.d.ts +18 -0
- package/es/components/file-uploads/src/file-type-icon.js +87 -0
- package/es/components/file-uploads/src/file-type-icon.js.map +1 -0
- package/es/components/file-uploads/src/file-upload-item.d.ts +69 -8
- package/es/components/file-uploads/src/file-upload-item.js +210 -111
- package/es/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.d.ts +8 -4
- package/es/components/file-uploads/src/file-uploads.js +54 -29
- package/es/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es/components/file-uploads/src/file-uploads.scss.js +1 -1
- package/es/components/file-uploads/src/types.d.ts +39 -0
- package/es/components/file-uploads/src/types.js +8 -0
- package/es/components/file-uploads/src/types.js.map +1 -0
- package/es/components/launcher/index.d.ts +9 -0
- package/es/components/launcher/index.js +9 -0
- package/es/components/launcher/index.js.map +1 -0
- package/es/components/launcher/src/launcher.d.ts +68 -0
- package/es/components/launcher/src/launcher.js +152 -0
- package/es/components/launcher/src/launcher.js.map +1 -0
- package/es/components/launcher/src/launcher.scss.js +13 -0
- package/es/components/launcher/src/launcher.scss.js.map +1 -0
- package/es/components/markdown/index.d.ts +5 -5
- package/es/components/markdown/src/markdown-renderer-types.d.ts +10 -3
- package/es/components/markdown/src/markdown-renderer.d.ts +9 -9
- package/es/components/markdown/src/markdown-renderer.js +85 -80
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown-token-tree.d.ts +1 -1
- package/es/components/markdown/src/markdown-token-tree.js +20 -20
- package/es/components/markdown/src/markdown.d.ts +4 -7
- package/es/components/markdown/src/markdown.js +96 -82
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.template.js +1 -1
- package/es/components/markdown/src/plugins/markdown-it-attrs.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-attrs.js +19 -19
- package/es/components/markdown/src/plugins/markdown-it-highlight.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-highlight.js +5 -5
- package/es/components/markdown/src/plugins/markdown-it-task-lists.d.ts +1 -1
- package/es/components/markdown/src/plugins/markdown-it-task-lists.js +14 -14
- package/es/components/markdown/src/utils/html-helpers.d.ts +1 -1
- package/es/components/markdown/src/utils/html-helpers.js +72 -72
- package/es/components/markdown/src/utils/lit-directives.d.ts +2 -2
- package/es/components/markdown/src/utils/lit-directives.js +5 -5
- package/es/components/markdown/src/utils/plugin-fallback.d.ts +4 -4
- package/es/components/markdown/src/utils/plugin-fallback.js +61 -61
- package/es/components/markdown/src/utils/streaming-table.d.ts +1 -1
- package/es/components/markdown/src/utils/streaming-table.js +6 -6
- package/es/components/markdown/src/utils/table-helpers.d.ts +4 -4
- package/es/components/markdown/src/utils/table-helpers.js +17 -18
- package/es/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es/components/processing/index.d.ts +1 -1
- package/es/components/processing/src/processing.d.ts +2 -2
- package/es/components/processing/src/processing.js +2 -2
- package/es/components/prompt-line/autocomplete/index.d.ts +12 -0
- package/es/components/prompt-line/autocomplete/index.js +9 -0
- package/es/components/prompt-line/autocomplete/index.js.map +1 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.d.ts +165 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.js +506 -0
- package/es/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -0
- package/es/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js +1 -1
- package/es/components/prompt-line/index.d.ts +18 -18
- package/es/components/prompt-line/src/autocomplete-controller.d.ts +10 -8
- package/es/components/prompt-line/src/autocomplete-controller.js +107 -47
- package/es/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es/components/prompt-line/src/error-message.d.ts +3 -7
- package/es/components/prompt-line/src/error-message.js +13 -23
- package/es/components/prompt-line/src/error-message.js.map +1 -1
- package/es/components/prompt-line/src/error-message.scss.js +1 -1
- package/es/components/prompt-line/src/prompt-line-constants.js +1 -1
- package/es/components/prompt-line/src/prompt-line-controller.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-controller.js +83 -83
- package/es/components/prompt-line/src/prompt-line-rich-loader.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-loader.js +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-runtime.d.ts +1 -1
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js +30 -28
- package/es/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.d.ts +2 -2
- package/es/components/prompt-line/src/prompt-line-shell.js +11 -13
- package/es/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es/components/prompt-line/src/prompt-line.d.ts +5 -5
- package/es/components/prompt-line/src/prompt-line.js +35 -35
- package/es/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es/components/prompt-line/src/send-control.d.ts +4 -4
- package/es/components/prompt-line/src/send-control.js +18 -20
- package/es/components/prompt-line/src/send-control.js.map +1 -1
- package/es/components/prompt-line/src/stop-streaming-button.d.ts +3 -3
- package/es/components/prompt-line/src/stop-streaming-button.js +7 -8
- package/es/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/build-extensions.d.ts +3 -3
- package/es/components/prompt-line/src/tiptap/build-extensions.js +2 -2
- package/es/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +2 -2
- package/es/components/prompt-line/src/tiptap/carbon-autocomplete.js +7 -7
- package/es/components/prompt-line/src/tiptap/carbon-mention.d.ts +2 -2
- package/es/components/prompt-line/src/tiptap/carbon-mention.js +9 -9
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +4 -3
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js +18 -12
- package/es/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/chat-enter.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/chat-enter.js +2 -2
- package/es/components/prompt-line/src/tiptap/editor-styles.js +26 -26
- package/es/components/prompt-line/src/tiptap/index.d.ts +24 -24
- package/es/components/prompt-line/src/tiptap/index.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/json-utils.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/json-utils.js +17 -17
- package/es/components/prompt-line/src/tiptap/keymap.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/keymap.js +3 -3
- package/es/components/prompt-line/src/tiptap/origin-meta.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/origin-meta.js +2 -2
- package/es/components/prompt-line/src/tiptap/plain-text-paste.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/plain-text-paste.js +5 -5
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +3 -3
- package/es/components/prompt-line/src/tiptap/render-in-light-dom.js +3 -3
- package/es/components/prompt-line/src/tiptap/render-token-chip.d.ts +4 -4
- package/es/components/prompt-line/src/tiptap/render-token-chip.js +22 -22
- package/es/components/prompt-line/src/tiptap/token-node-view.d.ts +4 -4
- package/es/components/prompt-line/src/tiptap/token-node-view.js +1 -1
- package/es/components/prompt-line/src/tiptap/trigger-utils.d.ts +9 -2
- package/es/components/prompt-line/src/tiptap/trigger-utils.js +11 -2
- package/es/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es/components/prompt-line/src/tiptap/types.d.ts +24 -3
- package/es/components/prompt-line/src/tiptap/typing-indicator.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/typing-indicator.js +2 -2
- package/es/components/prompt-line/src/tiptap/value-sync.d.ts +1 -1
- package/es/components/prompt-line/src/tiptap/value-sync.js +2 -2
- package/es/components/prompt-line/src/types.d.ts +2 -2
- package/es/components/prompt-line/src/types.js.map +1 -1
- package/es/components/reasoning-steps/index.d.ts +4 -4
- package/es/components/reasoning-steps/src/reasoning-step.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-step.js +27 -31
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +12 -14
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.d.ts +2 -2
- package/es/components/reasoning-steps/src/reasoning-steps.js +19 -20
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es/components/shared/dynamic-css-var-sheet.js +7 -7
- package/es/components/shared/media-utils/script-loader.js +1 -1
- package/es/components/table/index.d.ts +3 -3
- package/es/components/table/src/table-loader.d.ts +1 -1
- package/es/components/table/src/table-loader.js +1 -1
- package/es/components/table/src/table-pagination.template.d.ts +3 -3
- package/es/components/table/src/table-pagination.template.js +4 -5
- package/es/components/table/src/table-pagination.template.js.map +1 -1
- package/es/components/table/src/table-runtime.d.ts +2 -2
- package/es/components/table/src/table-skeleton.template.d.ts +1 -1
- package/es/components/table/src/table-skeleton.template.js +2 -3
- package/es/components/table/src/table-skeleton.template.js.map +1 -1
- package/es/components/table/src/table.d.ts +3 -4
- package/es/components/table/src/table.js +36 -39
- package/es/components/table/src/table.js.map +1 -1
- package/es/components/table/src/table.template.d.ts +5 -5
- package/es/components/table/src/table.template.js +6 -9
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/index.d.ts +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +9 -7
- package/es/components/toolbar/src/toolbar.js +45 -33
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/truncated-text/index.d.ts +1 -1
- package/es/components/truncated-text/src/truncated-text.d.ts +5 -5
- package/es/components/truncated-text/src/truncated-text.js +26 -28
- package/es/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es/components/truncated-text/src/truncated-text.scss.js +1 -1
- package/es/components/video-player/index.d.ts +2 -2
- package/es/components/video-player/src/providers/base-provider.d.ts +3 -3
- package/es/components/video-player/src/providers/base-provider.js +5 -5
- package/es/components/video-player/src/providers/kaltura-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/kaltura-provider.js +23 -23
- package/es/components/video-player/src/providers/native-video-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/native-video-provider.js +20 -20
- package/es/components/video-player/src/providers/vimeo-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/vimeo-provider.js +23 -23
- package/es/components/video-player/src/providers/youtube-provider.d.ts +2 -2
- package/es/components/video-player/src/providers/youtube-provider.js +15 -15
- package/es/components/video-player/src/utils/url-detector.js +1 -1
- package/es/components/video-player/src/video-player.d.ts +2 -2
- package/es/components/video-player/src/video-player.js +37 -41
- package/es/components/video-player/src/video-player.js.map +1 -1
- package/es/components/workspace-shell/index.d.ts +4 -4
- package/es/components/workspace-shell/src/header-collapsible-manager.js +13 -13
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.js +2 -2
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +4 -4
- package/es/components/workspace-shell/src/workspace-shell-footer.js +10 -11
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +2 -2
- package/es/components/workspace-shell/src/workspace-shell-header.js +10 -13
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -1
- package/es/components/workspace-shell/src/workspace-shell.js +3 -3
- package/es/globals/decorators/carbon-element.d.ts +4 -4
- package/es/globals/decorators/carbon-element.js +2 -2
- package/es/globals/decorators/index.d.ts +1 -1
- package/es/globals/scss/common.scss.js +1 -1
- package/es/globals/settings.js +2 -2
- package/es/globals/utils/aria-announcer-manager.d.ts +1 -1
- package/es/globals/utils/aria-announcer-manager.js +6 -6
- package/es/globals/utils/browser-utils.js +1 -1
- package/es/globals/utils/csv.d.ts +8 -0
- package/es/globals/utils/csv.js +37 -0
- package/es/globals/utils/csv.js.map +1 -0
- package/es/globals/utils/dom-utils.js +1 -1
- package/es/globals/utils/focus-utils.js +4 -4
- package/es/globals/utils/iconTransform.d.ts +2 -2
- package/es/globals/utils/iconTransform.js +21 -21
- package/es/globals/utils/rtl-utils.js +1 -1
- package/es/globals/utils/uuid.js +5 -5
- package/es/react/__tests__/jest.setup.js +12 -12
- package/es/react/ai-label-action-button.d.ts +1 -1
- package/es/react/ai-label-action-button.js +1 -1
- package/es/react/audio-player.d.ts +1 -1
- package/es/react/audio-player.js +5 -5
- package/es/react/autocomplete.d.ts +1 -1
- package/es/react/autocomplete.js +5 -5
- package/es/react/card.d.ts +1 -1
- package/es/react/card.js +5 -5
- package/es/react/carousel.d.ts +1 -1
- package/es/react/carousel.js +2 -2
- package/es/react/chain-of-thought-step.d.ts +1 -1
- package/es/react/chain-of-thought-step.js +4 -4
- package/es/react/chain-of-thought-toggle.d.ts +2 -2
- package/es/react/chain-of-thought-toggle.js +3 -3
- package/es/react/chain-of-thought.d.ts +2 -2
- package/es/react/chain-of-thought.js +4 -4
- package/es/react/chat-button.d.ts +3 -3
- package/es/react/chat-button.js +2 -2
- package/es/react/chat-header.d.ts +3 -3
- package/es/react/chat-header.js +2 -2
- package/es/react/chat-shell.d.ts +2 -2
- package/es/react/chat-shell.js +2 -2
- package/es/react/code-snippet.d.ts +4 -4
- package/es/react/code-snippet.js +3 -3
- package/es/react/error-message.d.ts +1 -1
- package/es/react/error-message.js +1 -1
- package/es/react/feedback-buttons.d.ts +1 -1
- package/es/react/feedback-buttons.js +3 -3
- package/es/react/feedback.d.ts +2 -2
- package/es/react/feedback.js +4 -4
- package/es/react/file-upload-item.d.ts +11 -0
- package/es/react/file-upload-item.js +31 -0
- package/es/react/file-upload-item.js.map +1 -0
- package/es/react/file-uploads.d.ts +1 -1
- package/es/react/file-uploads.js +2 -2
- package/es/react/history/history-content.d.ts +1 -1
- package/es/react/history/history-content.js +1 -1
- package/es/react/history/history-delete-panel.d.ts +1 -1
- package/es/react/history/history-delete-panel.js +3 -3
- package/es/react/history/history-header.d.ts +1 -1
- package/es/react/history/history-header.js +2 -2
- package/es/react/history/history-loading.d.ts +1 -1
- package/es/react/history/history-loading.js +1 -1
- package/es/react/history/history-panel-item-input.d.ts +1 -1
- package/es/react/history/history-panel-item-input.js +4 -4
- package/es/react/history/history-panel-item.d.ts +1 -1
- package/es/react/history/history-panel-item.js +6 -6
- package/es/react/history/history-panel-items.d.ts +1 -1
- package/es/react/history/history-panel-items.js +1 -1
- package/es/react/history/history-panel-menu.d.ts +1 -1
- package/es/react/history/history-panel-menu.js +1 -1
- package/es/react/history/history-panel.d.ts +1 -1
- package/es/react/history/history-panel.js +1 -1
- package/es/react/history/history-search-item.d.ts +1 -1
- package/es/react/history/history-search-item.js +2 -2
- package/es/react/history/history-shell.d.ts +1 -1
- package/es/react/history/history-shell.js +1 -1
- package/es/react/history/history-toolbar.d.ts +1 -1
- package/es/react/history/history-toolbar.js +3 -3
- package/es/react/history/index.d.ts +12 -12
- package/es/react/hooks/useChatAutocomplete.d.ts +4 -4
- package/es/react/hooks/useChatAutocomplete.js +38 -12
- package/es/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es/react/input-send-control.d.ts +1 -1
- package/es/react/input-send-control.js +3 -3
- package/es/react/launcher.d.ts +11 -0
- package/es/react/launcher.js +31 -0
- package/es/react/launcher.js.map +1 -0
- package/es/react/markdown.d.ts +7 -7
- package/es/react/markdown.js +13 -13
- package/es/react/markdown.js.map +1 -1
- package/es/react/panel.d.ts +1 -1
- package/es/react/panel.js +7 -7
- package/es/react/processing.d.ts +1 -1
- package/es/react/processing.js +2 -2
- package/es/react/prompt-line-shell.d.ts +1 -1
- package/es/react/prompt-line-shell.js +1 -1
- package/es/react/prompt-line.d.ts +1 -1
- package/es/react/prompt-line.js +9 -9
- package/es/react/reasoning-step.d.ts +1 -1
- package/es/react/reasoning-step.js +4 -4
- package/es/react/reasoning-steps-toggle.d.ts +2 -2
- package/es/react/reasoning-steps-toggle.js +3 -3
- package/es/react/reasoning-steps.d.ts +1 -1
- package/es/react/reasoning-steps.js +2 -2
- package/es/react/stop-streaming-button.d.ts +1 -1
- package/es/react/stop-streaming-button.js +1 -1
- package/es/react/table.d.ts +2 -2
- package/es/react/table.js +1 -1
- package/es/react/tool-call-data.d.ts +1 -1
- package/es/react/tool-call-data.js +2 -2
- package/es/react/toolbar.d.ts +4 -4
- package/es/react/toolbar.js +2 -2
- package/es/react/transcript.d.ts +1 -1
- package/es/react/transcript.js +3 -3
- package/es/react/utils/transformSuggestionConfig.d.ts +3 -3
- package/es/react/utils/transformSuggestionConfig.js +3 -3
- package/es/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es/react/utils/withWebComponentBridge.d.ts +1 -1
- package/es/react/utils/withWebComponentBridge.js +22 -22
- package/es/react/video-player.d.ts +1 -1
- package/es/react/video-player.js +5 -5
- package/es/react/workspace-shell.d.ts +1 -1
- package/es/react/workspace-shell.js +6 -6
- package/es/testing/load-all-lazy-deps.d.ts +2 -2
- package/es/testing/load-all-lazy-deps.js +1 -1
- package/es/typings/overflow-menu.d.ts +2 -2
- package/es-custom/components/audio-player/index.d.ts +4 -4
- package/es-custom/components/audio-player/src/audio-player.d.ts +1 -1
- package/es-custom/components/audio-player/src/audio-player.js +33 -38
- package/es-custom/components/audio-player/src/audio-player.js.map +1 -1
- package/es-custom/components/audio-player/src/providers/base-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/base-provider.js +9 -9
- package/es-custom/components/audio-player/src/providers/native-audio-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/native-audio-provider.js +18 -18
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.d.ts +2 -2
- package/es-custom/components/audio-player/src/providers/soundcloud-provider.js +14 -14
- package/es-custom/components/audio-player/src/transcript.d.ts +2 -2
- package/es-custom/components/audio-player/src/transcript.js +13 -16
- package/es-custom/components/audio-player/src/transcript.js.map +1 -1
- package/es-custom/components/audio-player/src/utils/url-detector.js +1 -1
- package/es-custom/components/card/index.d.ts +4 -4
- package/es-custom/components/card/src/card-footer.d.ts +5 -5
- package/es-custom/components/card/src/card-footer.js +12 -16
- package/es-custom/components/card/src/card-footer.js.map +1 -1
- package/es-custom/components/card/src/card-footer.scss.js +1 -1
- package/es-custom/components/card/src/card-steps.d.ts +4 -4
- package/es-custom/components/card/src/card-steps.js +3 -5
- package/es-custom/components/card/src/card-steps.js.map +1 -1
- package/es-custom/components/card/src/card-steps.scss.js +1 -1
- package/es-custom/components/card/src/card.d.ts +2 -2
- package/es-custom/components/card/src/card.js +3 -3
- package/es-custom/components/card/src/card.scss.js +1 -1
- package/es-custom/components/carousel/index.d.ts +1 -1
- package/es-custom/components/carousel/src/carousel.d.ts +2 -2
- package/es-custom/components/carousel/src/carousel.js +4 -6
- package/es-custom/components/carousel/src/carousel.js.map +1 -1
- package/es-custom/components/carousel/src/carousel.scss.js +1 -1
- package/es-custom/components/chain-of-thought/defs.js +1 -1
- package/es-custom/components/chain-of-thought/index.d.ts +10 -10
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.d.ts +4 -4
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js +36 -42
- package/es-custom/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +2 -2
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js +11 -14
- package/es-custom/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/chain-of-thought.d.ts +4 -4
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js +16 -17
- package/es-custom/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es-custom/components/chain-of-thought/src/tool-call-data.d.ts +2 -2
- package/es-custom/components/chain-of-thought/src/tool-call-data.js +17 -23
- package/es-custom/components/chain-of-thought/src/tool-call-data.js.map +1 -1
- package/es-custom/components/chat-button/defs.d.ts +1 -1
- package/es-custom/components/chat-button/defs.js +1 -1
- package/es-custom/components/chat-button/index.d.ts +2 -2
- package/es-custom/components/chat-button/src/chat-button.d.ts +5 -5
- package/es-custom/components/chat-button/src/chat-button.js +6 -6
- package/es-custom/components/chat-button/src/chat-button.scss.js +1 -1
- package/es-custom/components/chat-history/index.d.ts +11 -11
- package/es-custom/components/chat-history/src/history-content.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-content.js +6 -6
- package/es-custom/components/chat-history/src/history-delete-panel.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-delete-panel.js +11 -11
- package/es-custom/components/chat-history/src/history-header.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-header.js +9 -10
- package/es-custom/components/chat-history/src/history-header.js.map +1 -1
- package/es-custom/components/chat-history/src/history-loading.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-loading.js +1 -1
- package/es-custom/components/chat-history/src/history-panel-item-input.d.ts +2 -2
- package/es-custom/components/chat-history/src/history-panel-item-input.js +21 -22
- package/es-custom/components/chat-history/src/history-panel-item-input.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-item.d.ts +5 -5
- package/es-custom/components/chat-history/src/history-panel-item.js +39 -41
- package/es-custom/components/chat-history/src/history-panel-item.js.map +1 -1
- package/es-custom/components/chat-history/src/history-panel-items.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel-items.js +1 -1
- package/es-custom/components/chat-history/src/history-panel-menu.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-panel.js +3 -3
- package/es-custom/components/chat-history/src/history-search-item.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-search-item.js +4 -4
- package/es-custom/components/chat-history/src/history-shell.d.ts +1 -1
- package/es-custom/components/chat-history/src/history-shell.js +3 -3
- package/es-custom/components/chat-history/src/history-toolbar.d.ts +9 -5
- package/es-custom/components/chat-history/src/history-toolbar.js +13 -10
- package/es-custom/components/chat-history/src/history-toolbar.js.map +1 -1
- package/es-custom/components/chat-shell/index.d.ts +5 -5
- package/es-custom/components/chat-shell/src/chat-header.d.ts +8 -8
- package/es-custom/components/chat-shell/src/chat-header.js +37 -44
- 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 +30 -30
- package/es-custom/components/chat-shell/src/initialization-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/panel-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/panel-manager.js +12 -12
- package/es-custom/components/chat-shell/src/panel.d.ts +2 -2
- package/es-custom/components/chat-shell/src/panel.js +99 -100
- package/es-custom/components/chat-shell/src/panel.js.map +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/resize-observer-manager.js +10 -10
- package/es-custom/components/chat-shell/src/shell.d.ts +8 -8
- package/es-custom/components/chat-shell/src/shell.js +128 -135
- 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 +4 -7
- package/es-custom/components/chat-shell/src/slot-observer.js.map +1 -1
- package/es-custom/components/chat-shell/src/types.d.ts +4 -4
- package/es-custom/components/chat-shell/src/workspace-manager-utils.js +4 -4
- package/es-custom/components/chat-shell/src/workspace-manager.d.ts +1 -1
- package/es-custom/components/chat-shell/src/workspace-manager.js +32 -32
- package/es-custom/components/code-snippet/index.d.ts +4 -4
- package/es-custom/components/code-snippet/src/code-snippet.d.ts +8 -8
- package/es-custom/components/code-snippet/src/code-snippet.js +87 -93
- package/es-custom/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/base-setup.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/base-setup.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-loader.js +1 -1
- package/es-custom/components/code-snippet/src/codemirror/codemirror-runtime.d.ts +8 -8
- package/es-custom/components/code-snippet/src/codemirror/content-sync.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/content-sync.js +2 -2
- package/es-custom/components/code-snippet/src/codemirror/detect-language.d.ts +6 -0
- package/es-custom/components/code-snippet/src/codemirror/detect-language.js +77 -0
- package/es-custom/components/code-snippet/src/codemirror/detect-language.js.map +1 -0
- package/es-custom/components/code-snippet/src/codemirror/diff-decorator.d.ts +2 -2
- package/es-custom/components/code-snippet/src/codemirror/diff-decorator.js +4 -4
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.d.ts +4 -4
- package/es-custom/components/code-snippet/src/codemirror/editor-manager.js +4 -4
- package/es-custom/components/code-snippet/src/codemirror/language-controller.d.ts +3 -3
- package/es-custom/components/code-snippet/src/codemirror/language-controller.js +3 -3
- package/es-custom/components/code-snippet/src/codemirror/language-data.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/language-data.js +299 -299
- package/es-custom/components/code-snippet/src/codemirror/language-utils.d.ts +2 -2
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js +60 -66
- package/es-custom/components/code-snippet/src/codemirror/language-utils.js.map +1 -1
- package/es-custom/components/code-snippet/src/codemirror/marker-utils.js +15 -15
- package/es-custom/components/code-snippet/src/codemirror/theme.d.ts +1 -1
- package/es-custom/components/code-snippet/src/codemirror/theme.js +163 -163
- package/es-custom/components/code-snippet/src/dom-utils.js +6 -6
- package/es-custom/components/code-snippet/src/layout-utils.d.ts +2 -2
- package/es-custom/components/code-snippet/src/layout-utils.js +9 -9
- package/es-custom/components/code-snippet/src/streaming-manager.js +5 -5
- package/es-custom/components/feedback/index.d.ts +4 -4
- package/es-custom/components/feedback/src/feedback-buttons.d.ts +3 -3
- package/es-custom/components/feedback/src/feedback-buttons.js +17 -19
- package/es-custom/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es-custom/components/feedback/src/feedback.d.ts +9 -9
- package/es-custom/components/feedback/src/feedback.js +38 -45
- package/es-custom/components/feedback/src/feedback.js.map +1 -1
- package/es-custom/components/file-uploads/index.d.ts +5 -4
- package/es-custom/components/file-uploads/src/file-type-icon.d.ts +18 -0
- package/es-custom/components/file-uploads/src/file-type-icon.js +87 -0
- package/es-custom/components/file-uploads/src/file-type-icon.js.map +1 -0
- package/es-custom/components/file-uploads/src/file-upload-item.d.ts +69 -8
- package/es-custom/components/file-uploads/src/file-upload-item.js +210 -111
- package/es-custom/components/file-uploads/src/file-upload-item.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.d.ts +8 -4
- package/es-custom/components/file-uploads/src/file-uploads.js +54 -29
- package/es-custom/components/file-uploads/src/file-uploads.js.map +1 -1
- package/es-custom/components/file-uploads/src/file-uploads.scss.js +1 -1
- package/es-custom/components/file-uploads/src/types.d.ts +39 -0
- package/es-custom/components/file-uploads/src/types.js +8 -0
- package/es-custom/components/file-uploads/src/types.js.map +1 -0
- package/es-custom/components/launcher/index.d.ts +9 -0
- package/es-custom/components/launcher/index.js +9 -0
- package/{es/components/autocomplete → es-custom/components/launcher}/index.js.map +1 -1
- package/es-custom/components/launcher/src/launcher.d.ts +68 -0
- package/es-custom/components/launcher/src/launcher.js +152 -0
- package/es-custom/components/launcher/src/launcher.js.map +1 -0
- package/es-custom/components/launcher/src/launcher.scss.js +13 -0
- package/es-custom/components/launcher/src/launcher.scss.js.map +1 -0
- package/es-custom/components/markdown/index.d.ts +5 -5
- package/es-custom/components/markdown/src/markdown-renderer-types.d.ts +10 -3
- package/es-custom/components/markdown/src/markdown-renderer.d.ts +9 -9
- package/es-custom/components/markdown/src/markdown-renderer.js +85 -80
- package/es-custom/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.d.ts +1 -1
- package/es-custom/components/markdown/src/markdown-token-tree.js +20 -20
- package/es-custom/components/markdown/src/markdown.d.ts +4 -7
- package/es-custom/components/markdown/src/markdown.js +96 -82
- package/es-custom/components/markdown/src/markdown.js.map +1 -1
- package/es-custom/components/markdown/src/markdown.template.js +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-attrs.js +19 -19
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-highlight.js +5 -5
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.d.ts +1 -1
- package/es-custom/components/markdown/src/plugins/markdown-it-task-lists.js +14 -14
- package/es-custom/components/markdown/src/utils/html-helpers.d.ts +1 -1
- package/es-custom/components/markdown/src/utils/html-helpers.js +72 -72
- package/es-custom/components/markdown/src/utils/lit-directives.d.ts +2 -2
- package/es-custom/components/markdown/src/utils/lit-directives.js +5 -5
- package/es-custom/components/markdown/src/utils/plugin-fallback.d.ts +4 -4
- package/es-custom/components/markdown/src/utils/plugin-fallback.js +61 -61
- package/es-custom/components/markdown/src/utils/streaming-table.d.ts +1 -1
- package/es-custom/components/markdown/src/utils/streaming-table.js +6 -6
- package/es-custom/components/markdown/src/utils/table-helpers.d.ts +4 -4
- package/es-custom/components/markdown/src/utils/table-helpers.js +17 -18
- package/es-custom/components/markdown/src/utils/table-helpers.js.map +1 -1
- package/es-custom/components/processing/index.d.ts +1 -1
- package/es-custom/components/processing/src/processing.d.ts +2 -2
- package/es-custom/components/processing/src/processing.js +2 -2
- package/es-custom/components/prompt-line/autocomplete/index.d.ts +12 -0
- package/es-custom/components/prompt-line/autocomplete/index.js +9 -0
- package/es-custom/components/{autocomplete → prompt-line/autocomplete}/index.js.map +1 -1
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.d.ts +165 -0
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js +506 -0
- package/es-custom/components/prompt-line/autocomplete/src/autocomplete.js.map +1 -0
- package/es-custom/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js +1 -1
- package/es-custom/components/prompt-line/index.d.ts +18 -18
- package/es-custom/components/prompt-line/src/autocomplete-controller.d.ts +10 -8
- package/es-custom/components/prompt-line/src/autocomplete-controller.js +107 -47
- package/es-custom/components/prompt-line/src/autocomplete-controller.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.d.ts +3 -7
- package/es-custom/components/prompt-line/src/error-message.js +13 -23
- package/es-custom/components/prompt-line/src/error-message.js.map +1 -1
- package/es-custom/components/prompt-line/src/error-message.scss.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-constants.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-controller.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-controller.js +83 -83
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-loader.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.d.ts +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js +30 -28
- package/es-custom/components/prompt-line/src/prompt-line-rich-runtime.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.d.ts +2 -2
- package/es-custom/components/prompt-line/src/prompt-line-shell.js +11 -13
- package/es-custom/components/prompt-line/src/prompt-line-shell.js.map +1 -1
- package/es-custom/components/prompt-line/src/prompt-line-shell.scss.js +1 -1
- package/es-custom/components/prompt-line/src/prompt-line.d.ts +5 -5
- package/es-custom/components/prompt-line/src/prompt-line.js +35 -35
- package/es-custom/components/prompt-line/src/prompt-line.js.map +1 -1
- package/es-custom/components/prompt-line/src/send-control.d.ts +4 -4
- package/es-custom/components/prompt-line/src/send-control.js +18 -20
- package/es-custom/components/prompt-line/src/send-control.js.map +1 -1
- package/es-custom/components/prompt-line/src/stop-streaming-button.d.ts +3 -3
- package/es-custom/components/prompt-line/src/stop-streaming-button.js +7 -8
- package/es-custom/components/prompt-line/src/stop-streaming-button.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.d.ts +3 -3
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/build-extensions.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.d.ts +2 -2
- package/es-custom/components/prompt-line/src/tiptap/carbon-autocomplete.js +7 -7
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.d.ts +2 -2
- package/es-custom/components/prompt-line/src/tiptap/carbon-mention.js +9 -9
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.d.ts +4 -3
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js +18 -12
- package/es-custom/components/prompt-line/src/tiptap/carbon-starter-trigger.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/chat-enter.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/editor-styles.js +26 -26
- package/es-custom/components/prompt-line/src/tiptap/index.d.ts +24 -24
- package/es-custom/components/prompt-line/src/tiptap/index.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/json-utils.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/json-utils.js +17 -17
- package/es-custom/components/prompt-line/src/tiptap/keymap.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/keymap.js +3 -3
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/origin-meta.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/plain-text-paste.js +5 -5
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.d.ts +3 -3
- package/es-custom/components/prompt-line/src/tiptap/render-in-light-dom.js +3 -3
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.d.ts +4 -4
- package/es-custom/components/prompt-line/src/tiptap/render-token-chip.js +22 -22
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.d.ts +4 -4
- package/es-custom/components/prompt-line/src/tiptap/token-node-view.js +1 -1
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.d.ts +9 -2
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js +11 -2
- package/es-custom/components/prompt-line/src/tiptap/trigger-utils.js.map +1 -1
- package/es-custom/components/prompt-line/src/tiptap/types.d.ts +24 -3
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/typing-indicator.js +2 -2
- package/es-custom/components/prompt-line/src/tiptap/value-sync.d.ts +1 -1
- package/es-custom/components/prompt-line/src/tiptap/value-sync.js +2 -2
- package/es-custom/components/prompt-line/src/types.d.ts +2 -2
- package/es-custom/components/prompt-line/src/types.js.map +1 -1
- package/es-custom/components/reasoning-steps/index.d.ts +4 -4
- package/es-custom/components/reasoning-steps/src/reasoning-step.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-step.js +27 -31
- package/es-custom/components/reasoning-steps/src/reasoning-step.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js +12 -14
- package/es-custom/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -1
- package/es-custom/components/reasoning-steps/src/reasoning-steps.d.ts +2 -2
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js +19 -20
- package/es-custom/components/reasoning-steps/src/reasoning-steps.js.map +1 -1
- package/es-custom/components/shared/dynamic-css-var-sheet.js +7 -7
- package/es-custom/components/shared/media-utils/script-loader.js +1 -1
- package/es-custom/components/table/index.d.ts +3 -3
- package/es-custom/components/table/src/table-loader.d.ts +1 -1
- package/es-custom/components/table/src/table-loader.js +1 -1
- package/es-custom/components/table/src/table-pagination.template.d.ts +3 -3
- package/es-custom/components/table/src/table-pagination.template.js +4 -5
- package/es-custom/components/table/src/table-pagination.template.js.map +1 -1
- package/es-custom/components/table/src/table-runtime.d.ts +2 -2
- package/es-custom/components/table/src/table-skeleton.template.d.ts +1 -1
- package/es-custom/components/table/src/table-skeleton.template.js +2 -3
- package/es-custom/components/table/src/table-skeleton.template.js.map +1 -1
- package/es-custom/components/table/src/table.d.ts +3 -4
- package/es-custom/components/table/src/table.js +36 -39
- package/es-custom/components/table/src/table.js.map +1 -1
- package/es-custom/components/table/src/table.template.d.ts +5 -5
- package/es-custom/components/table/src/table.template.js +6 -9
- package/es-custom/components/table/src/table.template.js.map +1 -1
- package/es-custom/components/toolbar/index.d.ts +1 -1
- package/es-custom/components/toolbar/src/toolbar.d.ts +9 -7
- package/es-custom/components/toolbar/src/toolbar.js +45 -33
- package/es-custom/components/toolbar/src/toolbar.js.map +1 -1
- package/es-custom/components/toolbar/src/toolbar.scss.js +1 -1
- package/es-custom/components/truncated-text/index.d.ts +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.d.ts +5 -5
- package/es-custom/components/truncated-text/src/truncated-text.js +26 -28
- package/es-custom/components/truncated-text/src/truncated-text.js.map +1 -1
- package/es-custom/components/truncated-text/src/truncated-text.scss.js +1 -1
- package/es-custom/components/video-player/index.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/base-provider.d.ts +3 -3
- package/es-custom/components/video-player/src/providers/base-provider.js +5 -5
- package/es-custom/components/video-player/src/providers/kaltura-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/kaltura-provider.js +23 -23
- package/es-custom/components/video-player/src/providers/native-video-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/native-video-provider.js +20 -20
- package/es-custom/components/video-player/src/providers/vimeo-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/vimeo-provider.js +23 -23
- package/es-custom/components/video-player/src/providers/youtube-provider.d.ts +2 -2
- package/es-custom/components/video-player/src/providers/youtube-provider.js +15 -15
- package/es-custom/components/video-player/src/utils/url-detector.js +1 -1
- package/es-custom/components/video-player/src/video-player.d.ts +2 -2
- package/es-custom/components/video-player/src/video-player.js +37 -41
- package/es-custom/components/video-player/src/video-player.js.map +1 -1
- package/es-custom/components/workspace-shell/index.d.ts +4 -4
- package/es-custom/components/workspace-shell/src/header-collapsible-manager.js +13 -13
- package/es-custom/components/workspace-shell/src/workspace-shell-body.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-body.js +2 -2
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.d.ts +4 -4
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js +10 -11
- package/es-custom/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell-header.d.ts +2 -2
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js +10 -13
- package/es-custom/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.d.ts +1 -1
- package/es-custom/components/workspace-shell/src/workspace-shell.js +3 -3
- package/es-custom/globals/decorators/carbon-element.d.ts +4 -4
- package/es-custom/globals/decorators/carbon-element.js +2 -2
- package/es-custom/globals/decorators/index.d.ts +1 -1
- package/es-custom/globals/scss/common.scss.js +1 -1
- package/es-custom/globals/settings.js +2 -2
- package/es-custom/globals/utils/aria-announcer-manager.d.ts +1 -1
- package/es-custom/globals/utils/aria-announcer-manager.js +6 -6
- package/es-custom/globals/utils/browser-utils.js +1 -1
- package/es-custom/globals/utils/csv.d.ts +8 -0
- package/es-custom/globals/utils/csv.js +37 -0
- package/es-custom/globals/utils/csv.js.map +1 -0
- package/es-custom/globals/utils/dom-utils.js +1 -1
- package/es-custom/globals/utils/focus-utils.js +4 -4
- package/es-custom/globals/utils/iconTransform.d.ts +2 -2
- package/es-custom/globals/utils/iconTransform.js +21 -21
- package/es-custom/globals/utils/rtl-utils.js +1 -1
- package/es-custom/globals/utils/uuid.js +5 -5
- package/es-custom/react/__tests__/jest.setup.js +12 -12
- package/es-custom/react/ai-label-action-button.d.ts +1 -1
- package/es-custom/react/ai-label-action-button.js +1 -1
- package/es-custom/react/audio-player.d.ts +1 -1
- package/es-custom/react/audio-player.js +5 -5
- package/es-custom/react/autocomplete.d.ts +1 -1
- package/es-custom/react/autocomplete.js +5 -5
- package/es-custom/react/card.d.ts +1 -1
- package/es-custom/react/card.js +5 -5
- package/es-custom/react/carousel.d.ts +1 -1
- package/es-custom/react/carousel.js +2 -2
- package/es-custom/react/chain-of-thought-step.d.ts +1 -1
- package/es-custom/react/chain-of-thought-step.js +4 -4
- package/es-custom/react/chain-of-thought-toggle.d.ts +2 -2
- package/es-custom/react/chain-of-thought-toggle.js +3 -3
- package/es-custom/react/chain-of-thought.d.ts +2 -2
- package/es-custom/react/chain-of-thought.js +4 -4
- package/es-custom/react/chat-button.d.ts +3 -3
- package/es-custom/react/chat-button.js +2 -2
- package/es-custom/react/chat-header.d.ts +3 -3
- package/es-custom/react/chat-header.js +2 -2
- package/es-custom/react/chat-shell.d.ts +2 -2
- package/es-custom/react/chat-shell.js +2 -2
- package/es-custom/react/code-snippet.d.ts +4 -4
- package/es-custom/react/code-snippet.js +3 -3
- package/es-custom/react/error-message.d.ts +1 -1
- package/es-custom/react/error-message.js +1 -1
- package/es-custom/react/feedback-buttons.d.ts +1 -1
- package/es-custom/react/feedback-buttons.js +3 -3
- package/es-custom/react/feedback.d.ts +2 -2
- package/es-custom/react/feedback.js +4 -4
- package/es-custom/react/file-upload-item.d.ts +11 -0
- package/es-custom/react/file-upload-item.js +31 -0
- package/es-custom/react/file-upload-item.js.map +1 -0
- package/es-custom/react/file-uploads.d.ts +1 -1
- package/es-custom/react/file-uploads.js +2 -2
- package/es-custom/react/history/history-content.d.ts +1 -1
- package/es-custom/react/history/history-content.js +1 -1
- package/es-custom/react/history/history-delete-panel.d.ts +1 -1
- package/es-custom/react/history/history-delete-panel.js +3 -3
- package/es-custom/react/history/history-header.d.ts +1 -1
- package/es-custom/react/history/history-header.js +2 -2
- package/es-custom/react/history/history-loading.d.ts +1 -1
- package/es-custom/react/history/history-loading.js +1 -1
- package/es-custom/react/history/history-panel-item-input.d.ts +1 -1
- package/es-custom/react/history/history-panel-item-input.js +4 -4
- package/es-custom/react/history/history-panel-item.d.ts +1 -1
- package/es-custom/react/history/history-panel-item.js +6 -6
- package/es-custom/react/history/history-panel-items.d.ts +1 -1
- package/es-custom/react/history/history-panel-items.js +1 -1
- package/es-custom/react/history/history-panel-menu.d.ts +1 -1
- package/es-custom/react/history/history-panel-menu.js +1 -1
- package/es-custom/react/history/history-panel.d.ts +1 -1
- package/es-custom/react/history/history-panel.js +1 -1
- package/es-custom/react/history/history-search-item.d.ts +1 -1
- package/es-custom/react/history/history-search-item.js +2 -2
- package/es-custom/react/history/history-shell.d.ts +1 -1
- package/es-custom/react/history/history-shell.js +1 -1
- package/es-custom/react/history/history-toolbar.d.ts +1 -1
- package/es-custom/react/history/history-toolbar.js +3 -3
- package/es-custom/react/history/index.d.ts +12 -12
- package/es-custom/react/hooks/useChatAutocomplete.d.ts +4 -4
- package/es-custom/react/hooks/useChatAutocomplete.js +38 -12
- package/es-custom/react/hooks/useChatAutocomplete.js.map +1 -1
- package/es-custom/react/input-send-control.d.ts +1 -1
- package/es-custom/react/input-send-control.js +3 -3
- package/es-custom/react/launcher.d.ts +11 -0
- package/es-custom/react/launcher.js +31 -0
- package/es-custom/react/launcher.js.map +1 -0
- package/es-custom/react/markdown.d.ts +7 -7
- package/es-custom/react/markdown.js +13 -13
- package/es-custom/react/markdown.js.map +1 -1
- package/es-custom/react/panel.d.ts +1 -1
- package/es-custom/react/panel.js +7 -7
- package/es-custom/react/processing.d.ts +1 -1
- package/es-custom/react/processing.js +2 -2
- package/es-custom/react/prompt-line-shell.d.ts +1 -1
- package/es-custom/react/prompt-line-shell.js +1 -1
- package/es-custom/react/prompt-line.d.ts +1 -1
- package/es-custom/react/prompt-line.js +9 -9
- package/es-custom/react/reasoning-step.d.ts +1 -1
- package/es-custom/react/reasoning-step.js +4 -4
- package/es-custom/react/reasoning-steps-toggle.d.ts +2 -2
- package/es-custom/react/reasoning-steps-toggle.js +3 -3
- package/es-custom/react/reasoning-steps.d.ts +1 -1
- package/es-custom/react/reasoning-steps.js +2 -2
- package/es-custom/react/stop-streaming-button.d.ts +1 -1
- package/es-custom/react/stop-streaming-button.js +1 -1
- package/es-custom/react/table.d.ts +2 -2
- package/es-custom/react/table.js +1 -1
- package/es-custom/react/tool-call-data.d.ts +1 -1
- package/es-custom/react/tool-call-data.js +2 -2
- package/es-custom/react/toolbar.d.ts +4 -4
- package/es-custom/react/toolbar.js +2 -2
- package/es-custom/react/transcript.d.ts +1 -1
- package/es-custom/react/transcript.js +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.d.ts +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.js +3 -3
- package/es-custom/react/utils/transformSuggestionConfig.js.map +1 -1
- package/es-custom/react/utils/withWebComponentBridge.d.ts +1 -1
- package/es-custom/react/utils/withWebComponentBridge.js +22 -22
- package/es-custom/react/video-player.d.ts +1 -1
- package/es-custom/react/video-player.js +5 -5
- package/es-custom/react/workspace-shell.d.ts +1 -1
- package/es-custom/react/workspace-shell.js +6 -6
- package/es-custom/testing/load-all-lazy-deps.d.ts +2 -2
- package/es-custom/testing/load-all-lazy-deps.js +1 -1
- package/es-custom/typings/overflow-menu.d.ts +2 -2
- package/package.json +4 -5
- package/scss/_custom-properties.scss +15 -15
- package/scss/_modifiers.scss +8 -8
- package/scss/_tokens-component.scss +1 -1
- package/scss/_tokens-layout.scss +1 -1
- package/scss/_utilities.scss +2 -2
- package/scss/common.scss +3 -3
- package/scss/grid.scss +2 -2
- package/scss/themes.scss +7 -7
- package/scss/vars.scss +3 -3
- package/telemetry.yml +64 -5
- package/es/components/autocomplete/index.d.ts +0 -15
- package/es/components/autocomplete/index.js +0 -11
- package/es/components/autocomplete/src/autocomplete-item-group.d.ts +0 -44
- package/es/components/autocomplete/src/autocomplete-item-group.js +0 -139
- package/es/components/autocomplete/src/autocomplete-item-group.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js +0 -13
- package/es/components/autocomplete/src/autocomplete-item-group.scss.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item.d.ts +0 -54
- package/es/components/autocomplete/src/autocomplete-item.js +0 -197
- package/es/components/autocomplete/src/autocomplete-item.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete-item.scss.js +0 -13
- package/es/components/autocomplete/src/autocomplete-item.scss.js.map +0 -1
- package/es/components/autocomplete/src/autocomplete.d.ts +0 -97
- package/es/components/autocomplete/src/autocomplete.js +0 -321
- package/es/components/autocomplete/src/autocomplete.js.map +0 -1
- package/es-custom/components/autocomplete/index.d.ts +0 -15
- package/es-custom/components/autocomplete/index.js +0 -11
- package/es-custom/components/autocomplete/src/autocomplete-item-group.d.ts +0 -44
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js +0 -139
- package/es-custom/components/autocomplete/src/autocomplete-item-group.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js +0 -13
- package/es-custom/components/autocomplete/src/autocomplete-item-group.scss.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item.d.ts +0 -54
- package/es-custom/components/autocomplete/src/autocomplete-item.js +0 -197
- package/es-custom/components/autocomplete/src/autocomplete-item.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js +0 -13
- package/es-custom/components/autocomplete/src/autocomplete-item.scss.js.map +0 -1
- package/es-custom/components/autocomplete/src/autocomplete.d.ts +0 -97
- package/es-custom/components/autocomplete/src/autocomplete.js +0 -321
- package/es-custom/components/autocomplete/src/autocomplete.js.map +0 -1
- /package/es/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js.map +0 -0
- /package/es-custom/components/{autocomplete → prompt-line/autocomplete}/src/autocomplete.scss.js.map +0 -0
|
@@ -45,15 +45,15 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
45
45
|
/** Disables editing. The surface stays mounted but non-editable. */
|
|
46
46
|
this.disabled = false;
|
|
47
47
|
/** Placeholder text shown when the surface is empty. */
|
|
48
|
-
this.placeholder =
|
|
48
|
+
this.placeholder = '';
|
|
49
49
|
/** Accessible label for the editing surface. */
|
|
50
|
-
this.ariaLabel =
|
|
50
|
+
this.ariaLabel = '';
|
|
51
51
|
/** Test id, applied to the inner editable element. */
|
|
52
|
-
this.testId =
|
|
52
|
+
this.testId = '';
|
|
53
53
|
/** Focus the surface on mount. */
|
|
54
54
|
this.autofocus = false;
|
|
55
55
|
this._controller = null;
|
|
56
|
-
this._mode =
|
|
56
|
+
this._mode = 'textarea';
|
|
57
57
|
this._editorHost = null;
|
|
58
58
|
this._lastExtensionsRef = null;
|
|
59
59
|
/** Sticky latch — once rich is wanted it never reverts. */
|
|
@@ -91,12 +91,12 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
91
91
|
if (warmRuntime) {
|
|
92
92
|
// Runtime already loaded (e.g. preloaded at boot) — mount rich directly,
|
|
93
93
|
// no textarea flash.
|
|
94
|
-
this._mode =
|
|
94
|
+
this._mode = 'rich';
|
|
95
95
|
this._controller = warmRuntime.createRichController();
|
|
96
96
|
this._controller.mount(host, this._makeInit());
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
this._mode =
|
|
99
|
+
this._mode = 'textarea';
|
|
100
100
|
this._controller = new TextareaController();
|
|
101
101
|
this._controller.mount(host, this._makeInit());
|
|
102
102
|
if (this._richLatched) {
|
|
@@ -112,39 +112,39 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
112
112
|
if (!this._controller) {
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
if ((changed.has(
|
|
115
|
+
if ((changed.has('rich') || changed.has('extensions')) &&
|
|
116
116
|
this._wantsRich()) {
|
|
117
117
|
this._richLatched = true;
|
|
118
|
-
if (this._mode ===
|
|
118
|
+
if (this._mode === 'textarea') {
|
|
119
119
|
void this._upgradeToRich();
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
if (changed.has(
|
|
122
|
+
if (changed.has('extensions') &&
|
|
123
123
|
this.extensions !== this._lastExtensionsRef) {
|
|
124
124
|
this._lastExtensionsRef = this.extensions;
|
|
125
|
-
if (this._mode ===
|
|
125
|
+
if (this._mode === 'rich') {
|
|
126
126
|
this._controller.setExtensions(this.extensions);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
if (changed.has(
|
|
129
|
+
if (changed.has('disabled')) {
|
|
130
130
|
this._controller.setEditable(!this.disabled);
|
|
131
131
|
}
|
|
132
|
-
if (changed.has(
|
|
133
|
-
this._controller.setContent(this.content ??
|
|
132
|
+
if (changed.has('content') && !changed.has('extensions')) {
|
|
133
|
+
this._controller.setContent(this.content ?? '');
|
|
134
134
|
}
|
|
135
|
-
if (changed.has(
|
|
135
|
+
if (changed.has('placeholder')) {
|
|
136
136
|
this._controller.setPlaceholder(this.placeholder);
|
|
137
137
|
}
|
|
138
|
-
if (changed.has(
|
|
138
|
+
if (changed.has('testId')) {
|
|
139
139
|
this._controller.setTestId(this.testId);
|
|
140
140
|
}
|
|
141
|
-
if (changed.has(
|
|
141
|
+
if (changed.has('ariaLabel')) {
|
|
142
142
|
this._controller.setAriaLabel(this.ariaLabel);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
disconnectedCallback() {
|
|
146
146
|
super.disconnectedCallback();
|
|
147
|
-
this._failRichReady(new Error(
|
|
147
|
+
this._failRichReady(new Error('Input is not currently rendered'));
|
|
148
148
|
this._controller?.destroy();
|
|
149
149
|
this._controller = null;
|
|
150
150
|
this._editorHost?.remove();
|
|
@@ -173,7 +173,7 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
173
173
|
* upgrade.
|
|
174
174
|
*/
|
|
175
175
|
ensureEditor() {
|
|
176
|
-
if (this._mode ===
|
|
176
|
+
if (this._mode === 'rich') {
|
|
177
177
|
const editor = this._controller?.getEditor();
|
|
178
178
|
if (editor) {
|
|
179
179
|
return Promise.resolve(editor);
|
|
@@ -181,7 +181,7 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
181
181
|
}
|
|
182
182
|
// Connected but not yet rendered, or already torn down — nothing to upgrade.
|
|
183
183
|
if (!this._editorHost || !this._controller) {
|
|
184
|
-
return Promise.reject(new Error(
|
|
184
|
+
return Promise.reject(new Error('Input is not currently rendered'));
|
|
185
185
|
}
|
|
186
186
|
this._richLatched = true;
|
|
187
187
|
if (!this._richReady) {
|
|
@@ -199,7 +199,7 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
199
199
|
* being `null`.
|
|
200
200
|
*/
|
|
201
201
|
getValue() {
|
|
202
|
-
return this._controller?.getValue() ??
|
|
202
|
+
return this._controller?.getValue() ?? '';
|
|
203
203
|
}
|
|
204
204
|
focus() {
|
|
205
205
|
this._controller?.focus();
|
|
@@ -239,15 +239,15 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
239
239
|
return this._richLatched || this.rich;
|
|
240
240
|
}
|
|
241
241
|
_mountEditorHost() {
|
|
242
|
-
const host = document.createElement(
|
|
243
|
-
host.setAttribute(
|
|
244
|
-
host.dataset.aichatEditorHost =
|
|
242
|
+
const host = document.createElement('div');
|
|
243
|
+
host.setAttribute('slot', 'editor');
|
|
244
|
+
host.dataset.aichatEditorHost = '';
|
|
245
245
|
this.appendChild(host);
|
|
246
246
|
this._editorHost = host;
|
|
247
247
|
// Defer an upgrade requested mid-IME-composition so we don't tear the
|
|
248
248
|
// field out from under the user.
|
|
249
|
-
host.addEventListener(
|
|
250
|
-
host.addEventListener(
|
|
249
|
+
host.addEventListener('compositionstart', this._onCompositionStart);
|
|
250
|
+
host.addEventListener('compositionend', this._onCompositionEnd);
|
|
251
251
|
const root = host.getRootNode();
|
|
252
252
|
if (root instanceof ShadowRoot || root instanceof Document) {
|
|
253
253
|
adoptOnRoot(root);
|
|
@@ -257,11 +257,11 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
257
257
|
/** Build the controller init from current props (rich seed by default). */
|
|
258
258
|
_makeInit(valueOverride) {
|
|
259
259
|
const value = valueOverride ??
|
|
260
|
-
(typeof this.content ===
|
|
260
|
+
(typeof this.content === 'string'
|
|
261
261
|
? this.content
|
|
262
262
|
: this.content
|
|
263
263
|
? getRawText(this.content)
|
|
264
|
-
:
|
|
264
|
+
: '');
|
|
265
265
|
return {
|
|
266
266
|
value,
|
|
267
267
|
// On an upgrade we seed losslessly from the textarea's plain text, so
|
|
@@ -297,7 +297,7 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
297
297
|
}
|
|
298
298
|
/** Lazily load Tiptap and swap the textarea for the rich editor in place. */
|
|
299
299
|
async _upgradeToRich() {
|
|
300
|
-
if (this._mode ===
|
|
300
|
+
if (this._mode === 'rich' || this._upgrading) {
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
303
|
this._upgrading = true;
|
|
@@ -307,8 +307,8 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
307
307
|
// latch already prevents a concurrent upgrade.
|
|
308
308
|
if (!module || !this._editorHost || !this._controller) {
|
|
309
309
|
this._failRichReady(new Error(module
|
|
310
|
-
?
|
|
311
|
-
:
|
|
310
|
+
? 'Input is not currently rendered'
|
|
311
|
+
: 'Input editor runtime is unavailable'));
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
if (this._isComposing) {
|
|
@@ -339,12 +339,12 @@ let PromptLineElement = class PromptLineElement extends LitElement {
|
|
|
339
339
|
const hadFocus = previous.hasFocus();
|
|
340
340
|
previous.destroy();
|
|
341
341
|
this._controller = rich;
|
|
342
|
-
this._mode =
|
|
342
|
+
this._mode = 'rich';
|
|
343
343
|
rich.mount(host, this._makeInit(value));
|
|
344
344
|
// Map plain-text caret offsets into the seeded doc. `textToDoc` makes one
|
|
345
345
|
// paragraph per line, so a position costs +1 for the doc/first-paragraph
|
|
346
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(
|
|
347
|
+
const toDocPos = (offset) => offset + 1 + (value.slice(0, offset).split('\n').length - 1);
|
|
348
348
|
rich.setTextSelection({
|
|
349
349
|
from: toDocPos(selection.from),
|
|
350
350
|
to: toDocPos(selection.to),
|
|
@@ -374,10 +374,10 @@ __decorate([
|
|
|
374
374
|
property({ type: String })
|
|
375
375
|
], PromptLineElement.prototype, "placeholder", void 0);
|
|
376
376
|
__decorate([
|
|
377
|
-
property({ type: String, attribute:
|
|
377
|
+
property({ type: String, attribute: 'aria-label', reflect: true })
|
|
378
378
|
], PromptLineElement.prototype, "ariaLabel", void 0);
|
|
379
379
|
__decorate([
|
|
380
|
-
property({ type: String, attribute:
|
|
380
|
+
property({ type: String, attribute: 'test-id' })
|
|
381
381
|
], PromptLineElement.prototype, "testId", void 0);
|
|
382
382
|
__decorate([
|
|
383
383
|
property({ type: Boolean })
|
|
@@ -387,5 +387,5 @@ PromptLineElement = __decorate([
|
|
|
387
387
|
], PromptLineElement);
|
|
388
388
|
var PromptLineElement$1 = PromptLineElement;
|
|
389
389
|
|
|
390
|
-
export { PromptLineElement
|
|
390
|
+
export { PromptLineElement$1 as default };
|
|
391
391
|
//# sourceMappingURL=prompt-line.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-line.js","sources":["../../../../src/components/prompt-line/src/prompt-line.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;
|
|
1
|
+
{"version":3,"file":"prompt-line.js","sources":["../../../../src/components/prompt-line/src/prompt-line.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAqDH,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU,CAAA;AAA1C,IAAA,WAAA,GAAA;;AAKE;;;;;;;AAOG;QAEH,IAAA,CAAA,UAAU,GAAgB,EAAE;AAS5B;;;;AAIG;QAEH,IAAA,CAAA,IAAI,GAAG,KAAK;;QAIZ,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB,IAAA,CAAA,WAAW,GAAG,EAAE;;QAIP,IAAA,CAAA,SAAS,GAAG,EAAE;;QAIvB,IAAA,CAAA,MAAM,GAAG,EAAE;;QAIF,IAAA,CAAA,SAAS,GAAG,KAAK;QAElB,IAAA,CAAA,WAAW,GAAgC,IAAI;QAC/C,IAAA,CAAA,KAAK,GAAwB,UAAU;QACvC,IAAA,CAAA,WAAW,GAAuB,IAAI;QACtC,IAAA,CAAA,kBAAkB,GAAuB,IAAI;;QAE7C,IAAA,CAAA,YAAY,GAAG,KAAK;QACpB,IAAA,CAAA,UAAU,GAAG,KAAK;QAClB,IAAA,CAAA,YAAY,GAAG,KAAK;QACpB,IAAA,CAAA,eAAe,GAAG,KAAK;AAC/B;;;;AAIG;QACK,IAAA,CAAA,UAAU,GAA2B,IAAI;QACzC,IAAA,CAAA,iBAAiB,GAAsC,IAAI;QAC3D,IAAA,CAAA,gBAAgB,GAAqC,IAAI;QAgNzD,IAAA,CAAA,mBAAmB,GAAG,MAAW;AACvC,YAAA,IAAI,CAAC,YAAY,GAAG,IAAI;AAC1B,QAAA,CAAC;QAEO,IAAA,CAAA,iBAAiB,GAAG,MAAW;AACrC,YAAA,IAAI,CAAC,YAAY,GAAG,KAAK;AACzB,YAAA,IAAI,IAAI,CAAC,eA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C,CAAA,EAAG,MAAM,CAAA,YAAA,CAAc;AAChC,CAAA,EAAA,iBAAiB,CA+YtB;AAQD,0BAAe,iBAAiB;;;;"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { LitElement } from
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
import '@carbon/web-components/es/components/button/index.js';
|
|
11
|
+
import './stop-streaming-button.js';
|
|
12
12
|
/**
|
|
13
13
|
* Send control component — renders the send button or stop streaming button.
|
|
14
14
|
*
|
|
@@ -40,7 +40,7 @@ declare class InputSendControlElement extends LitElement {
|
|
|
40
40
|
}
|
|
41
41
|
declare global {
|
|
42
42
|
interface HTMLElementTagNameMap {
|
|
43
|
-
|
|
43
|
+
'cds-aichat-input-send-control': InputSendControlElement;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
export default InputSendControlElement;
|
|
@@ -48,20 +48,20 @@ let InputSendControlElement = class InputSendControlElement extends LitElement {
|
|
|
48
48
|
/** Whether the stop streaming button is disabled. */
|
|
49
49
|
this.isStopStreamingButtonDisabled = false;
|
|
50
50
|
/** Label for the send button tooltip. */
|
|
51
|
-
this.buttonLabel =
|
|
51
|
+
this.buttonLabel = 'Send';
|
|
52
52
|
/** Label for the stop streaming button tooltip. */
|
|
53
|
-
this.stopResponseLabel =
|
|
53
|
+
this.stopResponseLabel = 'Stop response';
|
|
54
54
|
this._handleSendClick = () => {
|
|
55
55
|
if (this.disabled || this.disableSend || !this.hasValidInput) {
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
this.dispatchEvent(new CustomEvent(
|
|
58
|
+
this.dispatchEvent(new CustomEvent('cds-aichat-input-send', {
|
|
59
59
|
bubbles: true,
|
|
60
60
|
composed: true,
|
|
61
61
|
}));
|
|
62
62
|
};
|
|
63
63
|
this._handleStopStreamingClick = () => {
|
|
64
|
-
this.dispatchEvent(new CustomEvent(
|
|
64
|
+
this.dispatchEvent(new CustomEvent('cds-aichat-input-stop-streaming', {
|
|
65
65
|
bubbles: true,
|
|
66
66
|
composed: true,
|
|
67
67
|
}));
|
|
@@ -69,16 +69,15 @@ let InputSendControlElement = class InputSendControlElement extends LitElement {
|
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
71
|
// Check if RTL direction is set
|
|
72
|
-
const isRTL = document.dir ===
|
|
72
|
+
const isRTL = document.dir === 'rtl' || document.documentElement.dir === 'rtl';
|
|
73
73
|
const showDisabledSend = !this.hasValidInput || this.disabled || this.disableSend;
|
|
74
74
|
if (this.isStopStreamingButtonVisible) {
|
|
75
75
|
return html `
|
|
76
76
|
<cds-aichat-stop-streaming-button
|
|
77
77
|
label="${this.stopResponseLabel}"
|
|
78
78
|
?disabled="${this.isStopStreamingButtonDisabled}"
|
|
79
|
-
tooltip-alignment="${isRTL ?
|
|
80
|
-
@click="${this._handleStopStreamingClick}"
|
|
81
|
-
></cds-aichat-stop-streaming-button>
|
|
79
|
+
tooltip-alignment="${isRTL ? 'top-left' : 'top-right'}"
|
|
80
|
+
@click="${this._handleStopStreamingClick}"></cds-aichat-stop-streaming-button>
|
|
82
81
|
`;
|
|
83
82
|
}
|
|
84
83
|
return html `
|
|
@@ -93,11 +92,10 @@ let InputSendControlElement = class InputSendControlElement extends LitElement {
|
|
|
93
92
|
tooltip-position="${BUTTON_TOOLTIP_POSITION.TOP}"
|
|
94
93
|
@click="${this._handleSendClick}"
|
|
95
94
|
aria-label="${this.buttonLabel}"
|
|
96
|
-
data-testid="${ifDefined(this.testId)}"
|
|
97
|
-
>
|
|
95
|
+
data-testid="${ifDefined(this.testId)}">
|
|
98
96
|
${this.hasValidInput
|
|
99
|
-
? iconLoader(SendFilled16, { slot:
|
|
100
|
-
: iconLoader(Send16, { slot:
|
|
97
|
+
? iconLoader(SendFilled16, { slot: 'icon' })
|
|
98
|
+
: iconLoader(Send16, { slot: 'icon' })}
|
|
101
99
|
</cds-button>
|
|
102
100
|
`;
|
|
103
101
|
}
|
|
@@ -106,28 +104,28 @@ InputSendControlElement.styles = css `
|
|
|
106
104
|
${unsafeCSS(styles)}
|
|
107
105
|
`;
|
|
108
106
|
__decorate([
|
|
109
|
-
property({ type: Boolean, attribute:
|
|
107
|
+
property({ type: Boolean, attribute: 'has-valid-input' })
|
|
110
108
|
], InputSendControlElement.prototype, "hasValidInput", void 0);
|
|
111
109
|
__decorate([
|
|
112
|
-
property({ type: Boolean, attribute:
|
|
110
|
+
property({ type: Boolean, attribute: 'disabled' })
|
|
113
111
|
], InputSendControlElement.prototype, "disabled", void 0);
|
|
114
112
|
__decorate([
|
|
115
|
-
property({ type: Boolean, attribute:
|
|
113
|
+
property({ type: Boolean, attribute: 'disable-send' })
|
|
116
114
|
], InputSendControlElement.prototype, "disableSend", void 0);
|
|
117
115
|
__decorate([
|
|
118
|
-
property({ type: Boolean, attribute:
|
|
116
|
+
property({ type: Boolean, attribute: 'show-stop-streaming' })
|
|
119
117
|
], InputSendControlElement.prototype, "isStopStreamingButtonVisible", void 0);
|
|
120
118
|
__decorate([
|
|
121
|
-
property({ type: Boolean, attribute:
|
|
119
|
+
property({ type: Boolean, attribute: 'disable-stop-streaming' })
|
|
122
120
|
], InputSendControlElement.prototype, "isStopStreamingButtonDisabled", void 0);
|
|
123
121
|
__decorate([
|
|
124
|
-
property({ type: String, attribute:
|
|
122
|
+
property({ type: String, attribute: 'button-label' })
|
|
125
123
|
], InputSendControlElement.prototype, "buttonLabel", void 0);
|
|
126
124
|
__decorate([
|
|
127
|
-
property({ type: String, attribute:
|
|
125
|
+
property({ type: String, attribute: 'stop-response-label' })
|
|
128
126
|
], InputSendControlElement.prototype, "stopResponseLabel", void 0);
|
|
129
127
|
__decorate([
|
|
130
|
-
property({ type: String, attribute:
|
|
128
|
+
property({ type: String, attribute: 'test-id' })
|
|
131
129
|
], InputSendControlElement.prototype, "testId", void 0);
|
|
132
130
|
InputSendControlElement = __decorate([
|
|
133
131
|
carbonElement(`${prefix}-input-send-control`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-control.js","sources":["../../../../src/components/prompt-line/src/send-control.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AA2BH;;;;;;AAMG;AAEH,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU,CAAA;AAAhD,IAAA,WAAA,GAAA;;;QAOE,IAAA,CAAA,aAAa,GAAG,KAAK;;QAIrB,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAIhB,IAAA,CAAA,WAAW,GAAG,KAAK;;QAInB,IAAA,CAAA,4BAA4B,GAAG,KAAK;;QAIpC,IAAA,CAAA,6BAA6B,GAAG,KAAK;;QAIrC,IAAA,CAAA,WAAW,GAAG,MAAM;;QAIpB,IAAA,CAAA,iBAAiB,GAAG,eAAe;QAM3B,IAAA,CAAA,gBAAgB,GAAG,MAAK;AAC9B,YAAA,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;gBAC5D;YACF;AAEA,YAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,uBAAuB,EAAE;AACvC,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CACH;AACH,QAAA,CAAC;QAEO,IAAA,CAAA,yBAAyB,GAAG,MAAK;AACvC,YAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iCAAiC,EAAE;AACjD,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CACH;AACH,QAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"send-control.js","sources":["../../../../src/components/prompt-line/src/send-control.ts"],"sourcesContent":[null],"names":[],"m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"}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import { LitElement } from
|
|
10
|
-
import
|
|
9
|
+
import { LitElement } from 'lit';
|
|
10
|
+
import '@carbon/web-components/es/components/icon-button/index.js';
|
|
11
11
|
/**
|
|
12
12
|
* Stop streaming button component for AI Chat input.
|
|
13
13
|
*
|
|
@@ -36,7 +36,7 @@ declare class StopStreamingButton extends LitElement {
|
|
|
36
36
|
}
|
|
37
37
|
declare global {
|
|
38
38
|
interface HTMLElementTagNameMap {
|
|
39
|
-
|
|
39
|
+
'cds-aichat-stop-streaming-button': StopStreamingButton;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export default StopStreamingButton;
|
|
@@ -35,11 +35,11 @@ let StopStreamingButton = class StopStreamingButton extends LitElement {
|
|
|
35
35
|
/**
|
|
36
36
|
* The label to display in the button tooltip.
|
|
37
37
|
*/
|
|
38
|
-
this.label =
|
|
38
|
+
this.label = '';
|
|
39
39
|
/**
|
|
40
40
|
* The direction to align the tooltip to the button.
|
|
41
41
|
*/
|
|
42
|
-
this.tooltipAlignment =
|
|
42
|
+
this.tooltipAlignment = '';
|
|
43
43
|
/**
|
|
44
44
|
* Determines whether the stop generating button is disabled.
|
|
45
45
|
*/
|
|
@@ -56,11 +56,10 @@ let StopStreamingButton = class StopStreamingButton extends LitElement {
|
|
|
56
56
|
kind="${BUTTON_KIND.GHOST}"
|
|
57
57
|
size="${BUTTON_SIZE.SMALL}"
|
|
58
58
|
?disabled=${this.disabled}
|
|
59
|
-
@click="${this._handleOnClick}"
|
|
60
|
-
>
|
|
59
|
+
@click="${this._handleOnClick}">
|
|
61
60
|
<span slot="icon">
|
|
62
61
|
<span
|
|
63
|
-
class="${prefix}--stop-icon ${this.disabled ? `${prefix}--stop-icon--disabled` :
|
|
62
|
+
class="${prefix}--stop-icon ${this.disabled ? `${prefix}--stop-icon--disabled` : ''}"
|
|
64
63
|
>${iconLoader(StopFilled16)}</span
|
|
65
64
|
>
|
|
66
65
|
</span>
|
|
@@ -73,13 +72,13 @@ StopStreamingButton.styles = css `
|
|
|
73
72
|
${unsafeCSS(styles)}
|
|
74
73
|
`;
|
|
75
74
|
__decorate([
|
|
76
|
-
property({ type: String, attribute:
|
|
75
|
+
property({ type: String, attribute: 'label' })
|
|
77
76
|
], StopStreamingButton.prototype, "label", void 0);
|
|
78
77
|
__decorate([
|
|
79
|
-
property({ type: String, attribute:
|
|
78
|
+
property({ type: String, attribute: 'tooltip-alignment' })
|
|
80
79
|
], StopStreamingButton.prototype, "tooltipAlignment", void 0);
|
|
81
80
|
__decorate([
|
|
82
|
-
property({ type: Boolean, attribute:
|
|
81
|
+
property({ type: Boolean, attribute: 'disabled' })
|
|
83
82
|
], StopStreamingButton.prototype, "disabled", void 0);
|
|
84
83
|
__decorate([
|
|
85
84
|
property({ type: Object })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop-streaming-button.js","sources":["../../../../src/components/prompt-line/src/stop-streaming-button.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAoBH;;;;AAIG;AAEH,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,UAAU,CAAA;AAA5C,IAAA,WAAA,GAAA;;AAKE;;AAEG;QAEH,IAAA,CAAA,KAAK,GAAG,EAAE;AAEV;;AAEG;QAEH,IAAA,CAAA,gBAAgB,GAAG,EAAE;AAErB;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAG,KAAK;QAQhB,IAAA,CAAA,cAAc,GAAG,MAAK;AACpB,YAAA,IAAI,CAAC,OAAO,IAAI;AAClB,QAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"stop-streaming-button.js","sources":["../../../../src/components/prompt-line/src/stop-streaming-button.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;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A,EAAA,mBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AAMtB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE;AACjC,CAAA,EAAA,mBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMjB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACQ,CAAA,EAAA,mBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AA3B9B,mBAAmB,GAAA,UAAA,CAAA;AADxB,IAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,sBAAA,CAAwB;AAC1C,CAAA,EAAA,mBAAmB,CAsDxB;AAQD,4BAAe,mBAAmB;;;;"}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
* into its own base bundle, so both the textarea and rich surfaces send on
|
|
20
20
|
* Enter without this builder.
|
|
21
21
|
*/
|
|
22
|
-
import type { Extension } from
|
|
23
|
-
import type { AutocompleteConfig,
|
|
22
|
+
import type { Extension } from '@tiptap/core';
|
|
23
|
+
import type { AutocompleteConfig, StartersConfig, TriggerSuggestionConfig } from './types.js';
|
|
24
24
|
export interface BuildCarbonExtensionsConfig {
|
|
25
25
|
mention?: TriggerSuggestionConfig;
|
|
26
26
|
command?: TriggerSuggestionConfig;
|
|
27
27
|
autocomplete?: AutocompleteConfig;
|
|
28
|
-
starters?:
|
|
28
|
+
starters?: StartersConfig;
|
|
29
29
|
}
|
|
30
30
|
export declare function buildCarbonExtensions(configs: BuildCarbonExtensionsConfig): Extension[];
|
|
@@ -28,8 +28,8 @@ function buildCarbonExtensions(configs) {
|
|
|
28
28
|
if (configs.autocomplete) {
|
|
29
29
|
out.push(carbonAutocomplete(configs.autocomplete));
|
|
30
30
|
}
|
|
31
|
-
if (configs.starters
|
|
32
|
-
out.push(carbonStarterTrigger(configs.starters));
|
|
31
|
+
if (configs.starters?.items.length) {
|
|
32
|
+
out.push(carbonStarterTrigger(configs.starters.items, configs.starters.isOn));
|
|
33
33
|
}
|
|
34
34
|
return out;
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-extensions.js","sources":["../../../../../src/components/prompt-line/src/tiptap/build-extensions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AAkCG,SAAU,qBAAqB,CACnC,OAAoC,EAAA;IAEpC,MAAM,GAAG,GAAgB,EAAE;AAC3B,IAAA,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAyB,CAAC;IAClE;AACA,IAAA,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAyB,CAAC;IAClE;AACA,IAAA,IAAI,OAAO,CAAC,YAAY,EAAE;QACxB,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACpD;
|
|
1
|
+
{"version":3,"file":"build-extensions.js","sources":["../../../../../src/components/prompt-line/src/tiptap/build-extensions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;;;AAOG;AAkCG,SAAU,qBAAqB,CACnC,OAAoC,EAAA;IAEpC,MAAM,GAAG,GAAgB,EAAE;AAC3B,IAAA,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAyB,CAAC;IAClE;AACA,IAAA,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAyB,CAAC;IAClE;AACA,IAAA,IAAI,OAAO,CAAC,YAAY,EAAE;QACxB,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACpD;IACA,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE;AAClC,QAAA,GAAG,CAAC,IAAI,CACN,oBAAoB,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CACpE;IACH;AACA,IAAA,OAAO,GAAG;AACZ;;;;"}
|
|
@@ -16,6 +16,6 @@
|
|
|
16
16
|
* the suggestion-render lifecycle via the shared `dispatchTriggerChange`
|
|
17
17
|
* helper.
|
|
18
18
|
*/
|
|
19
|
-
import { Extension } from
|
|
20
|
-
import type { AutocompleteConfig } from
|
|
19
|
+
import { Extension } from '@tiptap/core';
|
|
20
|
+
import type { AutocompleteConfig } from './types.js';
|
|
21
21
|
export declare function carbonAutocomplete(config: AutocompleteConfig): Extension;
|
|
@@ -29,7 +29,7 @@ import { dispatchTriggerChange } from './trigger-utils.js';
|
|
|
29
29
|
* helper.
|
|
30
30
|
*/
|
|
31
31
|
function carbonAutocomplete(config) {
|
|
32
|
-
const name = config.name ??
|
|
32
|
+
const name = config.name ?? 'autocomplete';
|
|
33
33
|
const pluginKey = new PluginKey(`carbonAutocompleteSuggestion_${name}`);
|
|
34
34
|
return Extension.create({
|
|
35
35
|
name: `carbon${capitalize(name)}`,
|
|
@@ -39,12 +39,12 @@ function carbonAutocomplete(config) {
|
|
|
39
39
|
return [
|
|
40
40
|
Suggestion({
|
|
41
41
|
editor,
|
|
42
|
-
char:
|
|
42
|
+
char: '',
|
|
43
43
|
pluginKey,
|
|
44
44
|
// Match any non-empty text as the autocomplete query.
|
|
45
45
|
allowedPrefixes: null,
|
|
46
46
|
findSuggestionMatch: ({ $position }) => {
|
|
47
|
-
const text = $position.parent.textBetween(0, $position.parentOffset,
|
|
47
|
+
const text = $position.parent.textBetween(0, $position.parentOffset, '\n', '\0');
|
|
48
48
|
if (!text || text.length === 0) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
@@ -70,7 +70,7 @@ function carbonAutocomplete(config) {
|
|
|
70
70
|
const insertText = item.value ?? item.label;
|
|
71
71
|
ed.chain()
|
|
72
72
|
.focus()
|
|
73
|
-
.insertContentAt(range, [{ type:
|
|
73
|
+
.insertContentAt(range, [{ type: 'text', text: insertText }])
|
|
74
74
|
.run();
|
|
75
75
|
config.onSelect?.(item);
|
|
76
76
|
},
|
|
@@ -78,7 +78,7 @@ function carbonAutocomplete(config) {
|
|
|
78
78
|
onStart: (props) => {
|
|
79
79
|
lastQuery = props.query;
|
|
80
80
|
dispatchTriggerChange(props.editor, {
|
|
81
|
-
type:
|
|
81
|
+
type: 'autocomplete',
|
|
82
82
|
query: props.query,
|
|
83
83
|
triggerOffset: props.range.from,
|
|
84
84
|
});
|
|
@@ -89,7 +89,7 @@ function carbonAutocomplete(config) {
|
|
|
89
89
|
}
|
|
90
90
|
lastQuery = props.query;
|
|
91
91
|
dispatchTriggerChange(props.editor, {
|
|
92
|
-
type:
|
|
92
|
+
type: 'autocomplete',
|
|
93
93
|
query: props.query,
|
|
94
94
|
triggerOffset: props.range.from,
|
|
95
95
|
});
|
|
@@ -110,7 +110,7 @@ async function resolveItems(config, query) {
|
|
|
110
110
|
if (query.length < minQueryLength) {
|
|
111
111
|
return [];
|
|
112
112
|
}
|
|
113
|
-
if (typeof config.items ===
|
|
113
|
+
if (typeof config.items === 'function') {
|
|
114
114
|
return Promise.resolve(config.items(query));
|
|
115
115
|
}
|
|
116
116
|
if (!query) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
import type { SuggestionItem, TriggerSuggestionConfig } from
|
|
9
|
+
import type { SuggestionItem, TriggerSuggestionConfig } from './types.js';
|
|
10
10
|
/**
|
|
11
11
|
* Resolve whether a selected item's chip should be prefixed with the
|
|
12
12
|
* trigger character: the item's own {@link SuggestionItem.showTriggerInChip}
|
|
@@ -14,6 +14,6 @@ import type { SuggestionItem, TriggerSuggestionConfig } from "./types.js";
|
|
|
14
14
|
* {@link TriggerSuggestionConfig.showTriggerInChip}, then the
|
|
15
15
|
* command/mention default.
|
|
16
16
|
*/
|
|
17
|
-
export declare function resolveShowTriggerInChip(item: SuggestionItem, config: Pick<TriggerSuggestionConfig,
|
|
17
|
+
export declare function resolveShowTriggerInChip(item: SuggestionItem, config: Pick<TriggerSuggestionConfig, 'showTriggerInChip'>, isCommand: boolean): boolean;
|
|
18
18
|
export declare function carbonMention(config: TriggerSuggestionConfig): import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|
|
19
19
|
export declare function carbonCommand(config: TriggerSuggestionConfig): import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions<any, import("@tiptap/extension-mention").MentionNodeAttrs>, any>;
|