@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,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
/** What the stack uses of `window.history`; tests give their own. */
|
|
2
3
|
export interface BackHistory {
|
|
3
4
|
readonly state: unknown;
|
|
@@ -5,32 +6,109 @@ export interface BackHistory {
|
|
|
5
6
|
go(delta: number): void;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
|
-
* The layers open
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* a swipe), a layer takes its entry with it.
|
|
9
|
+
* The layers open as entries of the browser's history, so that its back closes the top one, as the back of an
|
|
10
|
+
* app does: the back button and gesture of Android, the swipe back of Safari, the back of a browser. Closed by
|
|
11
|
+
* the app (its button, a swipe), a layer takes its entry with it.
|
|
12
12
|
*
|
|
13
|
-
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read
|
|
14
|
-
*
|
|
13
|
+
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read from
|
|
14
|
+
* there: Safari and Chrome may skip back over entries the user did not touch while they were current (one opened by a
|
|
15
|
+
* long press, before the finger lifted). Such a back is one back of the user's, so it closes one layer and the entries
|
|
16
|
+
* of the others are pushed again; unless the browser slid to where it landed already (Safari's swipe, its picture
|
|
17
|
+
* of that entry), where the layers above it close to match. One move of the history at a time:
|
|
18
|
+
* `go` arrives later (popstate), and until it does the state is of before, so what changes meanwhile waits for it
|
|
19
|
+
* (a second `go` read from that state would go too far, out of the page). A move forward (Safari's swipe from the
|
|
20
|
+
* right edge) opens nothing: the history goes back to where the layers are.
|
|
15
21
|
*/
|
|
16
22
|
export declare class BackStack {
|
|
17
23
|
protected readonly history: BackHistory;
|
|
18
24
|
/** Closes the layers above `depth`. */
|
|
19
25
|
protected readonly onBack: (depth: number) => void;
|
|
26
|
+
/** Whether a back that skipped entries closes the layers down to where it landed (the browser slid there). */
|
|
27
|
+
protected readonly landed: () => boolean;
|
|
28
|
+
/** If a `go` of ours never arrives (no entry there), what changed meanwhile is synced after this. */
|
|
29
|
+
static readonly WAIT_MS = 1000;
|
|
20
30
|
/** The layers open, as the app last said. */
|
|
21
31
|
protected depth: number;
|
|
32
|
+
/** A `go` of ours not arrived yet. */
|
|
33
|
+
protected going?: ReturnType<typeof setTimeout>;
|
|
22
34
|
constructor(history: BackHistory,
|
|
23
35
|
/** Closes the layers above `depth`. */
|
|
24
|
-
onBack: (depth: number) => void
|
|
36
|
+
onBack: (depth: number) => void,
|
|
37
|
+
/** Whether a back that skipped entries closes the layers down to where it landed (the browser slid there). */
|
|
38
|
+
landed?: () => boolean);
|
|
25
39
|
/** How many layers the entry of the history now is for. */
|
|
26
40
|
protected get at(): number;
|
|
27
41
|
/** How many layers are open now. */
|
|
28
42
|
sync(depth: number): void;
|
|
29
|
-
/** The history moved (`popstate`): the layers above its entry
|
|
43
|
+
/** The history moved (`popstate`): the user's back closes the layers above its entry; ours, or a move forward, only syncs. */
|
|
30
44
|
popped(): void;
|
|
45
|
+
protected arrived(): void;
|
|
31
46
|
}
|
|
32
47
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
48
|
+
* A layer the back closes: a conversation over the tabs of a phone, the workbench, a page pushed (PhoneStack), a
|
|
49
|
+
* dialog, a menu, an image looked at. Opened inside another (`parent`, by BackLayerContext), it is above it.
|
|
35
50
|
*/
|
|
36
|
-
export
|
|
51
|
+
export interface BackLayer {
|
|
52
|
+
parent?: BackLayer;
|
|
53
|
+
close(): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Every layer open on the page, the last opened on top, as Android's OnBackPressedDispatcher keeps its callbacks
|
|
57
|
+
* and Ionic its back button handlers: the back closes the top one, and only the top one has the swipe that closes
|
|
58
|
+
* it (as iOS gives the edge swipe to the navigation in front). One list for the shell and for what opens over it,
|
|
59
|
+
* so that a back never closes what is under a dialog, nor a layer that is no longer seen. A layer closed by its
|
|
60
|
+
* own takes those opened in it with it.
|
|
61
|
+
*/
|
|
62
|
+
export declare class BackLayers {
|
|
63
|
+
/** Around the closes of a back of the browser: whether it slid them away itself (BackLayers.browserSlides). */
|
|
64
|
+
protected readonly closing: (close: () => void) => void;
|
|
65
|
+
/** Bottom first. */
|
|
66
|
+
protected readonly open: BackLayer[];
|
|
67
|
+
protected readonly listeners: Set<() => void>;
|
|
68
|
+
protected scheduled: boolean;
|
|
69
|
+
protected readonly stack?: BackStack;
|
|
70
|
+
constructor(history?: BackHistory,
|
|
71
|
+
/** Around the closes of a back of the browser: whether it slid them away itself (BackLayers.browserSlides). */
|
|
72
|
+
closing?: (close: () => void) => void, landed?: () => boolean);
|
|
73
|
+
/** The layer on top, if any. */
|
|
74
|
+
get top(): BackLayer | undefined;
|
|
75
|
+
get size(): number;
|
|
76
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
77
|
+
/** `layer` is open: above those it was opened in, and above all else open unless one of them was opened in it. */
|
|
78
|
+
add(layer: BackLayer): void;
|
|
79
|
+
/** `layer` closed (or went): those opened in it close too. */
|
|
80
|
+
remove(layer: BackLayer): void;
|
|
81
|
+
/** Opens a layer for what is not a component (a menu placed by ContextMenuUtil.attach); returns its close by itself. */
|
|
82
|
+
hold(close: () => void, parent?: BackLayer): () => void;
|
|
83
|
+
/** The history moved (`popstate`). */
|
|
84
|
+
popped(): void;
|
|
85
|
+
/** The user went back to where `depth` layers are open: those above close, the top first. */
|
|
86
|
+
protected back(depth: number): void;
|
|
87
|
+
protected changed(): void;
|
|
88
|
+
protected notify(): void;
|
|
89
|
+
/** Whether `layer` was opened in `parent`, or in one opened in it. */
|
|
90
|
+
static within(layer: BackLayer, parent: BackLayer): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Whether a back of the browser was slid by the browser already: Safari on iOS and iPadOS draws its swipe back
|
|
93
|
+
* itself, so what it closed goes without sliding again. Not in the Ta app (its web view has no such swipe), nor
|
|
94
|
+
* on Android, whose back key slides nothing: there the layer slides away as when its button closes it.
|
|
95
|
+
*/
|
|
96
|
+
static browserSlides(): boolean;
|
|
97
|
+
}
|
|
98
|
+
/** The layers of this page. */
|
|
99
|
+
export declare const Back: BackLayers;
|
|
100
|
+
/** The layer the components under it are opened in. */
|
|
101
|
+
export declare const BackLayerContext: React.Context<BackLayer | undefined>;
|
|
102
|
+
/** Whether the page keeps its layers in the history: on a touch screen, and in the layout of a phone. */
|
|
103
|
+
export declare function useBackActive(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* A React hook: while `open`, the back of the system or the browser closes this with `close`, the top layer first
|
|
106
|
+
* (BackLayers). `top`: whether it is the top one, the one whose swipe closes it. Give `layer` to what opens in it
|
|
107
|
+
* with BackLayerContext, so that it is above this and closes with it.
|
|
108
|
+
*/
|
|
109
|
+
export declare function useBackLayer(open: boolean, close: () => void): {
|
|
110
|
+
top: boolean;
|
|
111
|
+
layer: BackLayer;
|
|
112
|
+
};
|
|
113
|
+
/** A React hook: whether no layer is open, where a gesture of what is under them all may start (the pull down of the first tab). */
|
|
114
|
+
export declare function useNoBackLayer(): boolean;
|
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useDevice } from './device.js';
|
|
2
3
|
/**
|
|
3
|
-
* The layers open
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* a swipe), a layer takes its entry with it.
|
|
4
|
+
* The layers open as entries of the browser's history, so that its back closes the top one, as the back of an
|
|
5
|
+
* app does: the back button and gesture of Android, the swipe back of Safari, the back of a browser. Closed by
|
|
6
|
+
* the app (its button, a swipe), a layer takes its entry with it.
|
|
7
7
|
*
|
|
8
|
-
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read
|
|
9
|
-
*
|
|
8
|
+
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read from
|
|
9
|
+
* there: Safari and Chrome may skip back over entries the user did not touch while they were current (one opened by a
|
|
10
|
+
* long press, before the finger lifted). Such a back is one back of the user's, so it closes one layer and the entries
|
|
11
|
+
* of the others are pushed again; unless the browser slid to where it landed already (Safari's swipe, its picture
|
|
12
|
+
* of that entry), where the layers above it close to match. One move of the history at a time:
|
|
13
|
+
* `go` arrives later (popstate), and until it does the state is of before, so what changes meanwhile waits for it
|
|
14
|
+
* (a second `go` read from that state would go too far, out of the page). A move forward (Safari's swipe from the
|
|
15
|
+
* right edge) opens nothing: the history goes back to where the layers are.
|
|
10
16
|
*/
|
|
11
17
|
export class BackStack {
|
|
12
18
|
constructor(history,
|
|
13
19
|
/** Closes the layers above `depth`. */
|
|
14
|
-
onBack
|
|
20
|
+
onBack,
|
|
21
|
+
/** Whether a back that skipped entries closes the layers down to where it landed (the browser slid there). */
|
|
22
|
+
landed = () => false) {
|
|
15
23
|
this.history = history;
|
|
16
24
|
this.onBack = onBack;
|
|
25
|
+
this.landed = landed;
|
|
17
26
|
/** The layers open, as the app last said. */
|
|
18
27
|
this.depth = 0;
|
|
19
28
|
}
|
|
@@ -26,46 +35,208 @@ export class BackStack {
|
|
|
26
35
|
/** How many layers are open now. */
|
|
27
36
|
sync(depth) {
|
|
28
37
|
this.depth = depth;
|
|
38
|
+
if (this.going !== undefined) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
29
41
|
const at = this.at;
|
|
30
42
|
for (let layers = at + 1; layers <= depth; layers++) {
|
|
31
43
|
this.history.pushState({ taLayers: layers }, '');
|
|
32
44
|
}
|
|
33
45
|
if (depth < at) {
|
|
46
|
+
this.going = setTimeout(() => this.arrived(), BackStack.WAIT_MS);
|
|
34
47
|
this.history.go(depth - at);
|
|
35
48
|
}
|
|
36
49
|
}
|
|
37
|
-
/** The history moved (`popstate`): the layers above its entry
|
|
50
|
+
/** The history moved (`popstate`): the user's back closes the layers above its entry; ours, or a move forward, only syncs. */
|
|
38
51
|
popped() {
|
|
52
|
+
if (this.going !== undefined) {
|
|
53
|
+
this.arrived();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
39
56
|
const at = this.at;
|
|
40
57
|
if (at < this.depth) {
|
|
41
|
-
this.depth
|
|
42
|
-
this.
|
|
58
|
+
const depth = this.landed() ? at : this.depth - 1;
|
|
59
|
+
this.depth = depth;
|
|
60
|
+
this.onBack(depth);
|
|
61
|
+
this.sync(depth);
|
|
62
|
+
}
|
|
63
|
+
else if (at > this.depth) {
|
|
64
|
+
this.sync(this.depth);
|
|
43
65
|
}
|
|
44
66
|
}
|
|
67
|
+
arrived() {
|
|
68
|
+
clearTimeout(this.going);
|
|
69
|
+
this.going = undefined;
|
|
70
|
+
this.sync(this.depth);
|
|
71
|
+
}
|
|
45
72
|
}
|
|
73
|
+
/** If a `go` of ours never arrives (no entry there), what changed meanwhile is synced after this. */
|
|
74
|
+
BackStack.WAIT_MS = 1000;
|
|
46
75
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
76
|
+
* Every layer open on the page, the last opened on top, as Android's OnBackPressedDispatcher keeps its callbacks
|
|
77
|
+
* and Ionic its back button handlers: the back closes the top one, and only the top one has the swipe that closes
|
|
78
|
+
* it (as iOS gives the edge swipe to the navigation in front). One list for the shell and for what opens over it,
|
|
79
|
+
* so that a back never closes what is under a dialog, nor a layer that is no longer seen. A layer closed by its
|
|
80
|
+
* own takes those opened in it with it.
|
|
49
81
|
*/
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
back.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
82
|
+
export class BackLayers {
|
|
83
|
+
constructor(history,
|
|
84
|
+
/** Around the closes of a back of the browser: whether it slid them away itself (BackLayers.browserSlides). */
|
|
85
|
+
closing = close => close(), landed) {
|
|
86
|
+
this.closing = closing;
|
|
87
|
+
/** Bottom first. */
|
|
88
|
+
this.open = [];
|
|
89
|
+
this.listeners = new Set();
|
|
90
|
+
this.scheduled = false;
|
|
91
|
+
this.subscribe = (listener) => {
|
|
92
|
+
this.listeners.add(listener);
|
|
93
|
+
return () => this.listeners.delete(listener);
|
|
94
|
+
};
|
|
95
|
+
this.stack = history && new BackStack(history, at => this.back(at), landed);
|
|
96
|
+
}
|
|
97
|
+
/** The layer on top, if any. */
|
|
98
|
+
get top() {
|
|
99
|
+
return this.open[this.open.length - 1];
|
|
100
|
+
}
|
|
101
|
+
get size() {
|
|
102
|
+
return this.open.length;
|
|
103
|
+
}
|
|
104
|
+
/** `layer` is open: above those it was opened in, and above all else open unless one of them was opened in it. */
|
|
105
|
+
add(layer) {
|
|
106
|
+
if (this.open.includes(layer)) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const at = this.open.findIndex(other => BackLayers.within(other, layer));
|
|
110
|
+
this.open.splice(at < 0 ? this.open.length : at, 0, layer);
|
|
111
|
+
this.changed();
|
|
112
|
+
}
|
|
113
|
+
/** `layer` closed (or went): those opened in it close too. */
|
|
114
|
+
remove(layer) {
|
|
115
|
+
const at = this.open.indexOf(layer);
|
|
116
|
+
if (at < 0) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.open.splice(at, 1);
|
|
120
|
+
const inside = this.open.filter(other => BackLayers.within(other, layer));
|
|
121
|
+
for (const other of inside) {
|
|
122
|
+
this.open.splice(this.open.indexOf(other), 1);
|
|
123
|
+
}
|
|
124
|
+
for (const other of inside.reverse()) {
|
|
125
|
+
other.close();
|
|
126
|
+
}
|
|
127
|
+
this.changed();
|
|
128
|
+
}
|
|
129
|
+
/** Opens a layer for what is not a component (a menu placed by ContextMenuUtil.attach); returns its close by itself. */
|
|
130
|
+
hold(close, parent) {
|
|
131
|
+
const layer = { parent, close };
|
|
132
|
+
this.add(layer);
|
|
133
|
+
return () => this.remove(layer);
|
|
134
|
+
}
|
|
135
|
+
/** The history moved (`popstate`). */
|
|
136
|
+
popped() {
|
|
137
|
+
var _a;
|
|
138
|
+
(_a = this.stack) === null || _a === void 0 ? void 0 : _a.popped();
|
|
139
|
+
}
|
|
140
|
+
/** The user went back to where `depth` layers are open: those above close, the top first. */
|
|
141
|
+
back(depth) {
|
|
142
|
+
const gone = this.open.splice(depth).reverse();
|
|
143
|
+
if (gone.length === 0) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.closing(() => {
|
|
147
|
+
for (const layer of gone) {
|
|
148
|
+
layer.close();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
this.notify();
|
|
152
|
+
}
|
|
153
|
+
changed() {
|
|
154
|
+
this.notify();
|
|
155
|
+
// Once for all that changed together (a menu closed as the page it chose opens): no entry pushed and taken back.
|
|
156
|
+
if (!this.scheduled && this.stack) {
|
|
157
|
+
this.scheduled = true;
|
|
158
|
+
queueMicrotask(() => {
|
|
159
|
+
var _a;
|
|
160
|
+
this.scheduled = false;
|
|
161
|
+
(_a = this.stack) === null || _a === void 0 ? void 0 : _a.sync(this.open.length);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
notify() {
|
|
166
|
+
for (const listener of [...this.listeners]) {
|
|
167
|
+
listener();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/** Whether `layer` was opened in `parent`, or in one opened in it. */
|
|
171
|
+
static within(layer, parent) {
|
|
172
|
+
for (let up = layer.parent; up; up = up.parent) {
|
|
173
|
+
if (up === parent) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Whether a back of the browser was slid by the browser already: Safari on iOS and iPadOS draws its swipe back
|
|
181
|
+
* itself, so what it closed goes without sliding again. Not in the Ta app (its web view has no such swipe), nor
|
|
182
|
+
* on Android, whose back key slides nothing: there the layer slides away as when its button closes it.
|
|
183
|
+
*/
|
|
184
|
+
static browserSlides() {
|
|
185
|
+
var _a, _b;
|
|
186
|
+
if (typeof navigator === 'undefined') {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
const app = (_b = (_a = globalThis.Capacitor) === null || _a === void 0 ? void 0 : _a.isNativePlatform) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
190
|
+
const ios = /iPhone|iPad|iPod/.test(navigator.userAgent) || (/Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints > 1);
|
|
191
|
+
return ios && !app;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/** The layers of this page. */
|
|
195
|
+
export const Back = typeof window === 'undefined'
|
|
196
|
+
? new BackLayers()
|
|
197
|
+
: new BackLayers(window.history, close => {
|
|
198
|
+
if (!BackLayers.browserSlides()) {
|
|
199
|
+
close();
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const root = document.documentElement;
|
|
203
|
+
root.dataset.sheetDrag = '';
|
|
204
|
+
close();
|
|
205
|
+
requestAnimationFrame(() => requestAnimationFrame(() => delete root.dataset.sheetDrag));
|
|
206
|
+
}, BackLayers.browserSlides);
|
|
207
|
+
if (typeof window !== 'undefined') {
|
|
208
|
+
window.addEventListener('popstate', () => Back.popped());
|
|
209
|
+
}
|
|
210
|
+
/** The layer the components under it are opened in. */
|
|
211
|
+
export const BackLayerContext = React.createContext(undefined);
|
|
212
|
+
/** Whether the page keeps its layers in the history: on a touch screen, and in the layout of a phone. */
|
|
213
|
+
export function useBackActive() {
|
|
214
|
+
return useDevice(device => device.touch || device.handheld);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* A React hook: while `open`, the back of the system or the browser closes this with `close`, the top layer first
|
|
218
|
+
* (BackLayers). `top`: whether it is the top one, the one whose swipe closes it. Give `layer` to what opens in it
|
|
219
|
+
* with BackLayerContext, so that it is above this and closes with it.
|
|
220
|
+
*/
|
|
221
|
+
export function useBackLayer(open, close) {
|
|
222
|
+
const parent = React.useContext(BackLayerContext);
|
|
223
|
+
const latest = React.useRef(close);
|
|
224
|
+
latest.current = close;
|
|
225
|
+
const [layer] = React.useState(() => ({ close: () => latest.current() }));
|
|
226
|
+
layer.parent = parent;
|
|
227
|
+
const shown = useBackActive() && open;
|
|
61
228
|
React.useEffect(() => {
|
|
62
|
-
if (!
|
|
229
|
+
if (!shown) {
|
|
63
230
|
return;
|
|
64
231
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
232
|
+
Back.add(layer);
|
|
233
|
+
return () => Back.remove(layer);
|
|
234
|
+
}, [shown, layer]);
|
|
235
|
+
const top = React.useSyncExternalStore(Back.subscribe, () => Back.top === layer, () => false);
|
|
236
|
+
return { top: shown && top, layer };
|
|
237
|
+
}
|
|
238
|
+
/** A React hook: whether no layer is open, where a gesture of what is under them all may start (the pull down of the first tab). */
|
|
239
|
+
export function useNoBackLayer() {
|
|
240
|
+
return React.useSyncExternalStore(Back.subscribe, () => Back.size === 0, () => true);
|
|
70
241
|
}
|
|
71
242
|
//# sourceMappingURL=back-stack.js.map
|
|
@@ -40,7 +40,7 @@ export declare namespace DeviceMotion {
|
|
|
40
40
|
const KEYBOARD_MS = 450;
|
|
41
41
|
const KEYBOARD_CURVE = "linear(0, 0.146 3.8%, 0.262 7.3%, 0.369 11.1%, 0.471 14.9%, 0.563 18.4%, 0.644 22.2%, 0.712 26%, 0.77 29.6%, 0.816 33.3%, 0.855 37.1%, 0.886 40.7%, 0.91 44.4%, 0.945 51.8%, 0.967 59.3%, 0.979 66.7%, 0.993 77.8%, 1)";
|
|
42
42
|
const KEYBOARD_CURVE_FALLBACK = "cubic-bezier(0.15, 0.75, 0.2, 1)";
|
|
43
|
-
/** The curve of the sheets of iOS: the screens, the workbench, the drawer and the rows a finger swipes, as they slide on (
|
|
43
|
+
/** The curve of the sheets of iOS: the screens, the workbench, the drawer and the rows a finger swipes, as they slide on (swipe-util.ts). */
|
|
44
44
|
const SHEET_CURVE = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
45
45
|
/** How long a sheet takes to slide on by itself (the 360ms of style/phone.ts and sheet-swipe.ts). */
|
|
46
46
|
const SHEET_MS = 360;
|
|
@@ -24,7 +24,7 @@ export var DeviceMotion;
|
|
|
24
24
|
DeviceMotion.KEYBOARD_MS = 450;
|
|
25
25
|
DeviceMotion.KEYBOARD_CURVE = 'linear(0, 0.146 3.8%, 0.262 7.3%, 0.369 11.1%, 0.471 14.9%, 0.563 18.4%, 0.644 22.2%, 0.712 26%, 0.77 29.6%, 0.816 33.3%, 0.855 37.1%, 0.886 40.7%, 0.91 44.4%, 0.945 51.8%, 0.967 59.3%, 0.979 66.7%, 0.993 77.8%, 1)';
|
|
26
26
|
DeviceMotion.KEYBOARD_CURVE_FALLBACK = 'cubic-bezier(0.15, 0.75, 0.2, 1)';
|
|
27
|
-
/** The curve of the sheets of iOS: the screens, the workbench, the drawer and the rows a finger swipes, as they slide on (
|
|
27
|
+
/** The curve of the sheets of iOS: the screens, the workbench, the drawer and the rows a finger swipes, as they slide on (swipe-util.ts). */
|
|
28
28
|
DeviceMotion.SHEET_CURVE = 'cubic-bezier(0.32, 0.72, 0, 1)';
|
|
29
29
|
/** How long a sheet takes to slide on by itself (the 360ms of style/phone.ts and sheet-swipe.ts). */
|
|
30
30
|
DeviceMotion.SHEET_MS = 360;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SheetSwipe } from './
|
|
1
|
+
import type { SheetSwipe } from './swipe-util.js';
|
|
2
2
|
/**
|
|
3
3
|
* An element that takes the touches that start on it (a game, a canvas to draw on, a joystick of a web
|
|
4
4
|
* extension): the shell lets it have them. `ui.Game` and `ui.Game3D` mark theirs; web extensions mark their
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { nativePlugin } from './device.js';
|
|
3
3
|
import { OwnGestures } from './own-gestures.js';
|
|
4
|
-
import {
|
|
4
|
+
import { SwipeFinger } from './swipe-finger.js';
|
|
5
|
+
import { afterLetGo, SwipeSettle } from './swipe-settle.js';
|
|
6
|
+
import { SwipeUtil, SwipeVelocity } from './swipe-util.js';
|
|
5
7
|
/**
|
|
6
8
|
* What a finger pulls down from the top of a list, as the launcher of WeChat over its chats (ta-launcher.md):
|
|
7
9
|
* the list follows the finger, the launcher shows behind it, and let go far or fast enough the list goes down
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { OwnGestures } from './own-gestures.js';
|
|
3
|
-
import { SwipeFinger
|
|
3
|
+
import { SwipeFinger } from './swipe-finger.js';
|
|
4
|
+
import { SwipeSettle, translated } from './swipe-settle.js';
|
|
5
|
+
import { SwipeUtil, SwipeVelocity } from './swipe-util.js';
|
|
4
6
|
/**
|
|
5
7
|
* A row of a list a finger swipes to the left to show its actions behind it, as the chats of WeChat: it
|
|
6
8
|
* follows the finger, stays open past half of them or flicked, and closes on a swipe back, a tap on it or
|
|
@@ -1,182 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface TouchPoint {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
t: number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A sheet the finger slides, as in the apps of a phone: the navigation drawer from the left, the screen of a
|
|
9
|
-
* conversation and the workbench from the right. `side` is where it comes from; `opensFrom` and `closesFrom`
|
|
10
|
-
* where a swipe may start: the edge the finger moves away from (the left edge for a swipe to the right, the
|
|
11
|
-
* back of iOS), anywhere, or never.
|
|
12
|
-
*/
|
|
13
|
-
export interface SheetSwipe {
|
|
14
|
-
side: 'left' | 'right';
|
|
15
|
-
opensFrom: 'edge' | 'anywhere' | 'never';
|
|
16
|
-
closesFrom: 'edge' | 'anywhere' | 'never';
|
|
17
|
-
}
|
|
18
|
-
/** It follows the finger and, let go, ends where it was flicked to, or the nearer side. Pure, for the tests. */
|
|
19
|
-
export declare namespace SwipeUtil {
|
|
20
|
-
/** A swipe from an edge starts this close to it: the rest of the page scrolls and selects. */
|
|
21
|
-
const EDGE_PX = 24;
|
|
22
|
-
/** How far the finger moves before the swipe is told from a scroll. */
|
|
23
|
-
const SLOP_PX = 10;
|
|
24
|
-
/** A flick: faster than this, in pixels a millisecond, it goes the way it was flicked whatever the distance. */
|
|
25
|
-
const FLICK = 0.4;
|
|
26
|
-
/** How it slides on, let go: the curve of the sheets of iOS, as the styles slide them (style/phone.ts). */
|
|
27
|
-
const CURVE = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
28
|
-
/** The quickest it slides on, however fast it was flicked. */
|
|
29
|
-
const SHORTEST_MS = 120;
|
|
30
|
-
/** The speed of the finger let go is that of its last moves, this long. */
|
|
31
|
-
const VELOCITY_MS = 80;
|
|
32
|
-
/** 1 when the finger moves right to bring the sheet out, -1 when left. */
|
|
33
|
-
function outward(sheet: SheetSwipe): 1 | -1;
|
|
34
|
-
/** Whether a touch at `start` may move the sheet, on a screen `width` wide. */
|
|
35
|
-
function starts(sheet: SheetSwipe, start: TouchPoint, open: boolean, width: number): boolean;
|
|
36
|
-
/** Whether the move so far is the sheet's (more sideways than down, the right way); undefined until it is told. */
|
|
37
|
-
function claims(sheet: SheetSwipe, start: TouchPoint, now: TouchPoint, open: boolean): boolean | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the sheet takes the move so far: undefined while it is not told yet (a finger that sets off
|
|
40
|
-
* slowly moves a pixel or two a move, and is waited for), false when it is not the sheet's or what is under
|
|
41
|
-
* the finger scrolls sideways (`sideways`, asked only then: a tap or a scroll never reads the styles).
|
|
42
|
-
*/
|
|
43
|
-
function takes(sheet: SheetSwipe, start: TouchPoint, now: TouchPoint, open: boolean, sideways: () => boolean): boolean | undefined;
|
|
44
|
-
/** Where the sheet rests away: `∓width`, on its side; out, it rests at 0. */
|
|
45
|
-
function away(sheet: SheetSwipe, width: number): number;
|
|
46
|
-
/** Where the sheet is, between 0 (out) and away, when the finger moved `dx` from where it took it (`from`). */
|
|
47
|
-
function position(sheet: SheetSwipe, from: number, dx: number, width: number): number;
|
|
48
|
-
/** Whether it ends out, let go at `x` at `speed` (pixels a millisecond, SwipeVelocity): the way it was flicked, or the nearer side. */
|
|
49
|
-
function settle(sheet: SheetSwipe, x: number, width: number, speed: number): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* How long it slides on to where it rests, `distance` away (signed), let go at `speed`, where the curves of
|
|
52
|
-
* `linear()` are not (SwipeSpring): on CURVE, as fast at first as the finger was; `longest` (the style's)
|
|
53
|
-
* when the finger was slow, or going the other way.
|
|
54
|
-
*/
|
|
55
|
-
function duration(distance: number, speed: number, longest: number): number;
|
|
56
|
-
/** Whether the page draws the curves of `linear()` (iOS 17.2, Chrome 113 on): a spring then, else CURVE. */
|
|
57
|
-
const springs: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* How what the finger let go at `from` at `speed` slides on to `to`, never past `bounds`: a spring that starts at
|
|
60
|
-
* the speed of the finger where the page draws it (SwipeSpring), else CURVE for `duration`. `longest` is how long
|
|
61
|
-
* its style slides it.
|
|
62
|
-
*/
|
|
63
|
-
function motion(from: number, to: number, speed: number, longest: number, bounds?: [number, number]): SwipeMotion;
|
|
64
|
-
}
|
|
65
|
-
/** How something let go slides on: for `ms`, on `easing`. */
|
|
66
|
-
export interface SwipeMotion {
|
|
67
|
-
ms: number;
|
|
68
|
-
easing: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* What a finger lets go slides on as on a spring, as the sheets of iOS: at the speed the finger had, slowing
|
|
72
|
-
* down to where it rests, never past it; going the other way, it goes on a little that way first, as far as it
|
|
73
|
-
* may. A sheet let go near where it rests settles there quickly, one let go far away takes its time. Drawn by
|
|
74
|
-
* the compositor as a CSS transition, its curve a `linear()` of the spring's points. Pure, for the tests.
|
|
75
|
-
*/
|
|
76
|
-
export declare namespace SwipeSpring {
|
|
77
|
-
/** How stiff, for what its style slides in `longest` ms: ω = STIFFNESS / longest, 95% of the way in about 0.6 × longest from rest. */
|
|
78
|
-
const STIFFNESS = 8;
|
|
79
|
-
/** It rests once nearer than this, in pixels. */
|
|
80
|
-
const REST_PX = 0.5;
|
|
81
|
-
/** 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. */
|
|
82
|
-
function left(t: number, omega: number, speed: number): number;
|
|
83
|
-
function motion(from: number, to: number, speed: number, longest: number, bounds?: [number, number]): SwipeMotion;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* The speed of a finger along x, in pixels a millisecond, of its last moves (SwipeUtil.VELOCITY_MS): let go
|
|
87
|
-
* after a slow drag and a flick it is the flick's, held still a moment it is none.
|
|
88
|
-
*/
|
|
89
|
-
export declare class SwipeVelocity {
|
|
90
|
-
protected readonly axis: 'x' | 'y';
|
|
91
|
-
protected points: TouchPoint[];
|
|
92
|
-
/** Along `x` by default; `y` for what the finger pulls down. */
|
|
93
|
-
constructor(axis?: 'x' | 'y');
|
|
94
|
-
start(point: TouchPoint): void;
|
|
95
|
-
add(point: TouchPoint): void;
|
|
96
|
-
get speed(): number;
|
|
97
|
-
}
|
|
98
|
-
/** What an element let go goes to: a transform, an opacity. */
|
|
99
|
-
export interface SettleTarget {
|
|
100
|
-
element: HTMLElement | null | undefined;
|
|
101
|
-
transform?: string;
|
|
102
|
-
opacity?: number;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The elements a finger moves, then lets go (SwipeMotion): while it moves them their styles do not slide
|
|
106
|
-
* them; let go, they slide on to where they rest with transitions of their own, and only once they are there,
|
|
107
|
-
* and the state has them there too (`ready`), they are their styles' again. So the slide starts in the frame
|
|
108
|
-
* the finger lets go, before the page draws what the state changed (which may take a while: a long
|
|
109
|
-
* conversation), and never jumps if it takes longer than the slide. A finger that takes one of them again, or
|
|
110
|
-
* another swipe that moves it, stops it where it is now.
|
|
111
|
-
*/
|
|
112
|
-
export declare class SwipeSettle {
|
|
113
|
-
/** How long it waits for the state, past the slide, before giving the elements back anyway. */
|
|
114
|
-
static readonly READY_MS = 1000;
|
|
115
|
-
protected readonly elements: Set<HTMLElement>;
|
|
116
|
-
protected timer?: ReturnType<typeof setTimeout>;
|
|
117
|
-
protected done?: () => void;
|
|
118
|
-
/** Whether some of its elements are still its own: moved, or sliding on. */
|
|
119
|
-
get busy(): boolean;
|
|
120
|
-
/** A finger moves these: each stops where it is, whatever slid it, and its style no longer slides it. */
|
|
121
|
-
hold(elements: (HTMLElement | null | undefined)[]): void;
|
|
122
|
-
/**
|
|
123
|
-
* Let go, each slides on to its target as `motion` says; once there and `ready()`, they are their styles'
|
|
124
|
-
* again and `done` runs.
|
|
125
|
-
*/
|
|
126
|
-
run(motion: SwipeMotion, targets: SettleTarget[], ready: () => boolean, done?: () => void): void;
|
|
127
|
-
/** They are their styles' again at once, where those say they rest, without sliding there. */
|
|
128
|
-
finish(): void;
|
|
129
|
-
/** They are their styles' again from where they are now: the styles slide them on to where they rest. */
|
|
130
|
-
release(): void;
|
|
131
|
-
protected giveBack(slide: boolean): void;
|
|
132
|
-
protected static clean(element: HTMLElement, holder: SwipeSettle): void;
|
|
133
|
-
/** Takes `element` from the settle that has it, stopped where it is. */
|
|
134
|
-
protected take(element: HTMLElement): void;
|
|
135
|
-
/** What slides stops where it is now. */
|
|
136
|
-
protected freeze(element: HTMLElement): void;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* 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
|
|
140
|
-
* set off (FrameUtil.painted), or after a while where frames are not drawn (a page out of sight); only if it
|
|
141
|
-
* changes something: the workbench is put away by the same call that brings it out.
|
|
142
|
-
*/
|
|
143
|
-
export declare function afterLetGo(open: boolean, current: () => {
|
|
144
|
-
open: boolean;
|
|
145
|
-
setOpen(open: boolean): void;
|
|
146
|
-
}): void;
|
|
147
|
-
/** Where `element` is moved along `axis` now, by its transform: wherever a style or a slide has it. */
|
|
148
|
-
export declare function translated(element: HTMLElement, axis?: 'x' | 'y'): number;
|
|
149
|
-
/** Where and when a finger is, of a touch. */
|
|
150
|
-
export interface SwipeFingerHandlers {
|
|
151
|
-
move(event: TouchEvent, touch: Touch): void;
|
|
152
|
-
/** Lifted, or taken by the system; `touch` is none when its end was never seen (a finger put down after it). */
|
|
153
|
-
end(event: TouchEvent, touch: Touch | undefined): void;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* The one finger a swipe follows, from its touchstart. Its moves and its end are listened to on the element
|
|
157
|
-
* it was put down on, which keeps getting them when it leaves the page (a row or a message drawn again under
|
|
158
|
-
* the finger) while the document no longer does, and on the document too, each event once. Another finger put
|
|
159
|
-
* down or lifted beside it is not its own; its end never seen, the next finger put down ends it.
|
|
160
|
-
*/
|
|
161
|
-
export declare class SwipeFinger {
|
|
162
|
-
protected readonly on: SwipeFingerHandlers;
|
|
163
|
-
protected readonly blocking: boolean;
|
|
164
|
-
protected id?: number;
|
|
165
|
-
protected targets: EventTarget[];
|
|
166
|
-
protected last?: Event;
|
|
167
|
-
/** `blocking`: its moves may be held back (preventDefault), so their listener is not passive. */
|
|
168
|
-
constructor(on: SwipeFingerHandlers, blocking?: boolean);
|
|
169
|
-
get down(): boolean;
|
|
170
|
-
/**
|
|
171
|
-
* Follows the finger `event` (a touchstart in `doc`) put down, alone on the screen; false while it follows
|
|
172
|
-
* another, which is still down, or when several are.
|
|
173
|
-
*/
|
|
174
|
-
follow(event: TouchEvent, doc: EventTarget): boolean;
|
|
175
|
-
stop(): void;
|
|
176
|
-
protected find(touches: TouchList): Touch | undefined;
|
|
177
|
-
protected readonly onMove: (event: TouchEvent) => void;
|
|
178
|
-
protected readonly onEnd: (event: TouchEvent) => void;
|
|
179
|
-
}
|
|
1
|
+
import { type SheetSwipe } from './swipe-util.js';
|
|
180
2
|
export interface SheetSwipeOptions extends SheetSwipe {
|
|
181
3
|
enabled: boolean;
|
|
182
4
|
/** How long its style slides it, in milliseconds: the longest it takes let go. */
|