@celljs/ta-web 4.16.0 → 4.18.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/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -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-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +11 -8
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +119 -11
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +33 -8
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.d.ts +4 -0
- package/esm/browser/assistant/assistant-task-source.js +24 -4
- package/esm/browser/assistant/assistant-task-util.d.ts +27 -7
- package/esm/browser/assistant/assistant-task-util.js +84 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +2 -4
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +112 -0
- package/esm/browser/assistant/assistant-view.js +79 -130
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +105 -357
- 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 +56 -0
- package/esm/browser/assistant/chat-task-source.js +82 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +138 -0
- package/esm/browser/assistant/realtime-voice.js +479 -0
- package/esm/browser/assistant/task-views.d.ts +11 -9
- package/esm/browser/assistant/task-views.js +47 -25
- package/esm/browser/assistant/voice-call-bar.d.ts +67 -0
- package/esm/browser/assistant/voice-call-bar.js +316 -0
- package/esm/browser/assistant/voice-call.d.ts +207 -0
- package/esm/browser/assistant/voice-call.js +469 -0
- package/esm/browser/assistant/voice-reopen.d.ts +18 -0
- package/esm/browser/assistant/voice-reopen.js +54 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +7 -9
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- 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 +26 -2
- package/esm/browser/components/account-menu.js +4 -2
- 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 +6 -2
- package/esm/browser/components/app-nav.js +15 -12
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +471 -0
- package/esm/browser/components/app-view.js +212 -393
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +57 -10
- package/esm/browser/components/call-pill.d.ts +11 -0
- package/esm/browser/components/call-pill.js +19 -0
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -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 +10 -2
- package/esm/browser/components/chat-icon.js +32 -6
- 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 +96 -0
- package/esm/browser/components/chat-list-row.js +208 -0
- package/esm/browser/components/chat-list-util.d.ts +197 -0
- package/esm/browser/components/chat-list-util.js +398 -0
- package/esm/browser/components/chat-list.d.ts +6 -190
- package/esm/browser/components/chat-list.js +340 -545
- package/esm/browser/components/chat-seen.js +1 -0
- package/esm/browser/components/cloud-sign-in-view.d.ts +61 -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-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +54 -154
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- 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 +18 -3
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +3 -35
- package/esm/browser/components/conversation-scroll.js +16 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -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/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.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/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +89 -19
- package/esm/browser/components/fork-view.js +2 -4
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +59 -15
- 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 +9 -4
- package/esm/browser/components/host-view.js +56 -15
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- 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 +12 -115
- package/esm/browser/components/image-viewer.js +74 -368
- 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 +6 -3
- package/esm/browser/components/link-dialog.d.ts +2 -1
- package/esm/browser/components/link-dialog.js +7 -1
- package/esm/browser/components/link.d.ts +4 -0
- package/esm/browser/components/link.js +11 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/loading.d.ts +12 -0
- package/esm/browser/components/loading.js +18 -0
- package/esm/browser/components/markdown.js +7 -1
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/mermaid-view.js +14 -7
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +22 -454
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +190 -0
- package/esm/browser/components/message-user.d.ts +63 -0
- package/esm/browser/components/message-user.js +204 -0
- package/esm/browser/components/model-picker.d.ts +4 -2
- package/esm/browser/components/model-picker.js +16 -3
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +17 -11
- package/esm/browser/components/nav-places.js +18 -13
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +5 -4
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +7 -6
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.d.ts +4 -2
- package/esm/browser/components/scan-screen.js +53 -20
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- 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-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +188 -7
- package/esm/browser/components/settings-choices.d.ts +9 -3
- package/esm/browser/components/settings-choices.js +17 -29
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +35 -250
- package/esm/browser/components/settings-view.js +44 -16
- 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/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -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 +12 -5
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +160 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/components/workbench-view.d.ts +1 -1
- package/esm/browser/components/workbench-view.js +38 -5
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/code-scan.d.ts +23 -10
- package/esm/browser/device/code-scan.js +48 -43
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- 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/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/screen-awake.d.ts +24 -0
- package/esm/browser/device/screen-awake.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +14 -1
- 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 +74 -6
- package/esm/browser/extension/web-api-contributions.d.ts +139 -39
- 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 +126 -63
- package/esm/browser/extension/web-extension-context.d.ts +9 -9
- package/esm/browser/extension/web-extension-context.js +84 -19
- package/esm/browser/extension/web-extension-protocol.d.ts +26 -3
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -2
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +9 -82
- package/esm/browser/extension/web-extensions.js +22 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +8 -1
- package/esm/browser/extension/web-tasks.js +17 -3
- package/esm/browser/extension/web-view-util.d.ts +2 -2
- package/esm/browser/extension/web-view-util.js +7 -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 -32
- package/esm/browser/gateway/console-parts.js +58 -218
- package/esm/browser/gateway/console-tenant.d.ts +2 -4
- package/esm/browser/gateway/console-tenant.js +118 -209
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +117 -0
- package/esm/browser/gateway/console-view.js +153 -88
- package/esm/browser/hooks.js +1 -3
- package/esm/browser/hosts.d.ts +2 -0
- package/esm/browser/hosts.js +12 -2
- package/esm/browser/i18n/locales.d.ts +280 -13
- package/esm/browser/i18n/messages-ja.js +292 -25
- package/esm/browser/i18n/messages-zh-tw.js +292 -25
- package/esm/browser/i18n/messages.d.ts +277 -10
- package/esm/browser/i18n/messages.js +585 -51
- package/esm/browser/index.d.ts +18 -0
- package/esm/browser/index.js +18 -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/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +185 -0
- package/esm/browser/screen/screen-protocol.js +60 -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 +53 -0
- package/esm/browser/screen/screen.js +292 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- 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 +14 -1
- package/esm/browser/settings/settings-protocol.js +24 -2
- package/esm/browser/settings/settings.d.ts +7 -1
- package/esm/browser/settings/settings.js +31 -7
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +146 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +12 -1
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +150 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +66 -12
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +162 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +8 -540
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +172 -110
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +13 -3
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +24 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +59 -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 +29 -10
- package/esm/browser/style/tints.d.ts +5 -4
- package/esm/browser/style/tints.js +9 -9
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/desktop.d.ts +7 -1
- package/esm/browser/util/desktop.js +17 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/image-swipe.d.ts +42 -0
- package/esm/browser/util/image-swipe.js +66 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +37 -5
- package/esm/browser/util/process.js +81 -10
- 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 +29 -0
- package/esm/browser/util/spoken.js +92 -0
- package/esm/browser/util/tool.d.ts +9 -0
- package/esm/browser/util/tool.js +71 -6
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +48 -0
- package/esm/browser/util/turn-end.d.ts +17 -0
- package/esm/browser/util/turn-end.js +164 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +31 -3
- package/esm/browser/workbench-services.d.ts +57 -0
- package/esm/browser/workbench-services.js +158 -0
- package/esm/browser/workbench-util.d.ts +9 -3
- package/esm/browser/workbench-util.js +24 -4
- package/esm/browser/workbench.d.ts +9 -89
- package/esm/browser/workbench.js +61 -344
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -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-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +11 -8
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +117 -9
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +34 -9
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.d.ts +4 -0
- package/lib/browser/assistant/assistant-task-source.js +25 -4
- package/lib/browser/assistant/assistant-task-util.d.ts +27 -7
- package/lib/browser/assistant/assistant-task-util.js +84 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +3 -5
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +148 -0
- package/lib/browser/assistant/assistant-view.js +76 -127
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +102 -354
- 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 +57 -0
- package/lib/browser/assistant/chat-task-source.js +86 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +139 -0
- package/lib/browser/assistant/realtime-voice.js +483 -0
- package/lib/browser/assistant/task-views.d.ts +11 -9
- package/lib/browser/assistant/task-views.js +47 -24
- package/lib/browser/assistant/voice-call-bar.d.ts +68 -0
- package/lib/browser/assistant/voice-call-bar.js +362 -0
- package/lib/browser/assistant/voice-call.d.ts +208 -0
- package/lib/browser/assistant/voice-call.js +473 -0
- package/lib/browser/assistant/voice-reopen.d.ts +19 -0
- package/lib/browser/assistant/voice-reopen.js +58 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +7 -9
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- 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 +26 -2
- package/lib/browser/components/account-menu.js +3 -1
- 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 +6 -2
- package/lib/browser/components/app-nav.js +15 -12
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +507 -0
- package/lib/browser/components/app-view.js +202 -383
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +56 -9
- package/lib/browser/components/call-pill.d.ts +12 -0
- package/lib/browser/components/call-pill.js +55 -0
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -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 +10 -2
- package/lib/browser/components/chat-icon.js +32 -6
- 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 +97 -0
- package/lib/browser/components/chat-list-row.js +247 -0
- package/lib/browser/components/chat-list-util.d.ts +198 -0
- package/lib/browser/components/chat-list-util.js +401 -0
- package/lib/browser/components/chat-list.d.ts +6 -190
- package/lib/browser/components/chat-list.js +354 -561
- package/lib/browser/components/chat-seen.js +1 -0
- package/lib/browser/components/cloud-sign-in-view.d.ts +62 -0
- package/lib/browser/components/cloud-sign-in-view.js +393 -0
- package/lib/browser/components/code-editor.js +2 -1
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +56 -157
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- 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 +18 -3
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +3 -35
- package/lib/browser/components/conversation-scroll.js +34 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -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/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.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/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +88 -18
- package/lib/browser/components/fork-view.js +2 -4
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +58 -14
- 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 +9 -4
- package/lib/browser/components/host-view.js +56 -15
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- 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 +12 -115
- package/lib/browser/components/image-viewer.js +74 -370
- 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 +6 -3
- package/lib/browser/components/link-dialog.d.ts +2 -1
- package/lib/browser/components/link-dialog.js +7 -1
- package/lib/browser/components/link.d.ts +4 -0
- package/lib/browser/components/link.js +12 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/loading.d.ts +13 -0
- package/lib/browser/components/loading.js +55 -0
- package/lib/browser/components/markdown.js +7 -1
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/mermaid-view.js +13 -6
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +23 -462
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +226 -0
- package/lib/browser/components/message-user.d.ts +64 -0
- package/lib/browser/components/message-user.js +247 -0
- package/lib/browser/components/model-picker.d.ts +4 -2
- package/lib/browser/components/model-picker.js +16 -3
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +17 -11
- package/lib/browser/components/nav-places.js +20 -14
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +5 -4
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +8 -6
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.d.ts +4 -2
- package/lib/browser/components/scan-screen.js +54 -20
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- 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-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +188 -7
- package/lib/browser/components/settings-choices.d.ts +10 -4
- package/lib/browser/components/settings-choices.js +16 -28
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +31 -246
- package/lib/browser/components/settings-view.js +44 -16
- 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/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -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 +12 -5
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +196 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/components/workbench-view.d.ts +1 -1
- package/lib/browser/components/workbench-view.js +38 -5
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/code-scan.d.ts +23 -10
- package/lib/browser/device/code-scan.js +47 -42
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- 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/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/screen-awake.d.ts +25 -0
- package/lib/browser/device/screen-awake.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +13 -0
- 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 +74 -6
- package/lib/browser/extension/web-api-contributions.d.ts +139 -39
- 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 +126 -63
- package/lib/browser/extension/web-extension-context.d.ts +9 -9
- package/lib/browser/extension/web-extension-context.js +86 -21
- package/lib/browser/extension/web-extension-protocol.d.ts +26 -3
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -2
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +9 -82
- package/lib/browser/extension/web-extensions.js +19 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +8 -1
- package/lib/browser/extension/web-tasks.js +17 -3
- package/lib/browser/extension/web-view-util.d.ts +2 -2
- package/lib/browser/extension/web-view-util.js +7 -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 -32
- package/lib/browser/gateway/console-parts.js +63 -223
- package/lib/browser/gateway/console-tenant.d.ts +2 -4
- package/lib/browser/gateway/console-tenant.js +116 -208
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +153 -0
- package/lib/browser/gateway/console-view.js +151 -86
- package/lib/browser/hooks.js +1 -3
- package/lib/browser/hosts.d.ts +2 -0
- package/lib/browser/hosts.js +12 -2
- package/lib/browser/i18n/locales.d.ts +280 -13
- package/lib/browser/i18n/messages-ja.js +292 -25
- package/lib/browser/i18n/messages-zh-tw.js +292 -25
- package/lib/browser/i18n/messages.d.ts +277 -10
- package/lib/browser/i18n/messages.js +585 -51
- package/lib/browser/index.d.ts +18 -0
- package/lib/browser/index.js +18 -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/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +186 -0
- package/lib/browser/screen/screen-protocol.js +63 -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 +54 -0
- package/lib/browser/screen/screen.js +295 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- 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 +14 -1
- package/lib/browser/settings/settings-protocol.js +24 -2
- package/lib/browser/settings/settings.d.ts +7 -1
- package/lib/browser/settings/settings.js +31 -7
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +182 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +12 -1
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +153 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +66 -12
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +165 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +8 -540
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +172 -110
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +14 -4
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +27 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +59 -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 +29 -10
- package/lib/browser/style/tints.d.ts +5 -4
- package/lib/browser/style/tints.js +9 -9
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/desktop.d.ts +7 -1
- package/lib/browser/util/desktop.js +17 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/image-swipe.d.ts +43 -0
- package/lib/browser/util/image-swipe.js +69 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +37 -5
- package/lib/browser/util/process.js +80 -9
- 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 +30 -0
- package/lib/browser/util/spoken.js +95 -0
- package/lib/browser/util/tool.d.ts +9 -0
- package/lib/browser/util/tool.js +71 -6
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +51 -0
- package/lib/browser/util/turn-end.d.ts +18 -0
- package/lib/browser/util/turn-end.js +167 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +31 -3
- package/lib/browser/workbench-services.d.ts +58 -0
- package/lib/browser/workbench-services.js +162 -0
- package/lib/browser/workbench-util.d.ts +9 -3
- package/lib/browser/workbench-util.js +24 -4
- package/lib/browser/workbench.d.ts +9 -89
- package/lib/browser/workbench.js +58 -341
- 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
|
@@ -1,115 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
y: number;
|
|
6
|
-
}
|
|
7
|
-
/** Where a pinch started: its scale, how far apart the fingers were, and the spot of the picture between them. */
|
|
8
|
-
interface Pinch {
|
|
9
|
-
scale: number;
|
|
10
|
-
distance: number;
|
|
11
|
-
spot: Point;
|
|
12
|
-
}
|
|
13
|
-
/** What the viewer shows of its state: how far it is zoomed and its limits. */
|
|
14
|
-
export interface ZoomState extends ZoomLimits {
|
|
15
|
-
scale: number;
|
|
16
|
-
}
|
|
17
|
-
interface ImageZoomHandlers {
|
|
18
|
-
changed(state: ZoomState): void;
|
|
19
|
-
loaded(size: ZoomSize): void;
|
|
20
|
-
/** A click or tap beside the picture. */
|
|
21
|
-
background(): void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Zooms a picture in a box that scrolls, as the viewers of pictures do: all of it at first, never larger than
|
|
25
|
-
* its own pixels; two fingers pinch it, a trackpad pinches it (a wheel with Ctrl, or Safari's gestures), a
|
|
26
|
-
* wheel with Ctrl or ⌘ zooms it at the pointer, a double tap or click zooms in there and back out; zoomed,
|
|
27
|
-
* a finger or the wheel scrolls it and the mouse drags it. A pinch past the limits goes on a little and comes
|
|
28
|
-
* back. What scrolls is the box itself: a finger scrolls it on the compositor, and the sheets of the phone
|
|
29
|
-
* leave a picture that scrolls sideways alone (sheet-swipe.ts).
|
|
30
|
-
*/
|
|
31
|
-
export declare class ImageZoom {
|
|
32
|
-
protected readonly viewport: HTMLElement;
|
|
33
|
-
protected readonly stage: HTMLElement;
|
|
34
|
-
protected readonly image: HTMLImageElement;
|
|
35
|
-
protected readonly on: ImageZoomHandlers;
|
|
36
|
-
protected natural?: ZoomSize;
|
|
37
|
-
protected scale: number;
|
|
38
|
-
protected limits: ZoomLimits;
|
|
39
|
-
/** Whether it shows as at first: then it fits again when the box changes size. */
|
|
40
|
-
protected fitted: boolean;
|
|
41
|
-
protected pinch?: Pinch;
|
|
42
|
-
protected gesture?: {
|
|
43
|
-
scale: number;
|
|
44
|
-
};
|
|
45
|
-
/** The spot a pinch of the trackpad (wheels one after another) zooms about: kept, so that rounded scrolls never add up. */
|
|
46
|
-
protected wheelAnchor?: {
|
|
47
|
-
point: Point;
|
|
48
|
-
spot: Point;
|
|
49
|
-
t: number;
|
|
50
|
-
};
|
|
51
|
-
protected tap?: {
|
|
52
|
-
x: number;
|
|
53
|
-
y: number;
|
|
54
|
-
t: number;
|
|
55
|
-
moved: boolean;
|
|
56
|
-
};
|
|
57
|
-
protected lastTap?: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
t: number;
|
|
61
|
-
};
|
|
62
|
-
protected lastTouch: number;
|
|
63
|
-
protected drag?: {
|
|
64
|
-
id: number;
|
|
65
|
-
x: number;
|
|
66
|
-
y: number;
|
|
67
|
-
left: number;
|
|
68
|
-
top: number;
|
|
69
|
-
moved: boolean;
|
|
70
|
-
};
|
|
71
|
-
protected dragged: boolean;
|
|
72
|
-
protected frame: number;
|
|
73
|
-
protected backgroundTimer?: ReturnType<typeof setTimeout>;
|
|
74
|
-
protected announced: number;
|
|
75
|
-
constructor(viewport: HTMLElement, stage: HTMLElement, image: HTMLImageElement, on: ImageZoomHandlers);
|
|
76
|
-
attach(): () => void;
|
|
77
|
-
/** Zooms to `scale` at `point` of the box (its middle by default), sliding there. */
|
|
78
|
-
zoomTo(scale: number, point?: Point, animate?: boolean): void;
|
|
79
|
-
step(way: 1 | -1): void;
|
|
80
|
-
fit(): void;
|
|
81
|
-
actual(): void;
|
|
82
|
-
protected box(): ZoomSize;
|
|
83
|
-
protected middle(): Point;
|
|
84
|
-
/** A point of the page in the box. */
|
|
85
|
-
protected local(clientX: number, clientY: number): Point;
|
|
86
|
-
/** The spot of the picture (its own pixels) under `point` of the box. */
|
|
87
|
-
protected spotAt(point: Point): Point;
|
|
88
|
-
/** Draws it at `scale` with `spot` of the picture under `point` of the box. */
|
|
89
|
-
protected place(scale: number, spot: Point, point: Point): void;
|
|
90
|
-
/** Tells what shows the scale, once a frame. */
|
|
91
|
-
protected announce(): void;
|
|
92
|
-
/** Fits it again in a box of another size, or keeps the middle where it is when zoomed. */
|
|
93
|
-
protected layout(): void;
|
|
94
|
-
protected readonly onLoad: () => void;
|
|
95
|
-
protected readonly onWheel: (event: WheelEvent) => void;
|
|
96
|
-
/** Safari's pinch of a trackpad (and of a finger, which the touches have already). */
|
|
97
|
-
protected readonly onGesture: (event: Event) => void;
|
|
98
|
-
protected pinchOf(touches: TouchList): {
|
|
99
|
-
point: Point;
|
|
100
|
-
distance: number;
|
|
101
|
-
};
|
|
102
|
-
protected readonly onTouchStart: (event: TouchEvent) => void;
|
|
103
|
-
protected readonly onTouchMove: (event: TouchEvent) => void;
|
|
104
|
-
protected readonly onTouchEnd: (event: TouchEvent) => void;
|
|
105
|
-
protected readonly onPointerDown: (event: PointerEvent) => void;
|
|
106
|
-
protected readonly onPointerMove: (event: PointerEvent) => void;
|
|
107
|
-
protected readonly onPointerUp: (event: PointerEvent) => void;
|
|
108
|
-
/** A click beside the picture; after a touch, once it is clear that no second tap follows. */
|
|
109
|
-
protected readonly onClick: (event: MouseEvent) => void;
|
|
110
|
-
protected readonly onDoubleClick: (event: MouseEvent) => void;
|
|
111
|
-
protected readonly onKey: (event: KeyboardEvent) => void;
|
|
112
|
-
}
|
|
2
|
+
import { type ZoomSize } from '../util/zoom.js';
|
|
3
|
+
import { type ZoomState } from './image-zoom.js';
|
|
4
|
+
export type { ZoomState };
|
|
113
5
|
export interface ImageViewerProps {
|
|
114
6
|
src: string;
|
|
115
7
|
alt?: string;
|
|
@@ -121,12 +13,17 @@ export interface ImageViewerProps {
|
|
|
121
13
|
/** The picture before this one, and the one after (of a folder, of a message): buttons at the sides and ← →; none without them. */
|
|
122
14
|
onPrevious?(): void;
|
|
123
15
|
onNext?(): void;
|
|
16
|
+
/** The pictures before and after this one, shown beside it as a finger swipes to them. */
|
|
17
|
+
previousSrc?: string;
|
|
18
|
+
nextSrc?: string;
|
|
124
19
|
/** Takes the keys at once: the picture after one shown by ← → (another viewer) goes on with the keys. */
|
|
125
20
|
autoFocus?: boolean;
|
|
126
21
|
}
|
|
127
22
|
/**
|
|
128
|
-
* A picture that zooms and scrolls (ImageZoom), with its buttons: −, the scale, +, fit to window
|
|
129
|
-
*
|
|
23
|
+
* A picture that zooms and scrolls (ImageZoom), with its buttons: −, the scale, +, fit to window, actual size and
|
|
24
|
+
* copy (⌘C or Ctrl+C too, where the page can put a picture on the clipboard); with `onPrevious` / `onNext`, the
|
|
25
|
+
* pictures beside it at its sides, by ← → (which scroll it while it is zoomed) and by a finger that swipes it
|
|
26
|
+
* (ImageSwipe), `previousSrc` / `nextSrc` in sight as it does. Another `src` shows in the same viewer: the picture
|
|
27
|
+
* before stays until it loaded.
|
|
130
28
|
*/
|
|
131
|
-
export declare function ImageViewer({ src, alt, className, onLoad, onBackground, onPrevious, onNext, autoFocus }: ImageViewerProps): React.JSX.Element;
|
|
132
|
-
export {};
|
|
29
|
+
export declare function ImageViewer({ src, alt, className, onLoad, onBackground, onPrevious, onNext, previousSrc, nextSrc, autoFocus }: ImageViewerProps): React.JSX.Element;
|
|
@@ -1,399 +1,93 @@
|
|
|
1
|
-
import { ChevronLeft, ChevronRight, Maximize, Maximize2, Minus, Plus } from 'lucide-react';
|
|
1
|
+
import { Check, ChevronLeft, ChevronRight, Copy, Maximize, Maximize2, Minus, Plus, X } from 'lucide-react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { OwnGestures } from '../device/own-gestures.js';
|
|
3
4
|
import { useT } from '../i18n/use-t.js';
|
|
5
|
+
import { ImageCopyUtil } from '../util/image-copy.js';
|
|
4
6
|
import { ZoomUtil } from '../util/zoom.js';
|
|
5
7
|
import { Icon } from './icon.js';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
const
|
|
10
|
-
const DOUBLE_TAP_PX = 30;
|
|
11
|
-
/** A finger or the mouse that moved less than this taps or clicks. */
|
|
12
|
-
const TAP_PX = 8;
|
|
8
|
+
import { ImageSwipe } from './image-swipe.js';
|
|
9
|
+
import { ImageZoom } from './image-zoom.js';
|
|
10
|
+
/** How long the copy button says the picture was copied, or could not be. */
|
|
11
|
+
const COPIED_MS = 1500;
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* leave a picture that scrolls sideways alone (sheet-swipe.ts).
|
|
13
|
+
* A picture that zooms and scrolls (ImageZoom), with its buttons: −, the scale, +, fit to window, actual size and
|
|
14
|
+
* copy (⌘C or Ctrl+C too, where the page can put a picture on the clipboard); with `onPrevious` / `onNext`, the
|
|
15
|
+
* pictures beside it at its sides, by ← → (which scroll it while it is zoomed) and by a finger that swipes it
|
|
16
|
+
* (ImageSwipe), `previousSrc` / `nextSrc` in sight as it does. Another `src` shows in the same viewer: the picture
|
|
17
|
+
* before stays until it loaded.
|
|
20
18
|
*/
|
|
21
|
-
export
|
|
22
|
-
constructor(viewport, stage, image, on) {
|
|
23
|
-
this.viewport = viewport;
|
|
24
|
-
this.stage = stage;
|
|
25
|
-
this.image = image;
|
|
26
|
-
this.on = on;
|
|
27
|
-
this.scale = 1;
|
|
28
|
-
this.limits = { base: 1, min: 1, max: 1 };
|
|
29
|
-
/** Whether it shows as at first: then it fits again when the box changes size. */
|
|
30
|
-
this.fitted = true;
|
|
31
|
-
this.lastTouch = 0;
|
|
32
|
-
this.dragged = false;
|
|
33
|
-
this.frame = 0;
|
|
34
|
-
this.announced = 0;
|
|
35
|
-
this.onLoad = () => {
|
|
36
|
-
const { image } = this;
|
|
37
|
-
// A picture of no size of its own (an SVG with only a viewBox) fills the box.
|
|
38
|
-
const box = this.box();
|
|
39
|
-
this.natural = { width: image.naturalWidth || box.width, height: image.naturalHeight || box.height };
|
|
40
|
-
this.fitted = true;
|
|
41
|
-
this.layout();
|
|
42
|
-
image.dataset.ready = '';
|
|
43
|
-
this.on.loaded(this.natural);
|
|
44
|
-
};
|
|
45
|
-
this.onWheel = (event) => {
|
|
46
|
-
// A pinch of a trackpad comes as a wheel with Ctrl; Ctrl or ⌘ with a wheel zooms too. A wheel alone scrolls.
|
|
47
|
-
if (!event.ctrlKey && !event.metaKey) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
event.preventDefault();
|
|
51
|
-
cancelAnimationFrame(this.frame);
|
|
52
|
-
const point = this.local(event.clientX, event.clientY);
|
|
53
|
-
const last = this.wheelAnchor;
|
|
54
|
-
const same = last && event.timeStamp - last.t < 250 && Math.hypot(point.x - last.point.x, point.y - last.point.y) < 2;
|
|
55
|
-
const spot = same ? last.spot : this.spotAt(point);
|
|
56
|
-
this.wheelAnchor = { point, spot, t: event.timeStamp };
|
|
57
|
-
this.place(ZoomUtil.clamp(this.scale * ZoomUtil.wheel(event.deltaY, event.deltaMode), this.limits), spot, point);
|
|
58
|
-
};
|
|
59
|
-
/** Safari's pinch of a trackpad (and of a finger, which the touches have already). */
|
|
60
|
-
this.onGesture = (event) => {
|
|
61
|
-
event.preventDefault();
|
|
62
|
-
const gesture = event;
|
|
63
|
-
if (this.pinch || Date.now() - this.lastTouch < 500) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const point = this.local(gesture.clientX, gesture.clientY);
|
|
67
|
-
if (event.type === 'gesturestart') {
|
|
68
|
-
cancelAnimationFrame(this.frame);
|
|
69
|
-
this.gesture = { scale: this.scale };
|
|
70
|
-
}
|
|
71
|
-
else if (this.gesture && event.type === 'gesturechange') {
|
|
72
|
-
this.place(ZoomUtil.clamp(this.gesture.scale * gesture.scale, this.limits), this.spotAt(point), point);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
this.gesture = undefined;
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
this.onTouchStart = (event) => {
|
|
79
|
-
this.lastTouch = Date.now();
|
|
80
|
-
cancelAnimationFrame(this.frame);
|
|
81
|
-
if (event.touches.length >= 2) {
|
|
82
|
-
const { point, distance } = this.pinchOf(event.touches);
|
|
83
|
-
this.pinch = { scale: this.scale, distance, spot: this.spotAt(point) };
|
|
84
|
-
this.tap = undefined;
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
const touch = event.touches[0];
|
|
88
|
-
this.tap = touch && { x: touch.clientX, y: touch.clientY, t: event.timeStamp, moved: false };
|
|
89
|
-
};
|
|
90
|
-
this.onTouchMove = (event) => {
|
|
91
|
-
this.lastTouch = Date.now();
|
|
92
|
-
if (this.pinch && event.touches.length >= 2) {
|
|
93
|
-
// Neither the page nor a sheet moves under a pinch.
|
|
94
|
-
event.preventDefault();
|
|
95
|
-
const { point, distance } = this.pinchOf(event.touches);
|
|
96
|
-
this.place(ZoomUtil.rubber((this.pinch.scale * distance) / this.pinch.distance, this.limits), this.pinch.spot, point);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const touch = event.touches[0];
|
|
100
|
-
if (this.tap && touch && Math.hypot(touch.clientX - this.tap.x, touch.clientY - this.tap.y) > TAP_PX) {
|
|
101
|
-
this.tap.moved = true;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
this.onTouchEnd = (event) => {
|
|
105
|
-
this.lastTouch = Date.now();
|
|
106
|
-
if (this.pinch) {
|
|
107
|
-
if (event.touches.length >= 2) {
|
|
108
|
-
const { point, distance } = this.pinchOf(event.touches);
|
|
109
|
-
this.pinch = { scale: this.scale, distance, spot: this.spotAt(point) };
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.pinch = undefined;
|
|
113
|
-
// Past the limits, it comes back, about the middle of the box.
|
|
114
|
-
const settled = ZoomUtil.clamp(this.scale, this.limits);
|
|
115
|
-
if (settled !== this.scale) {
|
|
116
|
-
this.zoomTo(settled);
|
|
117
|
-
}
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const tap = this.tap;
|
|
121
|
-
this.tap = undefined;
|
|
122
|
-
if (!tap || tap.moved || event.touches.length > 0 || event.timeStamp - tap.t > DOUBLE_TAP_MS) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const last = this.lastTap;
|
|
126
|
-
if (last && tap.t - last.t < DOUBLE_TAP_MS * 1.5 && Math.hypot(tap.x - last.x, tap.y - last.y) < DOUBLE_TAP_PX) {
|
|
127
|
-
this.lastTap = undefined;
|
|
128
|
-
clearTimeout(this.backgroundTimer);
|
|
129
|
-
// No click, nor a zoom of the page, follows.
|
|
130
|
-
if (event.cancelable) {
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
}
|
|
133
|
-
this.zoomTo(ZoomUtil.toggle(this.scale, this.limits), this.local(tap.x, tap.y));
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
this.lastTap = { x: tap.x, y: tap.y, t: tap.t };
|
|
137
|
-
};
|
|
138
|
-
this.onPointerDown = (event) => {
|
|
139
|
-
var _a;
|
|
140
|
-
this.dragged = false;
|
|
141
|
-
if (event.pointerType !== 'mouse' || event.button !== 0 || this.viewport.dataset.zoomed !== 'true') {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
cancelAnimationFrame(this.frame);
|
|
145
|
-
const { viewport } = this;
|
|
146
|
-
this.drag = { id: event.pointerId, x: event.clientX, y: event.clientY, left: viewport.scrollLeft, top: viewport.scrollTop, moved: false };
|
|
147
|
-
(_a = viewport.setPointerCapture) === null || _a === void 0 ? void 0 : _a.call(viewport, event.pointerId);
|
|
148
|
-
};
|
|
149
|
-
this.onPointerMove = (event) => {
|
|
150
|
-
const drag = this.drag;
|
|
151
|
-
if (!drag || drag.id !== event.pointerId) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
const dx = event.clientX - drag.x;
|
|
155
|
-
const dy = event.clientY - drag.y;
|
|
156
|
-
if (!drag.moved && Math.hypot(dx, dy) > TAP_PX / 2) {
|
|
157
|
-
drag.moved = true;
|
|
158
|
-
this.viewport.dataset.dragging = '';
|
|
159
|
-
}
|
|
160
|
-
if (drag.moved) {
|
|
161
|
-
this.viewport.scrollLeft = drag.left - dx;
|
|
162
|
-
this.viewport.scrollTop = drag.top - dy;
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
this.onPointerUp = (event) => {
|
|
166
|
-
var _a;
|
|
167
|
-
if (((_a = this.drag) === null || _a === void 0 ? void 0 : _a.id) === event.pointerId) {
|
|
168
|
-
this.dragged = this.drag.moved;
|
|
169
|
-
this.drag = undefined;
|
|
170
|
-
delete this.viewport.dataset.dragging;
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
/** A click beside the picture; after a touch, once it is clear that no second tap follows. */
|
|
174
|
-
this.onClick = (event) => {
|
|
175
|
-
if (this.dragged || event.target === this.image) {
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
clearTimeout(this.backgroundTimer);
|
|
179
|
-
if (Date.now() - this.lastTouch < 800) {
|
|
180
|
-
this.backgroundTimer = setTimeout(() => this.on.background(), DOUBLE_TAP_MS * 1.5);
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
this.on.background();
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
this.onDoubleClick = (event) => {
|
|
187
|
-
// A double tap is the touches'.
|
|
188
|
-
if (Date.now() - this.lastTouch < 800) {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
event.preventDefault();
|
|
192
|
-
this.zoomTo(ZoomUtil.toggle(this.scale, this.limits), this.local(event.clientX, event.clientY));
|
|
193
|
-
};
|
|
194
|
-
this.onKey = (event) => {
|
|
195
|
-
if (event.altKey) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
const keys = {
|
|
199
|
-
'+': () => this.step(1),
|
|
200
|
-
'=': () => this.step(1),
|
|
201
|
-
'-': () => this.step(-1),
|
|
202
|
-
'0': () => this.fit(),
|
|
203
|
-
'1': () => this.actual(),
|
|
204
|
-
};
|
|
205
|
-
const action = keys[event.key];
|
|
206
|
-
if (action) {
|
|
207
|
-
event.preventDefault();
|
|
208
|
-
action();
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
attach() {
|
|
213
|
-
const { viewport, image } = this;
|
|
214
|
-
const listeners = [
|
|
215
|
-
[image, 'load', this.onLoad],
|
|
216
|
-
[viewport, 'wheel', this.onWheel, { passive: false }],
|
|
217
|
-
[viewport, 'touchstart', this.onTouchStart, { passive: true }],
|
|
218
|
-
[viewport, 'touchmove', this.onTouchMove, { passive: false }],
|
|
219
|
-
[viewport, 'touchend', this.onTouchEnd],
|
|
220
|
-
[viewport, 'touchcancel', this.onTouchEnd],
|
|
221
|
-
[viewport, 'gesturestart', this.onGesture],
|
|
222
|
-
[viewport, 'gesturechange', this.onGesture],
|
|
223
|
-
[viewport, 'gestureend', this.onGesture],
|
|
224
|
-
[viewport, 'pointerdown', this.onPointerDown],
|
|
225
|
-
[viewport, 'pointermove', this.onPointerMove],
|
|
226
|
-
[viewport, 'pointerup', this.onPointerUp],
|
|
227
|
-
[viewport, 'pointercancel', this.onPointerUp],
|
|
228
|
-
[viewport, 'click', this.onClick],
|
|
229
|
-
[viewport, 'dblclick', this.onDoubleClick],
|
|
230
|
-
[viewport, 'keydown', this.onKey],
|
|
231
|
-
];
|
|
232
|
-
for (const [target, type, listener, options] of listeners) {
|
|
233
|
-
target.addEventListener(type, listener, options);
|
|
234
|
-
}
|
|
235
|
-
const resize = new ResizeObserver(() => this.layout());
|
|
236
|
-
resize.observe(viewport);
|
|
237
|
-
if (image.complete && image.naturalWidth) {
|
|
238
|
-
this.onLoad();
|
|
239
|
-
}
|
|
240
|
-
return () => {
|
|
241
|
-
for (const [target, type, listener] of listeners) {
|
|
242
|
-
target.removeEventListener(type, listener);
|
|
243
|
-
}
|
|
244
|
-
resize.disconnect();
|
|
245
|
-
cancelAnimationFrame(this.frame);
|
|
246
|
-
clearTimeout(this.backgroundTimer);
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
/** Zooms to `scale` at `point` of the box (its middle by default), sliding there. */
|
|
250
|
-
zoomTo(scale, point = this.middle(), animate = true) {
|
|
251
|
-
const to = ZoomUtil.clamp(scale, this.limits);
|
|
252
|
-
if (!animate) {
|
|
253
|
-
this.place(to, this.spotAt(point), point);
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
const from = this.scale;
|
|
257
|
-
const spot = this.spotAt(point);
|
|
258
|
-
const start = performance.now();
|
|
259
|
-
cancelAnimationFrame(this.frame);
|
|
260
|
-
const tick = (now) => {
|
|
261
|
-
const progress = Math.min(1, (now - start) / ANIMATE_MS);
|
|
262
|
-
const eased = 1 - (1 - progress) ** 3;
|
|
263
|
-
this.place(from + (to - from) * eased, spot, point);
|
|
264
|
-
if (progress < 1) {
|
|
265
|
-
this.frame = requestAnimationFrame(tick);
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
this.frame = requestAnimationFrame(tick);
|
|
269
|
-
}
|
|
270
|
-
step(way) {
|
|
271
|
-
this.zoomTo(ZoomUtil.step(this.scale, way, this.limits));
|
|
272
|
-
}
|
|
273
|
-
fit() {
|
|
274
|
-
this.zoomTo(this.limits.base);
|
|
275
|
-
}
|
|
276
|
-
actual() {
|
|
277
|
-
this.zoomTo(1);
|
|
278
|
-
}
|
|
279
|
-
box() {
|
|
280
|
-
return { width: this.viewport.clientWidth, height: this.viewport.clientHeight };
|
|
281
|
-
}
|
|
282
|
-
middle() {
|
|
283
|
-
const box = this.box();
|
|
284
|
-
return { x: box.width / 2, y: box.height / 2 };
|
|
285
|
-
}
|
|
286
|
-
/** A point of the page in the box. */
|
|
287
|
-
local(clientX, clientY) {
|
|
288
|
-
const rect = this.viewport.getBoundingClientRect();
|
|
289
|
-
return { x: clientX - rect.left, y: clientY - rect.top };
|
|
290
|
-
}
|
|
291
|
-
/** The spot of the picture (its own pixels) under `point` of the box. */
|
|
292
|
-
spotAt(point) {
|
|
293
|
-
var _a;
|
|
294
|
-
const natural = (_a = this.natural) !== null && _a !== void 0 ? _a : { width: 1, height: 1 };
|
|
295
|
-
const box = this.box();
|
|
296
|
-
return {
|
|
297
|
-
x: ZoomUtil.at(point.x, this.viewport.scrollLeft, natural.width, this.scale, box.width),
|
|
298
|
-
y: ZoomUtil.at(point.y, this.viewport.scrollTop, natural.height, this.scale, box.height),
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
/** Draws it at `scale` with `spot` of the picture under `point` of the box. */
|
|
302
|
-
place(scale, spot, point) {
|
|
303
|
-
const natural = this.natural;
|
|
304
|
-
if (!natural) {
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
const box = this.box();
|
|
308
|
-
const width = natural.width * scale;
|
|
309
|
-
const height = natural.height * scale;
|
|
310
|
-
this.scale = scale;
|
|
311
|
-
this.fitted = ZoomUtil.fitted(scale, this.limits);
|
|
312
|
-
const { stage, image, viewport } = this;
|
|
313
|
-
stage.style.width = `${ZoomUtil.extent(width, box.width)}px`;
|
|
314
|
-
stage.style.height = `${ZoomUtil.extent(height, box.height)}px`;
|
|
315
|
-
image.style.width = `${width}px`;
|
|
316
|
-
image.style.height = `${height}px`;
|
|
317
|
-
image.style.transform = `translate(${ZoomUtil.offset(width, box.width)}px, ${ZoomUtil.offset(height, box.height)}px)`;
|
|
318
|
-
image.classList.toggle('ta-zoom-pixelated', scale >= ZoomUtil.PIXELATED);
|
|
319
|
-
viewport.scrollLeft = ZoomUtil.scrollTo(spot.x, point.x, natural.width, scale, box.width);
|
|
320
|
-
viewport.scrollTop = ZoomUtil.scrollTo(spot.y, point.y, natural.height, scale, box.height);
|
|
321
|
-
viewport.dataset.zoomed = String(width + 2 * ZoomUtil.PAD > box.width + 1 || height + 2 * ZoomUtil.PAD > box.height + 1);
|
|
322
|
-
this.announce();
|
|
323
|
-
}
|
|
324
|
-
/** Tells what shows the scale, once a frame. */
|
|
325
|
-
announce() {
|
|
326
|
-
if (this.announced) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
this.announced = requestAnimationFrame(() => {
|
|
330
|
-
this.announced = 0;
|
|
331
|
-
this.on.changed({ scale: this.scale, ...this.limits });
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
/** Fits it again in a box of another size, or keeps the middle where it is when zoomed. */
|
|
335
|
-
layout() {
|
|
336
|
-
if (!this.natural) {
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
const middle = this.middle();
|
|
340
|
-
const spot = this.spotAt(middle);
|
|
341
|
-
const fitted = this.fitted;
|
|
342
|
-
this.limits = ZoomUtil.limits(this.natural, this.box());
|
|
343
|
-
if (fitted) {
|
|
344
|
-
this.place(this.limits.base, { x: this.natural.width / 2, y: this.natural.height / 2 }, middle);
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
this.place(ZoomUtil.clamp(this.scale, this.limits), spot, middle);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
pinchOf(touches) {
|
|
351
|
-
const a = touches[0];
|
|
352
|
-
const b = touches[1];
|
|
353
|
-
return {
|
|
354
|
-
point: this.local((a.clientX + b.clientX) / 2, (a.clientY + b.clientY) / 2),
|
|
355
|
-
distance: Math.max(1, Math.hypot(a.clientX - b.clientX, a.clientY - b.clientY)),
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* A picture that zooms and scrolls (ImageZoom), with its buttons: −, the scale, +, fit to window and actual size;
|
|
361
|
-
* with `onPrevious` / `onNext`, the pictures beside it at its sides and by ← → (which scroll it while it is zoomed).
|
|
362
|
-
*/
|
|
363
|
-
export function ImageViewer({ src, alt = '', className = '', onLoad, onBackground, onPrevious, onNext, autoFocus }) {
|
|
19
|
+
export function ImageViewer({ src, alt = '', className = '', onLoad, onBackground, onPrevious, onNext, previousSrc, nextSrc, autoFocus }) {
|
|
364
20
|
const t = useT();
|
|
365
21
|
const viewport = React.useRef(null);
|
|
366
22
|
const stage = React.useRef(null);
|
|
367
23
|
const image = React.useRef(null);
|
|
24
|
+
const track = React.useRef(null);
|
|
368
25
|
const zoom = React.useRef(undefined);
|
|
369
|
-
const
|
|
370
|
-
latest
|
|
26
|
+
const swipe = React.useRef(undefined);
|
|
27
|
+
const latest = React.useRef({ onLoad, onBackground, onPrevious, onNext, previousSrc, nextSrc });
|
|
28
|
+
latest.current = { onLoad, onBackground, onPrevious, onNext, previousSrc, nextSrc };
|
|
29
|
+
/** The pictures beside it as they were when a swipe slid it out: kept until the one it went to is in the middle. */
|
|
30
|
+
const [frozen, setFrozen] = React.useState();
|
|
371
31
|
/** Whether it takes the keys as it comes: only then, not when it is shown again. */
|
|
372
32
|
const focusFirst = React.useRef(autoFocus);
|
|
373
33
|
const [state, setState] = React.useState();
|
|
374
34
|
const [failed, setFailed] = React.useState();
|
|
35
|
+
const [copied, setCopied] = React.useState();
|
|
36
|
+
const copyTimer = React.useRef(undefined);
|
|
37
|
+
const copy = React.useCallback(() => {
|
|
38
|
+
const said = (result) => {
|
|
39
|
+
setCopied(result);
|
|
40
|
+
clearTimeout(copyTimer.current);
|
|
41
|
+
copyTimer.current = setTimeout(() => setCopied(undefined), COPIED_MS);
|
|
42
|
+
};
|
|
43
|
+
ImageCopyUtil.copy(src).then(() => said('done'), () => said('failed'));
|
|
44
|
+
}, [src]);
|
|
45
|
+
const latestCopy = React.useRef(copy);
|
|
46
|
+
latestCopy.current = copy;
|
|
47
|
+
React.useEffect(() => () => clearTimeout(copyTimer.current), []);
|
|
375
48
|
React.useEffect(() => {
|
|
376
|
-
if (!viewport.current || !stage.current || !image.current) {
|
|
49
|
+
if (!viewport.current || !stage.current || !image.current || !track.current) {
|
|
377
50
|
return;
|
|
378
51
|
}
|
|
379
52
|
const controller = new ImageZoom(viewport.current, stage.current, image.current, {
|
|
380
53
|
changed: setState,
|
|
381
|
-
loaded: size => {
|
|
54
|
+
loaded: size => {
|
|
55
|
+
var _a, _b, _c;
|
|
56
|
+
(_a = swipe.current) === null || _a === void 0 ? void 0 : _a.shown();
|
|
57
|
+
(_c = (_b = latest.current).onLoad) === null || _c === void 0 ? void 0 : _c.call(_b, size);
|
|
58
|
+
},
|
|
382
59
|
background: () => { var _a, _b; return (_b = (_a = latest.current).onBackground) === null || _b === void 0 ? void 0 : _b.call(_a); },
|
|
383
60
|
});
|
|
384
61
|
zoom.current = controller;
|
|
62
|
+
const swiper = new ImageSwipe(track.current, viewport.current, {
|
|
63
|
+
beside: () => ({ previous: !!latest.current.onPrevious, next: !!latest.current.onNext }),
|
|
64
|
+
go: way => {
|
|
65
|
+
var _a;
|
|
66
|
+
const { previousSrc: previous, nextSrc: next, onPrevious: toPrevious, onNext: toNext } = latest.current;
|
|
67
|
+
setFrozen({ previous, next });
|
|
68
|
+
(_a = (way === 'previous' ? toPrevious : toNext)) === null || _a === void 0 ? void 0 : _a();
|
|
69
|
+
},
|
|
70
|
+
settled: () => setFrozen(undefined),
|
|
71
|
+
});
|
|
72
|
+
swipe.current = swiper;
|
|
385
73
|
const element = viewport.current;
|
|
386
74
|
if (focusFirst.current) {
|
|
387
75
|
element.focus({ preventScroll: true });
|
|
388
76
|
}
|
|
389
77
|
// Zoomed, the arrows scroll it; else they go to the picture beside it.
|
|
390
78
|
const onKeyDown = (event) => {
|
|
79
|
+
// ⌘C or Ctrl+C copies the picture.
|
|
80
|
+
if ((event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey && event.key.toLowerCase() === 'c' && ImageCopyUtil.supported()) {
|
|
81
|
+
event.preventDefault();
|
|
82
|
+
latestCopy.current();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
391
85
|
if (event.altKey || event.ctrlKey || event.metaKey || element.dataset.zoomed === 'true') {
|
|
392
86
|
return;
|
|
393
87
|
}
|
|
394
88
|
const { onPrevious: previous, onNext: next } = latest.current;
|
|
395
89
|
const go = event.key === 'ArrowLeft' ? previous : event.key === 'ArrowRight' ? next : undefined;
|
|
396
|
-
if (go) {
|
|
90
|
+
if (go && !swiper.busy) {
|
|
397
91
|
event.preventDefault();
|
|
398
92
|
go();
|
|
399
93
|
}
|
|
@@ -401,22 +95,32 @@ export function ImageViewer({ src, alt = '', className = '', onLoad, onBackgroun
|
|
|
401
95
|
element.addEventListener('keydown', onKeyDown);
|
|
402
96
|
// Another src loads in the same picture: its load measures it again.
|
|
403
97
|
const detach = controller.attach();
|
|
98
|
+
const detachSwipe = swiper.attach();
|
|
404
99
|
return () => {
|
|
405
100
|
element.removeEventListener('keydown', onKeyDown);
|
|
406
101
|
detach();
|
|
102
|
+
detachSwipe();
|
|
407
103
|
};
|
|
408
104
|
}, []);
|
|
409
105
|
const fitted = !state || ZoomUtil.fitted(state.scale, state);
|
|
410
106
|
const browses = !!onPrevious || !!onNext;
|
|
107
|
+
const beside = frozen !== null && frozen !== void 0 ? frozen : { previous: previousSrc, next: nextSrc };
|
|
411
108
|
return (React.createElement("div", { className: `ta-zoom ${className}` },
|
|
412
|
-
React.createElement("div", { ref:
|
|
413
|
-
React.createElement("div", { ref:
|
|
414
|
-
React.createElement("
|
|
109
|
+
React.createElement("div", { ref: track, className: "ta-zoom-track", ...(browses ? { [OwnGestures.ATTRIBUTE]: '' } : {}) },
|
|
110
|
+
React.createElement("div", { ref: viewport, className: "ta-zoom-viewport", tabIndex: 0 },
|
|
111
|
+
React.createElement("div", { ref: stage, className: "ta-zoom-stage" },
|
|
112
|
+
React.createElement("img", { ref: image, src: src, alt: alt, draggable: false, onError: () => {
|
|
113
|
+
var _a;
|
|
114
|
+
setFailed(src);
|
|
115
|
+
(_a = swipe.current) === null || _a === void 0 ? void 0 : _a.shown();
|
|
116
|
+
} }))),
|
|
117
|
+
beside.previous && React.createElement("img", { className: "ta-zoom-peek ta-zoom-peek-previous", src: beside.previous, alt: "", draggable: false }),
|
|
118
|
+
beside.next && React.createElement("img", { className: "ta-zoom-peek ta-zoom-peek-next", src: beside.next, alt: "", draggable: false })),
|
|
415
119
|
!state && (React.createElement("div", { className: `ta-zoom-status ${failed === src ? 'ta-zoom-failed' : ''}` }, t(failed === src ? 'ta.zoom.failed' : 'ta.zoom.loading'))),
|
|
416
120
|
browses && (React.createElement(React.Fragment, null,
|
|
417
|
-
React.createElement("button", { type: "button", className: "ta-zoom-nav ta-zoom-previous", title: t('ta.zoom.previous'), disabled: !onPrevious, onClick: onPrevious },
|
|
121
|
+
React.createElement("button", { type: "button", className: "ta-zoom-nav ta-zoom-previous", title: t('ta.zoom.previous'), disabled: !onPrevious, onClick: () => { var _a; return !((_a = swipe.current) === null || _a === void 0 ? void 0 : _a.busy) && (onPrevious === null || onPrevious === void 0 ? void 0 : onPrevious()); } },
|
|
418
122
|
React.createElement(Icon, { icon: ChevronLeft, size: 20 })),
|
|
419
|
-
React.createElement("button", { type: "button", className: "ta-zoom-nav ta-zoom-next", title: t('ta.zoom.next'), disabled: !onNext, onClick: onNext },
|
|
123
|
+
React.createElement("button", { type: "button", className: "ta-zoom-nav ta-zoom-next", title: t('ta.zoom.next'), disabled: !onNext, onClick: () => { var _a; return !((_a = swipe.current) === null || _a === void 0 ? void 0 : _a.busy) && (onNext === null || onNext === void 0 ? void 0 : onNext()); } },
|
|
420
124
|
React.createElement(Icon, { icon: ChevronRight, size: 20 })))),
|
|
421
125
|
state && (React.createElement("div", { className: "ta-zoom-bar" },
|
|
422
126
|
React.createElement("button", { type: "button", title: t('ta.zoom.out'), disabled: state.scale <= state.min * 1.001, onClick: () => { var _a; return (_a = zoom.current) === null || _a === void 0 ? void 0 : _a.step(-1); } },
|
|
@@ -429,6 +133,8 @@ export function ImageViewer({ src, alt = '', className = '', onLoad, onBackgroun
|
|
|
429
133
|
React.createElement("button", { type: "button", title: t('ta.zoom.fit'), "aria-pressed": fitted, onClick: () => { var _a; return (_a = zoom.current) === null || _a === void 0 ? void 0 : _a.fit(); } },
|
|
430
134
|
React.createElement(Icon, { icon: Maximize2, size: 16 })),
|
|
431
135
|
React.createElement("button", { type: "button", title: t('ta.zoom.actual'), "aria-pressed": Math.abs(state.scale - 1) < 0.001, onClick: () => { var _a; return (_a = zoom.current) === null || _a === void 0 ? void 0 : _a.actual(); } },
|
|
432
|
-
React.createElement(Icon, { icon: Maximize, size: 16 }))
|
|
136
|
+
React.createElement(Icon, { icon: Maximize, size: 16 })),
|
|
137
|
+
ImageCopyUtil.supported() && (React.createElement("button", { type: "button", className: "ta-zoom-copy", "data-copied": copied, title: t(copied === 'done' ? 'ta.copied' : copied === 'failed' ? 'ta.zoom.copyFailed' : 'ta.zoom.copy'), onClick: copy },
|
|
138
|
+
React.createElement(Icon, { icon: copied === 'done' ? Check : copied === 'failed' ? X : Copy, size: 16 })))))));
|
|
433
139
|
}
|
|
434
140
|
//# sourceMappingURL=image-viewer.js.map
|