@celljs/ta-web 4.28.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-thread.js +15 -2
- package/esm/browser/assistant/call-scenes.d.ts +5 -4
- package/esm/browser/assistant/call-scenes.js +10 -7
- 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/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/host-view.d.ts +1 -1
- package/esm/browser/components/markdown.d.ts +6 -1
- package/esm/browser/components/markdown.js +6 -2
- 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/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 +14 -9
- package/esm/browser/components/settings-view.js +2 -6
- 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 +45 -0
- package/esm/browser/extension/web-api-components.d.ts +4 -0
- package/esm/browser/extension/web-api-contributions.d.ts +13 -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-extension-api.d.ts +7 -9
- 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 +3 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +8 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +3 -2
- package/esm/browser/extension/web-extension-run.js +8 -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 +1136 -1136
- package/esm/browser/i18n/messages-ja.js +20 -1586
- package/esm/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/esm/browser/i18n/messages-zh-tw.js +20 -1587
- package/esm/browser/i18n/messages.d.ts +1139 -1136
- package/esm/browser/i18n/messages.js +44 -3183
- 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/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/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +3 -0
- 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 +5 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +0 -7
- package/esm/browser/style/video-call.d.ts +1 -1
- package/esm/browser/style/video-call.js +15 -4
- package/esm/browser/util/call-transcript.d.ts +16 -0
- package/esm/browser/util/call-transcript.js +110 -0
- package/esm/browser/util/process.d.ts +6 -0
- package/esm/browser/util/process.js +18 -5
- 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/clip-plan.d.ts +11 -2
- package/esm/browser/video-call/clip-plan.js +19 -3
- 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 +43 -5
- package/esm/browser/video-call/face-files.js +73 -18
- 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.js +44 -4
- package/esm/browser/video-call/video-face.d.ts +11 -5
- package/esm/browser/video-call/video-face.js +302 -328
- package/esm/browser/workbench.d.ts +8 -0
- package/esm/browser/workbench.js +37 -1
- package/lib/browser/assistant/assistant-thread.js +15 -2
- package/lib/browser/assistant/call-scenes.d.ts +5 -4
- package/lib/browser/assistant/call-scenes.js +10 -7
- 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/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/host-view.d.ts +1 -1
- package/lib/browser/components/markdown.d.ts +6 -1
- package/lib/browser/components/markdown.js +6 -2
- 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/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 +13 -8
- package/lib/browser/components/settings-view.js +2 -6
- 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 +45 -0
- package/lib/browser/extension/web-api-components.d.ts +4 -0
- package/lib/browser/extension/web-api-contributions.d.ts +13 -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-extension-api.d.ts +7 -9
- 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 +3 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +8 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +3 -2
- package/lib/browser/extension/web-extension-run.js +8 -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 +1136 -1136
- package/lib/browser/i18n/messages-ja.js +20 -1586
- package/lib/browser/i18n/messages-zh-tw.d.ts +0 -1
- package/lib/browser/i18n/messages-zh-tw.js +20 -1587
- package/lib/browser/i18n/messages.d.ts +1139 -1136
- package/lib/browser/i18n/messages.js +44 -3183
- 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/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/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +3 -0
- 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 +5 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +0 -7
- package/lib/browser/style/video-call.d.ts +1 -1
- package/lib/browser/style/video-call.js +15 -4
- package/lib/browser/util/call-transcript.d.ts +17 -0
- package/lib/browser/util/call-transcript.js +113 -0
- package/lib/browser/util/process.d.ts +6 -0
- package/lib/browser/util/process.js +17 -4
- 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/clip-plan.d.ts +11 -2
- package/lib/browser/video-call/clip-plan.js +19 -3
- 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 +43 -5
- package/lib/browser/video-call/face-files.js +73 -18
- 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.js +44 -4
- package/lib/browser/video-call/video-face.d.ts +11 -5
- package/lib/browser/video-call/video-face.js +302 -328
- package/lib/browser/workbench.d.ts +8 -0
- package/lib/browser/workbench.js +36 -0
- package/package.json +7 -7
- package/public/faces/README.md +17 -4
- 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/dance.mp4 +0 -0
- package/public/faces/face.jpg +0 -0
- package/public/faces/framing.json +1 -0
- package/public/faces/lips.json +1 -1
- package/public/faces/stretch.mp4 +0 -0
- package/esm/browser/video-call/face-clips.d.ts +0 -33
- package/esm/browser/video-call/face-clips.js +0 -93
- package/lib/browser/video-call/face-clips.d.ts +0 -34
- package/lib/browser/video-call/face-clips.js +0 -96
|
@@ -19,11 +19,14 @@ body.ta-video-window { margin: 0; overflow: hidden; background: #15171c; }
|
|
|
19
19
|
.ta-video-person { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
|
|
20
20
|
.ta-video-person::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); pointer-events: none; }
|
|
21
21
|
.ta-video-mini .ta-video-person::after { height: 35%; }
|
|
22
|
-
.ta-video-clips { position: absolute; inset: 0; opacity: 0; transition: opacity 400ms var(--ta-ease); }
|
|
22
|
+
.ta-video-clips { position: absolute; inset: 0; isolation: isolate; opacity: 0; transition: opacity 400ms var(--ta-ease); }
|
|
23
23
|
.ta-video-person.ta-ready .ta-video-clips { opacity: 1; }
|
|
24
|
-
|
|
25
|
-
.ta-video-
|
|
26
|
-
|
|
24
|
+
/* The room behind her, blurred, where the camera drew back past the frame of a clip (FaceCamera). */
|
|
25
|
+
.ta-video-backdrop { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(22px) brightness(0.8); pointer-events: none; }
|
|
26
|
+
/* Placed by its camera once its clip plays (FaceCameras: its frame's size, moved and scaled); until then, the close-up. */
|
|
27
|
+
/* Which layer shows, and how much, is FaceStage's (opacity, z-index): the one coming in over the one in front. */
|
|
28
|
+
.ta-video-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: 0; pointer-events: none; }
|
|
29
|
+
.ta-video-mouth { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; transition: opacity 150ms linear; pointer-events: none; }
|
|
27
30
|
.ta-video-tap { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
|
|
28
31
|
.ta-video-dino { width: 58%; max-width: 280px; aspect-ratio: 1; }
|
|
29
32
|
.ta-video-failed { position: absolute; top: 58%; font-size: calc(13px * var(--ta-font-scale)); opacity: 0.7; }
|
|
@@ -49,6 +52,14 @@ body.ta-video-window { margin: 0; overflow: hidden; background: #15171c; }
|
|
|
49
52
|
.ta-video-controls { position: absolute; z-index: 1; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 32px); display: flex; align-items: center; justify-content: center; gap: 36px; }
|
|
50
53
|
.ta-video-panel .ta-video-controls, .ta-video-window .ta-video-controls { gap: 28px; bottom: 24px; }
|
|
51
54
|
.ta-video-panel .ta-video-caption, .ta-video-window .ta-video-caption { bottom: 112px; font-size: calc(15px * var(--ta-font-scale)); }
|
|
55
|
+
/* Who Ta shows as (PeoplePicker): round faces on the right, above the captions; the one shown ringed. */
|
|
56
|
+
.ta-video-people { margin: 0; padding: 0; border: 0; min-width: 0; position: absolute; z-index: 1; right: 14px; bottom: calc(env(safe-area-inset-bottom, 0px) + 184px); display: flex; flex-direction: column; gap: 12px; }
|
|
57
|
+
.ta-video-panel .ta-video-people, .ta-video-window .ta-video-people { bottom: 168px; }
|
|
58
|
+
.ta-video-person-pick { width: 46px; height: 46px; padding: 0; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 50%; overflow: hidden; background: rgba(0, 0, 0, 0.2); cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: border-color 160ms, transform 120ms, opacity 160ms; opacity: 0.82; }
|
|
59
|
+
.ta-video-person-pick img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
|
|
60
|
+
.ta-video-person-pick.ta-on { border-color: #f3dfb4; opacity: 1; }
|
|
61
|
+
.ta-video-person-pick:active { transform: scale(0.94); }
|
|
62
|
+
.ta-video-window .ta-video-person-pick { app-region: no-drag; -webkit-app-region: no-drag; }
|
|
52
63
|
.ta-video-mini-phase { position: absolute; z-index: 1; left: 50%; bottom: 6px; transform: translateX(-50%); max-width: calc(100% - 12px); padding: 2px 8px; border-radius: 999px; font-size: calc(11px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0, 0, 0, 0.4); }
|
|
53
64
|
@media (prefers-reduced-motion: reduce) { .ta-video-call { animation: none; } }
|
|
54
65
|
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ThreadItem, TurnItem } from './process';
|
|
2
|
+
/**
|
|
3
|
+
* A conversation a call was answered in as the record of the call (docs/design/ta-call.md 14): what the user and Ta
|
|
4
|
+
* said to each other, as a messenger keeps it. Its messages are the model's: what the user had not done saying
|
|
5
|
+
* (answered at once, dropped as they went on), turns cut short as they spoke, news of the work and Ta's choice to say
|
|
6
|
+
* nothing of it, thoughts. None of those is the call; this keeps what was said, and what Ta did on the way.
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace CallTranscript {
|
|
9
|
+
/** The items of the conversation, as the record of the call shows them. */
|
|
10
|
+
function items(items: readonly ThreadItem[]): ThreadItem[];
|
|
11
|
+
/**
|
|
12
|
+
* A turn as the record shows it: without thoughts and Ta's choice to say nothing; undefined when nothing is left
|
|
13
|
+
* of it (cut short as the user spoke, or quiet), unless it failed or goes on.
|
|
14
|
+
*/
|
|
15
|
+
function spoken(turn: TurnItem): TurnItem | undefined;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=call-transcript.d.ts.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CallTranscript = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
|
+
const message_1 = require("./message");
|
|
6
|
+
/** Said again this soon, what the user said replaces what they said before it, whatever the words (heard better). */
|
|
7
|
+
const AGAIN_MS = 3000;
|
|
8
|
+
/** Said again this long after, what begins with the words before replaces them (the user went on). */
|
|
9
|
+
const ON_MS = 30000;
|
|
10
|
+
/** What a call of before put in front of what the user said, for the model alone; now in the context. */
|
|
11
|
+
const OLD_MARK = /^\[(?:more|sent)\] /;
|
|
12
|
+
/**
|
|
13
|
+
* A conversation a call was answered in as the record of the call (docs/design/ta-call.md 14): what the user and Ta
|
|
14
|
+
* said to each other, as a messenger keeps it. Its messages are the model's: what the user had not done saying
|
|
15
|
+
* (answered at once, dropped as they went on), turns cut short as they spoke, news of the work and Ta's choice to say
|
|
16
|
+
* nothing of it, thoughts. None of those is the call; this keeps what was said, and what Ta did on the way.
|
|
17
|
+
*/
|
|
18
|
+
var CallTranscript;
|
|
19
|
+
(function (CallTranscript) {
|
|
20
|
+
const cleaned = new WeakMap();
|
|
21
|
+
/** The items of the conversation, as the record of the call shows them. */
|
|
22
|
+
function items(items) {
|
|
23
|
+
const shown = [];
|
|
24
|
+
items.forEach((item, index) => {
|
|
25
|
+
if (item.kind === 'turn') {
|
|
26
|
+
const turn = spoken(item);
|
|
27
|
+
if (turn) {
|
|
28
|
+
shown.push(turn);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (!said(item)) {
|
|
33
|
+
if (!notice(item)) {
|
|
34
|
+
shown.push(item);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const next = items[index + 1];
|
|
39
|
+
const answered = (next === null || next === void 0 ? void 0 : next.kind) === 'turn' && spoken(next) !== undefined;
|
|
40
|
+
if (!answered && replaced(items, index)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
shown.push(clean(item));
|
|
44
|
+
});
|
|
45
|
+
return shown;
|
|
46
|
+
}
|
|
47
|
+
CallTranscript.items = items;
|
|
48
|
+
/**
|
|
49
|
+
* A turn as the record shows it: without thoughts and Ta's choice to say nothing; undefined when nothing is left
|
|
50
|
+
* of it (cut short as the user spoke, or quiet), unless it failed or goes on.
|
|
51
|
+
*/
|
|
52
|
+
function spoken(turn) {
|
|
53
|
+
const steps = turn.steps.filter(step => step.kind !== 'thinking');
|
|
54
|
+
const reply = turn.reply.filter(text => text.trim() && text.trim() !== ta_protocol_1.TA_CALL_QUIET);
|
|
55
|
+
if (!turn.active && !steps.length && !reply.length && message_1.MessageUtil.stopReason(turn.last) !== 'error') {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
return steps.length === turn.steps.length && reply.length === turn.reply.length ? turn : { ...turn, steps, reply };
|
|
59
|
+
}
|
|
60
|
+
CallTranscript.spoken = spoken;
|
|
61
|
+
/** Whether what the user said at `index` was said again soon after: what they said next replaces it. */
|
|
62
|
+
function replaced(items, index) {
|
|
63
|
+
const item = items[index];
|
|
64
|
+
for (let next = index + 1; next < items.length; next++) {
|
|
65
|
+
const later = items[next];
|
|
66
|
+
if (later.kind !== 'message' || !said(later)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const apart = time(later) - time(item);
|
|
70
|
+
return apart <= AGAIN_MS || (apart <= ON_MS && words(later).startsWith(words(item)));
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
/** What the user said in the call: a message of theirs, not news of the work. */
|
|
75
|
+
function said(item) {
|
|
76
|
+
return item.message.role === 'user' && !notice(item);
|
|
77
|
+
}
|
|
78
|
+
function notice(item) {
|
|
79
|
+
return ta_protocol_1.TaSaid.notice(item.message);
|
|
80
|
+
}
|
|
81
|
+
function time(item) {
|
|
82
|
+
var _a;
|
|
83
|
+
return (_a = item.message.timestamp) !== null && _a !== void 0 ? _a : 0;
|
|
84
|
+
}
|
|
85
|
+
/** The words of what the user said, without marks, stops and spaces: what is heard again as the user goes on. */
|
|
86
|
+
function words(item) {
|
|
87
|
+
return ta_protocol_1.TaSaid.of(item.message)
|
|
88
|
+
.replace(OLD_MARK, '')
|
|
89
|
+
.replace(/[\p{P}\p{S}\s]/gu, '')
|
|
90
|
+
.toLowerCase();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* What the user said as they said it: without the context for the model (where it came from: the call, every one
|
|
94
|
+
* of them) and the mark a call of before put in front of the words.
|
|
95
|
+
*/
|
|
96
|
+
function clean(item) {
|
|
97
|
+
const { message } = item;
|
|
98
|
+
let kept = cleaned.get(message);
|
|
99
|
+
if (!kept) {
|
|
100
|
+
const content = message.content;
|
|
101
|
+
const strip = (text) => ta_protocol_1.TaMessageContext.strip(text).replace(OLD_MARK, '');
|
|
102
|
+
kept = {
|
|
103
|
+
...message,
|
|
104
|
+
content: typeof content === 'string'
|
|
105
|
+
? strip(content)
|
|
106
|
+
: content.map(part => part.type === 'text' && typeof part.text === 'string' ? { ...part, text: strip(part.text) } : part),
|
|
107
|
+
};
|
|
108
|
+
cleaned.set(message, kept);
|
|
109
|
+
}
|
|
110
|
+
return { ...item, message: kept };
|
|
111
|
+
}
|
|
112
|
+
})(CallTranscript || (exports.CallTranscript = CallTranscript = {}));
|
|
113
|
+
//# sourceMappingURL=call-transcript.js.map
|
|
@@ -16,6 +16,12 @@ export type ProcessStep = {
|
|
|
16
16
|
kind: 'summary';
|
|
17
17
|
key: string;
|
|
18
18
|
text: string;
|
|
19
|
+
}
|
|
20
|
+
/** What it wrote of the pictures attached, for Ta to keep (TaPictureNote): folded among the steps, never words of the reply. */
|
|
21
|
+
| {
|
|
22
|
+
kind: 'pictures';
|
|
23
|
+
key: string;
|
|
24
|
+
told: [number, string][];
|
|
19
25
|
} | {
|
|
20
26
|
kind: 'tool';
|
|
21
27
|
key: string;
|
|
@@ -144,7 +144,17 @@ var ProcessUtil;
|
|
|
144
144
|
}
|
|
145
145
|
else if (block.type === 'text' && ((_b = block.text) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
146
146
|
const summary = ta_protocol_1.TaAgentSummary.read(block.text);
|
|
147
|
-
|
|
147
|
+
if (summary !== undefined) {
|
|
148
|
+
steps.push({ kind: 'summary', key, text: summary });
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
const { said, told } = ta_protocol_1.TaPictureNote.take(block.text);
|
|
152
|
+
if (told.size) {
|
|
153
|
+
steps.push({ kind: 'pictures', key: `${key}.p`, told: [...told] });
|
|
154
|
+
}
|
|
155
|
+
if (said.trim()) {
|
|
156
|
+
steps.push({ kind: 'text', key, text: said });
|
|
157
|
+
}
|
|
148
158
|
}
|
|
149
159
|
else if (block.type === 'toolCall') {
|
|
150
160
|
steps.push({ kind: 'tool', key: block.id || key, call: block });
|
|
@@ -152,15 +162,18 @@ var ProcessUtil;
|
|
|
152
162
|
});
|
|
153
163
|
});
|
|
154
164
|
let end = steps.length;
|
|
155
|
-
while (end > 0 && steps[end - 1].kind === 'text') {
|
|
165
|
+
while (end > 0 && (steps[end - 1].kind === 'text' || steps[end - 1].kind === 'pictures')) {
|
|
156
166
|
end--;
|
|
157
167
|
}
|
|
158
168
|
// While ta works after steps, what it says is one more step: a tool may follow it. The reply is what it ends with.
|
|
159
169
|
if (active && end > 0) {
|
|
160
170
|
end = steps.length;
|
|
161
171
|
}
|
|
162
|
-
const
|
|
163
|
-
|
|
172
|
+
const tail = steps.slice(end);
|
|
173
|
+
// What it wrote of the pictures after its last tool stays a step: the reply is its words.
|
|
174
|
+
const reply = tail.flatMap(step => (step.kind === 'text' ? [step.text] : []));
|
|
175
|
+
const kept = [...steps.slice(0, end), ...tail.filter(step => step.kind === 'pictures')];
|
|
176
|
+
return { kind: 'turn', key: `t${start}`, messages, steps: kept, reply, last, active };
|
|
164
177
|
}
|
|
165
178
|
/**
|
|
166
179
|
* Words on the way with a fenced block a web extension draws (WebExtensionAPI.registerCodeRenderer,
|
|
@@ -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
|
|
@@ -10,19 +10,28 @@ interface Segment {
|
|
|
10
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
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
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.
|
|
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).
|
|
14
15
|
*/
|
|
15
16
|
export declare class ClipPlan {
|
|
16
17
|
/** The frames of a clip. */
|
|
17
18
|
protected readonly frames: (clip: string) => number;
|
|
18
19
|
/** The clip that begins at that second of the reading, after `last`. */
|
|
19
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;
|
|
20
25
|
protected readonly segments: Segment[];
|
|
21
26
|
constructor(
|
|
22
27
|
/** The frames of a clip. */
|
|
23
28
|
frames: (clip: string) => number,
|
|
24
29
|
/** The clip that begins at that second of the reading, after `last`. */
|
|
25
|
-
pick: (seconds: number, last: string | undefined) => string
|
|
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);
|
|
26
35
|
/** The clip and its frame at that second of the reading. */
|
|
27
36
|
at(seconds: number): {
|
|
28
37
|
clip: string;
|
|
@@ -7,16 +7,23 @@ exports.CLIP_FPS = 24;
|
|
|
7
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
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
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.
|
|
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).
|
|
11
12
|
*/
|
|
12
13
|
class ClipPlan {
|
|
13
14
|
constructor(
|
|
14
15
|
/** The frames of a clip. */
|
|
15
16
|
frames,
|
|
16
17
|
/** The clip that begins at that second of the reading, after `last`. */
|
|
17
|
-
pick
|
|
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) {
|
|
18
23
|
this.frames = frames;
|
|
19
24
|
this.pick = pick;
|
|
25
|
+
this.cue = cue;
|
|
26
|
+
this.whole = whole;
|
|
20
27
|
this.segments = [];
|
|
21
28
|
}
|
|
22
29
|
/** The clip and its frame at that second of the reading. */
|
|
@@ -35,7 +42,16 @@ class ClipPlan {
|
|
|
35
42
|
while (!last || last.from + last.frames / exports.CLIP_FPS <= seconds) {
|
|
36
43
|
const from = last ? last.from + last.frames / exports.CLIP_FPS : 0;
|
|
37
44
|
const clip = this.pick(from, last === null || last === void 0 ? void 0 : last.clip);
|
|
38
|
-
|
|
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 };
|
|
39
55
|
this.segments.push(last);
|
|
40
56
|
}
|
|
41
57
|
}
|
|
@@ -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
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FaceCameras = exports.CameraMotion = exports.FaceCamera = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 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
|
|
6
|
+
* 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;
|
|
7
|
+
* 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,
|
|
8
|
+
* 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
|
|
9
|
+
* 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
|
|
10
|
+
* room (the bars), never her cut off.
|
|
11
|
+
*/
|
|
12
|
+
var FaceCamera;
|
|
13
|
+
(function (FaceCamera) {
|
|
14
|
+
/** Room kept above her head, of the frame's height. */
|
|
15
|
+
FaceCamera.HEADROOM = 0.03;
|
|
16
|
+
/** 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. */
|
|
17
|
+
FaceCamera.RISE = 0.1;
|
|
18
|
+
/** Where her face is in the close-up, from the top (as object-position: 50% 30%). */
|
|
19
|
+
const FACE = 0.3;
|
|
20
|
+
/** The close-up of `rest` in a view of `aspect` (width / height): it fills the view, cut at the sides or below. */
|
|
21
|
+
function close(aspect, rest) {
|
|
22
|
+
if (aspect < rest.w / rest.h) {
|
|
23
|
+
const w = rest.h * aspect;
|
|
24
|
+
return { x: rest.x + (rest.w - w) / 2, y: rest.y, w, h: rest.h };
|
|
25
|
+
}
|
|
26
|
+
const h = rest.w / aspect;
|
|
27
|
+
return { x: rest.x, y: rest.y + (rest.h - h) * FACE, w: rest.w, h };
|
|
28
|
+
}
|
|
29
|
+
FaceCamera.close = close;
|
|
30
|
+
/** The box of her body at `seconds` into the clip, between the two samples around it. */
|
|
31
|
+
function body(framing, seconds) {
|
|
32
|
+
const { body } = framing;
|
|
33
|
+
const at = Math.max(0, Math.min(body.length - 1, seconds * framing.fps));
|
|
34
|
+
const before = body[Math.floor(at)];
|
|
35
|
+
const after = body[Math.min(body.length - 1, Math.floor(at) + 1)];
|
|
36
|
+
const part = at - Math.floor(at);
|
|
37
|
+
return before.map((value, k) => value + (after[k] - value) * part);
|
|
38
|
+
}
|
|
39
|
+
FaceCamera.body = body;
|
|
40
|
+
/**
|
|
41
|
+
* 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
|
|
42
|
+
* clip with a framing, as much more as her body takes, the more the higher she rose from her seat, her head under the
|
|
43
|
+
* share `clear` of the view's height at its top.
|
|
44
|
+
*/
|
|
45
|
+
function aim(aspect, size, framing, seconds, clear = 0) {
|
|
46
|
+
var _a;
|
|
47
|
+
const near = close(aspect, (_a = framing === null || framing === void 0 ? void 0 : framing.rest) !== null && _a !== void 0 ? _a : { x: 0, y: 0, w: size.w, h: size.h });
|
|
48
|
+
if (!(framing === null || framing === void 0 ? void 0 : framing.body.length)) {
|
|
49
|
+
return near;
|
|
50
|
+
}
|
|
51
|
+
const [x1, y1, x2] = body(framing, seconds);
|
|
52
|
+
// How far she rose from her seat, or (a person whose hair is high as she sits) how near her head is to leaving
|
|
53
|
+
// the picture of her seated: all the way back once it does.
|
|
54
|
+
const lift = FaceCamera.RISE * size.h;
|
|
55
|
+
const rose = Math.max(0, Math.min(1, Math.max((framing.body[0][1] - y1) / lift, (framing.rest.y + lift / 2 - y1) / (lift / 2))));
|
|
56
|
+
if (!rose) {
|
|
57
|
+
return near;
|
|
58
|
+
}
|
|
59
|
+
const head = Math.max(0, y1 - FaceCamera.HEADROOM * size.h);
|
|
60
|
+
const top = near.y + rose * (Math.min(near.y, head) - near.y);
|
|
61
|
+
const left = near.x + rose * (Math.min(near.x, Math.max(0, x1)) - near.x);
|
|
62
|
+
const right = near.x + near.w + rose * (Math.max(near.x + near.w, Math.min(size.w, x2)) - near.x - near.w);
|
|
63
|
+
const bottom = near.y + near.h;
|
|
64
|
+
const free = rose * Math.max(0, Math.min(0.4, clear));
|
|
65
|
+
let w = right - left;
|
|
66
|
+
let h = (bottom - top) / (1 - free);
|
|
67
|
+
if (w / h < aspect) {
|
|
68
|
+
w = h * aspect;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
h = w / aspect;
|
|
72
|
+
}
|
|
73
|
+
// Her head below what is laid over the top of the view, though the frame has nothing more above her.
|
|
74
|
+
const highest = top - free * h;
|
|
75
|
+
return { x: within(size.w, w, (left + right - w) / 2), y: Math.min(highest, within(size.h, h, highest)), w, h };
|
|
76
|
+
}
|
|
77
|
+
FaceCamera.aim = aim;
|
|
78
|
+
/** Where `camera` puts its clip in a view `width` wide. */
|
|
79
|
+
function place(camera, width) {
|
|
80
|
+
const scale = width / camera.w;
|
|
81
|
+
return { scale, left: -camera.x * scale, top: -camera.y * scale };
|
|
82
|
+
}
|
|
83
|
+
FaceCamera.place = place;
|
|
84
|
+
/** Where a span of `size` starts on a side of `length`: inside it, or as much over either end when larger. */
|
|
85
|
+
function within(length, size, at) {
|
|
86
|
+
return size >= length ? (length - size) / 2 : Math.max(0, Math.min(length - size, at));
|
|
87
|
+
}
|
|
88
|
+
})(FaceCamera || (exports.FaceCamera = FaceCamera = {}));
|
|
89
|
+
/**
|
|
90
|
+
* The camera moving to where it aims, as one who films does: it eases there (a time constant of `tau` seconds), and
|
|
91
|
+
* jumps only when what it films is another clip, frame or view, where nothing was shown before to move from.
|
|
92
|
+
*/
|
|
93
|
+
class CameraMotion {
|
|
94
|
+
constructor(tau = 0.3) {
|
|
95
|
+
this.tau = tau;
|
|
96
|
+
}
|
|
97
|
+
/** The camera `seconds` after the last step, aiming at `aim` in what `key` names (the clip, its size and the view). */
|
|
98
|
+
follow(key, aim, seconds) {
|
|
99
|
+
const now = this.now;
|
|
100
|
+
if (!now || key !== this.key) {
|
|
101
|
+
this.key = key;
|
|
102
|
+
this.now = { ...aim };
|
|
103
|
+
return this.now;
|
|
104
|
+
}
|
|
105
|
+
const part = 1 - Math.exp(-Math.max(0, seconds) / this.tau);
|
|
106
|
+
this.now = {
|
|
107
|
+
x: now.x + (aim.x - now.x) * part,
|
|
108
|
+
y: now.y + (aim.y - now.y) * part,
|
|
109
|
+
w: now.w + (aim.w - now.w) * part,
|
|
110
|
+
h: now.h + (aim.h - now.h) * part,
|
|
111
|
+
};
|
|
112
|
+
return this.now;
|
|
113
|
+
}
|
|
114
|
+
/** Where it is now, if it filmed anything yet. */
|
|
115
|
+
current() {
|
|
116
|
+
return this.now;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.CameraMotion = CameraMotion;
|
|
120
|
+
/**
|
|
121
|
+
* The cameras of the two layers of video (FaceCamera): each frame, each layer is placed as its camera aims at the
|
|
122
|
+
* moment of its clip, the camera easing there (CameraMotion). The layers keep the size of their clip's frame and are
|
|
123
|
+
* only moved and scaled (a transform), so that nothing is laid out again as they move.
|
|
124
|
+
*/
|
|
125
|
+
class FaceCameras {
|
|
126
|
+
constructor(faces, videos, box,
|
|
127
|
+
/** How much of the top of the view, in pixels, has something laid over it (the title of the call). */
|
|
128
|
+
clear = () => 0) {
|
|
129
|
+
this.faces = faces;
|
|
130
|
+
this.videos = videos;
|
|
131
|
+
this.clear = clear;
|
|
132
|
+
this.width = 0;
|
|
133
|
+
this.height = 0;
|
|
134
|
+
this.motions = videos.map(() => new CameraMotion());
|
|
135
|
+
this.placed = videos.map(() => undefined);
|
|
136
|
+
const view = box === null || box === void 0 ? void 0 : box.ownerDocument.defaultView;
|
|
137
|
+
if (box && (view === null || view === void 0 ? void 0 : view.ResizeObserver)) {
|
|
138
|
+
this.observer = new view.ResizeObserver(() => this.measure(box));
|
|
139
|
+
this.observer.observe(box);
|
|
140
|
+
}
|
|
141
|
+
if (box) {
|
|
142
|
+
this.measure(box);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
measure(box) {
|
|
146
|
+
this.width = box.clientWidth;
|
|
147
|
+
this.height = box.clientHeight;
|
|
148
|
+
}
|
|
149
|
+
/** A frame at `time` (ms): each layer that plays a clip, named in `names`, placed where its camera is. */
|
|
150
|
+
frame(time, names) {
|
|
151
|
+
const seconds = this.last === undefined ? 0 : (time - this.last) / 1000;
|
|
152
|
+
this.last = time;
|
|
153
|
+
if (!this.width || !this.height) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const aspect = this.width / this.height;
|
|
157
|
+
this.videos.forEach((video, index) => {
|
|
158
|
+
const clip = names[index];
|
|
159
|
+
const size = { w: video.videoWidth, h: video.videoHeight };
|
|
160
|
+
if (!clip || !size.w || !size.h) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const aim = FaceCamera.aim(aspect, size, this.faces.framing(clip), video.currentTime, this.clear() / this.height);
|
|
164
|
+
const camera = this.motions[index].follow(`${clip} ${size.w}x${size.h} ${aspect.toFixed(3)}`, aim, seconds);
|
|
165
|
+
const { scale, left, top } = FaceCamera.place(camera, this.width);
|
|
166
|
+
const style = video.style;
|
|
167
|
+
const sized = `${size.w}x${size.h}`;
|
|
168
|
+
if (this.placed[index] !== sized) {
|
|
169
|
+
this.placed[index] = sized;
|
|
170
|
+
style.width = `${size.w}px`;
|
|
171
|
+
style.height = `${size.h}px`;
|
|
172
|
+
style.right = 'auto';
|
|
173
|
+
style.bottom = 'auto';
|
|
174
|
+
style.objectFit = 'fill';
|
|
175
|
+
style.transformOrigin = '0 0';
|
|
176
|
+
}
|
|
177
|
+
style.transform = `translate3d(${left.toFixed(2)}px, ${top.toFixed(2)}px, 0) scale(${scale.toFixed(5)})`;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/** Where the clip of `video` goes in a view `width` wide (a canvas over it, in its pixels); undefined before it is placed. */
|
|
181
|
+
place(video, width) {
|
|
182
|
+
var _a;
|
|
183
|
+
const camera = (_a = this.motions[this.videos.indexOf(video)]) === null || _a === void 0 ? void 0 : _a.current();
|
|
184
|
+
return camera && FaceCamera.place(camera, width);
|
|
185
|
+
}
|
|
186
|
+
close() {
|
|
187
|
+
var _a;
|
|
188
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
189
|
+
for (const video of this.videos) {
|
|
190
|
+
for (const key of ['width', 'height', 'right', 'bottom', 'object-fit', 'transform-origin', 'transform']) {
|
|
191
|
+
video.style.removeProperty(key);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.FaceCameras = FaceCameras;
|
|
197
|
+
//# sourceMappingURL=face-camera.js.map
|