@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
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useCloudReach = useCloudReach;
|
|
37
|
+
exports.useBuiltInWays = useBuiltInWays;
|
|
38
|
+
exports.useBuiltInState = useBuiltInState;
|
|
39
|
+
exports.BuiltInSignIn = BuiltInSignIn;
|
|
40
|
+
exports.useCloudSignIn = useCloudSignIn;
|
|
41
|
+
exports.CodeBox = CodeBox;
|
|
42
|
+
exports.CloudSignInEntry = CloudSignInEntry;
|
|
43
|
+
exports.CloudSignInFlow = CloudSignInFlow;
|
|
44
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
45
|
+
const lucide_react_1 = require("lucide-react");
|
|
46
|
+
const React = __importStar(require("react"));
|
|
47
|
+
const react_dom_1 = require("react-dom");
|
|
48
|
+
const cloud_sign_in_1 = require("../cloud/cloud-sign-in");
|
|
49
|
+
const edge_back_1 = require("../device/edge-back");
|
|
50
|
+
const hooks_1 = require("../hooks");
|
|
51
|
+
const hosts_1 = require("../hosts");
|
|
52
|
+
const use_t_1 = require("../i18n/use-t");
|
|
53
|
+
const workbench_util_1 = require("../workbench-util");
|
|
54
|
+
const callout_1 = require("./callout");
|
|
55
|
+
const icon_1 = require("./icon");
|
|
56
|
+
const sign_in_accounts_1 = require("./sign-in-accounts");
|
|
57
|
+
const sign_in_marks_1 = require("./sign-in-marks");
|
|
58
|
+
const ta_avatar_1 = require("./ta-avatar");
|
|
59
|
+
let distribution;
|
|
60
|
+
let builtIn;
|
|
61
|
+
/** How often the sign-in asks again a gateway out of reach while it is seen: the user may have just turned on the VPN. */
|
|
62
|
+
const RECHECK_MS = 8000;
|
|
63
|
+
/** Whether this device keeps the gateway at `url` among its computers: signed in to it before. */
|
|
64
|
+
function signedIn(url) {
|
|
65
|
+
var _a;
|
|
66
|
+
return hosts_1.HostUtil.read((_a = globalThis.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(hosts_1.HostUtil.KEY)).hosts.some(host => 'url' in host.credential && host.credential.url === url);
|
|
67
|
+
}
|
|
68
|
+
function lookUp() {
|
|
69
|
+
distribution !== null && distribution !== void 0 ? distribution : (distribution = cloud_sign_in_1.CloudSignInUtil.distribution());
|
|
70
|
+
builtIn !== null && builtIn !== void 0 ? builtIn : (builtIn = distribution.then(async (given) => {
|
|
71
|
+
var _a;
|
|
72
|
+
const chosen = cloud_sign_in_1.CloudSignInUtil.chosen();
|
|
73
|
+
const gateway = chosen !== null && chosen !== void 0 ? chosen : given === null || given === void 0 ? void 0 : given.gateway;
|
|
74
|
+
if (!gateway) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
const own = chosen ? {} : { name: given === null || given === void 0 ? void 0 : given.name, reach: given === null || given === void 0 ? void 0 : given.reach };
|
|
78
|
+
const providers = await cloud_sign_in_1.CloudSignInUtil.ways(gateway);
|
|
79
|
+
if (providers.length === 0 && !(await cloud_sign_in_1.CloudSignInUtil.answers(gateway))) {
|
|
80
|
+
// Asked again next time: the gateway may be out of reach (no VPN) for now.
|
|
81
|
+
builtIn = undefined;
|
|
82
|
+
const remembered = (_a = cloud_sign_in_1.CloudSignInUtil.remembered(gateway)) !== null && _a !== void 0 ? _a : [];
|
|
83
|
+
const away = { url: gateway, ...own, providers: remembered, unreachable: true };
|
|
84
|
+
const inside = chosen ? undefined : given === null || given === void 0 ? void 0 : given.inside;
|
|
85
|
+
if (inside) {
|
|
86
|
+
// Inside the company's network (its sign-in answers) but not its VPN: the company's way, and how to reach
|
|
87
|
+
// it. Outside it altogether: as if the build had no deployment.
|
|
88
|
+
return (await cloud_sign_in_1.CloudSignInUtil.within(inside)) ? away : undefined;
|
|
89
|
+
}
|
|
90
|
+
return chosen || remembered.length > 0 || signedIn(gateway) ? away : undefined;
|
|
91
|
+
}
|
|
92
|
+
cloud_sign_in_1.CloudSignInUtil.remember(gateway, providers);
|
|
93
|
+
return { url: gateway, ...own, providers };
|
|
94
|
+
}));
|
|
95
|
+
return builtIn;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* What a device does to reach the gateway at `url`, in the language of the page: told by the build for its deployment
|
|
99
|
+
* (TaDistribution.reach); none for another.
|
|
100
|
+
*/
|
|
101
|
+
function useCloudReach(url) {
|
|
102
|
+
const language = (0, use_t_1.useLanguage)();
|
|
103
|
+
const [reach, setReach] = React.useState();
|
|
104
|
+
React.useEffect(() => {
|
|
105
|
+
let live = true;
|
|
106
|
+
if (url) {
|
|
107
|
+
distribution !== null && distribution !== void 0 ? distribution : (distribution = cloud_sign_in_1.CloudSignInUtil.distribution());
|
|
108
|
+
void distribution.then(given => live && setReach((given === null || given === void 0 ? void 0 : given.gateway) === url ? given.reach : undefined));
|
|
109
|
+
}
|
|
110
|
+
return () => {
|
|
111
|
+
live = false;
|
|
112
|
+
};
|
|
113
|
+
}, [url]);
|
|
114
|
+
return url ? ta_protocol_1.TaDeploymentUtil.reachIn(reach, language) : undefined;
|
|
115
|
+
}
|
|
116
|
+
/** Calls `again` when the page is seen again or the network comes back, and now and then while it is seen. */
|
|
117
|
+
function useWhenBack(active, again) {
|
|
118
|
+
const call = React.useRef(again);
|
|
119
|
+
call.current = again;
|
|
120
|
+
React.useEffect(() => {
|
|
121
|
+
if (!active) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const seen = () => document.visibilityState === 'visible' && call.current();
|
|
125
|
+
document.addEventListener('visibilitychange', seen);
|
|
126
|
+
window.addEventListener('online', seen);
|
|
127
|
+
const timer = setInterval(seen, RECHECK_MS);
|
|
128
|
+
return () => {
|
|
129
|
+
document.removeEventListener('visibilitychange', seen);
|
|
130
|
+
window.removeEventListener('online', seen);
|
|
131
|
+
clearInterval(timer);
|
|
132
|
+
};
|
|
133
|
+
}, [active]);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The ways to sign in of the Ta in the cloud of this build's deployment (a company's accounts), offered first on the
|
|
137
|
+
* sign-in: one tap goes to them, no address, no code. Undefined in a build for none; with no ways while its gateway does
|
|
138
|
+
* not answer, still the one signed in to, never an address to type.
|
|
139
|
+
*/
|
|
140
|
+
function useBuiltInWays() {
|
|
141
|
+
return useBuiltInState().known;
|
|
142
|
+
}
|
|
143
|
+
/** How long the sign-in waits, the first time, for the gateway of its deployment before it is drawn without it. */
|
|
144
|
+
const SETTLE_MS = 1500;
|
|
145
|
+
/** What the last look found, for a sign-in drawn again in this page: as it was, at once. */
|
|
146
|
+
let lastFound;
|
|
147
|
+
/**
|
|
148
|
+
* What the last sign-in knew of the Ta in the cloud of this build, at once: none for a build without one; its ways
|
|
149
|
+
* kept on this device when it reached it before. `wait`: nothing known yet, the gateway is asked.
|
|
150
|
+
*/
|
|
151
|
+
async function known() {
|
|
152
|
+
distribution !== null && distribution !== void 0 ? distribution : (distribution = cloud_sign_in_1.CloudSignInUtil.distribution());
|
|
153
|
+
const given = await distribution;
|
|
154
|
+
const chosen = cloud_sign_in_1.CloudSignInUtil.chosen();
|
|
155
|
+
const gateway = chosen !== null && chosen !== void 0 ? chosen : given === null || given === void 0 ? void 0 : given.gateway;
|
|
156
|
+
if (!gateway) {
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
const kept = cloud_sign_in_1.CloudSignInUtil.remembered(gateway);
|
|
160
|
+
return (kept === null || kept === void 0 ? void 0 : kept.length) ? { url: gateway, ...(chosen ? {} : { name: given === null || given === void 0 ? void 0 : given.name, reach: given === null || given === void 0 ? void 0 : given.reach }), providers: kept } : 'wait';
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* useBuiltInWays, and whether the sign-in may be drawn yet (`settled`): once what it shows will stay, so that it is not
|
|
164
|
+
* a page of a computer turning into one of a company's accounts. What this device kept shows at once; the first time,
|
|
165
|
+
* the gateway is waited for SETTLE_MS at most.
|
|
166
|
+
*/
|
|
167
|
+
function useBuiltInState() {
|
|
168
|
+
const [found, setFound] = React.useState(lastFound === null || lastFound === void 0 ? void 0 : lastFound.known);
|
|
169
|
+
const [settled, setSettled] = React.useState(Boolean(lastFound));
|
|
170
|
+
const live = React.useRef(true);
|
|
171
|
+
const look = React.useCallback(() => void lookUp().then(given => {
|
|
172
|
+
if (live.current) {
|
|
173
|
+
if (given) {
|
|
174
|
+
setFound(given);
|
|
175
|
+
}
|
|
176
|
+
lastFound = { known: given !== null && given !== void 0 ? given : lastFound === null || lastFound === void 0 ? void 0 : lastFound.known };
|
|
177
|
+
setSettled(true);
|
|
178
|
+
}
|
|
179
|
+
}), []);
|
|
180
|
+
React.useEffect(() => {
|
|
181
|
+
live.current = true;
|
|
182
|
+
void known().then(first => {
|
|
183
|
+
if (live.current && first !== 'wait') {
|
|
184
|
+
setFound(before => before !== null && before !== void 0 ? before : first);
|
|
185
|
+
setSettled(true);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
const timer = setTimeout(() => live.current && setSettled(true), SETTLE_MS);
|
|
189
|
+
look();
|
|
190
|
+
return () => {
|
|
191
|
+
live.current = false;
|
|
192
|
+
clearTimeout(timer);
|
|
193
|
+
};
|
|
194
|
+
}, [look]);
|
|
195
|
+
// Out of reach (the VPN off): its ways show by themselves once it answers, the user back from turning it on.
|
|
196
|
+
useWhenBack(Boolean(found === null || found === void 0 ? void 0 : found.unreachable), look);
|
|
197
|
+
return { known: found, settled };
|
|
198
|
+
}
|
|
199
|
+
/** A button per way to sign in of the Ta in the cloud of this build, first on the sign-in. */
|
|
200
|
+
function BuiltInSignIn({ known, onPick, onOther }) {
|
|
201
|
+
const t = (0, use_t_1.useT)();
|
|
202
|
+
const reach = useCloudReach(known.unreachable ? known.url : undefined);
|
|
203
|
+
return (React.createElement("div", { className: "ta-sign-in-accounts" },
|
|
204
|
+
known.providers.map(provider => (React.createElement("button", { key: provider.id, type: "button", className: "ta-button ta-primary ta-wide ta-sign-in-account", onClick: () => onPick(provider.id) },
|
|
205
|
+
React.createElement(sign_in_marks_1.SignInMark, { provider: provider.id }),
|
|
206
|
+
sign_in_accounts_1.SignInAccountsUtil.label(provider, t)))),
|
|
207
|
+
known.providers.length === 0 && (React.createElement("button", { type: "button", className: "ta-button ta-primary ta-wide ta-sign-in-account", onClick: () => onPick() },
|
|
208
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Cloud, size: 17 }),
|
|
209
|
+
t('ta.cloud.companyAccount'))),
|
|
210
|
+
reach && (React.createElement(callout_1.Callout, { level: "warning", className: "ta-cloud-reach" }, t('ta.cloud.reachHint', { reach }))),
|
|
211
|
+
React.createElement("button", { type: "button", className: "ta-link-button ta-cloud-other", onClick: onOther }, t('ta.cloud.other'))));
|
|
212
|
+
}
|
|
213
|
+
const ERRORS = {
|
|
214
|
+
'no-gateway': 'ta.cloud.noGateway',
|
|
215
|
+
unreachable: 'ta.cloud.unreachable',
|
|
216
|
+
expired: 'ta.cloud.expired',
|
|
217
|
+
};
|
|
218
|
+
/** Signing in to Ta in the cloud, from an address (or the gateway of this build) to the computer kept and in use. */
|
|
219
|
+
function useCloudSignIn() {
|
|
220
|
+
const [, bench] = (0, hooks_1.useWorkbench)();
|
|
221
|
+
const [busy, setBusy] = React.useState(false);
|
|
222
|
+
const [progress, setProgress] = React.useState();
|
|
223
|
+
const [error, setError] = React.useState();
|
|
224
|
+
const running = React.useRef(undefined);
|
|
225
|
+
React.useEffect(() => {
|
|
226
|
+
// Back from the browser: asked again at once rather than at the end of the wait.
|
|
227
|
+
const back = () => { var _a; return document.visibilityState === 'visible' && ((_a = running.current) === null || _a === void 0 ? void 0 : _a.poke()); };
|
|
228
|
+
document.addEventListener('visibilitychange', back);
|
|
229
|
+
return () => {
|
|
230
|
+
var _a;
|
|
231
|
+
document.removeEventListener('visibilitychange', back);
|
|
232
|
+
(_a = running.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
233
|
+
};
|
|
234
|
+
}, []);
|
|
235
|
+
const start = React.useCallback(async (address, known, provider) => {
|
|
236
|
+
var _a;
|
|
237
|
+
(_a = running.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
238
|
+
setBusy(true);
|
|
239
|
+
setError(undefined);
|
|
240
|
+
setProgress(undefined);
|
|
241
|
+
try {
|
|
242
|
+
const gateway = known ? address : (await cloud_sign_in_1.CloudSignInUtil.gateway(address)).url;
|
|
243
|
+
const typed = !known;
|
|
244
|
+
const signIn = new cloud_sign_in_1.CloudSignIn({
|
|
245
|
+
gateway,
|
|
246
|
+
name: navigator.userAgent,
|
|
247
|
+
open: url => window.open(url, '_blank', 'noopener,noreferrer'),
|
|
248
|
+
onProgress: setProgress,
|
|
249
|
+
provider,
|
|
250
|
+
});
|
|
251
|
+
running.current = signIn;
|
|
252
|
+
const credential = await signIn.run();
|
|
253
|
+
if (credential && running.current === signIn) {
|
|
254
|
+
await bench.signIn(credential);
|
|
255
|
+
if (typed) {
|
|
256
|
+
// Another company's Ta in the cloud: offered first on this device's sign-in from now on.
|
|
257
|
+
cloud_sign_in_1.CloudSignInUtil.choose(gateway);
|
|
258
|
+
builtIn = undefined;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
catch (failure) {
|
|
263
|
+
setProgress(undefined);
|
|
264
|
+
setError(failure instanceof cloud_sign_in_1.CloudSignInError
|
|
265
|
+
? ERRORS[failure.reason]
|
|
266
|
+
: failure instanceof workbench_util_1.WorkbenchError && failure.reason === 'refused'
|
|
267
|
+
? 'ta.hosts.refused'
|
|
268
|
+
: 'ta.cloud.unreachable');
|
|
269
|
+
}
|
|
270
|
+
finally {
|
|
271
|
+
setBusy(false);
|
|
272
|
+
}
|
|
273
|
+
}, [bench]);
|
|
274
|
+
const cancel = React.useCallback(() => {
|
|
275
|
+
var _a;
|
|
276
|
+
(_a = running.current) === null || _a === void 0 ? void 0 : _a.stop();
|
|
277
|
+
running.current = undefined;
|
|
278
|
+
setBusy(false);
|
|
279
|
+
setProgress(undefined);
|
|
280
|
+
}, []);
|
|
281
|
+
return { busy, progress, error, start, cancel };
|
|
282
|
+
}
|
|
283
|
+
/** The code split as it is read aloud or typed: two groups of four. */
|
|
284
|
+
function CodeBox({ code }) {
|
|
285
|
+
const [first, second] = code.split('-');
|
|
286
|
+
return (React.createElement("div", { className: "ta-cloud-code", role: "img", "aria-label": code },
|
|
287
|
+
React.createElement("span", null, first),
|
|
288
|
+
React.createElement("span", { className: "ta-cloud-code-dash", "aria-hidden": "true" }),
|
|
289
|
+
React.createElement("span", null, second)));
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* What the way to Ta in the cloud says: its one way to sign in ("Continue with the company account", which it goes to at
|
|
293
|
+
* once), else the name of its deployment, else Ta in the cloud.
|
|
294
|
+
*/
|
|
295
|
+
function useCloudLabel() {
|
|
296
|
+
const t = (0, use_t_1.useT)();
|
|
297
|
+
const known = useBuiltInWays();
|
|
298
|
+
if ((known === null || known === void 0 ? void 0 : known.providers.length) === 1) {
|
|
299
|
+
return sign_in_accounts_1.SignInAccountsUtil.label(known.providers[0], t);
|
|
300
|
+
}
|
|
301
|
+
return (known === null || known === void 0 ? void 0 : known.name) ? t('ta.cloud.signInTo', { name: known.name }) : t('ta.cloud.signIn');
|
|
302
|
+
}
|
|
303
|
+
/** The way to Ta in the cloud on the sign-in, under the ways to a computer: one wide button. */
|
|
304
|
+
function CloudSignInEntry({ onPick }) {
|
|
305
|
+
const t = (0, use_t_1.useT)();
|
|
306
|
+
const label = useCloudLabel();
|
|
307
|
+
const known = useBuiltInWays();
|
|
308
|
+
const reach = useCloudReach((known === null || known === void 0 ? void 0 : known.unreachable) ? known.url : undefined);
|
|
309
|
+
return (React.createElement(React.Fragment, null,
|
|
310
|
+
React.createElement("div", { className: "ta-sign-in-or" }, t('ta.cloud.or')),
|
|
311
|
+
React.createElement("button", { type: "button", className: "ta-button ta-wide ta-cloud-entry", onClick: onPick },
|
|
312
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Cloud, size: 17 }),
|
|
313
|
+
" ",
|
|
314
|
+
label),
|
|
315
|
+
reach && (React.createElement(callout_1.Callout, { level: "warning", className: "ta-cloud-reach" }, t('ta.cloud.reachHint', { reach })))));
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Signing in to Ta in the cloud, the whole card: the address once (none for the deployment of this build, which starts at
|
|
319
|
+
* once), then the code to check in the browser while the token comes. `onBack` goes back to the other ways.
|
|
320
|
+
*/
|
|
321
|
+
function CloudSignInFlow({ onBack, provider, typing, page }) {
|
|
322
|
+
const t = (0, use_t_1.useT)();
|
|
323
|
+
const offered = useBuiltInWays();
|
|
324
|
+
// `typing`: another company's, by its address, whatever this device offers first.
|
|
325
|
+
const known = typing ? undefined : offered;
|
|
326
|
+
// Its one way to sign in at once; with several, the page of the code lists them.
|
|
327
|
+
const way = provider !== null && provider !== void 0 ? provider : ((known === null || known === void 0 ? void 0 : known.providers.length) === 1 ? known.providers[0].id : undefined);
|
|
328
|
+
const cloud = useCloudSignIn();
|
|
329
|
+
const reach = useCloudReach(known === null || known === void 0 ? void 0 : known.url);
|
|
330
|
+
const started = React.useRef(false);
|
|
331
|
+
React.useEffect(() => {
|
|
332
|
+
if (known && !started.current) {
|
|
333
|
+
started.current = true;
|
|
334
|
+
void cloud.start(known.url, true, way);
|
|
335
|
+
}
|
|
336
|
+
}, [known, cloud, way]);
|
|
337
|
+
// Out of reach: tried again once the user is back (from turning the VPN on), with no tap.
|
|
338
|
+
const outOfReach = Boolean(known) && !cloud.busy && cloud.error === 'ta.cloud.unreachable';
|
|
339
|
+
useWhenBack(outOfReach, () => {
|
|
340
|
+
// Asked quietly first: the hint stays put, no flicker, until the gateway answers.
|
|
341
|
+
if (known) {
|
|
342
|
+
void cloud_sign_in_1.CloudSignInUtil.answers(known.url).then(async (answers) => {
|
|
343
|
+
if (answers) {
|
|
344
|
+
const ways = way ? [] : await cloud_sign_in_1.CloudSignInUtil.ways(known.url);
|
|
345
|
+
void cloud.start(known.url, true, way !== null && way !== void 0 ? way : (ways.length === 1 ? ways[0].id : undefined));
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
const back = () => {
|
|
351
|
+
cloud.cancel();
|
|
352
|
+
onBack();
|
|
353
|
+
};
|
|
354
|
+
// A page of its own (the sign-in): back by a swipe from the left edge, as iOS's, or the chevron at the top left.
|
|
355
|
+
(0, edge_back_1.useEdgeBack)(Boolean(page), back);
|
|
356
|
+
const backButton = React.createElement(icon_1.IconButton, { icon: lucide_react_1.ChevronLeft, label: t('ta.cloud.back'), className: "ta-cloud-back", onClick: back });
|
|
357
|
+
const { progress } = cloud;
|
|
358
|
+
return (React.createElement("div", { className: "ta-cloud-flow" },
|
|
359
|
+
page ? (0, react_dom_1.createPortal)(React.createElement("div", { className: "ta-cloud-top" }, backButton), document.body) : backButton,
|
|
360
|
+
React.createElement(ta_avatar_1.TaAvatar, { size: 72 }),
|
|
361
|
+
progress ? (React.createElement(React.Fragment, null,
|
|
362
|
+
React.createElement("h1", null, t('ta.cloud.codeTitle')),
|
|
363
|
+
React.createElement("p", null, t(progress.direct ? 'ta.cloud.direct' : 'ta.cloud.code')),
|
|
364
|
+
!progress.direct && React.createElement(CodeBox, { code: progress.code }),
|
|
365
|
+
React.createElement("div", { className: `ta-cloud-status${progress.waiting ? ' ta-cloud-status-wait' : ''}`, role: "status" },
|
|
366
|
+
!progress.waiting && React.createElement("span", { className: "ta-spinner" }),
|
|
367
|
+
progress.waiting ? t('ta.cloud.waiting', { account: progress.waiting }) : t('ta.cloud.pending')),
|
|
368
|
+
React.createElement("button", { type: "button", className: "ta-button ta-wide", onClick: () => window.open(progress.url, '_blank', 'noopener,noreferrer') }, t('ta.cloud.reopen')))) : (React.createElement(React.Fragment, null,
|
|
369
|
+
React.createElement("h1", null, (known === null || known === void 0 ? void 0 : known.name) ? t('ta.cloud.signInTo', { name: known.name }) : t('ta.cloud.signIn')),
|
|
370
|
+
React.createElement("p", null, t('ta.cloud.hint')),
|
|
371
|
+
known ? (React.createElement("div", { className: "ta-cloud-status", role: "status" },
|
|
372
|
+
cloud.busy && React.createElement("span", { className: "ta-spinner" }),
|
|
373
|
+
cloud.busy ? t('ta.cloud.connecting', { host: new URL(known.url).host }) : null)) : (React.createElement(CloudAddressForm, { busy: cloud.busy, onSubmit: address => void cloud.start(address) })),
|
|
374
|
+
known && !cloud.busy && cloud.error && (React.createElement("button", { type: "button", className: "ta-button ta-primary ta-wide", onClick: () => void cloud.start(known.url, true, way) }, t('ta.cloud.retry'))))),
|
|
375
|
+
cloud.error && (React.createElement(callout_1.Callout, { level: outOfReach && reach ? 'warning' : 'error' }, outOfReach && known
|
|
376
|
+
? reach
|
|
377
|
+
? t('ta.cloud.reachHint', { reach })
|
|
378
|
+
: t('ta.cloud.unreachableAt', { host: new URL(known.url).host })
|
|
379
|
+
: t(cloud.error)))));
|
|
380
|
+
}
|
|
381
|
+
/** The address of a Ta in the cloud, typed: a gateway, or the relay of its deployment. */
|
|
382
|
+
function CloudAddressForm({ busy, onSubmit }) {
|
|
383
|
+
const t = (0, use_t_1.useT)();
|
|
384
|
+
const [text, setText] = React.useState('');
|
|
385
|
+
return (React.createElement("form", { className: "ta-cloud-form", onSubmit: event => {
|
|
386
|
+
event.preventDefault();
|
|
387
|
+
onSubmit(text.trim());
|
|
388
|
+
} },
|
|
389
|
+
React.createElement("label", { className: "ta-field" },
|
|
390
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Globe, size: 16 }),
|
|
391
|
+
React.createElement("input", { type: "text", inputMode: "url", autoCapitalize: "off", autoCorrect: "off", autoFocus: true, placeholder: t('ta.cloud.address'), value: text, onChange: event => setText(event.target.value) })),
|
|
392
|
+
React.createElement("button", { type: "submit", className: "ta-button ta-primary ta-wide", disabled: busy || !text.trim() }, busy ? React.createElement("span", { className: "ta-spinner" }) : t('ta.cloud.go'))));
|
|
393
|
+
}
|
|
394
|
+
//# sourceMappingURL=cloud-sign-in-view.js.map
|
|
@@ -39,6 +39,7 @@ const device_1 = require("../device/device");
|
|
|
39
39
|
const monaco_loader_1 = require("../editor/monaco-loader");
|
|
40
40
|
const use_t_1 = require("../i18n/use-t");
|
|
41
41
|
const settings_protocol_1 = require("../settings/settings-protocol");
|
|
42
|
+
const loading_1 = require("./loading");
|
|
42
43
|
let models = 0;
|
|
43
44
|
/** Monaco on the text of a file, in the theme of `settings`; it loads the first time one is shown. */
|
|
44
45
|
function CodeEditor({ settings: store, path, value, readOnly = false, line, column, endColumn, selection, onChange, onSave, }) {
|
|
@@ -120,6 +121,6 @@ function CodeEditor({ settings: store, path, value, readOnly = false, line, colu
|
|
|
120
121
|
}, [editor, rangeKey]);
|
|
121
122
|
return (React.createElement("div", { className: "ta-code-editor" },
|
|
122
123
|
React.createElement("div", { ref: host, className: "ta-code-editor-host" }),
|
|
123
|
-
!editor && React.createElement("div", { className: "ta-code-editor-state" }, error ? t('ta.editor.failed', { message: error }) : t('ta.editor.loading'))));
|
|
124
|
+
!editor && (React.createElement("div", { className: "ta-code-editor-state" }, error ? t('ta.editor.failed', { message: error }) : React.createElement(loading_1.Loading, { label: t('ta.editor.loading') })))));
|
|
124
125
|
}
|
|
125
126
|
//# sourceMappingURL=code-editor.js.map
|
|
@@ -48,6 +48,7 @@ const voice_1 = require("../util/voice");
|
|
|
48
48
|
const composer_attachments_1 = require("./composer-attachments");
|
|
49
49
|
const composer_box_hooks_1 = require("./composer-box-hooks");
|
|
50
50
|
const composer_menu_1 = require("./composer-menu");
|
|
51
|
+
const held_talk_1 = require("./held-talk");
|
|
51
52
|
const icon_1 = require("./icon");
|
|
52
53
|
const plus_menu_1 = require("./plus-menu");
|
|
53
54
|
const recent_shot_1 = require("./recent-shot");
|
|
@@ -219,6 +220,9 @@ exports.ComposerBox = React.forwardRef(function ComposerBox(props, ref) {
|
|
|
219
220
|
edit(message, message.length);
|
|
220
221
|
}
|
|
221
222
|
onTalkCall(sent ? { text: message, sent } : undefined, zone);
|
|
223
|
+
if (talkPlace) {
|
|
224
|
+
held_talk_1.HeldTalk.given(talkPlace, zone);
|
|
225
|
+
}
|
|
222
226
|
return;
|
|
223
227
|
}
|
|
224
228
|
const [message, position] = composer_1.ComposerUtil.insert(latest.current, latestCaret.current, words);
|
|
@@ -231,6 +235,9 @@ exports.ComposerBox = React.forwardRef(function ComposerBox(props, ref) {
|
|
|
231
235
|
setTalkMode(false);
|
|
232
236
|
edit(message, position);
|
|
233
237
|
}
|
|
238
|
+
if (talkPlace) {
|
|
239
|
+
held_talk_1.HeldTalk.given(talkPlace, zone);
|
|
240
|
+
}
|
|
234
241
|
}, onError, hints, onTalkCall ? talkCalls : []);
|
|
235
242
|
const talking = (0, composer_box_hooks_1.useTalkWiring)(talk, onListening, talkPlace);
|
|
236
243
|
// Speech goes where the caret was when listening began, between what was typed.
|
|
@@ -40,6 +40,7 @@ const React = __importStar(require("react"));
|
|
|
40
40
|
const device_1 = require("../device/device");
|
|
41
41
|
const hooks_1 = require("../hooks");
|
|
42
42
|
const use_t_1 = require("../i18n/use-t");
|
|
43
|
+
const cloud_sign_in_view_1 = require("./cloud-sign-in-view");
|
|
43
44
|
const icon_1 = require("./icon");
|
|
44
45
|
/** How long "connected again" stays. */
|
|
45
46
|
const BACK_MS = 1200;
|
|
@@ -114,8 +115,9 @@ function usePressed() {
|
|
|
114
115
|
* button is seen to do something), when the next is, and how to try now.
|
|
115
116
|
*/
|
|
116
117
|
function useConnectionNotice() {
|
|
118
|
+
var _a;
|
|
117
119
|
const t = (0, use_t_1.useT)();
|
|
118
|
-
const [{ offlineShown, error, retryAt, status }, workbench] = (0, hooks_1.useWorkbench)();
|
|
120
|
+
const [{ offlineShown, error, retryAt, status, host, hosts }, workbench] = (0, hooks_1.useWorkbench)();
|
|
119
121
|
const [{ notDoneAt, outdated }] = (0, hooks_1.useNotices)();
|
|
120
122
|
// Something the user did did not happen: no notice over the page, this row says it. Offline, it shows at once.
|
|
121
123
|
const notDone = useRecent(notDoneAt, NOT_DONE_MS);
|
|
@@ -123,9 +125,26 @@ function useConnectionNotice() {
|
|
|
123
125
|
const phase = usePhase(!!offlineShown || (notDone && !online && status !== 'signed-out'), notDone && online);
|
|
124
126
|
const seconds = useSecondsUntil(phase === 'offline' ? retryAt : undefined);
|
|
125
127
|
const [pressed, press] = usePressed();
|
|
126
|
-
|
|
128
|
+
// Ta in the cloud that does not answer: no ta serve to start, but a network to reach (the company's VPN, its build says how).
|
|
129
|
+
const credential = (_a = hosts.find(one => one.id === host)) === null || _a === void 0 ? void 0 : _a.credential;
|
|
130
|
+
const cloud = error === 'unreachable' && credential && 'url' in credential ? credential.url : undefined;
|
|
131
|
+
const reach = (0, cloud_sign_in_view_1.useCloudReach)(cloud);
|
|
132
|
+
const unreachable = cloud
|
|
133
|
+
? reach
|
|
134
|
+
? t('ta.cloud.reachHint', { reach })
|
|
135
|
+
: t('ta.connection.cloudUnreachable', { host: new URL(cloud).host })
|
|
136
|
+
: t('ta.unreachable');
|
|
137
|
+
const text = error === 'away' ? t('ta.connection.away') : error === 'unreachable' ? unreachable : t('ta.connection.lost');
|
|
127
138
|
// One line, for a phone: what was shown before still shows under it, as a chat app does without network.
|
|
128
|
-
const brief = error === 'away'
|
|
139
|
+
const brief = error === 'away'
|
|
140
|
+
? t('ta.connection.awayBrief')
|
|
141
|
+
: error === 'unreachable'
|
|
142
|
+
? cloud
|
|
143
|
+
? reach
|
|
144
|
+
? unreachable
|
|
145
|
+
: t('ta.connection.cloudUnreachableBrief')
|
|
146
|
+
: t('ta.connection.unreachableBrief')
|
|
147
|
+
: t('ta.connection.lost');
|
|
129
148
|
return {
|
|
130
149
|
phase,
|
|
131
150
|
// Below what the connection says: an outdated page reloads once it can.
|
|
@@ -3,8 +3,11 @@ import * as React from 'react';
|
|
|
3
3
|
export type ContextMenuItem = '-' | {
|
|
4
4
|
label: string;
|
|
5
5
|
run(): void;
|
|
6
|
-
disabled?: boolean
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Cannot be undone, as delete: drawn in red. */
|
|
7
8
|
danger?: boolean;
|
|
9
|
+
/** One of a choice: the one chosen is checked on the right. */
|
|
10
|
+
checked?: boolean;
|
|
8
11
|
};
|
|
9
12
|
/** Where a menu was opened: the pointer, and the element it is the menu of (a row), which a finger keeps in sight. */
|
|
10
13
|
export interface MenuOpening {
|
|
@@ -16,6 +19,8 @@ export interface MenuOpening {
|
|
|
16
19
|
};
|
|
17
20
|
}
|
|
18
21
|
export declare namespace ContextMenuUtil {
|
|
22
|
+
/** A menu of groups of items, a line between them: the empty ones left out, as no line comes first, last or twice. */
|
|
23
|
+
function sections(...groups: readonly Exclude<ContextMenuItem, '-'>[][]): ContextMenuItem[];
|
|
19
24
|
/**
|
|
20
25
|
* Where a menu of `size` goes for a click at `at`: its corner at the pointer, as a browser's. Under a finger,
|
|
21
26
|
* never where the finger covers it: above the finger and the row it pressed (`around`), centred, as the menus
|
|
@@ -58,5 +63,9 @@ export declare namespace ContextMenuUtil {
|
|
|
58
63
|
* elsewhere closes. `open` takes the event of a right click (or of the menu key) and the entries. Opened by a
|
|
59
64
|
* long press, it keeps out from under the finger and the finger may slide onto an entry (ContextMenuUtil.attach).
|
|
60
65
|
*/
|
|
61
|
-
export declare function useContextMenu(): [
|
|
66
|
+
export declare function useContextMenu(): [
|
|
67
|
+
React.ReactNode,
|
|
68
|
+
(event: React.MouseEvent, items: ContextMenuItem[], caption?: string) => void,
|
|
69
|
+
(at: MenuOpening, items: ContextMenuItem[], caption?: string) => void
|
|
70
|
+
];
|
|
62
71
|
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ContextMenuUtil = void 0;
|
|
37
37
|
exports.useContextMenu = useContextMenu;
|
|
38
|
+
const lucide_react_1 = require("lucide-react");
|
|
38
39
|
const React = __importStar(require("react"));
|
|
39
40
|
const react_dom_1 = require("react-dom");
|
|
40
41
|
const back_stack_1 = require("../device/back-stack");
|
|
@@ -42,6 +43,11 @@ const device_1 = require("../device/device");
|
|
|
42
43
|
const long_press_1 = require("../device/long-press");
|
|
43
44
|
var ContextMenuUtil;
|
|
44
45
|
(function (ContextMenuUtil) {
|
|
46
|
+
/** A menu of groups of items, a line between them: the empty ones left out, as no line comes first, last or twice. */
|
|
47
|
+
function sections(...groups) {
|
|
48
|
+
return groups.filter(group => group.length > 0).flatMap((group, index) => (index > 0 ? ['-', ...group] : group));
|
|
49
|
+
}
|
|
50
|
+
ContextMenuUtil.sections = sections;
|
|
45
51
|
/** Between the menu and the edges of the screen. */
|
|
46
52
|
const MARGIN = 4;
|
|
47
53
|
/** How far around the point it touches a fingertip covers the screen. */
|
|
@@ -240,11 +246,13 @@ function useContextMenu() {
|
|
|
240
246
|
? { x: event.clientX, y: event.clientY, around: { top: box.top, bottom: box.bottom }, items, caption }
|
|
241
247
|
: { x: box.left + 8, y: box.bottom, items, caption });
|
|
242
248
|
}, []);
|
|
249
|
+
// Where an event put it, once what it lists has come (a read of the server after the click).
|
|
250
|
+
const openAt = React.useCallback((at, items, caption) => setMenu({ ...at, items, caption }), []);
|
|
243
251
|
const close = React.useCallback(() => setMenu(undefined), []);
|
|
244
252
|
// On the page, not in what opened it: a row far up of a conversation (content-visibility) or one coming in
|
|
245
253
|
// with a motion contains what is fixed in it, which the menu would be clipped by.
|
|
246
254
|
const element = menu ? (0, react_dom_1.createPortal)(React.createElement(ContextMenu, { ...menu, onClose: close }), document.body) : null;
|
|
247
|
-
return [element, open];
|
|
255
|
+
return [element, open, openAt];
|
|
248
256
|
}
|
|
249
257
|
function ContextMenu({ x, y, around, items, caption, onClose }) {
|
|
250
258
|
const root = React.useRef(null);
|
|
@@ -289,11 +297,14 @@ function ContextMenu({ x, y, around, items, caption, onClose }) {
|
|
|
289
297
|
const at = buttons.indexOf(document.activeElement);
|
|
290
298
|
(_b = buttons[(at + (event.key === 'ArrowDown' ? 1 : buttons.length - 1)) % buttons.length]) === null || _b === void 0 ? void 0 : _b.focus();
|
|
291
299
|
};
|
|
300
|
+
const choice = items.some(item => item !== '-' && item.checked !== undefined);
|
|
292
301
|
return (React.createElement("div", { ref: root, className: "ta-context-menu", role: "menu", onKeyDown: onKeyDown, onContextMenu: event => event.preventDefault() },
|
|
293
302
|
caption && React.createElement("div", { className: "ta-context-menu-caption" }, caption),
|
|
294
|
-
items.map((item, index) => item === '-' ? (React.createElement("hr", { key: `-${index}`, className: "ta-context-menu-line" })) : (React.createElement("button", { key: item.label, type: "button", role: "menuitem", className: `ta-context-menu-item${item.danger ? ' ta-danger' : ''}`, disabled: item.disabled, onClick: () => {
|
|
303
|
+
items.map((item, index) => item === '-' ? (React.createElement("hr", { key: `-${index}`, className: "ta-context-menu-line" })) : (React.createElement("button", { key: item.label, type: "button", role: "menuitem", "aria-current": item.checked || undefined, className: `ta-context-menu-item${item.danger ? ' ta-danger' : ''}`, disabled: item.disabled, onClick: () => {
|
|
295
304
|
onClose();
|
|
296
305
|
item.run();
|
|
297
|
-
} },
|
|
306
|
+
} },
|
|
307
|
+
item.label,
|
|
308
|
+
choice && React.createElement(lucide_react_1.Check, { size: 15, className: item.checked ? 'ta-context-menu-check ta-on' : 'ta-context-menu-check', "aria-hidden": "true" }))))));
|
|
298
309
|
}
|
|
299
310
|
//# sourceMappingURL=context-menu.js.map
|
|
@@ -78,6 +78,8 @@ export declare class ConversationScroller {
|
|
|
78
78
|
send(message: ScrollRow & Element): void;
|
|
79
79
|
/** Back to the latest (the button that shows away from it): following again at once, the view on its way. */
|
|
80
80
|
toBottom(): void;
|
|
81
|
+
/** Moved at once by Ta's screen tools (app_do scroll), as by the user: up, it stays there; at the bottom, it follows. */
|
|
82
|
+
scrollFor(top: number): void;
|
|
81
83
|
scrolled(): void;
|
|
82
84
|
/** Where there is no `scrollend`: one, once the view stopped moving. */
|
|
83
85
|
private endLater;
|
|
@@ -186,6 +186,20 @@ class ConversationScroller {
|
|
|
186
186
|
this.endLater();
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
+
/** Moved at once by Ta's screen tools (app_do scroll), as by the user: up, it stays there; at the bottom, it follows. */
|
|
190
|
+
scrollFor(top) {
|
|
191
|
+
var _a;
|
|
192
|
+
this.byUser();
|
|
193
|
+
(_a = this.glider) === null || _a === void 0 ? void 0 : _a.stop();
|
|
194
|
+
if (top >= this.view.scrollHeight - this.view.clientHeight - 1) {
|
|
195
|
+
this.following = true;
|
|
196
|
+
this.toBottomNow();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
this.following = false;
|
|
200
|
+
this.moveTo(top);
|
|
201
|
+
this.remember();
|
|
202
|
+
}
|
|
189
203
|
scrolled() {
|
|
190
204
|
const { view } = this;
|
|
191
205
|
this.keepAnchor();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type DevicePageOutcome } from '../cloud/device-page';
|
|
3
|
+
/**
|
|
4
|
+
* The page of this address where the user lets a device in (TA_DEVICE_SIGN_IN_PATH): which device asks and its code, to
|
|
5
|
+
* check against the one it shows, then this browser's account in one tap, or a way to sign in (the device gets the token,
|
|
6
|
+
* not this browser). How it went, in a line and a mark, once done.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DeviceSignInPage({ code, outcome: given, from }: {
|
|
9
|
+
code: string;
|
|
10
|
+
outcome?: DevicePageOutcome;
|
|
11
|
+
from?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=device-sign-in-page.d.ts.map
|