@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,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useSeenChats = useSeenChats;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const hooks_1 = require("../hooks");
|
|
40
|
+
const state_protocol_1 = require("../state/state-protocol");
|
|
41
|
+
const chat_list_1 = require("./chat-list");
|
|
42
|
+
const chat_seen_1 = require("./chat-seen");
|
|
43
|
+
/** Whether the user can see the page: what ends in a tab hidden or on a phone locked is not seen. */
|
|
44
|
+
function useVisible() {
|
|
45
|
+
const [visible, setVisible] = React.useState(() => typeof document === 'undefined' || document.visibilityState === 'visible');
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
const change = () => setVisible(document.visibilityState === 'visible');
|
|
48
|
+
document.addEventListener('visibilitychange', change);
|
|
49
|
+
return () => document.removeEventListener('visibilitychange', change);
|
|
50
|
+
}, []);
|
|
51
|
+
return visible;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Which conversations the user has seen, as a messenger's unread: the one shown is seen each time it comes to
|
|
55
|
+
* rest in front of them. The first time, everything of before is seen: once the computer said it keeps nothing
|
|
56
|
+
* yet, not on what a browser new to it has, which would wipe what the others saw.
|
|
57
|
+
*/
|
|
58
|
+
function useSeenChats(sessions, shown) {
|
|
59
|
+
const state = (0, react_1.useInject)(state_protocol_1.TaState);
|
|
60
|
+
const [seen] = (0, hooks_1.usePersisted)(chat_seen_1.SEEN_CHATS);
|
|
61
|
+
const [{ status }] = (0, hooks_1.useWorkbench)();
|
|
62
|
+
const online = status === 'online';
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (online) {
|
|
65
|
+
void state.load(chat_seen_1.SEEN_CHATS).then(kept => !kept.since && state.set(chat_seen_1.SEEN_CHATS, { since: Date.now(), at: kept.at }), () => undefined);
|
|
66
|
+
}
|
|
67
|
+
}, [state, online]);
|
|
68
|
+
const visible = useVisible();
|
|
69
|
+
const looked = visible && shown ? sessions.find(session => session.sessionId === shown) : undefined;
|
|
70
|
+
const file = looked && chat_list_1.ChatListUtil.file(looked);
|
|
71
|
+
const busy = !!(looked === null || looked === void 0 ? void 0 : looked.isStreaming);
|
|
72
|
+
const updatedAt = looked === null || looked === void 0 ? void 0 : looked.updatedAt;
|
|
73
|
+
// Not before it is kept: what is set here wins over what the computer has.
|
|
74
|
+
const kept = seen.since > 0;
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
if (kept && file && !busy && updatedAt !== undefined) {
|
|
77
|
+
const next = chat_seen_1.ChatSeenUtil.look(state.get(chat_seen_1.SEEN_CHATS), file, updatedAt, Date.now());
|
|
78
|
+
if (next) {
|
|
79
|
+
state.set(chat_seen_1.SEEN_CHATS, next);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, [state, kept, file, busy, updatedAt]);
|
|
83
|
+
return seen;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=use-seen-chats.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type StopTime, type StopTiming } from './stop-times';
|
|
2
|
+
/** What keeps the timing of a stop pressed in the box of `sessionId`, shown in `view`. */
|
|
3
|
+
export declare function useStopTimes(sessionId: string, view: StopTime['view']): (timing: StopTiming) => void;
|
|
4
|
+
//# sourceMappingURL=use-stop-times.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useStopTimes = useStopTimes;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const device_1 = require("../device/device");
|
|
40
|
+
const hooks_1 = require("../hooks");
|
|
41
|
+
const state_protocol_1 = require("../state/state-protocol");
|
|
42
|
+
const stop_times_1 = require("./stop-times");
|
|
43
|
+
/** What keeps the timing of a stop pressed in the box of `sessionId`, shown in `view`. */
|
|
44
|
+
function useStopTimes(sessionId, view) {
|
|
45
|
+
var _a;
|
|
46
|
+
const state = (0, react_1.useInject)(state_protocol_1.TaState);
|
|
47
|
+
const device = (0, device_1.useDevice)(device => (device.handheld ? 'phone' : device.touch ? 'tablet' : 'desktop'));
|
|
48
|
+
const [{ hosts, host }] = (0, hooks_1.useWorkbench)();
|
|
49
|
+
const credential = (_a = hosts.find(saved => saved.id === host)) === null || _a === void 0 ? void 0 : _a.credential;
|
|
50
|
+
const link = credential && 'pairing' in credential ? 'relay' : 'direct';
|
|
51
|
+
return React.useCallback((timing) => state.set(stop_times_1.STOP_TIMES, stop_times_1.StopTimeUtil.add(state.get(stop_times_1.STOP_TIMES), { ...timing, session: sessionId.slice(0, 8), view, device, link })), [state, sessionId, view, device, link]);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=use-stop-times.js.map
|
|
@@ -6,7 +6,13 @@ export interface VoiceButtonProps {
|
|
|
6
6
|
onHeard(text: string): void;
|
|
7
7
|
onListening?(listening: boolean): void;
|
|
8
8
|
onError(error: unknown): void;
|
|
9
|
+
/** Words to expect besides those of the work (Voice.ListenOptions). */
|
|
10
|
+
hints?: readonly string[];
|
|
9
11
|
}
|
|
10
|
-
/** The microphone of a message box, where the browser can recognize speech: a click listens, a wave shows it, a click stops it
|
|
12
|
+
/** The microphone of a message box with a mouse, where the browser can recognize speech: a click listens, a wave shows it, a click stops it. On a touch screen the box has a bar held to talk instead (TalkBar). */
|
|
11
13
|
export declare function VoiceButton(props: VoiceButtonProps): React.JSX.Element;
|
|
14
|
+
/** A reply being read aloud, on the right of the box: its wave, and a tap stops it. */
|
|
15
|
+
export declare function SpeakingButton({ onStop }: {
|
|
16
|
+
onStop(): void;
|
|
17
|
+
}): React.JSX.Element;
|
|
12
18
|
//# sourceMappingURL=voice-button.d.ts.map
|
|
@@ -34,12 +34,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.VoiceButton = VoiceButton;
|
|
37
|
+
exports.SpeakingButton = SpeakingButton;
|
|
37
38
|
const lucide_react_1 = require("lucide-react");
|
|
38
39
|
const React = __importStar(require("react"));
|
|
39
40
|
const use_t_1 = require("../i18n/use-t");
|
|
40
41
|
const voice_1 = require("../util/voice");
|
|
41
42
|
const icon_1 = require("./icon");
|
|
42
|
-
/** The microphone of a message box, where the browser can recognize speech: a click listens, a wave shows it, a click stops it
|
|
43
|
+
/** The microphone of a message box with a mouse, where the browser can recognize speech: a click listens, a wave shows it, a click stops it. On a touch screen the box has a bar held to talk instead (TalkBar). */
|
|
43
44
|
function VoiceButton(props) {
|
|
44
45
|
const t = (0, use_t_1.useT)();
|
|
45
46
|
const language = (0, use_t_1.useLanguage)();
|
|
@@ -82,7 +83,7 @@ function VoiceButton(props) {
|
|
|
82
83
|
if (heard) {
|
|
83
84
|
latest.current.onHeard(heard);
|
|
84
85
|
}
|
|
85
|
-
});
|
|
86
|
+
}, { hints: props.hints });
|
|
86
87
|
if (listen && !ended) {
|
|
87
88
|
voice.current = listen;
|
|
88
89
|
setListening(true);
|
|
@@ -98,4 +99,17 @@ function VoiceButton(props) {
|
|
|
98
99
|
React.createElement("i", null),
|
|
99
100
|
React.createElement("i", null))) : (React.createElement(icon_1.Icon, { icon: lucide_react_1.Mic, size: 17 }))));
|
|
100
101
|
}
|
|
102
|
+
/** A reply being read aloud, on the right of the box: its wave, and a tap stops it. */
|
|
103
|
+
function SpeakingButton({ onStop }) {
|
|
104
|
+
const t = (0, use_t_1.useT)();
|
|
105
|
+
return (React.createElement("button", { type: "button", className: "ta-speaking", title: t('ta.assistant.speakStop'), "aria-label": t('ta.assistant.speakStop'),
|
|
106
|
+
// Pressed with the keyboard open, the box keeps the focus and the keyboard stays, as the send button.
|
|
107
|
+
onPointerDown: event => { var _a; return ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === 'TEXTAREA' && event.preventDefault(); }, onClick: onStop },
|
|
108
|
+
React.createElement("span", { className: "ta-wave", "aria-hidden": "true" },
|
|
109
|
+
React.createElement("i", null),
|
|
110
|
+
React.createElement("i", null),
|
|
111
|
+
React.createElement("i", null),
|
|
112
|
+
React.createElement("i", null)),
|
|
113
|
+
React.createElement("span", null, t('ta.assistant.speakStopShort'))));
|
|
114
|
+
}
|
|
101
115
|
//# sourceMappingURL=voice-button.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** The voice replies are read with, of the language of the page, the most natural first; a sentence to listen to it. */
|
|
3
|
+
export declare function VoicePicker({ value, onChange }: {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange(voice: string): void;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=voice-picker.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.VoicePicker = VoicePicker;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const use_t_1 = require("../i18n/use-t");
|
|
39
|
+
const voice_1 = require("../util/voice");
|
|
40
|
+
/** The voices of the system, again once they change (Chrome has them only after voiceschanged). */
|
|
41
|
+
function useVoices() {
|
|
42
|
+
const [voices, setVoices] = React.useState(voice_1.Voice.voices);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (!voice_1.Voice.canSpeak()) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const update = () => setVoices(voice_1.Voice.voices());
|
|
48
|
+
speechSynthesis.addEventListener('voiceschanged', update);
|
|
49
|
+
update();
|
|
50
|
+
return () => speechSynthesis.removeEventListener('voiceschanged', update);
|
|
51
|
+
}, []);
|
|
52
|
+
return voices;
|
|
53
|
+
}
|
|
54
|
+
/** The voice replies are read with, of the language of the page, the most natural first; a sentence to listen to it. */
|
|
55
|
+
function VoicePicker({ value, onChange }) {
|
|
56
|
+
const t = (0, use_t_1.useT)();
|
|
57
|
+
const language = (0, use_t_1.useLanguage)();
|
|
58
|
+
const voices = voice_1.Voice.voicesFor(useVoices(), language);
|
|
59
|
+
const [playing, setPlaying] = React.useState(false);
|
|
60
|
+
const chosen = voices.some(voice => voice.voiceURI === value) ? value : '';
|
|
61
|
+
// The page left while listening: the sentence stops with it.
|
|
62
|
+
const heard = React.useRef(false);
|
|
63
|
+
heard.current = playing;
|
|
64
|
+
React.useEffect(() => () => void (heard.current && voice_1.Voice.hush()), []);
|
|
65
|
+
const listen = (voice) => {
|
|
66
|
+
setPlaying(true);
|
|
67
|
+
voice_1.Voice.speak(t('ta.settings.voiceSample'), language, () => setPlaying(false), voice);
|
|
68
|
+
};
|
|
69
|
+
return (React.createElement("div", { className: "ta-voice-picker" },
|
|
70
|
+
React.createElement("select", { className: "ta-input ta-select", "aria-label": t('ta.settings.voiceName'), value: chosen, onChange: event => {
|
|
71
|
+
onChange(event.target.value);
|
|
72
|
+
listen(event.target.value);
|
|
73
|
+
} },
|
|
74
|
+
React.createElement("option", { value: "" }, voices[0] ? t('ta.settings.voiceAuto', { name: voices[0].name }) : t('ta.settings.voiceAutoNone')),
|
|
75
|
+
voices.map(voice => (React.createElement("option", { key: voice.voiceURI, value: voice.voiceURI },
|
|
76
|
+
voice.name,
|
|
77
|
+
" \u00B7 ",
|
|
78
|
+
voice.lang)))),
|
|
79
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: () => {
|
|
80
|
+
if (playing) {
|
|
81
|
+
voice_1.Voice.hush();
|
|
82
|
+
setPlaying(false);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
listen(chosen);
|
|
86
|
+
}
|
|
87
|
+
} }, t(playing ? 'ta.assistant.speakStopShort' : 'ta.settings.voicePreview'))));
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=voice-picker.js.map
|
|
@@ -28,12 +28,20 @@ export interface VoiceTalk extends TalkTarget {
|
|
|
28
28
|
zone: TalkZone;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* A conversation by voice as WeChat's: a finger held on the message box (or on an
|
|
32
|
-
* page and a green bubble listens, the words coming as they are said. Let go on the bottom, they are sent; slid
|
|
31
|
+
* A conversation by voice as WeChat's: a finger held on the bar of the message box held to talk (TalkBar, or on an
|
|
32
|
+
* entry of the navigation) dims the page and a green bubble listens, the words coming as they are said. Let go on the bottom, they are sent; slid
|
|
33
33
|
* over 取消 they are dropped, over 编辑 they stay in the box to be read over. A talk too short to be meant, which a
|
|
34
34
|
* wrong touch is, says so and gives nothing, as one where nothing was heard does.
|
|
35
35
|
*/
|
|
36
|
-
export declare function useVoiceTalk(onGive: (text: string, zone: 'send' | 'edit') => void, onError: (error: unknown) => void): VoiceTalk;
|
|
36
|
+
export declare function useVoiceTalk(onGive: (text: string, zone: 'send' | 'edit') => void, onError: (error: unknown) => void, hints?: readonly string[]): VoiceTalk;
|
|
37
|
+
/**
|
|
38
|
+
* The field of a message box on a touch screen once its microphone is tapped, as WeChat's: 按住 说话. The finger
|
|
39
|
+
* talks as soon as it lands (no wait, the bar is for nothing else), and is the bar's until it lets go, wherever it
|
|
40
|
+
* slides: onto 取消 or 编辑 of the overlay.
|
|
41
|
+
*/
|
|
42
|
+
export declare function TalkBar({ talk }: {
|
|
43
|
+
talk: VoiceTalk;
|
|
44
|
+
}): React.JSX.Element;
|
|
37
45
|
/**
|
|
38
46
|
* What a talk shows, over the whole page (above the keyboard): the page dimmed, a green bubble with the words as
|
|
39
47
|
* they come, 取消 and 编辑 to slide the finger onto, and the bottom it starts on, which says what letting go does.
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.VoiceTalkUtil = void 0;
|
|
37
37
|
exports.useVoiceTalk = useVoiceTalk;
|
|
38
|
+
exports.TalkBar = TalkBar;
|
|
38
39
|
exports.VoiceTalkOverlay = VoiceTalkOverlay;
|
|
39
40
|
const lucide_react_1 = require("lucide-react");
|
|
40
41
|
const React = __importStar(require("react"));
|
|
@@ -69,12 +70,12 @@ var VoiceTalkUtil;
|
|
|
69
70
|
})(VoiceTalkUtil || (exports.VoiceTalkUtil = VoiceTalkUtil = {}));
|
|
70
71
|
const IDLE = { phase: 'idle', words: '', zone: 'send' };
|
|
71
72
|
/**
|
|
72
|
-
* A conversation by voice as WeChat's: a finger held on the message box (or on an
|
|
73
|
-
* page and a green bubble listens, the words coming as they are said. Let go on the bottom, they are sent; slid
|
|
73
|
+
* A conversation by voice as WeChat's: a finger held on the bar of the message box held to talk (TalkBar, or on an
|
|
74
|
+
* entry of the navigation) dims the page and a green bubble listens, the words coming as they are said. Let go on the bottom, they are sent; slid
|
|
74
75
|
* over 取消 they are dropped, over 编辑 they stay in the box to be read over. A talk too short to be meant, which a
|
|
75
76
|
* wrong touch is, says so and gives nothing, as one where nothing was heard does.
|
|
76
77
|
*/
|
|
77
|
-
function useVoiceTalk(onGive, onError) {
|
|
78
|
+
function useVoiceTalk(onGive, onError, hints) {
|
|
78
79
|
const t = (0, use_t_1.useT)();
|
|
79
80
|
const language = (0, use_t_1.useLanguage)();
|
|
80
81
|
const [state, setState] = React.useState(IDLE);
|
|
@@ -166,7 +167,7 @@ function useVoiceTalk(onGive, onError) {
|
|
|
166
167
|
}
|
|
167
168
|
},
|
|
168
169
|
// A finger held goes on past a pause: it stops when it lets go.
|
|
169
|
-
true);
|
|
170
|
+
{ continuous: true, hints });
|
|
170
171
|
if (session) {
|
|
171
172
|
listening.current = session;
|
|
172
173
|
go('listening', { words: '', zone: 'send' });
|
|
@@ -218,6 +219,26 @@ function useVoiceTalk(onGive, onError) {
|
|
|
218
219
|
};
|
|
219
220
|
return { ...state, active: state.phase === 'listening' || state.phase === 'released', start, point, release, cancel };
|
|
220
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* The field of a message box on a touch screen once its microphone is tapped, as WeChat's: 按住 说话. The finger
|
|
224
|
+
* talks as soon as it lands (no wait, the bar is for nothing else), and is the bar's until it lets go, wherever it
|
|
225
|
+
* slides: onto 取消 or 编辑 of the overlay.
|
|
226
|
+
*/
|
|
227
|
+
function TalkBar({ talk }) {
|
|
228
|
+
const t = (0, use_t_1.useT)();
|
|
229
|
+
return (React.createElement("button", { type: "button", className: `ta-talk-bar${talk.active ? ' ta-on' : ''}`, "data-held": "", onPointerDown: event => {
|
|
230
|
+
var _a, _b;
|
|
231
|
+
if (!event.isPrimary || event.button !== 0) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
(_b = (_a = event.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, event.pointerId);
|
|
236
|
+
talk.start();
|
|
237
|
+
talk.point(event.clientX, event.clientY);
|
|
238
|
+
}, onPointerMove: event => talk.point(event.clientX, event.clientY), onPointerUp: () => talk.release(), onPointerCancel: () => talk.cancel(),
|
|
239
|
+
// A finger held is the bar's: no menu (device/long-press.ts sends one), no selection.
|
|
240
|
+
onContextMenu: event => event.preventDefault() }, t(talk.active ? 'ta.talk.releaseSend' : 'ta.talk.hold')));
|
|
241
|
+
}
|
|
221
242
|
/**
|
|
222
243
|
* What a talk shows, over the whole page (above the keyboard): the page dimmed, a green bubble with the words as
|
|
223
244
|
* they come, 取消 and 编辑 to slide the finger onto, and the bottom it starts on, which says what letting go does.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TaDirEntry } from '@celljs/ta-protocol';
|
|
1
|
+
import type { TaDirEntry, TaServer } from '@celljs/ta-protocol';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { WebComposerProps } from '../extension/web-extension-api';
|
|
4
4
|
import type { TaNotices } from '../notices/notices-protocol';
|
|
@@ -6,6 +6,8 @@ import { type FolderPickerRemote } from './folder-picker';
|
|
|
6
6
|
export interface WebComposerHostProps extends WebComposerProps {
|
|
7
7
|
/** Where a failure to send goes. */
|
|
8
8
|
notices: TaNotices;
|
|
9
|
+
/** Where the commands of `commands` are read. */
|
|
10
|
+
server: Pick<TaServer, 'getDirectoryCommands'>;
|
|
9
11
|
/** The entries of a directory of the server, for the button of `onPickCwd`. */
|
|
10
12
|
listDirectory?(directory: string): Promise<TaDirEntry[]>;
|
|
11
13
|
/** The directory of ta serve: that of a `cwd` left empty. */
|
|
@@ -14,5 +16,5 @@ export interface WebComposerHostProps extends WebComposerProps {
|
|
|
14
16
|
remote?: FolderPickerRemote;
|
|
15
17
|
}
|
|
16
18
|
/** The message box as web extensions get it (`pi.ui.Composer`): text only, `@` for the names they give; a failure is a notice of the page. */
|
|
17
|
-
export declare function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
|
|
19
|
+
export declare function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, server, listDirectory, serverCwd, remote, }: WebComposerHostProps): React.JSX.Element;
|
|
18
20
|
//# sourceMappingURL=web-composer.d.ts.map
|
|
@@ -38,14 +38,18 @@ const React = __importStar(require("react"));
|
|
|
38
38
|
const use_t_1 = require("../i18n/use-t");
|
|
39
39
|
const composer_1 = require("../util/composer");
|
|
40
40
|
const composer_box_1 = require("./composer-box");
|
|
41
|
+
const directory_commands_1 = require("./directory-commands");
|
|
41
42
|
const folder_picker_1 = require("./folder-picker");
|
|
42
43
|
/** The message box as web extensions get it (`pi.ui.Composer`): text only, `@` for the names they give; a failure is a notice of the page. */
|
|
43
|
-
function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, listDirectory, serverCwd, remote, }) {
|
|
44
|
+
function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, actions, cwd, onPickCwd, commands, working, onStop, voiceSends, onTalkSent, onListening, after, server, listDirectory, serverCwd, remote, }) {
|
|
44
45
|
const t = (0, use_t_1.useT)();
|
|
46
|
+
const language = (0, use_t_1.useLanguage)();
|
|
45
47
|
const [query, setQuery] = React.useState();
|
|
48
|
+
const found = (0, directory_commands_1.useDirectoryCommands)(server, commands ? cwd || serverCwd : undefined);
|
|
49
|
+
const listed = React.useMemo(() => found.map(command => ({ name: command.name, description: composer_1.ComposerUtil.commandDescription(command, language, t) })), [found, language, t]);
|
|
46
50
|
return (React.createElement(composer_box_1.ComposerBox, { placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('ta.composer.label'), onSend: async (text) => {
|
|
47
51
|
await onSend(text);
|
|
48
|
-
}, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
|
|
52
|
+
}, commands: listed, onMentionQuery: mentions ? setQuery : undefined, mentions: mentions && query !== undefined
|
|
49
53
|
? {
|
|
50
54
|
items: composer_1.ComposerUtil.commands(mentions, query).map(mention => ({
|
|
51
55
|
key: mention.name,
|
|
@@ -53,6 +57,6 @@ function WebComposer({ notices, placeholder, onSend, mentions, mentionLabel, act
|
|
|
53
57
|
detail: mention.detail,
|
|
54
58
|
})),
|
|
55
59
|
}
|
|
56
|
-
: undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions,
|
|
60
|
+
: undefined, mentionLabel: mentions ? mentionLabel : undefined, actions: actions, head: onPickCwd && listDirectory && React.createElement(folder_picker_1.DirectoryButton, { cwd: cwd || serverCwd || '', list: listDirectory, remote: remote, onPick: onPickCwd }), cwd: cwd || serverCwd, working: working, onStop: onStop, voiceSends: voiceSends, onTalkSent: onTalkSent, onListening: onListening, after: after, onError: cause => notices.error(cause) }));
|
|
57
61
|
}
|
|
58
62
|
//# sourceMappingURL=web-composer.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type WebEditorEntry, type WebViewEntry } from '../extension/web-extension-protocol';
|
|
3
|
+
/** What the head of the workbench shows and does: its tabs, the tools it opens, its place. */
|
|
4
|
+
export interface WorkbenchTabsProps {
|
|
5
|
+
editors: WebEditorEntry[];
|
|
6
|
+
active?: string;
|
|
7
|
+
/** The `panel` views: what `+` and the empty workbench open. */
|
|
8
|
+
views: WebViewEntry[];
|
|
9
|
+
onShow(id: string): void;
|
|
10
|
+
/** Closes tabs: one, or several at once from the menu of a tab. */
|
|
11
|
+
onClose(ids: string[]): void;
|
|
12
|
+
/** Keeps a preview tab (a double click on it). */
|
|
13
|
+
onPin(id: string): void;
|
|
14
|
+
onOpenView(id: string): void;
|
|
15
|
+
onHide(): void;
|
|
16
|
+
/** Where its tools are (`ui.useCwd`): that of the conversation in front, else the default directory. */
|
|
17
|
+
cwd?: string;
|
|
18
|
+
/** Whether the workbench takes the place of the conversation too; none on narrow screens, where it always does. */
|
|
19
|
+
maximized?: boolean;
|
|
20
|
+
onMaximize?(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function ViewGlyph({ view, size }: {
|
|
23
|
+
view: WebViewEntry;
|
|
24
|
+
size: number;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* The tabs of a wide workbench, as those of a browser or an editor: the one shown is a card joined to what it
|
|
28
|
+
* shows, the others lie on the strip with a line between them, `+` follows the last one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function TabStrip({ editors, active, views, onShow, onClose, onPin, onOpenView, onHide, cwd, maximized, onMaximize }: WorkbenchTabsProps): React.JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* The head of the workbench on a phone, as a browser's there: back to the conversation, the tab shown with how
|
|
33
|
+
* many are open, which opens the list of them (TabSwitcher), and `+`. A row of tabs a finger scrolls and
|
|
34
|
+
* closes by their small crosses is neither seen nor hit well on a phone.
|
|
35
|
+
*/
|
|
36
|
+
export declare function CompactHead({ editors, active, views, onShow, onClose, onPin, onOpenView, onHide, cwd }: WorkbenchTabsProps): React.JSX.Element;
|
|
37
|
+
/** The tabs open on a phone, as rows of a finger's height under its head: a tap shows one, its cross closes it, a long press opens its menu. */
|
|
38
|
+
export declare function TabSwitcher({ editors, active, onShow, onClose, onMenu, onDismiss, }: Pick<WorkbenchTabsProps, 'editors' | 'active' | 'onShow' | 'onClose'> & {
|
|
39
|
+
onMenu(event: React.MouseEvent, editor: WebEditorEntry): void;
|
|
40
|
+
onDismiss(): void;
|
|
41
|
+
}): React.JSX.Element;
|
|
42
|
+
//# sourceMappingURL=workbench-tabs.d.ts.map
|