@celljs/ta-web 4.27.0 → 4.29.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 +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-role.d.ts +9 -4
- package/esm/browser/assistant/assistant-role.js +17 -5
- package/esm/browser/assistant/assistant-task-util.d.ts +6 -0
- package/esm/browser/assistant/assistant-task-util.js +12 -1
- package/esm/browser/assistant/assistant-thread.js +15 -2
- package/esm/browser/assistant/assistant-view.js +4 -1
- package/esm/browser/assistant/assistant.d.ts +2 -1
- package/esm/browser/assistant/assistant.js +9 -7
- package/esm/browser/assistant/call-conversing.d.ts +45 -0
- package/esm/browser/assistant/call-conversing.js +91 -0
- package/esm/browser/assistant/call-face.d.ts +13 -0
- package/esm/browser/assistant/call-face.js +81 -0
- package/esm/browser/assistant/call-keeper.d.ts +8 -4
- package/esm/browser/assistant/call-keeper.js +32 -11
- package/esm/browser/assistant/call-partnering.d.ts +37 -0
- package/esm/browser/assistant/call-partnering.js +79 -0
- package/esm/browser/assistant/call-scenes.d.ts +26 -0
- package/esm/browser/assistant/call-scenes.js +85 -0
- package/esm/browser/assistant/call-screen.d.ts +3 -0
- package/esm/browser/assistant/call-screen.js +15 -0
- package/esm/browser/assistant/mic-sense.d.ts +31 -0
- package/esm/browser/assistant/mic-sense.js +119 -0
- package/esm/browser/assistant/noise-gate.d.ts +32 -0
- package/esm/browser/assistant/noise-gate.js +66 -0
- package/esm/browser/assistant/pcm-util.d.ts +10 -0
- package/esm/browser/assistant/pcm-util.js +55 -0
- package/esm/browser/assistant/read-aloud.d.ts +2 -1
- package/esm/browser/assistant/realtime-voice-protocol.d.ts +84 -0
- package/esm/browser/assistant/realtime-voice-protocol.js +40 -0
- package/esm/browser/assistant/realtime-voice.d.ts +50 -62
- package/esm/browser/assistant/realtime-voice.js +213 -134
- package/esm/browser/assistant/spoken-timeline.d.ts +27 -0
- package/esm/browser/assistant/spoken-timeline.js +49 -0
- package/esm/browser/assistant/voice-call-bar.d.ts +9 -2
- package/esm/browser/assistant/voice-call-bar.js +81 -31
- package/esm/browser/assistant/voice-call-protocol.d.ts +61 -4
- package/esm/browser/assistant/voice-call.d.ts +16 -23
- package/esm/browser/assistant/voice-call.js +134 -117
- package/esm/browser/assistant/voice-reading.d.ts +83 -0
- package/esm/browser/assistant/voice-reading.js +150 -0
- package/esm/browser/avatar/dino-talk.d.ts +15 -0
- package/esm/browser/avatar/dino-talk.js +34 -0
- package/esm/browser/chat/chat-protocol.d.ts +2 -0
- package/esm/browser/chat/chat-shown.d.ts +3 -1
- package/esm/browser/chat/chat-shown.js +25 -3
- package/esm/browser/chat/chat.d.ts +5 -1
- package/esm/browser/chat/chat.js +32 -16
- package/esm/browser/components/account-menu.d.ts +6 -16
- package/esm/browser/components/account-menu.js +47 -101
- package/esm/browser/components/app-contexts.js +3 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-protocol.d.ts +2 -0
- package/esm/browser/components/composer-box.js +20 -1
- package/esm/browser/components/composer-emoji.d.ts +22 -0
- package/esm/browser/components/composer-emoji.js +50 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +8 -1
- package/esm/browser/components/conversation-scroll-util.js +21 -0
- package/esm/browser/components/conversation-scroll.js +10 -11
- package/esm/browser/components/discover-view.d.ts +4 -3
- package/esm/browser/components/discover-view.js +5 -4
- package/esm/browser/components/emoji-panel.d.ts +22 -0
- package/esm/browser/components/emoji-panel.js +54 -0
- package/esm/browser/components/gallery.js +28 -7
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/image-pull.d.ts +64 -0
- package/esm/browser/components/image-pull.js +202 -0
- package/esm/browser/components/kept-call-bar.js +2 -1
- package/esm/browser/components/lightbox.d.ts +1 -1
- package/esm/browser/components/lightbox.js +57 -2
- package/esm/browser/components/markdown.d.ts +8 -1
- package/esm/browser/components/markdown.js +12 -4
- package/esm/browser/components/me-rows.d.ts +24 -0
- package/esm/browser/components/me-rows.js +19 -0
- package/esm/browser/components/me-view.d.ts +2 -1
- package/esm/browser/components/me-view.js +3 -2
- package/esm/browser/components/message-list.js +47 -7
- package/esm/browser/components/message-steps.js +13 -0
- package/esm/browser/components/nav-places.js +1 -1
- package/esm/browser/components/partner-row.js +2 -1
- package/esm/browser/components/relay-services.d.ts +9 -3
- package/esm/browser/components/relay-services.js +73 -35
- package/esm/browser/components/session-view.js +4 -2
- package/esm/browser/components/settings-choices.js +3 -0
- package/esm/browser/components/settings-controls.d.ts +13 -0
- package/esm/browser/components/settings-controls.js +19 -0
- package/esm/browser/components/settings-more.d.ts +1 -1
- package/esm/browser/components/settings-more.js +28 -39
- package/esm/browser/components/settings-parts.d.ts +4 -2
- package/esm/browser/components/settings-parts.js +16 -9
- package/esm/browser/components/settings-view.js +2 -6
- package/esm/browser/components/ta-avatar.d.ts +15 -1
- package/esm/browser/components/ta-avatar.js +38 -5
- package/esm/browser/components/voice-services.js +6 -1
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/device/file-save.d.ts +31 -0
- package/esm/browser/device/file-save.js +80 -0
- package/esm/browser/extension/extension-view.d.ts +2 -0
- package/esm/browser/extension/extension-view.js +2 -0
- package/esm/browser/extension/web-api-call.d.ts +109 -2
- package/esm/browser/extension/web-api-components.d.ts +4 -0
- package/esm/browser/extension/web-api-contributions.d.ts +14 -14
- package/esm/browser/extension/web-api-desktop.d.ts +16 -1
- package/esm/browser/extension/web-api-desktop.js +1 -0
- package/esm/browser/extension/web-api-partners.d.ts +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +8 -10
- package/esm/browser/extension/web-extension-code.d.ts +15 -8
- package/esm/browser/extension/web-extension-code.js +25 -27
- package/esm/browser/extension/web-extension-context.js +4 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +10 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +4 -2
- package/esm/browser/extension/web-extension-run.js +10 -4
- package/esm/browser/extension/web-extensions-running.js +7 -6
- package/esm/browser/extension/web-pages.d.ts +2 -0
- package/esm/browser/extension/web-pages.js +2 -0
- package/esm/browser/i18n/en/account.d.ts +202 -0
- package/esm/browser/i18n/en/account.js +205 -0
- package/esm/browser/i18n/en/assistant.d.ts +129 -0
- package/esm/browser/i18n/en/assistant.js +130 -0
- package/esm/browser/i18n/en/call.d.ts +86 -0
- package/esm/browser/i18n/en/call.js +87 -0
- package/esm/browser/i18n/en/chat.d.ts +213 -0
- package/esm/browser/i18n/en/chat.js +214 -0
- package/esm/browser/i18n/en/common.d.ts +99 -0
- package/esm/browser/i18n/en/common.js +101 -0
- package/esm/browser/i18n/en/console.d.ts +230 -0
- package/esm/browser/i18n/en/console.js +232 -0
- package/esm/browser/i18n/en/discover.d.ts +117 -0
- package/esm/browser/i18n/en/discover.js +119 -0
- package/esm/browser/i18n/en/service.d.ts +242 -0
- package/esm/browser/i18n/en/service.js +245 -0
- package/esm/browser/i18n/en/settings.d.ts +213 -0
- package/esm/browser/i18n/en/settings.js +214 -0
- package/esm/browser/i18n/en/tools.d.ts +85 -0
- package/esm/browser/i18n/en/tools.js +87 -0
- package/esm/browser/i18n/ja/account.d.ts +2 -0
- package/esm/browser/i18n/ja/account.js +202 -0
- package/esm/browser/i18n/ja/assistant.d.ts +2 -0
- package/esm/browser/i18n/ja/assistant.js +129 -0
- package/esm/browser/i18n/ja/call.d.ts +2 -0
- package/esm/browser/i18n/ja/call.js +86 -0
- package/esm/browser/i18n/ja/chat.d.ts +2 -0
- package/esm/browser/i18n/ja/chat.js +213 -0
- package/esm/browser/i18n/ja/common.d.ts +2 -0
- package/esm/browser/i18n/ja/common.js +99 -0
- package/esm/browser/i18n/ja/console.d.ts +2 -0
- package/esm/browser/i18n/ja/console.js +230 -0
- package/esm/browser/i18n/ja/discover.d.ts +2 -0
- package/esm/browser/i18n/ja/discover.js +117 -0
- package/esm/browser/i18n/ja/service.d.ts +2 -0
- package/esm/browser/i18n/ja/service.js +242 -0
- package/esm/browser/i18n/ja/settings.d.ts +2 -0
- package/esm/browser/i18n/ja/settings.js +213 -0
- package/esm/browser/i18n/ja/tools.d.ts +2 -0
- package/esm/browser/i18n/ja/tools.js +85 -0
- package/esm/browser/i18n/locales.d.ts +1150 -1131
- package/esm/browser/i18n/messages-ja.js +20 -1567
- package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/esm/browser/i18n/messages-zh-tw.js +20 -1568
- package/esm/browser/i18n/messages.d.ts +1153 -1131
- package/esm/browser/i18n/messages.js +44 -3145
- package/esm/browser/i18n/zh/account.d.ts +2 -0
- package/esm/browser/i18n/zh/account.js +203 -0
- package/esm/browser/i18n/zh/assistant.d.ts +2 -0
- package/esm/browser/i18n/zh/assistant.js +129 -0
- package/esm/browser/i18n/zh/call.d.ts +2 -0
- package/esm/browser/i18n/zh/call.js +86 -0
- package/esm/browser/i18n/zh/chat.d.ts +2 -0
- package/esm/browser/i18n/zh/chat.js +213 -0
- package/esm/browser/i18n/zh/common.d.ts +2 -0
- package/esm/browser/i18n/zh/common.js +99 -0
- package/esm/browser/i18n/zh/console.d.ts +2 -0
- package/esm/browser/i18n/zh/console.js +230 -0
- package/esm/browser/i18n/zh/discover.d.ts +2 -0
- package/esm/browser/i18n/zh/discover.js +117 -0
- package/esm/browser/i18n/zh/service.d.ts +2 -0
- package/esm/browser/i18n/zh/service.js +242 -0
- package/esm/browser/i18n/zh/settings.d.ts +2 -0
- package/esm/browser/i18n/zh/settings.js +213 -0
- package/esm/browser/i18n/zh/tools.d.ts +2 -0
- package/esm/browser/i18n/zh/tools.js +86 -0
- package/esm/browser/i18n/zh-tw/account.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/account.js +202 -0
- package/esm/browser/i18n/zh-tw/assistant.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/assistant.js +129 -0
- package/esm/browser/i18n/zh-tw/call.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/call.js +86 -0
- package/esm/browser/i18n/zh-tw/chat.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/chat.js +213 -0
- package/esm/browser/i18n/zh-tw/common.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/common.js +99 -0
- package/esm/browser/i18n/zh-tw/console.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/console.js +230 -0
- package/esm/browser/i18n/zh-tw/discover.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/discover.js +117 -0
- package/esm/browser/i18n/zh-tw/service.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/service.js +242 -0
- package/esm/browser/i18n/zh-tw/settings.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/settings.js +213 -0
- package/esm/browser/i18n/zh-tw/tools.d.ts +2 -0
- package/esm/browser/i18n/zh-tw/tools.js +85 -0
- package/esm/browser/markdown/code-renderers.d.ts +2 -0
- package/esm/browser/markdown/code-renderers.js +2 -0
- package/esm/browser/offline/device-values.d.ts +4 -0
- package/esm/browser/offline/device-values.js +10 -0
- package/esm/browser/pwa/page-build.d.ts +15 -0
- package/esm/browser/pwa/page-build.js +45 -0
- package/esm/browser/screen/page-answers.d.ts +2 -1
- package/esm/browser/screen/page-answers.js +7 -4
- package/esm/browser/settings/settings-protocol.d.ts +4 -0
- package/esm/browser/settings/settings-protocol.js +4 -0
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +3 -0
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +1 -1
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation-column.js +17 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +11 -1
- package/esm/browser/style/device.js +1 -0
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +1 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +135 -57
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +0 -7
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +8 -0
- package/esm/browser/style/video-call.d.ts +2 -0
- package/esm/browser/style/video-call.js +63 -0
- package/esm/browser/style.js +2 -0
- package/esm/browser/util/call-transcript.d.ts +16 -0
- package/esm/browser/util/call-transcript.js +110 -0
- package/esm/browser/util/desktop.d.ts +10 -1
- package/esm/browser/util/desktop.js +10 -0
- package/esm/browser/util/image-pull.d.ts +61 -0
- package/esm/browser/util/image-pull.js +88 -0
- package/esm/browser/util/process.d.ts +6 -0
- package/esm/browser/util/process.js +18 -5
- package/esm/browser/util/spoken.d.ts +3 -3
- package/esm/browser/util/spoken.js +4 -4
- package/esm/browser/video-call/call-camera.d.ts +59 -0
- package/esm/browser/video-call/call-camera.js +188 -0
- package/esm/browser/video-call/call-people.d.ts +21 -0
- package/esm/browser/video-call/call-people.js +29 -0
- package/esm/browser/video-call/call-window.d.ts +19 -0
- package/esm/browser/video-call/call-window.js +80 -0
- package/esm/browser/video-call/clip-plan.d.ts +56 -0
- package/esm/browser/video-call/clip-plan.js +76 -0
- package/esm/browser/video-call/face-camera.d.ts +93 -0
- package/esm/browser/video-call/face-camera.js +192 -0
- package/esm/browser/video-call/face-files.d.ts +69 -0
- package/esm/browser/video-call/face-files.js +132 -0
- package/esm/browser/video-call/face-moves.d.ts +68 -0
- package/esm/browser/video-call/face-moves.js +180 -0
- package/esm/browser/video-call/face-stage.d.ts +139 -0
- package/esm/browser/video-call/face-stage.js +219 -0
- package/esm/browser/video-call/mouth-layer.d.ts +81 -0
- package/esm/browser/video-call/mouth-layer.js +241 -0
- package/esm/browser/video-call/video-call-view.d.ts +19 -0
- package/esm/browser/video-call/video-call-view.js +254 -0
- package/esm/browser/video-call/video-face.d.ts +19 -0
- package/esm/browser/video-call/video-face.js +471 -0
- package/esm/browser/workbench-hosts.d.ts +1 -0
- package/esm/browser/workbench-protocol.d.ts +2 -0
- package/esm/browser/workbench-util.d.ts +5 -0
- package/esm/browser/workbench-util.js +18 -0
- package/esm/browser/workbench.d.ts +14 -0
- package/esm/browser/workbench.js +73 -6
- package/lib/browser/assistant/assistant-role.d.ts +9 -4
- package/lib/browser/assistant/assistant-role.js +17 -5
- package/lib/browser/assistant/assistant-task-util.d.ts +6 -0
- package/lib/browser/assistant/assistant-task-util.js +11 -0
- package/lib/browser/assistant/assistant-thread.js +15 -2
- package/lib/browser/assistant/assistant-view.js +3 -0
- package/lib/browser/assistant/assistant.d.ts +2 -1
- package/lib/browser/assistant/assistant.js +9 -7
- package/lib/browser/assistant/call-conversing.d.ts +46 -0
- package/lib/browser/assistant/call-conversing.js +96 -0
- package/lib/browser/assistant/call-face.d.ts +14 -0
- package/lib/browser/assistant/call-face.js +117 -0
- package/lib/browser/assistant/call-keeper.d.ts +8 -4
- package/lib/browser/assistant/call-keeper.js +32 -11
- package/lib/browser/assistant/call-partnering.d.ts +38 -0
- package/lib/browser/assistant/call-partnering.js +83 -0
- package/lib/browser/assistant/call-scenes.d.ts +27 -0
- package/lib/browser/assistant/call-scenes.js +88 -0
- package/lib/browser/assistant/call-screen.d.ts +3 -0
- package/lib/browser/assistant/call-screen.js +15 -0
- package/lib/browser/assistant/mic-sense.d.ts +32 -0
- package/lib/browser/assistant/mic-sense.js +123 -0
- package/lib/browser/assistant/noise-gate.d.ts +33 -0
- package/lib/browser/assistant/noise-gate.js +71 -0
- package/lib/browser/assistant/pcm-util.d.ts +11 -0
- package/lib/browser/assistant/pcm-util.js +58 -0
- package/lib/browser/assistant/read-aloud.d.ts +2 -1
- package/lib/browser/assistant/realtime-voice-protocol.d.ts +85 -0
- package/lib/browser/assistant/realtime-voice-protocol.js +43 -0
- package/lib/browser/assistant/realtime-voice.d.ts +50 -62
- package/lib/browser/assistant/realtime-voice.js +217 -138
- package/lib/browser/assistant/spoken-timeline.d.ts +28 -0
- package/lib/browser/assistant/spoken-timeline.js +53 -0
- package/lib/browser/assistant/voice-call-bar.d.ts +9 -2
- package/lib/browser/assistant/voice-call-bar.js +81 -30
- package/lib/browser/assistant/voice-call-protocol.d.ts +61 -4
- package/lib/browser/assistant/voice-call.d.ts +16 -23
- package/lib/browser/assistant/voice-call.js +134 -117
- package/lib/browser/assistant/voice-reading.d.ts +84 -0
- package/lib/browser/assistant/voice-reading.js +156 -0
- package/lib/browser/avatar/dino-talk.d.ts +16 -0
- package/lib/browser/avatar/dino-talk.js +37 -0
- package/lib/browser/chat/chat-protocol.d.ts +2 -0
- package/lib/browser/chat/chat-shown.d.ts +3 -1
- package/lib/browser/chat/chat-shown.js +25 -3
- package/lib/browser/chat/chat.d.ts +5 -1
- package/lib/browser/chat/chat.js +32 -16
- package/lib/browser/components/account-menu.d.ts +6 -16
- package/lib/browser/components/account-menu.js +45 -99
- package/lib/browser/components/app-contexts.js +2 -1
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-protocol.d.ts +2 -0
- package/lib/browser/components/composer-box.js +20 -1
- package/lib/browser/components/composer-emoji.d.ts +23 -0
- package/lib/browser/components/composer-emoji.js +87 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +8 -1
- package/lib/browser/components/conversation-scroll-util.js +21 -0
- package/lib/browser/components/conversation-scroll.js +10 -11
- package/lib/browser/components/discover-view.d.ts +4 -3
- package/lib/browser/components/discover-view.js +5 -4
- package/lib/browser/components/emoji-panel.d.ts +23 -0
- package/lib/browser/components/emoji-panel.js +90 -0
- package/lib/browser/components/gallery.js +28 -7
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/image-pull.d.ts +65 -0
- package/lib/browser/components/image-pull.js +206 -0
- package/lib/browser/components/kept-call-bar.js +2 -1
- package/lib/browser/components/lightbox.d.ts +1 -1
- package/lib/browser/components/lightbox.js +57 -2
- package/lib/browser/components/markdown.d.ts +8 -1
- package/lib/browser/components/markdown.js +11 -3
- package/lib/browser/components/me-rows.d.ts +25 -0
- package/lib/browser/components/me-rows.js +22 -0
- package/lib/browser/components/me-view.d.ts +2 -1
- package/lib/browser/components/me-view.js +3 -2
- package/lib/browser/components/message-list.js +46 -6
- package/lib/browser/components/message-steps.js +13 -0
- package/lib/browser/components/nav-places.js +1 -1
- package/lib/browser/components/partner-row.js +2 -1
- package/lib/browser/components/relay-services.d.ts +9 -3
- package/lib/browser/components/relay-services.js +71 -33
- package/lib/browser/components/session-view.js +3 -1
- package/lib/browser/components/settings-choices.js +3 -0
- package/lib/browser/components/settings-controls.d.ts +13 -0
- package/lib/browser/components/settings-controls.js +19 -0
- package/lib/browser/components/settings-more.d.ts +1 -1
- package/lib/browser/components/settings-more.js +27 -38
- package/lib/browser/components/settings-parts.d.ts +4 -2
- package/lib/browser/components/settings-parts.js +15 -8
- package/lib/browser/components/settings-view.js +2 -6
- package/lib/browser/components/ta-avatar.d.ts +15 -1
- package/lib/browser/components/ta-avatar.js +38 -5
- package/lib/browser/components/voice-services.js +5 -0
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/device/file-save.d.ts +32 -0
- package/lib/browser/device/file-save.js +83 -0
- package/lib/browser/extension/extension-view.d.ts +2 -0
- package/lib/browser/extension/extension-view.js +3 -1
- package/lib/browser/extension/web-api-call.d.ts +109 -2
- package/lib/browser/extension/web-api-components.d.ts +4 -0
- package/lib/browser/extension/web-api-contributions.d.ts +14 -14
- package/lib/browser/extension/web-api-desktop.d.ts +16 -1
- package/lib/browser/extension/web-api-desktop.js +1 -0
- package/lib/browser/extension/web-api-partners.d.ts +2 -0
- package/lib/browser/extension/web-extension-api.d.ts +8 -10
- package/lib/browser/extension/web-extension-code.d.ts +15 -8
- package/lib/browser/extension/web-extension-code.js +25 -27
- package/lib/browser/extension/web-extension-context.js +4 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +10 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +4 -2
- package/lib/browser/extension/web-extension-run.js +10 -4
- package/lib/browser/extension/web-extensions-running.js +7 -6
- package/lib/browser/extension/web-pages.d.ts +2 -0
- package/lib/browser/extension/web-pages.js +2 -0
- package/lib/browser/i18n/en/account.d.ts +203 -0
- package/lib/browser/i18n/en/account.js +208 -0
- package/lib/browser/i18n/en/assistant.d.ts +130 -0
- package/lib/browser/i18n/en/assistant.js +133 -0
- package/lib/browser/i18n/en/call.d.ts +87 -0
- package/lib/browser/i18n/en/call.js +90 -0
- package/lib/browser/i18n/en/chat.d.ts +214 -0
- package/lib/browser/i18n/en/chat.js +217 -0
- package/lib/browser/i18n/en/common.d.ts +100 -0
- package/lib/browser/i18n/en/common.js +104 -0
- package/lib/browser/i18n/en/console.d.ts +231 -0
- package/lib/browser/i18n/en/console.js +235 -0
- package/lib/browser/i18n/en/discover.d.ts +118 -0
- package/lib/browser/i18n/en/discover.js +122 -0
- package/lib/browser/i18n/en/service.d.ts +243 -0
- package/lib/browser/i18n/en/service.js +248 -0
- package/lib/browser/i18n/en/settings.d.ts +214 -0
- package/lib/browser/i18n/en/settings.js +217 -0
- package/lib/browser/i18n/en/tools.d.ts +86 -0
- package/lib/browser/i18n/en/tools.js +90 -0
- package/lib/browser/i18n/ja/account.d.ts +3 -0
- package/lib/browser/i18n/ja/account.js +205 -0
- package/lib/browser/i18n/ja/assistant.d.ts +3 -0
- package/lib/browser/i18n/ja/assistant.js +132 -0
- package/lib/browser/i18n/ja/call.d.ts +3 -0
- package/lib/browser/i18n/ja/call.js +89 -0
- package/lib/browser/i18n/ja/chat.d.ts +3 -0
- package/lib/browser/i18n/ja/chat.js +216 -0
- package/lib/browser/i18n/ja/common.d.ts +3 -0
- package/lib/browser/i18n/ja/common.js +102 -0
- package/lib/browser/i18n/ja/console.d.ts +3 -0
- package/lib/browser/i18n/ja/console.js +233 -0
- package/lib/browser/i18n/ja/discover.d.ts +3 -0
- package/lib/browser/i18n/ja/discover.js +120 -0
- package/lib/browser/i18n/ja/service.d.ts +3 -0
- package/lib/browser/i18n/ja/service.js +245 -0
- package/lib/browser/i18n/ja/settings.d.ts +3 -0
- package/lib/browser/i18n/ja/settings.js +216 -0
- package/lib/browser/i18n/ja/tools.d.ts +3 -0
- package/lib/browser/i18n/ja/tools.js +88 -0
- package/lib/browser/i18n/locales.d.ts +1150 -1131
- package/lib/browser/i18n/messages-ja.js +20 -1567
- package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/lib/browser/i18n/messages-zh-tw.js +20 -1568
- package/lib/browser/i18n/messages.d.ts +1153 -1131
- package/lib/browser/i18n/messages.js +44 -3145
- package/lib/browser/i18n/zh/account.d.ts +3 -0
- package/lib/browser/i18n/zh/account.js +206 -0
- package/lib/browser/i18n/zh/assistant.d.ts +3 -0
- package/lib/browser/i18n/zh/assistant.js +132 -0
- package/lib/browser/i18n/zh/call.d.ts +3 -0
- package/lib/browser/i18n/zh/call.js +89 -0
- package/lib/browser/i18n/zh/chat.d.ts +3 -0
- package/lib/browser/i18n/zh/chat.js +216 -0
- package/lib/browser/i18n/zh/common.d.ts +3 -0
- package/lib/browser/i18n/zh/common.js +102 -0
- package/lib/browser/i18n/zh/console.d.ts +3 -0
- package/lib/browser/i18n/zh/console.js +233 -0
- package/lib/browser/i18n/zh/discover.d.ts +3 -0
- package/lib/browser/i18n/zh/discover.js +120 -0
- package/lib/browser/i18n/zh/service.d.ts +3 -0
- package/lib/browser/i18n/zh/service.js +245 -0
- package/lib/browser/i18n/zh/settings.d.ts +3 -0
- package/lib/browser/i18n/zh/settings.js +216 -0
- package/lib/browser/i18n/zh/tools.d.ts +3 -0
- package/lib/browser/i18n/zh/tools.js +89 -0
- package/lib/browser/i18n/zh-tw/account.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/account.js +205 -0
- package/lib/browser/i18n/zh-tw/assistant.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/assistant.js +132 -0
- package/lib/browser/i18n/zh-tw/call.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/call.js +89 -0
- package/lib/browser/i18n/zh-tw/chat.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/chat.js +216 -0
- package/lib/browser/i18n/zh-tw/common.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/common.js +102 -0
- package/lib/browser/i18n/zh-tw/console.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/console.js +233 -0
- package/lib/browser/i18n/zh-tw/discover.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/discover.js +120 -0
- package/lib/browser/i18n/zh-tw/service.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/service.js +245 -0
- package/lib/browser/i18n/zh-tw/settings.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/settings.js +216 -0
- package/lib/browser/i18n/zh-tw/tools.d.ts +3 -0
- package/lib/browser/i18n/zh-tw/tools.js +88 -0
- package/lib/browser/markdown/code-renderers.d.ts +2 -0
- package/lib/browser/markdown/code-renderers.js +3 -1
- package/lib/browser/offline/device-values.d.ts +4 -0
- package/lib/browser/offline/device-values.js +10 -0
- package/lib/browser/pwa/page-build.d.ts +16 -0
- package/lib/browser/pwa/page-build.js +48 -0
- package/lib/browser/screen/page-answers.d.ts +2 -1
- package/lib/browser/screen/page-answers.js +7 -4
- package/lib/browser/settings/settings-protocol.d.ts +4 -0
- package/lib/browser/settings/settings-protocol.js +4 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +3 -0
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +1 -1
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation-column.js +17 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +11 -1
- package/lib/browser/style/device.js +1 -0
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +1 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +135 -57
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +0 -7
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +8 -0
- package/lib/browser/style/video-call.d.ts +3 -0
- package/lib/browser/style/video-call.js +66 -0
- package/lib/browser/style.js +2 -0
- package/lib/browser/util/call-transcript.d.ts +17 -0
- package/lib/browser/util/call-transcript.js +113 -0
- package/lib/browser/util/desktop.d.ts +10 -1
- package/lib/browser/util/desktop.js +10 -0
- package/lib/browser/util/image-pull.d.ts +62 -0
- package/lib/browser/util/image-pull.js +91 -0
- package/lib/browser/util/process.d.ts +6 -0
- package/lib/browser/util/process.js +17 -4
- package/lib/browser/util/spoken.d.ts +3 -3
- package/lib/browser/util/spoken.js +4 -4
- package/lib/browser/video-call/call-camera.d.ts +60 -0
- package/lib/browser/video-call/call-camera.js +192 -0
- package/lib/browser/video-call/call-people.d.ts +22 -0
- package/lib/browser/video-call/call-people.js +32 -0
- package/lib/browser/video-call/call-window.d.ts +20 -0
- package/lib/browser/video-call/call-window.js +83 -0
- package/lib/browser/video-call/clip-plan.d.ts +57 -0
- package/lib/browser/video-call/clip-plan.js +80 -0
- package/lib/browser/video-call/face-camera.d.ts +94 -0
- package/lib/browser/video-call/face-camera.js +197 -0
- package/lib/browser/video-call/face-files.d.ts +70 -0
- package/lib/browser/video-call/face-files.js +137 -0
- package/lib/browser/video-call/face-moves.d.ts +69 -0
- package/lib/browser/video-call/face-moves.js +184 -0
- package/lib/browser/video-call/face-stage.d.ts +140 -0
- package/lib/browser/video-call/face-stage.js +223 -0
- package/lib/browser/video-call/mouth-layer.d.ts +82 -0
- package/lib/browser/video-call/mouth-layer.js +245 -0
- package/lib/browser/video-call/video-call-view.d.ts +20 -0
- package/lib/browser/video-call/video-call-view.js +290 -0
- package/lib/browser/video-call/video-face.d.ts +20 -0
- package/lib/browser/video-call/video-face.js +507 -0
- package/lib/browser/workbench-hosts.d.ts +1 -0
- package/lib/browser/workbench-protocol.d.ts +2 -0
- package/lib/browser/workbench-util.d.ts +5 -0
- package/lib/browser/workbench-util.js +18 -0
- package/lib/browser/workbench.d.ts +14 -0
- package/lib/browser/workbench.js +71 -4
- package/package.json +7 -7
- package/public/faces/README.md +40 -0
- package/public/faces/blonde/clap.mp4 +0 -0
- package/public/faces/blonde/dance.mp4 +0 -0
- package/public/faces/blonde/face.jpg +0 -0
- package/public/faces/blonde/happy.mp4 +0 -0
- package/public/faces/blonde/heart.mp4 +0 -0
- package/public/faces/blonde/idle-1.mp4 +0 -0
- package/public/faces/blonde/idle-2.mp4 +0 -0
- package/public/faces/blonde/idle-3.mp4 +0 -0
- package/public/faces/blonde/laugh.mp4 +0 -0
- package/public/faces/blonde/listening.mp4 +0 -0
- package/public/faces/blonde/poster.jpg +0 -0
- package/public/faces/blonde/shy.mp4 +0 -0
- package/public/faces/blonde/sorry.mp4 +0 -0
- package/public/faces/blonde/stretch.mp4 +0 -0
- package/public/faces/blonde/surprised.mp4 +0 -0
- package/public/faces/blonde/talk-1.mp4 +0 -0
- package/public/faces/blonde/talk-2.mp4 +0 -0
- package/public/faces/blonde/think-2.mp4 +0 -0
- package/public/faces/blonde/thinking.mp4 +0 -0
- package/public/faces/blonde/wave.mp4 +0 -0
- package/public/faces/clap.mp4 +0 -0
- package/public/faces/dance.mp4 +0 -0
- package/public/faces/face.jpg +0 -0
- package/public/faces/framing.json +1 -0
- package/public/faces/happy.mp4 +0 -0
- package/public/faces/heart.mp4 +0 -0
- package/public/faces/idle-1.mp4 +0 -0
- package/public/faces/idle-2.mp4 +0 -0
- package/public/faces/idle-3.mp4 +0 -0
- package/public/faces/laugh.mp4 +0 -0
- package/public/faces/lips.json +1 -0
- package/public/faces/listening.mp4 +0 -0
- package/public/faces/poster.jpg +0 -0
- package/public/faces/shy.mp4 +0 -0
- package/public/faces/sorry.mp4 +0 -0
- package/public/faces/stretch.mp4 +0 -0
- package/public/faces/surprised.mp4 +0 -0
- package/public/faces/talk-1.mp4 +0 -0
- package/public/faces/talk-2.mp4 +0 -0
- package/public/faces/think-2.mp4 +0 -0
- package/public/faces/thinking.mp4 +0 -0
- package/public/faces/wave.mp4 +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { SwipeSettle } from '../device/swipe-settle.js';
|
|
2
|
+
import { type SwipeMotion, SwipeVelocity, type TouchPoint } from '../device/swipe-util.js';
|
|
3
|
+
import { type PullPlace } from '../util/image-pull.js';
|
|
4
|
+
/** Where the box of the picture is drawn as at first, and the point of it it is drawn larger or smaller about. */
|
|
5
|
+
interface PullFrom {
|
|
6
|
+
box: {
|
|
7
|
+
left: number;
|
|
8
|
+
top: number;
|
|
9
|
+
};
|
|
10
|
+
origin: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface ImagePullHandlers {
|
|
16
|
+
/** The picture shown now as it was opened from on the page (its thumbnail), if it is in sight. */
|
|
17
|
+
origin(): HTMLElement | undefined;
|
|
18
|
+
/** It pulled or came back: the buttons over it hide as it does. */
|
|
19
|
+
pulling(pulling: boolean): void;
|
|
20
|
+
/** Let go to close: it flew back to its thumbnail, or away. */
|
|
21
|
+
close(): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A finger pulls the picture of a lightbox down to close it (ImagePullUtil): `viewport`, the box of the picture,
|
|
25
|
+
* follows the finger and gets smaller, `shade`, the dark over the page, lighter; let go far enough or flicked
|
|
26
|
+
* down, the picture shrinks back onto its thumbnail (`origin`), cut to what the thumbnail shows of it, or on down
|
|
27
|
+
* and away when that is not in sight, and it closes; else both come back. Closed otherwise (`leave`: its button,
|
|
28
|
+
* a tap beside it, back) it shrinks back so too. Only a picture not zoomed in: zoomed, the finger scrolls it. A second finger
|
|
29
|
+
* pinches: the pull comes back.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ImagePull {
|
|
32
|
+
protected readonly viewport: HTMLElement;
|
|
33
|
+
protected readonly image: HTMLElement;
|
|
34
|
+
protected readonly shade: HTMLElement;
|
|
35
|
+
protected readonly on: ImagePullHandlers;
|
|
36
|
+
protected start?: TouchPoint;
|
|
37
|
+
protected claimed?: boolean;
|
|
38
|
+
/** Where the finger was when the move was told a pull, where the box is drawn as at first and how tall the screen is. */
|
|
39
|
+
protected moved?: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
} & PullFrom;
|
|
43
|
+
protected place: PullPlace;
|
|
44
|
+
protected closing: boolean;
|
|
45
|
+
protected readonly velocity: SwipeVelocity;
|
|
46
|
+
protected readonly settle: SwipeSettle;
|
|
47
|
+
constructor(viewport: HTMLElement, image: HTMLElement, shade: HTMLElement, on: ImagePullHandlers);
|
|
48
|
+
attach(): () => void;
|
|
49
|
+
protected readonly onStart: (event: TouchEvent) => void;
|
|
50
|
+
protected readonly onMove: (event: TouchEvent) => void;
|
|
51
|
+
protected readonly onEnd: (event: TouchEvent) => void;
|
|
52
|
+
/** Closes it from where it is now: back onto its thumbnail, or, zoomed in or with none in sight, fading away. */
|
|
53
|
+
leave(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Shrinks onto its thumbnail, cut as the thumbnail is, the thumbnail hidden under it meanwhile; with none (or
|
|
56
|
+
* zoomed in), on down out of sight when pulled, else fading away where it is. Then it closes.
|
|
57
|
+
*/
|
|
58
|
+
protected away(from: PullFrom, speed: number, pulled: boolean): void;
|
|
59
|
+
protected fly(motion: SwipeMotion, to: PullPlace, opacity: number, done: () => void): void;
|
|
60
|
+
/** Comes back where it was, the shade dark again. */
|
|
61
|
+
protected back(speed: number): void;
|
|
62
|
+
protected reset(): void;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { SwipeSettle } from '../device/swipe-settle.js';
|
|
2
|
+
import { SwipeUtil, SwipeVelocity } from '../device/swipe-util.js';
|
|
3
|
+
import { ImagePullUtil } from '../util/image-pull.js';
|
|
4
|
+
/**
|
|
5
|
+
* A finger pulls the picture of a lightbox down to close it (ImagePullUtil): `viewport`, the box of the picture,
|
|
6
|
+
* follows the finger and gets smaller, `shade`, the dark over the page, lighter; let go far enough or flicked
|
|
7
|
+
* down, the picture shrinks back onto its thumbnail (`origin`), cut to what the thumbnail shows of it, or on down
|
|
8
|
+
* and away when that is not in sight, and it closes; else both come back. Closed otherwise (`leave`: its button,
|
|
9
|
+
* a tap beside it, back) it shrinks back so too. Only a picture not zoomed in: zoomed, the finger scrolls it. A second finger
|
|
10
|
+
* pinches: the pull comes back.
|
|
11
|
+
*/
|
|
12
|
+
export class ImagePull {
|
|
13
|
+
constructor(viewport, image, shade, on) {
|
|
14
|
+
this.viewport = viewport;
|
|
15
|
+
this.image = image;
|
|
16
|
+
this.shade = shade;
|
|
17
|
+
this.on = on;
|
|
18
|
+
this.place = { x: 0, y: 0, scale: 1 };
|
|
19
|
+
this.closing = false;
|
|
20
|
+
this.velocity = new SwipeVelocity('y');
|
|
21
|
+
this.settle = new SwipeSettle();
|
|
22
|
+
this.onStart = (event) => {
|
|
23
|
+
const touch = event.touches[0];
|
|
24
|
+
if (event.touches.length !== 1 || !touch || this.closing) {
|
|
25
|
+
// A second finger pinches: what it pulled comes back.
|
|
26
|
+
if (this.moved) {
|
|
27
|
+
this.back(0);
|
|
28
|
+
}
|
|
29
|
+
this.reset();
|
|
30
|
+
this.claimed = false;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.start = { x: touch.clientX, y: touch.clientY, t: event.timeStamp };
|
|
34
|
+
this.claimed = undefined;
|
|
35
|
+
this.velocity.start(this.start);
|
|
36
|
+
};
|
|
37
|
+
this.onMove = (event) => {
|
|
38
|
+
const { start, viewport } = this;
|
|
39
|
+
const touch = event.touches[0];
|
|
40
|
+
if (!start || this.claimed === false || !touch || event.touches.length !== 1) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (this.claimed === undefined) {
|
|
44
|
+
this.claimed = ImagePullUtil.claims(touch.clientX - start.x, touch.clientY - start.y, viewport.dataset.zoomed === 'true');
|
|
45
|
+
if (!this.claimed) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// From where the finger is now, about the spot under it: it never jumps, and that spot stays under it.
|
|
49
|
+
this.settle.hold([viewport, this.shade]);
|
|
50
|
+
viewport.style.transform = 'none';
|
|
51
|
+
const box = viewport.getBoundingClientRect();
|
|
52
|
+
const origin = { x: touch.clientX - box.left, y: touch.clientY - box.top };
|
|
53
|
+
viewport.style.transformOrigin = `${origin.x}px ${origin.y}px`;
|
|
54
|
+
this.moved = { x: touch.clientX, y: touch.clientY, box: { left: box.left, top: box.top }, origin };
|
|
55
|
+
this.on.pulling(true);
|
|
56
|
+
}
|
|
57
|
+
const { moved } = this;
|
|
58
|
+
if (!moved) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// Neither the picture nor the page scrolls under it.
|
|
62
|
+
if (event.cancelable) {
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
}
|
|
65
|
+
this.velocity.add({ x: touch.clientX, y: touch.clientY, t: event.timeStamp });
|
|
66
|
+
const dy = touch.clientY - moved.y;
|
|
67
|
+
this.place = ImagePullUtil.place(touch.clientX - moved.x, dy, window.innerHeight);
|
|
68
|
+
viewport.style.transform = ImagePullUtil.transform(this.place);
|
|
69
|
+
this.shade.style.opacity = String(ImagePullUtil.shade(dy, window.innerHeight));
|
|
70
|
+
};
|
|
71
|
+
this.onEnd = (event) => {
|
|
72
|
+
if (event.touches.length > 0) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const { moved } = this;
|
|
76
|
+
if (moved) {
|
|
77
|
+
const touch = event.changedTouches[0];
|
|
78
|
+
if (touch) {
|
|
79
|
+
this.velocity.add({ x: touch.clientX, y: touch.clientY, t: event.timeStamp });
|
|
80
|
+
}
|
|
81
|
+
// Taken by the system, it comes back.
|
|
82
|
+
const cancelled = event.type === 'touchcancel';
|
|
83
|
+
const speed = cancelled ? 0 : this.velocity.speed;
|
|
84
|
+
if (!cancelled && ImagePullUtil.closes(this.place.y, speed, window.innerHeight)) {
|
|
85
|
+
this.away(moved, speed, true);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.back(speed);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
this.reset();
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
attach() {
|
|
95
|
+
const { viewport } = this;
|
|
96
|
+
viewport.addEventListener('touchstart', this.onStart, { passive: true });
|
|
97
|
+
viewport.addEventListener('touchmove', this.onMove, { passive: false });
|
|
98
|
+
viewport.addEventListener('touchend', this.onEnd);
|
|
99
|
+
viewport.addEventListener('touchcancel', this.onEnd);
|
|
100
|
+
return () => {
|
|
101
|
+
viewport.removeEventListener('touchstart', this.onStart);
|
|
102
|
+
viewport.removeEventListener('touchmove', this.onMove);
|
|
103
|
+
viewport.removeEventListener('touchend', this.onEnd);
|
|
104
|
+
viewport.removeEventListener('touchcancel', this.onEnd);
|
|
105
|
+
this.settle.finish();
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Closes it from where it is now: back onto its thumbnail, or, zoomed in or with none in sight, fading away. */
|
|
109
|
+
leave() {
|
|
110
|
+
if (this.closing) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const { viewport } = this;
|
|
114
|
+
this.settle.hold([viewport, this.shade]);
|
|
115
|
+
viewport.style.transformOrigin = '0px 0px';
|
|
116
|
+
const box = viewport.getBoundingClientRect();
|
|
117
|
+
this.place = { x: 0, y: 0, scale: 1 };
|
|
118
|
+
this.on.pulling(true);
|
|
119
|
+
this.away({ box: { left: box.left, top: box.top }, origin: { x: 0, y: 0 } }, 0, false);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Shrinks onto its thumbnail, cut as the thumbnail is, the thumbnail hidden under it meanwhile; with none (or
|
|
123
|
+
* zoomed in), on down out of sight when pulled, else fading away where it is. Then it closes.
|
|
124
|
+
*/
|
|
125
|
+
away(from, speed, pulled) {
|
|
126
|
+
this.closing = true;
|
|
127
|
+
const { viewport, image } = this;
|
|
128
|
+
const now = this.place;
|
|
129
|
+
const thumbnail = viewport.dataset.zoomed === 'true' ? undefined : this.on.origin();
|
|
130
|
+
const target = thumbnail === null || thumbnail === void 0 ? void 0 : thumbnail.getBoundingClientRect();
|
|
131
|
+
if (!thumbnail || !target) {
|
|
132
|
+
const to = pulled ? { ...now, y: now.y + window.innerHeight } : { ...now, scale: now.scale * 0.92 };
|
|
133
|
+
const motion = pulled ? SwipeUtil.motion(now.y, to.y, speed, ImagePullUtil.SETTLE_MS) : { ms: ImagePullUtil.FADE_MS, easing: 'ease-out' };
|
|
134
|
+
this.fly(motion, to, 0, () => this.on.close());
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const rect = image.getBoundingClientRect();
|
|
138
|
+
const to = ImagePullUtil.onto(rect, target, from.box, from.origin, now);
|
|
139
|
+
// The picture in the pixels of its box (drawn at `now` it is `now.scale` as large): all of it shows now, its middle at the end.
|
|
140
|
+
const box = viewport.getBoundingClientRect();
|
|
141
|
+
const shown = {
|
|
142
|
+
left: (rect.left - box.left) / now.scale,
|
|
143
|
+
top: (rect.top - box.top) / now.scale,
|
|
144
|
+
width: rect.width / now.scale,
|
|
145
|
+
height: rect.height / now.scale,
|
|
146
|
+
};
|
|
147
|
+
const width = viewport.offsetWidth;
|
|
148
|
+
const height = viewport.offsetHeight;
|
|
149
|
+
const radius = ImagePullCss.radius(thumbnail);
|
|
150
|
+
viewport.style.clipPath = ImagePullUtil.inset(shown, width, height, 0);
|
|
151
|
+
void viewport.offsetWidth;
|
|
152
|
+
// As long as the way it goes, at the speed it was let go.
|
|
153
|
+
const motion = SwipeUtil.motion(0, Math.hypot(to.x - now.x, to.y - now.y), speed, ImagePullUtil.SETTLE_MS);
|
|
154
|
+
const visibility = thumbnail.style.visibility;
|
|
155
|
+
this.fly(motion, to, 1, () => {
|
|
156
|
+
thumbnail.style.visibility = visibility;
|
|
157
|
+
viewport.style.removeProperty('clip-path');
|
|
158
|
+
this.on.close();
|
|
159
|
+
});
|
|
160
|
+
// Cut, as it goes, to what the thumbnail shows of it.
|
|
161
|
+
viewport.style.transition += `, clip-path ${motion.ms}ms ${motion.easing}`;
|
|
162
|
+
viewport.style.clipPath = ImagePullUtil.inset(ImagePullUtil.middle(shown, target, to.scale), width, height, radius / to.scale);
|
|
163
|
+
thumbnail.style.visibility = 'hidden';
|
|
164
|
+
}
|
|
165
|
+
fly(motion, to, opacity, done) {
|
|
166
|
+
const { viewport } = this;
|
|
167
|
+
this.settle.run(motion, [
|
|
168
|
+
{ element: viewport, transform: ImagePullUtil.transform(to), opacity },
|
|
169
|
+
{ element: this.shade, opacity: 0 },
|
|
170
|
+
], () => true, done);
|
|
171
|
+
}
|
|
172
|
+
/** Comes back where it was, the shade dark again. */
|
|
173
|
+
back(speed) {
|
|
174
|
+
const from = this.place.y;
|
|
175
|
+
this.place = { x: 0, y: 0, scale: 1 };
|
|
176
|
+
this.on.pulling(false);
|
|
177
|
+
this.settle.run(SwipeUtil.motion(from, 0, speed, ImagePullUtil.SETTLE_MS), [
|
|
178
|
+
{ element: this.viewport, transform: ImagePullUtil.transform(this.place) },
|
|
179
|
+
{ element: this.shade, opacity: 1 },
|
|
180
|
+
], () => true, () => this.viewport.style.removeProperty('transform-origin'));
|
|
181
|
+
}
|
|
182
|
+
reset() {
|
|
183
|
+
this.start = undefined;
|
|
184
|
+
this.claimed = undefined;
|
|
185
|
+
this.moved = undefined;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
var ImagePullCss;
|
|
189
|
+
(function (ImagePullCss) {
|
|
190
|
+
/** How round the corners of a thumbnail are: its own, or those of the box that cuts it. */
|
|
191
|
+
function radius(thumbnail) {
|
|
192
|
+
for (const element of [thumbnail, thumbnail.parentElement]) {
|
|
193
|
+
const radius = element ? Number.parseFloat(getComputedStyle(element).borderTopLeftRadius) : 0;
|
|
194
|
+
if (radius > 0) {
|
|
195
|
+
return radius;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return 0;
|
|
199
|
+
}
|
|
200
|
+
ImagePullCss.radius = radius;
|
|
201
|
+
})(ImagePullCss || (ImagePullCss = {}));
|
|
202
|
+
//# sourceMappingURL=image-pull.js.map
|
|
@@ -7,6 +7,7 @@ import { useSettings, useWorkbench } from '../hooks.js';
|
|
|
7
7
|
import { useT } from '../i18n/use-t.js';
|
|
8
8
|
import { TaScreen } from '../screen/screen-protocol.js';
|
|
9
9
|
import { useScreenPart } from '../screen/use-screen-part.js';
|
|
10
|
+
import { VideoCallView } from '../video-call/video-call-view.js';
|
|
10
11
|
import { CallPill } from './call-pill.js';
|
|
11
12
|
/** How often a call elsewhere is looked at again while it shows: it goes once its page stops telling of it. */
|
|
12
13
|
const ELSEWHERE_TICK_MS = 15000;
|
|
@@ -52,7 +53,7 @@ export function KeptCallBar({ looking, onBack }) {
|
|
|
52
53
|
captions: on => store.update({ callCaptions: on }),
|
|
53
54
|
...(inFront ? {} : { open: back }),
|
|
54
55
|
} }),
|
|
55
|
-
!inFront && (React.createElement(CallPill, { title: kept.title, phase: CallScreen.phase(t, seen), connecting: state.phase === 'connecting', onBack: back, onHangUp: () => keeper.hangUp() }))));
|
|
56
|
+
state.video ? (React.createElement(VideoCallView, { call: call, state: state, title: kept.title, here: inFront, onBack: back, onHangUp: () => keeper.hangUp() })) : (!inFront && (React.createElement(CallPill, { title: kept.title, phase: CallScreen.phase(t, seen), connecting: state.phase === 'connecting', onBack: back, onHangUp: () => keeper.hangUp() })))));
|
|
56
57
|
}
|
|
57
58
|
if (elsewhere) {
|
|
58
59
|
const back = () => onBack(elsewhere.sessionId, !!elsewhere.double);
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
* An image over the page, to look at closely (ImageViewer): pinched, zoomed, dragged, and with `onPrevious` /
|
|
4
4
|
* `onNext` the images beside it, by its side buttons, ← → and a finger that swipes it (`previousSrc` / `nextSrc`
|
|
5
5
|
* in sight as it does, as the viewers of pictures of a phone). A click or tap beside it,
|
|
6
|
-
* its close button or
|
|
6
|
+
* its close button, Escape, back or a finger that pulls it down closes it, shrinking back onto its thumbnail (ImagePull). In the top layer, so no container clips it; the touches in it are its
|
|
7
7
|
* own, never a swipe of a sheet under it.
|
|
8
8
|
*/
|
|
9
9
|
export declare function Lightbox({ src, alt, caption, count, onClose, onPrevious, onNext, previousSrc, nextSrc, }: {
|
|
@@ -3,24 +3,60 @@ import * as React from 'react';
|
|
|
3
3
|
import { useBackLayer } from '../device/back-stack.js';
|
|
4
4
|
import { useT } from '../i18n/use-t.js';
|
|
5
5
|
import { Icon } from './icon.js';
|
|
6
|
+
import { ImagePull } from './image-pull.js';
|
|
6
7
|
import { ImageViewer } from './image-viewer.js';
|
|
7
8
|
/**
|
|
8
9
|
* An image over the page, to look at closely (ImageViewer): pinched, zoomed, dragged, and with `onPrevious` /
|
|
9
10
|
* `onNext` the images beside it, by its side buttons, ← → and a finger that swipes it (`previousSrc` / `nextSrc`
|
|
10
11
|
* in sight as it does, as the viewers of pictures of a phone). A click or tap beside it,
|
|
11
|
-
* its close button or
|
|
12
|
+
* its close button, Escape, back or a finger that pulls it down closes it, shrinking back onto its thumbnail (ImagePull). In the top layer, so no container clips it; the touches in it are its
|
|
12
13
|
* own, never a swipe of a sheet under it.
|
|
13
14
|
*/
|
|
14
15
|
export function Lightbox({ src, alt, caption, count, onClose, onPrevious, onNext, previousSrc, nextSrc, }) {
|
|
15
16
|
const t = useT();
|
|
16
17
|
const dialog = React.useRef(null);
|
|
18
|
+
/** What opened it (the thumbnail tapped): the picture goes back there first, of those that show the same. */
|
|
19
|
+
const opener = React.useRef(null);
|
|
17
20
|
React.useEffect(() => {
|
|
18
21
|
var _a, _b;
|
|
22
|
+
opener.current = document.activeElement;
|
|
19
23
|
(_b = (_a = dialog.current) === null || _a === void 0 ? void 0 : _a.showModal) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
20
24
|
}, []);
|
|
21
|
-
const
|
|
25
|
+
const pull = React.useRef(undefined);
|
|
26
|
+
// It shrinks back onto its thumbnail, then closes.
|
|
27
|
+
const close = () => { var _a; return (pull.current ? pull.current.leave() : (_a = dialog.current) === null || _a === void 0 ? void 0 : _a.close()); };
|
|
22
28
|
useBackLayer(true, close);
|
|
29
|
+
const shade = React.useRef(null);
|
|
30
|
+
const shown = React.useRef(src);
|
|
31
|
+
shown.current = src;
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
const box = dialog.current;
|
|
34
|
+
const viewport = box === null || box === void 0 ? void 0 : box.querySelector('.ta-zoom-viewport');
|
|
35
|
+
const image = viewport === null || viewport === void 0 ? void 0 : viewport.querySelector('img');
|
|
36
|
+
if (!box || !viewport || !image || !shade.current) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
const controller = new ImagePull(viewport, image, shade.current, {
|
|
40
|
+
origin: () => LightboxUtil.thumbnail(shown.current, box, opener.current),
|
|
41
|
+
pulling: pulling => box.toggleAttribute('data-pulling', pulling),
|
|
42
|
+
close: () => box.close(),
|
|
43
|
+
});
|
|
44
|
+
pull.current = controller;
|
|
45
|
+
// Escape shrinks it back too.
|
|
46
|
+
const onCancel = (event) => {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
controller.leave();
|
|
49
|
+
};
|
|
50
|
+
box.addEventListener('cancel', onCancel);
|
|
51
|
+
const detach = controller.attach();
|
|
52
|
+
return () => {
|
|
53
|
+
box.removeEventListener('cancel', onCancel);
|
|
54
|
+
detach();
|
|
55
|
+
pull.current = undefined;
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
23
58
|
return (React.createElement("dialog", { ref: dialog, className: "ta-lightbox", onClose: onClose, onTouchStart: event => event.stopPropagation() },
|
|
59
|
+
React.createElement("div", { ref: shade, className: "ta-lightbox-shade" }),
|
|
24
60
|
React.createElement(ImageViewer, { src: src, alt: alt, onBackground: close, onPrevious: onPrevious, onNext: onNext, previousSrc: previousSrc, nextSrc: nextSrc, autoFocus: true }),
|
|
25
61
|
(caption || count) && (React.createElement("div", { className: "ta-lightbox-caption" },
|
|
26
62
|
caption && React.createElement("span", { className: "ta-lightbox-words" }, caption),
|
|
@@ -28,4 +64,23 @@ export function Lightbox({ src, alt, caption, count, onClose, onPrevious, onNext
|
|
|
28
64
|
React.createElement("button", { type: "button", className: "ta-lightbox-close", title: t('ta.close'), "aria-label": t('ta.close'), onClick: close },
|
|
29
65
|
React.createElement(Icon, { icon: X, size: 18 }))));
|
|
30
66
|
}
|
|
67
|
+
var LightboxUtil;
|
|
68
|
+
(function (LightboxUtil) {
|
|
69
|
+
/** The picture `src` small on the page, in sight (the thumbnail it was opened from, in `opener` first), out of `lightbox`. */
|
|
70
|
+
function thumbnail(src, lightbox, opener) {
|
|
71
|
+
var _a;
|
|
72
|
+
const url = new URL(src, location.href).href;
|
|
73
|
+
for (const image of [...((_a = opener === null || opener === void 0 ? void 0 : opener.querySelectorAll('img')) !== null && _a !== void 0 ? _a : []), ...document.images]) {
|
|
74
|
+
if (lightbox.contains(image) || (image.currentSrc || image.src) !== url) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const rect = image.getBoundingClientRect();
|
|
78
|
+
if (rect.width > 0 && rect.height > 0 && rect.bottom > 0 && rect.top < window.innerHeight && rect.right > 0 && rect.left < window.innerWidth) {
|
|
79
|
+
return image;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
LightboxUtil.thumbnail = thumbnail;
|
|
85
|
+
})(LightboxUtil || (LightboxUtil = {}));
|
|
31
86
|
//# sourceMappingURL=lightbox.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { WebCodeRendererProps } from '../extension/web-api-contributions.js';
|
|
2
3
|
export declare function CodeBlock({ code }: {
|
|
3
4
|
code: string;
|
|
4
5
|
language?: string;
|
|
@@ -6,8 +7,14 @@ export declare function CodeBlock({ code }: {
|
|
|
6
7
|
/**
|
|
7
8
|
* Markdown as React elements; drawn again only when its text changes, and then only the blocks that did.
|
|
8
9
|
* `streaming`: the text is a reply still coming, which shows nothing that is about to turn into something else.
|
|
10
|
+
* `inline`: a short text in a line (an option, an answer, a label), its marks and formulas drawn without blocks.
|
|
11
|
+
* `send` and `answer`: where a choice tapped in its blocks goes and what was answered (WebCodeRendererProps), for a
|
|
12
|
+
* text a page shows of a conversation of its own (a group chat); else those of the conversation it is in, if any.
|
|
9
13
|
*/
|
|
10
|
-
export declare function Markdown({ text, streaming }: {
|
|
14
|
+
export declare function Markdown({ text, streaming, inline, send, answer, }: {
|
|
11
15
|
text: string;
|
|
12
16
|
streaming?: boolean;
|
|
17
|
+
inline?: boolean;
|
|
18
|
+
send?: WebCodeRendererProps['send'];
|
|
19
|
+
answer?: string;
|
|
13
20
|
}): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Check, Copy } from 'lucide-react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useT } from '../i18n/use-t.js';
|
|
4
|
-
import { CodeAnswer, CodeRenderers, CodeReply } from '../markdown/code-renderers.js';
|
|
4
|
+
import { CodeAnswer, CodeEmbedded, CodeRenderers, CodeReply } from '../markdown/code-renderers.js';
|
|
5
5
|
import { MermaidUtil } from '../markdown/mermaid.js';
|
|
6
6
|
import { GalleryUtil } from '../util/gallery.js';
|
|
7
7
|
import { MarkdownUtil } from '../util/markdown.js';
|
|
@@ -81,6 +81,7 @@ function CodeView({ language, code, closed }) {
|
|
|
81
81
|
const Renderer = React.useContext(CodeRenderers)[language.trim().toLowerCase()];
|
|
82
82
|
const send = React.useContext(CodeReply);
|
|
83
83
|
const answer = React.useContext(CodeAnswer);
|
|
84
|
+
const embedded = React.useContext(CodeEmbedded);
|
|
84
85
|
// What a reply holds for the ear alone (SpokenReply) is heard, not shown.
|
|
85
86
|
if (language.trim().toLowerCase() === SpokenReply.LANGUAGE) {
|
|
86
87
|
return null;
|
|
@@ -88,7 +89,8 @@ function CodeView({ language, code, closed }) {
|
|
|
88
89
|
const plain = React.createElement(CodeBlock, { code: code, language: language });
|
|
89
90
|
if (Renderer) {
|
|
90
91
|
return (React.createElement(CodeBoundary, { retry: closed, fallback: plain },
|
|
91
|
-
React.createElement(
|
|
92
|
+
React.createElement(CodeEmbedded.Provider, { value: true }, embedded ? (React.createElement("div", { className: "ta-code-embedded" },
|
|
93
|
+
React.createElement(Renderer, { code: code, language: language, closed: closed, send: send, answer: answer, embedded: true }))) : (React.createElement(Renderer, { code: code, language: language, closed: closed, send: send, answer: answer })))));
|
|
92
94
|
}
|
|
93
95
|
if (MermaidUtil.isDiagram(language, code)) {
|
|
94
96
|
return React.createElement(MermaidView, { code: code, fallback: plain });
|
|
@@ -150,8 +152,14 @@ const MarkdownBody = React.memo(function MarkdownBody({ text, streaming }) {
|
|
|
150
152
|
/**
|
|
151
153
|
* Markdown as React elements; drawn again only when its text changes, and then only the blocks that did.
|
|
152
154
|
* `streaming`: the text is a reply still coming, which shows nothing that is about to turn into something else.
|
|
155
|
+
* `inline`: a short text in a line (an option, an answer, a label), its marks and formulas drawn without blocks.
|
|
156
|
+
* `send` and `answer`: where a choice tapped in its blocks goes and what was answered (WebCodeRendererProps), for a
|
|
157
|
+
* text a page shows of a conversation of its own (a group chat); else those of the conversation it is in, if any.
|
|
153
158
|
*/
|
|
154
|
-
export function Markdown({ text, streaming = false }) {
|
|
155
|
-
|
|
159
|
+
export function Markdown({ text, streaming = false, inline = false, send, answer, }) {
|
|
160
|
+
const body = inline ? (React.createElement("span", { className: "ta-markdown ta-markdown-inline" },
|
|
161
|
+
React.createElement(Text, { text: text }))) : (React.createElement(MarkdownBody, { text: text, streaming: streaming }));
|
|
162
|
+
return send ? (React.createElement(CodeReply.Provider, { value: send },
|
|
163
|
+
React.createElement(CodeAnswer.Provider, { value: answer }, body))) : (body);
|
|
156
164
|
}
|
|
157
165
|
//# sourceMappingURL=markdown.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** What decides the rows of Me: the state of the device, the computer and the account. */
|
|
2
|
+
export interface MeState {
|
|
3
|
+
/** The vault's package is on. */
|
|
4
|
+
vault: boolean;
|
|
5
|
+
/** The pages of extensions that are the user's own (WebView.group `me`), by id. */
|
|
6
|
+
own: string[];
|
|
7
|
+
/** A new version of Ta waits for a restart. */
|
|
8
|
+
update: boolean;
|
|
9
|
+
/** The page can be installed as an app and is not one yet. */
|
|
10
|
+
installable: boolean;
|
|
11
|
+
/** The phone app, signed in to an account. */
|
|
12
|
+
switchAccount: boolean;
|
|
13
|
+
/** A computer's browser, which pairs phones (neither the app nor a phone). */
|
|
14
|
+
pairPhone: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The rows of Me, as WeChat's: what is the user's (the double's look, their devices, the model accounts, the vault),
|
|
18
|
+
* the pages extensions add there, the settings (with what waits for the user: a new version, installing the app), and
|
|
19
|
+
* leaving. What only sets something (the theme, the language, the extensions, the keys, about) is in the settings
|
|
20
|
+
* alone, one tap away (docs/design/ta-me.md 9).
|
|
21
|
+
*/
|
|
22
|
+
export declare namespace MeUtil {
|
|
23
|
+
function keys(state: MeState): string[][];
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rows of Me, as WeChat's: what is the user's (the double's look, their devices, the model accounts, the vault),
|
|
3
|
+
* the pages extensions add there, the settings (with what waits for the user: a new version, installing the app), and
|
|
4
|
+
* leaving. What only sets something (the theme, the language, the extensions, the keys, about) is in the settings
|
|
5
|
+
* alone, one tap away (docs/design/ta-me.md 9).
|
|
6
|
+
*/
|
|
7
|
+
export var MeUtil;
|
|
8
|
+
(function (MeUtil) {
|
|
9
|
+
function keys(state) {
|
|
10
|
+
return [
|
|
11
|
+
['look', 'devices', ...(state.pairPhone ? ['relay'] : []), 'accounts', ...(state.vault ? ['vault'] : [])],
|
|
12
|
+
state.own.map(id => `page:${id}`),
|
|
13
|
+
['settings', ...(state.update ? ['restart'] : []), ...(state.installable ? ['install'] : [])],
|
|
14
|
+
[...(state.switchAccount ? ['switchAccount'] : []), 'signOut'],
|
|
15
|
+
].filter(group => group.length > 0);
|
|
16
|
+
}
|
|
17
|
+
MeUtil.keys = keys;
|
|
18
|
+
})(MeUtil || (MeUtil = {}));
|
|
19
|
+
//# sourceMappingURL=me-rows.js.map
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import type { SettingsSection } from './settings-view.js';
|
|
3
3
|
/**
|
|
4
4
|
* Me, the last tab of a phone, as in a messaging app: the user's profile (their picture, name and account, which it
|
|
5
|
-
* opens), the machine in use and whether the app is connected, then the entries the rail of a computer has in the menu
|
|
5
|
+
* opens), the machine in use and whether the app is connected, then the entries the rail of a computer has in the menu
|
|
6
|
+
* of its account (MeUtil.keys): what is the user's, the pages of extensions, the settings, leaving.
|
|
6
7
|
*/
|
|
7
8
|
export declare function MeView({ onSettings }: {
|
|
8
9
|
onSettings(section?: SettingsSection): void;
|
|
@@ -6,7 +6,8 @@ import { Icon } from './icon.js';
|
|
|
6
6
|
import { ListGroup, ListRow } from './list-rows.js';
|
|
7
7
|
/**
|
|
8
8
|
* Me, the last tab of a phone, as in a messaging app: the user's profile (their picture, name and account, which it
|
|
9
|
-
* opens), the machine in use and whether the app is connected, then the entries the rail of a computer has in the menu
|
|
9
|
+
* opens), the machine in use and whether the app is connected, then the entries the rail of a computer has in the menu
|
|
10
|
+
* of its account (MeUtil.keys): what is the user's, the pages of extensions, the settings, leaving.
|
|
10
11
|
*/
|
|
11
12
|
export function MeView({ onSettings }) {
|
|
12
13
|
var _a, _b;
|
|
@@ -30,7 +31,7 @@ export function MeView({ onSettings }) {
|
|
|
30
31
|
React.createElement(Icon, { icon: ChevronRight, size: 18, className: "ta-list-chevron" })),
|
|
31
32
|
groups
|
|
32
33
|
.filter(group => group.length > 0)
|
|
33
|
-
.map(group => (React.createElement(ListGroup, { key: group[0].key }, group.map(entry =>
|
|
34
|
+
.map(group => (React.createElement(ListGroup, { key: group[0].key }, group.map(entry => (React.createElement(ListRow, { key: entry.key, icon: entry.danger ? undefined : entry.icon, label: entry.label, detail: entry.detail, danger: entry.danger, action: entry.danger || entry.action, onClick: entry.run })))))))),
|
|
34
35
|
React.createElement(AccountDialogs, { dialog: dialog, onClose: () => setDialog(undefined), onDialog: setDialog })));
|
|
35
36
|
}
|
|
36
37
|
//# sourceMappingURL=me-view.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ChevronRight, FoldVertical } from 'lucide-react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { CustomMessage, ExtensionBoundary, MessageRenderers, SessionAvatars } from '../extension/extension-view.js';
|
|
3
|
+
import { CallGroup, CustomMessage, ExtensionBoundary, MessageRenderers, SessionAvatars } from '../extension/extension-view.js';
|
|
4
4
|
import { useT } from '../i18n/use-t.js';
|
|
5
5
|
import { CodeAnswer } from '../markdown/code-renderers.js';
|
|
6
|
+
import { CallTranscript } from '../util/call-transcript.js';
|
|
6
7
|
import { MessageUtil } from '../util/message.js';
|
|
7
8
|
import { FreshRows, ProcessUtil } from '../util/process.js';
|
|
8
9
|
import { ProgressUtil } from '../util/progress.js';
|
|
@@ -43,11 +44,14 @@ export function quiet(item) {
|
|
|
43
44
|
export function endsInSteps(item) {
|
|
44
45
|
return (item === null || item === void 0 ? void 0 : item.kind) === 'turn' && item.steps.length > 0 && !item.reply.length;
|
|
45
46
|
}
|
|
46
|
-
function Turn({ item, tools, mood, status, latest, unsure, }) {
|
|
47
|
+
function Turn({ item, tools, mood, status, latest, unsure, spoken, }) {
|
|
47
48
|
const compacted = ProcessUtil.compaction(item);
|
|
48
49
|
if (compacted !== undefined) {
|
|
49
50
|
return React.createElement(CompactionBreak, { summary: compacted, tokens: MessageUtil.usage(item.messages).input });
|
|
50
51
|
}
|
|
52
|
+
if (spoken) {
|
|
53
|
+
return React.createElement(SpokenTurn, { item: item, tools: tools, mood: mood, status: status });
|
|
54
|
+
}
|
|
51
55
|
return React.createElement(WorkTurn, { item: item, tools: tools, mood: mood, status: status, latest: latest, unsure: unsure });
|
|
52
56
|
}
|
|
53
57
|
/** `unsure`: the conversation shows as this device kept it, before it is the session's of now; how the turn ended may be over. */
|
|
@@ -76,6 +80,32 @@ function WorkTurn({ item, tools, mood, status, latest, unsure, }) {
|
|
|
76
80
|
!item.active && React.createElement(TurnFooter, { messages: item.messages, last: item.last, reply: reply, session: session, latest: latest }),
|
|
77
81
|
menu));
|
|
78
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* What Ta said in a call, as a messenger shows it (CallTranscript): its face beside its words, what it did on the way
|
|
85
|
+
* folded above them. A turn the user cut short says nothing of it: they spoke, as one does on the phone; one that failed
|
|
86
|
+
* says so.
|
|
87
|
+
*/
|
|
88
|
+
function SpokenTurn({ item, tools, mood, status }) {
|
|
89
|
+
var _a;
|
|
90
|
+
const t = useT();
|
|
91
|
+
const session = React.useContext(ConversationSession);
|
|
92
|
+
const reply = item.reply.join('\n\n').trim();
|
|
93
|
+
const { errorMessage } = ((_a = item.last) !== null && _a !== void 0 ? _a : {});
|
|
94
|
+
const [menu, onContextMenu] = useMessageMenu({
|
|
95
|
+
kind: 'turn',
|
|
96
|
+
last: item.active ? undefined : item.last,
|
|
97
|
+
reply: item.active ? '' : reply,
|
|
98
|
+
session,
|
|
99
|
+
messages: item.messages,
|
|
100
|
+
});
|
|
101
|
+
return (React.createElement("div", { className: `ta-message ta-assistant ta-turn-spoken ${item.active ? 'ta-turn-live' : ''}`, onContextMenu: onContextMenu },
|
|
102
|
+
React.createElement(TurnAvatar, { mood: mood }),
|
|
103
|
+
React.createElement("div", { className: "ta-spoken-body" },
|
|
104
|
+
(item.steps.length > 0 || status) && (React.createElement(Process, { steps: item.steps, active: item.active, results: MessageUtil.results(item.messages), tools: tools, status: status })),
|
|
105
|
+
item.reply.map((text, index) => (React.createElement(Markdown, { key: index, text: text, streaming: item.active && index === item.reply.length - 1 }))),
|
|
106
|
+
!item.active && MessageUtil.stopReason(item.last) === 'error' && (React.createElement(Callout, { level: "error" }, (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.trim()) || t('ta.message.failedUnknown')))),
|
|
107
|
+
menu));
|
|
108
|
+
}
|
|
79
109
|
/** How long a turn that just ended without a reply waits before it says so: an agent that goes on by itself does within it. */
|
|
80
110
|
const HOLD_MS = 8000;
|
|
81
111
|
/**
|
|
@@ -170,9 +200,10 @@ function Message({ item }) {
|
|
|
170
200
|
* One item of the conversation. The store replaces only the message that changed, so an item draws
|
|
171
201
|
* again only when one of its messages did, or, while ta is at it, when a tool run did.
|
|
172
202
|
*/
|
|
173
|
-
const ThreadRow = React.memo(function ThreadRow({ item, tools, mood, status, latest, unsure, }) {
|
|
174
|
-
return item.kind === 'turn' ? React.createElement(Turn, { item: item, tools: tools, mood: mood, status: status, latest: latest, unsure: unsure }) : React.createElement(Message, { item: item });
|
|
203
|
+
const ThreadRow = React.memo(function ThreadRow({ item, tools, mood, status, latest, unsure, spoken, }) {
|
|
204
|
+
return item.kind === 'turn' ? (React.createElement(Turn, { item: item, tools: tools, mood: mood, status: status, latest: latest, unsure: unsure, spoken: spoken })) : (React.createElement(Message, { item: item }));
|
|
175
205
|
}, (previous, next) => previous.mood === next.mood &&
|
|
206
|
+
previous.spoken === next.spoken &&
|
|
176
207
|
previous.unsure === next.unsure &&
|
|
177
208
|
previous.status === next.status &&
|
|
178
209
|
previous.latest === next.latest &&
|
|
@@ -235,7 +266,14 @@ export function useThreadRows(items, rows) {
|
|
|
235
266
|
/** The conversation; tool results show with the calls they answer. `rows`: only its latest rows are drawn, more as asked. */
|
|
236
267
|
export function MessageList({ state, outbox, rows }) {
|
|
237
268
|
const renderers = React.useContext(MessageRenderers);
|
|
238
|
-
const
|
|
269
|
+
const session = React.useContext(ConversationSession);
|
|
270
|
+
const callGroup = React.useContext(CallGroup);
|
|
271
|
+
// A conversation a call was answered in shows as the record of the call.
|
|
272
|
+
const spoken = !!(session === null || session === void 0 ? void 0 : session.group) && session.group === callGroup;
|
|
273
|
+
const items = React.useMemo(() => {
|
|
274
|
+
const all = ProcessUtil.items(state.messages, state.working, state.start, renderers, state.head);
|
|
275
|
+
return spoken ? CallTranscript.items(all) : all;
|
|
276
|
+
}, [state.messages, state.working, state.start, renderers, state.head, spoken]);
|
|
239
277
|
const breaks = React.useMemo(() => ProcessUtil.timeBreaks(ProcessUtil.starts(items), index => ProcessUtil.shown(items[index], renderers)), [items, renderers]);
|
|
240
278
|
const models = React.useMemo(() => ProcessUtil.modelBreaks(items), [items]);
|
|
241
279
|
// A turn's cards know what the user said after it: a choice they asked for is made.
|
|
@@ -255,11 +293,13 @@ export function MessageList({ state, outbox, rows }) {
|
|
|
255
293
|
const status = state.working || state.compacting ? React.createElement(RunStatus, { state: state }) : undefined;
|
|
256
294
|
const onHead = status && quiet(last);
|
|
257
295
|
return (React.createElement(Outbox.Provider, { value: sent },
|
|
258
|
-
items.map((item, index) => index < shown.from ? null : (React.createElement("div", { key: item.key, "data-row": item.key, className: shown.className(index, item.kind === 'message' && item.message.role === 'user' && ASK_CLASS
|
|
296
|
+
items.map((item, index) => index < shown.from ? null : (React.createElement("div", { key: item.key, "data-row": item.key, className: shown.className(index, [spoken && 'ta-spoken', item.kind === 'message' && item.message.role === 'user' && ASK_CLASS]
|
|
297
|
+
.filter(Boolean)
|
|
298
|
+
.join(' ')) },
|
|
259
299
|
breaks[index] !== undefined && React.createElement(TimeBreak, { timestamp: breaks[index] }),
|
|
260
300
|
models[index] && React.createElement(ModelBreak, { model: models[index] }),
|
|
261
301
|
React.createElement(CodeAnswer.Provider, { value: answers[index] },
|
|
262
|
-
React.createElement(ThreadRow, { item: item, tools: state.tools, mood: item.kind === 'turn' && !(unsure && index === lastTurn) ? ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn, unsure: unsure && index === lastTurn }))))),
|
|
302
|
+
React.createElement(ThreadRow, { item: item, tools: state.tools, mood: item.kind === 'turn' && !(unsure && index === lastTurn) ? ProcessUtil.mood(item, index === lastTurn, waiting) : 'idle', status: onHead && item === last ? status : undefined, latest: index === lastTurn, unsure: unsure && index === lastTurn, spoken: spoken }))))),
|
|
263
303
|
status && !onHead && React.createElement("div", { className: `ta-run-line ${endsInSteps(last) ? 'ta-run-steps' : ''}` }, status)));
|
|
264
304
|
}
|
|
265
305
|
//# sourceMappingURL=message-list.js.map
|