@celljs/ta-web 4.15.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- 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 +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- 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 +29 -7
- 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.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -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 +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -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 +2 -1
- 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/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- 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 +466 -0
- package/esm/browser/components/app-view.js +128 -334
- 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 +54 -5
- 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-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- 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 +49 -156
- 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/context-menu.js +4 -0
- 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 +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- 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/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- 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 +10 -447
- 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 +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- 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 +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- 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 +4 -3
- 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 +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- 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/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- 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 +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- 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 +137 -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/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- 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/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 +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- 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 -1
- 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 +6 -82
- package/esm/browser/extension/web-extensions.js +10 -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 +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- 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 +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -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/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -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 +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -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 +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -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/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -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 +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- 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-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- 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 +30 -8
- 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.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -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 +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -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 +2 -1
- 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/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- 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 +502 -0
- package/lib/browser/components/app-view.js +120 -326
- 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 +53 -4
- 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-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- 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 +51 -159
- 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/context-menu.js +4 -0
- 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 +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- 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/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- 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 +11 -455
- 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 +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- 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 +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- 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 +4 -3
- 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 +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- 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/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- 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 +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- 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 +173 -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/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- 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/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 +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- 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 -1
- 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 +6 -82
- package/lib/browser/extension/web-extensions.js +7 -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 +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- 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 +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -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/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -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 +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -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 +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -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/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -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 +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -1,438 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FrameUtil } from '../util/frame.js';
|
|
3
|
-
import { DeviceMotion } from './device-protocol.js';
|
|
4
2
|
import { OwnGestures } from './own-gestures.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** A swipe from an edge starts this close to it: the rest of the page scrolls and selects. */
|
|
9
|
-
SwipeUtil.EDGE_PX = 24;
|
|
10
|
-
/** How far the finger moves before the swipe is told from a scroll. */
|
|
11
|
-
SwipeUtil.SLOP_PX = 10;
|
|
12
|
-
/** A flick: faster than this, in pixels a millisecond, it goes the way it was flicked whatever the distance. */
|
|
13
|
-
SwipeUtil.FLICK = 0.4;
|
|
14
|
-
/** How it slides on, let go: the curve of the sheets of iOS, as the styles slide them (style/phone.ts). */
|
|
15
|
-
SwipeUtil.CURVE = DeviceMotion.SHEET_CURVE;
|
|
16
|
-
/** How much faster than on average CURVE starts: the slope of its first control point (0.72 / 0.32). */
|
|
17
|
-
const CURVE_START = 0.72 / 0.32;
|
|
18
|
-
/** The quickest it slides on, however fast it was flicked. */
|
|
19
|
-
SwipeUtil.SHORTEST_MS = 120;
|
|
20
|
-
/** The speed of the finger let go is that of its last moves, this long. */
|
|
21
|
-
SwipeUtil.VELOCITY_MS = 80;
|
|
22
|
-
/** 1 when the finger moves right to bring the sheet out, -1 when left. */
|
|
23
|
-
function outward(sheet) {
|
|
24
|
-
return sheet.side === 'left' ? 1 : -1;
|
|
25
|
-
}
|
|
26
|
-
SwipeUtil.outward = outward;
|
|
27
|
-
/** The way the finger moves now: out while it is away, back while it is out. */
|
|
28
|
-
function way(sheet, open) {
|
|
29
|
-
return open ? -outward(sheet) : outward(sheet);
|
|
30
|
-
}
|
|
31
|
-
/** Whether a touch at `start` may move the sheet, on a screen `width` wide. */
|
|
32
|
-
function starts(sheet, start, open, width) {
|
|
33
|
-
const from = open ? sheet.closesFrom : sheet.opensFrom;
|
|
34
|
-
if (from !== 'edge') {
|
|
35
|
-
return from === 'anywhere';
|
|
36
|
-
}
|
|
37
|
-
return way(sheet, open) > 0 ? start.x <= SwipeUtil.EDGE_PX : start.x >= width - SwipeUtil.EDGE_PX;
|
|
38
|
-
}
|
|
39
|
-
SwipeUtil.starts = starts;
|
|
40
|
-
/** Whether the move so far is the sheet's (more sideways than down, the right way); undefined until it is told. */
|
|
41
|
-
function claims(sheet, start, now, open) {
|
|
42
|
-
const dx = now.x - start.x;
|
|
43
|
-
const dy = now.y - start.y;
|
|
44
|
-
if (Math.hypot(dx, dy) < SwipeUtil.SLOP_PX) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
return Math.abs(dx) > Math.abs(dy) * 1.2 && dx * way(sheet, open) > 0;
|
|
48
|
-
}
|
|
49
|
-
SwipeUtil.claims = claims;
|
|
50
|
-
/**
|
|
51
|
-
* Whether the sheet takes the move so far: undefined while it is not told yet (a finger that sets off
|
|
52
|
-
* slowly moves a pixel or two a move, and is waited for), false when it is not the sheet's or what is under
|
|
53
|
-
* the finger scrolls sideways (`sideways`, asked only then: a tap or a scroll never reads the styles).
|
|
54
|
-
*/
|
|
55
|
-
function takes(sheet, start, now, open, sideways) {
|
|
56
|
-
const claimed = claims(sheet, start, now, open);
|
|
57
|
-
return claimed === undefined ? undefined : claimed && !sideways();
|
|
58
|
-
}
|
|
59
|
-
SwipeUtil.takes = takes;
|
|
60
|
-
/** Where the sheet rests away: `∓width`, on its side; out, it rests at 0. */
|
|
61
|
-
function away(sheet, width) {
|
|
62
|
-
return -outward(sheet) * width;
|
|
63
|
-
}
|
|
64
|
-
SwipeUtil.away = away;
|
|
65
|
-
/** Where the sheet is, between 0 (out) and away, when the finger moved `dx` from where it took it (`from`). */
|
|
66
|
-
function position(sheet, from, dx, width) {
|
|
67
|
-
const rest = away(sheet, width);
|
|
68
|
-
return Math.min(Math.max(rest, 0), Math.max(Math.min(rest, 0), from + dx));
|
|
69
|
-
}
|
|
70
|
-
SwipeUtil.position = position;
|
|
71
|
-
/** Whether it ends out, let go at `x` at `speed` (pixels a millisecond, SwipeVelocity): the way it was flicked, or the nearer side. */
|
|
72
|
-
function settle(sheet, x, width, speed) {
|
|
73
|
-
if (Math.abs(speed) > SwipeUtil.FLICK) {
|
|
74
|
-
return speed * outward(sheet) > 0;
|
|
75
|
-
}
|
|
76
|
-
return Math.abs(x) < width / 2;
|
|
77
|
-
}
|
|
78
|
-
SwipeUtil.settle = settle;
|
|
79
|
-
/**
|
|
80
|
-
* How long it slides on to where it rests, `distance` away (signed), let go at `speed`, where the curves of
|
|
81
|
-
* `linear()` are not (SwipeSpring): on CURVE, as fast at first as the finger was; `longest` (the style's)
|
|
82
|
-
* when the finger was slow, or going the other way.
|
|
83
|
-
*/
|
|
84
|
-
function duration(distance, speed, longest) {
|
|
85
|
-
const toward = Math.sign(distance) * speed;
|
|
86
|
-
if (toward <= 0 || distance === 0) {
|
|
87
|
-
return longest;
|
|
88
|
-
}
|
|
89
|
-
return Math.round(Math.min(longest, Math.max(SwipeUtil.SHORTEST_MS, (CURVE_START * Math.abs(distance)) / toward)));
|
|
90
|
-
}
|
|
91
|
-
SwipeUtil.duration = duration;
|
|
92
|
-
/** Whether the page draws the curves of `linear()` (iOS 17.2, Chrome 113 on): a spring then, else CURVE. */
|
|
93
|
-
SwipeUtil.springs = (() => {
|
|
94
|
-
try {
|
|
95
|
-
return typeof CSS !== 'undefined' && CSS.supports('transition-timing-function', 'linear(0, 1)');
|
|
96
|
-
}
|
|
97
|
-
catch (_a) {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
})();
|
|
101
|
-
/**
|
|
102
|
-
* How what the finger let go at `from` at `speed` slides on to `to`, never past `bounds`: a spring that starts at
|
|
103
|
-
* the speed of the finger where the page draws it (SwipeSpring), else CURVE for `duration`. `longest` is how long
|
|
104
|
-
* its style slides it.
|
|
105
|
-
*/
|
|
106
|
-
function motion(from, to, speed, longest, bounds = [-Infinity, Infinity]) {
|
|
107
|
-
if (SwipeUtil.springs) {
|
|
108
|
-
return SwipeSpring.motion(from, to, speed, longest, bounds);
|
|
109
|
-
}
|
|
110
|
-
return { ms: Math.abs(to - from) < SwipeSpring.REST_PX ? 0 : duration(to - from, speed, longest), easing: SwipeUtil.CURVE };
|
|
111
|
-
}
|
|
112
|
-
SwipeUtil.motion = motion;
|
|
113
|
-
})(SwipeUtil || (SwipeUtil = {}));
|
|
114
|
-
/**
|
|
115
|
-
* What a finger lets go slides on as on a spring, as the sheets of iOS: at the speed the finger had, slowing
|
|
116
|
-
* down to where it rests, never past it; going the other way, it goes on a little that way first, as far as it
|
|
117
|
-
* may. A sheet let go near where it rests settles there quickly, one let go far away takes its time. Drawn by
|
|
118
|
-
* the compositor as a CSS transition, its curve a `linear()` of the spring's points. Pure, for the tests.
|
|
119
|
-
*/
|
|
120
|
-
export var SwipeSpring;
|
|
121
|
-
(function (SwipeSpring) {
|
|
122
|
-
/** How stiff, for what its style slides in `longest` ms: ω = STIFFNESS / longest, 95% of the way in about 0.6 × longest from rest. */
|
|
123
|
-
SwipeSpring.STIFFNESS = 8;
|
|
124
|
-
/** It rests once nearer than this, in pixels. */
|
|
125
|
-
SwipeSpring.REST_PX = 0.5;
|
|
126
|
-
/** A point of its curve this often, in milliseconds. */
|
|
127
|
-
const STEP_MS = 12;
|
|
128
|
-
/** How far it still is from where it rests, of the way, after `t` ms: critically damped, at `speed` (of the way a millisecond) at first. */
|
|
129
|
-
function left(t, omega, speed) {
|
|
130
|
-
return (1 + (omega - speed) * t) * Math.exp(-omega * t);
|
|
131
|
-
}
|
|
132
|
-
SwipeSpring.left = left;
|
|
133
|
-
function motion(from, to, speed, longest, bounds = [-Infinity, Infinity]) {
|
|
134
|
-
const distance = to - from;
|
|
135
|
-
const span = Math.abs(distance);
|
|
136
|
-
if (span < SwipeSpring.REST_PX) {
|
|
137
|
-
return { ms: 0, easing: 'linear' };
|
|
138
|
-
}
|
|
139
|
-
const toward = (Math.sign(distance) * speed) / span;
|
|
140
|
-
// Flicked faster than the spring goes, it is stiffer: it goes on at the finger's speed, and never past where it rests.
|
|
141
|
-
const omega = Math.max(SwipeSpring.STIFFNESS / longest, toward);
|
|
142
|
-
let ms = STEP_MS;
|
|
143
|
-
while (ms < longest * 2 && Math.abs(left(ms, omega, toward)) * span > SwipeSpring.REST_PX) {
|
|
144
|
-
ms += 4;
|
|
145
|
-
}
|
|
146
|
-
// The other way, it goes on only as far as it may.
|
|
147
|
-
const behind = distance > 0 ? from - bounds[0] : bounds[1] - from;
|
|
148
|
-
const lowest = -Math.max(0, behind) / span;
|
|
149
|
-
const count = Math.max(8, Math.ceil(ms / STEP_MS));
|
|
150
|
-
const points = [];
|
|
151
|
-
for (let i = 0; i <= count; i++) {
|
|
152
|
-
const progress = i === count ? 1 : Math.max(lowest, 1 - left((ms * i) / count, omega, toward));
|
|
153
|
-
points.push(String(Math.round(progress * 1000) / 1000));
|
|
154
|
-
}
|
|
155
|
-
return { ms, easing: `linear(${points.join(', ')})` };
|
|
156
|
-
}
|
|
157
|
-
SwipeSpring.motion = motion;
|
|
158
|
-
})(SwipeSpring || (SwipeSpring = {}));
|
|
159
|
-
/**
|
|
160
|
-
* The speed of a finger along x, in pixels a millisecond, of its last moves (SwipeUtil.VELOCITY_MS): let go
|
|
161
|
-
* after a slow drag and a flick it is the flick's, held still a moment it is none.
|
|
162
|
-
*/
|
|
163
|
-
export class SwipeVelocity {
|
|
164
|
-
/** Along `x` by default; `y` for what the finger pulls down. */
|
|
165
|
-
constructor(axis = 'x') {
|
|
166
|
-
this.axis = axis;
|
|
167
|
-
this.points = [];
|
|
168
|
-
}
|
|
169
|
-
start(point) {
|
|
170
|
-
this.points = [point];
|
|
171
|
-
}
|
|
172
|
-
add(point) {
|
|
173
|
-
this.points.push(point);
|
|
174
|
-
const since = point.t - SwipeUtil.VELOCITY_MS;
|
|
175
|
-
while (this.points.length > 2 && this.points[1].t <= since) {
|
|
176
|
-
this.points.shift();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
get speed() {
|
|
180
|
-
const first = this.points[0];
|
|
181
|
-
const last = this.points[this.points.length - 1];
|
|
182
|
-
const ms = last && first ? last.t - first.t : 0;
|
|
183
|
-
return ms > 0 ? (last[this.axis] - first[this.axis]) / ms : 0;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
/** The settle that holds an element now: one at a time, so that a finger that takes it stops whatever slid it. */
|
|
187
|
-
const holders = new WeakMap();
|
|
188
|
-
/**
|
|
189
|
-
* The elements a finger moves, then lets go (SwipeMotion): while it moves them their styles do not slide
|
|
190
|
-
* them; let go, they slide on to where they rest with transitions of their own, and only once they are there,
|
|
191
|
-
* and the state has them there too (`ready`), they are their styles' again. So the slide starts in the frame
|
|
192
|
-
* the finger lets go, before the page draws what the state changed (which may take a while: a long
|
|
193
|
-
* conversation), and never jumps if it takes longer than the slide. A finger that takes one of them again, or
|
|
194
|
-
* another swipe that moves it, stops it where it is now.
|
|
195
|
-
*/
|
|
196
|
-
export class SwipeSettle {
|
|
197
|
-
constructor() {
|
|
198
|
-
this.elements = new Set();
|
|
199
|
-
}
|
|
200
|
-
/** Whether some of its elements are still its own: moved, or sliding on. */
|
|
201
|
-
get busy() {
|
|
202
|
-
return this.elements.size > 0;
|
|
203
|
-
}
|
|
204
|
-
/** A finger moves these: each stops where it is, whatever slid it, and its style no longer slides it. */
|
|
205
|
-
hold(elements) {
|
|
206
|
-
clearTimeout(this.timer);
|
|
207
|
-
this.done = undefined;
|
|
208
|
-
for (const element of elements) {
|
|
209
|
-
if (element) {
|
|
210
|
-
this.take(element);
|
|
211
|
-
element.style.transition = 'none';
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Let go, each slides on to its target as `motion` says; once there and `ready()`, they are their styles'
|
|
217
|
-
* again and `done` runs.
|
|
218
|
-
*/
|
|
219
|
-
run(motion, targets, ready, done) {
|
|
220
|
-
clearTimeout(this.timer);
|
|
221
|
-
const transition = motion.ms > 0 ? `transform ${motion.ms}ms ${motion.easing}, opacity ${motion.ms}ms ${motion.easing}` : 'none';
|
|
222
|
-
for (const { element, transform, opacity } of targets) {
|
|
223
|
-
if (!element) {
|
|
224
|
-
continue;
|
|
225
|
-
}
|
|
226
|
-
this.take(element);
|
|
227
|
-
element.style.transition = transition;
|
|
228
|
-
if (transform !== undefined) {
|
|
229
|
-
element.style.transform = transform;
|
|
230
|
-
}
|
|
231
|
-
if (opacity !== undefined) {
|
|
232
|
-
element.style.opacity = String(opacity);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
this.done = done;
|
|
236
|
-
const until = Date.now() + motion.ms + SwipeSettle.READY_MS;
|
|
237
|
-
const check = () => {
|
|
238
|
-
if (ready() || Date.now() > until) {
|
|
239
|
-
this.finish();
|
|
240
|
-
}
|
|
241
|
-
else {
|
|
242
|
-
this.timer = setTimeout(check, 32);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
this.timer = setTimeout(check, motion.ms + 16);
|
|
246
|
-
}
|
|
247
|
-
/** They are their styles' again at once, where those say they rest, without sliding there. */
|
|
248
|
-
finish() {
|
|
249
|
-
this.giveBack(false);
|
|
250
|
-
}
|
|
251
|
-
/** They are their styles' again from where they are now: the styles slide them on to where they rest. */
|
|
252
|
-
release() {
|
|
253
|
-
this.giveBack(true);
|
|
254
|
-
}
|
|
255
|
-
giveBack(slide) {
|
|
256
|
-
clearTimeout(this.timer);
|
|
257
|
-
const elements = [...this.elements];
|
|
258
|
-
this.elements.clear();
|
|
259
|
-
const done = this.done;
|
|
260
|
-
this.done = undefined;
|
|
261
|
-
if (slide) {
|
|
262
|
-
for (const element of elements) {
|
|
263
|
-
this.freeze(element);
|
|
264
|
-
}
|
|
265
|
-
// Where they are now is where the styles slide them from.
|
|
266
|
-
if (elements.length) {
|
|
267
|
-
void getComputedStyle(elements[0]).transform;
|
|
268
|
-
}
|
|
269
|
-
done === null || done === void 0 ? void 0 : done();
|
|
270
|
-
for (const element of elements) {
|
|
271
|
-
SwipeSettle.clean(element, this);
|
|
272
|
-
element.style.removeProperty('transition');
|
|
273
|
-
}
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
for (const element of elements) {
|
|
277
|
-
element.style.transition = 'none';
|
|
278
|
-
SwipeSettle.clean(element, this);
|
|
279
|
-
}
|
|
280
|
-
done === null || done === void 0 ? void 0 : done();
|
|
281
|
-
// Where they rest is drawn with no transition, then theirs are the styles' again.
|
|
282
|
-
if (elements.length) {
|
|
283
|
-
void getComputedStyle(elements[0]).transform;
|
|
284
|
-
}
|
|
285
|
-
for (const element of elements) {
|
|
286
|
-
element.style.removeProperty('transition');
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
static clean(element, holder) {
|
|
290
|
-
if (holders.get(element) === holder) {
|
|
291
|
-
holders.delete(element);
|
|
292
|
-
}
|
|
293
|
-
element.style.removeProperty('transform');
|
|
294
|
-
element.style.removeProperty('opacity');
|
|
295
|
-
element.style.removeProperty('visibility');
|
|
296
|
-
}
|
|
297
|
-
/** Takes `element` from the settle that has it, stopped where it is. */
|
|
298
|
-
take(element) {
|
|
299
|
-
const holder = holders.get(element);
|
|
300
|
-
if (holder && holder !== this) {
|
|
301
|
-
holder.elements.delete(element);
|
|
302
|
-
}
|
|
303
|
-
if (holder) {
|
|
304
|
-
this.freeze(element);
|
|
305
|
-
}
|
|
306
|
-
holders.set(element, this);
|
|
307
|
-
this.elements.add(element);
|
|
308
|
-
}
|
|
309
|
-
/** What slides stops where it is now. */
|
|
310
|
-
freeze(element) {
|
|
311
|
-
const transition = element.style.transition;
|
|
312
|
-
if (!transition || transition === 'none') {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
const style = getComputedStyle(element);
|
|
316
|
-
if (element.style.transform) {
|
|
317
|
-
element.style.transform = style.transform;
|
|
318
|
-
}
|
|
319
|
-
if (element.style.opacity) {
|
|
320
|
-
element.style.opacity = style.opacity;
|
|
321
|
-
}
|
|
322
|
-
element.style.transition = 'none';
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
/** How long it waits for the state, past the slide, before giving the elements back anyway. */
|
|
326
|
-
SwipeSettle.READY_MS = 1000;
|
|
327
|
-
/**
|
|
328
|
-
* What a swipe let go changes in the state of the page, once the frame it was let go in is drawn and its slide
|
|
329
|
-
* set off (FrameUtil.painted), or after a while where frames are not drawn (a page out of sight); only if it
|
|
330
|
-
* changes something: the workbench is put away by the same call that brings it out.
|
|
331
|
-
*/
|
|
332
|
-
export function afterLetGo(open, current) {
|
|
333
|
-
let called = false;
|
|
334
|
-
const call = () => {
|
|
335
|
-
if (!called) {
|
|
336
|
-
called = true;
|
|
337
|
-
if (current().open !== open) {
|
|
338
|
-
current().setOpen(open);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
void FrameUtil.painted().then(call);
|
|
343
|
-
setTimeout(call, 100);
|
|
344
|
-
}
|
|
345
|
-
/** Where `element` is moved along `axis` now, by its transform: wherever a style or a slide has it. */
|
|
346
|
-
export function translated(element, axis = 'x') {
|
|
347
|
-
const transform = getComputedStyle(element).transform;
|
|
348
|
-
if (!transform || transform === 'none') {
|
|
349
|
-
return 0;
|
|
350
|
-
}
|
|
351
|
-
const matrix = new DOMMatrixReadOnly(transform);
|
|
352
|
-
return axis === 'x' ? matrix.m41 : matrix.m42;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* The one finger a swipe follows, from its touchstart. Its moves and its end are listened to on the element
|
|
356
|
-
* it was put down on, which keeps getting them when it leaves the page (a row or a message drawn again under
|
|
357
|
-
* the finger) while the document no longer does, and on the document too, each event once. Another finger put
|
|
358
|
-
* down or lifted beside it is not its own; its end never seen, the next finger put down ends it.
|
|
359
|
-
*/
|
|
360
|
-
export class SwipeFinger {
|
|
361
|
-
/** `blocking`: its moves may be held back (preventDefault), so their listener is not passive. */
|
|
362
|
-
constructor(on, blocking = false) {
|
|
363
|
-
this.on = on;
|
|
364
|
-
this.blocking = blocking;
|
|
365
|
-
this.targets = [];
|
|
366
|
-
this.onMove = (event) => {
|
|
367
|
-
if (event === this.last) {
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
this.last = event;
|
|
371
|
-
const touch = this.find(event.touches);
|
|
372
|
-
if (touch) {
|
|
373
|
-
this.on.move(event, touch);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
this.onEnd = (event) => {
|
|
377
|
-
if (event === this.last) {
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
this.last = event;
|
|
381
|
-
const touch = this.find(event.changedTouches);
|
|
382
|
-
if (touch) {
|
|
383
|
-
this.stop();
|
|
384
|
-
this.on.end(event, touch);
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
get down() {
|
|
389
|
-
return this.id !== undefined;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Follows the finger `event` (a touchstart in `doc`) put down, alone on the screen; false while it follows
|
|
393
|
-
* another, which is still down, or when several are.
|
|
394
|
-
*/
|
|
395
|
-
follow(event, doc) {
|
|
396
|
-
if (this.down) {
|
|
397
|
-
if (this.find(event.touches)) {
|
|
398
|
-
return false;
|
|
399
|
-
}
|
|
400
|
-
const lost = event;
|
|
401
|
-
this.stop();
|
|
402
|
-
this.on.end(lost, undefined);
|
|
403
|
-
}
|
|
404
|
-
const touch = event.changedTouches[0];
|
|
405
|
-
if (event.touches.length !== 1 || !touch) {
|
|
406
|
-
return false;
|
|
407
|
-
}
|
|
408
|
-
this.id = touch.identifier;
|
|
409
|
-
const target = event.target;
|
|
410
|
-
this.targets = target && target !== doc ? [target, doc] : [doc];
|
|
411
|
-
for (const element of this.targets) {
|
|
412
|
-
element.addEventListener('touchmove', this.onMove, { passive: !this.blocking });
|
|
413
|
-
element.addEventListener('touchend', this.onEnd, { passive: true });
|
|
414
|
-
element.addEventListener('touchcancel', this.onEnd, { passive: true });
|
|
415
|
-
}
|
|
416
|
-
return true;
|
|
417
|
-
}
|
|
418
|
-
stop() {
|
|
419
|
-
for (const element of this.targets) {
|
|
420
|
-
element.removeEventListener('touchmove', this.onMove);
|
|
421
|
-
element.removeEventListener('touchend', this.onEnd);
|
|
422
|
-
element.removeEventListener('touchcancel', this.onEnd);
|
|
423
|
-
}
|
|
424
|
-
this.targets = [];
|
|
425
|
-
this.id = undefined;
|
|
426
|
-
}
|
|
427
|
-
find(touches) {
|
|
428
|
-
for (let i = 0; i < touches.length; i++) {
|
|
429
|
-
if (touches[i].identifier === this.id) {
|
|
430
|
-
return touches[i];
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
return undefined;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
3
|
+
import { SwipeFinger } from './swipe-finger.js';
|
|
4
|
+
import { afterLetGo, SwipeSettle, translated } from './swipe-settle.js';
|
|
5
|
+
import { SwipeUtil, SwipeVelocity } from './swipe-util.js';
|
|
436
6
|
/** How far what the sheet covers moves, of the width of the sheet (as the styles of the phone, style/phone.ts). */
|
|
437
7
|
const UNDER = 0.3;
|
|
438
8
|
/** How long the styles of the phone slide a sheet (style/phone.ts). */
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Where and when a finger is, of a touch. */
|
|
2
|
+
export interface SwipeFingerHandlers {
|
|
3
|
+
move(event: TouchEvent, touch: Touch): void;
|
|
4
|
+
/** Lifted, or taken by the system; `touch` is none when its end was never seen (a finger put down after it). */
|
|
5
|
+
end(event: TouchEvent, touch: Touch | undefined): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The one finger a swipe follows, from its touchstart. Its moves and its end are listened to on the element
|
|
9
|
+
* it was put down on, which keeps getting them when it leaves the page (a row or a message drawn again under
|
|
10
|
+
* the finger) while the document no longer does, and on the document too, each event once. Another finger put
|
|
11
|
+
* down or lifted beside it is not its own; its end never seen, the next finger put down ends it.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SwipeFinger {
|
|
14
|
+
protected readonly on: SwipeFingerHandlers;
|
|
15
|
+
protected readonly blocking: boolean;
|
|
16
|
+
protected id?: number;
|
|
17
|
+
protected targets: EventTarget[];
|
|
18
|
+
protected last?: Event;
|
|
19
|
+
/** `blocking`: its moves may be held back (preventDefault), so their listener is not passive. */
|
|
20
|
+
constructor(on: SwipeFingerHandlers, blocking?: boolean);
|
|
21
|
+
get down(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Follows the finger `event` (a touchstart in `doc`) put down, alone on the screen; false while it follows
|
|
24
|
+
* another, which is still down, or when several are.
|
|
25
|
+
*/
|
|
26
|
+
follow(event: TouchEvent, doc: EventTarget): boolean;
|
|
27
|
+
stop(): void;
|
|
28
|
+
protected find(touches: TouchList): Touch | undefined;
|
|
29
|
+
protected readonly onMove: (event: TouchEvent) => void;
|
|
30
|
+
protected readonly onEnd: (event: TouchEvent) => void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one finger a swipe follows, from its touchstart. Its moves and its end are listened to on the element
|
|
3
|
+
* it was put down on, which keeps getting them when it leaves the page (a row or a message drawn again under
|
|
4
|
+
* the finger) while the document no longer does, and on the document too, each event once. Another finger put
|
|
5
|
+
* down or lifted beside it is not its own; its end never seen, the next finger put down ends it.
|
|
6
|
+
*/
|
|
7
|
+
export class SwipeFinger {
|
|
8
|
+
/** `blocking`: its moves may be held back (preventDefault), so their listener is not passive. */
|
|
9
|
+
constructor(on, blocking = false) {
|
|
10
|
+
this.on = on;
|
|
11
|
+
this.blocking = blocking;
|
|
12
|
+
this.targets = [];
|
|
13
|
+
this.onMove = (event) => {
|
|
14
|
+
if (event === this.last) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.last = event;
|
|
18
|
+
const touch = this.find(event.touches);
|
|
19
|
+
if (touch) {
|
|
20
|
+
this.on.move(event, touch);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.onEnd = (event) => {
|
|
24
|
+
if (event === this.last) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.last = event;
|
|
28
|
+
const touch = this.find(event.changedTouches);
|
|
29
|
+
if (touch) {
|
|
30
|
+
this.stop();
|
|
31
|
+
this.on.end(event, touch);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
get down() {
|
|
36
|
+
return this.id !== undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Follows the finger `event` (a touchstart in `doc`) put down, alone on the screen; false while it follows
|
|
40
|
+
* another, which is still down, or when several are.
|
|
41
|
+
*/
|
|
42
|
+
follow(event, doc) {
|
|
43
|
+
if (this.down) {
|
|
44
|
+
if (this.find(event.touches)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const lost = event;
|
|
48
|
+
this.stop();
|
|
49
|
+
this.on.end(lost, undefined);
|
|
50
|
+
}
|
|
51
|
+
const touch = event.changedTouches[0];
|
|
52
|
+
if (event.touches.length !== 1 || !touch) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
this.id = touch.identifier;
|
|
56
|
+
const target = event.target;
|
|
57
|
+
this.targets = target && target !== doc ? [target, doc] : [doc];
|
|
58
|
+
for (const element of this.targets) {
|
|
59
|
+
element.addEventListener('touchmove', this.onMove, { passive: !this.blocking });
|
|
60
|
+
element.addEventListener('touchend', this.onEnd, { passive: true });
|
|
61
|
+
element.addEventListener('touchcancel', this.onEnd, { passive: true });
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
stop() {
|
|
66
|
+
for (const element of this.targets) {
|
|
67
|
+
element.removeEventListener('touchmove', this.onMove);
|
|
68
|
+
element.removeEventListener('touchend', this.onEnd);
|
|
69
|
+
element.removeEventListener('touchcancel', this.onEnd);
|
|
70
|
+
}
|
|
71
|
+
this.targets = [];
|
|
72
|
+
this.id = undefined;
|
|
73
|
+
}
|
|
74
|
+
find(touches) {
|
|
75
|
+
for (let i = 0; i < touches.length; i++) {
|
|
76
|
+
if (touches[i].identifier === this.id) {
|
|
77
|
+
return touches[i];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=swipe-finger.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { SwipeMotion } from './swipe-util.js';
|
|
2
|
+
/** What an element let go goes to: a transform, an opacity. */
|
|
3
|
+
export interface SettleTarget {
|
|
4
|
+
element: HTMLElement | null | undefined;
|
|
5
|
+
transform?: string;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The elements a finger moves, then lets go (SwipeMotion): while it moves them their styles do not slide
|
|
10
|
+
* them; let go, they slide on to where they rest with transitions of their own, and only once they are there,
|
|
11
|
+
* and the state has them there too (`ready`), they are their styles' again. So the slide starts in the frame
|
|
12
|
+
* the finger lets go, before the page draws what the state changed (which may take a while: a long
|
|
13
|
+
* conversation), and never jumps if it takes longer than the slide. A finger that takes one of them again, or
|
|
14
|
+
* another swipe that moves it, stops it where it is now.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SwipeSettle {
|
|
17
|
+
/** How long it waits for the state, past the slide, before giving the elements back anyway. */
|
|
18
|
+
static readonly READY_MS = 1000;
|
|
19
|
+
protected readonly elements: Set<HTMLElement>;
|
|
20
|
+
protected timer?: ReturnType<typeof setTimeout>;
|
|
21
|
+
protected done?: () => void;
|
|
22
|
+
/** Whether some of its elements are still its own: moved, or sliding on. */
|
|
23
|
+
get busy(): boolean;
|
|
24
|
+
/** A finger moves these: each stops where it is, whatever slid it, and its style no longer slides it. */
|
|
25
|
+
hold(elements: (HTMLElement | null | undefined)[]): void;
|
|
26
|
+
/**
|
|
27
|
+
* Let go, each slides on to its target as `motion` says; once there and `ready()`, they are their styles'
|
|
28
|
+
* again and `done` runs.
|
|
29
|
+
*/
|
|
30
|
+
run(motion: SwipeMotion, targets: SettleTarget[], ready: () => boolean, done?: () => void): void;
|
|
31
|
+
/** They are their styles' again at once, where those say they rest, without sliding there. */
|
|
32
|
+
finish(): void;
|
|
33
|
+
/** They are their styles' again from where they are now: the styles slide them on to where they rest. */
|
|
34
|
+
release(): void;
|
|
35
|
+
protected giveBack(slide: boolean): void;
|
|
36
|
+
protected static clean(element: HTMLElement, holder: SwipeSettle): void;
|
|
37
|
+
/** Takes `element` from the settle that has it, stopped where it is. */
|
|
38
|
+
protected take(element: HTMLElement): void;
|
|
39
|
+
/** What slides stops where it is now. */
|
|
40
|
+
protected freeze(element: HTMLElement): void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What a swipe let go changes in the state of the page, once the frame it was let go in is drawn and its slide
|
|
44
|
+
* set off (FrameUtil.painted), or after a while where frames are not drawn (a page out of sight); only if it
|
|
45
|
+
* changes something: the workbench is put away by the same call that brings it out.
|
|
46
|
+
*/
|
|
47
|
+
export declare function afterLetGo(open: boolean, current: () => {
|
|
48
|
+
open: boolean;
|
|
49
|
+
setOpen(open: boolean): void;
|
|
50
|
+
}): void;
|
|
51
|
+
/** Where `element` is moved along `axis` now, by its transform: wherever a style or a slide has it. */
|
|
52
|
+
export declare function translated(element: HTMLElement, axis?: 'x' | 'y'): number;
|