@celljs/ta-web 4.10.0 → 4.12.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/README.en.md +7 -7
- package/README.md +7 -7
- package/esm/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/esm/browser/assistant/assistant-chat-list.js +12 -0
- package/esm/browser/assistant/assistant-extension.js +5 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +2 -1
- package/esm/browser/assistant/assistant-task-book.d.ts +12 -2
- package/esm/browser/assistant/assistant-task-book.js +23 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +1 -1
- package/esm/browser/assistant/assistant-task-source.js +5 -10
- package/esm/browser/assistant/assistant-task-util.d.ts +13 -3
- package/esm/browser/assistant/assistant-task-util.js +59 -12
- package/esm/browser/assistant/assistant-view.js +48 -24
- package/esm/browser/assistant/assistant.d.ts +18 -4
- package/esm/browser/assistant/assistant.js +52 -17
- package/esm/browser/avatar/dino-face.js +1 -2
- package/esm/browser/chat/chat-protocol.d.ts +5 -0
- package/esm/browser/chat/chat-stores.d.ts +8 -5
- package/esm/browser/chat/chat-stores.js +17 -9
- package/esm/browser/chat/chat-view.js +23 -15
- package/esm/browser/chat/chat.d.ts +16 -8
- package/esm/browser/chat/chat.js +86 -51
- package/esm/browser/components/account-menu.d.ts +0 -2
- package/esm/browser/components/account-menu.js +1 -27
- package/esm/browser/components/agent-settings-view.d.ts +3 -2
- package/esm/browser/components/agent-settings-view.js +2 -1
- package/esm/browser/components/app-nav.d.ts +5 -2
- package/esm/browser/components/app-nav.js +22 -9
- package/esm/browser/components/app-shell-hooks.js +5 -3
- package/esm/browser/components/app-view.js +84 -20
- package/esm/browser/components/busy.d.ts +25 -0
- package/esm/browser/components/busy.js +52 -0
- package/esm/browser/components/chat-icon.d.ts +29 -0
- package/esm/browser/components/chat-icon.js +78 -0
- package/esm/browser/components/chat-list.d.ts +73 -6
- package/esm/browser/components/chat-list.js +295 -60
- package/esm/browser/components/chat-seen.d.ts +53 -0
- package/esm/browser/components/chat-seen.js +101 -0
- package/esm/browser/components/composer-box.d.ts +15 -4
- package/esm/browser/components/composer-box.js +139 -77
- package/esm/browser/components/composer.d.ts +9 -6
- package/esm/browser/components/composer.js +32 -4
- package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
- package/esm/browser/components/conversation-scroll-hooks.js +98 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
- package/esm/browser/components/conversation-scroll-util.js +56 -0
- package/esm/browser/components/conversation-scroll.d.ts +52 -31
- package/esm/browser/components/conversation-scroll.js +170 -129
- package/esm/browser/components/custom-host.d.ts +3 -0
- package/esm/browser/components/custom-host.js +14 -0
- package/esm/browser/components/directory-commands.d.ts +6 -0
- package/esm/browser/components/directory-commands.js +34 -0
- package/esm/browser/components/discover-view.d.ts +11 -4
- package/esm/browser/components/discover-view.js +20 -11
- package/esm/browser/components/dismiss.d.ts +3 -0
- package/esm/browser/components/dismiss.js +29 -0
- package/esm/browser/components/earlier-messages.d.ts +34 -3
- package/esm/browser/components/earlier-messages.js +42 -8
- package/esm/browser/components/editor-area.d.ts +6 -22
- package/esm/browser/components/editor-area.js +10 -97
- package/esm/browser/components/face.d.ts +24 -0
- package/esm/browser/components/face.js +42 -0
- package/esm/browser/components/fold-text.d.ts +20 -0
- package/esm/browser/components/fold-text.js +66 -0
- package/esm/browser/components/folder-picker.d.ts +1 -1
- package/esm/browser/components/folder-picker.js +1 -1
- package/esm/browser/components/full-screen.d.ts +9 -0
- package/esm/browser/components/full-screen.js +26 -0
- package/esm/browser/components/grow-box.d.ts +9 -0
- package/esm/browser/components/grow-box.js +50 -0
- package/esm/browser/components/hold-to-talk.d.ts +22 -0
- package/esm/browser/components/hold-to-talk.js +29 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +3 -1
- package/esm/browser/components/icon.js +4 -3
- package/esm/browser/components/image-viewer.d.ts +10 -2
- package/esm/browser/components/image-viewer.js +48 -11
- package/esm/browser/components/launcher-search-util.d.ts +4 -3
- package/esm/browser/components/launcher-search-util.js +12 -4
- package/esm/browser/components/lightbox.d.ts +5 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/list-rows.d.ts +9 -1
- package/esm/browser/components/list-rows.js +17 -3
- package/esm/browser/components/markdown.js +36 -4
- package/esm/browser/components/media.js +73 -7
- package/esm/browser/components/message-actions.js +3 -0
- package/esm/browser/components/message-footer.d.ts +8 -0
- package/esm/browser/components/message-footer.js +20 -3
- package/esm/browser/components/message-list.d.ts +60 -7
- package/esm/browser/components/message-list.js +206 -58
- package/esm/browser/components/message-menu.js +6 -1
- package/esm/browser/components/model-picker.js +1 -0
- package/esm/browser/components/nav-places.d.ts +21 -2
- package/esm/browser/components/nav-places.js +20 -4
- package/esm/browser/components/notice-center.js +34 -0
- package/esm/browser/components/notice-face.d.ts +10 -0
- package/esm/browser/components/notice-face.js +28 -0
- package/esm/browser/components/phone-shell.d.ts +23 -1
- package/esm/browser/components/phone-shell.js +98 -9
- package/esm/browser/components/picture.d.ts +8 -1
- package/esm/browser/components/picture.js +12 -1
- package/esm/browser/components/plus-menu.d.ts +23 -0
- package/esm/browser/components/plus-menu.js +90 -0
- package/esm/browser/components/recent-shot.d.ts +15 -0
- package/esm/browser/components/recent-shot.js +174 -0
- package/esm/browser/components/relay-view.js +10 -3
- package/esm/browser/components/run-status.d.ts +1 -1
- package/esm/browser/components/run-status.js +17 -29
- package/esm/browser/components/said-text.d.ts +6 -0
- package/esm/browser/components/said-text.js +14 -0
- package/esm/browser/components/scan-screen.d.ts +10 -0
- package/esm/browser/components/scan-screen.js +230 -0
- package/esm/browser/components/search-page.js +10 -6
- package/esm/browser/components/session-settings.d.ts +2 -3
- package/esm/browser/components/session-settings.js +1 -0
- package/esm/browser/components/session-view.d.ts +3 -1
- package/esm/browser/components/session-view.js +35 -21
- package/esm/browser/components/settings-choices.d.ts +1 -0
- package/esm/browser/components/settings-choices.js +3 -2
- package/esm/browser/components/settings-controls.d.ts +5 -3
- package/esm/browser/components/settings-controls.js +10 -1
- package/esm/browser/components/settings-parts.js +45 -14
- package/esm/browser/components/stop-times.d.ts +47 -0
- package/esm/browser/components/stop-times.js +81 -0
- package/esm/browser/components/tool-view.js +7 -2
- package/esm/browser/components/unseen-drop.d.ts +39 -0
- package/esm/browser/components/unseen-drop.js +219 -0
- package/esm/browser/components/use-seen-chats.d.ts +8 -0
- package/esm/browser/components/use-seen-chats.js +49 -0
- package/esm/browser/components/use-stop-times.d.ts +3 -0
- package/esm/browser/components/use-stop-times.js +17 -0
- package/esm/browser/components/voice-button.d.ts +7 -1
- package/esm/browser/components/voice-button.js +15 -2
- package/esm/browser/components/voice-picker.d.ts +6 -0
- package/esm/browser/components/voice-picker.js +53 -0
- package/esm/browser/components/voice-talk.d.ts +11 -3
- package/esm/browser/components/voice-talk.js +24 -4
- package/esm/browser/components/web-composer.d.ts +4 -2
- package/esm/browser/components/web-composer.js +8 -4
- package/esm/browser/components/workbench-tabs.d.ts +41 -0
- package/esm/browser/components/workbench-tabs.js +193 -0
- package/esm/browser/components/workbench-toggle.d.ts +0 -13
- package/esm/browser/components/workbench-toggle.js +1 -28
- package/esm/browser/device/code-scan.d.ts +55 -0
- package/esm/browser/device/code-scan.js +137 -0
- package/esm/browser/device/code-vision.d.ts +51 -0
- package/esm/browser/device/code-vision.js +100 -0
- package/esm/browser/device/hold.js +4 -6
- package/esm/browser/device/long-press.d.ts +10 -0
- package/esm/browser/device/long-press.js +28 -12
- package/esm/browser/device/own-gestures.d.ts +25 -0
- package/esm/browser/device/own-gestures.js +39 -0
- package/esm/browser/device/photo-picker.d.ts +14 -0
- package/esm/browser/device/photo-picker.js +48 -0
- package/esm/browser/device/pull-down.js +3 -2
- package/esm/browser/device/recent-shots.d.ts +45 -0
- package/esm/browser/device/recent-shots.js +142 -0
- package/esm/browser/device/row-swipe.d.ts +2 -0
- package/esm/browser/device/row-swipe.js +14 -3
- package/esm/browser/device/sheet-swipe.d.ts +1 -1
- package/esm/browser/device/sheet-swipe.js +25 -4
- package/esm/browser/extension/extension-view.d.ts +10 -0
- package/esm/browser/extension/extension-view.js +6 -0
- package/esm/browser/extension/icons.js +16 -2
- package/esm/browser/extension/web-api-components.d.ts +287 -0
- package/esm/browser/extension/web-api-components.js +2 -0
- package/esm/browser/extension/web-api-contributions.d.ts +394 -0
- package/esm/browser/extension/web-api-contributions.js +2 -0
- package/esm/browser/extension/web-api-desktop.d.ts +55 -0
- package/esm/browser/extension/web-api-desktop.js +2 -0
- package/esm/browser/extension/web-api-terminal.d.ts +71 -0
- package/esm/browser/extension/web-api-terminal.js +2 -0
- package/esm/browser/extension/web-editor-tabs.d.ts +42 -0
- package/esm/browser/extension/web-editor-tabs.js +137 -0
- package/esm/browser/extension/web-extension-api.d.ts +186 -565
- package/esm/browser/extension/web-extension-context.d.ts +78 -0
- package/esm/browser/extension/web-extension-context.js +354 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +57 -7
- package/esm/browser/extension/web-extension-protocol.js +34 -0
- package/esm/browser/extension/web-extension-run.d.ts +54 -0
- package/esm/browser/extension/web-extension-run.js +120 -0
- package/esm/browser/extension/web-extensions.d.ts +29 -69
- package/esm/browser/extension/web-extensions.js +121 -516
- package/esm/browser/extension/web-home.d.ts +19 -0
- package/esm/browser/extension/web-home.js +72 -0
- package/esm/browser/extension/web-pages.d.ts +13 -3
- package/esm/browser/extension/web-pages.js +23 -3
- package/esm/browser/extension/web-session-notices.d.ts +36 -0
- package/esm/browser/extension/web-session-notices.js +174 -0
- package/esm/browser/extension/web-sharing.d.ts +2 -0
- package/esm/browser/extension/web-sharing.js +4 -0
- package/esm/browser/game/game-host.d.ts +27 -0
- package/esm/browser/game/game-host.js +127 -0
- package/esm/browser/game/game-loader.d.ts +10 -0
- package/esm/browser/game/game-loader.js +28 -0
- package/esm/browser/game/game-protocol.d.ts +49 -0
- package/esm/browser/game/game-protocol.js +2 -0
- package/esm/browser/game/game-runner.d.ts +27 -0
- package/esm/browser/game/game-runner.js +60 -0
- package/esm/browser/game/game-util.d.ts +29 -0
- package/esm/browser/game/game-util.js +180 -0
- package/esm/browser/game/game-view.d.ts +12 -0
- package/esm/browser/game/game-view.js +31 -0
- package/esm/browser/game/game3d-protocol.d.ts +51 -0
- package/esm/browser/game/game3d-protocol.js +2 -0
- package/esm/browser/game/game3d-runner.d.ts +27 -0
- package/esm/browser/game/game3d-runner.js +149 -0
- package/esm/browser/hooks.d.ts +5 -1
- package/esm/browser/hooks.js +13 -2
- package/esm/browser/i18n/locales.d.ts +92 -2
- package/esm/browser/i18n/messages.d.ts +91 -1
- package/esm/browser/i18n/messages.js +187 -7
- package/esm/browser/index.d.ts +9 -0
- package/esm/browser/index.js +9 -0
- package/esm/browser/links/links-protocol.d.ts +7 -0
- package/esm/browser/links/links.d.ts +24 -7
- package/esm/browser/links/links.js +64 -11
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/notices/notices-protocol.d.ts +17 -0
- package/esm/browser/notices/notices.d.ts +1 -1
- package/esm/browser/notices/notices.js +6 -2
- package/esm/browser/notices/session-notices.d.ts +69 -0
- package/esm/browser/notices/session-notices.js +92 -0
- package/esm/browser/offline/device-values.js +12 -3
- package/esm/browser/offline/offline-reads.js +3 -1
- package/esm/browser/settings/navigation.d.ts +3 -2
- package/esm/browser/settings/navigation.js +4 -3
- package/esm/browser/settings/settings-protocol.d.ts +15 -0
- package/esm/browser/settings/settings-protocol.js +18 -4
- package/esm/browser/state/state-protocol.d.ts +8 -1
- package/esm/browser/state/state.d.ts +2 -0
- package/esm/browser/state/state.js +21 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +27 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +45 -5
- package/esm/browser/style/device.js +15 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +192 -56
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +39 -1
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +15 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +32 -6
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +21 -2
- package/esm/browser/style/tints.d.ts +27 -0
- package/esm/browser/style/tints.js +56 -0
- package/esm/browser/style.js +13 -1
- package/esm/browser/util/composer.d.ts +6 -0
- package/esm/browser/util/composer.js +16 -0
- package/esm/browser/util/desktop.d.ts +19 -1
- package/esm/browser/util/desktop.js +15 -0
- package/esm/browser/util/frame.d.ts +2 -0
- package/esm/browser/util/frame.js +2 -0
- package/esm/browser/util/link.d.ts +18 -0
- package/esm/browser/util/link.js +66 -1
- package/esm/browser/util/markdown.d.ts +4 -1
- package/esm/browser/util/markdown.js +1 -1
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +30 -0
- package/esm/browser/util/process.d.ts +57 -3
- package/esm/browser/util/process.js +123 -11
- package/esm/browser/util/progress.d.ts +19 -1
- package/esm/browser/util/progress.js +57 -4
- package/esm/browser/util/quote.d.ts +19 -0
- package/esm/browser/util/quote.js +58 -0
- package/esm/browser/util/tool.d.ts +19 -2
- package/esm/browser/util/tool.js +70 -2
- package/esm/browser/util/voice.d.ts +47 -7
- package/esm/browser/util/voice.js +269 -27
- package/esm/browser/workbench-calls.d.ts +6 -4
- package/esm/browser/workbench-calls.js +15 -10
- package/esm/browser/workbench-protocol.d.ts +31 -2
- package/esm/browser/workbench-util.d.ts +15 -4
- package/esm/browser/workbench-util.js +28 -5
- package/esm/browser/workbench.d.ts +33 -1
- package/esm/browser/workbench.js +142 -14
- package/lib/browser/assistant/assistant-chat-list.d.ts +11 -0
- package/lib/browser/assistant/assistant-chat-list.js +13 -0
- package/lib/browser/assistant/assistant-extension.js +5 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +2 -1
- package/lib/browser/assistant/assistant-task-book.d.ts +12 -2
- package/lib/browser/assistant/assistant-task-book.js +23 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +1 -1
- package/lib/browser/assistant/assistant-task-source.js +5 -10
- package/lib/browser/assistant/assistant-task-util.d.ts +13 -3
- package/lib/browser/assistant/assistant-task-util.js +59 -12
- package/lib/browser/assistant/assistant-view.js +46 -22
- package/lib/browser/assistant/assistant.d.ts +18 -4
- package/lib/browser/assistant/assistant.js +52 -17
- package/lib/browser/avatar/dino-face.js +1 -2
- package/lib/browser/chat/chat-protocol.d.ts +5 -0
- package/lib/browser/chat/chat-stores.d.ts +8 -5
- package/lib/browser/chat/chat-stores.js +17 -9
- package/lib/browser/chat/chat-view.js +22 -14
- package/lib/browser/chat/chat.d.ts +16 -8
- package/lib/browser/chat/chat.js +86 -51
- package/lib/browser/components/account-menu.d.ts +0 -2
- package/lib/browser/components/account-menu.js +2 -29
- package/lib/browser/components/agent-settings-view.d.ts +3 -2
- package/lib/browser/components/agent-settings-view.js +2 -1
- package/lib/browser/components/app-nav.d.ts +5 -2
- package/lib/browser/components/app-nav.js +18 -5
- package/lib/browser/components/app-shell-hooks.js +5 -3
- package/lib/browser/components/app-view.js +80 -16
- package/lib/browser/components/busy.d.ts +26 -0
- package/lib/browser/components/busy.js +91 -0
- package/lib/browser/components/chat-icon.d.ts +30 -0
- package/lib/browser/components/chat-icon.js +117 -0
- package/lib/browser/components/chat-list.d.ts +73 -6
- package/lib/browser/components/chat-list.js +295 -59
- package/lib/browser/components/chat-seen.d.ts +54 -0
- package/lib/browser/components/chat-seen.js +104 -0
- package/lib/browser/components/composer-box.d.ts +15 -4
- package/lib/browser/components/composer-box.js +136 -74
- package/lib/browser/components/composer.d.ts +9 -6
- package/lib/browser/components/composer.js +31 -3
- package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
- package/lib/browser/components/conversation-scroll-hooks.js +135 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
- package/lib/browser/components/conversation-scroll-util.js +60 -0
- package/lib/browser/components/conversation-scroll.d.ts +52 -31
- package/lib/browser/components/conversation-scroll.js +171 -164
- package/lib/browser/components/custom-host.d.ts +4 -0
- package/lib/browser/components/custom-host.js +50 -0
- package/lib/browser/components/directory-commands.d.ts +7 -0
- package/lib/browser/components/directory-commands.js +70 -0
- package/lib/browser/components/discover-view.d.ts +11 -4
- package/lib/browser/components/discover-view.js +19 -10
- package/lib/browser/components/dismiss.d.ts +4 -0
- package/lib/browser/components/dismiss.js +65 -0
- package/lib/browser/components/earlier-messages.d.ts +34 -3
- package/lib/browser/components/earlier-messages.js +44 -9
- package/lib/browser/components/editor-area.d.ts +6 -22
- package/lib/browser/components/editor-area.js +11 -98
- package/lib/browser/components/face.d.ts +25 -0
- package/lib/browser/components/face.js +79 -0
- package/lib/browser/components/fold-text.d.ts +21 -0
- package/lib/browser/components/fold-text.js +103 -0
- package/lib/browser/components/folder-picker.d.ts +1 -1
- package/lib/browser/components/folder-picker.js +1 -1
- package/lib/browser/components/full-screen.d.ts +10 -0
- package/lib/browser/components/full-screen.js +62 -0
- package/lib/browser/components/grow-box.d.ts +10 -0
- package/lib/browser/components/grow-box.js +86 -0
- package/lib/browser/components/hold-to-talk.d.ts +23 -0
- package/lib/browser/components/hold-to-talk.js +65 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +3 -1
- package/lib/browser/components/icon.js +4 -3
- package/lib/browser/components/image-viewer.d.ts +10 -2
- package/lib/browser/components/image-viewer.js +47 -10
- package/lib/browser/components/launcher-search-util.d.ts +4 -3
- package/lib/browser/components/launcher-search-util.js +12 -4
- package/lib/browser/components/lightbox.d.ts +5 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/list-rows.d.ts +9 -1
- package/lib/browser/components/list-rows.js +18 -3
- package/lib/browser/components/markdown.js +36 -4
- package/lib/browser/components/media.js +73 -7
- package/lib/browser/components/message-actions.js +3 -0
- package/lib/browser/components/message-footer.d.ts +8 -0
- package/lib/browser/components/message-footer.js +20 -2
- package/lib/browser/components/message-list.d.ts +60 -7
- package/lib/browser/components/message-list.js +206 -55
- package/lib/browser/components/message-menu.js +6 -1
- package/lib/browser/components/model-picker.js +1 -0
- package/lib/browser/components/nav-places.d.ts +21 -2
- package/lib/browser/components/nav-places.js +22 -4
- package/lib/browser/components/notice-center.js +34 -0
- package/lib/browser/components/notice-face.d.ts +11 -0
- package/lib/browser/components/notice-face.js +64 -0
- package/lib/browser/components/phone-shell.d.ts +23 -1
- package/lib/browser/components/phone-shell.js +99 -10
- package/lib/browser/components/picture.d.ts +8 -1
- package/lib/browser/components/picture.js +13 -1
- package/lib/browser/components/plus-menu.d.ts +24 -0
- package/lib/browser/components/plus-menu.js +126 -0
- package/lib/browser/components/recent-shot.d.ts +16 -0
- package/lib/browser/components/recent-shot.js +210 -0
- package/lib/browser/components/relay-view.js +10 -3
- package/lib/browser/components/run-status.d.ts +1 -1
- package/lib/browser/components/run-status.js +17 -29
- package/lib/browser/components/said-text.d.ts +7 -0
- package/lib/browser/components/said-text.js +50 -0
- package/lib/browser/components/scan-screen.d.ts +11 -0
- package/lib/browser/components/scan-screen.js +266 -0
- package/lib/browser/components/search-page.js +10 -6
- package/lib/browser/components/session-settings.d.ts +2 -3
- package/lib/browser/components/session-settings.js +1 -0
- package/lib/browser/components/session-view.d.ts +3 -1
- package/lib/browser/components/session-view.js +32 -18
- package/lib/browser/components/settings-choices.d.ts +1 -0
- package/lib/browser/components/settings-choices.js +2 -1
- package/lib/browser/components/settings-controls.d.ts +5 -3
- package/lib/browser/components/settings-controls.js +10 -1
- package/lib/browser/components/settings-parts.js +43 -12
- package/lib/browser/components/stop-times.d.ts +48 -0
- package/lib/browser/components/stop-times.js +85 -0
- package/lib/browser/components/tool-view.js +7 -2
- package/lib/browser/components/unseen-drop.d.ts +40 -0
- package/lib/browser/components/unseen-drop.js +256 -0
- package/lib/browser/components/use-seen-chats.d.ts +9 -0
- package/lib/browser/components/use-seen-chats.js +85 -0
- package/lib/browser/components/use-stop-times.d.ts +4 -0
- package/lib/browser/components/use-stop-times.js +53 -0
- package/lib/browser/components/voice-button.d.ts +7 -1
- package/lib/browser/components/voice-button.js +16 -2
- package/lib/browser/components/voice-picker.d.ts +7 -0
- package/lib/browser/components/voice-picker.js +89 -0
- package/lib/browser/components/voice-talk.d.ts +11 -3
- package/lib/browser/components/voice-talk.js +25 -4
- package/lib/browser/components/web-composer.d.ts +4 -2
- package/lib/browser/components/web-composer.js +7 -3
- package/lib/browser/components/workbench-tabs.d.ts +42 -0
- package/lib/browser/components/workbench-tabs.js +232 -0
- package/lib/browser/components/workbench-toggle.d.ts +0 -13
- package/lib/browser/components/workbench-toggle.js +1 -29
- package/lib/browser/device/code-scan.d.ts +56 -0
- package/lib/browser/device/code-scan.js +141 -0
- package/lib/browser/device/code-vision.d.ts +52 -0
- package/lib/browser/device/code-vision.js +103 -0
- package/lib/browser/device/hold.js +4 -6
- package/lib/browser/device/long-press.d.ts +10 -0
- package/lib/browser/device/long-press.js +28 -12
- package/lib/browser/device/own-gestures.d.ts +26 -0
- package/lib/browser/device/own-gestures.js +42 -0
- package/lib/browser/device/photo-picker.d.ts +15 -0
- package/lib/browser/device/photo-picker.js +51 -0
- package/lib/browser/device/pull-down.js +3 -2
- package/lib/browser/device/recent-shots.d.ts +46 -0
- package/lib/browser/device/recent-shots.js +145 -0
- package/lib/browser/device/row-swipe.d.ts +2 -0
- package/lib/browser/device/row-swipe.js +14 -3
- package/lib/browser/device/sheet-swipe.d.ts +1 -1
- package/lib/browser/device/sheet-swipe.js +25 -4
- package/lib/browser/extension/extension-view.d.ts +10 -0
- package/lib/browser/extension/extension-view.js +7 -1
- package/lib/browser/extension/icons.js +15 -1
- package/lib/browser/extension/web-api-components.d.ts +288 -0
- package/lib/browser/extension/web-api-components.js +3 -0
- package/lib/browser/extension/web-api-contributions.d.ts +395 -0
- package/lib/browser/extension/web-api-contributions.js +3 -0
- package/lib/browser/extension/web-api-desktop.d.ts +56 -0
- package/lib/browser/extension/web-api-desktop.js +3 -0
- package/lib/browser/extension/web-api-terminal.d.ts +72 -0
- package/lib/browser/extension/web-api-terminal.js +3 -0
- package/lib/browser/extension/web-editor-tabs.d.ts +43 -0
- package/lib/browser/extension/web-editor-tabs.js +141 -0
- package/lib/browser/extension/web-extension-api.d.ts +186 -565
- package/lib/browser/extension/web-extension-context.d.ts +79 -0
- package/lib/browser/extension/web-extension-context.js +391 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +57 -7
- package/lib/browser/extension/web-extension-protocol.js +35 -1
- package/lib/browser/extension/web-extension-run.d.ts +55 -0
- package/lib/browser/extension/web-extension-run.js +123 -0
- package/lib/browser/extension/web-extensions.d.ts +29 -69
- package/lib/browser/extension/web-extensions.js +117 -545
- package/lib/browser/extension/web-home.d.ts +20 -0
- package/lib/browser/extension/web-home.js +76 -0
- package/lib/browser/extension/web-pages.d.ts +13 -3
- package/lib/browser/extension/web-pages.js +23 -3
- package/lib/browser/extension/web-session-notices.d.ts +37 -0
- package/lib/browser/extension/web-session-notices.js +177 -0
- package/lib/browser/extension/web-sharing.d.ts +2 -0
- package/lib/browser/extension/web-sharing.js +4 -0
- package/lib/browser/game/game-host.d.ts +28 -0
- package/lib/browser/game/game-host.js +163 -0
- package/lib/browser/game/game-loader.d.ts +11 -0
- package/lib/browser/game/game-loader.js +31 -0
- package/lib/browser/game/game-protocol.d.ts +50 -0
- package/lib/browser/game/game-protocol.js +3 -0
- package/lib/browser/game/game-runner.d.ts +28 -0
- package/lib/browser/game/game-runner.js +64 -0
- package/lib/browser/game/game-util.d.ts +30 -0
- package/lib/browser/game/game-util.js +183 -0
- package/lib/browser/game/game-view.d.ts +13 -0
- package/lib/browser/game/game-view.js +68 -0
- package/lib/browser/game/game3d-protocol.d.ts +52 -0
- package/lib/browser/game/game3d-protocol.js +3 -0
- package/lib/browser/game/game3d-runner.d.ts +28 -0
- package/lib/browser/game/game3d-runner.js +153 -0
- package/lib/browser/hooks.d.ts +5 -1
- package/lib/browser/hooks.js +14 -2
- package/lib/browser/i18n/locales.d.ts +92 -2
- package/lib/browser/i18n/messages.d.ts +91 -1
- package/lib/browser/i18n/messages.js +187 -7
- package/lib/browser/index.d.ts +9 -0
- package/lib/browser/index.js +9 -0
- package/lib/browser/links/links-protocol.d.ts +7 -0
- package/lib/browser/links/links.d.ts +24 -7
- package/lib/browser/links/links.js +64 -11
- package/lib/browser/markdown/code-renderers.d.ts +5 -0
- package/lib/browser/markdown/code-renderers.js +40 -0
- package/lib/browser/notices/notices-protocol.d.ts +17 -0
- package/lib/browser/notices/notices.d.ts +1 -1
- package/lib/browser/notices/notices.js +6 -2
- package/lib/browser/notices/session-notices.d.ts +70 -0
- package/lib/browser/notices/session-notices.js +96 -0
- package/lib/browser/offline/device-values.js +12 -3
- package/lib/browser/offline/offline-reads.js +3 -1
- package/lib/browser/settings/navigation.d.ts +3 -2
- package/lib/browser/settings/navigation.js +4 -3
- package/lib/browser/settings/settings-protocol.d.ts +15 -0
- package/lib/browser/settings/settings-protocol.js +19 -5
- package/lib/browser/state/state-protocol.d.ts +8 -1
- package/lib/browser/state/state.d.ts +2 -0
- package/lib/browser/state/state.js +21 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +27 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +45 -5
- package/lib/browser/style/device.js +15 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +192 -56
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +39 -1
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +15 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +32 -6
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +21 -2
- package/lib/browser/style/tints.d.ts +28 -0
- package/lib/browser/style/tints.js +59 -0
- package/lib/browser/style.js +13 -1
- package/lib/browser/util/composer.d.ts +6 -0
- package/lib/browser/util/composer.js +16 -0
- package/lib/browser/util/desktop.d.ts +19 -1
- package/lib/browser/util/desktop.js +15 -0
- package/lib/browser/util/frame.d.ts +2 -0
- package/lib/browser/util/frame.js +2 -0
- package/lib/browser/util/link.d.ts +18 -0
- package/lib/browser/util/link.js +66 -1
- package/lib/browser/util/markdown.d.ts +4 -1
- package/lib/browser/util/markdown.js +1 -1
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +30 -0
- package/lib/browser/util/process.d.ts +57 -3
- package/lib/browser/util/process.js +125 -12
- package/lib/browser/util/progress.d.ts +19 -1
- package/lib/browser/util/progress.js +57 -4
- package/lib/browser/util/quote.d.ts +20 -0
- package/lib/browser/util/quote.js +61 -0
- package/lib/browser/util/tool.d.ts +19 -2
- package/lib/browser/util/tool.js +70 -2
- package/lib/browser/util/voice.d.ts +47 -7
- package/lib/browser/util/voice.js +269 -27
- package/lib/browser/workbench-calls.d.ts +6 -4
- package/lib/browser/workbench-calls.js +15 -10
- package/lib/browser/workbench-protocol.d.ts +31 -2
- package/lib/browser/workbench-util.d.ts +15 -4
- package/lib/browser/workbench-util.js +28 -5
- package/lib/browser/workbench.d.ts +33 -1
- package/lib/browser/workbench.js +140 -12
- package/package.json +11 -8
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { DesktopUtil } from '../util/desktop.js';
|
|
2
|
+
/**
|
|
3
|
+
* The screenshot just taken, offered once above the message box as WeChat does: tapped, it goes into the box
|
|
4
|
+
* with what is typed. Offered once on this device, whatever box shows it first: it is marked offered as it shows
|
|
5
|
+
* (`claim`), so that the next conversation opened does not offer it again; a newer one is offered anew.
|
|
6
|
+
*/
|
|
7
|
+
export var RecentShots;
|
|
8
|
+
(function (RecentShots) {
|
|
9
|
+
/** A screenshot older than this is not offered. */
|
|
10
|
+
RecentShots.WINDOW_MS = 2 * 60000;
|
|
11
|
+
/** How long the offer stays when nothing is done with it. */
|
|
12
|
+
RecentShots.SHOWN_MS = 8000;
|
|
13
|
+
/** The window event the Ta app answers with, and the one it tells of a change of the photos with. */
|
|
14
|
+
RecentShots.EVENT = 'ta-shots';
|
|
15
|
+
RecentShots.CHANGE_EVENT = 'ta-shots-change';
|
|
16
|
+
/** Where the screenshots offered are kept (localStorage, of the device rather than of a computer). */
|
|
17
|
+
RecentShots.KEY = 'ta-recent-shots';
|
|
18
|
+
/** How many of them are kept: more than are taken in `WINDOW_MS`. */
|
|
19
|
+
const KEPT = 20;
|
|
20
|
+
/** An answer of the app not there in this long is none (an app gone to the background). */
|
|
21
|
+
const WAIT_MS = 5000;
|
|
22
|
+
/** What is offered when the storage cannot be written (a private window): kept for the page. */
|
|
23
|
+
const offered = new Set();
|
|
24
|
+
let next = 0;
|
|
25
|
+
function native() {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
return (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taShots;
|
|
28
|
+
}
|
|
29
|
+
/** The screenshots of this device, where Ta can read them. */
|
|
30
|
+
function source(scope = globalThis) {
|
|
31
|
+
if (scope === globalThis && native()) {
|
|
32
|
+
return NATIVE;
|
|
33
|
+
}
|
|
34
|
+
return DesktopUtil.recentShots(scope);
|
|
35
|
+
}
|
|
36
|
+
RecentShots.source = source;
|
|
37
|
+
/** Taken in the last `WINDOW_MS` (a clock a little ahead too). */
|
|
38
|
+
function fresh(shot, now = Date.now()) {
|
|
39
|
+
return Number.isFinite(shot.takenAt) && now - shot.takenAt <= RecentShots.WINDOW_MS && shot.takenAt - now <= 60000;
|
|
40
|
+
}
|
|
41
|
+
RecentShots.fresh = fresh;
|
|
42
|
+
function storage() {
|
|
43
|
+
try {
|
|
44
|
+
return globalThis.localStorage;
|
|
45
|
+
}
|
|
46
|
+
catch (_a) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function read(store) {
|
|
51
|
+
var _a;
|
|
52
|
+
try {
|
|
53
|
+
const kept = JSON.parse((_a = store === null || store === void 0 ? void 0 : store.getItem(RecentShots.KEY)) !== null && _a !== void 0 ? _a : '[]');
|
|
54
|
+
return Array.isArray(kept) ? kept.filter((id) => typeof id === 'string') : [];
|
|
55
|
+
}
|
|
56
|
+
catch (_b) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Whether `id` was offered on this device. */
|
|
61
|
+
function wasOffered(id, store = storage()) {
|
|
62
|
+
return offered.has(id) || read(store).includes(id);
|
|
63
|
+
}
|
|
64
|
+
RecentShots.wasOffered = wasOffered;
|
|
65
|
+
/** Marks `id` offered; `false` when it already was, by this page or another. */
|
|
66
|
+
function claim(id, store = storage()) {
|
|
67
|
+
if (wasOffered(id, store)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
offered.add(id);
|
|
71
|
+
try {
|
|
72
|
+
store === null || store === void 0 ? void 0 : store.setItem(RecentShots.KEY, JSON.stringify([...read(store), id].slice(-KEPT)));
|
|
73
|
+
}
|
|
74
|
+
catch (_a) {
|
|
75
|
+
// Kept for the page only.
|
|
76
|
+
}
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
RecentShots.claim = claim;
|
|
80
|
+
/** A data URL as a file the message box takes. */
|
|
81
|
+
function file(dataUrl, name = 'screenshot') {
|
|
82
|
+
var _a;
|
|
83
|
+
const match = /^data:([^;,]+);base64,(.*)$/s.exec(dataUrl);
|
|
84
|
+
if (!match) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
const [, type, data] = match;
|
|
88
|
+
const binary = atob(data);
|
|
89
|
+
const bytes = new Uint8Array(binary.length);
|
|
90
|
+
for (let index = 0; index < binary.length; index++) {
|
|
91
|
+
bytes[index] = binary.charCodeAt(index);
|
|
92
|
+
}
|
|
93
|
+
return new File([bytes], `${name}.${type.split('/')[1] === 'jpeg' ? 'jpg' : ((_a = type.split('/')[1]) !== null && _a !== void 0 ? _a : 'png')}`, { type });
|
|
94
|
+
}
|
|
95
|
+
RecentShots.file = file;
|
|
96
|
+
function call(action, shot) {
|
|
97
|
+
const shots = native();
|
|
98
|
+
if (!shots) {
|
|
99
|
+
return Promise.resolve(undefined);
|
|
100
|
+
}
|
|
101
|
+
const id = `s${++next}`;
|
|
102
|
+
return new Promise(resolve => {
|
|
103
|
+
const done = (answer) => {
|
|
104
|
+
clearTimeout(timer);
|
|
105
|
+
globalThis.removeEventListener(RecentShots.EVENT, onEvent);
|
|
106
|
+
resolve(answer);
|
|
107
|
+
};
|
|
108
|
+
const onEvent = (event) => {
|
|
109
|
+
const detail = event.detail;
|
|
110
|
+
if ((detail === null || detail === void 0 ? void 0 : detail.id) === id) {
|
|
111
|
+
done(detail);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const timer = setTimeout(() => done(undefined), WAIT_MS);
|
|
115
|
+
globalThis.addEventListener(RecentShots.EVENT, onEvent);
|
|
116
|
+
shots.postMessage({ id, action, shot });
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/** What the app answered as a screenshot, only one with all its parts. */
|
|
120
|
+
function shotOf(shot) {
|
|
121
|
+
const { id, takenAt, thumbnail } = (shot !== null && shot !== void 0 ? shot : {});
|
|
122
|
+
return typeof id === 'string' && id && typeof takenAt === 'number' && typeof thumbnail === 'string' && thumbnail.startsWith('data:image/')
|
|
123
|
+
? { id, takenAt, thumbnail }
|
|
124
|
+
: undefined;
|
|
125
|
+
}
|
|
126
|
+
RecentShots.shotOf = shotOf;
|
|
127
|
+
/** The photos of the Ta app on iOS: screenshots of the library, once the user let Ta read it. */
|
|
128
|
+
const NATIVE = Object.freeze({
|
|
129
|
+
latest: async () => { var _a; return shotOf((_a = (await call('latest'))) === null || _a === void 0 ? void 0 : _a.shot); },
|
|
130
|
+
read: async (id) => {
|
|
131
|
+
var _a;
|
|
132
|
+
const image = (_a = (await call('read', id))) === null || _a === void 0 ? void 0 : _a.image;
|
|
133
|
+
return typeof image === 'string' && image.startsWith('data:image/') ? image : undefined;
|
|
134
|
+
},
|
|
135
|
+
onChange: (listener) => {
|
|
136
|
+
globalThis.addEventListener(RecentShots.CHANGE_EVENT, listener);
|
|
137
|
+
return () => globalThis.removeEventListener(RecentShots.CHANGE_EVENT, listener);
|
|
138
|
+
},
|
|
139
|
+
ask: () => { var _a; return (_a = native()) === null || _a === void 0 ? void 0 : _a.postMessage({ id: `s${++next}`, action: 'ask' }); },
|
|
140
|
+
});
|
|
141
|
+
})(RecentShots || (RecentShots = {}));
|
|
142
|
+
//# sourceMappingURL=recent-shots.js.map
|
|
@@ -33,6 +33,8 @@ export declare namespace RowSwipeUtil {
|
|
|
33
33
|
* of how many there are: 1 for the first, less for those after).
|
|
34
34
|
*/
|
|
35
35
|
function shift(offset: number, width: number, share: number): number;
|
|
36
|
+
/** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
|
|
37
|
+
function atSheetEdge(sides: string | undefined, x: number, width: number): boolean;
|
|
36
38
|
/** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
|
|
37
39
|
function claims(dx: number, dy: number, open: boolean): boolean | undefined;
|
|
38
40
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { OwnGestures } from './own-gestures.js';
|
|
2
3
|
import { SwipeFinger, SwipeSettle, SwipeUtil, SwipeVelocity, translated } from './sheet-swipe.js';
|
|
3
4
|
/**
|
|
4
5
|
* A row of a list a finger swipes to the left to show its actions behind it, as the chats of WeChat: it
|
|
@@ -65,6 +66,13 @@ export var RowSwipeUtil;
|
|
|
65
66
|
return (width + offset) * share;
|
|
66
67
|
}
|
|
67
68
|
RowSwipeUtil.shift = shift;
|
|
69
|
+
/** Whether a touch at `x`, on a screen `width` wide, is at an edge a sheet comes from (`sides`: the root's `data-edge-swipe`), which rows leave to it. */
|
|
70
|
+
function atSheetEdge(sides, x, width) {
|
|
71
|
+
var _a;
|
|
72
|
+
const list = (_a = sides === null || sides === void 0 ? void 0 : sides.split(' ')) !== null && _a !== void 0 ? _a : [];
|
|
73
|
+
return (list.includes('right') && x >= width - SwipeUtil.EDGE_PX) || (list.includes('left') && x <= SwipeUtil.EDGE_PX);
|
|
74
|
+
}
|
|
75
|
+
RowSwipeUtil.atSheetEdge = atSheetEdge;
|
|
68
76
|
/** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
|
|
69
77
|
function claims(dx, dy, open) {
|
|
70
78
|
if (Math.hypot(dx, dy) < SwipeUtil.SLOP_PX) {
|
|
@@ -207,9 +215,12 @@ export function useRowSwipe(ref, enabled) {
|
|
|
207
215
|
const touch = event.touches[0];
|
|
208
216
|
claimed = undefined;
|
|
209
217
|
// A swipe from the edge a sheet comes from is the sheet's (useSheetSwipe's edgeOver), not the row's.
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
start =
|
|
218
|
+
const edge = !!touch && RowSwipeUtil.atSheetEdge(document.documentElement.dataset.edgeSwipe, touch.clientX, window.innerWidth);
|
|
219
|
+
// A game in the row slides for itself (OwnGestures).
|
|
220
|
+
start =
|
|
221
|
+
touch && !edge && !OwnGestures.within(event.target) && finger.follow(event, row)
|
|
222
|
+
? { x: touch.clientX, y: touch.clientY, t: event.timeStamp }
|
|
223
|
+
: undefined;
|
|
213
224
|
if (start) {
|
|
214
225
|
velocity.start(start);
|
|
215
226
|
}
|
|
@@ -191,7 +191,7 @@ export interface SheetSwipeOptions extends SheetSwipe {
|
|
|
191
191
|
scrim?: string;
|
|
192
192
|
/**
|
|
193
193
|
* Over these (rows a finger swipes, SwipeRow), a sheet that opens from anywhere opens only from the edge:
|
|
194
|
-
* the row has the swipe. The root then carries `data-edge-swipe` (the
|
|
194
|
+
* the row has the swipe. The root then carries `data-edge-swipe` (the sides, as a list), whose edges rows leave to it.
|
|
195
195
|
*/
|
|
196
196
|
edgeOver?: string;
|
|
197
197
|
/** What the root's `data-sheet-drag` says while the finger moves it, for styles that tell one sheet from another. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FrameUtil } from '../util/frame.js';
|
|
3
3
|
import { DeviceMotion } from './device-protocol.js';
|
|
4
|
+
import { OwnGestures } from './own-gestures.js';
|
|
4
5
|
/** It follows the finger and, let go, ends where it was flicked to, or the nearer side. Pure, for the tests. */
|
|
5
6
|
export var SwipeUtil;
|
|
6
7
|
(function (SwipeUtil) {
|
|
@@ -638,8 +639,14 @@ export function useSheetSwipe(options) {
|
|
|
638
639
|
source = from;
|
|
639
640
|
const touch = event.touches[0];
|
|
640
641
|
const target = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.nodeType) === Node.ELEMENT_NODE ? event.target : null;
|
|
642
|
+
// Over all of the page (ui.FullScreen), even the edges are its own.
|
|
643
|
+
if (OwnGestures.whole(target)) {
|
|
644
|
+
source = undefined;
|
|
645
|
+
return;
|
|
646
|
+
}
|
|
641
647
|
const fromEdge = !current.open && !!current.edgeOver && !!(target === null || target === void 0 ? void 0 : target.closest(current.edgeOver));
|
|
642
|
-
|
|
648
|
+
// In a game (an element that takes its touches), the shell keeps only the edges of the screen.
|
|
649
|
+
const sheet = OwnGestures.within(target) ? OwnGestures.edgesOnly(current) : fromEdge ? { ...current, opensFrom: 'edge' } : current;
|
|
643
650
|
if (event.touches.length !== 1 || !touch) {
|
|
644
651
|
return;
|
|
645
652
|
}
|
|
@@ -657,13 +664,27 @@ export function useSheetSwipe(options) {
|
|
|
657
664
|
from.doc.addEventListener('touchstart', begin, { passive: true });
|
|
658
665
|
return () => from.doc.removeEventListener('touchstart', begin);
|
|
659
666
|
});
|
|
660
|
-
|
|
667
|
+
// Of the sheets of both sides (the board, the workbench), each says its own.
|
|
668
|
+
const edge = latest.current.edgeOver ? latest.current.side : undefined;
|
|
669
|
+
const sides = (change) => {
|
|
670
|
+
var _a;
|
|
671
|
+
const next = change(((_a = root.dataset.edgeSwipe) !== null && _a !== void 0 ? _a : '').split(' ').filter(Boolean));
|
|
672
|
+
if (next.length) {
|
|
673
|
+
root.dataset.edgeSwipe = next.join(' ');
|
|
674
|
+
}
|
|
675
|
+
else {
|
|
676
|
+
delete root.dataset.edgeSwipe;
|
|
677
|
+
}
|
|
678
|
+
};
|
|
661
679
|
if (edge) {
|
|
662
|
-
|
|
680
|
+
sides(list => [...list, edge]);
|
|
663
681
|
}
|
|
664
682
|
return () => {
|
|
665
683
|
if (edge) {
|
|
666
|
-
|
|
684
|
+
sides(list => {
|
|
685
|
+
const at = list.indexOf(edge);
|
|
686
|
+
return at < 0 ? list : [...list.slice(0, at), ...list.slice(at + 1)];
|
|
687
|
+
});
|
|
667
688
|
}
|
|
668
689
|
sources.dispose();
|
|
669
690
|
finger.stop();
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { WebCustomMessage } from './web-extension-api.js';
|
|
3
|
+
import type { WebExtensionsState } from './web-extension-protocol.js';
|
|
3
4
|
/** The renderers of custom messages that web extensions registered. */
|
|
4
5
|
export declare const MessageRenderers: React.Context<Record<string, React.ComponentType<{
|
|
5
6
|
message: WebCustomMessage;
|
|
6
7
|
}>>>;
|
|
8
|
+
/** How the calls of the tools of web extensions read (WebExtensionAPI.registerToolRenderer). */
|
|
9
|
+
export declare const ToolRenderers: React.Context<import("./web-api-contributions.js").WebToolRendererResolver[]>;
|
|
10
|
+
/** The icons web extensions give conversations of theirs, and a count of their changes (ChatIconUtil). */
|
|
11
|
+
export declare const ChatIcons: React.Context<{
|
|
12
|
+
entries: WebExtensionsState['chatIcons'];
|
|
13
|
+
version: number;
|
|
14
|
+
}>;
|
|
7
15
|
/** The avatars that web extensions registered for the sessions of their groups. */
|
|
8
16
|
export declare const SessionAvatars: React.Context<Record<string, React.ComponentType<import("./web-extension-api.js").WebAvatarProps>>>;
|
|
17
|
+
/** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
|
|
18
|
+
export declare const SessionMenus: React.Context<import("./web-extension-api.js").WebSessionMenu[]>;
|
|
9
19
|
interface BoundaryProps {
|
|
10
20
|
name: string;
|
|
11
21
|
/** A new value (a new component) tries again after a failure. */
|
|
@@ -5,8 +5,14 @@ import { useT } from '../i18n/use-t.js';
|
|
|
5
5
|
import { MessageUtil } from '../util/message.js';
|
|
6
6
|
/** The renderers of custom messages that web extensions registered. */
|
|
7
7
|
export const MessageRenderers = React.createContext({});
|
|
8
|
+
/** How the calls of the tools of web extensions read (WebExtensionAPI.registerToolRenderer). */
|
|
9
|
+
export const ToolRenderers = React.createContext([]);
|
|
10
|
+
/** The icons web extensions give conversations of theirs, and a count of their changes (ChatIconUtil). */
|
|
11
|
+
export const ChatIcons = React.createContext({ entries: [], version: 0 });
|
|
8
12
|
/** The avatars that web extensions registered for the sessions of their groups. */
|
|
9
13
|
export const SessionAvatars = React.createContext({});
|
|
14
|
+
/** What web extensions add to the menu of a conversation of a list (WebExtensionAPI.registerSessionMenu). */
|
|
15
|
+
export const SessionMenus = React.createContext([]);
|
|
10
16
|
/** What a web extension draws: when it throws, it says so in its place and the page goes on. */
|
|
11
17
|
export class ExtensionBoundary extends React.Component {
|
|
12
18
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlarmClock, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, BellOff, Bot, Building2, CaseSensitive, Check, ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown, CircleAlert, Clipboard, Clock, Code, Columns2, Copy, CopyMinus, CornerUpLeft, Crown, Download, Ellipsis, ExternalLink, Eye, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, Folder, FolderInput, FolderOpen, FolderPlus, FolderSearch, FolderTree, GitBranch, GitCommitHorizontal, Globe, Grip, Hash, House, Image, LayoutDashboard, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minus, MousePointerClick, PackageOpen, Paperclip, Pencil, Pin, PinOff, Play, Plus, Power, Puzzle, QrCode, RefreshCw, Regex, Replace, ReplaceAll, RotateCcw, Rows2, Save, ScanLine, ScrollText, Search, Server, Share2, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, Text, Trash2, Undo2, Unplug, Upload, User, UserPlus, Users, WholeWord, X, } from 'lucide-react';
|
|
1
|
+
import { AlarmClock, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bell, BellOff, BookOpen, Bot, Building2, CaseSensitive, Check, ChevronDown, ChevronRight, ChevronsDownUp, ChevronsUpDown, CircleAlert, CircleHelp, Clipboard, Clock, Code, Columns2, Contact, Copy, CopyMinus, CornerDownRight, CornerUpLeft, Crown, Download, Ellipsis, ExternalLink, Eye, File, FileArchive, FileDiff, FilePlus, Files, FileText, Film, Folder, FolderInput, FolderOpen, FolderPlus, FolderSearch, FolderTree, Forward, Gamepad2, GitBranch, GitCommitHorizontal, Globe, Grip, Hash, House, Image, Info, KeyRound, LayoutDashboard, Link, List, ListChecks, ListTodo, ListTree, ListX, LoaderCircle, LocateFixed, MapIcon, Megaphone, MessageCircle, MessageSquareDot, MessageSquareText, MessagesSquare, Mic, Minus, MousePointerClick, PackageOpen, Paperclip, Pencil, Pin, PinOff, Play, Plus, Power, Puzzle, QrCode, RefreshCw, Regex, Replace, ReplaceAll, RotateCcw, Rows2, Save, ScanLine, ScrollText, Search, Send, Server, Share2, Sparkles, Square, SquareMinus, SquarePlus, SquareTerminal, Star, StarOff, Store, Text, Trash2, Trophy, Undo2, Unplug, Upload, User, UserPlus, Users, Volume2, WholeWord, X, } from 'lucide-react';
|
|
2
2
|
/** The icons a web extension gets as `pi.ui.icons`; names are lucide's. Only add: removing one breaks extensions. */
|
|
3
3
|
export const WEB_ICONS = Object.freeze({
|
|
4
4
|
AlarmClock,
|
|
@@ -7,7 +7,9 @@ export const WEB_ICONS = Object.freeze({
|
|
|
7
7
|
ArrowRight,
|
|
8
8
|
ArrowUp,
|
|
9
9
|
ArrowUpDown,
|
|
10
|
+
Bell,
|
|
10
11
|
BellOff,
|
|
12
|
+
BookOpen,
|
|
11
13
|
Bot,
|
|
12
14
|
Building2,
|
|
13
15
|
CaseSensitive,
|
|
@@ -17,12 +19,15 @@ export const WEB_ICONS = Object.freeze({
|
|
|
17
19
|
ChevronsDownUp,
|
|
18
20
|
ChevronsUpDown,
|
|
19
21
|
CircleAlert,
|
|
22
|
+
CircleHelp,
|
|
20
23
|
Clipboard,
|
|
21
24
|
Clock,
|
|
22
25
|
Code,
|
|
23
26
|
Columns2,
|
|
27
|
+
Contact,
|
|
24
28
|
Copy,
|
|
25
29
|
CopyMinus,
|
|
30
|
+
CornerDownRight,
|
|
26
31
|
CornerUpLeft,
|
|
27
32
|
Crown,
|
|
28
33
|
Download,
|
|
@@ -33,15 +38,17 @@ export const WEB_ICONS = Object.freeze({
|
|
|
33
38
|
FileArchive,
|
|
34
39
|
FileDiff,
|
|
35
40
|
FilePlus,
|
|
41
|
+
FileText,
|
|
36
42
|
Files,
|
|
37
43
|
Film,
|
|
38
|
-
FileText,
|
|
39
44
|
Folder,
|
|
40
45
|
FolderInput,
|
|
41
46
|
FolderOpen,
|
|
47
|
+
Forward,
|
|
42
48
|
FolderPlus,
|
|
43
49
|
FolderSearch,
|
|
44
50
|
FolderTree,
|
|
51
|
+
Gamepad2,
|
|
45
52
|
GitBranch,
|
|
46
53
|
GitCommitHorizontal,
|
|
47
54
|
Globe,
|
|
@@ -49,6 +56,8 @@ export const WEB_ICONS = Object.freeze({
|
|
|
49
56
|
Hash,
|
|
50
57
|
House,
|
|
51
58
|
Image,
|
|
59
|
+
Info,
|
|
60
|
+
KeyRound,
|
|
52
61
|
LayoutDashboard,
|
|
53
62
|
Link,
|
|
54
63
|
List,
|
|
@@ -58,6 +67,8 @@ export const WEB_ICONS = Object.freeze({
|
|
|
58
67
|
ListX,
|
|
59
68
|
LoaderCircle,
|
|
60
69
|
LocateFixed,
|
|
70
|
+
Map: MapIcon,
|
|
71
|
+
Megaphone,
|
|
61
72
|
MessageCircle,
|
|
62
73
|
MessageSquareDot,
|
|
63
74
|
MessageSquareText,
|
|
@@ -85,6 +96,7 @@ export const WEB_ICONS = Object.freeze({
|
|
|
85
96
|
ScanLine,
|
|
86
97
|
ScrollText,
|
|
87
98
|
Search,
|
|
99
|
+
Send,
|
|
88
100
|
Server,
|
|
89
101
|
Share2,
|
|
90
102
|
Sparkles,
|
|
@@ -97,12 +109,14 @@ export const WEB_ICONS = Object.freeze({
|
|
|
97
109
|
Store,
|
|
98
110
|
Text,
|
|
99
111
|
Trash2,
|
|
112
|
+
Trophy,
|
|
100
113
|
Undo2,
|
|
101
114
|
Unplug,
|
|
102
115
|
Upload,
|
|
103
116
|
User,
|
|
104
117
|
UserPlus,
|
|
105
118
|
Users,
|
|
119
|
+
Volume2,
|
|
106
120
|
WholeWord,
|
|
107
121
|
X,
|
|
108
122
|
});
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/** Part of the web extension API (web-extension-api.ts, which exports it all): the props of the components of `ui`. */
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
import type { TextSelection } from './web-extension-api.js';
|
|
4
|
+
export interface WebModelPickerProps {
|
|
5
|
+
/** The directory whose settings give the models and the default; default: that of ta serve. */
|
|
6
|
+
cwd?: string;
|
|
7
|
+
/** `<provider>/<model id>`, or `''` for the model of the settings. */
|
|
8
|
+
value: string;
|
|
9
|
+
onChange(value: string): void;
|
|
10
|
+
/** The entry for `''`; default: `Default (<the model of the settings>)`. */
|
|
11
|
+
defaultLabel?: string;
|
|
12
|
+
/** For a screen reader, when no label is beside it. */
|
|
13
|
+
label?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface WebFolderPickerProps {
|
|
17
|
+
/** Where it opens; default: the directory of ta serve. */
|
|
18
|
+
initial?: string;
|
|
19
|
+
/** The directory picked; the dialog stays open until it returns, and closes with `onClose`. */
|
|
20
|
+
onPick(path: string): void | Promise<void>;
|
|
21
|
+
onClose(): void;
|
|
22
|
+
}
|
|
23
|
+
export interface CodeEditorProps {
|
|
24
|
+
/** The path of the file: its name tells the language (`.ts`, `Dockerfile`); another path is another editor. */
|
|
25
|
+
path: string;
|
|
26
|
+
/** The text shown; a different one replaces it, as an edit the user can undo. */
|
|
27
|
+
value: string;
|
|
28
|
+
readOnly?: boolean;
|
|
29
|
+
/** A line, 1 for the first, shown in the middle with the cursor at its start (at `column`, 1 for the first, when given). */
|
|
30
|
+
line?: number;
|
|
31
|
+
column?: number;
|
|
32
|
+
/** With `line` and `column`: the text up to this column of that line is selected, as a match of a search. */
|
|
33
|
+
endColumn?: number;
|
|
34
|
+
/** Lines or a place to select, shown in the middle; over `line`. */
|
|
35
|
+
selection?: TextSelection;
|
|
36
|
+
/** The user changed the text. */
|
|
37
|
+
onChange?(value: string): void;
|
|
38
|
+
/** Ctrl+S or Cmd+S. */
|
|
39
|
+
onSave?(value: string): void;
|
|
40
|
+
}
|
|
41
|
+
export interface DiffEditorProps {
|
|
42
|
+
/** The path of the file: its name tells the language. */
|
|
43
|
+
path: string;
|
|
44
|
+
/** The text before (left), as HEAD or the index has it. */
|
|
45
|
+
original: string;
|
|
46
|
+
/** The text after (right). */
|
|
47
|
+
modified: string;
|
|
48
|
+
/** Default: side by side, inline when it is narrow. */
|
|
49
|
+
inline?: boolean;
|
|
50
|
+
/** Default true; false lets the user change the right side, `onChange` and `onSave` hear it. */
|
|
51
|
+
readOnly?: boolean;
|
|
52
|
+
onChange?(value: string): void;
|
|
53
|
+
onSave?(value: string): void;
|
|
54
|
+
/** How many changes it found once it compared the texts, and how to go to the next or the one before. */
|
|
55
|
+
onDiff?(diff: {
|
|
56
|
+
changes: number;
|
|
57
|
+
next(): void;
|
|
58
|
+
previous(): void;
|
|
59
|
+
}): void;
|
|
60
|
+
}
|
|
61
|
+
export interface WebEmptyProps {
|
|
62
|
+
/** One short line: what is not there (`No chats yet`), without a full stop. */
|
|
63
|
+
title?: React.ReactNode;
|
|
64
|
+
/** At most one quieter line under it: how to get some. */
|
|
65
|
+
hint?: React.ReactNode;
|
|
66
|
+
/** In a menu, a picker or a dialog: a line of its own rather than the middle of the space. */
|
|
67
|
+
compact?: boolean;
|
|
68
|
+
/** It is there because something failed. */
|
|
69
|
+
tone?: 'error';
|
|
70
|
+
/** Above the text: a `Picture` of what will be there or how to get it; smaller when `compact`. */
|
|
71
|
+
picture?: React.ReactNode;
|
|
72
|
+
/** Under the text: a button. */
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
}
|
|
75
|
+
/** An action behind a row a finger swiped (WebExtensionUI.SwipeRow), or for the rows selected (SelectBar): a word, as WeChat's. */
|
|
76
|
+
export interface WebSwipeAction {
|
|
77
|
+
key: string;
|
|
78
|
+
label: string;
|
|
79
|
+
/** Red, as Delete. */
|
|
80
|
+
danger?: boolean;
|
|
81
|
+
run(): void;
|
|
82
|
+
}
|
|
83
|
+
export interface WebSwipeRowProps {
|
|
84
|
+
actions?: WebSwipeAction[];
|
|
85
|
+
/** Of the row; its content is `.ta-swipe-content`, which the finger moves. */
|
|
86
|
+
className?: string;
|
|
87
|
+
children?: React.ReactNode;
|
|
88
|
+
}
|
|
89
|
+
export interface WebSelectCheckProps {
|
|
90
|
+
checked: boolean;
|
|
91
|
+
/** A row that cannot be chosen (nothing to do with it): a faint mark. */
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export interface WebSelectBarProps {
|
|
95
|
+
/** How many are chosen, of how many could be. */
|
|
96
|
+
count: number;
|
|
97
|
+
total: number;
|
|
98
|
+
/** Chooses every row (`true`), or none. */
|
|
99
|
+
onSelectAll(all: boolean): void;
|
|
100
|
+
/** The list stops selecting. */
|
|
101
|
+
onDone(): void;
|
|
102
|
+
/** What can be done with those chosen: disabled while none is. */
|
|
103
|
+
actions: WebSwipeAction[];
|
|
104
|
+
}
|
|
105
|
+
export interface WebSwitchProps {
|
|
106
|
+
checked: boolean;
|
|
107
|
+
/** What it does: a promise shows the new state at once, the knob turning until it settles, and the old one again if it fails (say why yourself). */
|
|
108
|
+
onChange(checked: boolean): unknown;
|
|
109
|
+
/** For a screen reader. */
|
|
110
|
+
label: string;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface WebSkeletonProps {
|
|
114
|
+
/** How many rows, at most 6; 6 unless told. */
|
|
115
|
+
rows?: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* A small picture, 160 by 96 unless told: its shapes take the classes of the page so that they follow its
|
|
119
|
+
* theme. `ta-pic-pane` a surface, `ta-pic-line` a bar of text, `ta-pic-box` an outline (a field, a box to
|
|
120
|
+
* tick), `ta-pic-accent` what the picture is about (green, light), `ta-pic-mark` green, `ta-pic-soft` half
|
|
121
|
+
* of that, `ta-pic-dot` a quiet dot, `ta-pic-bad` red, `ta-pic-wait` yellow (what waits for the user), `ta-pic-path` a dashed way between two things,
|
|
122
|
+
* `ta-pic-stroke` a green line (`ta-pic-thin` a grey one), `ta-pic-tick` a line drawn on green,
|
|
123
|
+
* `ta-pic-text` green letters of code. In motion: `ta-pic-go` a thing on its way along a path, `ta-pic-sweep` a line
|
|
124
|
+
* that scans up and down, `ta-pic-pulse` a ring that spreads from where to tap; none moves when the user asks for less motion.
|
|
125
|
+
*/
|
|
126
|
+
export interface WebPictureProps {
|
|
127
|
+
width?: number;
|
|
128
|
+
height?: number;
|
|
129
|
+
/** The rounded frame around it, default true; false for a picture that floats, such as a strip of things. */
|
|
130
|
+
frame?: boolean;
|
|
131
|
+
className?: string;
|
|
132
|
+
/** The shapes, in the coordinates of width by height. */
|
|
133
|
+
children?: React.ReactNode;
|
|
134
|
+
}
|
|
135
|
+
export interface WebPictureCard {
|
|
136
|
+
key: string;
|
|
137
|
+
/** A `Picture`. */
|
|
138
|
+
picture: React.ReactNode;
|
|
139
|
+
/** Two to six words. */
|
|
140
|
+
label: string;
|
|
141
|
+
/** A quieter line under the label: when, how. */
|
|
142
|
+
hint?: string;
|
|
143
|
+
/** Shown on hover: the whole of what picking it does. */
|
|
144
|
+
title?: string;
|
|
145
|
+
disabled?: boolean;
|
|
146
|
+
onPick(): void;
|
|
147
|
+
}
|
|
148
|
+
export interface WebImageViewerProps {
|
|
149
|
+
src: string;
|
|
150
|
+
alt?: string;
|
|
151
|
+
/** On its root, for the background behind the picture (a checkerboard for transparency). */
|
|
152
|
+
className?: string;
|
|
153
|
+
/** Once it loaded: its size in pixels. */
|
|
154
|
+
onLoad?(size: {
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
}): void;
|
|
158
|
+
/** A click or tap beside the picture. */
|
|
159
|
+
onBackground?(): void;
|
|
160
|
+
/** The picture before this one and the one after (of a folder): buttons at its sides and ← →, which scroll it while zoomed. */
|
|
161
|
+
onPrevious?(): void;
|
|
162
|
+
onNext?(): void;
|
|
163
|
+
/** Takes the keys at once, as when the user goes on from the picture before with ← →. */
|
|
164
|
+
autoFocus?: boolean;
|
|
165
|
+
}
|
|
166
|
+
export interface WebPictureCardsProps {
|
|
167
|
+
cards: readonly WebPictureCard[];
|
|
168
|
+
/** Default as many as there are cards. */
|
|
169
|
+
columns?: number;
|
|
170
|
+
/** On a phone or a narrow window; default `columns`, two at most when a card has a `hint`. */
|
|
171
|
+
compactColumns?: number;
|
|
172
|
+
}
|
|
173
|
+
export interface WebDialogProps {
|
|
174
|
+
title: string;
|
|
175
|
+
onClose(): void;
|
|
176
|
+
children?: React.ReactNode;
|
|
177
|
+
}
|
|
178
|
+
export interface WebFaceProps {
|
|
179
|
+
/** One of the 16 faces; else that of `seed`. */
|
|
180
|
+
face?: number;
|
|
181
|
+
seed?: string;
|
|
182
|
+
size: number;
|
|
183
|
+
/** At work: the eyes look about. */
|
|
184
|
+
working?: boolean;
|
|
185
|
+
/** A dot at its corner: green online, grey not; none without. Its ring is `--ta-face-ring` (the page's colour). */
|
|
186
|
+
online?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export interface WebGroupFaceProps {
|
|
189
|
+
members: readonly {
|
|
190
|
+
face?: number;
|
|
191
|
+
seed?: string;
|
|
192
|
+
working?: boolean;
|
|
193
|
+
}[];
|
|
194
|
+
size: number;
|
|
195
|
+
}
|
|
196
|
+
export interface WebStackProps {
|
|
197
|
+
/** The page under it. */
|
|
198
|
+
base: React.ReactNode;
|
|
199
|
+
/** The level pushed over it, while `open`. */
|
|
200
|
+
top: React.ReactNode;
|
|
201
|
+
open: boolean;
|
|
202
|
+
onClose(): void;
|
|
203
|
+
}
|
|
204
|
+
export interface WebFullScreenProps {
|
|
205
|
+
/** What covers the page, laid out in a column of flex as big as the screen. */
|
|
206
|
+
children?: React.ReactNode;
|
|
207
|
+
className?: string;
|
|
208
|
+
style?: React.CSSProperties;
|
|
209
|
+
}
|
|
210
|
+
export interface WebHoldToTalkProps {
|
|
211
|
+
/** What was said, let go on the bottom of the overlay. */
|
|
212
|
+
onSend(text: string): void;
|
|
213
|
+
/** Let go over 编辑: the words to read over first (put them in a box); without it, they are sent. */
|
|
214
|
+
onEdit?(text: string): void;
|
|
215
|
+
/** Words to expect besides those of the work: the names of whom it talks to. */
|
|
216
|
+
hints?: readonly string[];
|
|
217
|
+
className?: string;
|
|
218
|
+
/** Its label, also for screen readers. */
|
|
219
|
+
title?: string;
|
|
220
|
+
disabled?: boolean;
|
|
221
|
+
children?: React.ReactNode;
|
|
222
|
+
}
|
|
223
|
+
export interface WebVoice {
|
|
224
|
+
/** The page can listen: HoldToTalk shows. */
|
|
225
|
+
canListen(): boolean;
|
|
226
|
+
canSpeak(): boolean;
|
|
227
|
+
/** Reads text (Markdown is read as said, not as written) aloud in the voice of the settings, in the language of the page; another reading stops. */
|
|
228
|
+
speak(text: string, onEnd?: () => void): void;
|
|
229
|
+
/** Stops reading. */
|
|
230
|
+
hush(): void;
|
|
231
|
+
}
|
|
232
|
+
export interface WebComposerProps {
|
|
233
|
+
placeholder?: string;
|
|
234
|
+
/** Sends what was typed; when it fails, the text comes back into the box and the reason is a notice of the page. */
|
|
235
|
+
onSend(text: string): Promise<void> | void;
|
|
236
|
+
/** What `@` lists, by name; and the + menu entry that starts an `@`. */
|
|
237
|
+
mentions?: {
|
|
238
|
+
name: string;
|
|
239
|
+
detail?: string;
|
|
240
|
+
}[];
|
|
241
|
+
mentionLabel?: string;
|
|
242
|
+
/** More sections of the + menu, each set apart by a line. */
|
|
243
|
+
actions?: WebComposerAction[][];
|
|
244
|
+
/** The directory the conversation will work in, empty for that of ta serve: a button above the box shows it. */
|
|
245
|
+
cwd?: string;
|
|
246
|
+
/** With it, the button above the box picks another directory, as that of a new conversation does. */
|
|
247
|
+
onPickCwd?(cwd: string): void | Promise<void>;
|
|
248
|
+
/**
|
|
249
|
+
* For a message that opens a conversation: `/` lists the commands it will have in `cwd` (skills, prompts,
|
|
250
|
+
* commands of extensions), as the box of a new conversation does; what is sent starts with the command typed.
|
|
251
|
+
*/
|
|
252
|
+
commands?: boolean;
|
|
253
|
+
/** Something answers now: with nothing typed, the send button stops it (`onStop`), as in a conversation. */
|
|
254
|
+
working?: boolean;
|
|
255
|
+
onStop?(): void;
|
|
256
|
+
/** What the microphone hears is sent at once, as to the double; otherwise it stays in the box to be read over. */
|
|
257
|
+
voiceSends?: boolean;
|
|
258
|
+
/** A talk was sent (the box held to talk, or its bar): the page may read the answer aloud, as the double does. */
|
|
259
|
+
onTalkSent?(): void;
|
|
260
|
+
/** The user talks to the box now. */
|
|
261
|
+
onListening?(listening: boolean): void;
|
|
262
|
+
/** Controls on the right of the box, before the microphone: one that stops a reading, say. */
|
|
263
|
+
after?: React.ReactNode;
|
|
264
|
+
}
|
|
265
|
+
/** An entry of the + menu of the message box. */
|
|
266
|
+
export interface WebComposerAction {
|
|
267
|
+
key: string;
|
|
268
|
+
label: string;
|
|
269
|
+
/** On the left: an icon of 16 pixels, or an avatar. */
|
|
270
|
+
icon?: React.ReactNode;
|
|
271
|
+
/** After the label of a setting, quieter: its value now; on a tile, shown on hover. */
|
|
272
|
+
detail?: string;
|
|
273
|
+
disabled?: boolean;
|
|
274
|
+
/** A setting of the conversation: a row with its value under the tiles, rather than a tile (what is done once). */
|
|
275
|
+
setting?: boolean;
|
|
276
|
+
/** A setting that is on or off (`checked`): a row with a switch, which turns without closing the menu. */
|
|
277
|
+
toggle?: boolean;
|
|
278
|
+
/** Text the entry puts where the caret is, as `@name `; else `run` runs. */
|
|
279
|
+
insert?: string;
|
|
280
|
+
/** A list the menu shows in its place, as the models of a conversation. */
|
|
281
|
+
items?: WebComposerAction[];
|
|
282
|
+
/** In `items`: the entry picked now, checked on the right; a `toggle` that is on. */
|
|
283
|
+
checked?: boolean;
|
|
284
|
+
/** In `items`: the heading it is under. */
|
|
285
|
+
group?: string;
|
|
286
|
+
run?(): void;
|
|
287
|
+
}
|