@celljs/ta-web 4.15.2 → 4.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TaWebExtensionInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import type { Hold } from '../device/hold';
|
|
3
|
+
import type { WebPageGroup } from '../extension/web-extension-api';
|
|
3
4
|
import { type WebViewEntry } from '../extension/web-extension-protocol';
|
|
4
5
|
import { type WebPageInfo } from '../extension/web-pages';
|
|
5
6
|
import { type NavigationSetting } from '../settings/navigation';
|
|
@@ -8,7 +9,8 @@ import type { PhoneTab } from './phone-shell';
|
|
|
8
9
|
import { type SideList } from './side-lists';
|
|
9
10
|
/**
|
|
10
11
|
* The pages on the rail: the pages a sidebar view lists are reached from it, and show beside it; those of
|
|
11
|
-
* extensions started on open from the launcher (ta-launcher.md), as they come and go
|
|
12
|
+
* extensions started on open from the launcher (ta-launcher.md), as they come and go; those only shown by something
|
|
13
|
+
* else (WebView.navigation) nowhere.
|
|
12
14
|
*/
|
|
13
15
|
export declare function railPages(views: WebViewEntry[]): WebViewEntry[];
|
|
14
16
|
/**
|
|
@@ -61,6 +63,15 @@ export declare function places(views: WebViewEntry[], setting: NavigationSetting
|
|
|
61
63
|
export declare function arrangeViews(views: readonly WebViewEntry[], onOpen: readonly {
|
|
62
64
|
info: TaWebExtensionInfo;
|
|
63
65
|
}[], setting: NavigationSetting, handheld: boolean, infoOf: (extensionId: string) => TaWebExtensionInfo | undefined, kinds: ReadonlySet<string>): (view: WebViewEntry) => 'navigation' | 'discover' | 'list';
|
|
66
|
+
/** The groups of Discover, in their order: each a card of its own. */
|
|
67
|
+
export declare const DISCOVER_GROUPS: readonly WebPageGroup[];
|
|
68
|
+
/** The pages under Discover by group (WebView.group, `more` without one or with one it does not know), in the order of DISCOVER_GROUPS; empty ones left out. */
|
|
69
|
+
export declare function discoverGroups<T extends {
|
|
70
|
+
group?: WebPageGroup;
|
|
71
|
+
}>(pages: readonly T[]): {
|
|
72
|
+
group: WebPageGroup;
|
|
73
|
+
pages: T[];
|
|
74
|
+
}[];
|
|
64
75
|
/** Discover is in the navigation: some pages are under it. */
|
|
65
76
|
export declare function hasDiscover(navigation: Pick<Navigation, 'discover' | 'onOpen'>): boolean;
|
|
66
77
|
export interface PhoneTabLabels {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ME_TAB = exports.DISCOVER = void 0;
|
|
3
|
+
exports.DISCOVER_GROUPS = exports.ME_TAB = exports.DISCOVER = void 0;
|
|
4
4
|
exports.railPages = railPages;
|
|
5
5
|
exports.entryHold = entryHold;
|
|
6
6
|
exports.fixedTabs = fixedTabs;
|
|
7
7
|
exports.places = places;
|
|
8
8
|
exports.arrangeViews = arrangeViews;
|
|
9
|
+
exports.discoverGroups = discoverGroups;
|
|
9
10
|
exports.hasDiscover = hasDiscover;
|
|
10
11
|
exports.phoneTabs = phoneTabs;
|
|
11
12
|
const lucide_react_1 = require("lucide-react");
|
|
@@ -16,11 +17,12 @@ const side_lists_1 = require("./side-lists");
|
|
|
16
17
|
/* The places of the navigation, the same on the rail and in the tabs of a phone: which pages, in what order. */
|
|
17
18
|
/**
|
|
18
19
|
* The pages on the rail: the pages a sidebar view lists are reached from it, and show beside it; those of
|
|
19
|
-
* extensions started on open from the launcher (ta-launcher.md), as they come and go
|
|
20
|
+
* extensions started on open from the launcher (ta-launcher.md), as they come and go; those only shown by something
|
|
21
|
+
* else (WebView.navigation) nowhere.
|
|
20
22
|
*/
|
|
21
23
|
function railPages(views) {
|
|
22
24
|
const listed = new Set(views.flatMap(view => { var _a; return (view.location === 'sidebar' ? ((_a = view.pages) !== null && _a !== void 0 ? _a : []) : []); }));
|
|
23
|
-
return views.filter(view => view.location === 'page' && !view.onOpen && !listed.has(view.id));
|
|
25
|
+
return views.filter(view => view.location === 'page' && !view.onOpen && view.navigation !== false && !listed.has(view.id));
|
|
24
26
|
}
|
|
25
27
|
/** The hold of an entry of the navigation: the double's, the chats'; pages keep their menus (their fold and the settings). */
|
|
26
28
|
function entryHold(id, double, holds) {
|
|
@@ -56,6 +58,13 @@ function arrangeViews(views, onOpen, setting, handheld, infoOf, kinds) {
|
|
|
56
58
|
const arranged = places(views.filter(view => !web_pages_1.WebPagesUtil.listed(infoOf(view.extension), kinds)), setting, handheld, onOpen.some(entry => !entry.info.temporary && !web_pages_1.WebPagesUtil.listed(entry.info, kinds)));
|
|
57
59
|
return view => (view === arranged.home || arranged.nav.includes(view) ? 'navigation' : arranged.discover.includes(view) ? 'discover' : 'list');
|
|
58
60
|
}
|
|
61
|
+
/** The groups of Discover, in their order: each a card of its own. */
|
|
62
|
+
exports.DISCOVER_GROUPS = ['people', 'work', 'share', 'more'];
|
|
63
|
+
/** The pages under Discover by group (WebView.group, `more` without one or with one it does not know), in the order of DISCOVER_GROUPS; empty ones left out. */
|
|
64
|
+
function discoverGroups(pages) {
|
|
65
|
+
const of = (page) => (page.group && exports.DISCOVER_GROUPS.includes(page.group) ? page.group : 'more');
|
|
66
|
+
return exports.DISCOVER_GROUPS.map(group => ({ group, pages: pages.filter(page => of(page) === group) })).filter(entry => entry.pages.length > 0);
|
|
67
|
+
}
|
|
59
68
|
/** Discover is in the navigation: some pages are under it. */
|
|
60
69
|
function hasDiscover(navigation) {
|
|
61
70
|
return navigation.discover.length > 0 || navigation.onOpen.length > 0;
|
|
@@ -37,10 +37,12 @@ exports.NoticeCenter = NoticeCenter;
|
|
|
37
37
|
const lucide_react_1 = require("lucide-react");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const react_dom_1 = require("react-dom");
|
|
40
|
+
const back_stack_1 = require("../device/back-stack");
|
|
40
41
|
const hooks_1 = require("../hooks");
|
|
41
42
|
const use_t_1 = require("../i18n/use-t");
|
|
42
43
|
const notices_1 = require("../notices/notices");
|
|
43
44
|
const callout_1 = require("./callout");
|
|
45
|
+
const face_1 = require("./face");
|
|
44
46
|
const icon_1 = require("./icon");
|
|
45
47
|
const notice_face_1 = require("./notice-face");
|
|
46
48
|
const terminal_art_1 = require("./terminal-art");
|
|
@@ -109,6 +111,34 @@ function SessionToast({ notice, leaving, leave, hold, }) {
|
|
|
109
111
|
} }, action.label))))),
|
|
110
112
|
React.createElement(icon_1.IconButton, { icon: lucide_react_1.X, label: t('ta.dismiss'), className: "ta-toast-close", onClick: leave })));
|
|
111
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* What Ta did for the user: its face, what it did as the head, what changed under it a row each (before, an arrow, after),
|
|
116
|
+
* and Undo beside the head, where the eye already is.
|
|
117
|
+
*/
|
|
118
|
+
function TaToast({ notice, leaving, leave, hold }) {
|
|
119
|
+
var _a;
|
|
120
|
+
const t = (0, use_t_1.useT)();
|
|
121
|
+
const action = notice.action;
|
|
122
|
+
return (React.createElement("div", { className: `ta-toast ta-toast-ta${leaving ? ' ta-leaving' : ''}`, role: "status", ...hold },
|
|
123
|
+
React.createElement("span", { className: "ta-toast-face" },
|
|
124
|
+
React.createElement(face_1.Face, { double: true, size: 32 })),
|
|
125
|
+
React.createElement("div", { className: "ta-toast-text" },
|
|
126
|
+
React.createElement("div", { className: "ta-toast-title" }, notice.message),
|
|
127
|
+
(_a = notice.changes) === null || _a === void 0 ? void 0 :
|
|
128
|
+
_a.map((change, index) => (React.createElement("div", { key: index, className: "ta-toast-change" },
|
|
129
|
+
change.label && React.createElement("span", { className: "ta-toast-change-label" }, change.label),
|
|
130
|
+
change.before !== undefined && (React.createElement(React.Fragment, null,
|
|
131
|
+
React.createElement("span", { className: "ta-toast-change-before" }, change.before),
|
|
132
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ArrowRight, size: 12, className: "ta-toast-change-arrow" }))),
|
|
133
|
+
React.createElement("span", { className: `ta-toast-change-after${change.label || change.before !== undefined ? '' : ' ta-toast-change-name'}` }, change.after))))),
|
|
134
|
+
action && (React.createElement("button", { type: "button", className: "ta-toast-undo", onClick: () => {
|
|
135
|
+
action.run();
|
|
136
|
+
leave();
|
|
137
|
+
} },
|
|
138
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Undo2, size: 14 }),
|
|
139
|
+
action.label)),
|
|
140
|
+
React.createElement(icon_1.IconButton, { icon: lucide_react_1.X, label: t('ta.dismiss'), className: "ta-toast-close", onClick: leave })));
|
|
141
|
+
}
|
|
112
142
|
function Toast({ notice, notices }) {
|
|
113
143
|
var _a;
|
|
114
144
|
const t = (0, use_t_1.useT)();
|
|
@@ -118,6 +148,9 @@ function Toast({ notice, notices }) {
|
|
|
118
148
|
setTimeout(() => notices.dismiss(notice.id), LEAVE_MS);
|
|
119
149
|
}, [notices, notice.id]);
|
|
120
150
|
const hold = useLifetime(notice, leave);
|
|
151
|
+
if (notice.ta) {
|
|
152
|
+
return React.createElement(TaToast, { notice: notice, leaving: leaving, leave: leave, hold: hold });
|
|
153
|
+
}
|
|
121
154
|
if (notice.from) {
|
|
122
155
|
return React.createElement(SessionToast, { notice: notice, leaving: leaving, leave: leave, hold: hold });
|
|
123
156
|
}
|
|
@@ -145,6 +178,7 @@ function ConfirmDialog({ request, notices }) {
|
|
|
145
178
|
var _a;
|
|
146
179
|
const t = (0, use_t_1.useT)();
|
|
147
180
|
const answer = (confirmed) => notices.answer(request.id, confirmed);
|
|
181
|
+
(0, back_stack_1.useBackLayer)(true, () => answer(false));
|
|
148
182
|
React.useEffect(() => {
|
|
149
183
|
const onKey = (event) => event.key === 'Escape' && notices.answer(request.id, false);
|
|
150
184
|
document.addEventListener('keydown', onKey);
|
|
@@ -165,6 +199,7 @@ function InputDialog({ request, notices }) {
|
|
|
165
199
|
const t = (0, use_t_1.useT)();
|
|
166
200
|
const [value, setValue] = React.useState((_a = request.value) !== null && _a !== void 0 ? _a : '');
|
|
167
201
|
const cancel = () => notices.answerInput(request.id, undefined);
|
|
202
|
+
(0, back_stack_1.useBackLayer)(true, cancel);
|
|
168
203
|
const submit = (event) => {
|
|
169
204
|
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
170
205
|
notices.answerInput(request.id, value);
|
|
@@ -38,7 +38,8 @@ const React = __importStar(require("react"));
|
|
|
38
38
|
const assistant_hooks_1 = require("../assistant/assistant-hooks");
|
|
39
39
|
const extension_view_1 = require("../extension/extension-view");
|
|
40
40
|
const hooks_1 = require("../hooks");
|
|
41
|
-
const
|
|
41
|
+
const chat_list_row_1 = require("./chat-list-row");
|
|
42
|
+
const chat_list_util_1 = require("./chat-list-util");
|
|
42
43
|
/**
|
|
43
44
|
* The face a conversation has in the lists, for a notice it gave (NoticeFrom): the double's, an agent's, else the
|
|
44
45
|
* letter of its directory in its color. Nothing while the lists do not have it.
|
|
@@ -50,15 +51,15 @@ function NoticeFace({ from, size }) {
|
|
|
50
51
|
const [, assistant] = (0, assistant_hooks_1.useAssistant)();
|
|
51
52
|
const avatars = React.useContext(extension_view_1.SessionAvatars);
|
|
52
53
|
const all = React.useMemo(() => [...sessions, ...saved], [sessions, saved]);
|
|
53
|
-
const session = (_b = all.find(entry =>
|
|
54
|
-
const sources = React.useMemo(() =>
|
|
54
|
+
const session = (_b = all.find(entry => chat_list_util_1.ChatListUtil.isOpen(entry) && entry.sessionId === from.sessionId)) !== null && _b !== void 0 ? _b : all.find(entry => !!from.sessionFile && entry.sessionFile === from.sessionFile);
|
|
55
|
+
const sources = React.useMemo(() => chat_list_util_1.ChatListUtil.sources(all), [all]);
|
|
55
56
|
if (!session) {
|
|
56
57
|
return null;
|
|
57
58
|
}
|
|
58
|
-
const source = sources.find(candidate => candidate.key ===
|
|
59
|
+
const source = sources.find(candidate => candidate.key === chat_list_util_1.ChatListUtil.sourceKey(session));
|
|
59
60
|
const double = (!!assistant.sessionFile && session.sessionFile === assistant.sessionFile) ||
|
|
60
|
-
(
|
|
61
|
+
(chat_list_util_1.ChatListUtil.isOpen(session) && ((_a = assistant.store()) === null || _a === void 0 ? void 0 : _a.sessionId) === session.sessionId);
|
|
61
62
|
const who = double ? { kind: 'double', name: from.title } : session.group && avatars[session.group] ? { kind: 'agent' } : undefined;
|
|
62
|
-
return source ? React.createElement(
|
|
63
|
+
return source ? React.createElement(chat_list_row_1.ChatAvatar, { session: session, source: source, who: who, size: size, mood: from.status === 'ask' ? 'attention' : 'idle' }) : null;
|
|
63
64
|
}
|
|
64
65
|
//# sourceMappingURL=notice-face.js.map
|
|
@@ -47,7 +47,7 @@ export interface PhoneShellProps {
|
|
|
47
47
|
}
|
|
48
48
|
/** What comes out over the first tab: the launcher (pulled down), the board (from the right). */
|
|
49
49
|
export type PhoneSurface = 'launcher' | 'board';
|
|
50
|
-
/** A
|
|
50
|
+
/** A page pushed (PhoneStack), for what shows that one is: the head of an extension's page, the launcher. */
|
|
51
51
|
export interface StackLayer {
|
|
52
52
|
close(): void;
|
|
53
53
|
}
|
|
@@ -78,8 +78,9 @@ export interface PhoneStackProps {
|
|
|
78
78
|
/**
|
|
79
79
|
* A screen pushed over the screen of a phone, as iOS pushes a page of its settings over their list: it slides
|
|
80
80
|
* in from the right and goes back with its button, a swipe from the left edge or the back of the system, as
|
|
81
|
-
* the screen under it does (
|
|
82
|
-
* it only slides
|
|
81
|
+
* the screen under it does, in a tab too (each is a layer of BackLayers; only the top one has the swipe).
|
|
82
|
+
* Outside a PhoneShell it only slides, and the back of the system closes it on a touch screen. In the page of
|
|
83
|
+
* an extension (`ui.Stack`), the head of the page shows back while it is open.
|
|
83
84
|
*/
|
|
84
85
|
export declare function PhoneStack({ base, top, open, onClose }: PhoneStackProps): React.JSX.Element;
|
|
85
86
|
export declare namespace PhoneUtil {
|
|
@@ -61,7 +61,10 @@ function useWarm(wanted) {
|
|
|
61
61
|
}, [wanted, warm]);
|
|
62
62
|
return warm;
|
|
63
63
|
}
|
|
64
|
+
/** What the launcher pushed over itself: the shell moves the home out of its way. */
|
|
64
65
|
const PhoneStackContext = React.createContext(undefined);
|
|
66
|
+
/** Inside the shell of a phone, where a PhoneStack closes with a swipe from the left edge. */
|
|
67
|
+
const InPhoneContext = React.createContext(false);
|
|
65
68
|
/** The page of an extension a PhoneStack is in (PageView): its head shows back while one is pushed, on any device. */
|
|
66
69
|
exports.PageStackContext = React.createContext(undefined);
|
|
67
70
|
const ArrivingContext = React.createContext(false);
|
|
@@ -100,16 +103,20 @@ function PhoneShell(props) {
|
|
|
100
103
|
const t = (0, use_t_1.useT)();
|
|
101
104
|
const touch = (0, device_1.useDevice)(device => device.touch);
|
|
102
105
|
const { screenOpen, workbenchOpen, onBack, onWorkbench, surface, onSurface, launcher, board } = props;
|
|
103
|
-
const [stack, setStack] = React.useState();
|
|
104
|
-
const stacked = screenOpen && !!stack;
|
|
105
106
|
const home = !screenOpen && !workbenchOpen;
|
|
107
|
+
// The layers of the shell, in the one list of the page (BackLayers): the back of the system closes the top one, and
|
|
108
|
+
// only the top one has its swipe, so that none moves under a page pushed, a dialog or a menu.
|
|
109
|
+
const screenLayer = (0, back_stack_1.useBackLayer)(screenOpen, onBack);
|
|
110
|
+
const surfaceLayer = (0, back_stack_1.useBackLayer)(!!surface, () => onSurface(undefined));
|
|
111
|
+
const workbenchLayer = (0, back_stack_1.useBackLayer)(workbenchOpen, () => onWorkbench(false));
|
|
112
|
+
const bare = (0, back_stack_1.useNoBackLayer)();
|
|
106
113
|
// What the launcher pushed over itself (its search page): the home goes down out of the way, and it goes back as a screen's.
|
|
107
114
|
const [launcherStack, setLauncherStack] = React.useState();
|
|
108
115
|
const launcherStacked = home && surface === 'launcher' && !!launcherStack;
|
|
109
116
|
const warmLauncher = useWarm(!!launcher) || surface === 'launcher';
|
|
110
117
|
const warmBoard = useWarm(!!board) || surface === 'board';
|
|
111
118
|
(0, pull_down_1.usePullDown)({
|
|
112
|
-
enabled: touch && !!launcher && home && surface
|
|
119
|
+
enabled: touch && !!launcher && home && (surface === 'launcher' ? surfaceLayer.top : !surface && bare),
|
|
113
120
|
open: surface === 'launcher',
|
|
114
121
|
setOpen: open => onSurface(open ? 'launcher' : undefined),
|
|
115
122
|
sheet: '.ta-phone-home',
|
|
@@ -119,7 +126,7 @@ function PhoneShell(props) {
|
|
|
119
126
|
peek: '.ta-phone-peek',
|
|
120
127
|
});
|
|
121
128
|
(0, sheet_swipe_1.useSheetSwipe)({
|
|
122
|
-
enabled: touch && !!board && home && surface
|
|
129
|
+
enabled: touch && !!board && home && (surface === 'board' ? surfaceLayer.top : !surface && bare),
|
|
123
130
|
open: surface === 'board',
|
|
124
131
|
setOpen: open => onSurface(open ? 'board' : undefined),
|
|
125
132
|
// From the left, as a swipe to the right brings it: a row swipes to the left, so only an open one, which a
|
|
@@ -135,7 +142,7 @@ function PhoneShell(props) {
|
|
|
135
142
|
});
|
|
136
143
|
const arriving = useArriving(screenOpen);
|
|
137
144
|
(0, sheet_swipe_1.useSheetSwipe)({
|
|
138
|
-
enabled: touch &&
|
|
145
|
+
enabled: touch && screenLayer.top,
|
|
139
146
|
open: screenOpen,
|
|
140
147
|
setOpen: open => !open && onBack(),
|
|
141
148
|
side: 'right',
|
|
@@ -145,31 +152,9 @@ function PhoneShell(props) {
|
|
|
145
152
|
under: '.ta-phone-home',
|
|
146
153
|
scrim: '.ta-phone-dim[data-for="screen"]',
|
|
147
154
|
});
|
|
148
|
-
(0, sheet_swipe_1.useSheetSwipe)({
|
|
149
|
-
enabled: touch && stacked && !workbenchOpen,
|
|
150
|
-
open: stacked,
|
|
151
|
-
setOpen: open => !open && (stack === null || stack === void 0 ? void 0 : stack.close()),
|
|
152
|
-
side: 'right',
|
|
153
|
-
opensFrom: 'never',
|
|
154
|
-
closesFrom: 'edge',
|
|
155
|
-
sheet: '.ta-phone-screen .ta-phone-stack-top',
|
|
156
|
-
under: '.ta-phone-screen .ta-phone-stack-base',
|
|
157
|
-
scrim: '.ta-phone-screen .ta-phone-stack > .ta-phone-dim',
|
|
158
|
-
});
|
|
159
|
-
(0, sheet_swipe_1.useSheetSwipe)({
|
|
160
|
-
enabled: touch && launcherStacked,
|
|
161
|
-
open: launcherStacked,
|
|
162
|
-
setOpen: open => !open && (launcherStack === null || launcherStack === void 0 ? void 0 : launcherStack.close()),
|
|
163
|
-
side: 'right',
|
|
164
|
-
opensFrom: 'never',
|
|
165
|
-
closesFrom: 'edge',
|
|
166
|
-
sheet: '.ta-phone-launcher .ta-phone-stack-top',
|
|
167
|
-
under: '.ta-phone-launcher .ta-phone-stack-base',
|
|
168
|
-
scrim: '.ta-phone-launcher .ta-phone-stack > .ta-phone-dim',
|
|
169
|
-
});
|
|
170
155
|
(0, sheet_swipe_1.useSheetSwipe)({
|
|
171
156
|
// Put away over a page of a tab too (its head has the button); brought out by a swipe only over a conversation.
|
|
172
|
-
enabled: touch && !!props.workbench && (
|
|
157
|
+
enabled: touch && !!props.workbench && (workbenchOpen ? workbenchLayer.top : screenLayer.top),
|
|
173
158
|
open: workbenchOpen,
|
|
174
159
|
setOpen: onWorkbench,
|
|
175
160
|
side: 'right',
|
|
@@ -181,52 +166,58 @@ function PhoneShell(props) {
|
|
|
181
166
|
// A row swipes to the left as the workbench comes: over one, the workbench comes only from the edge.
|
|
182
167
|
edgeOver: '.ta-swipe-row[data-swipeable]',
|
|
183
168
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
React.createElement(
|
|
205
|
-
|
|
206
|
-
launcher && (React.createElement("button", { type: "button", className: "ta-phone-peek", "aria-label": t('ta.launcher.back'), tabIndex: surface === 'launcher' ? 0 : -1, onClick: () => onSurface(undefined) })),
|
|
207
|
-
board && (React.createElement(React.Fragment, null,
|
|
208
|
-
React.createElement("div", { className: "ta-phone-dim", "data-for": "board" }),
|
|
209
|
-
React.createElement("div", { className: "ta-phone-board", inert: surface !== 'board' }, warmBoard && board))),
|
|
210
|
-
React.createElement("div", { className: "ta-phone-dim", "data-for": "screen" }),
|
|
211
|
-
React.createElement("div", { className: "ta-phone-screen", inert: !screenOpen || workbenchOpen },
|
|
212
|
-
React.createElement("main", { className: "ta-main" },
|
|
213
|
-
React.createElement(PhoneStackContext.Provider, { value: setStack },
|
|
214
|
-
React.createElement(ArrivingContext.Provider, { value: arriving }, props.screen)))),
|
|
215
|
-
props.workbench && React.createElement("div", { className: "ta-phone-dim", "data-for": "workbench" }),
|
|
216
|
-
props.workbench,
|
|
217
|
-
props.children));
|
|
169
|
+
return (React.createElement(InPhoneContext.Provider, { value: true },
|
|
170
|
+
React.createElement("div", { className: "ta-app ta-phone", "data-screen": screenOpen ? '' : undefined, "data-workbench": workbenchOpen ? '' : undefined, "data-surface": surface, "data-surface-stack": launcherStacked ? '' : undefined },
|
|
171
|
+
launcher && (React.createElement("div", { className: "ta-phone-launcher", inert: surface !== 'launcher' },
|
|
172
|
+
React.createElement("div", { className: "ta-phone-launcher-body" },
|
|
173
|
+
React.createElement(back_stack_1.BackLayerContext.Provider, { value: surfaceLayer.layer },
|
|
174
|
+
React.createElement(PhoneStackContext.Provider, { value: setLauncherStack }, warmLauncher && launcher))))),
|
|
175
|
+
React.createElement("div", { className: "ta-phone-home", inert: screenOpen || workbenchOpen || !!surface },
|
|
176
|
+
React.createElement("div", { className: "ta-phone-page" }, props.home),
|
|
177
|
+
React.createElement(TabBar, { tabs: props.tabs, tab: props.tab, onTab: props.onTab })),
|
|
178
|
+
launcher && (React.createElement("button", { type: "button", className: "ta-phone-peek", "aria-label": t('ta.launcher.back'), tabIndex: surface === 'launcher' ? 0 : -1, onClick: () => onSurface(undefined) })),
|
|
179
|
+
board && (React.createElement(React.Fragment, null,
|
|
180
|
+
React.createElement("div", { className: "ta-phone-dim", "data-for": "board" }),
|
|
181
|
+
React.createElement("div", { className: "ta-phone-board", inert: surface !== 'board' },
|
|
182
|
+
React.createElement(back_stack_1.BackLayerContext.Provider, { value: surfaceLayer.layer }, warmBoard && board)))),
|
|
183
|
+
React.createElement("div", { className: "ta-phone-dim", "data-for": "screen" }),
|
|
184
|
+
React.createElement("div", { className: "ta-phone-screen", inert: !screenOpen || workbenchOpen },
|
|
185
|
+
React.createElement("main", { className: "ta-main" },
|
|
186
|
+
React.createElement(back_stack_1.BackLayerContext.Provider, { value: screenLayer.layer },
|
|
187
|
+
React.createElement(ArrivingContext.Provider, { value: arriving }, props.screen)))),
|
|
188
|
+
props.workbench && React.createElement("div", { className: "ta-phone-dim", "data-for": "workbench" }),
|
|
189
|
+
React.createElement(back_stack_1.BackLayerContext.Provider, { value: workbenchLayer.layer }, props.workbench),
|
|
190
|
+
props.children)));
|
|
218
191
|
}
|
|
219
192
|
/**
|
|
220
193
|
* A screen pushed over the screen of a phone, as iOS pushes a page of its settings over their list: it slides
|
|
221
194
|
* in from the right and goes back with its button, a swipe from the left edge or the back of the system, as
|
|
222
|
-
* the screen under it does (
|
|
223
|
-
* it only slides
|
|
195
|
+
* the screen under it does, in a tab too (each is a layer of BackLayers; only the top one has the swipe).
|
|
196
|
+
* Outside a PhoneShell it only slides, and the back of the system closes it on a touch screen. In the page of
|
|
197
|
+
* an extension (`ui.Stack`), the head of the page shows back while it is open.
|
|
224
198
|
*/
|
|
225
199
|
function PhoneStack({ base, top, open, onClose }) {
|
|
200
|
+
const inPhone = React.useContext(InPhoneContext);
|
|
226
201
|
const register = React.useContext(PhoneStackContext);
|
|
227
202
|
const page = React.useContext(exports.PageStackContext);
|
|
203
|
+
const touch = (0, device_1.useDevice)(device => device.touch);
|
|
228
204
|
const close = React.useRef(onClose);
|
|
229
205
|
close.current = onClose;
|
|
206
|
+
// A layer of the page, wherever it is (a tab, the screen, the launcher, another PhoneStack): the back closes it.
|
|
207
|
+
const back = (0, back_stack_1.useBackLayer)(open, onClose);
|
|
208
|
+
const id = React.useId();
|
|
209
|
+
const of = `.ta-phone-stack[data-stack="${id}"]`;
|
|
210
|
+
(0, sheet_swipe_1.useSheetSwipe)({
|
|
211
|
+
enabled: inPhone && touch && back.top,
|
|
212
|
+
open,
|
|
213
|
+
setOpen: shown => !shown && close.current(),
|
|
214
|
+
side: 'right',
|
|
215
|
+
opensFrom: 'never',
|
|
216
|
+
closesFrom: 'edge',
|
|
217
|
+
sheet: `${of} > .ta-phone-stack-top`,
|
|
218
|
+
under: `${of} > .ta-phone-stack-base`,
|
|
219
|
+
scrim: `${of} > .ta-phone-dim`,
|
|
220
|
+
});
|
|
230
221
|
React.useEffect(() => {
|
|
231
222
|
const registers = [register, page].filter((each) => !!each);
|
|
232
223
|
if (!open || registers.length === 0) {
|
|
@@ -242,10 +233,11 @@ function PhoneStack({ base, top, open, onClose }) {
|
|
|
242
233
|
}
|
|
243
234
|
};
|
|
244
235
|
}, [open, register, page]);
|
|
245
|
-
return (React.createElement("div", { className: "ta-phone-stack", "data-open": open ? '' : undefined },
|
|
236
|
+
return (React.createElement("div", { className: "ta-phone-stack", "data-open": open ? '' : undefined, "data-stack": id },
|
|
246
237
|
React.createElement("div", { className: "ta-phone-stack-base", inert: open }, base),
|
|
247
238
|
React.createElement("div", { className: "ta-phone-dim" }),
|
|
248
|
-
React.createElement("div", { className: "ta-phone-stack-top", inert: !open },
|
|
239
|
+
React.createElement("div", { className: "ta-phone-stack-top", inert: !open },
|
|
240
|
+
React.createElement(back_stack_1.BackLayerContext.Provider, { value: back.layer }, top))));
|
|
249
241
|
}
|
|
250
242
|
function TabBar({ tabs, tab, onTab }) {
|
|
251
243
|
const t = (0, use_t_1.useT)();
|
|
@@ -268,7 +260,7 @@ function TabBar({ tabs, tab, onTab }) {
|
|
|
268
260
|
return (React.createElement("button", { key: item.id, type: "button", className: `ta-tabbar-item${active ? ' ta-active' : ''}`, "aria-current": active ? 'page' : undefined, onClick: event => (active ? again(item.id, event.currentTarget.closest('.ta-phone-home')) : onTab(item.id)), onContextMenu: item.menu ? event => { var _a; return openMenu(event, (_a = item.menu) !== null && _a !== void 0 ? _a : []); } : undefined, ...held(item.hold) },
|
|
269
261
|
React.createElement("span", { className: "ta-tabbar-icon" },
|
|
270
262
|
item.double ? React.createElement(ta_avatar_1.DinoFace, { size: 24, className: "ta-nav-face" }) : React.createElement(Glyph, { size: 22, strokeWidth: active ? 2 : 1.6 }),
|
|
271
|
-
item.asks ? React.createElement(asks_badge_1.AsksBadge, { count: item.asks }) : item.unseen && React.createElement(unseen_drop_1.UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: item.onSeeAll })),
|
|
263
|
+
item.asks ? (React.createElement(asks_badge_1.AsksBadge, { count: item.asks, onDismiss: item.onSeeAll })) : (item.unseen && React.createElement(unseen_drop_1.UnseenDrop, { label: t('ta.chat.unseen'), onDismiss: item.onSeeAll }))),
|
|
272
264
|
React.createElement("span", null, item.label)));
|
|
273
265
|
}),
|
|
274
266
|
menu));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ComposerAction } from './composer-box';
|
|
2
|
+
import type { ComposerAction } from './composer-box-protocol';
|
|
3
3
|
export declare namespace PlusMenuUtil {
|
|
4
4
|
/** Tiles on a page of the grid: four to a row, two rows, as WeChat's + panel; more go to the next page, which a swipe shows. */
|
|
5
5
|
const COLUMNS = 4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TaRelayFeature, type TaRelayProbe, type TaRelayService, type TaRelayTypeInfo } from '@celljs/ta-protocol';
|
|
1
|
+
import { type TaJoinedDeployment, type TaRelayFeature, type TaRelayProbe, type TaRelayService, type TaRelayTypeInfo } from '@celljs/ta-protocol';
|
|
2
2
|
import { type LucideIcon } from 'lucide-react';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useT } from '../i18n/use-t';
|
|
@@ -11,6 +11,11 @@ export declare namespace RelayServicesUtil {
|
|
|
11
11
|
function serves(service: TaRelayService, feature: TaRelayFeature): boolean;
|
|
12
12
|
/** The icon of a service: the official relay, a relay, a folder, a store by the icon its package gave its type. */
|
|
13
13
|
function icon(service: TaRelayService, types?: readonly TaRelayTypeInfo[]): LucideIcon;
|
|
14
|
+
/** What a deployment is called: its name, else the host of the address it was joined by. */
|
|
15
|
+
function deploymentName(deployment: TaJoinedDeployment): string;
|
|
16
|
+
function host(url: string): string;
|
|
17
|
+
/** A name for the cloud workspace of a deployment's gateway (ta://<name>): its first label, as TaLocation takes it. */
|
|
18
|
+
function cloudName(gateway: string): string;
|
|
14
19
|
function iconNamed(name: string | undefined): LucideIcon;
|
|
15
20
|
/** What a relay shows under its name: where it is, whether it answers, what it keeps. */
|
|
16
21
|
function line(service: TaRelayService, probe: TaRelayProbe | undefined, t: ReturnType<typeof useT>): string;
|
|
@@ -41,6 +41,7 @@ const React = __importStar(require("react"));
|
|
|
41
41
|
const hooks_1 = require("../hooks");
|
|
42
42
|
const use_t_1 = require("../i18n/use-t");
|
|
43
43
|
const icon_1 = require("./icon");
|
|
44
|
+
const remote_hosts_1 = require("./remote-hosts");
|
|
44
45
|
const settings_controls_1 = require("./settings-controls");
|
|
45
46
|
/** The features that go through a relay, in the order the settings list them. */
|
|
46
47
|
const FEATURES = ['devices', 'share', 'rooms', 'sync'];
|
|
@@ -83,6 +84,31 @@ var RelayServicesUtil;
|
|
|
83
84
|
return iconNamed((_a = types.find(each => each.type === service.type)) === null || _a === void 0 ? void 0 : _a.icon);
|
|
84
85
|
}
|
|
85
86
|
RelayServicesUtil.icon = icon;
|
|
87
|
+
/** What a deployment is called: its name, else the host of the address it was joined by. */
|
|
88
|
+
function deploymentName(deployment) {
|
|
89
|
+
var _a;
|
|
90
|
+
return (_a = deployment.name) !== null && _a !== void 0 ? _a : host(deployment.url);
|
|
91
|
+
}
|
|
92
|
+
RelayServicesUtil.deploymentName = deploymentName;
|
|
93
|
+
function host(url) {
|
|
94
|
+
try {
|
|
95
|
+
return new URL(url).host;
|
|
96
|
+
}
|
|
97
|
+
catch (_a) {
|
|
98
|
+
return url;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
RelayServicesUtil.host = host;
|
|
102
|
+
/** A name for the cloud workspace of a deployment's gateway (ta://<name>): its first label, as TaLocation takes it. */
|
|
103
|
+
function cloudName(gateway) {
|
|
104
|
+
var _a;
|
|
105
|
+
const first = ((_a = host(gateway).split(/[.:]/)[0]) !== null && _a !== void 0 ? _a : '')
|
|
106
|
+
.toLowerCase()
|
|
107
|
+
.replace(/[^a-z0-9-]+/g, '-')
|
|
108
|
+
.replace(/^-+|-+$/g, '');
|
|
109
|
+
return /^[a-z0-9]/.test(first) ? first.slice(0, 40) : 'cloud';
|
|
110
|
+
}
|
|
111
|
+
RelayServicesUtil.cloudName = cloudName;
|
|
86
112
|
function iconNamed(name) {
|
|
87
113
|
return name === 'Database' ? lucide_react_1.Database : name === 'GitBranch' ? lucide_react_1.GitBranch : name === 'HardDrive' ? lucide_react_1.HardDrive : name === 'Server' ? lucide_react_1.Server : lucide_react_1.Cloud;
|
|
88
114
|
}
|
|
@@ -199,6 +225,14 @@ function RelayServices() {
|
|
|
199
225
|
const used = new Set(Object.values(relays.use));
|
|
200
226
|
const types = (_a = relays.types) !== null && _a !== void 0 ? _a : [];
|
|
201
227
|
return (React.createElement(React.Fragment, null,
|
|
228
|
+
React.createElement(Deployment, { relays: relays, changed: listed => {
|
|
229
|
+
var _a;
|
|
230
|
+
setRelays(listed);
|
|
231
|
+
const id = (_a = listed.deployment) === null || _a === void 0 ? void 0 : _a.relay;
|
|
232
|
+
if (id) {
|
|
233
|
+
void bench.relay.probeRelay(id).then(probe => setProbes(before => ({ ...before, [id]: probe })));
|
|
234
|
+
}
|
|
235
|
+
} }),
|
|
202
236
|
relays.error && React.createElement(settings_controls_1.Row, { label: t('ta.relays.broken'), description: relays.error }),
|
|
203
237
|
FEATURES.map(feature => { var _a; return (React.createElement(settings_controls_1.Row, { key: feature, label: t(`ta.relays.feature.${feature}`), description: t(`ta.relays.feature.${feature}Hint`) },
|
|
204
238
|
React.createElement("select", { className: "ta-input ta-select", "aria-label": t(`ta.relays.feature.${feature}`), disabled: busy !== undefined, value: (_a = relays.use[feature]) !== null && _a !== void 0 ? _a : '', onChange: event => void run(feature, async () => setRelays(await bench.relay.chooseRelay(feature, event.target.value || null))) }, relays.relays
|
|
@@ -232,6 +266,79 @@ function RelayServices() {
|
|
|
232
266
|
t('ta.relays.addButton')))),
|
|
233
267
|
React.createElement(settings_controls_1.Row, { icon: lucide_react_1.FileJson, label: t('ta.relays.file'), description: React.createElement("span", { className: "ta-path" }, relays.file) })));
|
|
234
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* A deployment of Ta, inside a company or outside it (docs/design/ta-deploy.md 8): joined by the address of any of its
|
|
271
|
+
* services, its relay is the default of what is new, and its gateway gives a Ta in the cloud to open, or its sandbox as a
|
|
272
|
+
* cloud workspace here. Joined, it shows what it is and how to leave it.
|
|
273
|
+
*/
|
|
274
|
+
function Deployment({ relays, changed }) {
|
|
275
|
+
const t = (0, use_t_1.useT)();
|
|
276
|
+
const [, bench] = (0, hooks_1.useWorkbench)();
|
|
277
|
+
const [, notices] = (0, hooks_1.useNotices)();
|
|
278
|
+
const [url, setUrl] = React.useState('');
|
|
279
|
+
const [busy, setBusy] = React.useState(false);
|
|
280
|
+
const [clouds, setClouds] = React.useState();
|
|
281
|
+
const joined = relays.deployment;
|
|
282
|
+
const gateway = joined === null || joined === void 0 ? void 0 : joined.gateway;
|
|
283
|
+
const readClouds = React.useCallback(async () => {
|
|
284
|
+
const hosts = await bench.remote.listHosts();
|
|
285
|
+
setClouds(hosts.filter(host => host.source === 'cloud' && host.url).map(host => host.url));
|
|
286
|
+
}, [bench]);
|
|
287
|
+
React.useEffect(() => {
|
|
288
|
+
if (gateway) {
|
|
289
|
+
readClouds().catch(() => setClouds([]));
|
|
290
|
+
}
|
|
291
|
+
}, [gateway, readClouds]);
|
|
292
|
+
const act = async (action) => {
|
|
293
|
+
setBusy(true);
|
|
294
|
+
try {
|
|
295
|
+
const listed = await action();
|
|
296
|
+
changed(listed);
|
|
297
|
+
return listed;
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
notices.error(error);
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
303
|
+
finally {
|
|
304
|
+
setBusy(false);
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
if (!joined) {
|
|
308
|
+
return (React.createElement(settings_controls_1.Row, { label: t('ta.deploy.join'), description: t('ta.deploy.joinHint'), stacked: true },
|
|
309
|
+
React.createElement("form", { className: "ta-trusted-add", onSubmit: event => {
|
|
310
|
+
event.preventDefault();
|
|
311
|
+
void act(() => bench.relay.joinDeployment(url.trim())).then(listed => {
|
|
312
|
+
if (listed === null || listed === void 0 ? void 0 : listed.deployment) {
|
|
313
|
+
setUrl('');
|
|
314
|
+
notices.notify(t('ta.deploy.joined', { name: RelayServicesUtil.deploymentName(listed.deployment) }), { level: 'success' });
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
} },
|
|
318
|
+
React.createElement("input", { className: "ta-input", value: url, type: "url", inputMode: "url", placeholder: "https://ta.example.com", "aria-label": t('ta.deploy.join'), spellCheck: false, autoCapitalize: "off", onChange: event => setUrl(event.target.value) }),
|
|
319
|
+
React.createElement("button", { type: "submit", className: `ta-button${busy ? ' ta-busy' : ''}`, disabled: !url.trim() || busy },
|
|
320
|
+
busy && React.createElement("span", { className: "ta-spinner ta-busy-mark" }),
|
|
321
|
+
React.createElement("span", null, t('ta.deploy.joinButton'))))));
|
|
322
|
+
}
|
|
323
|
+
const relay = relays.relays.find(each => each.id === joined.relay);
|
|
324
|
+
const parts = [
|
|
325
|
+
(relay === null || relay === void 0 ? void 0 : relay.url) ? t('ta.deploy.relay', { host: RelayServicesUtil.host(relay.url) }) : undefined,
|
|
326
|
+
gateway ? t('ta.deploy.gateway', { host: RelayServicesUtil.host(gateway) }) : undefined,
|
|
327
|
+
].filter(Boolean);
|
|
328
|
+
const added = gateway && (clouds === null || clouds === void 0 ? void 0 : clouds.some(each => RelayServicesUtil.host(each) === RelayServicesUtil.host(gateway)));
|
|
329
|
+
return (React.createElement(React.Fragment, null,
|
|
330
|
+
React.createElement(settings_controls_1.Row, { icon: lucide_react_1.Building2, label: RelayServicesUtil.deploymentName(joined), description: [t('ta.deploy.joinedLine'), ...parts].join(' · ') },
|
|
331
|
+
React.createElement("button", { type: "button", className: `ta-button${busy ? ' ta-busy' : ''}`, disabled: busy, onClick: () => void act(() => bench.relay.leaveDeployment()) },
|
|
332
|
+
busy && React.createElement("span", { className: "ta-spinner ta-busy-mark" }),
|
|
333
|
+
React.createElement("span", null, t('ta.deploy.leave')))),
|
|
334
|
+
gateway && (React.createElement(settings_controls_1.Row, { label: t('ta.deploy.cloud'), description: added ? t('ta.deploy.cloudAdded') : t('ta.deploy.cloudHint'), stacked: true },
|
|
335
|
+
React.createElement("div", { className: "ta-deploy-cloud" },
|
|
336
|
+
React.createElement("a", { className: "ta-button", href: gateway, target: "_blank", rel: "noreferrer noopener" },
|
|
337
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.ExternalLink, size: 14 }),
|
|
338
|
+
" ",
|
|
339
|
+
t('ta.deploy.open')),
|
|
340
|
+
clouds && !added && React.createElement(remote_hosts_1.AddCloudHost, { url: gateway, name: RelayServicesUtil.cloudName(gateway), onAdded: readClouds }))))));
|
|
341
|
+
}
|
|
235
342
|
/**
|
|
236
343
|
* The form of a type of service a package registered (WebDAV, S3, git): its fields as the package said, secrets as
|
|
237
344
|
* passwords, and a name. Ta tries the store before it adds it; then sync goes there.
|
|
@@ -37,6 +37,7 @@ exports.RelayDialog = RelayDialog;
|
|
|
37
37
|
const lucide_react_1 = require("lucide-react");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const react_dom_1 = require("react-dom");
|
|
40
|
+
const back_stack_1 = require("../device/back-stack");
|
|
40
41
|
const hooks_1 = require("../hooks");
|
|
41
42
|
const use_t_1 = require("../i18n/use-t");
|
|
42
43
|
const busy_1 = require("./busy");
|
|
@@ -79,6 +80,7 @@ function RelayDialog({ onClose }) {
|
|
|
79
80
|
const timer = setInterval(load, 3000);
|
|
80
81
|
return () => clearInterval(timer);
|
|
81
82
|
}, [load]);
|
|
83
|
+
(0, back_stack_1.useBackLayer)(true, onClose);
|
|
82
84
|
React.useEffect(() => {
|
|
83
85
|
const onKey = (event) => event.key === 'Escape' && onClose();
|
|
84
86
|
document.addEventListener('keydown', onKey);
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A cloud workspace to add: the address of a Ta gateway (or Ta service), a token of one's account there, and a name for
|
|
4
|
+
* its directories, `ta://<name>/…`. Checked by connecting before it is kept. A deployment joined (RelayServices) opens
|
|
5
|
+
* it with the address of its gateway and a name filled in.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AddCloudHost({ onAdded, url: givenUrl, name: givenName }: {
|
|
8
|
+
onAdded(): Promise<unknown>;
|
|
9
|
+
url?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
}): React.JSX.Element;
|
|
2
12
|
/**
|
|
3
13
|
* The machines conversations can work on (`ssh://` directories): those of ~/.ssh/config and those added,
|
|
4
14
|
* whether Ta is connected to each, and the ports forwarded from them. Connecting checks a host the way a
|