@celljs/ta-web 4.15.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -5,9 +5,10 @@ import type { DeviceState } from '../device/device-protocol';
|
|
|
5
5
|
import type { TaFiles } from '../files/files-protocol';
|
|
6
6
|
import type { GameProps } from '../game/game-protocol';
|
|
7
7
|
import type { Game3DProps } from '../game/game3d-protocol';
|
|
8
|
+
import type { ScreenPartSpec, TaScreen } from '../screen/screen-protocol';
|
|
8
9
|
import type { Language, Theme } from '../settings/settings-protocol';
|
|
9
|
-
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebSkeletonProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebVoice } from './web-api-components';
|
|
10
|
-
import type { WebAsk, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebHomeEntry, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebSearchSource, WebSessionMenu, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions';
|
|
10
|
+
import type { CodeEditorProps, DiffEditorProps, WebComposerProps, WebConversationViewProps, WebDialogProps, WebEmptyProps, WebFaceProps, WebFolderPickerProps, WebFullScreenProps, WebGroupFaceProps, WebHoldToTalkProps, WebImageViewerProps, WebModelPickerProps, WebPictureCardsProps, WebPictureProps, WebSelectBarProps, WebSelectCheckProps, WebSkeletonProps, WebStackProps, WebSwipeRowProps, WebSwitchProps, WebVoice } from './web-api-components';
|
|
11
|
+
import type { WebAsk, WebCallPartner, WebChatIconSource, WebCodeRendererOptions, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebHomeEntry, WebHomeSource, WebInitiative, WebMenuItem, WebOpener, WebOpenerOptions, WebRoomAddon, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionNotice, WebSettingsSection, WebShareTarget, WebTaskEntry, WebTaskRemoval, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WebViewInfo, WidgetOptions } from './web-api-contributions';
|
|
11
12
|
import type { WebDesktop, WebFileDrag } from './web-api-desktop';
|
|
12
13
|
import type { WebTerminal, WebTerminalOptions } from './web-api-terminal';
|
|
13
14
|
import type { WebPageInfo } from './web-pages';
|
|
@@ -73,8 +74,14 @@ export interface WebExtensionAPI {
|
|
|
73
74
|
* Draws the fenced blocks of a language (` ```name `) in replies and in `ui.Markdown` itself, as Mermaid is drawn:
|
|
74
75
|
* what a model writes to be seen rather than read, a card of its own. It gets the code as it streams (`closed`
|
|
75
76
|
* false until the fence ends); what throws shows as code. Newer than some Ta apps: `pi.registerCodeRenderer?.(…)`.
|
|
77
|
+
* `options.spoken`: what of a block is said aloud; older apps leave it out.
|
|
76
78
|
*/
|
|
77
|
-
registerCodeRenderer(language: string, renderer: React.ComponentType<WebCodeRendererProps
|
|
79
|
+
registerCodeRenderer(language: string, renderer: React.ComponentType<WebCodeRendererProps>, options?: WebCodeRendererOptions): void;
|
|
80
|
+
/**
|
|
81
|
+
* Answers in calls in place of the conversation called (the first registered): the conversation keeps the work,
|
|
82
|
+
* the partner the talk. Newer than some Ta apps: `pi.registerCallPartner?.(…)`.
|
|
83
|
+
*/
|
|
84
|
+
registerCallPartner(partner: WebCallPartner): void;
|
|
78
85
|
/**
|
|
79
86
|
* Who answers in the sessions of its group (TaOpenSessionOptions.group, the name of the extension's
|
|
80
87
|
* package), drawn at the head of each turn in place of ta.
|
|
@@ -113,6 +120,11 @@ export interface WebExtensionAPI {
|
|
|
113
120
|
* entries of its + menu and something above it, each given the conversation it is drawn for.
|
|
114
121
|
*/
|
|
115
122
|
registerComposerAddon(addon: WebComposerAddon): void;
|
|
123
|
+
/**
|
|
124
|
+
* An app of the rooms (a tile among the apps of a room, its page pushed in the room's panel, a line above its chat),
|
|
125
|
+
* which the Rooms page lists with `ui.useRoomAddons`: one place for every app, however many there are. Newer than some Ta apps: `pi.registerRoomAddon?.(…)`.
|
|
126
|
+
*/
|
|
127
|
+
registerRoomAddon(addon: WebRoomAddon): void;
|
|
116
128
|
/**
|
|
117
129
|
* A section of the settings, after those of Ta: what the user sets once for the extension (a model it
|
|
118
130
|
* uses, a choice it makes), kept with `storage`. Its rows look like Ta's, each with a control the
|
|
@@ -231,11 +243,33 @@ export type WebIcon = React.ComponentType<{
|
|
|
231
243
|
size?: number | string;
|
|
232
244
|
strokeWidth?: number | string;
|
|
233
245
|
}>;
|
|
246
|
+
/** What a notice of an extension has besides its message (WebExtensionUI.notify). */
|
|
247
|
+
export interface WebNotifyOptions {
|
|
248
|
+
action?: {
|
|
249
|
+
label: string;
|
|
250
|
+
run(): void;
|
|
251
|
+
};
|
|
252
|
+
key?: string;
|
|
253
|
+
/** Ta did it for the user: drawn with the double's face, the message as its head (`修改了设置`). */
|
|
254
|
+
ta?: boolean;
|
|
255
|
+
/** What it changed, a row each under the message: `{ label: '通话字幕', before: '关', after: '开' }`, or a name alone. */
|
|
256
|
+
changes?: {
|
|
257
|
+
label?: string;
|
|
258
|
+
before?: string;
|
|
259
|
+
after: string;
|
|
260
|
+
}[];
|
|
261
|
+
}
|
|
262
|
+
export type { ScreenAction, ScreenItem, ScreenPartSpec, ScreenPartView, ScreenPlace } from '../screen/screen-protocol';
|
|
263
|
+
/** What web extensions see of TaScreen. */
|
|
264
|
+
export type WebScreen = Pick<TaScreen, 'agent' | 'parts' | 'act' | 'element' | 'where' | 'places' | 'go'>;
|
|
234
265
|
export interface WebExtensionUI {
|
|
235
266
|
/** A widget around the message box, as pi's, or a card in the workbench on the right; `undefined` removes it. */
|
|
236
267
|
setWidget(key: string, widget: React.ComponentType | undefined, options?: WidgetOptions): void;
|
|
237
|
-
/**
|
|
238
|
-
|
|
268
|
+
/**
|
|
269
|
+
* A notice in the corner of the page, as pi's: it goes by itself, an error later than the rest. `action`: a button
|
|
270
|
+
* on it (Undo); `key`: notices of one key replace each other. Ta apps of before take the message and type alone.
|
|
271
|
+
*/
|
|
272
|
+
notify(message: string, type?: 'info' | 'warning' | 'error', options?: WebNotifyOptions): void;
|
|
239
273
|
/**
|
|
240
274
|
* Tells the user what a conversation said, as a messenger tells of a message: nothing while they look at it
|
|
241
275
|
* (and nothing of a task the double follows, which tells of it, unless it asks); a banner with its face and
|
|
@@ -245,6 +279,8 @@ export interface WebExtensionUI {
|
|
|
245
279
|
notifySession(notice: WebSessionNotice): void;
|
|
246
280
|
/** A React hook: the rows extensions add to the double's home (registerHomeItems), in the order they loaded. */
|
|
247
281
|
useHomeItems(): readonly WebHomeEntry[];
|
|
282
|
+
/** A React hook: what extensions add to the rooms (registerRoomAddon), in the order they loaded. Newer than some Ta apps. */
|
|
283
|
+
useRoomAddons(): readonly WebRoomAddonEntry[];
|
|
248
284
|
/**
|
|
249
285
|
* Pins a conversation to the top of the lists (or unpins it), by its session file, as the user does with Pin: for
|
|
250
286
|
* one the extension made that the user looks at each day. Pin it once; the user may unpin it. Newer than some Ta
|
|
@@ -292,6 +328,14 @@ export interface WebExtensionUI {
|
|
|
292
328
|
* element's `loadURL`); the app refuses the rest.
|
|
293
329
|
*/
|
|
294
330
|
readonly debugWebview?: (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
331
|
+
/** Into the box of the conversation in front: `quote` before what it holds, `images` (base64) as if pasted; false when none shows. */
|
|
332
|
+
addToComposer(draft: {
|
|
333
|
+
quote?: string;
|
|
334
|
+
images?: {
|
|
335
|
+
data: string;
|
|
336
|
+
mimeType: string;
|
|
337
|
+
}[];
|
|
338
|
+
}): boolean;
|
|
295
339
|
/**
|
|
296
340
|
* A tab in the editor area beside the conversation (a file, a diff, a browser); an open id is shown
|
|
297
341
|
* again. With `preserveFocus`, it opens behind the tab shown, and the workbench is not revealed: for
|
|
@@ -350,6 +394,14 @@ export interface WebExtensionUI {
|
|
|
350
394
|
* The name of an extension alone opens its first page. Resolves whether there was such a view.
|
|
351
395
|
*/
|
|
352
396
|
showView(id: string): Promise<boolean>;
|
|
397
|
+
/**
|
|
398
|
+
* Shows the list of chats (on a phone its tab); with `busy`, only the conversations of the user's own going on
|
|
399
|
+
* (those that wait for them, answer now, or said something unseen), until the user clears it. Newer than some
|
|
400
|
+
* Ta apps: `pi.ui.showChats?.()`.
|
|
401
|
+
*/
|
|
402
|
+
showChats(options?: {
|
|
403
|
+
busy?: boolean;
|
|
404
|
+
}): void;
|
|
353
405
|
/**
|
|
354
406
|
* A React hook: every page there is (those of the navigation, of Discover, and of the extensions started on
|
|
355
407
|
* open, one for each of these), with what it is doing and when it was shown last; the same array until one
|
|
@@ -401,6 +453,24 @@ export interface WebExtensionUI {
|
|
|
401
453
|
custom(component: React.ComponentType<{
|
|
402
454
|
close(): void;
|
|
403
455
|
}>): () => void;
|
|
456
|
+
/**
|
|
457
|
+
* Answers what the server side of this package asks a page (`host.pages.ask(kind, payload)`, docs/design/ta-app-use.md
|
|
458
|
+
* 4.1): ta serve asks the page of the person whose run asks, the one in front of them. What `handler` returns, or
|
|
459
|
+
* resolves to, is the answer; what it throws, the error. Stops with the function returned, or when the extension
|
|
460
|
+
* stops. Newer than some Ta apps: `pi.ui.answer?.(…)`.
|
|
461
|
+
*/
|
|
462
|
+
answer(kind: string, handler: (payload: unknown) => unknown): () => void;
|
|
463
|
+
/**
|
|
464
|
+
* Ta's pages as an agent reads and works them (docs/design/ta-app-use.md 3): where the shell is, the parts of the
|
|
465
|
+
* screen that say what they are, and their actions. Newer than some Ta apps.
|
|
466
|
+
*/
|
|
467
|
+
readonly screen: WebScreen;
|
|
468
|
+
/**
|
|
469
|
+
* A React hook: a part of the screen of this extension says what it is while it is mounted, for an agent to read and
|
|
470
|
+
* work as the user does (ScreenPartSpec); mark its elements with `data-ta-part`, `data-ta-item` and `data-ta-action`.
|
|
471
|
+
* Newer than some Ta apps.
|
|
472
|
+
*/
|
|
473
|
+
useScreenPart(spec: ScreenPartSpec): void;
|
|
404
474
|
/**
|
|
405
475
|
* Opens what a link of an extension carries (`ta://open?source=…`, `#open=`, a link of the relay, `npm:<name>`)
|
|
406
476
|
* without installing it, once the user said so: it runs in the page with the whole of this API. Resolves whether
|
|
@@ -492,6 +562,11 @@ export interface WebExtensionUI {
|
|
|
492
562
|
readonly Markdown: React.ComponentType<{
|
|
493
563
|
text: string;
|
|
494
564
|
}>;
|
|
565
|
+
/**
|
|
566
|
+
* A conversation to read, drawn as those of the page are, with what extensions draw in them (cards, plots,
|
|
567
|
+
* 3D); nothing in it acts. Newer than some Ta apps: `pi.ui.Conversation ?? …`.
|
|
568
|
+
*/
|
|
569
|
+
readonly Conversation?: React.ComponentType<WebConversationViewProps>;
|
|
495
570
|
/**
|
|
496
571
|
* A React hook: a chat that scrolls as the conversations of the page do, the element of the returned ref
|
|
497
572
|
* being what scrolls and its first child (positioned) holding a row for each message. At the bottom it
|
|
@@ -514,6 +589,14 @@ export interface WebExtensionUI {
|
|
|
514
589
|
* Ta apps: `(pi.ui.useBusy ?? fallback)()`.
|
|
515
590
|
*/
|
|
516
591
|
useBusy(): [boolean, <T>(action: () => T | PromiseLike<T>) => Promise<T | undefined>];
|
|
592
|
+
/**
|
|
593
|
+
* A React hook for what the extension opens over the page (a menu, a dialog, a page it pushes, a panel): while
|
|
594
|
+
* `open`, the back of the system or the browser (Android's back, Safari's swipe back) calls `close`, the one
|
|
595
|
+
* opened last first, never what it is over. Returns whether it is the top one, the one whose own swipe may
|
|
596
|
+
* close it. `ui.Dialog`, `ui.Stack` and `ui.attachMenu` do it already. Newer than some Ta apps:
|
|
597
|
+
* `(pi.ui.useBackLayer ?? fallback)(open, close)`.
|
|
598
|
+
*/
|
|
599
|
+
useBackLayer(open: boolean, close: () => void): boolean;
|
|
517
600
|
/**
|
|
518
601
|
* The switch of the page's settings: an `onChange` that returns a promise shows the new state at once, its
|
|
519
602
|
* knob turning until done, and the old one again if it fails. Newer than some Ta apps: `pi.ui.Switch ?? fallback`.
|
|
@@ -6,6 +6,7 @@ import type { Game3DProps } from '../game/game3d-protocol';
|
|
|
6
6
|
import type { TaLinks } from '../links/links-protocol';
|
|
7
7
|
import type { TaNotices } from '../notices/notices-protocol';
|
|
8
8
|
import type { TaSessionNotices } from '../notices/session-notices';
|
|
9
|
+
import type { TaScreen } from '../screen/screen-protocol';
|
|
9
10
|
import type { TaSettings } from '../settings/settings-protocol';
|
|
10
11
|
import type { TaState } from '../state/state-protocol';
|
|
11
12
|
import type { TaWorkbench } from '../workbench-protocol';
|
|
@@ -28,6 +29,8 @@ export interface WebExtensionContextHost {
|
|
|
28
29
|
readonly sessionNotices: TaSessionNotices;
|
|
29
30
|
/** The state the page keeps (TaState): the pins of the lists. */
|
|
30
31
|
readonly persisted: TaState;
|
|
32
|
+
/** The parts of the screen and where the shell is (docs/design/ta-app-use.md 3). */
|
|
33
|
+
readonly screen: TaScreen;
|
|
31
34
|
/** What the extensions registered changed: the page shows it. */
|
|
32
35
|
publish(): void;
|
|
33
36
|
/** Runs what the extension gave, its failure logged rather than thrown. */
|
|
@@ -68,6 +71,8 @@ export declare class WebExtensionContext {
|
|
|
68
71
|
protected readonly listDirectory: (directory: string) => Promise<import("@celljs/ta-protocol").TaDirEntry[]>;
|
|
69
72
|
/** The message box, whose button of the directory lists those of the server. */
|
|
70
73
|
protected readonly composer: (props: WebComposerProps) => React.FunctionComponentElement<import("../components/web-composer").WebComposerHostProps>;
|
|
74
|
+
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
75
|
+
protected composerOf(run: WebExtensionRun): React.ComponentType<WebComposerProps>;
|
|
71
76
|
protected readonly holdToTalk: (props: WebHoldToTalkProps) => React.FunctionComponentElement<import("../components/hold-to-talk").HoldToTalkProps & {
|
|
72
77
|
notices: TaNotices;
|
|
73
78
|
}>;
|
|
@@ -36,12 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.WebExtensionContext = void 0;
|
|
37
37
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
|
+
const read_aloud_1 = require("../assistant/read-aloud");
|
|
39
40
|
const busy_1 = require("../components/busy");
|
|
40
41
|
const chat_asks_1 = require("../components/chat-asks");
|
|
41
|
-
const
|
|
42
|
+
const chat_list_util_1 = require("../components/chat-list-util");
|
|
42
43
|
const code_editor_1 = require("../components/code-editor");
|
|
44
|
+
const composer_target_1 = require("../components/composer-target");
|
|
43
45
|
const context_menu_1 = require("../components/context-menu");
|
|
44
46
|
const conversation_scroll_hooks_1 = require("../components/conversation-scroll-hooks");
|
|
47
|
+
const conversation_view_1 = require("../components/conversation-view");
|
|
45
48
|
const diff_editor_1 = require("../components/diff-editor");
|
|
46
49
|
const empty_state_1 = require("../components/empty-state");
|
|
47
50
|
const face_1 = require("../components/face");
|
|
@@ -62,9 +65,11 @@ const swipe_row_1 = require("../components/swipe-row");
|
|
|
62
65
|
const ta_avatar_1 = require("../components/ta-avatar");
|
|
63
66
|
const web_composer_1 = require("../components/web-composer");
|
|
64
67
|
const web_dialog_1 = require("../components/web-dialog");
|
|
68
|
+
const back_stack_1 = require("../device/back-stack");
|
|
65
69
|
const code_scan_1 = require("../device/code-scan");
|
|
66
70
|
const device_1 = require("../device/device");
|
|
67
71
|
const scanner_1 = require("../device/scanner");
|
|
72
|
+
const drafts_protocol_1 = require("../drafts/drafts-protocol");
|
|
68
73
|
const game_view_1 = require("../game/game-view");
|
|
69
74
|
const messages_1 = require("../i18n/messages");
|
|
70
75
|
const use_t_1 = require("../i18n/use-t");
|
|
@@ -104,8 +109,8 @@ class WebExtensionContext {
|
|
|
104
109
|
this.voice = {
|
|
105
110
|
canListen: () => voice_1.Voice.canListen(),
|
|
106
111
|
canSpeak: () => voice_1.Voice.canSpeak(),
|
|
107
|
-
speak: (text, onEnd) =>
|
|
108
|
-
hush: () =>
|
|
112
|
+
speak: (text, onEnd) => read_aloud_1.ReadAloud.of(this.host.workbench).speak(text, this.host.settings.state.language, onEnd !== null && onEnd !== void 0 ? onEnd : (() => undefined), this.host.settings.state.settings.voice),
|
|
113
|
+
hush: () => read_aloud_1.ReadAloud.of(this.host.workbench).hush(),
|
|
109
114
|
};
|
|
110
115
|
this.modelPicker = (props) => React.createElement(model_picker_1.SettingsModelPicker, { ...props, settings: this.host.workbench.settings });
|
|
111
116
|
this.folderPicker = ({ initial, onPick, onClose }) => { var _a; return React.createElement(folder_picker_1.FolderPicker, {
|
|
@@ -148,6 +153,11 @@ class WebExtensionContext {
|
|
|
148
153
|
}
|
|
149
154
|
return parts.join('/');
|
|
150
155
|
}
|
|
156
|
+
/** The message box of an extension: its drafts under its name, apart from those of the others. */
|
|
157
|
+
composerOf(run) {
|
|
158
|
+
const name = run.loaded.name;
|
|
159
|
+
return props => this.composer({ ...props, draft: props.draft === undefined ? undefined : drafts_protocol_1.DraftPlaces.extension(name, props.draft) });
|
|
160
|
+
}
|
|
151
161
|
create(run) {
|
|
152
162
|
const { host } = this;
|
|
153
163
|
const { workbench, files } = host;
|
|
@@ -207,7 +217,14 @@ class WebExtensionContext {
|
|
|
207
217
|
storage: { ...this.storage(run), directory: cwd => this.storage(run, cwd) },
|
|
208
218
|
registerView: (name, view) => register(() => run.views.set(name, view)),
|
|
209
219
|
registerMessageRenderer: (customType, renderer) => register(() => run.renderers.set(customType, renderer)),
|
|
210
|
-
registerCodeRenderer: (language, renderer) => register(() =>
|
|
220
|
+
registerCodeRenderer: (language, renderer, options) => register(() => {
|
|
221
|
+
const key = language.trim().toLowerCase();
|
|
222
|
+
run.codeRenderers.set(key, WebExtensionContext.replying(renderer, mark));
|
|
223
|
+
if (options === null || options === void 0 ? void 0 : options.spoken) {
|
|
224
|
+
run.codeSpeech.set(key, options.spoken);
|
|
225
|
+
}
|
|
226
|
+
}),
|
|
227
|
+
registerCallPartner: partner => register(() => run.callPartners.push(partner)),
|
|
211
228
|
registerAvatar: avatar => register(() => {
|
|
212
229
|
run.avatar = avatar;
|
|
213
230
|
}),
|
|
@@ -219,6 +236,7 @@ class WebExtensionContext {
|
|
|
219
236
|
registerInitiative: initiative => register(() => run.initiatives.push(initiative)),
|
|
220
237
|
registerSearch: source => register(() => run.searches.push(source)),
|
|
221
238
|
registerComposerAddon: addon => register(() => run.composerAddons.push(addon)),
|
|
239
|
+
registerRoomAddon: addon => register(() => run.roomAddons.push(addon)),
|
|
222
240
|
registerSettings: section => register(() => run.settingsSections.push(section)),
|
|
223
241
|
registerSessionMenu: menu => register(() => run.sessionMenus.push(session => {
|
|
224
242
|
try {
|
|
@@ -270,9 +288,16 @@ class WebExtensionContext {
|
|
|
270
288
|
const subscribe = (listener) => host.extensions.subscribe(listener);
|
|
271
289
|
return {
|
|
272
290
|
setWidget: (key, component, options = {}) => register(() => (component ? run.widgets.set(key, { component, options }) : run.widgets.delete(key))),
|
|
273
|
-
notify: (message, type = 'info') => {
|
|
291
|
+
notify: (message, type = 'info', options = {}) => {
|
|
274
292
|
if (!run.stopped) {
|
|
275
|
-
|
|
293
|
+
const { action, key, ta, changes } = options;
|
|
294
|
+
notices.notify(message, {
|
|
295
|
+
level: type,
|
|
296
|
+
...(action ? { action: { label: action.label, run: () => action.run() } } : {}),
|
|
297
|
+
...(key ? { key } : {}),
|
|
298
|
+
...(ta ? { ta: true } : {}),
|
|
299
|
+
...(Array.isArray(changes) && changes.length ? { changes: changes.slice(0, 6) } : {}),
|
|
300
|
+
});
|
|
276
301
|
}
|
|
277
302
|
},
|
|
278
303
|
notifySession: notice => {
|
|
@@ -284,8 +309,8 @@ class WebExtensionContext {
|
|
|
284
309
|
if (run.stopped || typeof sessionFile !== 'string' || !sessionFile) {
|
|
285
310
|
return;
|
|
286
311
|
}
|
|
287
|
-
const list = host.persisted.get(
|
|
288
|
-
host.persisted.set(
|
|
312
|
+
const list = host.persisted.get(chat_list_util_1.PINNED).filter(file => file !== sessionFile);
|
|
313
|
+
host.persisted.set(chat_list_util_1.PINNED, pinned ? [sessionFile, ...list] : list);
|
|
289
314
|
},
|
|
290
315
|
confirm: (title, message, options) => (run.stopped ? Promise.resolve(false) : notices.confirm({ title, message, ...options })),
|
|
291
316
|
input: (title, placeholder, options) => (run.stopped ? Promise.resolve(undefined) : notices.input({ title, placeholder, value: options === null || options === void 0 ? void 0 : options.value })),
|
|
@@ -300,6 +325,7 @@ class WebExtensionContext {
|
|
|
300
325
|
desktop: desktop_1.DesktopUtil.fileManager(),
|
|
301
326
|
fileDrag: FILE_DRAG,
|
|
302
327
|
debugWebview: desktop_1.DesktopUtil.debugWebview(),
|
|
328
|
+
addToComposer: draft => !run.stopped && composer_target_1.ComposerTarget.add(draft),
|
|
303
329
|
// An extension opens, closes and marks only tabs of its own.
|
|
304
330
|
openEditor: (editor, options) => !run.stopped && host.tabs.open({ ...editor, extension: run.loaded.id, preview: (options === null || options === void 0 ? void 0 : options.preview) === true }, (options === null || options === void 0 ? void 0 : options.preserveFocus) === true),
|
|
305
331
|
closeEditor: id => host.tabs.remove(editor => editor.id === id && editor.extension === run.loaded.id),
|
|
@@ -336,6 +362,11 @@ class WebExtensionContext {
|
|
|
336
362
|
},
|
|
337
363
|
useDevice: device_1.useDevice,
|
|
338
364
|
showView: id => (run.stopped ? Promise.resolve(false) : host.extensions.showView(id)),
|
|
365
|
+
showChats: options => {
|
|
366
|
+
if (!run.stopped) {
|
|
367
|
+
host.extensions.showChats(!!(options === null || options === void 0 ? void 0 : options.busy));
|
|
368
|
+
}
|
|
369
|
+
},
|
|
339
370
|
usePages: () => {
|
|
340
371
|
// Read again when the device or the navigation changes where a page is.
|
|
341
372
|
(0, device_1.useDevice)(device => device.handheld);
|
|
@@ -356,6 +387,21 @@ class WebExtensionContext {
|
|
|
356
387
|
stopExtension: name => !run.stopped && host.extensions.stopExtension(name),
|
|
357
388
|
shareExtension: target => !run.stopped && host.extensions.share(target),
|
|
358
389
|
custom: component => web_extension_run_1.WebExtensionRunUtil.track(run, () => host.extensions.showCustom(run.loaded.name, component)),
|
|
390
|
+
answer: (kind, handler) => web_extension_run_1.WebExtensionRunUtil.track(run, () => workbench.pages.answer(`${run.loaded.name}/${kind}`, handler)),
|
|
391
|
+
screen: {
|
|
392
|
+
agent: host.screen.agent,
|
|
393
|
+
parts: () => host.screen.parts(),
|
|
394
|
+
act: (part, action, item, input, button) => host.screen.act(part, action, item, input, button),
|
|
395
|
+
element: (part, item, action) => host.screen.element(part, item, action),
|
|
396
|
+
where: () => host.screen.where(),
|
|
397
|
+
places: () => host.screen.places(),
|
|
398
|
+
go: to => (run.stopped ? Promise.resolve(false) : host.screen.go(to)),
|
|
399
|
+
},
|
|
400
|
+
useScreenPart: spec => {
|
|
401
|
+
const latest = React.useRef(spec);
|
|
402
|
+
latest.current = spec;
|
|
403
|
+
React.useEffect(() => host.screen.register(() => latest.current), []);
|
|
404
|
+
},
|
|
359
405
|
openShared: text => (run.stopped ? Promise.resolve(false) : host.extensions.openShared(text)),
|
|
360
406
|
connect: async (link) => {
|
|
361
407
|
if (run.stopped) {
|
|
@@ -374,6 +420,11 @@ class WebExtensionContext {
|
|
|
374
420
|
forgetPage: id => !run.stopped && host.extensions.forgetPage(id),
|
|
375
421
|
useTasks: () => React.useSyncExternalStore(host.extensions.tasks.subscribe, host.extensions.tasks.tasks, host.extensions.tasks.tasks),
|
|
376
422
|
useHomeItems: () => React.useSyncExternalStore(host.extensions.home.subscribe, host.extensions.home.items, host.extensions.home.items),
|
|
423
|
+
useRoomAddons: () => {
|
|
424
|
+
const read = () => host.extensions.state.roomAddons;
|
|
425
|
+
const subscribe = React.useCallback((listener) => host.extensions.subscribe(listener), []);
|
|
426
|
+
return React.useSyncExternalStore(subscribe, read, read);
|
|
427
|
+
},
|
|
377
428
|
removeTasks: tasks => (run.stopped ? Promise.resolve(false) : web_tasks_1.WebTaskUtil.remove(tasks, notices, (0, use_t_1.translator)(settings.state.language))),
|
|
378
429
|
useView: id => this.useView(id),
|
|
379
430
|
Avatar: ta_avatar_1.TaAvatar,
|
|
@@ -395,14 +446,16 @@ class WebExtensionContext {
|
|
|
395
446
|
Stack: phone_shell_1.PhoneStack,
|
|
396
447
|
Face: face_1.Face,
|
|
397
448
|
GroupFace: face_1.GroupFace,
|
|
398
|
-
Composer: this.
|
|
449
|
+
Composer: this.composerOf(run),
|
|
399
450
|
HoldToTalk: this.holdToTalk,
|
|
400
451
|
voice: this.voice,
|
|
401
452
|
Markdown: markdown_1.Markdown,
|
|
453
|
+
Conversation: conversation_view_1.ConversationView,
|
|
402
454
|
useChatScroll: (sent, key) => (0, conversation_scroll_hooks_1.useConversationScroll)(sent, { sentTo: 'bottom', key }),
|
|
403
455
|
Empty: empty_state_1.EmptyState,
|
|
404
456
|
Skeleton: list_skeleton_1.ListSkeleton,
|
|
405
457
|
useBusy: busy_1.useBusy,
|
|
458
|
+
useBackLayer: (open, close) => (0, back_stack_1.useBackLayer)(open, close).top,
|
|
406
459
|
Switch: settings_controls_1.Switch,
|
|
407
460
|
HostTag: host_tag_1.HostTag,
|
|
408
461
|
SwipeRow: swipe_row_1.SwipeRow,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TaEvent, TaTemporaryFrom, TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
3
|
import type { MessageId } from '../i18n/messages';
|
|
4
|
-
import type {
|
|
4
|
+
import type { BlockSpeech } from '../util/spoken';
|
|
5
|
+
import type { WebAvatarProps, WebCallPartner, WebChatIconSource, WebCodeRendererProps, WebComposerAddon, WebCustomMessage, WebEditor, WebExtensionFactory, WebIcon, WebImage, WebInitiative, WebLabel, WebMenuItem, WebOpener, WebPageGroup, WebRoomAddonEntry, WebSearchSource, WebSessionMenu, WebSessionOpening, WebSettingsSection, WebShareTarget, WebTool, WebToolRendererResolver, WebViewLocation, WebViewPreview, WidgetOptions } from './web-extension-api';
|
|
5
6
|
import type { WebHomeBoard } from './web-home';
|
|
6
7
|
import type { PageUsage, WebPageInfo } from './web-pages';
|
|
7
8
|
import type { WebTaskBoard } from './web-tasks';
|
|
@@ -62,6 +63,10 @@ export interface WebViewEntry {
|
|
|
62
63
|
pages?: string[];
|
|
63
64
|
/** Under Discover until the user pins it (WebView.discover). */
|
|
64
65
|
discover?: boolean;
|
|
66
|
+
/** Its group under Discover (WebView.group). */
|
|
67
|
+
group?: WebPageGroup;
|
|
68
|
+
/** Never in the navigation nor under Discover (WebView.navigation). */
|
|
69
|
+
navigation?: false;
|
|
65
70
|
menu?(): WebMenuItem[][];
|
|
66
71
|
preview?(): WebViewPreview | undefined;
|
|
67
72
|
/** WebView.mark. */
|
|
@@ -106,6 +111,8 @@ export interface WebExtensionsState {
|
|
|
106
111
|
widgets: WebWidgetEntry[];
|
|
107
112
|
/** What extensions add to the message box of every conversation (WebExtensionAPI.registerComposerAddon). */
|
|
108
113
|
composerAddons: WebComposerAddonEntry[];
|
|
114
|
+
/** What extensions add to the rooms (WebExtensionAPI.registerRoomAddon). */
|
|
115
|
+
roomAddons: WebRoomAddonEntry[];
|
|
109
116
|
/** The sections extensions add to the settings (WebExtensionAPI.registerSettings). */
|
|
110
117
|
settingsSections: WebSettingsEntry[];
|
|
111
118
|
renderers: Record<string, React.ComponentType<{
|
|
@@ -113,6 +120,10 @@ export interface WebExtensionsState {
|
|
|
113
120
|
}>>;
|
|
114
121
|
/** By language, in lower case: the first registered (WebExtensionAPI.registerCodeRenderer). */
|
|
115
122
|
codeRenderers: Record<string, React.ComponentType<WebCodeRendererProps>>;
|
|
123
|
+
/** By language, in lower case, how its blocks are said aloud (WebCodeRendererOptions.spoken): SpokenReply. */
|
|
124
|
+
codeSpeech: BlockSpeech;
|
|
125
|
+
/** Who answers in calls in place of the conversation (WebExtensionAPI.registerCallPartner): the first registered. */
|
|
126
|
+
callPartner?: WebCallPartner;
|
|
116
127
|
/** By the name of the extension, the group of the sessions it draws (WebExtensionAPI.registerAvatar). */
|
|
117
128
|
avatars: Record<string, React.ComponentType<WebAvatarProps>>;
|
|
118
129
|
/** The icons extensions give conversations of theirs (WebExtensionAPI.registerChatIcon), with the extension of each. */
|
|
@@ -152,6 +163,11 @@ export interface WebExtensionsState {
|
|
|
152
163
|
page: string;
|
|
153
164
|
/** Counts the pages shown, the same one again too: on a phone a page shown comes to the front. */
|
|
154
165
|
pageShown: number;
|
|
166
|
+
/** The list of chats asked for (ui.showChats), counted, the same again too; `busy` to show only those going on. */
|
|
167
|
+
chatsShown: {
|
|
168
|
+
count: number;
|
|
169
|
+
busy: boolean;
|
|
170
|
+
};
|
|
155
171
|
/** The extensions started on open, running or not, in the order of the server's list. */
|
|
156
172
|
onOpen: OnOpenExtension[];
|
|
157
173
|
/** The pages of those in the background: kept where they were, hidden, so that they show again as they were. */
|
|
@@ -232,6 +248,8 @@ export interface TaWebExtensions {
|
|
|
232
248
|
* name of one opens its first page. Resolves once it shows; false when there is no such view.
|
|
233
249
|
*/
|
|
234
250
|
showView(id: string): Promise<boolean>;
|
|
251
|
+
/** Shows the list of chats as `ui.showChats` does: the shell follows chatsShown. */
|
|
252
|
+
showChats(busy: boolean): void;
|
|
235
253
|
/** The page shown went out of sight, `page` left as it is (a phone's screen slid away): its extension goes to the background. */
|
|
236
254
|
hidePage(): void;
|
|
237
255
|
/** Every page there is, as `ui.usePages` lists them; the same array until one changes. */
|
|
@@ -12,9 +12,11 @@ var WebExtensionsStateUtil;
|
|
|
12
12
|
views: [],
|
|
13
13
|
widgets: [],
|
|
14
14
|
composerAddons: [],
|
|
15
|
+
roomAddons: [],
|
|
15
16
|
settingsSections: [],
|
|
16
17
|
renderers: {},
|
|
17
18
|
codeRenderers: {},
|
|
19
|
+
codeSpeech: {},
|
|
18
20
|
avatars: {},
|
|
19
21
|
chatIcons: [],
|
|
20
22
|
initiatives: [],
|
|
@@ -29,6 +31,7 @@ var WebExtensionsStateUtil;
|
|
|
29
31
|
loaded: false,
|
|
30
32
|
page: '',
|
|
31
33
|
pageShown: 0,
|
|
34
|
+
chatsShown: { count: 0, busy: false },
|
|
32
35
|
conversationShown: true,
|
|
33
36
|
onOpen: [],
|
|
34
37
|
kept: [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TaEvent } from '@celljs/ta-protocol';
|
|
2
2
|
import type * as React from 'react';
|
|
3
|
-
import type { WebChatIconSource, WebComposerAddon, WebHomeSource, WebInitiative, WebOpener, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WidgetOptions } from './web-extension-api';
|
|
3
|
+
import type { WebCallPartner, WebChatIconSource, WebComposerAddon, WebHomeSource, WebInitiative, WebOpener, WebRoomAddon, WebSearchSource, WebSessionMenu, WebSettingsSection, WebTaskSource, WebTool, WebToolRendererResolver, WebView, WidgetOptions } from './web-extension-api';
|
|
4
4
|
import type { LoadedWebExtension, WebExtensionsState } from './web-extension-protocol';
|
|
5
5
|
/** What an extension registered through its API: all of it goes when it stops. */
|
|
6
6
|
export interface WebRegistrations {
|
|
@@ -11,6 +11,8 @@ export interface WebRegistrations {
|
|
|
11
11
|
}>;
|
|
12
12
|
renderers: Map<string, WebExtensionsState['renderers'][string]>;
|
|
13
13
|
codeRenderers: Map<string, WebExtensionsState['codeRenderers'][string]>;
|
|
14
|
+
codeSpeech: Map<string, WebExtensionsState['codeSpeech'][string]>;
|
|
15
|
+
callPartners: WebCallPartner[];
|
|
14
16
|
avatar?: WebExtensionsState['avatars'][string];
|
|
15
17
|
chatIcons: WebChatIconSource[];
|
|
16
18
|
homeSources: WebHomeSource[];
|
|
@@ -24,6 +26,7 @@ export interface WebRegistrations {
|
|
|
24
26
|
taskSources: WebTaskSource[];
|
|
25
27
|
searches: WebSearchSource[];
|
|
26
28
|
composerAddons: WebComposerAddon[];
|
|
29
|
+
roomAddons: WebRoomAddon[];
|
|
27
30
|
settingsSections: WebSettingsSection[];
|
|
28
31
|
handlers: {
|
|
29
32
|
type: string;
|
|
@@ -51,6 +54,6 @@ export declare namespace WebExtensionRunUtil {
|
|
|
51
54
|
/** Subscribes for the extension: undone when it stops, or by the function returned. */
|
|
52
55
|
function track(run: WebExtensionRun, subscribe: () => () => void): () => void;
|
|
53
56
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
54
|
-
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'avatars' | 'chatIcons' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
57
|
+
function collect(runs: readonly WebExtensionRun[], onOpen: (id: string) => boolean): Pick<WebExtensionsState, 'openers' | 'specificOpeners' | 'sessionMenus' | 'extensions' | 'views' | 'widgets' | 'composerAddons' | 'roomAddons' | 'settingsSections' | 'renderers' | 'codeRenderers' | 'codeSpeech' | 'callPartner' | 'avatars' | 'chatIcons' | 'initiatives' | 'tools' | 'toolRenderers' | 'searches'>;
|
|
55
58
|
}
|
|
56
59
|
//# sourceMappingURL=web-extension-run.d.ts.map
|
|
@@ -11,6 +11,8 @@ var WebExtensionRunUtil;
|
|
|
11
11
|
widgets: new Map(),
|
|
12
12
|
renderers: new Map(),
|
|
13
13
|
codeRenderers: new Map(),
|
|
14
|
+
codeSpeech: new Map(),
|
|
15
|
+
callPartners: [],
|
|
14
16
|
avatar: undefined,
|
|
15
17
|
chatIcons: [],
|
|
16
18
|
homeSources: [],
|
|
@@ -23,6 +25,7 @@ var WebExtensionRunUtil;
|
|
|
23
25
|
taskSources: [],
|
|
24
26
|
searches: [],
|
|
25
27
|
composerAddons: [],
|
|
28
|
+
roomAddons: [],
|
|
26
29
|
settingsSections: [],
|
|
27
30
|
handlers: [],
|
|
28
31
|
};
|
|
@@ -56,9 +59,10 @@ var WebExtensionRunUtil;
|
|
|
56
59
|
WebExtensionRunUtil.track = track;
|
|
57
60
|
/** What the extensions that run registered, as the page shows it: the first of a message type or a tool name wins. */
|
|
58
61
|
function collect(runs, onOpen) {
|
|
59
|
-
var _a, _b;
|
|
62
|
+
var _a, _b, _c;
|
|
60
63
|
const renderers = {};
|
|
61
64
|
const codeRenderers = {};
|
|
65
|
+
const codeSpeech = {};
|
|
62
66
|
const avatars = {};
|
|
63
67
|
const tools = [];
|
|
64
68
|
for (const run of runs) {
|
|
@@ -71,6 +75,9 @@ var WebExtensionRunUtil;
|
|
|
71
75
|
for (const [language, renderer] of run.codeRenderers) {
|
|
72
76
|
(_b = codeRenderers[language]) !== null && _b !== void 0 ? _b : (codeRenderers[language] = renderer);
|
|
73
77
|
}
|
|
78
|
+
for (const [language, spoken] of run.codeSpeech) {
|
|
79
|
+
(_c = codeSpeech[language]) !== null && _c !== void 0 ? _c : (codeSpeech[language] = spoken);
|
|
80
|
+
}
|
|
74
81
|
for (const tool of run.tools) {
|
|
75
82
|
if (!tools.some(other => other.name === tool.name)) {
|
|
76
83
|
tools.push(tool);
|
|
@@ -88,6 +95,8 @@ var WebExtensionRunUtil;
|
|
|
88
95
|
head: view.head,
|
|
89
96
|
pages: view.pages,
|
|
90
97
|
discover: view.discover,
|
|
98
|
+
group: view.group,
|
|
99
|
+
...(view.navigation === false ? { navigation: false } : {}),
|
|
91
100
|
menu: (_a = view.menu) === null || _a === void 0 ? void 0 : _a.bind(view),
|
|
92
101
|
preview: (_b = view.preview) === null || _b === void 0 ? void 0 : _b.bind(view),
|
|
93
102
|
mark: view.mark,
|
|
@@ -110,9 +119,12 @@ var WebExtensionRunUtil;
|
|
|
110
119
|
component,
|
|
111
120
|
}); })),
|
|
112
121
|
composerAddons: runs.flatMap(run => run.composerAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
|
|
122
|
+
roomAddons: runs.flatMap(run => run.roomAddons.map((addon, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, addon }))),
|
|
113
123
|
settingsSections: runs.flatMap(run => run.settingsSections.map((section, index) => ({ id: `${run.loaded.id}/${index}`, extension: run.loaded.id, section }))),
|
|
114
124
|
renderers,
|
|
115
125
|
codeRenderers,
|
|
126
|
+
codeSpeech,
|
|
127
|
+
callPartner: runs.flatMap(run => run.callPartners)[0],
|
|
116
128
|
avatars,
|
|
117
129
|
chatIcons: runs.flatMap(run => run.chatIcons.map(source => ({ extension: run.loaded.name, source }))),
|
|
118
130
|
initiatives: runs.flatMap(run => run.initiatives),
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
|
+
import { TaFiles } from '../files/files-protocol';
|
|
3
|
+
import { TaLinks } from '../links/links-protocol';
|
|
4
|
+
import { TaNotices } from '../notices/notices-protocol';
|
|
5
|
+
import { TaSessionNotices } from '../notices/session-notices';
|
|
6
|
+
import { TaScreen } from '../screen/screen-protocol';
|
|
7
|
+
import { TaSettings } from '../settings/settings-protocol';
|
|
8
|
+
import { TaState } from '../state/state-protocol';
|
|
9
|
+
import { TaWorkbench } from '../workbench-protocol';
|
|
10
|
+
import { WebEditorTabs } from './web-editor-tabs';
|
|
11
|
+
import type { WebExtensionFactory } from './web-extension-api';
|
|
12
|
+
import { WebExtensionCode } from './web-extension-code';
|
|
13
|
+
import type { WebExtensionContext } from './web-extension-context';
|
|
14
|
+
import { BuiltinWebExtension, type LoadedWebExtension, type WebExtensionConversation, type WebExtensionsState, type WebSessionSwitcher, type WebViewEntry } from './web-extension-protocol';
|
|
15
|
+
import { type WebExtensionRun } from './web-extension-run';
|
|
16
|
+
import { WebHomeBoard } from './web-home';
|
|
17
|
+
import { WebOnDemand } from './web-on-demand';
|
|
18
|
+
import { WebPageList } from './web-page-list';
|
|
19
|
+
import { WebTaskBoard } from './web-tasks';
|
|
20
|
+
/**
|
|
21
|
+
* The web extensions running: the built-ins and those of the computer's packages, loaded, started and
|
|
22
|
+
* stopped, and what they registered published.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class WebExtensionsRunning {
|
|
25
|
+
protected readonly workbench: TaWorkbench;
|
|
26
|
+
protected readonly settings: TaSettings;
|
|
27
|
+
protected readonly taFiles: TaFiles;
|
|
28
|
+
/** Detached: TaLinks asks the openers of the extensions. */
|
|
29
|
+
protected readonly links: TaLinks;
|
|
30
|
+
protected readonly notices: TaNotices;
|
|
31
|
+
protected readonly persisted: TaState;
|
|
32
|
+
protected readonly sessionNotices: TaSessionNotices;
|
|
33
|
+
protected readonly screen: TaScreen;
|
|
34
|
+
readonly builtins: BuiltinWebExtension[];
|
|
35
|
+
readonly tasks: WebTaskBoard;
|
|
36
|
+
readonly home: WebHomeBoard;
|
|
37
|
+
protected readonly tabs: WebEditorTabs;
|
|
38
|
+
/** The code read before, by its hash: a start reads only what changed. */
|
|
39
|
+
protected readonly code: WebExtensionCode;
|
|
40
|
+
protected current: WebExtensionsState;
|
|
41
|
+
protected readonly running: Map<string, WebExtensionRun>;
|
|
42
|
+
protected readonly listeners: Set<(state: WebExtensionsState) => void>;
|
|
43
|
+
protected conversation?: WebExtensionConversation;
|
|
44
|
+
protected switcher?: WebSessionSwitcher;
|
|
45
|
+
protected settingsOpener?: (section?: string) => void;
|
|
46
|
+
protected refreshing: Promise<boolean>;
|
|
47
|
+
/** The extensions of the list of the last time have started (startKept), once. */
|
|
48
|
+
protected keptStarted: boolean;
|
|
49
|
+
/** The views of the navigation kept from before (WebViewUtil.KEPT), in their places until the extensions have loaded once. */
|
|
50
|
+
protected placeholders?: WebViewEntry[];
|
|
51
|
+
protected started?: WebOnDemand;
|
|
52
|
+
protected readonly pageList: WebPageList;
|
|
53
|
+
get state(): WebExtensionsState;
|
|
54
|
+
protected init(): void;
|
|
55
|
+
/** The extensions started on open (ta-launcher.md). */
|
|
56
|
+
protected get onDemand(): WebOnDemand;
|
|
57
|
+
/** The kinds the pages of the extensions there are list (TaWebExtensionInfo.lists), started or not. */
|
|
58
|
+
protected listedKinds(): Set<string>;
|
|
59
|
+
/** Loads and starts an extension started on open, as reconcile starts the others. */
|
|
60
|
+
protected launch(info: TaWebExtensionInfo): Promise<void>;
|
|
61
|
+
/** Stops one started on open: it is still listed, to start again; its page, if shown, gives way to the conversation. */
|
|
62
|
+
protected stopOnDemand(id: string): void;
|
|
63
|
+
protected reconcile(): Promise<boolean>;
|
|
64
|
+
/**
|
|
65
|
+
* The first time, before the computer has answered: the extensions of its list of the last time whose code
|
|
66
|
+
* this browser keeps. What they read goes with the first calls of the page, not a round trip after the list
|
|
67
|
+
* (a phone over the relay waited for it before its double's list could show). The list then keeps those
|
|
68
|
+
* still the same and stops the others.
|
|
69
|
+
*/
|
|
70
|
+
protected startKept(host: string | undefined): Promise<boolean>;
|
|
71
|
+
/** Stops and forgets the extensions running that `keep` does not keep; whether there were any. */
|
|
72
|
+
protected stopUnless(keep: (run: WebExtensionRun) => boolean): boolean;
|
|
73
|
+
protected loadPackage(info: TaWebExtensionInfo): Promise<{
|
|
74
|
+
factory: WebExtensionFactory;
|
|
75
|
+
hash: string;
|
|
76
|
+
} | {
|
|
77
|
+
error: string;
|
|
78
|
+
}>;
|
|
79
|
+
protected startPackage(info: TaWebExtensionInfo, load: {
|
|
80
|
+
factory: WebExtensionFactory;
|
|
81
|
+
hash: string;
|
|
82
|
+
} | {
|
|
83
|
+
error: string;
|
|
84
|
+
}): void;
|
|
85
|
+
protected start(loaded: LoadedWebExtension, factory: WebExtensionFactory, hash?: string): void;
|
|
86
|
+
protected stop(run: WebExtensionRun): void;
|
|
87
|
+
protected guard(run: WebExtensionRun, action: () => void): void;
|
|
88
|
+
protected publish(): void;
|
|
89
|
+
protected update(change: Partial<WebExtensionsState>): void;
|
|
90
|
+
abstract openView(id: string, preserveFocus?: boolean): void;
|
|
91
|
+
abstract showView(id: string): Promise<boolean>;
|
|
92
|
+
protected abstract get context(): WebExtensionContext;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=web-extensions-running.d.ts.map
|