@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
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Autowired, Optional, PostConstruct } from '@celljs/core';
|
|
11
|
+
import { TaFiles } from '../files/files-protocol.js';
|
|
12
|
+
import { TaLinks } from '../links/links-protocol.js';
|
|
13
|
+
import { TaNotices } from '../notices/notices-protocol.js';
|
|
14
|
+
import { TaSessionNotices } from '../notices/session-notices.js';
|
|
15
|
+
import { TaScreen } from '../screen/screen-protocol.js';
|
|
16
|
+
import { TaSettings } from '../settings/settings-protocol.js';
|
|
17
|
+
import { TaState } from '../state/state-protocol.js';
|
|
18
|
+
import { TaWorkbench } from '../workbench-protocol.js';
|
|
19
|
+
import { WebEditorTabs } from './web-editor-tabs.js';
|
|
20
|
+
import { WebExtensionCode } from './web-extension-code.js';
|
|
21
|
+
import { BuiltinWebExtension, WebExtensionsStateUtil, } from './web-extension-protocol.js';
|
|
22
|
+
import { WebExtensionRunUtil } from './web-extension-run.js';
|
|
23
|
+
import { WebHomeBoard } from './web-home.js';
|
|
24
|
+
import { WebOnDemand } from './web-on-demand.js';
|
|
25
|
+
import { WebPageList } from './web-page-list.js';
|
|
26
|
+
import { WebPagesUtil } from './web-pages.js';
|
|
27
|
+
import { WebTaskBoard } from './web-tasks.js';
|
|
28
|
+
import { WebExtensionUtil, WebViewUtil } from './web-view-util.js';
|
|
29
|
+
/**
|
|
30
|
+
* The web extensions running: the built-ins and those of the computer's packages, loaded, started and
|
|
31
|
+
* stopped, and what they registered published.
|
|
32
|
+
*/
|
|
33
|
+
export class WebExtensionsRunning {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.builtins = [];
|
|
36
|
+
this.tasks = new WebTaskBoard();
|
|
37
|
+
this.home = new WebHomeBoard();
|
|
38
|
+
this.tabs = new WebEditorTabs({
|
|
39
|
+
state: () => this.current,
|
|
40
|
+
update: change => this.update(change),
|
|
41
|
+
persisted: () => this.persisted,
|
|
42
|
+
notices: () => this.notices,
|
|
43
|
+
language: () => this.settings.state.language,
|
|
44
|
+
closed: editor => {
|
|
45
|
+
const run = this.running.get(editor.extension);
|
|
46
|
+
if (editor.onClose && run) {
|
|
47
|
+
this.guard(run, editor.onClose);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
openView: id => this.openView(id, true),
|
|
51
|
+
});
|
|
52
|
+
/** The code read before, by its hash: a start reads only what changed. */
|
|
53
|
+
this.code = new WebExtensionCode(() => (typeof localStorage === 'undefined' ? undefined : localStorage));
|
|
54
|
+
this.current = WebExtensionsStateUtil.empty();
|
|
55
|
+
this.running = new Map();
|
|
56
|
+
this.listeners = new Set();
|
|
57
|
+
this.refreshing = Promise.resolve(false);
|
|
58
|
+
/** The extensions of the list of the last time have started (startKept), once. */
|
|
59
|
+
this.keptStarted = false;
|
|
60
|
+
this.pageList = new WebPageList();
|
|
61
|
+
}
|
|
62
|
+
get state() {
|
|
63
|
+
return this.current;
|
|
64
|
+
}
|
|
65
|
+
init() {
|
|
66
|
+
this.placeholders = WebViewUtil.placeholders(this.persisted.get(WebViewUtil.KEPT));
|
|
67
|
+
this.current = { ...this.current, page: this.persisted.get(WebViewUtil.PAGE), views: this.placeholders, usage: this.onDemand.used };
|
|
68
|
+
}
|
|
69
|
+
/** The extensions started on open (ta-launcher.md). */
|
|
70
|
+
get onDemand() {
|
|
71
|
+
var _a;
|
|
72
|
+
(_a = this.started) !== null && _a !== void 0 ? _a : (this.started = new WebOnDemand({
|
|
73
|
+
settings: this.settings,
|
|
74
|
+
persisted: this.persisted,
|
|
75
|
+
notices: this.notices,
|
|
76
|
+
packages: () => this.workbench.packages,
|
|
77
|
+
isRunning: id => { var _a; return !!((_a = this.running.get(id)) === null || _a === void 0 ? void 0 : _a.started); },
|
|
78
|
+
start: info => this.launch(info),
|
|
79
|
+
stop: id => this.stopOnDemand(id),
|
|
80
|
+
changed: () => this.update({ onOpen: this.onDemand.list(), kept: this.onDemand.kept(), usage: this.onDemand.used }),
|
|
81
|
+
show: id => this.showView(id),
|
|
82
|
+
}));
|
|
83
|
+
return this.started;
|
|
84
|
+
}
|
|
85
|
+
/** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
|
|
86
|
+
listedKinds() {
|
|
87
|
+
return WebPagesUtil.listedKinds([...this.current.onOpen.map(entry => entry.info), ...[...this.running.values()].map(run => run.loaded.info)]);
|
|
88
|
+
}
|
|
89
|
+
/** Loads and starts an extension started on open, as reconcile starts the others. */
|
|
90
|
+
async launch(info) {
|
|
91
|
+
var _a;
|
|
92
|
+
const load = await this.loadPackage(info);
|
|
93
|
+
// Gone or changed meanwhile: the next refresh has it.
|
|
94
|
+
if (((_a = this.onDemand.get(info.id)) === null || _a === void 0 ? void 0 : _a.hash) === info.hash && !this.running.has(info.id)) {
|
|
95
|
+
this.startPackage(info, load);
|
|
96
|
+
this.publish();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
|
|
100
|
+
stopOnDemand(id) {
|
|
101
|
+
const run = this.running.get(id);
|
|
102
|
+
if (!run) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const shown = this.current.views.some(view => view.extension === id && view.id === this.current.page);
|
|
106
|
+
this.stop(run);
|
|
107
|
+
this.running.delete(id);
|
|
108
|
+
this.onDemand.stopped(id);
|
|
109
|
+
if (shown) {
|
|
110
|
+
this.persisted.set(WebViewUtil.PAGE, '');
|
|
111
|
+
this.current = { ...this.current, page: '' };
|
|
112
|
+
}
|
|
113
|
+
this.publish();
|
|
114
|
+
}
|
|
115
|
+
async reconcile() {
|
|
116
|
+
const off = new Set(this.settings.state.settings.builtinsOff);
|
|
117
|
+
const builtins = this.builtins.filter(builtin => !off.has(builtin.name));
|
|
118
|
+
const builtinIds = new Set(builtins.map(builtin => WebExtensionUtil.builtinId(builtin.name)));
|
|
119
|
+
// The built-ins first: they need nothing of the server, and show before it answers.
|
|
120
|
+
let changed = this.stopUnless(run => !!run.loaded.info || builtinIds.has(run.loaded.id));
|
|
121
|
+
for (const builtin of builtins) {
|
|
122
|
+
const id = WebExtensionUtil.builtinId(builtin.name);
|
|
123
|
+
if (!this.running.has(id)) {
|
|
124
|
+
this.start({ id, name: builtin.name }, builtin.activate);
|
|
125
|
+
changed = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (changed) {
|
|
129
|
+
this.publish();
|
|
130
|
+
}
|
|
131
|
+
const host = this.workbench.state.host;
|
|
132
|
+
const listing = this.workbench.packages.listWebExtensions();
|
|
133
|
+
// Answered below; until then those of the last time start.
|
|
134
|
+
listing.catch(() => undefined);
|
|
135
|
+
changed = (await this.startKept(host)) || changed;
|
|
136
|
+
const listed = await listing;
|
|
137
|
+
if (host) {
|
|
138
|
+
this.code.keepList(host, listed);
|
|
139
|
+
}
|
|
140
|
+
// A built-in package turned off stays in the list, for its switch in the settings.
|
|
141
|
+
const infos = listed.filter(info => info.enabled !== false);
|
|
142
|
+
const fresh = new Map(infos.map(info => [info.id, info]));
|
|
143
|
+
this.code.keepOnly(infos.map(info => info.hash));
|
|
144
|
+
// Those started on open wait to be opened (ta-launcher.md).
|
|
145
|
+
this.onDemand.set(infos.filter(info => info.activation === 'open'));
|
|
146
|
+
// Fetched together, started in the order of the list: the order of their views stays the same.
|
|
147
|
+
const starting = infos.filter(info => { var _a; return ((_a = this.running.get(info.id)) === null || _a === void 0 ? void 0 : _a.hash) !== info.hash && info.activation !== 'open'; });
|
|
148
|
+
const loads = await Promise.all(starting.map(info => this.loadPackage(info)));
|
|
149
|
+
// Stopped only now, just before the new code starts: the views of the old one stay drawn until the next
|
|
150
|
+
// publish, and stopped while the new code is read (after an update, over the relay) they would show
|
|
151
|
+
// without the styles it took away.
|
|
152
|
+
const stopped = this.stopUnless(run => {
|
|
153
|
+
if (!run.loaded.info) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const info = fresh.get(run.loaded.id);
|
|
157
|
+
if (info && info.hash === run.hash) {
|
|
158
|
+
// Started from the list of the last time: what else it says is of now.
|
|
159
|
+
run.loaded = { ...run.loaded, info };
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
this.onDemand.stopped(run.loaded.id);
|
|
163
|
+
return false;
|
|
164
|
+
});
|
|
165
|
+
for (const [index, info] of starting.entries()) {
|
|
166
|
+
this.startPackage(info, loads[index]);
|
|
167
|
+
}
|
|
168
|
+
this.placeholders = undefined;
|
|
169
|
+
// The list of those started on open may have changed too.
|
|
170
|
+
this.publish();
|
|
171
|
+
changed = changed || stopped || starting.length > 0;
|
|
172
|
+
await this.tabs.restore();
|
|
173
|
+
return changed;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
177
|
+
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
178
|
+
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
179
|
+
* still the same and stops the others.
|
|
180
|
+
*/
|
|
181
|
+
async startKept(host) {
|
|
182
|
+
if (this.keptStarted || !host) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
this.keptStarted = true;
|
|
186
|
+
const infos = this.code.list(host).filter(info => info.enabled !== false && info.activation !== 'open' && !this.running.has(info.id));
|
|
187
|
+
const loads = await Promise.all(infos.map(info => {
|
|
188
|
+
const code = this.code.get(info.hash);
|
|
189
|
+
return code === undefined ? undefined : WebExtensionUtil.load(code).catch(() => undefined);
|
|
190
|
+
}));
|
|
191
|
+
let started = false;
|
|
192
|
+
for (const [index, info] of infos.entries()) {
|
|
193
|
+
const factory = loads[index];
|
|
194
|
+
if (factory && !this.running.has(info.id)) {
|
|
195
|
+
this.start({ id: info.id, name: info.name, info }, factory, info.hash);
|
|
196
|
+
started = true;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (started) {
|
|
200
|
+
this.publish();
|
|
201
|
+
}
|
|
202
|
+
return started;
|
|
203
|
+
}
|
|
204
|
+
/** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
|
|
205
|
+
stopUnless(keep) {
|
|
206
|
+
let stopped = false;
|
|
207
|
+
for (const [id, run] of this.running) {
|
|
208
|
+
if (!keep(run)) {
|
|
209
|
+
this.stop(run);
|
|
210
|
+
this.running.delete(id);
|
|
211
|
+
stopped = true;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return stopped;
|
|
215
|
+
}
|
|
216
|
+
async loadPackage(info) {
|
|
217
|
+
try {
|
|
218
|
+
const kept = this.code.get(info.hash);
|
|
219
|
+
if (kept !== undefined) {
|
|
220
|
+
return { factory: await WebExtensionUtil.load(kept), hash: info.hash };
|
|
221
|
+
}
|
|
222
|
+
const { code, hash } = await this.workbench.packages.readWebExtension(info.id);
|
|
223
|
+
this.code.set(hash, code);
|
|
224
|
+
return { factory: await WebExtensionUtil.load(code), hash };
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
return { error: WebExtensionUtil.message(error) };
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
startPackage(info, load) {
|
|
231
|
+
const loaded = { id: info.id, name: info.name, info };
|
|
232
|
+
if ('error' in load) {
|
|
233
|
+
this.running.set(info.id, WebExtensionRunUtil.create({ ...loaded, error: load.error }, info.hash));
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
this.start(loaded, load.factory, load.hash);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
start(loaded, factory, hash) {
|
|
240
|
+
const run = WebExtensionRunUtil.create(loaded, hash);
|
|
241
|
+
this.running.set(loaded.id, run);
|
|
242
|
+
try {
|
|
243
|
+
const dispose = factory(this.context.create(run));
|
|
244
|
+
run.dispose = typeof dispose === 'function' ? dispose : undefined;
|
|
245
|
+
run.started = true;
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
this.stop(run);
|
|
249
|
+
run.loaded = { ...loaded, error: WebExtensionUtil.message(error) };
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
stop(run) {
|
|
253
|
+
run.stopped = true;
|
|
254
|
+
if (run.dispose) {
|
|
255
|
+
this.guard(run, run.dispose);
|
|
256
|
+
}
|
|
257
|
+
WebExtensionRunUtil.clear(run);
|
|
258
|
+
this.tabs.remove(editor => editor.extension === run.loaded.id);
|
|
259
|
+
}
|
|
260
|
+
guard(run, action) {
|
|
261
|
+
try {
|
|
262
|
+
action();
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
console.error(`The web extension ${run.loaded.name} failed:`, error);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
publish() {
|
|
269
|
+
const runs = [...this.running.values()];
|
|
270
|
+
this.tasks.setSources(runs.flatMap(run => run.taskSources.map(source => ({ extension: run.loaded.name, source }))));
|
|
271
|
+
this.home.setSources(runs.flatMap(run => run.homeSources.map(source => ({ extension: run.loaded.name, source }))));
|
|
272
|
+
const { views, ...registered } = WebExtensionRunUtil.collect(runs, id => this.onDemand.has(id));
|
|
273
|
+
if (this.placeholders) {
|
|
274
|
+
views.push(...this.placeholders.filter(placeholder => !views.some(view => view.id === placeholder.id)));
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
const kinds = this.listedKinds();
|
|
278
|
+
// Those of a kind a page lists never take a place of the navigation: none to keep for its first frame.
|
|
279
|
+
this.persisted.set(WebViewUtil.KEPT, WebViewUtil.keep(views.filter(view => { var _a; return !WebPagesUtil.listed((_a = this.running.get(view.extension)) === null || _a === void 0 ? void 0 : _a.loaded.info, kinds); })));
|
|
280
|
+
}
|
|
281
|
+
this.update({
|
|
282
|
+
...registered,
|
|
283
|
+
views: views.sort((a, b) => a.order - b.order),
|
|
284
|
+
onOpen: this.onDemand.list(),
|
|
285
|
+
kept: this.onDemand.kept(),
|
|
286
|
+
usage: this.onDemand.used,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
update(change) {
|
|
290
|
+
this.current = { ...this.current, ...change };
|
|
291
|
+
for (const listener of this.listeners) {
|
|
292
|
+
listener(this.current);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
__decorate([
|
|
297
|
+
Autowired(TaWorkbench),
|
|
298
|
+
__metadata("design:type", Object)
|
|
299
|
+
], WebExtensionsRunning.prototype, "workbench", void 0);
|
|
300
|
+
__decorate([
|
|
301
|
+
Autowired(TaSettings),
|
|
302
|
+
__metadata("design:type", Object)
|
|
303
|
+
], WebExtensionsRunning.prototype, "settings", void 0);
|
|
304
|
+
__decorate([
|
|
305
|
+
Autowired(TaFiles),
|
|
306
|
+
__metadata("design:type", Object)
|
|
307
|
+
], WebExtensionsRunning.prototype, "taFiles", void 0);
|
|
308
|
+
__decorate([
|
|
309
|
+
Autowired({ id: TaLinks, detached: true }),
|
|
310
|
+
__metadata("design:type", Object)
|
|
311
|
+
], WebExtensionsRunning.prototype, "links", void 0);
|
|
312
|
+
__decorate([
|
|
313
|
+
Autowired(TaNotices),
|
|
314
|
+
__metadata("design:type", Object)
|
|
315
|
+
], WebExtensionsRunning.prototype, "notices", void 0);
|
|
316
|
+
__decorate([
|
|
317
|
+
Autowired(TaState),
|
|
318
|
+
__metadata("design:type", Object)
|
|
319
|
+
], WebExtensionsRunning.prototype, "persisted", void 0);
|
|
320
|
+
__decorate([
|
|
321
|
+
Autowired(TaSessionNotices),
|
|
322
|
+
__metadata("design:type", Object)
|
|
323
|
+
], WebExtensionsRunning.prototype, "sessionNotices", void 0);
|
|
324
|
+
__decorate([
|
|
325
|
+
Autowired(TaScreen),
|
|
326
|
+
__metadata("design:type", Object)
|
|
327
|
+
], WebExtensionsRunning.prototype, "screen", void 0);
|
|
328
|
+
__decorate([
|
|
329
|
+
Autowired(BuiltinWebExtension),
|
|
330
|
+
Optional(),
|
|
331
|
+
__metadata("design:type", Array)
|
|
332
|
+
], WebExtensionsRunning.prototype, "builtins", void 0);
|
|
333
|
+
__decorate([
|
|
334
|
+
PostConstruct(),
|
|
335
|
+
__metadata("design:type", Function),
|
|
336
|
+
__metadata("design:paramtypes", []),
|
|
337
|
+
__metadata("design:returntype", void 0)
|
|
338
|
+
], WebExtensionsRunning.prototype, "init", null);
|
|
339
|
+
//# sourceMappingURL=web-extensions-running.js.map
|
|
@@ -1,56 +1,12 @@
|
|
|
1
|
-
import type { TaEvent, TaTemporaryFrom
|
|
1
|
+
import type { TaEvent, TaTemporaryFrom } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { TaLinks } from '../links/links-protocol.js';
|
|
5
|
-
import { TaNotices } from '../notices/notices-protocol.js';
|
|
6
|
-
import { TaSessionNotices } from '../notices/session-notices.js';
|
|
7
|
-
import { TaSettings } from '../settings/settings-protocol.js';
|
|
8
|
-
import { TaState } from '../state/state-protocol.js';
|
|
9
|
-
import { TaWorkbench } from '../workbench-protocol.js';
|
|
10
|
-
import { WebEditorTabs } from './web-editor-tabs.js';
|
|
11
|
-
import type { WebExtensionFactory, WebShareTarget } from './web-extension-api.js';
|
|
12
|
-
import { WebExtensionCode } from './web-extension-code.js';
|
|
3
|
+
import type { WebShareTarget } from './web-extension-api.js';
|
|
13
4
|
import { WebExtensionContext, type WebExtensionContextHost } from './web-extension-context.js';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { WebHomeBoard } from './web-home.js';
|
|
17
|
-
import { WebOnDemand } from './web-on-demand.js';
|
|
18
|
-
import { WebPageList } from './web-page-list.js';
|
|
5
|
+
import { TaWebExtensions, type WebEditorEntry, type WebExtensionConversation, type WebExtensionsState, type WebSessionSwitcher } from './web-extension-protocol.js';
|
|
6
|
+
import { WebExtensionsRunning } from './web-extensions-running.js';
|
|
19
7
|
import type { WebPageInfo } from './web-pages.js';
|
|
20
8
|
import { WebSharing } from './web-sharing.js';
|
|
21
|
-
|
|
22
|
-
export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
23
|
-
protected readonly workbench: TaWorkbench;
|
|
24
|
-
protected readonly settings: TaSettings;
|
|
25
|
-
protected readonly taFiles: TaFiles;
|
|
26
|
-
/** Detached: TaLinks asks the openers of the extensions. */
|
|
27
|
-
protected readonly links: TaLinks;
|
|
28
|
-
protected readonly notices: TaNotices;
|
|
29
|
-
protected readonly persisted: TaState;
|
|
30
|
-
protected readonly sessionNotices: TaSessionNotices;
|
|
31
|
-
readonly builtins: BuiltinWebExtension[];
|
|
32
|
-
readonly tasks: WebTaskBoard;
|
|
33
|
-
readonly home: WebHomeBoard;
|
|
34
|
-
protected readonly tabs: WebEditorTabs;
|
|
35
|
-
/** The code read before, by its hash: a start reads only what changed. */
|
|
36
|
-
protected readonly code: WebExtensionCode;
|
|
37
|
-
protected current: WebExtensionsState;
|
|
38
|
-
protected readonly running: Map<string, WebExtensionRun>;
|
|
39
|
-
protected readonly listeners: Set<(state: WebExtensionsState) => void>;
|
|
40
|
-
protected conversation?: WebExtensionConversation;
|
|
41
|
-
protected switcher?: WebSessionSwitcher;
|
|
42
|
-
protected settingsOpener?: (section?: string) => void;
|
|
43
|
-
protected refreshing: Promise<boolean>;
|
|
44
|
-
/** The extensions of the list of the last time have started (startKept), once. */
|
|
45
|
-
protected keptStarted: boolean;
|
|
46
|
-
/** The views of the navigation kept from before (WebViewUtil.KEPT), in their places until the extensions have loaded once. */
|
|
47
|
-
protected placeholders?: WebViewEntry[];
|
|
48
|
-
protected started?: WebOnDemand;
|
|
49
|
-
protected readonly pageList: WebPageList;
|
|
50
|
-
get state(): WebExtensionsState;
|
|
51
|
-
protected init(): void;
|
|
52
|
-
/** The extensions started on open (ta-launcher.md). */
|
|
53
|
-
protected get onDemand(): WebOnDemand;
|
|
9
|
+
export declare class TaWebExtensionsImpl extends WebExtensionsRunning implements TaWebExtensions {
|
|
54
10
|
subscribe(listener: (state: WebExtensionsState) => void): () => void;
|
|
55
11
|
/** One at a time: a refresh while one runs follows it. */
|
|
56
12
|
refresh(): Promise<boolean>;
|
|
@@ -62,13 +18,12 @@ export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
|
62
18
|
showEditor(id: string): void;
|
|
63
19
|
openView(id: string, preserveFocus?: boolean): void;
|
|
64
20
|
showPage(id: string): void;
|
|
21
|
+
showChats(busy: boolean): void;
|
|
65
22
|
hidePage(): void;
|
|
66
23
|
showView(id: string): Promise<boolean>;
|
|
67
24
|
/** Whether `ui.showView` has something for an id: an extension started on open, or a view. */
|
|
68
25
|
protected knows(id: string): boolean;
|
|
69
26
|
pages(): readonly WebPageInfo[];
|
|
70
|
-
/** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
|
|
71
|
-
protected listedKinds(): Set<string>;
|
|
72
27
|
stopExtension(name: string): void;
|
|
73
28
|
forgetPage(id: string): void;
|
|
74
29
|
openTemporary(source: string, from: TaTemporaryFrom): Promise<string>;
|
|
@@ -82,10 +37,6 @@ export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
|
82
37
|
protected readonly sharing: WebSharing;
|
|
83
38
|
/** The pages change with the extensions and with the navigation of the settings. */
|
|
84
39
|
protected readonly subscribePages: (listener: () => void) => () => void;
|
|
85
|
-
/** Loads and starts an extension started on open, as reconcile starts the others. */
|
|
86
|
-
protected launch(info: TaWebExtensionInfo): Promise<void>;
|
|
87
|
-
/** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
|
|
88
|
-
protected stopOnDemand(id: string): void;
|
|
89
40
|
protected isShown(id: string): boolean;
|
|
90
41
|
closeEditor(id: string): Promise<void>;
|
|
91
42
|
closeEditors(ids: readonly string[]): Promise<void>;
|
|
@@ -97,36 +48,9 @@ export declare class TaWebExtensionsImpl implements TaWebExtensions {
|
|
|
97
48
|
openSettings(section?: string): void;
|
|
98
49
|
sessionSwitcher(): WebSessionSwitcher | undefined;
|
|
99
50
|
emit(event: TaEvent): void;
|
|
100
|
-
protected reconcile(): Promise<boolean>;
|
|
101
|
-
/**
|
|
102
|
-
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
103
|
-
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
104
|
-
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
105
|
-
* still the same and stops the others.
|
|
106
|
-
*/
|
|
107
|
-
protected startKept(host: string | undefined): Promise<boolean>;
|
|
108
|
-
/** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
|
|
109
|
-
protected stopUnless(keep: (run: WebExtensionRun) => boolean): boolean;
|
|
110
|
-
protected loadPackage(info: TaWebExtensionInfo): Promise<{
|
|
111
|
-
factory: WebExtensionFactory;
|
|
112
|
-
hash: string;
|
|
113
|
-
} | {
|
|
114
|
-
error: string;
|
|
115
|
-
}>;
|
|
116
|
-
protected startPackage(info: TaWebExtensionInfo, load: {
|
|
117
|
-
factory: WebExtensionFactory;
|
|
118
|
-
hash: string;
|
|
119
|
-
} | {
|
|
120
|
-
error: string;
|
|
121
|
-
}): void;
|
|
122
|
-
protected start(loaded: LoadedWebExtension, factory: WebExtensionFactory, hash?: string): void;
|
|
123
|
-
protected stop(run: WebExtensionRun): void;
|
|
124
51
|
open(editor: WebEditorEntry, preserveFocus?: boolean): void;
|
|
125
52
|
protected wired?: WebExtensionContext;
|
|
126
53
|
/** What the API of each extension asks of the page; made when the first starts, once the fields are injected. */
|
|
127
54
|
protected get context(): WebExtensionContext;
|
|
128
55
|
protected contextHost(): WebExtensionContextHost;
|
|
129
|
-
protected guard(run: WebExtensionRun, action: () => void): void;
|
|
130
|
-
protected publish(): void;
|
|
131
|
-
protected update(change: Partial<WebExtensionsState>): void;
|
|
132
56
|
}
|