@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,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallCameras = exports.CallCamera = exports.CallLook = void 0;
|
|
4
|
+
/** The longer side of a picture of the camera sent with what the user says, in pixels: enough to see a face and a thing held up. */
|
|
5
|
+
const SIDE = 448;
|
|
6
|
+
/** The side of the small grey picture a frame is compared by. */
|
|
7
|
+
const PRINT = 16;
|
|
8
|
+
/** Words that ask Ta to look: a picture goes with them however little has changed. */
|
|
9
|
+
const LOOK = /看|瞧|镜头|摄像头|画面|这个|这是|我手|我拿|穿|长什么样|見て|これ|カメラ|\b(?:look|see|watch|camera|this|holding|wearing)\b/i;
|
|
10
|
+
/** When a picture of the camera goes with what the user says (docs/design/ta-call.md 12). */
|
|
11
|
+
var CallLook;
|
|
12
|
+
(function (CallLook) {
|
|
13
|
+
/** How long after one picture another goes with a change, in ms; and with none, at the latest. */
|
|
14
|
+
CallLook.CHANGED_MS = 6000;
|
|
15
|
+
CallLook.STALE_MS = 90000;
|
|
16
|
+
/** How much a frame must differ from the one sent (the mean of grey levels, 0 to 255) to be a change. */
|
|
17
|
+
CallLook.CHANGE = 14;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to send the frame now with `text`: the first one, one the words ask to look at, one that changed since
|
|
20
|
+
* the last sent (not more often than CHANGED_MS), and one now and then; else the model has seen it already.
|
|
21
|
+
*/
|
|
22
|
+
function due(text, now, last, print) {
|
|
23
|
+
if (!last || LOOK.test(text) || now - last.at >= CallLook.STALE_MS) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
return now - last.at >= CallLook.CHANGED_MS && differ(last.print, print) >= CallLook.CHANGE;
|
|
27
|
+
}
|
|
28
|
+
CallLook.due = due;
|
|
29
|
+
/** The mean difference of two prints. */
|
|
30
|
+
function differ(a, b) {
|
|
31
|
+
var _a;
|
|
32
|
+
let sum = 0;
|
|
33
|
+
for (let i = 0; i < a.length; i++) {
|
|
34
|
+
sum += Math.abs(a[i] - ((_a = b[i]) !== null && _a !== void 0 ? _a : 0));
|
|
35
|
+
}
|
|
36
|
+
return a.length ? sum / a.length : 255;
|
|
37
|
+
}
|
|
38
|
+
CallLook.differ = differ;
|
|
39
|
+
})(CallLook || (exports.CallLook = CallLook = {}));
|
|
40
|
+
/**
|
|
41
|
+
* The user's camera in a video call: what they see of themselves (`stream`), and what Ta sees of them, a picture of
|
|
42
|
+
* now with what they say (`frame`). It begins off, asking for no camera until the user turns it on (start does
|
|
43
|
+
* nothing while off); turned off, it lets go of the camera.
|
|
44
|
+
*/
|
|
45
|
+
class CallCamera {
|
|
46
|
+
constructor() {
|
|
47
|
+
this.facing = 'user';
|
|
48
|
+
this.listeners = new Set();
|
|
49
|
+
/** Off until the user turns it on, or turned off again, or it could not open. */
|
|
50
|
+
this.off = true;
|
|
51
|
+
this.denied = false;
|
|
52
|
+
}
|
|
53
|
+
subscribe(listener) {
|
|
54
|
+
this.listeners.add(listener);
|
|
55
|
+
return () => this.listeners.delete(listener);
|
|
56
|
+
}
|
|
57
|
+
changed() {
|
|
58
|
+
for (const listener of [...this.listeners]) {
|
|
59
|
+
listener();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
start() {
|
|
63
|
+
var _a;
|
|
64
|
+
var _b;
|
|
65
|
+
if (this.stream || this.off || typeof navigator === 'undefined' || !((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia)) {
|
|
66
|
+
return Promise.resolve();
|
|
67
|
+
}
|
|
68
|
+
(_b = this.opening) !== null && _b !== void 0 ? _b : (this.opening = navigator.mediaDevices
|
|
69
|
+
.getUserMedia({ video: { facingMode: this.facing, width: { ideal: 640 }, height: { ideal: 640 } }, audio: false })
|
|
70
|
+
.then(stream => {
|
|
71
|
+
this.opening = undefined;
|
|
72
|
+
if (this.off) {
|
|
73
|
+
CallCamera.release(stream);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.stream = stream;
|
|
77
|
+
const video = document.createElement('video');
|
|
78
|
+
video.muted = true;
|
|
79
|
+
video.playsInline = true;
|
|
80
|
+
video.srcObject = stream;
|
|
81
|
+
void video.play().catch(() => undefined);
|
|
82
|
+
this.video = video;
|
|
83
|
+
this.changed();
|
|
84
|
+
}, () => {
|
|
85
|
+
this.opening = undefined;
|
|
86
|
+
this.denied = true;
|
|
87
|
+
this.off = true;
|
|
88
|
+
this.changed();
|
|
89
|
+
}));
|
|
90
|
+
return this.opening;
|
|
91
|
+
}
|
|
92
|
+
/** On or off, as the user taps. */
|
|
93
|
+
toggle() {
|
|
94
|
+
this.off = !this.off;
|
|
95
|
+
this.denied = false;
|
|
96
|
+
if (this.off) {
|
|
97
|
+
this.stop();
|
|
98
|
+
this.changed();
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
void this.start();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/** The other camera of a phone: the user's face, or what is in front of them. */
|
|
105
|
+
flip() {
|
|
106
|
+
this.facing = this.facing === 'user' ? 'environment' : 'user';
|
|
107
|
+
this.stop();
|
|
108
|
+
this.sent = undefined;
|
|
109
|
+
void this.start();
|
|
110
|
+
}
|
|
111
|
+
stop() {
|
|
112
|
+
if (this.stream) {
|
|
113
|
+
CallCamera.release(this.stream);
|
|
114
|
+
}
|
|
115
|
+
this.stream = undefined;
|
|
116
|
+
this.video = undefined;
|
|
117
|
+
}
|
|
118
|
+
/** A picture of now to go with `text`, when one is due (CallLook.due); undefined when off, not ready or not due. */
|
|
119
|
+
frame(text, now = Date.now()) {
|
|
120
|
+
var _a;
|
|
121
|
+
const video = this.video;
|
|
122
|
+
if (!video || this.off || !video.videoWidth) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const scale = SIDE / Math.max(video.videoWidth, video.videoHeight);
|
|
126
|
+
const canvas = document.createElement('canvas');
|
|
127
|
+
canvas.width = Math.round(video.videoWidth * Math.min(1, scale));
|
|
128
|
+
canvas.height = Math.round(video.videoHeight * Math.min(1, scale));
|
|
129
|
+
const context = canvas.getContext('2d');
|
|
130
|
+
if (!context) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
134
|
+
const print = CallCamera.print(canvas);
|
|
135
|
+
if (!CallLook.due(text, now, this.sent, print)) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
this.sent = { at: now, print };
|
|
139
|
+
const data = (_a = canvas.toDataURL('image/jpeg', 0.72).split(',')[1]) !== null && _a !== void 0 ? _a : '';
|
|
140
|
+
return data ? { type: 'image', data, mimeType: 'image/jpeg' } : undefined;
|
|
141
|
+
}
|
|
142
|
+
static print(canvas) {
|
|
143
|
+
const small = document.createElement('canvas');
|
|
144
|
+
small.width = PRINT;
|
|
145
|
+
small.height = PRINT;
|
|
146
|
+
const context = small.getContext('2d');
|
|
147
|
+
const out = new Uint8Array(PRINT * PRINT);
|
|
148
|
+
if (!context) {
|
|
149
|
+
return out;
|
|
150
|
+
}
|
|
151
|
+
context.drawImage(canvas, 0, 0, PRINT, PRINT);
|
|
152
|
+
const { data } = context.getImageData(0, 0, PRINT, PRINT);
|
|
153
|
+
for (let i = 0; i < out.length; i++) {
|
|
154
|
+
out[i] = (data[i * 4] * 3 + data[i * 4 + 1] * 6 + data[i * 4 + 2]) / 10;
|
|
155
|
+
}
|
|
156
|
+
return out;
|
|
157
|
+
}
|
|
158
|
+
static release(stream) {
|
|
159
|
+
for (const track of stream.getTracks()) {
|
|
160
|
+
track.stop();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.CallCamera = CallCamera;
|
|
165
|
+
/** The camera of each video call, as long as it goes on. */
|
|
166
|
+
var CallCameras;
|
|
167
|
+
(function (CallCameras) {
|
|
168
|
+
const cameras = new WeakMap();
|
|
169
|
+
function of(call) {
|
|
170
|
+
let camera = cameras.get(call);
|
|
171
|
+
if (!camera) {
|
|
172
|
+
camera = new CallCamera();
|
|
173
|
+
cameras.set(call, camera);
|
|
174
|
+
}
|
|
175
|
+
return camera;
|
|
176
|
+
}
|
|
177
|
+
CallCameras.of = of;
|
|
178
|
+
/** The picture to go with what the user said in `call`, when it is a video call with its camera on. */
|
|
179
|
+
function frame(call, text) {
|
|
180
|
+
var _a;
|
|
181
|
+
return call.state.video ? (_a = cameras.get(call)) === null || _a === void 0 ? void 0 : _a.frame(text) : undefined;
|
|
182
|
+
}
|
|
183
|
+
CallCameras.frame = frame;
|
|
184
|
+
/** The call ended: its camera lets go, and the next video call begins with it off. */
|
|
185
|
+
function end(call) {
|
|
186
|
+
var _a;
|
|
187
|
+
(_a = cameras.get(call)) === null || _a === void 0 ? void 0 : _a.stop();
|
|
188
|
+
cameras.delete(call);
|
|
189
|
+
}
|
|
190
|
+
CallCameras.end = end;
|
|
191
|
+
})(CallCameras || (exports.CallCameras = CallCameras = {}));
|
|
192
|
+
//# sourceMappingURL=call-camera.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { MessageId } from '../i18n/messages';
|
|
2
|
+
/** A person Ta can show as in a video call (faces/README.md): her files are in faces/<dir>. */
|
|
3
|
+
export interface CallPerson {
|
|
4
|
+
/** Its id, kept in the settings (`callPerson`); `''` for the first, whose files are at the top of faces/. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The key of what she is called, as the user picks her. */
|
|
7
|
+
title: MessageId;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The people of a video call (docs/design/ta-call.md 17): each a set of clips of her own, made the same way, the same
|
|
11
|
+
* moves and looks, so that what plays and how is the same for each; only the files differ (FaceFiles.of).
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace CallPeople {
|
|
14
|
+
const ALL: readonly CallPerson[];
|
|
15
|
+
/** The person of that id, or the first for one Ta does not have (any more). */
|
|
16
|
+
function of(id: string | undefined): CallPerson;
|
|
17
|
+
/** Her directory in faces/, with its slash: `''` for the first. */
|
|
18
|
+
function dir(id: string | undefined): string;
|
|
19
|
+
/** The round picture of her face, as she is picked (faces/<dir>face.jpg). */
|
|
20
|
+
function face(id: string): string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=call-people.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallPeople = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The people of a video call (docs/design/ta-call.md 17): each a set of clips of her own, made the same way, the same
|
|
6
|
+
* moves and looks, so that what plays and how is the same for each; only the files differ (FaceFiles.of).
|
|
7
|
+
*/
|
|
8
|
+
var CallPeople;
|
|
9
|
+
(function (CallPeople) {
|
|
10
|
+
CallPeople.ALL = [
|
|
11
|
+
{ id: '', title: 'ta.call.person.first' },
|
|
12
|
+
{ id: 'blonde', title: 'ta.call.person.blonde' },
|
|
13
|
+
];
|
|
14
|
+
/** The person of that id, or the first for one Ta does not have (any more). */
|
|
15
|
+
function of(id) {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = CallPeople.ALL.find(person => person.id === id)) !== null && _a !== void 0 ? _a : CallPeople.ALL[0];
|
|
18
|
+
}
|
|
19
|
+
CallPeople.of = of;
|
|
20
|
+
/** Her directory in faces/, with its slash: `''` for the first. */
|
|
21
|
+
function dir(id) {
|
|
22
|
+
const person = of(id);
|
|
23
|
+
return person.id ? `${person.id}/` : '';
|
|
24
|
+
}
|
|
25
|
+
CallPeople.dir = dir;
|
|
26
|
+
/** The round picture of her face, as she is picked (faces/<dir>face.jpg). */
|
|
27
|
+
function face(id) {
|
|
28
|
+
return `faces/${dir(id)}face.jpg`;
|
|
29
|
+
}
|
|
30
|
+
CallPeople.face = face;
|
|
31
|
+
})(CallPeople || (exports.CallPeople = CallPeople = {}));
|
|
32
|
+
//# sourceMappingURL=call-people.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The window of a video call on a computer (docs/design/ta-call.md 12), as a messenger's: Ta Desktop opens it blank and
|
|
3
|
+
* the page draws the call into it (a portal), so the call, its voice and its camera stay the page's. While it shows,
|
|
4
|
+
* the call goes on though the main window is hidden or minimized.
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace CallWindow {
|
|
7
|
+
/** Whether this page can open one: in Ta Desktop. */
|
|
8
|
+
function can(scope?: object): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Opens the window, styled as the page, its title `title`; `closed` when the user closes it. Undefined when it
|
|
11
|
+
* could not open (the page draws the call in itself).
|
|
12
|
+
*/
|
|
13
|
+
function open(title: string, closed: () => void): HTMLElement | undefined;
|
|
14
|
+
function close(): void;
|
|
15
|
+
/** The window shows now. */
|
|
16
|
+
function shows(): boolean;
|
|
17
|
+
/** The call cannot be seen nor heard to: the page hidden, and no window of a video call showing. */
|
|
18
|
+
function hidden(): boolean;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=call-window.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallWindow = void 0;
|
|
4
|
+
const style_1 = require("../style");
|
|
5
|
+
const desktop_1 = require("../util/desktop");
|
|
6
|
+
/** The name of the window of a video call, which Ta Desktop lets the page open (DesktopChannel.VIDEO_CALL_FRAME). */
|
|
7
|
+
const FRAME = 'ta-video-call';
|
|
8
|
+
/**
|
|
9
|
+
* The window of a video call on a computer (docs/design/ta-call.md 12), as a messenger's: Ta Desktop opens it blank and
|
|
10
|
+
* the page draws the call into it (a portal), so the call, its voice and its camera stay the page's. While it shows,
|
|
11
|
+
* the call goes on though the main window is hidden or minimized.
|
|
12
|
+
*/
|
|
13
|
+
var CallWindow;
|
|
14
|
+
(function (CallWindow) {
|
|
15
|
+
let current;
|
|
16
|
+
/** Whether this page can open one: in Ta Desktop. */
|
|
17
|
+
function can(scope = globalThis) {
|
|
18
|
+
return desktop_1.DesktopUtil.has('callWindow', scope);
|
|
19
|
+
}
|
|
20
|
+
CallWindow.can = can;
|
|
21
|
+
/**
|
|
22
|
+
* Opens the window, styled as the page, its title `title`; `closed` when the user closes it. Undefined when it
|
|
23
|
+
* could not open (the page draws the call in itself).
|
|
24
|
+
*/
|
|
25
|
+
function open(title, closed) {
|
|
26
|
+
const opened = window.open('about:blank', FRAME);
|
|
27
|
+
if (!opened) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
current = opened;
|
|
31
|
+
const doc = opened.document;
|
|
32
|
+
doc.title = title;
|
|
33
|
+
const style = doc.createElement('style');
|
|
34
|
+
style.textContent = style_1.STYLE;
|
|
35
|
+
doc.head.appendChild(style);
|
|
36
|
+
// As the page looks, and as it changes (the theme, the size of the text).
|
|
37
|
+
const root = document.documentElement;
|
|
38
|
+
const look = () => {
|
|
39
|
+
for (const [key, value] of Object.entries(root.dataset)) {
|
|
40
|
+
doc.documentElement.dataset[key] = value;
|
|
41
|
+
}
|
|
42
|
+
doc.documentElement.lang = root.lang;
|
|
43
|
+
doc.documentElement.style.cssText = root.style.cssText;
|
|
44
|
+
};
|
|
45
|
+
look();
|
|
46
|
+
const observer = new MutationObserver(look);
|
|
47
|
+
observer.observe(root, { attributes: true });
|
|
48
|
+
opened.addEventListener('pagehide', () => observer.disconnect());
|
|
49
|
+
doc.body.className = 'ta-video-window';
|
|
50
|
+
const host = doc.createElement('div');
|
|
51
|
+
host.className = 'ta-video-window-host';
|
|
52
|
+
doc.body.appendChild(host);
|
|
53
|
+
// The main page's checks of whether it shows (the call pauses when hidden) look again as this one shows or hides.
|
|
54
|
+
const shown = () => document.dispatchEvent(new Event('visibilitychange'));
|
|
55
|
+
doc.addEventListener('visibilitychange', shown);
|
|
56
|
+
opened.addEventListener('pagehide', () => {
|
|
57
|
+
if (current === opened) {
|
|
58
|
+
current = undefined;
|
|
59
|
+
shown();
|
|
60
|
+
closed();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return host;
|
|
64
|
+
}
|
|
65
|
+
CallWindow.open = open;
|
|
66
|
+
function close() {
|
|
67
|
+
const opened = current;
|
|
68
|
+
current = undefined;
|
|
69
|
+
opened === null || opened === void 0 ? void 0 : opened.close();
|
|
70
|
+
}
|
|
71
|
+
CallWindow.close = close;
|
|
72
|
+
/** The window shows now. */
|
|
73
|
+
function shows() {
|
|
74
|
+
return !!current && !current.closed && current.document.visibilityState === 'visible';
|
|
75
|
+
}
|
|
76
|
+
CallWindow.shows = shows;
|
|
77
|
+
/** The call cannot be seen nor heard to: the page hidden, and no window of a video call showing. */
|
|
78
|
+
function hidden() {
|
|
79
|
+
return typeof document !== 'undefined' && document.visibilityState === 'hidden' && !shows();
|
|
80
|
+
}
|
|
81
|
+
CallWindow.hidden = hidden;
|
|
82
|
+
})(CallWindow || (exports.CallWindow = CallWindow = {}));
|
|
83
|
+
//# sourceMappingURL=call-window.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** The frame rate of the clips of the person (faces/*.mp4). */
|
|
2
|
+
export declare const CLIP_FPS = 24;
|
|
3
|
+
/** A clip as it plays in a reading, from `from` seconds of it. */
|
|
4
|
+
interface Segment {
|
|
5
|
+
clip: string;
|
|
6
|
+
from: number;
|
|
7
|
+
frames: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Which clip of the person shows at each moment of what Ta reads, chosen ahead as its sound comes (docs/design/ta-call.md
|
|
11
|
+
* 12): the mouth of each frame is drawn from the sound of that moment for that frame of that clip, so the clips must be
|
|
12
|
+
* known before they play. A clip plays whole, then the next is picked for the moment it begins (the look of the sentence
|
|
13
|
+
* heard then, or another gesture); all begin and end on the same frame, so that one follows another without a seam. A
|
|
14
|
+
* clip of speaking gives way where a move is cued (a sentence that names one begins: she makes it as she says it).
|
|
15
|
+
*/
|
|
16
|
+
export declare class ClipPlan {
|
|
17
|
+
/** The frames of a clip. */
|
|
18
|
+
protected readonly frames: (clip: string) => number;
|
|
19
|
+
/** The clip that begins at that second of the reading, after `last`. */
|
|
20
|
+
protected readonly pick: (seconds: number, last: string | undefined) => string;
|
|
21
|
+
/** A move begins at that second: a clip of speaking playing then stops there for it. */
|
|
22
|
+
protected readonly cue: (seconds: number) => boolean;
|
|
23
|
+
/** The clip is a move or a look of its own, which plays whole whatever is cued. */
|
|
24
|
+
protected readonly whole: (clip: string) => boolean;
|
|
25
|
+
protected readonly segments: Segment[];
|
|
26
|
+
constructor(
|
|
27
|
+
/** The frames of a clip. */
|
|
28
|
+
frames: (clip: string) => number,
|
|
29
|
+
/** The clip that begins at that second of the reading, after `last`. */
|
|
30
|
+
pick: (seconds: number, last: string | undefined) => string,
|
|
31
|
+
/** A move begins at that second: a clip of speaking playing then stops there for it. */
|
|
32
|
+
cue?: (seconds: number) => boolean,
|
|
33
|
+
/** The clip is a move or a look of its own, which plays whole whatever is cued. */
|
|
34
|
+
whole?: (clip: string) => boolean);
|
|
35
|
+
/** The clip and its frame at that second of the reading. */
|
|
36
|
+
at(seconds: number): {
|
|
37
|
+
clip: string;
|
|
38
|
+
frame: number;
|
|
39
|
+
};
|
|
40
|
+
/** Picks the clips up to that second, once each. */
|
|
41
|
+
protected cover(seconds: number): void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Keeps the clip on the clock of the sound, as players keep a video on its sound: a little apart, it plays a little
|
|
45
|
+
* faster or slower until they meet (each frame of it then has the mouth drawn for it, or the next one); far apart, it
|
|
46
|
+
* goes there at once.
|
|
47
|
+
*/
|
|
48
|
+
export declare namespace ClipSync {
|
|
49
|
+
/** Apart by more than this, in seconds, the clip goes where the sound is. */
|
|
50
|
+
const SEEK_S = 0.3;
|
|
51
|
+
function step(want: number, now: number): {
|
|
52
|
+
seek?: number;
|
|
53
|
+
rate: number;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=clip-plan.d.ts.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClipSync = exports.ClipPlan = exports.CLIP_FPS = void 0;
|
|
4
|
+
/** The frame rate of the clips of the person (faces/*.mp4). */
|
|
5
|
+
exports.CLIP_FPS = 24;
|
|
6
|
+
/**
|
|
7
|
+
* Which clip of the person shows at each moment of what Ta reads, chosen ahead as its sound comes (docs/design/ta-call.md
|
|
8
|
+
* 12): the mouth of each frame is drawn from the sound of that moment for that frame of that clip, so the clips must be
|
|
9
|
+
* known before they play. A clip plays whole, then the next is picked for the moment it begins (the look of the sentence
|
|
10
|
+
* heard then, or another gesture); all begin and end on the same frame, so that one follows another without a seam. A
|
|
11
|
+
* clip of speaking gives way where a move is cued (a sentence that names one begins: she makes it as she says it).
|
|
12
|
+
*/
|
|
13
|
+
class ClipPlan {
|
|
14
|
+
constructor(
|
|
15
|
+
/** The frames of a clip. */
|
|
16
|
+
frames,
|
|
17
|
+
/** The clip that begins at that second of the reading, after `last`. */
|
|
18
|
+
pick,
|
|
19
|
+
/** A move begins at that second: a clip of speaking playing then stops there for it. */
|
|
20
|
+
cue = () => false,
|
|
21
|
+
/** The clip is a move or a look of its own, which plays whole whatever is cued. */
|
|
22
|
+
whole = () => false) {
|
|
23
|
+
this.frames = frames;
|
|
24
|
+
this.pick = pick;
|
|
25
|
+
this.cue = cue;
|
|
26
|
+
this.whole = whole;
|
|
27
|
+
this.segments = [];
|
|
28
|
+
}
|
|
29
|
+
/** The clip and its frame at that second of the reading. */
|
|
30
|
+
at(seconds) {
|
|
31
|
+
const time = Math.max(0, seconds);
|
|
32
|
+
this.cover(time);
|
|
33
|
+
let segment = this.segments[this.segments.length - 1];
|
|
34
|
+
for (let i = this.segments.length - 1; i >= 0 && this.segments[i].from > time; i--) {
|
|
35
|
+
segment = this.segments[Math.max(0, i - 1)];
|
|
36
|
+
}
|
|
37
|
+
return { clip: segment.clip, frame: Math.min(segment.frames - 1, Math.floor((time - segment.from) * exports.CLIP_FPS)) };
|
|
38
|
+
}
|
|
39
|
+
/** Picks the clips up to that second, once each. */
|
|
40
|
+
cover(seconds) {
|
|
41
|
+
let last = this.segments[this.segments.length - 1];
|
|
42
|
+
while (!last || last.from + last.frames / exports.CLIP_FPS <= seconds) {
|
|
43
|
+
const from = last ? last.from + last.frames / exports.CLIP_FPS : 0;
|
|
44
|
+
const clip = this.pick(from, last === null || last === void 0 ? void 0 : last.clip);
|
|
45
|
+
let frames = Math.max(1, this.frames(clip));
|
|
46
|
+
if (!this.whole(clip)) {
|
|
47
|
+
for (let frame = 1; frame < frames; frame++) {
|
|
48
|
+
if (this.cue(from + frame / exports.CLIP_FPS)) {
|
|
49
|
+
frames = frame;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
last = { clip, from, frames };
|
|
55
|
+
this.segments.push(last);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.ClipPlan = ClipPlan;
|
|
60
|
+
/**
|
|
61
|
+
* Keeps the clip on the clock of the sound, as players keep a video on its sound: a little apart, it plays a little
|
|
62
|
+
* faster or slower until they meet (each frame of it then has the mouth drawn for it, or the next one); far apart, it
|
|
63
|
+
* goes there at once.
|
|
64
|
+
*/
|
|
65
|
+
var ClipSync;
|
|
66
|
+
(function (ClipSync) {
|
|
67
|
+
/** Apart by more than this, in seconds, the clip goes where the sound is. */
|
|
68
|
+
ClipSync.SEEK_S = 0.3;
|
|
69
|
+
/** How much faster it plays, a second it is behind. */
|
|
70
|
+
const CATCH_UP = 3;
|
|
71
|
+
function step(want, now) {
|
|
72
|
+
const behind = want - now;
|
|
73
|
+
if (Math.abs(behind) > ClipSync.SEEK_S) {
|
|
74
|
+
return { seek: want, rate: 1 };
|
|
75
|
+
}
|
|
76
|
+
return { rate: Math.min(1.25, Math.max(0.8, 1 + behind * CATCH_UP)) };
|
|
77
|
+
}
|
|
78
|
+
ClipSync.step = step;
|
|
79
|
+
})(ClipSync || (exports.ClipSync = ClipSync = {}));
|
|
80
|
+
//# sourceMappingURL=clip-plan.js.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { FaceFiles } from './face-files';
|
|
2
|
+
/** A rectangle of a clip's frame, in its pixels. */
|
|
3
|
+
export interface FrameRect {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
w: number;
|
|
7
|
+
h: number;
|
|
8
|
+
}
|
|
9
|
+
/** How a clip she stands up in is framed (faces/framing.json): it keeps more above her than the others. */
|
|
10
|
+
export interface ClipFraming {
|
|
11
|
+
/** Where the picture of the other clips (her seated) is in this clip's frame. */
|
|
12
|
+
rest: FrameRect;
|
|
13
|
+
/** The box of her body (x1, y1, x2, y2) `fps` times a second, the first as she sits. */
|
|
14
|
+
body: readonly (readonly number[])[];
|
|
15
|
+
fps: number;
|
|
16
|
+
/** The second she begins to sit down again: interrupted before it, she goes there and on, fast (VideoFace). */
|
|
17
|
+
back?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Where a clip of `width` × `height` pixels goes in a view: scaled by `scale`, its top left corner at `left`, `top`. */
|
|
20
|
+
export interface Placement {
|
|
21
|
+
scale: number;
|
|
22
|
+
left: number;
|
|
23
|
+
top: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The camera on the person of a video call (docs/design/ta-call.md 12): which part of a clip's frame the view shows. As
|
|
27
|
+
* she sits (and speaks) it is the close-up the view always had, the frame filling it with her face a third from the top;
|
|
28
|
+
* as she stands up and moves (a dance, a stretch), it draws back to keep her head, her arms and her body in the view,
|
|
29
|
+
* by the box of her body in each moment of the clip, then comes back as she sits again, her head kept under what the
|
|
30
|
+
* view lays over its top (the title). A view the shape of none of the frames shows the rest of the frame on a blurred
|
|
31
|
+
* room (the bars), never her cut off.
|
|
32
|
+
*/
|
|
33
|
+
export declare namespace FaceCamera {
|
|
34
|
+
/** Room kept above her head, of the frame's height. */
|
|
35
|
+
const HEADROOM = 0.03;
|
|
36
|
+
/** How far her head rises above where it is as she sits before the camera has drawn back all the way, of the frame's height. */
|
|
37
|
+
const RISE = 0.1;
|
|
38
|
+
/** The close-up of `rest` in a view of `aspect` (width / height): it fills the view, cut at the sides or below. */
|
|
39
|
+
function close(aspect: number, rest: FrameRect): FrameRect;
|
|
40
|
+
/** The box of her body at `seconds` into the clip, between the two samples around it. */
|
|
41
|
+
function body(framing: ClipFraming, seconds: number): readonly number[];
|
|
42
|
+
/**
|
|
43
|
+
* What the camera shows of a frame of `size` at `seconds` into its clip, in a view of `aspect`: the close-up, or for a
|
|
44
|
+
* clip with a framing, as much more as her body takes, the more the higher she rose from her seat, her head under the
|
|
45
|
+
* share `clear` of the view's height at its top.
|
|
46
|
+
*/
|
|
47
|
+
function aim(aspect: number, size: {
|
|
48
|
+
w: number;
|
|
49
|
+
h: number;
|
|
50
|
+
}, framing: ClipFraming | undefined, seconds: number, clear?: number): FrameRect;
|
|
51
|
+
/** Where `camera` puts its clip in a view `width` wide. */
|
|
52
|
+
function place(camera: FrameRect, width: number): Placement;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The camera moving to where it aims, as one who films does: it eases there (a time constant of `tau` seconds), and
|
|
56
|
+
* jumps only when what it films is another clip, frame or view, where nothing was shown before to move from.
|
|
57
|
+
*/
|
|
58
|
+
export declare class CameraMotion {
|
|
59
|
+
protected readonly tau: number;
|
|
60
|
+
protected key?: string;
|
|
61
|
+
protected now?: FrameRect;
|
|
62
|
+
constructor(tau?: number);
|
|
63
|
+
/** The camera `seconds` after the last step, aiming at `aim` in what `key` names (the clip, its size and the view). */
|
|
64
|
+
follow(key: string, aim: FrameRect, seconds: number): FrameRect;
|
|
65
|
+
/** Where it is now, if it filmed anything yet. */
|
|
66
|
+
current(): FrameRect | undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The cameras of the two layers of video (FaceCamera): each frame, each layer is placed as its camera aims at the
|
|
70
|
+
* moment of its clip, the camera easing there (CameraMotion). The layers keep the size of their clip's frame and are
|
|
71
|
+
* only moved and scaled (a transform), so that nothing is laid out again as they move.
|
|
72
|
+
*/
|
|
73
|
+
export declare class FaceCameras {
|
|
74
|
+
protected readonly faces: FaceFiles;
|
|
75
|
+
protected readonly videos: HTMLVideoElement[];
|
|
76
|
+
/** How much of the top of the view, in pixels, has something laid over it (the title of the call). */
|
|
77
|
+
protected readonly clear: () => number;
|
|
78
|
+
protected readonly motions: CameraMotion[];
|
|
79
|
+
protected readonly placed: (string | undefined)[];
|
|
80
|
+
protected width: number;
|
|
81
|
+
protected height: number;
|
|
82
|
+
protected last?: number;
|
|
83
|
+
protected readonly observer?: ResizeObserver;
|
|
84
|
+
constructor(faces: FaceFiles, videos: HTMLVideoElement[], box: HTMLElement | null,
|
|
85
|
+
/** How much of the top of the view, in pixels, has something laid over it (the title of the call). */
|
|
86
|
+
clear?: () => number);
|
|
87
|
+
protected measure(box: HTMLElement): void;
|
|
88
|
+
/** A frame at `time` (ms): each layer that plays a clip, named in `names`, placed where its camera is. */
|
|
89
|
+
frame(time: number, names: readonly (string | undefined)[]): void;
|
|
90
|
+
/** Where the clip of `video` goes in a view `width` wide (a canvas over it, in its pixels); undefined before it is placed. */
|
|
91
|
+
place(video: HTMLVideoElement, width: number): Placement | undefined;
|
|
92
|
+
close(): void;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=face-camera.d.ts.map
|