@celljs/ta-web 4.17.0 → 4.19.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 +2 -1
- package/README.md +2 -1
- package/esm/browser/account/account-side.d.ts +13 -0
- package/esm/browser/account/account-side.js +74 -0
- package/esm/browser/account/device-account.d.ts +69 -0
- package/esm/browser/account/device-account.js +215 -0
- package/esm/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/esm/browser/assistant/assistant-chat-list.js +74 -4
- package/esm/browser/assistant/assistant-export.js +6 -2
- package/esm/browser/assistant/assistant-extension.js +70 -15
- package/esm/browser/assistant/assistant-role.d.ts +2 -2
- package/esm/browser/assistant/assistant-role.js +7 -4
- package/esm/browser/assistant/assistant-task-source.d.ts +4 -0
- package/esm/browser/assistant/assistant-task-source.js +18 -4
- package/esm/browser/assistant/assistant-task-util.d.ts +8 -0
- package/esm/browser/assistant/assistant-task-util.js +14 -3
- package/esm/browser/assistant/assistant-tasks.js +2 -2
- package/esm/browser/assistant/assistant-thread.js +5 -1
- package/esm/browser/assistant/assistant-view.js +3 -5
- package/esm/browser/assistant/assistant.js +2 -1
- package/esm/browser/assistant/call-keeper.d.ts +142 -0
- package/esm/browser/assistant/call-keeper.js +292 -0
- package/esm/browser/assistant/call-screen.d.ts +39 -0
- package/esm/browser/assistant/call-screen.js +75 -0
- package/esm/browser/assistant/chat-task-source.d.ts +16 -18
- package/esm/browser/assistant/chat-task-source.js +27 -52
- package/esm/browser/assistant/realtime-voice.d.ts +62 -1
- package/esm/browser/assistant/realtime-voice.js +188 -29
- package/esm/browser/assistant/task-views.d.ts +9 -6
- package/esm/browser/assistant/task-views.js +28 -10
- package/esm/browser/assistant/voice-call-bar.d.ts +11 -4
- package/esm/browser/assistant/voice-call-bar.js +102 -46
- package/esm/browser/assistant/voice-call.d.ts +33 -1
- package/esm/browser/assistant/voice-call.js +131 -28
- package/esm/browser/assistant/voice-reopen.d.ts +18 -0
- package/esm/browser/assistant/voice-reopen.js +54 -0
- package/esm/browser/chat/chat-view.js +5 -8
- package/esm/browser/cloud/cloud-sign-in.d.ts +100 -0
- package/esm/browser/cloud/cloud-sign-in.js +239 -0
- package/esm/browser/cloud/device-page.d.ts +15 -0
- package/esm/browser/cloud/device-page.js +39 -0
- package/esm/browser/components/access-view.js +25 -1
- package/esm/browser/components/account-menu.d.ts +1 -1
- package/esm/browser/components/account-menu.js +7 -2
- package/esm/browser/components/account-view.d.ts +17 -0
- package/esm/browser/components/account-view.js +216 -0
- package/esm/browser/components/app-contexts.d.ts +12 -0
- package/esm/browser/components/app-contexts.js +28 -0
- package/esm/browser/components/app-nav.d.ts +5 -3
- package/esm/browser/components/app-nav.js +11 -8
- package/esm/browser/components/app-shell-state.d.ts +2 -2
- package/esm/browser/components/app-shell-state.js +33 -28
- package/esm/browser/components/app-view.js +113 -82
- package/esm/browser/components/auth-view.js +3 -5
- package/esm/browser/components/call-pill.d.ts +11 -0
- package/esm/browser/components/call-pill.js +19 -0
- package/esm/browser/components/chat-home-util.d.ts +112 -0
- package/esm/browser/components/chat-home-util.js +123 -0
- package/esm/browser/components/chat-home.d.ts +54 -0
- package/esm/browser/components/chat-home.js +125 -0
- package/esm/browser/components/chat-icon.d.ts +4 -2
- package/esm/browser/components/chat-icon.js +15 -5
- package/esm/browser/components/chat-list-hooks.d.ts +30 -0
- package/esm/browser/components/chat-list-hooks.js +81 -0
- package/esm/browser/components/chat-list-props.d.ts +54 -0
- package/esm/browser/components/chat-list-props.js +2 -0
- package/esm/browser/components/chat-list-row.d.ts +14 -2
- package/esm/browser/components/chat-list-row.js +27 -17
- package/esm/browser/components/chat-list-util.d.ts +40 -9
- package/esm/browser/components/chat-list-util.js +72 -9
- package/esm/browser/components/chat-list.d.ts +4 -49
- package/esm/browser/components/chat-list.js +118 -87
- package/esm/browser/components/cloud-sign-in-view.d.ts +65 -0
- package/esm/browser/components/cloud-sign-in-view.js +351 -0
- package/esm/browser/components/code-editor.js +2 -1
- package/esm/browser/components/composer-box.js +7 -0
- package/esm/browser/components/connection-bar.js +22 -3
- package/esm/browser/components/context-menu.d.ts +11 -2
- package/esm/browser/components/context-menu.js +14 -3
- package/esm/browser/components/conversation-scroll.d.ts +2 -0
- package/esm/browser/components/conversation-scroll.js +14 -0
- package/esm/browser/components/device-sign-in-page.d.ts +12 -0
- package/esm/browser/components/device-sign-in-page.js +74 -0
- package/esm/browser/components/diff-editor.js +2 -1
- package/esm/browser/components/entry-holds.d.ts +22 -0
- package/esm/browser/components/entry-holds.js +49 -0
- package/esm/browser/components/environment-view.js +8 -8
- package/esm/browser/components/face.d.ts +1 -1
- package/esm/browser/components/fold-text.js +3 -1
- package/esm/browser/components/fork-view.js +2 -4
- package/esm/browser/components/gallery.js +2 -1
- package/esm/browser/components/held-talk.d.ts +6 -2
- package/esm/browser/components/held-talk.js +20 -2
- package/esm/browser/components/host-view.d.ts +11 -4
- package/esm/browser/components/host-view.js +60 -14
- package/esm/browser/components/image-swipe.d.ts +50 -0
- package/esm/browser/components/image-swipe.js +139 -0
- package/esm/browser/components/image-viewer.d.ts +10 -114
- package/esm/browser/components/image-viewer.js +46 -365
- package/esm/browser/components/image-zoom.d.ts +112 -0
- package/esm/browser/components/image-zoom.js +355 -0
- package/esm/browser/components/kept-call-bar.d.ts +12 -0
- package/esm/browser/components/kept-call-bar.js +99 -0
- package/esm/browser/components/lightbox.d.ts +6 -2
- package/esm/browser/components/lightbox.js +4 -3
- package/esm/browser/components/link-dialog.d.ts +2 -1
- package/esm/browser/components/link-dialog.js +5 -1
- package/esm/browser/components/link.d.ts +4 -0
- package/esm/browser/components/link.js +11 -0
- package/esm/browser/components/loading.d.ts +12 -0
- package/esm/browser/components/loading.js +18 -0
- package/esm/browser/components/markdown.js +2 -1
- package/esm/browser/components/mermaid-view.js +14 -7
- package/esm/browser/components/message-images.js +1 -1
- package/esm/browser/components/message-list.js +12 -7
- package/esm/browser/components/message-steps.js +31 -23
- package/esm/browser/components/message-user.d.ts +10 -1
- package/esm/browser/components/message-user.js +48 -13
- package/esm/browser/components/model-picker.d.ts +3 -1
- package/esm/browser/components/model-picker.js +14 -3
- package/esm/browser/components/nav-places.d.ts +7 -12
- package/esm/browser/components/nav-places.js +10 -13
- package/esm/browser/components/phone-shell.d.ts +1 -1
- package/esm/browser/components/scan-screen.d.ts +4 -2
- package/esm/browser/components/scan-screen.js +46 -20
- package/esm/browser/components/search-page.js +3 -2
- package/esm/browser/components/secret-peek.d.ts +3 -0
- package/esm/browser/components/secret-peek.js +19 -0
- package/esm/browser/components/secret-text.d.ts +41 -0
- package/esm/browser/components/secret-text.js +80 -0
- package/esm/browser/components/session-view.js +44 -13
- package/esm/browser/components/settings-choices.d.ts +3 -3
- package/esm/browser/components/settings-choices.js +9 -29
- package/esm/browser/components/settings-parts.js +5 -2
- package/esm/browser/components/settings-view.js +2 -2
- package/esm/browser/components/share-dialog.d.ts +2 -3
- package/esm/browser/components/share-dialog.js +6 -41
- package/esm/browser/components/share-friends.d.ts +18 -0
- package/esm/browser/components/share-friends.js +56 -0
- package/esm/browser/components/share-sheet.d.ts +15 -0
- package/esm/browser/components/share-sheet.js +79 -0
- package/esm/browser/components/side-lists.d.ts +16 -4
- package/esm/browser/components/side-lists.js +28 -12
- package/esm/browser/components/sign-in-accounts.d.ts +2 -1
- package/esm/browser/components/sign-in-accounts.js +59 -5
- package/esm/browser/components/sign-in-label.d.ts +5 -0
- package/esm/browser/components/sign-in-label.js +10 -0
- package/esm/browser/components/system-link-host.d.ts +2 -0
- package/esm/browser/components/system-link-host.js +17 -0
- package/esm/browser/components/tool-result.d.ts +3 -2
- package/esm/browser/components/tool-result.js +5 -3
- package/esm/browser/components/tool-view.d.ts +21 -3
- package/esm/browser/components/tool-view.js +103 -35
- package/esm/browser/components/unseen-drop.d.ts +2 -1
- package/esm/browser/components/unseen-drop.js +1 -1
- package/esm/browser/components/voice-services.js +26 -3
- package/esm/browser/components/workbench-view.d.ts +1 -1
- package/esm/browser/components/workbench-view.js +42 -5
- package/esm/browser/device/code-scan.d.ts +23 -10
- package/esm/browser/device/code-scan.js +48 -43
- package/esm/browser/device/edge-back.d.ts +17 -0
- package/esm/browser/device/edge-back.js +52 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +2 -2
- package/esm/browser/device/screen-awake.d.ts +24 -0
- package/esm/browser/device/screen-awake.js +59 -0
- package/esm/browser/extension/icons.js +13 -2
- package/esm/browser/extension/share-sheet-compat.d.ts +11 -0
- package/esm/browser/extension/share-sheet-compat.js +27 -0
- package/esm/browser/extension/web-api-chats.d.ts +49 -0
- package/esm/browser/extension/web-api-chats.js +2 -0
- package/esm/browser/extension/web-api-components.d.ts +61 -6
- package/esm/browser/extension/web-api-contributions.d.ts +28 -53
- package/esm/browser/extension/web-api-screen-share.d.ts +10 -0
- package/esm/browser/extension/web-api-screen-share.js +3 -0
- package/esm/browser/extension/web-api-services.d.ts +50 -0
- package/esm/browser/extension/web-api-services.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +45 -65
- package/esm/browser/extension/web-extension-context.d.ts +5 -10
- package/esm/browser/extension/web-extension-context.js +33 -21
- package/esm/browser/extension/web-extension-protocol.d.ts +8 -3
- package/esm/browser/extension/web-extension-run.js +0 -1
- package/esm/browser/extension/web-extensions.d.ts +4 -1
- package/esm/browser/extension/web-extensions.js +12 -0
- package/esm/browser/extension/web-tasks.d.ts +6 -1
- package/esm/browser/extension/web-tasks.js +11 -3
- package/esm/browser/extension/web-view-util.d.ts +0 -1
- package/esm/browser/extension/web-view-util.js +4 -5
- package/esm/browser/files/files.d.ts +1 -0
- package/esm/browser/files/files.js +14 -3
- package/esm/browser/game/game-control.d.ts +118 -0
- package/esm/browser/game/game-control.js +341 -0
- package/esm/browser/game/game-host.d.ts +14 -2
- package/esm/browser/game/game-host.js +22 -5
- package/esm/browser/game/game-protocol.d.ts +15 -0
- package/esm/browser/game/game-runner.d.ts +3 -1
- package/esm/browser/game/game-runner.js +6 -0
- package/esm/browser/game/game-util.d.ts +3 -0
- package/esm/browser/game/game-util.js +3 -0
- package/esm/browser/game/game-view.d.ts +5 -2
- package/esm/browser/game/game-view.js +4 -4
- package/esm/browser/game/game3d-protocol.d.ts +5 -1
- package/esm/browser/game/game3d-runner.d.ts +3 -1
- package/esm/browser/game/game3d-runner.js +14 -0
- package/esm/browser/gateway/console-agents.d.ts +11 -0
- package/esm/browser/gateway/console-agents.js +128 -0
- package/esm/browser/gateway/console-extension.js +0 -1
- package/esm/browser/gateway/console-limits.d.ts +19 -0
- package/esm/browser/gateway/console-limits.js +164 -0
- package/esm/browser/gateway/console-parts.d.ts +29 -22
- package/esm/browser/gateway/console-parts.js +67 -137
- package/esm/browser/gateway/console-tenant.d.ts +2 -4
- package/esm/browser/gateway/console-tenant.js +117 -209
- package/esm/browser/gateway/console-trend.js +6 -4
- package/esm/browser/gateway/console-view.js +136 -109
- package/esm/browser/hooks.js +1 -3
- package/esm/browser/hosts.d.ts +7 -0
- package/esm/browser/hosts.js +23 -2
- package/esm/browser/i18n/locales.d.ts +169 -14
- package/esm/browser/i18n/messages-ja.js +178 -23
- package/esm/browser/i18n/messages-zh-tw.js +178 -23
- package/esm/browser/i18n/messages.d.ts +166 -11
- package/esm/browser/i18n/messages.js +357 -47
- package/esm/browser/index.d.ts +1 -0
- package/esm/browser/index.js +1 -0
- package/esm/browser/links/links-protocol.d.ts +10 -1
- package/esm/browser/links/links.d.ts +11 -2
- package/esm/browser/links/links.js +65 -7
- package/esm/browser/links/system-links.d.ts +21 -0
- package/esm/browser/links/system-links.js +54 -0
- package/esm/browser/markdown/hooks.d.ts +3 -1
- package/esm/browser/markdown/hooks.js +11 -3
- package/esm/browser/markdown/mermaid.d.ts +18 -4
- package/esm/browser/markdown/mermaid.js +117 -17
- package/esm/browser/screen/screen-protocol.d.ts +74 -1
- package/esm/browser/screen/screen-protocol.js +15 -0
- package/esm/browser/screen/screen-scroll.d.ts +55 -0
- package/esm/browser/screen/screen-scroll.js +182 -0
- package/esm/browser/screen/screen.d.ts +34 -1
- package/esm/browser/screen/screen.js +172 -2
- package/esm/browser/settings/navigation.d.ts +9 -21
- package/esm/browser/settings/navigation.js +11 -31
- package/esm/browser/settings/settings-protocol.d.ts +9 -0
- package/esm/browser/settings/settings-protocol.js +18 -0
- package/esm/browser/settings/settings.d.ts +7 -1
- package/esm/browser/settings/settings.js +31 -7
- package/esm/browser/share/shared-extensions.js +4 -3
- package/esm/browser/share/shared-page.js +2 -2
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +8 -1
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +0 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +42 -4
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +31 -1
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +7 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +168 -112
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +10 -3
- package/esm/browser/style/shared.d.ts +1 -1
- package/esm/browser/style/shared.js +1 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +12 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +38 -13
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +16 -2
- package/esm/browser/style/tints.d.ts +5 -4
- package/esm/browser/style/tints.js +9 -9
- package/esm/browser/util/desktop.d.ts +7 -1
- package/esm/browser/util/desktop.js +17 -0
- package/esm/browser/util/image-swipe.d.ts +42 -0
- package/esm/browser/util/image-swipe.js +66 -0
- package/esm/browser/util/process.d.ts +31 -3
- package/esm/browser/util/process.js +75 -8
- package/esm/browser/util/share-link.d.ts +5 -0
- package/esm/browser/util/share-link.js +10 -0
- package/esm/browser/util/shell-words.d.ts +18 -0
- package/esm/browser/util/shell-words.js +397 -0
- package/esm/browser/util/spoken.d.ts +5 -0
- package/esm/browser/util/spoken.js +11 -2
- package/esm/browser/util/tool.d.ts +9 -0
- package/esm/browser/util/tool.js +71 -6
- package/esm/browser/util/transcript.js +3 -1
- package/esm/browser/util/turn-end.d.ts +17 -0
- package/esm/browser/util/turn-end.js +164 -0
- package/esm/browser/workbench-hosts.d.ts +8 -1
- package/esm/browser/workbench-hosts.js +22 -2
- package/esm/browser/workbench-protocol.d.ts +25 -3
- package/esm/browser/workbench-services.d.ts +10 -1
- package/esm/browser/workbench-services.js +41 -0
- package/esm/browser/workbench-util.d.ts +9 -3
- package/esm/browser/workbench-util.js +24 -4
- package/esm/browser/workbench.d.ts +3 -0
- package/esm/browser/workbench.js +36 -9
- package/lib/browser/account/account-side.d.ts +14 -0
- package/lib/browser/account/account-side.js +111 -0
- package/lib/browser/account/device-account.d.ts +70 -0
- package/lib/browser/account/device-account.js +219 -0
- package/lib/browser/assistant/assistant-chat-list.d.ts +4 -4
- package/lib/browser/assistant/assistant-chat-list.js +73 -3
- package/lib/browser/assistant/assistant-export.js +5 -1
- package/lib/browser/assistant/assistant-extension.js +69 -14
- package/lib/browser/assistant/assistant-role.d.ts +2 -2
- package/lib/browser/assistant/assistant-role.js +7 -4
- package/lib/browser/assistant/assistant-task-source.d.ts +4 -0
- package/lib/browser/assistant/assistant-task-source.js +19 -4
- package/lib/browser/assistant/assistant-task-util.d.ts +8 -0
- package/lib/browser/assistant/assistant-task-util.js +14 -3
- package/lib/browser/assistant/assistant-tasks.js +2 -2
- package/lib/browser/assistant/assistant-thread.js +4 -0
- package/lib/browser/assistant/assistant-view.js +3 -5
- package/lib/browser/assistant/assistant.js +2 -1
- package/lib/browser/assistant/call-keeper.d.ts +143 -0
- package/lib/browser/assistant/call-keeper.js +295 -0
- package/lib/browser/assistant/call-screen.d.ts +40 -0
- package/lib/browser/assistant/call-screen.js +78 -0
- package/lib/browser/assistant/chat-task-source.d.ts +16 -18
- package/lib/browser/assistant/chat-task-source.js +28 -53
- package/lib/browser/assistant/realtime-voice.d.ts +62 -1
- package/lib/browser/assistant/realtime-voice.js +188 -29
- package/lib/browser/assistant/task-views.d.ts +9 -6
- package/lib/browser/assistant/task-views.js +29 -10
- package/lib/browser/assistant/voice-call-bar.d.ts +11 -4
- package/lib/browser/assistant/voice-call-bar.js +102 -46
- package/lib/browser/assistant/voice-call.d.ts +33 -1
- package/lib/browser/assistant/voice-call.js +132 -29
- package/lib/browser/assistant/voice-reopen.d.ts +19 -0
- package/lib/browser/assistant/voice-reopen.js +58 -0
- package/lib/browser/chat/chat-view.js +5 -8
- package/lib/browser/cloud/cloud-sign-in.d.ts +101 -0
- package/lib/browser/cloud/cloud-sign-in.js +244 -0
- package/lib/browser/cloud/device-page.d.ts +16 -0
- package/lib/browser/cloud/device-page.js +42 -0
- package/lib/browser/components/access-view.js +24 -0
- package/lib/browser/components/account-menu.d.ts +1 -1
- package/lib/browser/components/account-menu.js +6 -1
- package/lib/browser/components/account-view.d.ts +18 -0
- package/lib/browser/components/account-view.js +255 -0
- package/lib/browser/components/app-contexts.d.ts +13 -0
- package/lib/browser/components/app-contexts.js +64 -0
- package/lib/browser/components/app-nav.d.ts +5 -3
- package/lib/browser/components/app-nav.js +11 -8
- package/lib/browser/components/app-shell-state.d.ts +2 -2
- package/lib/browser/components/app-shell-state.js +33 -28
- package/lib/browser/components/app-view.js +109 -78
- package/lib/browser/components/auth-view.js +3 -5
- package/lib/browser/components/call-pill.d.ts +12 -0
- package/lib/browser/components/call-pill.js +55 -0
- package/lib/browser/components/chat-home-util.d.ts +113 -0
- package/lib/browser/components/chat-home-util.js +126 -0
- package/lib/browser/components/chat-home.d.ts +55 -0
- package/lib/browser/components/chat-home.js +164 -0
- package/lib/browser/components/chat-icon.d.ts +4 -2
- package/lib/browser/components/chat-icon.js +15 -5
- package/lib/browser/components/chat-list-hooks.d.ts +31 -0
- package/lib/browser/components/chat-list-hooks.js +120 -0
- package/lib/browser/components/chat-list-props.d.ts +55 -0
- package/lib/browser/components/chat-list-props.js +3 -0
- package/lib/browser/components/chat-list-row.d.ts +14 -2
- package/lib/browser/components/chat-list-row.js +27 -16
- package/lib/browser/components/chat-list-util.d.ts +40 -9
- package/lib/browser/components/chat-list-util.js +73 -10
- package/lib/browser/components/chat-list.d.ts +4 -49
- package/lib/browser/components/chat-list.js +121 -90
- package/lib/browser/components/cloud-sign-in-view.d.ts +66 -0
- package/lib/browser/components/cloud-sign-in-view.js +394 -0
- package/lib/browser/components/code-editor.js +2 -1
- package/lib/browser/components/composer-box.js +7 -0
- package/lib/browser/components/connection-bar.js +22 -3
- package/lib/browser/components/context-menu.d.ts +11 -2
- package/lib/browser/components/context-menu.js +14 -3
- package/lib/browser/components/conversation-scroll.d.ts +2 -0
- package/lib/browser/components/conversation-scroll.js +14 -0
- package/lib/browser/components/device-sign-in-page.d.ts +13 -0
- package/lib/browser/components/device-sign-in-page.js +110 -0
- package/lib/browser/components/diff-editor.js +2 -1
- package/lib/browser/components/entry-holds.d.ts +23 -0
- package/lib/browser/components/entry-holds.js +86 -0
- package/lib/browser/components/environment-view.js +8 -8
- package/lib/browser/components/face.d.ts +1 -1
- package/lib/browser/components/fold-text.js +3 -1
- package/lib/browser/components/fork-view.js +2 -4
- package/lib/browser/components/gallery.js +2 -1
- package/lib/browser/components/held-talk.d.ts +6 -2
- package/lib/browser/components/held-talk.js +20 -2
- package/lib/browser/components/host-view.d.ts +11 -4
- package/lib/browser/components/host-view.js +60 -13
- package/lib/browser/components/image-swipe.d.ts +51 -0
- package/lib/browser/components/image-swipe.js +143 -0
- package/lib/browser/components/image-viewer.d.ts +10 -114
- package/lib/browser/components/image-viewer.js +47 -368
- package/lib/browser/components/image-zoom.d.ts +113 -0
- package/lib/browser/components/image-zoom.js +359 -0
- package/lib/browser/components/kept-call-bar.d.ts +13 -0
- package/lib/browser/components/kept-call-bar.js +135 -0
- package/lib/browser/components/lightbox.d.ts +6 -2
- package/lib/browser/components/lightbox.js +4 -3
- package/lib/browser/components/link-dialog.d.ts +2 -1
- package/lib/browser/components/link-dialog.js +5 -1
- package/lib/browser/components/link.d.ts +4 -0
- package/lib/browser/components/link.js +12 -0
- package/lib/browser/components/loading.d.ts +13 -0
- package/lib/browser/components/loading.js +55 -0
- package/lib/browser/components/markdown.js +2 -1
- package/lib/browser/components/mermaid-view.js +13 -6
- package/lib/browser/components/message-images.js +1 -1
- package/lib/browser/components/message-list.js +12 -7
- package/lib/browser/components/message-steps.js +31 -23
- package/lib/browser/components/message-user.d.ts +10 -1
- package/lib/browser/components/message-user.js +48 -12
- package/lib/browser/components/model-picker.d.ts +3 -1
- package/lib/browser/components/model-picker.js +14 -3
- package/lib/browser/components/nav-places.d.ts +7 -12
- package/lib/browser/components/nav-places.js +10 -13
- package/lib/browser/components/phone-shell.d.ts +1 -1
- package/lib/browser/components/scan-screen.d.ts +4 -2
- package/lib/browser/components/scan-screen.js +47 -20
- package/lib/browser/components/search-page.js +3 -2
- package/lib/browser/components/secret-peek.d.ts +4 -0
- package/lib/browser/components/secret-peek.js +55 -0
- package/lib/browser/components/secret-text.d.ts +42 -0
- package/lib/browser/components/secret-text.js +118 -0
- package/lib/browser/components/session-view.js +43 -12
- package/lib/browser/components/settings-choices.d.ts +3 -3
- package/lib/browser/components/settings-choices.js +8 -28
- package/lib/browser/components/settings-parts.js +4 -1
- package/lib/browser/components/settings-view.js +2 -2
- package/lib/browser/components/share-dialog.d.ts +2 -3
- package/lib/browser/components/share-dialog.js +5 -40
- package/lib/browser/components/share-friends.d.ts +19 -0
- package/lib/browser/components/share-friends.js +93 -0
- package/lib/browser/components/share-sheet.d.ts +16 -0
- package/lib/browser/components/share-sheet.js +115 -0
- package/lib/browser/components/side-lists.d.ts +16 -4
- package/lib/browser/components/side-lists.js +28 -12
- package/lib/browser/components/sign-in-accounts.d.ts +2 -1
- package/lib/browser/components/sign-in-accounts.js +59 -5
- package/lib/browser/components/sign-in-label.d.ts +6 -0
- package/lib/browser/components/sign-in-label.js +13 -0
- package/lib/browser/components/system-link-host.d.ts +3 -0
- package/lib/browser/components/system-link-host.js +53 -0
- package/lib/browser/components/tool-result.d.ts +3 -2
- package/lib/browser/components/tool-result.js +5 -3
- package/lib/browser/components/tool-view.d.ts +21 -3
- package/lib/browser/components/tool-view.js +104 -36
- package/lib/browser/components/unseen-drop.d.ts +2 -1
- package/lib/browser/components/unseen-drop.js +1 -1
- package/lib/browser/components/voice-services.js +23 -0
- package/lib/browser/components/workbench-view.d.ts +1 -1
- package/lib/browser/components/workbench-view.js +42 -5
- package/lib/browser/device/code-scan.d.ts +23 -10
- package/lib/browser/device/code-scan.js +47 -42
- package/lib/browser/device/edge-back.d.ts +18 -0
- package/lib/browser/device/edge-back.js +89 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +2 -2
- package/lib/browser/device/screen-awake.d.ts +25 -0
- package/lib/browser/device/screen-awake.js +63 -0
- package/lib/browser/extension/icons.js +12 -1
- package/lib/browser/extension/share-sheet-compat.d.ts +12 -0
- package/lib/browser/extension/share-sheet-compat.js +30 -0
- package/lib/browser/extension/web-api-chats.d.ts +50 -0
- package/lib/browser/extension/web-api-chats.js +3 -0
- package/lib/browser/extension/web-api-components.d.ts +61 -6
- package/lib/browser/extension/web-api-contributions.d.ts +28 -53
- package/lib/browser/extension/web-api-screen-share.d.ts +11 -0
- package/lib/browser/extension/web-api-screen-share.js +6 -0
- package/lib/browser/extension/web-api-services.d.ts +51 -0
- package/lib/browser/extension/web-api-services.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +45 -65
- package/lib/browser/extension/web-extension-context.d.ts +5 -10
- package/lib/browser/extension/web-extension-context.js +33 -21
- package/lib/browser/extension/web-extension-protocol.d.ts +8 -3
- package/lib/browser/extension/web-extension-run.js +0 -1
- package/lib/browser/extension/web-extensions.d.ts +4 -1
- package/lib/browser/extension/web-extensions.js +12 -0
- package/lib/browser/extension/web-tasks.d.ts +6 -1
- package/lib/browser/extension/web-tasks.js +11 -3
- package/lib/browser/extension/web-view-util.d.ts +0 -1
- package/lib/browser/extension/web-view-util.js +4 -5
- package/lib/browser/files/files.d.ts +1 -0
- package/lib/browser/files/files.js +14 -3
- package/lib/browser/game/game-control.d.ts +119 -0
- package/lib/browser/game/game-control.js +345 -0
- package/lib/browser/game/game-host.d.ts +14 -2
- package/lib/browser/game/game-host.js +22 -5
- package/lib/browser/game/game-protocol.d.ts +15 -0
- package/lib/browser/game/game-runner.d.ts +3 -1
- package/lib/browser/game/game-runner.js +6 -0
- package/lib/browser/game/game-util.d.ts +3 -0
- package/lib/browser/game/game-util.js +3 -0
- package/lib/browser/game/game-view.d.ts +5 -2
- package/lib/browser/game/game-view.js +4 -4
- package/lib/browser/game/game3d-protocol.d.ts +5 -1
- package/lib/browser/game/game3d-runner.d.ts +3 -1
- package/lib/browser/game/game3d-runner.js +14 -0
- package/lib/browser/gateway/console-agents.d.ts +12 -0
- package/lib/browser/gateway/console-agents.js +165 -0
- package/lib/browser/gateway/console-extension.js +0 -1
- package/lib/browser/gateway/console-limits.d.ts +20 -0
- package/lib/browser/gateway/console-limits.js +200 -0
- package/lib/browser/gateway/console-parts.d.ts +29 -22
- package/lib/browser/gateway/console-parts.js +72 -141
- package/lib/browser/gateway/console-tenant.d.ts +2 -4
- package/lib/browser/gateway/console-tenant.js +115 -208
- package/lib/browser/gateway/console-trend.js +6 -4
- package/lib/browser/gateway/console-view.js +134 -107
- package/lib/browser/hooks.js +1 -3
- package/lib/browser/hosts.d.ts +7 -0
- package/lib/browser/hosts.js +23 -2
- package/lib/browser/i18n/locales.d.ts +169 -14
- package/lib/browser/i18n/messages-ja.js +178 -23
- package/lib/browser/i18n/messages-zh-tw.js +178 -23
- package/lib/browser/i18n/messages.d.ts +166 -11
- package/lib/browser/i18n/messages.js +357 -47
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.js +1 -0
- package/lib/browser/links/links-protocol.d.ts +10 -1
- package/lib/browser/links/links.d.ts +11 -2
- package/lib/browser/links/links.js +65 -7
- package/lib/browser/links/system-links.d.ts +22 -0
- package/lib/browser/links/system-links.js +58 -0
- package/lib/browser/markdown/hooks.d.ts +3 -1
- package/lib/browser/markdown/hooks.js +12 -3
- package/lib/browser/markdown/mermaid.d.ts +18 -4
- package/lib/browser/markdown/mermaid.js +117 -17
- package/lib/browser/screen/screen-protocol.d.ts +74 -1
- package/lib/browser/screen/screen-protocol.js +15 -0
- package/lib/browser/screen/screen-scroll.d.ts +56 -0
- package/lib/browser/screen/screen-scroll.js +185 -0
- package/lib/browser/screen/screen.d.ts +34 -1
- package/lib/browser/screen/screen.js +172 -2
- package/lib/browser/settings/navigation.d.ts +9 -21
- package/lib/browser/settings/navigation.js +11 -31
- package/lib/browser/settings/settings-protocol.d.ts +9 -0
- package/lib/browser/settings/settings-protocol.js +19 -1
- package/lib/browser/settings/settings.d.ts +7 -1
- package/lib/browser/settings/settings.js +31 -7
- package/lib/browser/share/shared-extensions.js +4 -3
- package/lib/browser/share/shared-page.js +2 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +8 -1
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +0 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +42 -4
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +31 -1
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +7 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +168 -112
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +10 -3
- package/lib/browser/style/shared.d.ts +1 -1
- package/lib/browser/style/shared.js +1 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +12 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +38 -13
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +16 -2
- package/lib/browser/style/tints.d.ts +5 -4
- package/lib/browser/style/tints.js +9 -9
- package/lib/browser/util/desktop.d.ts +7 -1
- package/lib/browser/util/desktop.js +17 -0
- package/lib/browser/util/image-swipe.d.ts +43 -0
- package/lib/browser/util/image-swipe.js +69 -0
- package/lib/browser/util/process.d.ts +31 -3
- package/lib/browser/util/process.js +74 -7
- package/lib/browser/util/share-link.d.ts +5 -0
- package/lib/browser/util/share-link.js +10 -0
- package/lib/browser/util/shell-words.d.ts +19 -0
- package/lib/browser/util/shell-words.js +400 -0
- package/lib/browser/util/spoken.d.ts +5 -0
- package/lib/browser/util/spoken.js +10 -1
- package/lib/browser/util/tool.d.ts +9 -0
- package/lib/browser/util/tool.js +71 -6
- package/lib/browser/util/transcript.js +3 -1
- package/lib/browser/util/turn-end.d.ts +18 -0
- package/lib/browser/util/turn-end.js +167 -0
- package/lib/browser/workbench-hosts.d.ts +8 -1
- package/lib/browser/workbench-hosts.js +22 -2
- package/lib/browser/workbench-protocol.d.ts +25 -3
- package/lib/browser/workbench-services.d.ts +10 -1
- package/lib/browser/workbench-services.js +41 -0
- package/lib/browser/workbench-util.d.ts +9 -3
- package/lib/browser/workbench-util.js +24 -4
- package/lib/browser/workbench.d.ts +3 -0
- package/lib/browser/workbench.js +35 -8
- package/package.json +7 -7
- package/esm/browser/components/list-skeleton.d.ts +0 -10
- package/esm/browser/components/list-skeleton.js +0 -31
- package/lib/browser/components/list-skeleton.d.ts +0 -11
- package/lib/browser/components/list-skeleton.js +0 -68
|
@@ -37,6 +37,7 @@ exports.WebExtensionContext = void 0;
|
|
|
37
37
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const read_aloud_1 = require("../assistant/read-aloud");
|
|
40
|
+
const task_views_1 = require("../assistant/task-views");
|
|
40
41
|
const busy_1 = require("../components/busy");
|
|
41
42
|
const chat_asks_1 = require("../components/chat-asks");
|
|
42
43
|
const chat_list_util_1 = require("../components/chat-list-util");
|
|
@@ -53,7 +54,7 @@ const full_screen_1 = require("../components/full-screen");
|
|
|
53
54
|
const hold_to_talk_1 = require("../components/hold-to-talk");
|
|
54
55
|
const host_tag_1 = require("../components/host-tag");
|
|
55
56
|
const image_viewer_1 = require("../components/image-viewer");
|
|
56
|
-
const
|
|
57
|
+
const loading_1 = require("../components/loading");
|
|
57
58
|
const markdown_1 = require("../components/markdown");
|
|
58
59
|
const model_picker_1 = require("../components/model-picker");
|
|
59
60
|
const phone_shell_1 = require("../components/phone-shell");
|
|
@@ -61,6 +62,7 @@ const picture_1 = require("../components/picture");
|
|
|
61
62
|
const qr_view_1 = require("../components/qr-view");
|
|
62
63
|
const select_bar_1 = require("../components/select-bar");
|
|
63
64
|
const settings_controls_1 = require("../components/settings-controls");
|
|
65
|
+
const share_sheet_1 = require("../components/share-sheet");
|
|
64
66
|
const swipe_row_1 = require("../components/swipe-row");
|
|
65
67
|
const ta_avatar_1 = require("../components/ta-avatar");
|
|
66
68
|
const web_composer_1 = require("../components/web-composer");
|
|
@@ -68,11 +70,11 @@ const web_dialog_1 = require("../components/web-dialog");
|
|
|
68
70
|
const back_stack_1 = require("../device/back-stack");
|
|
69
71
|
const code_scan_1 = require("../device/code-scan");
|
|
70
72
|
const device_1 = require("../device/device");
|
|
71
|
-
const scanner_1 = require("../device/scanner");
|
|
72
73
|
const drafts_protocol_1 = require("../drafts/drafts-protocol");
|
|
73
74
|
const game_view_1 = require("../game/game-view");
|
|
74
75
|
const messages_1 = require("../i18n/messages");
|
|
75
76
|
const use_t_1 = require("../i18n/use-t");
|
|
77
|
+
const screen_protocol_1 = require("../screen/screen-protocol");
|
|
76
78
|
const web_terminal_1 = require("../terminal/web-terminal");
|
|
77
79
|
const desktop_1 = require("../util/desktop");
|
|
78
80
|
const file_drag_1 = require("../util/file-drag");
|
|
@@ -80,6 +82,7 @@ const voice_1 = require("../util/voice");
|
|
|
80
82
|
const icons_1 = require("./icons");
|
|
81
83
|
const web_extension_protocol_1 = require("./web-extension-protocol");
|
|
82
84
|
const web_extension_run_1 = require("./web-extension-run");
|
|
85
|
+
const web_pages_1 = require("./web-pages");
|
|
83
86
|
const web_tasks_1 = require("./web-tasks");
|
|
84
87
|
const FILE_DRAG = Object.freeze({ set: file_drag_1.FileDragUtil.set, has: file_drag_1.FileDragUtil.has, get: file_drag_1.FileDragUtil.get, paths: file_drag_1.FileDragUtil.paths });
|
|
85
88
|
/**
|
|
@@ -92,8 +95,6 @@ class WebExtensionContext {
|
|
|
92
95
|
this.host = host;
|
|
93
96
|
/** Monaco and the games in the theme and language of the settings, the same component for every extension. */
|
|
94
97
|
this.codeEditor = (props) => React.createElement(code_editor_1.CodeEditor, { ...props, settings: this.host.settings });
|
|
95
|
-
this.game = (props) => React.createElement(game_view_1.GameView, { ...props, settings: this.host.settings });
|
|
96
|
-
this.game3d = (props) => React.createElement(game_view_1.Game3DView, { ...props, settings: this.host.settings });
|
|
97
98
|
this.diffEditor = (props) => React.createElement(diff_editor_1.DiffEditor, { ...props, settings: this.host.settings });
|
|
98
99
|
this.listDirectory = (directory) => this.host.workbench.workspace.listDirectory('.', directory);
|
|
99
100
|
/** The message box, whose button of the directory lists those of the server. */
|
|
@@ -112,6 +113,7 @@ class WebExtensionContext {
|
|
|
112
113
|
speak: (text, onEnd) => read_aloud_1.ReadAloud.of(this.host.workbench).speak(text, this.host.settings.state.language, onEnd !== null && onEnd !== void 0 ? onEnd : (() => undefined), this.host.settings.state.settings.voice),
|
|
113
114
|
hush: () => read_aloud_1.ReadAloud.of(this.host.workbench).hush(),
|
|
114
115
|
};
|
|
116
|
+
this.shareSheet = (props) => React.createElement(share_sheet_1.ShareSheet, { ...props, notices: this.host.notices, rooms: this.host.workbench.rooms });
|
|
115
117
|
this.modelPicker = (props) => React.createElement(model_picker_1.SettingsModelPicker, { ...props, settings: this.host.workbench.settings });
|
|
116
118
|
this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(folder_picker_1.FolderPicker, {
|
|
117
119
|
list: this.listDirectory,
|
|
@@ -153,6 +155,15 @@ class WebExtensionContext {
|
|
|
153
155
|
}
|
|
154
156
|
return parts.join('/');
|
|
155
157
|
}
|
|
158
|
+
/** The games of an extension, which Ta calls by its package's title on the screen unless they are given one. */
|
|
159
|
+
gamesOf(run) {
|
|
160
|
+
const { settings, screen } = this.host;
|
|
161
|
+
const title = () => (run.loaded.info ? web_pages_1.WebPagesUtil.title(run.loaded.info, settings.state.language) : run.loaded.name);
|
|
162
|
+
return {
|
|
163
|
+
Game: (props) => { var _a; return React.createElement(game_view_1.GameView, { ...props, title: (_a = props.title) !== null && _a !== void 0 ? _a : title(), settings, screen }); },
|
|
164
|
+
Game3D: (props) => { var _a; return React.createElement(game_view_1.Game3DView, { ...props, title: (_a = props.title) !== null && _a !== void 0 ? _a : title(), settings, screen }); },
|
|
165
|
+
};
|
|
166
|
+
}
|
|
156
167
|
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
157
168
|
composerOf(run) {
|
|
158
169
|
const name = run.loaded.name;
|
|
@@ -174,6 +185,8 @@ class WebExtensionContext {
|
|
|
174
185
|
// What it sends as the user says it came from this package (TaMessageSource): a page shows so.
|
|
175
186
|
const mark = (text) => ta_protocol_1.TaMessageSource.mark(text, run.loaded.name);
|
|
176
187
|
let server;
|
|
188
|
+
/** Listens while the extension runs, what it hears guarded as all it runs. */
|
|
189
|
+
const hear = (on, listener) => web_extension_run_1.WebExtensionRunUtil.track(run, () => on((...args) => host.guard(run, () => listener(...args))));
|
|
177
190
|
return {
|
|
178
191
|
React,
|
|
179
192
|
get server() {
|
|
@@ -205,15 +218,19 @@ class WebExtensionContext {
|
|
|
205
218
|
get remote() {
|
|
206
219
|
return workbench.remote;
|
|
207
220
|
},
|
|
221
|
+
get screenShare() {
|
|
222
|
+
return workbench.screenShare;
|
|
223
|
+
},
|
|
224
|
+
onScreenShareEvent: listener => hear(workbench.onScreenShareEvent.bind(workbench), listener),
|
|
208
225
|
get settings() {
|
|
209
226
|
return workbench.settings;
|
|
210
227
|
},
|
|
211
228
|
get rooms() {
|
|
212
229
|
return workbench.rooms;
|
|
213
230
|
},
|
|
214
|
-
onRoomEvent: (listener, options) =>
|
|
231
|
+
onRoomEvent: (listener, options) => hear(next => workbench.onRoomEvent(next, options), listener),
|
|
215
232
|
ui: this.ui(run, register),
|
|
216
|
-
onTerminalData: listener =>
|
|
233
|
+
onTerminalData: listener => hear(workbench.onTerminalData.bind(workbench), listener),
|
|
217
234
|
storage: { ...this.storage(run), directory: cwd => this.storage(run, cwd) },
|
|
218
235
|
registerView: (name, view) => register(() => run.views.set(name, view)),
|
|
219
236
|
registerMessageRenderer: (customType, renderer) => register(() => run.renderers.set(customType, renderer)),
|
|
@@ -276,7 +293,7 @@ class WebExtensionContext {
|
|
|
276
293
|
await shown;
|
|
277
294
|
}),
|
|
278
295
|
openChat: sessionFile => live(() => host.links.openConversation(sessionFile)),
|
|
279
|
-
openLink: url => live(() => host.links.open({ type: 'url', url })),
|
|
296
|
+
openLink: (url, options) => live(() => host.links.open({ type: 'url', url }, { onlyTa: options === null || options === void 0 ? void 0 : options.onlyTa })),
|
|
280
297
|
openTemporary: (source, from) => live(() => host.extensions.openTemporary(source, from)),
|
|
281
298
|
callHost: (method, ...params) => live(() => workbench.packages.callPackageHost(run.loaded.name, method, params)),
|
|
282
299
|
reloadExtensions: () => live(() => host.extensions.reloadPackages()),
|
|
@@ -380,23 +397,15 @@ class WebExtensionContext {
|
|
|
380
397
|
return [menu, openSections];
|
|
381
398
|
},
|
|
382
399
|
attachMenu: context_menu_1.ContextMenuUtil.attach,
|
|
383
|
-
scanCode:
|
|
384
|
-
? instructions => (run.stopped ? Promise.resolve(undefined) :
|
|
400
|
+
scanCode: code_scan_1.CodeScan.available()
|
|
401
|
+
? instructions => (run.stopped ? Promise.resolve(undefined) : code_scan_1.CodeScan.read(instructions, (0, messages_1.message)(settings.state.language, 'ta.cancel')))
|
|
385
402
|
: undefined,
|
|
386
403
|
scan: code_scan_1.CodeScan.available() ? () => (run.stopped ? Promise.resolve() : new code_scan_1.CodeScan(host).scan()) : undefined,
|
|
387
404
|
stopExtension: name => !run.stopped && host.extensions.stopExtension(name),
|
|
388
405
|
shareExtension: target => !run.stopped && host.extensions.share(target),
|
|
389
406
|
custom: component => web_extension_run_1.WebExtensionRunUtil.track(run, () => host.extensions.showCustom(run.loaded.name, component)),
|
|
390
407
|
answer: (kind, handler) => web_extension_run_1.WebExtensionRunUtil.track(run, () => workbench.pages.answer(`${run.loaded.name}/${kind}`, handler)),
|
|
391
|
-
screen:
|
|
392
|
-
agent: host.screen.agent,
|
|
393
|
-
parts: () => host.screen.parts(),
|
|
394
|
-
act: (part, action, item, input, button) => host.screen.act(part, action, item, input, button),
|
|
395
|
-
element: (part, item, action) => host.screen.element(part, item, action),
|
|
396
|
-
where: () => host.screen.where(),
|
|
397
|
-
places: () => host.screen.places(),
|
|
398
|
-
go: to => (run.stopped ? Promise.resolve(false) : host.screen.go(to)),
|
|
399
|
-
},
|
|
408
|
+
screen: screen_protocol_1.ScreenUtil.forExtension(host.screen, () => run.stopped),
|
|
400
409
|
useScreenPart: spec => {
|
|
401
410
|
const latest = React.useRef(spec);
|
|
402
411
|
latest.current = spec;
|
|
@@ -420,6 +429,7 @@ class WebExtensionContext {
|
|
|
420
429
|
forgetPage: id => !run.stopped && host.extensions.forgetPage(id),
|
|
421
430
|
useTasks: () => React.useSyncExternalStore(host.extensions.tasks.subscribe, host.extensions.tasks.tasks, host.extensions.tasks.tasks),
|
|
422
431
|
useHomeItems: () => React.useSyncExternalStore(host.extensions.home.subscribe, host.extensions.home.items, host.extensions.home.items),
|
|
432
|
+
doubleInChats: true,
|
|
423
433
|
useRoomAddons: () => {
|
|
424
434
|
const read = () => host.extensions.state.roomAddons;
|
|
425
435
|
const subscribe = React.useCallback((listener) => host.extensions.subscribe(listener), []);
|
|
@@ -440,8 +450,7 @@ class WebExtensionContext {
|
|
|
440
450
|
}
|
|
441
451
|
return terminal;
|
|
442
452
|
},
|
|
443
|
-
|
|
444
|
-
Game3D: this.game3d,
|
|
453
|
+
...this.gamesOf(run),
|
|
445
454
|
FullScreen: full_screen_1.FullScreen,
|
|
446
455
|
Stack: phone_shell_1.PhoneStack,
|
|
447
456
|
Face: face_1.Face,
|
|
@@ -453,7 +462,8 @@ class WebExtensionContext {
|
|
|
453
462
|
Conversation: conversation_view_1.ConversationView,
|
|
454
463
|
useChatScroll: (sent, key) => (0, conversation_scroll_hooks_1.useConversationScroll)(sent, { sentTo: 'bottom', key }),
|
|
455
464
|
Empty: empty_state_1.EmptyState,
|
|
456
|
-
|
|
465
|
+
Loading: loading_1.Loading,
|
|
466
|
+
Skeleton: loading_1.Loading,
|
|
457
467
|
useBusy: busy_1.useBusy,
|
|
458
468
|
useBackLayer: (open, close) => (0, back_stack_1.useBackLayer)(open, close).top,
|
|
459
469
|
Switch: settings_controls_1.Switch,
|
|
@@ -461,10 +471,12 @@ class WebExtensionContext {
|
|
|
461
471
|
SwipeRow: swipe_row_1.SwipeRow,
|
|
462
472
|
SelectCheck: select_bar_1.SelectCheck,
|
|
463
473
|
SelectBar: select_bar_1.SelectBar,
|
|
474
|
+
TaskIcon: task_views_1.TaskIcon,
|
|
464
475
|
Picture: picture_1.Picture,
|
|
465
476
|
PictureCards: picture_1.PictureCards,
|
|
466
477
|
ImageViewer: image_viewer_1.ImageViewer,
|
|
467
478
|
QrCode: qr_view_1.QrView,
|
|
479
|
+
ShareSheet: this.shareSheet,
|
|
468
480
|
Dialog: web_dialog_1.WebDialog,
|
|
469
481
|
FolderPicker: this.folderPicker,
|
|
470
482
|
ModelPicker: this.modelPicker,
|
|
@@ -2,7 +2,7 @@ import type { TaEvent, TaTemporaryFrom, TaWebExtensionInfo } from '@celljs/ta-pr
|
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { MessageId } from '../i18n/messages';
|
|
4
4
|
import type { BlockSpeech } from '../util/spoken';
|
|
5
|
-
import type { WebAvatarProps, WebCallPartner, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebIcon, WebImage, WebInitiative, WebLabel, WebMenuItem, WebOpener, WebPageGroup, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTool, WebToolRendererResolver, WebViewLocation, WebViewPreview, WidgetOptions } from './web-extension-api';
|
|
5
|
+
import type { WebAvatarProps, WebCallPartner, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebHomeEntry, WebIcon, WebImage, WebInitiative, WebLabel, WebMenuItem, WebOpener, WebPageGroup, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTool, WebToolRendererResolver, WebViewLocation, WebViewPreview, WidgetOptions } from './web-extension-api';
|
|
6
6
|
import type { WebHomeBoard } from './web-home';
|
|
7
7
|
import type { PageUsage, WebPageInfo } from './web-pages';
|
|
8
8
|
import type { WebTaskBoard } from './web-tasks';
|
|
@@ -61,8 +61,6 @@ export interface WebViewEntry {
|
|
|
61
61
|
/** Of an extension started on open (ta-launcher.md): never in the navigation, which would change as it starts and stops. */
|
|
62
62
|
onOpen?: boolean;
|
|
63
63
|
pages?: string[];
|
|
64
|
-
/** Under Discover until the user pins it (WebView.discover). */
|
|
65
|
-
discover?: boolean;
|
|
66
64
|
/** Its group under Discover (WebView.group). */
|
|
67
65
|
group?: WebPageGroup;
|
|
68
66
|
/** Never in the navigation nor under Discover (WebView.navigation). */
|
|
@@ -163,6 +161,11 @@ export interface WebExtensionsState {
|
|
|
163
161
|
page: string;
|
|
164
162
|
/** Counts the pages shown, the same one again too: on a phone a page shown comes to the front. */
|
|
165
163
|
pageShown: number;
|
|
164
|
+
/**
|
|
165
|
+
* The key of the row of the double's home that showed the page (TaWebExtensions.openHome): the page shows as a
|
|
166
|
+
* conversation of the list does, beside it, the row selected. Any other page shown, it goes.
|
|
167
|
+
*/
|
|
168
|
+
pageFrom?: string;
|
|
166
169
|
/** The list of chats asked for (ui.showChats), counted, the same again too; `busy` to show only those going on. */
|
|
167
170
|
chatsShown: {
|
|
168
171
|
count: number;
|
|
@@ -243,6 +246,8 @@ export interface TaWebExtensions {
|
|
|
243
246
|
openView(id: string): void;
|
|
244
247
|
/** Shows a page in the main area by the id of its view, or the conversation for `''`. */
|
|
245
248
|
showPage(id: string): void;
|
|
249
|
+
/** Opens a row of the double's home: a page it shows meanwhile is shown as from the list (WebExtensionsState.pageFrom). */
|
|
250
|
+
openHome(entry: WebHomeEntry): Promise<void>;
|
|
246
251
|
/**
|
|
247
252
|
* Shows a view by its id as `ui.showView` does: an extension started on open is started first, and the
|
|
248
253
|
* name of one opens its first page. Resolves once it shows; false when there is no such view.
|
|
@@ -94,7 +94,6 @@ var WebExtensionRunUtil;
|
|
|
94
94
|
order: (_g = view.order) !== null && _g !== void 0 ? _g : DEFAULT_ORDER,
|
|
95
95
|
head: view.head,
|
|
96
96
|
pages: view.pages,
|
|
97
|
-
discover: view.discover,
|
|
98
97
|
group: view.group,
|
|
99
98
|
...(view.navigation === false ? { navigation: false } : {}),
|
|
100
99
|
menu: (_a = view.menu) === null || _a === void 0 ? void 0 : _a.bind(view),
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { TaEvent, TaTemporaryFrom } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import type { WebShareTarget } from './web-extension-api';
|
|
3
|
+
import type { WebHomeEntry, WebShareTarget } from './web-extension-api';
|
|
4
4
|
import { WebExtensionContext, type WebExtensionContextHost } from './web-extension-context';
|
|
5
5
|
import { TaWebExtensions, type WebEditorEntry, type WebExtensionConversation, type WebExtensionsState, type WebSessionSwitcher } from './web-extension-protocol';
|
|
6
6
|
import { WebExtensionsRunning } from './web-extensions-running';
|
|
7
7
|
import type { WebPageInfo } from './web-pages';
|
|
8
8
|
import { WebSharing } from './web-sharing';
|
|
9
9
|
export declare class TaWebExtensionsImpl extends WebExtensionsRunning implements TaWebExtensions {
|
|
10
|
+
/** The key of the row of the double's home being opened (openHome). */
|
|
11
|
+
protected homeOpening?: string;
|
|
10
12
|
subscribe(listener: (state: WebExtensionsState) => void): () => void;
|
|
11
13
|
/** One at a time: a refresh while one runs follows it. */
|
|
12
14
|
refresh(): Promise<boolean>;
|
|
@@ -17,6 +19,7 @@ export declare class TaWebExtensionsImpl extends WebExtensionsRunning implements
|
|
|
17
19
|
reloadPackages(): Promise<void>;
|
|
18
20
|
showEditor(id: string): void;
|
|
19
21
|
openView(id: string, preserveFocus?: boolean): void;
|
|
22
|
+
openHome(entry: WebHomeEntry): Promise<void>;
|
|
20
23
|
showPage(id: string): void;
|
|
21
24
|
showChats(busy: boolean): void;
|
|
22
25
|
hidePage(): void;
|
|
@@ -71,12 +71,24 @@ let TaWebExtensionsImpl = class TaWebExtensionsImpl extends web_extensions_runni
|
|
|
71
71
|
this.open({ id: web_view_util_1.WebViewUtil.editorId(view.id), extension: run.loaded.id, title: view.title, icon: view.icon, render: view.component }, preserveFocus);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
async openHome(entry) {
|
|
75
|
+
this.homeOpening = entry.key;
|
|
76
|
+
try {
|
|
77
|
+
await entry.open();
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
if (this.homeOpening === entry.key) {
|
|
81
|
+
this.homeOpening = undefined;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
74
85
|
showPage(id) {
|
|
75
86
|
this.persisted.set(web_view_util_1.WebViewUtil.PAGE, id);
|
|
76
87
|
this.onDemand.shown(this.current.views.find(view => view.id === id));
|
|
77
88
|
this.update({
|
|
78
89
|
page: id,
|
|
79
90
|
pageShown: this.current.pageShown + 1,
|
|
91
|
+
pageFrom: id ? this.homeOpening : undefined,
|
|
80
92
|
pageHidden: false,
|
|
81
93
|
kept: this.onDemand.kept(),
|
|
82
94
|
onOpen: this.onDemand.list(),
|
|
@@ -15,10 +15,15 @@ export interface WebTaskGroups {
|
|
|
15
15
|
}
|
|
16
16
|
export declare namespace WebTaskUtil {
|
|
17
17
|
function key(extension: string, id: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* How many wait for the user to decide (status `waiting`): the double's tasks and the conversations of the user's
|
|
20
|
+
* own that ask, a row each. The double's home lists them first, and the entry of the double counts them.
|
|
21
|
+
*/
|
|
22
|
+
function deciding(tasks: readonly Pick<WebTask, 'status'>[]): number;
|
|
18
23
|
/** How many a gathered row stands for (WebTask.gathered); 1 for a task. */
|
|
19
24
|
function size(task: Pick<WebTask, 'gathered'>): number;
|
|
20
25
|
function ended(task: Pick<WebTask, 'status'>): boolean;
|
|
21
|
-
/** Each group the latest first: by when it started while it goes on, by when it ended after. */
|
|
26
|
+
/** Each group the latest first: by when it started while it goes on (those at rest too), by when it ended after. */
|
|
22
27
|
function groups(tasks: readonly WebTaskEntry[]): WebTaskGroups;
|
|
23
28
|
/** `12s`, `3m 05s`, `1h 02m`: from its start to its end, or to now. */
|
|
24
29
|
function elapsed(task: Pick<WebTask, 'startedAt' | 'endedAt'>, now: number): string;
|
|
@@ -7,6 +7,14 @@ var WebTaskUtil;
|
|
|
7
7
|
return `${extension}/${id}`;
|
|
8
8
|
}
|
|
9
9
|
WebTaskUtil.key = key;
|
|
10
|
+
/**
|
|
11
|
+
* How many wait for the user to decide (status `waiting`): the double's tasks and the conversations of the user's
|
|
12
|
+
* own that ask, a row each. The double's home lists them first, and the entry of the double counts them.
|
|
13
|
+
*/
|
|
14
|
+
function deciding(tasks) {
|
|
15
|
+
return tasks.filter(task => task.status === 'waiting').length;
|
|
16
|
+
}
|
|
17
|
+
WebTaskUtil.deciding = deciding;
|
|
10
18
|
/** How many a gathered row stands for (WebTask.gathered); 1 for a task. */
|
|
11
19
|
function size(task) {
|
|
12
20
|
const { gathered } = task;
|
|
@@ -14,15 +22,15 @@ var WebTaskUtil;
|
|
|
14
22
|
}
|
|
15
23
|
WebTaskUtil.size = size;
|
|
16
24
|
function ended(task) {
|
|
17
|
-
return task.status !== 'running' && task.status !== 'waiting';
|
|
25
|
+
return task.status !== 'running' && task.status !== 'waiting' && task.status !== 'idle';
|
|
18
26
|
}
|
|
19
27
|
WebTaskUtil.ended = ended;
|
|
20
|
-
/** Each group the latest first: by when it started while it goes on, by when it ended after. */
|
|
28
|
+
/** Each group the latest first: by when it started while it goes on (those at rest too), by when it ended after. */
|
|
21
29
|
function groups(tasks) {
|
|
22
30
|
const latest = (a, b) => b.startedAt - a.startedAt;
|
|
23
31
|
return {
|
|
24
32
|
waiting: tasks.filter(task => task.status === 'waiting').sort(latest),
|
|
25
|
-
running: tasks.filter(task => task.status === 'running').sort(latest),
|
|
33
|
+
running: tasks.filter(task => task.status === 'running' || task.status === 'idle').sort(latest),
|
|
26
34
|
ended: tasks.filter(ended).sort((a, b) => { var _a, _b; return ((_a = b.endedAt) !== null && _a !== void 0 ? _a : b.startedAt) - ((_b = a.endedAt) !== null && _b !== void 0 ? _b : a.startedAt); }),
|
|
27
35
|
};
|
|
28
36
|
}
|
|
@@ -35,7 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.WebViewUtil = exports.WebExtensionUtil = void 0;
|
|
37
37
|
const React = __importStar(require("react"));
|
|
38
|
-
const
|
|
38
|
+
const loading_1 = require("../components/loading");
|
|
39
39
|
const state_protocol_1 = require("../state/state-protocol");
|
|
40
40
|
const icons_1 = require("./icons");
|
|
41
41
|
const web_extension_protocol_1 = require("./web-extension-protocol");
|
|
@@ -110,7 +110,7 @@ var WebViewUtil;
|
|
|
110
110
|
typeof view.order === 'number');
|
|
111
111
|
}
|
|
112
112
|
function keep(views) {
|
|
113
|
-
return views.flatMap(({ id, extension, title, icon, location, order, pages,
|
|
113
|
+
return views.flatMap(({ id, extension, title, icon, location, order, pages, group, head, onOpen, navigation }) => (location !== 'page' && location !== 'sidebar') || onOpen || navigation === false
|
|
114
114
|
? []
|
|
115
115
|
: [
|
|
116
116
|
{
|
|
@@ -121,7 +121,6 @@ var WebViewUtil;
|
|
|
121
121
|
location,
|
|
122
122
|
order,
|
|
123
123
|
pages,
|
|
124
|
-
discover,
|
|
125
124
|
...(group ? { group } : {}),
|
|
126
125
|
...(head ? { head: true } : {}),
|
|
127
126
|
},
|
|
@@ -134,13 +133,13 @@ var WebViewUtil;
|
|
|
134
133
|
...view,
|
|
135
134
|
icon: icon ? icons_1.WEB_ICONS[icon] : undefined,
|
|
136
135
|
component: Pending,
|
|
137
|
-
head: head && view.location === 'sidebar' ?
|
|
136
|
+
head: head && view.location === 'sidebar' ? loading_1.LoadingHead : undefined,
|
|
138
137
|
pending: true,
|
|
139
138
|
}));
|
|
140
139
|
}
|
|
141
140
|
WebViewUtil.placeholders = placeholders;
|
|
142
141
|
function Pending() {
|
|
143
|
-
return React.createElement(
|
|
142
|
+
return React.createElement(loading_1.Loading);
|
|
144
143
|
}
|
|
145
144
|
/** What to keep of the tabs: the views open, and the one shown, or the one still to open again. */
|
|
146
145
|
function tabs(editors, active) {
|
|
@@ -21,6 +21,7 @@ export declare class TaFilesImpl implements TaFiles {
|
|
|
21
21
|
protected held: number;
|
|
22
22
|
/** The computer the URLs made are of: those of another say nothing of its files. */
|
|
23
23
|
protected of?: string;
|
|
24
|
+
/** Loaded as they are by their URL: from the ta serve of the page, whose cookie or token of the URL lets them in. */
|
|
24
25
|
get byUrl(): boolean;
|
|
25
26
|
read(url: string): Promise<TaFileBytes>;
|
|
26
27
|
loadable(url: string): Promise<string>;
|
|
@@ -26,19 +26,30 @@ let TaFilesImpl = class TaFilesImpl {
|
|
|
26
26
|
this.made = new Map();
|
|
27
27
|
this.held = 0;
|
|
28
28
|
}
|
|
29
|
+
/** Loaded as they are by their URL: from the ta serve of the page, whose cookie or token of the URL lets them in. */
|
|
29
30
|
get byUrl() {
|
|
30
31
|
const credential = this.credential();
|
|
31
|
-
return !credential || !('pairing' in credential);
|
|
32
|
+
return !credential || !('pairing' in credential || credential.url);
|
|
32
33
|
}
|
|
33
34
|
async read(url) {
|
|
34
|
-
var _a;
|
|
35
|
+
var _a, _b;
|
|
36
|
+
const credential = this.credential();
|
|
37
|
+
if (credential && !('pairing' in credential) && credential.url) {
|
|
38
|
+
// Ta at another address (the cloud, from the app or Ta Desktop): its token, which a cookie of this page is not.
|
|
39
|
+
const response = await fetch(new URL(url, `${credential.url}/`), { cache: 'no-cache', headers: { authorization: `Bearer ${credential.token}` } });
|
|
40
|
+
if (!response.ok) {
|
|
41
|
+
throw new Error(`The file is not there (${response.status}).`);
|
|
42
|
+
}
|
|
43
|
+
const data = new Uint8Array(await response.arrayBuffer());
|
|
44
|
+
return { type: (_a = response.headers.get('content-type')) !== null && _a !== void 0 ? _a : 'application/octet-stream', size: data.length, data };
|
|
45
|
+
}
|
|
35
46
|
if (this.byUrl) {
|
|
36
47
|
const response = await fetch(url, { cache: 'no-cache' });
|
|
37
48
|
if (!response.ok) {
|
|
38
49
|
throw new Error(`The file is not there (${response.status}).`);
|
|
39
50
|
}
|
|
40
51
|
const data = new Uint8Array(await response.arrayBuffer());
|
|
41
|
-
return { type: (
|
|
52
|
+
return { type: (_b = response.headers.get('content-type')) !== null && _b !== void 0 ? _b : 'application/octet-stream', size: data.length, data };
|
|
42
53
|
}
|
|
43
54
|
return this.relayed(this.pairing()).get(url);
|
|
44
55
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { ScreenPartSpec } from '../screen/screen-protocol';
|
|
2
|
+
import type { GamePoint, GameState } from './game-protocol';
|
|
3
|
+
/** A key as a keyboard event says it: `key`, `code`, and the `keyCode` Phaser reads. */
|
|
4
|
+
export interface GameKey {
|
|
5
|
+
key: string;
|
|
6
|
+
code: string;
|
|
7
|
+
keyCode: number;
|
|
8
|
+
}
|
|
9
|
+
/** How a game stands, for its part of the screen (GameControl.spec). */
|
|
10
|
+
export interface GameStanding {
|
|
11
|
+
/** Its engine loaded and the game made. */
|
|
12
|
+
started: boolean;
|
|
13
|
+
/** Out of sight: its loop stopped. */
|
|
14
|
+
sleeping?: boolean;
|
|
15
|
+
/** It failed: why. */
|
|
16
|
+
error?: string;
|
|
17
|
+
state?: GameState;
|
|
18
|
+
}
|
|
19
|
+
/** What the actions of a game are called on the user's screen (the cursor's caption). */
|
|
20
|
+
export interface GameControlLabels {
|
|
21
|
+
point: string;
|
|
22
|
+
move: string;
|
|
23
|
+
key: string;
|
|
24
|
+
hold: string;
|
|
25
|
+
}
|
|
26
|
+
/** What Ta's input to a game takes, checked: pure, for GameControl and its tests. */
|
|
27
|
+
export declare namespace GameControlUtil {
|
|
28
|
+
/** What the id of the part of a game starts with (`data-ta-part`): `game-1`, `game-2`. */
|
|
29
|
+
const PART = "game";
|
|
30
|
+
/**
|
|
31
|
+
* The id of the part of a game, its own on the page: a game kept in the background beside the one shown, or one in a
|
|
32
|
+
* card beside a page, is another part, which the screen tells apart by its element.
|
|
33
|
+
*/
|
|
34
|
+
function partId(): string;
|
|
35
|
+
/** The pointer of Ta's touches: no finger or mouse of the user has it. */
|
|
36
|
+
const POINTER_ID = 7071;
|
|
37
|
+
/** How long a tap or a key pressed once is held. */
|
|
38
|
+
const TAP_MS = 60;
|
|
39
|
+
/** How long a hold is without `input.ms`. */
|
|
40
|
+
const HOLD_MS = 500;
|
|
41
|
+
const HOLD_MIN = 30;
|
|
42
|
+
const HOLD_MAX = 5000;
|
|
43
|
+
/** The moves of a drag, and the time between them. */
|
|
44
|
+
const DRAG_STEPS = 6;
|
|
45
|
+
const DRAG_STEP_MS = 16;
|
|
46
|
+
const KEYS: string[];
|
|
47
|
+
/** A coordinate of the canvas, from 0 to 1; throws for anything else. */
|
|
48
|
+
function coordinate(value: unknown, name: 'x' | 'y'): number;
|
|
49
|
+
/** `input.x` and `input.y`; `y` may be left out when `fallback` gives it (a move keeps the height it was at). */
|
|
50
|
+
function point(input: Record<string, unknown>, fallback?: number): GamePoint;
|
|
51
|
+
/** A key by its name (`ArrowLeft`, `Space`, `Enter`, any case), a letter or a digit; throws for another. */
|
|
52
|
+
function key(value: unknown): GameKey;
|
|
53
|
+
/** How long to hold, in ms, from HOLD_MIN to HOLD_MAX; `fallback` without one. */
|
|
54
|
+
function ms(value: unknown, fallback: number): number;
|
|
55
|
+
/** What a game said of its round, only what it is: a finite score, a boolean over. */
|
|
56
|
+
function state(value: {
|
|
57
|
+
score?: unknown;
|
|
58
|
+
over?: unknown;
|
|
59
|
+
} | undefined): GameState | undefined;
|
|
60
|
+
/** The state of the part, a line for the agent: `running · canvas 390×678 · score 12`. */
|
|
61
|
+
function describe(standing: GameStanding, size: {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
} | undefined): string;
|
|
65
|
+
function at(point: GamePoint): string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Ta's hands on a game (docs/design/ta-games.md): a tap, a move of the pointer, a drag, a key and a hold, as events
|
|
69
|
+
* of the page on the game's own canvas, so that Phaser, Three.js and a game's own listeners take them as they take
|
|
70
|
+
* the user's. Pointer and mouse events only, never touch events: every gesture of the shell (a sheet, a long press, a
|
|
71
|
+
* pull, a row's swipe) starts from a touch, so nothing Ta does to a game moves the page. Keys go to the game's
|
|
72
|
+
* element, where it hears the keyboard (GameHost).
|
|
73
|
+
*/
|
|
74
|
+
export declare class GameControl {
|
|
75
|
+
protected readonly element: HTMLElement;
|
|
76
|
+
/** Where Ta's pointer is on the canvas: a move without `y` keeps it, a drag starts there. */
|
|
77
|
+
protected last?: GamePoint;
|
|
78
|
+
protected readonly guarded: WeakSet<HTMLElement>;
|
|
79
|
+
/** `element`: the game's, which holds its canvas and hears its keys. */
|
|
80
|
+
constructor(element: HTMLElement);
|
|
81
|
+
/** What is drawn on: the engine's canvas, else the element. */
|
|
82
|
+
canvas(): HTMLElement;
|
|
83
|
+
/** The canvas's size in CSS pixels, once laid out. */
|
|
84
|
+
size(): {
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
} | undefined;
|
|
88
|
+
/** A tap there: down, a moment, up and a click. */
|
|
89
|
+
point(at: GamePoint): Promise<void>;
|
|
90
|
+
/** The pointer goes there, as a mouse over the game; with `drag`, there from where it was with the button down. */
|
|
91
|
+
move(to: GamePoint, drag?: boolean): Promise<void>;
|
|
92
|
+
/** Presses the pointer there for `ms`. */
|
|
93
|
+
press(at: GamePoint, ms: number): Promise<void>;
|
|
94
|
+
/** Presses a key for `ms`, on the game's element. */
|
|
95
|
+
key(key: GameKey, ms?: number): Promise<void>;
|
|
96
|
+
/** Where Ta's pointer is on the canvas, once it was there. */
|
|
97
|
+
get at(): GamePoint | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* The part of the screen of a game while it is mounted (useScreenPart): how it stands and what Ta does to it.
|
|
100
|
+
* `standing` and `control` (none before the game's element is there) are read at each look and each action; an
|
|
101
|
+
* action before the game started does nothing and says so.
|
|
102
|
+
*/
|
|
103
|
+
static spec(id: string, title: string, labels: GameControlLabels, standing: () => GameStanding, control: () => GameControl | undefined): ScreenPartSpec;
|
|
104
|
+
protected down(at: GamePoint): void;
|
|
105
|
+
protected up(at: GamePoint, click: boolean): void;
|
|
106
|
+
/** A pointer event and the mouse event a browser sends with it (Phaser hears the mouse, Three.js the pointer). */
|
|
107
|
+
protected pointer(type: 'down' | 'move' | 'up', at: GamePoint, buttons: number): void;
|
|
108
|
+
protected mouse(type: string, at: GamePoint, buttons: number): void;
|
|
109
|
+
protected init(canvas: HTMLElement, at: GamePoint, buttons: number): MouseEventInit;
|
|
110
|
+
/** Phaser reads `keyCode`, which a KeyboardEvent made by a page cannot be given. */
|
|
111
|
+
protected keyEvent(type: 'keydown' | 'keyup', key: GameKey): void;
|
|
112
|
+
/**
|
|
113
|
+
* A game captures the pointer that pressed it (`setPointerCapture(event.pointerId)`), which throws for a pointer the
|
|
114
|
+
* browser does not know: for Ta's, nothing is captured and nothing throws.
|
|
115
|
+
*/
|
|
116
|
+
protected guard(target: HTMLElement): void;
|
|
117
|
+
protected view(): Window & typeof globalThis;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=game-control.d.ts.map
|