@celljs/ta-web 4.16.0 → 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 +121 -333
- 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 +9 -148
- package/esm/browser/components/chat-list.js +277 -513
- package/esm/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +89 -19
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- 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 +7 -6
- 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 +3 -1
- 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 +1 -11
- package/esm/browser/gateway/console-parts.js +38 -128
- package/esm/browser/gateway/console-tenant.js +2 -1
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-view.js +39 -1
- package/esm/browser/i18n/locales.d.ts +143 -6
- package/esm/browser/i18n/messages-ja.js +144 -7
- package/esm/browser/i18n/messages-zh-tw.js +144 -7
- package/esm/browser/i18n/messages.d.ts +140 -3
- package/esm/browser/i18n/messages.js +288 -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 +9 -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 +114 -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 +9 -148
- package/lib/browser/components/chat-list.js +294 -532
- package/lib/browser/components/chat-seen.js +1 -0
- 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/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +88 -18
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- 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 +8 -6
- 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 +2 -0
- 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 +1 -11
- package/lib/browser/gateway/console-parts.js +38 -129
- package/lib/browser/gateway/console-tenant.js +2 -1
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-view.js +39 -1
- package/lib/browser/i18n/locales.d.ts +143 -6
- package/lib/browser/i18n/messages-ja.js +144 -7
- package/lib/browser/i18n/messages-zh-tw.js +144 -7
- package/lib/browser/i18n/messages.d.ts +140 -3
- package/lib/browser/i18n/messages.js +288 -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 +9 -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
|
@@ -33,24 +33,35 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.BackStack = void 0;
|
|
37
|
-
exports.
|
|
36
|
+
exports.BackLayerContext = exports.Back = exports.BackLayers = exports.BackStack = void 0;
|
|
37
|
+
exports.useBackActive = useBackActive;
|
|
38
|
+
exports.useBackLayer = useBackLayer;
|
|
39
|
+
exports.useNoBackLayer = useNoBackLayer;
|
|
38
40
|
const React = __importStar(require("react"));
|
|
41
|
+
const device_1 = require("./device");
|
|
39
42
|
/**
|
|
40
|
-
* The layers open
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* a swipe), a layer takes its entry with it.
|
|
43
|
+
* The layers open as entries of the browser's history, so that its back closes the top one, as the back of an
|
|
44
|
+
* app does: the back button and gesture of Android, the swipe back of Safari, the back of a browser. Closed by
|
|
45
|
+
* the app (its button, a swipe), a layer takes its entry with it.
|
|
44
46
|
*
|
|
45
|
-
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read
|
|
46
|
-
*
|
|
47
|
+
* Each entry says how many layers are open at it (`taLayers`), and the history, wherever it went, is read from
|
|
48
|
+
* there: Safari and Chrome may skip back over entries the user did not touch while they were current (one opened by a
|
|
49
|
+
* long press, before the finger lifted). Such a back is one back of the user's, so it closes one layer and the entries
|
|
50
|
+
* of the others are pushed again; unless the browser slid to where it landed already (Safari's swipe, its picture
|
|
51
|
+
* of that entry), where the layers above it close to match. One move of the history at a time:
|
|
52
|
+
* `go` arrives later (popstate), and until it does the state is of before, so what changes meanwhile waits for it
|
|
53
|
+
* (a second `go` read from that state would go too far, out of the page). A move forward (Safari's swipe from the
|
|
54
|
+
* right edge) opens nothing: the history goes back to where the layers are.
|
|
47
55
|
*/
|
|
48
56
|
class BackStack {
|
|
49
57
|
constructor(history,
|
|
50
58
|
/** Closes the layers above `depth`. */
|
|
51
|
-
onBack
|
|
59
|
+
onBack,
|
|
60
|
+
/** Whether a back that skipped entries closes the layers down to where it landed (the browser slid there). */
|
|
61
|
+
landed = () => false) {
|
|
52
62
|
this.history = history;
|
|
53
63
|
this.onBack = onBack;
|
|
64
|
+
this.landed = landed;
|
|
54
65
|
/** The layers open, as the app last said. */
|
|
55
66
|
this.depth = 0;
|
|
56
67
|
}
|
|
@@ -63,47 +74,210 @@ class BackStack {
|
|
|
63
74
|
/** How many layers are open now. */
|
|
64
75
|
sync(depth) {
|
|
65
76
|
this.depth = depth;
|
|
77
|
+
if (this.going !== undefined) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
66
80
|
const at = this.at;
|
|
67
81
|
for (let layers = at + 1; layers <= depth; layers++) {
|
|
68
82
|
this.history.pushState({ taLayers: layers }, '');
|
|
69
83
|
}
|
|
70
84
|
if (depth < at) {
|
|
85
|
+
this.going = setTimeout(() => this.arrived(), BackStack.WAIT_MS);
|
|
71
86
|
this.history.go(depth - at);
|
|
72
87
|
}
|
|
73
88
|
}
|
|
74
|
-
/** The history moved (`popstate`): the layers above its entry
|
|
89
|
+
/** The history moved (`popstate`): the user's back closes the layers above its entry; ours, or a move forward, only syncs. */
|
|
75
90
|
popped() {
|
|
91
|
+
if (this.going !== undefined) {
|
|
92
|
+
this.arrived();
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
76
95
|
const at = this.at;
|
|
77
96
|
if (at < this.depth) {
|
|
78
|
-
this.depth
|
|
79
|
-
this.
|
|
97
|
+
const depth = this.landed() ? at : this.depth - 1;
|
|
98
|
+
this.depth = depth;
|
|
99
|
+
this.onBack(depth);
|
|
100
|
+
this.sync(depth);
|
|
101
|
+
}
|
|
102
|
+
else if (at > this.depth) {
|
|
103
|
+
this.sync(this.depth);
|
|
80
104
|
}
|
|
81
105
|
}
|
|
106
|
+
arrived() {
|
|
107
|
+
clearTimeout(this.going);
|
|
108
|
+
this.going = undefined;
|
|
109
|
+
this.sync(this.depth);
|
|
110
|
+
}
|
|
82
111
|
}
|
|
83
112
|
exports.BackStack = BackStack;
|
|
113
|
+
/** If a `go` of ours never arrives (no entry there), what changed meanwhile is synced after this. */
|
|
114
|
+
BackStack.WAIT_MS = 1000;
|
|
115
|
+
/**
|
|
116
|
+
* Every layer open on the page, the last opened on top, as Android's OnBackPressedDispatcher keeps its callbacks
|
|
117
|
+
* and Ionic its back button handlers: the back closes the top one, and only the top one has the swipe that closes
|
|
118
|
+
* it (as iOS gives the edge swipe to the navigation in front). One list for the shell and for what opens over it,
|
|
119
|
+
* so that a back never closes what is under a dialog, nor a layer that is no longer seen. A layer closed by its
|
|
120
|
+
* own takes those opened in it with it.
|
|
121
|
+
*/
|
|
122
|
+
class BackLayers {
|
|
123
|
+
constructor(history,
|
|
124
|
+
/** Around the closes of a back of the browser: whether it slid them away itself (BackLayers.browserSlides). */
|
|
125
|
+
closing = close => close(), landed) {
|
|
126
|
+
this.closing = closing;
|
|
127
|
+
/** Bottom first. */
|
|
128
|
+
this.open = [];
|
|
129
|
+
this.listeners = new Set();
|
|
130
|
+
this.scheduled = false;
|
|
131
|
+
this.subscribe = (listener) => {
|
|
132
|
+
this.listeners.add(listener);
|
|
133
|
+
return () => this.listeners.delete(listener);
|
|
134
|
+
};
|
|
135
|
+
this.stack = history && new BackStack(history, at => this.back(at), landed);
|
|
136
|
+
}
|
|
137
|
+
/** The layer on top, if any. */
|
|
138
|
+
get top() {
|
|
139
|
+
return this.open[this.open.length - 1];
|
|
140
|
+
}
|
|
141
|
+
get size() {
|
|
142
|
+
return this.open.length;
|
|
143
|
+
}
|
|
144
|
+
/** `layer` is open: above those it was opened in, and above all else open unless one of them was opened in it. */
|
|
145
|
+
add(layer) {
|
|
146
|
+
if (this.open.includes(layer)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const at = this.open.findIndex(other => BackLayers.within(other, layer));
|
|
150
|
+
this.open.splice(at < 0 ? this.open.length : at, 0, layer);
|
|
151
|
+
this.changed();
|
|
152
|
+
}
|
|
153
|
+
/** `layer` closed (or went): those opened in it close too. */
|
|
154
|
+
remove(layer) {
|
|
155
|
+
const at = this.open.indexOf(layer);
|
|
156
|
+
if (at < 0) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.open.splice(at, 1);
|
|
160
|
+
const inside = this.open.filter(other => BackLayers.within(other, layer));
|
|
161
|
+
for (const other of inside) {
|
|
162
|
+
this.open.splice(this.open.indexOf(other), 1);
|
|
163
|
+
}
|
|
164
|
+
for (const other of inside.reverse()) {
|
|
165
|
+
other.close();
|
|
166
|
+
}
|
|
167
|
+
this.changed();
|
|
168
|
+
}
|
|
169
|
+
/** Opens a layer for what is not a component (a menu placed by ContextMenuUtil.attach); returns its close by itself. */
|
|
170
|
+
hold(close, parent) {
|
|
171
|
+
const layer = { parent, close };
|
|
172
|
+
this.add(layer);
|
|
173
|
+
return () => this.remove(layer);
|
|
174
|
+
}
|
|
175
|
+
/** The history moved (`popstate`). */
|
|
176
|
+
popped() {
|
|
177
|
+
var _a;
|
|
178
|
+
(_a = this.stack) === null || _a === void 0 ? void 0 : _a.popped();
|
|
179
|
+
}
|
|
180
|
+
/** The user went back to where `depth` layers are open: those above close, the top first. */
|
|
181
|
+
back(depth) {
|
|
182
|
+
const gone = this.open.splice(depth).reverse();
|
|
183
|
+
if (gone.length === 0) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
this.closing(() => {
|
|
187
|
+
for (const layer of gone) {
|
|
188
|
+
layer.close();
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
this.notify();
|
|
192
|
+
}
|
|
193
|
+
changed() {
|
|
194
|
+
this.notify();
|
|
195
|
+
// Once for all that changed together (a menu closed as the page it chose opens): no entry pushed and taken back.
|
|
196
|
+
if (!this.scheduled && this.stack) {
|
|
197
|
+
this.scheduled = true;
|
|
198
|
+
queueMicrotask(() => {
|
|
199
|
+
var _a;
|
|
200
|
+
this.scheduled = false;
|
|
201
|
+
(_a = this.stack) === null || _a === void 0 ? void 0 : _a.sync(this.open.length);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
notify() {
|
|
206
|
+
for (const listener of [...this.listeners]) {
|
|
207
|
+
listener();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/** Whether `layer` was opened in `parent`, or in one opened in it. */
|
|
211
|
+
static within(layer, parent) {
|
|
212
|
+
for (let up = layer.parent; up; up = up.parent) {
|
|
213
|
+
if (up === parent) {
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Whether a back of the browser was slid by the browser already: Safari on iOS and iPadOS draws its swipe back
|
|
221
|
+
* itself, so what it closed goes without sliding again. Not in the Ta app (its web view has no such swipe), nor
|
|
222
|
+
* on Android, whose back key slides nothing: there the layer slides away as when its button closes it.
|
|
223
|
+
*/
|
|
224
|
+
static browserSlides() {
|
|
225
|
+
var _a, _b;
|
|
226
|
+
if (typeof navigator === 'undefined') {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
const app = (_b = (_a = globalThis.Capacitor) === null || _a === void 0 ? void 0 : _a.isNativePlatform) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
230
|
+
const ios = /iPhone|iPad|iPod/.test(navigator.userAgent) || (/Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints > 1);
|
|
231
|
+
return ios && !app;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.BackLayers = BackLayers;
|
|
235
|
+
/** The layers of this page. */
|
|
236
|
+
exports.Back = typeof window === 'undefined'
|
|
237
|
+
? new BackLayers()
|
|
238
|
+
: new BackLayers(window.history, close => {
|
|
239
|
+
if (!BackLayers.browserSlides()) {
|
|
240
|
+
close();
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const root = document.documentElement;
|
|
244
|
+
root.dataset.sheetDrag = '';
|
|
245
|
+
close();
|
|
246
|
+
requestAnimationFrame(() => requestAnimationFrame(() => delete root.dataset.sheetDrag));
|
|
247
|
+
}, BackLayers.browserSlides);
|
|
248
|
+
if (typeof window !== 'undefined') {
|
|
249
|
+
window.addEventListener('popstate', () => exports.Back.popped());
|
|
250
|
+
}
|
|
251
|
+
/** The layer the components under it are opened in. */
|
|
252
|
+
exports.BackLayerContext = React.createContext(undefined);
|
|
253
|
+
/** Whether the page keeps its layers in the history: on a touch screen, and in the layout of a phone. */
|
|
254
|
+
function useBackActive() {
|
|
255
|
+
return (0, device_1.useDevice)(device => device.touch || device.handheld);
|
|
256
|
+
}
|
|
84
257
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
258
|
+
* A React hook: while `open`, the back of the system or the browser closes this with `close`, the top layer first
|
|
259
|
+
* (BackLayers). `top`: whether it is the top one, the one whose swipe closes it. Give `layer` to what opens in it
|
|
260
|
+
* with BackLayerContext, so that it is above this and closes with it.
|
|
87
261
|
*/
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
root.dataset.sheetDrag = '';
|
|
96
|
-
back.current(layers);
|
|
97
|
-
requestAnimationFrame(() => requestAnimationFrame(() => delete root.dataset.sheetDrag));
|
|
98
|
-
}));
|
|
262
|
+
function useBackLayer(open, close) {
|
|
263
|
+
const parent = React.useContext(exports.BackLayerContext);
|
|
264
|
+
const latest = React.useRef(close);
|
|
265
|
+
latest.current = close;
|
|
266
|
+
const [layer] = React.useState(() => ({ close: () => latest.current() }));
|
|
267
|
+
layer.parent = parent;
|
|
268
|
+
const shown = useBackActive() && open;
|
|
99
269
|
React.useEffect(() => {
|
|
100
|
-
if (!
|
|
270
|
+
if (!shown) {
|
|
101
271
|
return;
|
|
102
272
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
273
|
+
exports.Back.add(layer);
|
|
274
|
+
return () => exports.Back.remove(layer);
|
|
275
|
+
}, [shown, layer]);
|
|
276
|
+
const top = React.useSyncExternalStore(exports.Back.subscribe, () => exports.Back.top === layer, () => false);
|
|
277
|
+
return { top: shown && top, layer };
|
|
278
|
+
}
|
|
279
|
+
/** 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). */
|
|
280
|
+
function useNoBackLayer() {
|
|
281
|
+
return React.useSyncExternalStore(exports.Back.subscribe, () => exports.Back.size === 0, () => true);
|
|
108
282
|
}
|
|
109
283
|
//# 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;
|
|
@@ -27,7 +27,7 @@ var DeviceMotion;
|
|
|
27
27
|
DeviceMotion.KEYBOARD_MS = 450;
|
|
28
28
|
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)';
|
|
29
29
|
DeviceMotion.KEYBOARD_CURVE_FALLBACK = 'cubic-bezier(0.15, 0.75, 0.2, 1)';
|
|
30
|
-
/** The curve of the sheets of iOS: the screens, the workbench, the drawer and the rows a finger swipes, as they slide on (
|
|
30
|
+
/** 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). */
|
|
31
31
|
DeviceMotion.SHEET_CURVE = 'cubic-bezier(0.32, 0.72, 0, 1)';
|
|
32
32
|
/** How long a sheet takes to slide on by itself (the 360ms of style/phone.ts and sheet-swipe.ts). */
|
|
33
33
|
DeviceMotion.SHEET_MS = 360;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SheetSwipe } from './
|
|
1
|
+
import type { SheetSwipe } from './swipe-util';
|
|
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
|
|
@@ -38,7 +38,9 @@ exports.usePullDown = usePullDown;
|
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const device_1 = require("./device");
|
|
40
40
|
const own_gestures_1 = require("./own-gestures");
|
|
41
|
-
const
|
|
41
|
+
const swipe_finger_1 = require("./swipe-finger");
|
|
42
|
+
const swipe_settle_1 = require("./swipe-settle");
|
|
43
|
+
const swipe_util_1 = require("./swipe-util");
|
|
42
44
|
/**
|
|
43
45
|
* What a finger pulls down from the top of a list, as the launcher of WeChat over its chats (ta-launcher.md):
|
|
44
46
|
* the list follows the finger, the launcher shows behind it, and let go far or fast enough the list goes down
|
|
@@ -139,8 +141,8 @@ function usePullDown(options) {
|
|
|
139
141
|
let start;
|
|
140
142
|
let claimed;
|
|
141
143
|
let moved;
|
|
142
|
-
const velocity = new
|
|
143
|
-
const settle = new
|
|
144
|
+
const velocity = new swipe_util_1.SwipeVelocity('y');
|
|
145
|
+
const settle = new swipe_settle_1.SwipeSettle();
|
|
144
146
|
// The strip that shows while open, with the safe area under it, as the style sizes it.
|
|
145
147
|
const peekOf = () => { var _a; return ((_a = document.querySelector(latest.current.peek)) === null || _a === void 0 ? void 0 : _a.offsetHeight) || PullUtil.PEEK_PX; };
|
|
146
148
|
const reveal = (offset, height, peek) => {
|
|
@@ -213,16 +215,16 @@ function usePullDown(options) {
|
|
|
213
215
|
const { sheet, height, peek, offset } = moved;
|
|
214
216
|
const open = PullUtil.settle(offset, height, current.open, speed, peek);
|
|
215
217
|
const rest = open ? height - peek : 0;
|
|
216
|
-
const motion =
|
|
218
|
+
const motion = swipe_util_1.SwipeUtil.motion(offset, rest, speed, PullUtil.SETTLE_MS, [0, height - peek]);
|
|
217
219
|
settle.run(motion, [
|
|
218
220
|
{ element: sheet, transform: `translate3d(0, ${rest}px, 0)` },
|
|
219
221
|
{ element: moved.reveal, ...reveal(rest, height, peek) },
|
|
220
222
|
], () => latest.current.open === open, () => delete root.dataset.pull);
|
|
221
|
-
(0,
|
|
223
|
+
(0, swipe_settle_1.afterLetGo)(open, () => latest.current);
|
|
222
224
|
}
|
|
223
225
|
reset();
|
|
224
226
|
};
|
|
225
|
-
const finger = new
|
|
227
|
+
const finger = new swipe_finger_1.SwipeFinger({ move: onMove, end: onEnd }, true);
|
|
226
228
|
const onStart = (event) => {
|
|
227
229
|
const current = latest.current;
|
|
228
230
|
// Another finger beside the one that pulls changes nothing.
|
|
@@ -37,7 +37,9 @@ exports.RowSwipeUtil = void 0;
|
|
|
37
37
|
exports.useRowSwipe = useRowSwipe;
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const own_gestures_1 = require("./own-gestures");
|
|
40
|
-
const
|
|
40
|
+
const swipe_finger_1 = require("./swipe-finger");
|
|
41
|
+
const swipe_settle_1 = require("./swipe-settle");
|
|
42
|
+
const swipe_util_1 = require("./swipe-util");
|
|
41
43
|
/**
|
|
42
44
|
* A row of a list a finger swipes to the left to show its actions behind it, as the chats of WeChat: it
|
|
43
45
|
* follows the finger, stays open past half of them or flicked, and closes on a swipe back, a tap on it or
|
|
@@ -79,7 +81,7 @@ var RowSwipeUtil;
|
|
|
79
81
|
RowSwipeUtil.finger = finger;
|
|
80
82
|
/** Whether it stays open, let go at `offset` at `speed` (pixels a millisecond, SwipeVelocity): flicked, the way it was; else where it is headed. */
|
|
81
83
|
function settle(offset, width, speed) {
|
|
82
|
-
if (Math.abs(speed) >
|
|
84
|
+
if (Math.abs(speed) > swipe_util_1.SwipeUtil.FLICK) {
|
|
83
85
|
return speed < 0;
|
|
84
86
|
}
|
|
85
87
|
return offset + speed * RowSwipeUtil.PROJECT_MS < -width / 2;
|
|
@@ -107,12 +109,12 @@ var RowSwipeUtil;
|
|
|
107
109
|
function atSheetEdge(sides, x, width) {
|
|
108
110
|
var _a;
|
|
109
111
|
const list = (_a = sides === null || sides === void 0 ? void 0 : sides.split(' ')) !== null && _a !== void 0 ? _a : [];
|
|
110
|
-
return (list.includes('right') && x >= width -
|
|
112
|
+
return (list.includes('right') && x >= width - swipe_util_1.SwipeUtil.EDGE_PX) || (list.includes('left') && x <= swipe_util_1.SwipeUtil.EDGE_PX);
|
|
111
113
|
}
|
|
112
114
|
RowSwipeUtil.atSheetEdge = atSheetEdge;
|
|
113
115
|
/** Whether the move so far is the row's (more sideways than down, to the left unless open); undefined until it is told. */
|
|
114
116
|
function claims(dx, dy, open) {
|
|
115
|
-
if (Math.hypot(dx, dy) <
|
|
117
|
+
if (Math.hypot(dx, dy) < swipe_util_1.SwipeUtil.SLOP_PX) {
|
|
116
118
|
return undefined;
|
|
117
119
|
}
|
|
118
120
|
return Math.abs(dx) > Math.abs(dy) * 1.2 && (open || dx < 0);
|
|
@@ -160,8 +162,8 @@ function useRowSwipe(ref, enabled) {
|
|
|
160
162
|
let claimed;
|
|
161
163
|
let moved;
|
|
162
164
|
let unclip;
|
|
163
|
-
const velocity = new
|
|
164
|
-
const settle = new
|
|
165
|
+
const velocity = new swipe_util_1.SwipeVelocity();
|
|
166
|
+
const settle = new swipe_settle_1.SwipeSettle();
|
|
165
167
|
const clip = (on, after = 0) => {
|
|
166
168
|
clearTimeout(unclip);
|
|
167
169
|
if (on) {
|
|
@@ -198,7 +200,7 @@ function useRowSwipe(ref, enabled) {
|
|
|
198
200
|
content: element,
|
|
199
201
|
buttons,
|
|
200
202
|
width,
|
|
201
|
-
from: RowSwipeUtil.finger((0,
|
|
203
|
+
from: RowSwipeUtil.finger((0, swipe_settle_1.translated)(element), width),
|
|
202
204
|
x: touch.clientX,
|
|
203
205
|
lag: touch.clientX - start.x,
|
|
204
206
|
};
|
|
@@ -234,7 +236,7 @@ function useRowSwipe(ref, enabled) {
|
|
|
234
236
|
const rest = next ? -width : 0;
|
|
235
237
|
// Stretched past its actions, the row went slower than the finger: it goes back as fast as it went.
|
|
236
238
|
const along = from < -width ? speed * RowSwipeUtil.RUBBER : speed;
|
|
237
|
-
const motion =
|
|
239
|
+
const motion = swipe_util_1.SwipeUtil.motion(from, rest, along, RowSwipeUtil.SETTLE_MS, [-width - RowSwipeUtil.BEYOND_PX, 0]);
|
|
238
240
|
settle.run(motion, [{ element: content, transform: `translate3d(${rest}px, 0, 0)` }, ...actionTargets(buttons, rest, width)], () => state.current === next, () => delete row.dataset.swiping);
|
|
239
241
|
show(next, motion.ms);
|
|
240
242
|
}
|
|
@@ -242,7 +244,7 @@ function useRowSwipe(ref, enabled) {
|
|
|
242
244
|
last = undefined;
|
|
243
245
|
moved = undefined;
|
|
244
246
|
};
|
|
245
|
-
const finger = new
|
|
247
|
+
const finger = new swipe_finger_1.SwipeFinger({ move: onMove, end: onEnd });
|
|
246
248
|
const onStart = (event) => {
|
|
247
249
|
// Another finger beside the one that swipes it changes nothing.
|
|
248
250
|
if (finger.down && !finger.follow(event, row)) {
|
|
@@ -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';
|
|
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. */
|