@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,4 +1,4 @@
|
|
|
1
|
-
import { type TaLanguage } from '@celljs/ta-protocol';
|
|
1
|
+
import { type TaDelegateLevel, type TaLanguage } from '@celljs/ta-protocol';
|
|
2
2
|
import type { StateSpec } from '../state/state-protocol.js';
|
|
3
3
|
import { type NavigationSetting } from './navigation.js';
|
|
4
4
|
export declare const TaSettings: unique symbol;
|
|
@@ -27,12 +27,16 @@ export interface Settings {
|
|
|
27
27
|
speak: boolean;
|
|
28
28
|
/** Said to the double by voice (a finger held to talk), its answer is read aloud, even with `speak` off. */
|
|
29
29
|
speakTalk: boolean;
|
|
30
|
+
/** A call shows captions in the line of its bar: what the user says and the sentence read. Off at first: room is dear. */
|
|
31
|
+
callCaptions: boolean;
|
|
30
32
|
/** The voice replies are read with (its `voiceURI`), `''` for the most natural of the language (Voice.pick). */
|
|
31
33
|
voice: string;
|
|
32
34
|
/** The double asks before it hands out work: it says what it would start and waits for the user's go. */
|
|
33
35
|
confirmTasks: boolean;
|
|
34
36
|
/** How many of the double's tasks run at once; 0, as many as it starts. */
|
|
35
37
|
maxTasks: number;
|
|
38
|
+
/** How much of the work the double hands out to tasks rather than doing it itself (TaDelegateUtil). */
|
|
39
|
+
delegate: TaDelegateLevel;
|
|
36
40
|
/**
|
|
37
41
|
* The model of the double (`<provider>/<model id>`), `''` for that of the settings. It hands out work with
|
|
38
42
|
* tools: an external agent, which works with its own, can do the tasks (`taskModel`) but not be the double.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TaLanguageUtil } from '@celljs/ta-protocol';
|
|
1
|
+
import { TA_WEB_SETTINGS_DATA, TaDelegateUtil, TaLanguageUtil } from '@celljs/ta-protocol';
|
|
2
2
|
import { DEFAULT_NAVIGATION, NavigationUtil } from './navigation.js';
|
|
3
3
|
export const TaSettings = Symbol('TaSettings');
|
|
4
4
|
/** What each size multiplies the font sizes of the styles by (`--ta-font-scale`, see style/base.ts). */
|
|
@@ -23,9 +23,11 @@ export const DEFAULT_SETTINGS = {
|
|
|
23
23
|
chatFontSize: 'standard',
|
|
24
24
|
speak: false,
|
|
25
25
|
speakTalk: false,
|
|
26
|
+
callCaptions: false,
|
|
26
27
|
voice: '',
|
|
27
28
|
confirmTasks: false,
|
|
28
29
|
maxTasks: 0,
|
|
30
|
+
delegate: TaDelegateUtil.DEFAULT,
|
|
29
31
|
assistantModel: '',
|
|
30
32
|
taskModel: '',
|
|
31
33
|
reduceMotion: false,
|
|
@@ -66,9 +68,11 @@ export var SettingsUtil;
|
|
|
66
68
|
chatFontSize: fontSize(kept.chatFontSize),
|
|
67
69
|
speak: kept.speak === true,
|
|
68
70
|
speakTalk: kept.speakTalk === true,
|
|
71
|
+
callCaptions: kept.callCaptions === true,
|
|
69
72
|
voice: typeof kept.voice === 'string' ? kept.voice : '',
|
|
70
73
|
confirmTasks: kept.confirmTasks === true,
|
|
71
74
|
maxTasks: choice(kept.maxTasks, MAX_TASKS_CHOICES, DEFAULT_SETTINGS.maxTasks),
|
|
75
|
+
delegate: TaDelegateUtil.parse(kept.delegate),
|
|
72
76
|
assistantModel: modelRef(kept.assistantModel),
|
|
73
77
|
taskModel: modelRef(kept.taskModel),
|
|
74
78
|
reduceMotion: kept.reduceMotion === true,
|
|
@@ -82,7 +86,7 @@ export var SettingsUtil;
|
|
|
82
86
|
};
|
|
83
87
|
}
|
|
84
88
|
SettingsUtil.parse = parse;
|
|
85
|
-
SettingsUtil.STATE = { key:
|
|
89
|
+
SettingsUtil.STATE = { key: TA_WEB_SETTINGS_DATA.key, tier: 'user', initial: DEFAULT_SETTINGS, parse };
|
|
86
90
|
function theme(setting, prefersDark) {
|
|
87
91
|
return setting === 'system' ? (prefersDark ? 'dark' : 'light') : setting;
|
|
88
92
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { WebCodeRendererProps, WebToolRendererResolver } from '../extension/web-api-contributions.js';
|
|
3
|
+
import type { WebCustomMessage, WebExtensionAPI } from '../extension/web-extension-api.js';
|
|
4
|
+
import type { TaSettings } from '../settings/settings-protocol.js';
|
|
5
|
+
/** What the web extensions that draw in conversations registered: by language, by type of message, for tools. */
|
|
6
|
+
export interface SharedRenderers {
|
|
7
|
+
codeRenderers: Record<string, React.ComponentType<WebCodeRendererProps>>;
|
|
8
|
+
renderers: Record<string, React.ComponentType<{
|
|
9
|
+
message: WebCustomMessage;
|
|
10
|
+
}>>;
|
|
11
|
+
toolRenderers: WebToolRendererResolver[];
|
|
12
|
+
}
|
|
13
|
+
/** One web extension of the page that draws in conversations (`ext/index.json`, laid out by apps/ta's assemble.ts). */
|
|
14
|
+
export interface SharedExtensionEntry {
|
|
15
|
+
name: string;
|
|
16
|
+
file: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The web extensions that draw in conversations, for a conversation shared by a link (docs/design/ta-link.md 2.6):
|
|
20
|
+
* the built-in packages that say so (`pi.shares`) lie next to the page, `ext/<name>.js`. They start with an API
|
|
21
|
+
* that only draws: what they register to draw a conversation is kept; anything else they reach for does nothing,
|
|
22
|
+
* so that a page of a relay, with no Ta behind it, reads nothing and acts for no one.
|
|
23
|
+
*/
|
|
24
|
+
export declare namespace SharedExtensions {
|
|
25
|
+
const INDEX = "ext/index.json";
|
|
26
|
+
/** Loaded and started, each on its own: one that fails leaves the others. */
|
|
27
|
+
function load(settings: TaSettings, base?: string): Promise<SharedRenderers>;
|
|
28
|
+
function drawingApi(drawn: SharedRenderers, settings: TaSettings): WebExtensionAPI;
|
|
29
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useBusy } from '../components/busy.js';
|
|
3
|
+
import { ConversationView } from '../components/conversation-view.js';
|
|
4
|
+
import { EmptyState } from '../components/empty-state.js';
|
|
5
|
+
import { Face, GroupFace } from '../components/face.js';
|
|
6
|
+
import { FullScreen } from '../components/full-screen.js';
|
|
7
|
+
import { ImageViewer } from '../components/image-viewer.js';
|
|
8
|
+
import { ListSkeleton } from '../components/list-skeleton.js';
|
|
9
|
+
import { Markdown } from '../components/markdown.js';
|
|
10
|
+
import { PhoneStack } from '../components/phone-shell.js';
|
|
11
|
+
import { Picture, PictureCards } from '../components/picture.js';
|
|
12
|
+
import { QrView } from '../components/qr-view.js';
|
|
13
|
+
import { Switch } from '../components/settings-controls.js';
|
|
14
|
+
import { TaAvatar } from '../components/ta-avatar.js';
|
|
15
|
+
import { WebDialog } from '../components/web-dialog.js';
|
|
16
|
+
import { useDevice } from '../device/device.js';
|
|
17
|
+
import { WEB_ICONS } from '../extension/icons.js';
|
|
18
|
+
import { Game3DView, GameView } from '../game/game-view.js';
|
|
19
|
+
/**
|
|
20
|
+
* The web extensions that draw in conversations, for a conversation shared by a link (docs/design/ta-link.md 2.6):
|
|
21
|
+
* the built-in packages that say so (`pi.shares`) lie next to the page, `ext/<name>.js`. They start with an API
|
|
22
|
+
* that only draws: what they register to draw a conversation is kept; anything else they reach for does nothing,
|
|
23
|
+
* so that a page of a relay, with no Ta behind it, reads nothing and acts for no one.
|
|
24
|
+
*/
|
|
25
|
+
export var SharedExtensions;
|
|
26
|
+
(function (SharedExtensions) {
|
|
27
|
+
SharedExtensions.INDEX = 'ext/index.json';
|
|
28
|
+
/** Loaded and started, each on its own: one that fails leaves the others. */
|
|
29
|
+
async function load(settings, base = document.baseURI) {
|
|
30
|
+
const drawn = { codeRenderers: {}, renderers: {}, toolRenderers: [] };
|
|
31
|
+
let entries = [];
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(new URL(SharedExtensions.INDEX, base), { cache: 'no-cache' });
|
|
34
|
+
entries = response.ok ? (await response.json()) : [];
|
|
35
|
+
}
|
|
36
|
+
catch (_a) {
|
|
37
|
+
return drawn;
|
|
38
|
+
}
|
|
39
|
+
const api = drawingApi(drawn, settings);
|
|
40
|
+
await Promise.all((Array.isArray(entries) ? entries : []).map(async (entry) => {
|
|
41
|
+
var _a;
|
|
42
|
+
try {
|
|
43
|
+
const module = (await import(/* @vite-ignore */ new URL(entry.file, base).href));
|
|
44
|
+
(_a = module.default) === null || _a === void 0 ? void 0 : _a.call(module, api);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.warn(`The web extension ${entry.name} does not draw here:`, error);
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
return drawn;
|
|
51
|
+
}
|
|
52
|
+
SharedExtensions.load = load;
|
|
53
|
+
/** What a call of what is not given answers: it never comes, so that what waits for it waits on. */
|
|
54
|
+
const NEVER = new Promise(() => undefined);
|
|
55
|
+
/** Whatever is reached for and not given: each of its fields is again, and a call of it answers NEVER. */
|
|
56
|
+
const NOTHING = new Proxy(() => undefined, {
|
|
57
|
+
get: (_target, key) => (typeof key === 'symbol' || key === 'then' ? undefined : NOTHING),
|
|
58
|
+
apply: () => NEVER,
|
|
59
|
+
});
|
|
60
|
+
function orNothing(given) {
|
|
61
|
+
return new Proxy(given, {
|
|
62
|
+
get: (target, key, receiver) => key in target ? Reflect.get(target, key, receiver) : typeof key === 'symbol' || key === 'then' ? undefined : NOTHING,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function drawingApi(drawn, settings) {
|
|
66
|
+
const refuse = () => Promise.reject(new Error('A shared conversation is only read.'));
|
|
67
|
+
const games = new SharedGames(settings);
|
|
68
|
+
const ui = {
|
|
69
|
+
notify: () => undefined,
|
|
70
|
+
get theme() {
|
|
71
|
+
return settings.state.theme;
|
|
72
|
+
},
|
|
73
|
+
get language() {
|
|
74
|
+
return settings.state.language;
|
|
75
|
+
},
|
|
76
|
+
supportsWebview: false,
|
|
77
|
+
icons: WEB_ICONS,
|
|
78
|
+
Markdown,
|
|
79
|
+
Conversation: ConversationView,
|
|
80
|
+
Avatar: TaAvatar,
|
|
81
|
+
Game: games.game,
|
|
82
|
+
Game3D: games.game3d,
|
|
83
|
+
FullScreen,
|
|
84
|
+
Stack: PhoneStack,
|
|
85
|
+
Face,
|
|
86
|
+
GroupFace,
|
|
87
|
+
Picture,
|
|
88
|
+
PictureCards,
|
|
89
|
+
ImageViewer,
|
|
90
|
+
QrCode: QrView,
|
|
91
|
+
Dialog: WebDialog,
|
|
92
|
+
Switch,
|
|
93
|
+
Empty: EmptyState,
|
|
94
|
+
Skeleton: ListSkeleton,
|
|
95
|
+
useBusy,
|
|
96
|
+
useDevice,
|
|
97
|
+
useCwd: () => '.',
|
|
98
|
+
useSessionId: () => undefined,
|
|
99
|
+
useSessions: () => [],
|
|
100
|
+
useSavedSessions: () => [],
|
|
101
|
+
useAsks: () => [],
|
|
102
|
+
useTasks: () => [],
|
|
103
|
+
useHomeItems: () => [],
|
|
104
|
+
confirm: () => Promise.resolve(false),
|
|
105
|
+
input: () => Promise.resolve(undefined),
|
|
106
|
+
editor: () => Promise.resolve(undefined),
|
|
107
|
+
};
|
|
108
|
+
const api = {
|
|
109
|
+
React,
|
|
110
|
+
ui: orNothing(ui),
|
|
111
|
+
registerCodeRenderer: (language, renderer) => {
|
|
112
|
+
drawn.codeRenderers[language.trim().toLowerCase()] = renderer;
|
|
113
|
+
},
|
|
114
|
+
registerMessageRenderer: (type, renderer) => {
|
|
115
|
+
drawn.renderers[type] = renderer;
|
|
116
|
+
},
|
|
117
|
+
registerToolRenderer: (resolver) => {
|
|
118
|
+
drawn.toolRenderers.push(resolver);
|
|
119
|
+
},
|
|
120
|
+
on: () => undefined,
|
|
121
|
+
sendUserMessage: refuse,
|
|
122
|
+
switchSession: refuse,
|
|
123
|
+
openChat: () => Promise.resolve(false),
|
|
124
|
+
openLink: (url) => {
|
|
125
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
126
|
+
return Promise.resolve();
|
|
127
|
+
},
|
|
128
|
+
callHost: refuse,
|
|
129
|
+
fileUrl: refuse,
|
|
130
|
+
reloadExtensions: () => Promise.resolve(),
|
|
131
|
+
openTemporary: refuse,
|
|
132
|
+
};
|
|
133
|
+
return orNothing(api);
|
|
134
|
+
}
|
|
135
|
+
SharedExtensions.drawingApi = drawingApi;
|
|
136
|
+
})(SharedExtensions || (SharedExtensions = {}));
|
|
137
|
+
/** The games of the page in the theme of the settings, a component made once for each API (as WebExtensionContext does). */
|
|
138
|
+
class SharedGames {
|
|
139
|
+
constructor(settings) {
|
|
140
|
+
this.settings = settings;
|
|
141
|
+
this.game = (props) => React.createElement(GameView, { ...props, settings: this.settings });
|
|
142
|
+
this.game3d = (props) => React.createElement(Game3DView, { ...props, settings: this.settings });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=shared-extensions.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type RelayContentItem, type RelayContentLink, type RelayConversation } from '@celljs/ta-relay';
|
|
2
|
+
/**
|
|
3
|
+
* A conversation shared by a link, opened in a browser (docs/design/ta-link.md 2.6): the viewer of the relay
|
|
4
|
+
* (`/s`) opens it and hands it to this page of the same relay, which draws it as Ta does, with the cards, plots
|
|
5
|
+
* and 3D of the built-in extensions; no Ta is behind it, nothing is signed in, nothing acts.
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace SharedPageUtil {
|
|
8
|
+
/** The link the address of this page holds in its fragment (`#v=1&h=…&s=…`), as the viewer of the relay has it. */
|
|
9
|
+
function link(href?: string): RelayContentLink | undefined;
|
|
10
|
+
function conversation(item: RelayContentItem): RelayConversation | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RELAY_CONTENT_PATH, RELAY_CONVERSATION_KIND } from '@celljs/ta-relay';
|
|
2
|
+
import { RelayContentUtil } from '@celljs/ta-relay/lib/common/relay-content';
|
|
3
|
+
/**
|
|
4
|
+
* A conversation shared by a link, opened in a browser (docs/design/ta-link.md 2.6): the viewer of the relay
|
|
5
|
+
* (`/s`) opens it and hands it to this page of the same relay, which draws it as Ta does, with the cards, plots
|
|
6
|
+
* and 3D of the built-in extensions; no Ta is behind it, nothing is signed in, nothing acts.
|
|
7
|
+
*/
|
|
8
|
+
export var SharedPageUtil;
|
|
9
|
+
(function (SharedPageUtil) {
|
|
10
|
+
/** The link the address of this page holds in its fragment (`#v=1&h=…&s=…`), as the viewer of the relay has it. */
|
|
11
|
+
function link(href = location.href) {
|
|
12
|
+
const url = new URL(href);
|
|
13
|
+
const fragment = new URLSearchParams(url.hash.slice(1));
|
|
14
|
+
if (fragment.get('v') !== '1' || !fragment.get('s')) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
return RelayContentUtil.parse(`${url.origin}${RELAY_CONTENT_PATH}${url.hash}`);
|
|
19
|
+
}
|
|
20
|
+
catch (_a) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
SharedPageUtil.link = link;
|
|
25
|
+
function conversation(item) {
|
|
26
|
+
if (item.kind !== RELAY_CONVERSATION_KIND) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return JSON.parse(new TextDecoder().decode(item.data));
|
|
31
|
+
}
|
|
32
|
+
catch (_a) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
SharedPageUtil.conversation = conversation;
|
|
37
|
+
})(SharedPageUtil || (SharedPageUtil = {}));
|
|
38
|
+
//# sourceMappingURL=shared-link.js.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { RELAY_CONTENT_PATH } from '@celljs/ta-relay';
|
|
2
|
+
import { RelayContentError, RelayContentHandoff, RelayContentUtil } from '@celljs/ta-relay/lib/common/relay-content';
|
|
3
|
+
import { Check, Link2 } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ConversationView } from '../components/conversation-view.js';
|
|
6
|
+
import { Dino, dinoFavicon } from '../components/dino.js';
|
|
7
|
+
import { Icon } from '../components/icon.js';
|
|
8
|
+
import { Device } from '../device/device.js';
|
|
9
|
+
import { MessageRenderers, ToolRenderers } from '../extension/extension-view.js';
|
|
10
|
+
import { useSettings } from '../hooks.js';
|
|
11
|
+
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
12
|
+
import { CodeRenderers } from '../markdown/code-renderers.js';
|
|
13
|
+
import { STYLE } from '../style.js';
|
|
14
|
+
import { SharedExtensions } from './shared-extensions.js';
|
|
15
|
+
import { SharedPageUtil } from './shared-link.js';
|
|
16
|
+
/** What the viewer handed over, or else what the link opens without a password; one with a password goes back to the viewer. */
|
|
17
|
+
function useShared(link) {
|
|
18
|
+
const [shown, setShown] = React.useState({ step: 'loading' });
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
let live = true;
|
|
21
|
+
const kept = RelayContentHandoff.take(link.share);
|
|
22
|
+
const show = (item) => {
|
|
23
|
+
const conversation = SharedPageUtil.conversation(item);
|
|
24
|
+
if (!conversation) {
|
|
25
|
+
// Not a conversation: the viewer shows it.
|
|
26
|
+
location.replace(`${RELAY_CONTENT_PATH}?plain${location.hash}`);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
setShown({ step: 'shown', item, conversation });
|
|
30
|
+
};
|
|
31
|
+
if (kept.item) {
|
|
32
|
+
show(kept.item);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (link.access !== 'link' && kept.password === undefined) {
|
|
36
|
+
location.replace(`${RELAY_CONTENT_PATH}${location.hash}`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
RelayContentUtil.fetch(link, { password: kept.password }).then(item => live && show(item), (error) => {
|
|
40
|
+
if (live) {
|
|
41
|
+
console.warn(error instanceof RelayContentError ? error.reason : error);
|
|
42
|
+
setShown({ step: 'failed' });
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
live = false;
|
|
47
|
+
};
|
|
48
|
+
}, [link]);
|
|
49
|
+
return shown;
|
|
50
|
+
}
|
|
51
|
+
/** The styles, title and icon of the page, its theme and language those of this browser. */
|
|
52
|
+
function useSharedDocument(title) {
|
|
53
|
+
useSettings();
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
const style = document.createElement('style');
|
|
56
|
+
style.textContent = STYLE;
|
|
57
|
+
document.head.appendChild(style);
|
|
58
|
+
const icon = document.createElement('link');
|
|
59
|
+
icon.rel = 'icon';
|
|
60
|
+
icon.href = dinoFavicon();
|
|
61
|
+
document.head.appendChild(icon);
|
|
62
|
+
Device.start();
|
|
63
|
+
return () => {
|
|
64
|
+
style.remove();
|
|
65
|
+
icon.remove();
|
|
66
|
+
};
|
|
67
|
+
}, []);
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
document.title = title ? `${title} · Ta` : 'Ta';
|
|
70
|
+
}, [title]);
|
|
71
|
+
}
|
|
72
|
+
function useRenderers() {
|
|
73
|
+
const [, settings] = useSettings();
|
|
74
|
+
const [drawn, setDrawn] = React.useState();
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
let live = true;
|
|
77
|
+
void SharedExtensions.load(settings).then(found => live && setDrawn(found));
|
|
78
|
+
return () => {
|
|
79
|
+
live = false;
|
|
80
|
+
};
|
|
81
|
+
}, [settings]);
|
|
82
|
+
return drawn;
|
|
83
|
+
}
|
|
84
|
+
function CopyLink() {
|
|
85
|
+
const t = useT();
|
|
86
|
+
const [copied, setCopied] = React.useState(false);
|
|
87
|
+
return (React.createElement("button", { type: "button", className: "ta-button ta-shared-copy", onClick: () => { var _a; return void ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(`${location.origin}${RELAY_CONTENT_PATH}${location.hash}`).then(() => {
|
|
88
|
+
setCopied(true);
|
|
89
|
+
setTimeout(() => setCopied(false), 1600);
|
|
90
|
+
})); } },
|
|
91
|
+
React.createElement(Icon, { icon: copied ? Check : Link2, size: 14 }),
|
|
92
|
+
t(copied ? 'ta.shared.copied' : 'ta.shared.copy')));
|
|
93
|
+
}
|
|
94
|
+
function Notes({ conversation }) {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
const t = useT();
|
|
97
|
+
const notes = [
|
|
98
|
+
((_a = conversation.omitted) === null || _a === void 0 ? void 0 : _a.outputs) ? t('ta.shared.outputsOmitted') : '',
|
|
99
|
+
((_b = conversation.omitted) === null || _b === void 0 ? void 0 : _b.images) ? t('ta.shared.imagesOmitted', { n: conversation.omitted.images }) : '',
|
|
100
|
+
conversation.redacted ? t('ta.shared.redacted', { n: conversation.redacted }) : '',
|
|
101
|
+
].filter(Boolean);
|
|
102
|
+
return notes.length ? (React.createElement("div", { className: "ta-shared-notes" }, notes.map(note => (React.createElement("span", { key: note }, note))))) : null;
|
|
103
|
+
}
|
|
104
|
+
export function SharedPage({ link }) {
|
|
105
|
+
var _a;
|
|
106
|
+
const t = useT();
|
|
107
|
+
const language = useLanguage();
|
|
108
|
+
const shown = useShared(link);
|
|
109
|
+
const drawn = useRenderers();
|
|
110
|
+
const conversation = shown.step === 'shown' ? shown.conversation : undefined;
|
|
111
|
+
const title = (conversation === null || conversation === void 0 ? void 0 : conversation.title) || (shown.step === 'shown' ? shown.item.title : '');
|
|
112
|
+
useSharedDocument(title);
|
|
113
|
+
const date = shown.step === 'shown' ? new Intl.DateTimeFormat(language, { dateStyle: 'medium', timeStyle: 'short' }).format(shown.item.createdAt) : '';
|
|
114
|
+
const count = (_a = conversation === null || conversation === void 0 ? void 0 : conversation.messages.filter(message => message.role === 'user' || message.role === 'assistant').length) !== null && _a !== void 0 ? _a : 0;
|
|
115
|
+
return (React.createElement("div", { className: "ta-shared" },
|
|
116
|
+
React.createElement("header", { className: "ta-shared-top" },
|
|
117
|
+
React.createElement(Dino, { size: 24 }),
|
|
118
|
+
React.createElement("span", { className: "ta-shared-name" }, title || 'Ta'),
|
|
119
|
+
React.createElement(CopyLink, null)),
|
|
120
|
+
React.createElement("main", { className: "ta-scroll ta-conversation ta-shared-main" },
|
|
121
|
+
shown.step === 'failed' && React.createElement("div", { className: "ta-shared-center ta-muted" }, t('ta.shared.failed')),
|
|
122
|
+
(shown.step === 'loading' || (conversation && !drawn)) && (React.createElement("div", { className: "ta-shared-center" },
|
|
123
|
+
React.createElement("span", { className: "ta-spinner" }))),
|
|
124
|
+
conversation && drawn && (React.createElement(React.Fragment, null,
|
|
125
|
+
React.createElement("div", { className: "ta-shared-head" },
|
|
126
|
+
React.createElement("h1", null, title),
|
|
127
|
+
React.createElement("p", { className: "ta-shared-meta" }, [conversation.place, t('ta.shared.sharedAt', { date }), t('ta.shared.messages', { n: count })].filter(Boolean).map(part => (React.createElement("span", { key: part }, part)))),
|
|
128
|
+
React.createElement(Notes, { conversation: conversation })),
|
|
129
|
+
React.createElement(MessageRenderers.Provider, { value: drawn.renderers },
|
|
130
|
+
React.createElement(CodeRenderers.Provider, { value: drawn.codeRenderers },
|
|
131
|
+
React.createElement(ToolRenderers.Provider, { value: drawn.toolRenderers },
|
|
132
|
+
React.createElement(ConversationView, { messages: conversation.messages, files: conversation.files })))),
|
|
133
|
+
React.createElement("footer", { className: "ta-shared-foot" },
|
|
134
|
+
React.createElement("span", null, t('ta.shared.footer')),
|
|
135
|
+
React.createElement("span", null, t('ta.shared.secure'))))))));
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=shared-page.js.map
|
|
@@ -27,6 +27,20 @@ export interface StateSpec<T> {
|
|
|
27
27
|
* last write wins.
|
|
28
28
|
*/
|
|
29
29
|
merge?(local: T, remote: T): T;
|
|
30
|
+
/**
|
|
31
|
+
* What the page notes by itself rather than what the user does (the conversations seen, the last one shown): Ta's
|
|
32
|
+
* own screen (ScreenUtil.agent) does not write it to the server, so that what it looks at stays unseen for the user.
|
|
33
|
+
*/
|
|
34
|
+
passive?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** What a page reads from another storage and keeps to itself: Ta's own screen over the user's localStorage. */
|
|
37
|
+
export declare class OverlayStorage implements Pick<Storage, 'getItem' | 'setItem' | 'removeItem'> {
|
|
38
|
+
protected readonly base: Pick<Storage, 'getItem'> | undefined;
|
|
39
|
+
protected readonly own: Map<string, string | null>;
|
|
40
|
+
constructor(base: Pick<Storage, 'getItem'> | undefined);
|
|
41
|
+
getItem(key: string): string | null;
|
|
42
|
+
setItem(key: string, value: string): void;
|
|
43
|
+
removeItem(key: string): void;
|
|
30
44
|
}
|
|
31
45
|
/**
|
|
32
46
|
* The values of the page that outlive it, each at its tier. Values are JSON and replaced, never changed in
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
export const TaState = Symbol('TaState');
|
|
2
|
+
/** What a page reads from another storage and keeps to itself: Ta's own screen over the user's localStorage. */
|
|
3
|
+
export class OverlayStorage {
|
|
4
|
+
constructor(base) {
|
|
5
|
+
this.base = base;
|
|
6
|
+
this.own = new Map();
|
|
7
|
+
}
|
|
8
|
+
getItem(key) {
|
|
9
|
+
var _a;
|
|
10
|
+
var _b, _c;
|
|
11
|
+
return this.own.has(key) ? ((_b = this.own.get(key)) !== null && _b !== void 0 ? _b : null) : ((_c = (_a = this.base) === null || _a === void 0 ? void 0 : _a.getItem(key)) !== null && _c !== void 0 ? _c : null);
|
|
12
|
+
}
|
|
13
|
+
setItem(key, value) {
|
|
14
|
+
this.own.set(key, String(value));
|
|
15
|
+
}
|
|
16
|
+
removeItem(key) {
|
|
17
|
+
this.own.set(key, null);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
2
20
|
export var StateUtil;
|
|
3
21
|
(function (StateUtil) {
|
|
4
22
|
/** The name of ta's own data on the server (TaPackageServer.getExtensionData). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TaWorkbench } from '../workbench-protocol.js';
|
|
2
|
-
import { type StateSpec, TaState } from './state-protocol.js';
|
|
2
|
+
import { OverlayStorage, type StateSpec, TaState } from './state-protocol.js';
|
|
3
3
|
interface Slot {
|
|
4
4
|
spec: StateSpec<unknown>;
|
|
5
5
|
value: unknown;
|
|
@@ -21,6 +21,12 @@ export declare class TaStateImpl implements TaState {
|
|
|
21
21
|
protected online: boolean;
|
|
22
22
|
/** The host whose copies of the `user` values the slots hold. */
|
|
23
23
|
protected host?: string;
|
|
24
|
+
/** This page is Ta's own screen (ScreenUtil.agent). */
|
|
25
|
+
protected readonly agent: boolean;
|
|
26
|
+
protected overlays?: {
|
|
27
|
+
tab: OverlayStorage;
|
|
28
|
+
device: OverlayStorage;
|
|
29
|
+
};
|
|
24
30
|
get<T>(spec: StateSpec<T>): T;
|
|
25
31
|
load<T>(spec: StateSpec<T>): Promise<T>;
|
|
26
32
|
set<T>(spec: StateSpec<T>, value: T): void;
|
|
@@ -37,7 +43,9 @@ export declare class TaStateImpl implements TaState {
|
|
|
37
43
|
/** Signed in to another computer in this page: its `user` values, from its copy until its server answers. */
|
|
38
44
|
protected rekey(): void;
|
|
39
45
|
protected isOnline(): boolean;
|
|
40
|
-
|
|
46
|
+
/** Whether a value set here goes to the server: not what Ta's own screen notes by itself (StateSpec.passive). */
|
|
47
|
+
protected keeps(spec: StateSpec<unknown>): boolean;
|
|
48
|
+
protected storage(spec: StateSpec<unknown>): Pick<Storage, 'getItem' | 'setItem' | 'removeItem'> | undefined;
|
|
41
49
|
protected readLocal(spec: StateSpec<unknown>): unknown;
|
|
42
50
|
protected writeLocal(slot: Slot): void;
|
|
43
51
|
protected notify(): void;
|
|
@@ -8,8 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Autowired, Component } from '@celljs/core';
|
|
11
|
+
import { ScreenUtil } from '../screen/screen-protocol.js';
|
|
11
12
|
import { TaWorkbench } from '../workbench-protocol.js';
|
|
12
|
-
import { StateUtil, TaState } from './state-protocol.js';
|
|
13
|
+
import { OverlayStorage, StateUtil, TaState } from './state-protocol.js';
|
|
13
14
|
/** Values set within this time go to the server together. */
|
|
14
15
|
const WRITE_MS = 300;
|
|
15
16
|
let TaStateImpl = class TaStateImpl {
|
|
@@ -19,6 +20,8 @@ let TaStateImpl = class TaStateImpl {
|
|
|
19
20
|
this.listeners = new Set();
|
|
20
21
|
this.watching = false;
|
|
21
22
|
this.online = false;
|
|
23
|
+
/** This page is Ta's own screen (ScreenUtil.agent). */
|
|
24
|
+
this.agent = ScreenUtil.agent();
|
|
22
25
|
}
|
|
23
26
|
get(spec) {
|
|
24
27
|
const slot = this.slot(spec);
|
|
@@ -43,7 +46,7 @@ let TaStateImpl = class TaStateImpl {
|
|
|
43
46
|
slot.value = value;
|
|
44
47
|
slot.version++;
|
|
45
48
|
this.writeLocal(slot);
|
|
46
|
-
if (spec.tier === 'user') {
|
|
49
|
+
if (spec.tier === 'user' && this.keeps(spec)) {
|
|
47
50
|
slot.dirty = true;
|
|
48
51
|
this.schedule();
|
|
49
52
|
}
|
|
@@ -128,7 +131,7 @@ let TaStateImpl = class TaStateImpl {
|
|
|
128
131
|
/** The server's value with this browser's (set here meanwhile too); written back when this browser had more. */
|
|
129
132
|
merged(slot, remote, merge) {
|
|
130
133
|
const value = merge(slot.value, remote);
|
|
131
|
-
if (!StateUtil.same(value, remote)) {
|
|
134
|
+
if (!StateUtil.same(value, remote) && this.keeps(slot.spec)) {
|
|
132
135
|
slot.dirty = true;
|
|
133
136
|
this.schedule();
|
|
134
137
|
}
|
|
@@ -201,7 +204,20 @@ let TaStateImpl = class TaStateImpl {
|
|
|
201
204
|
isOnline() {
|
|
202
205
|
return this.workbench.state.status === 'online';
|
|
203
206
|
}
|
|
207
|
+
/** Whether a value set here goes to the server: not what Ta's own screen notes by itself (StateSpec.passive). */
|
|
208
|
+
keeps(spec) {
|
|
209
|
+
return !(this.agent && spec.passive);
|
|
210
|
+
}
|
|
204
211
|
storage(spec) {
|
|
212
|
+
var _a;
|
|
213
|
+
if (this.agent) {
|
|
214
|
+
// Ta's own screen reads what this browser kept, and keeps what it sets to itself: the user's tab and device stay theirs.
|
|
215
|
+
(_a = this.overlays) !== null && _a !== void 0 ? _a : (this.overlays = {
|
|
216
|
+
tab: new OverlayStorage(undefined),
|
|
217
|
+
device: new OverlayStorage(typeof localStorage === 'undefined' ? undefined : localStorage),
|
|
218
|
+
});
|
|
219
|
+
return spec.tier === 'tab' ? this.overlays.tab : this.overlays.device;
|
|
220
|
+
}
|
|
205
221
|
if (spec.tier === 'tab') {
|
|
206
222
|
return typeof sessionStorage === 'undefined' ? undefined : sessionStorage;
|
|
207
223
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Tokens of the theme, controls, levels. */
|
|
2
|
-
export declare const BASE_STYLE = "\n:root, :root[data-theme='dark'] {\n --ta-main: #141416;\n --ta-side: #1c1c1e;\n --ta-card: #1a1a1c;\n --ta-input: #1a1a1a;\n --ta-raised: #242426;\n --ta-user: #2a2a2d;\n --ta-hover: #2a2a2e;\n --ta-hover-strong: #333338;\n --ta-selected: #2c2c31;\n --ta-chip: #2a2a2e;\n /* The chosen segment of a segmented control, on a track of --ta-raised: above it, lighter in the dark. */\n --ta-segment: #333338;\n --ta-border: #2e2e33;\n --ta-border-muted: #232328;\n --ta-border-field: #3d3d45;\n --ta-border-focus: #8a8a96;\n --ta-text: #e5e5e5;\n --ta-body: #d4d4d6;\n --ta-secondary: #a3a3a3;\n --ta-muted: #7c7c82;\n --ta-brand: #e5e5e5;\n --ta-brand-text: #1a1a1a;\n --ta-accent: #34d399;\n --ta-link: #4dabf7;\n --ta-green: #4ade80;\n --ta-red: #f87171;\n --ta-yellow: #fbbf24;\n --ta-blue: #60a5fa;\n --ta-code: #161618;\n --ta-add: rgba(74, 222, 128, 0.1);\n --ta-remove: rgba(248, 113, 113, 0.1);\n --ta-shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);\n --ta-shadow-composer: 0 12px 32px rgba(0, 0, 0, 0.32);\n --ta-scrollbar: rgba(255, 255, 255, 0.12);\n color-scheme: dark;\n}\n:root[data-theme='light'] {\n --ta-main: #ffffff;\n --ta-side: #f5f5f7;\n --ta-card: #ffffff;\n --ta-input: #ffffff;\n --ta-raised: #f3f3f5;\n --ta-user: #f2f2f2;\n --ta-hover: #ebebf0;\n --ta-hover-strong: #e2e2e8;\n --ta-selected: #e6e6ea;\n --ta-chip: #ececf0;\n --ta-segment: #ffffff;\n --ta-border: #dcdee3;\n --ta-border-muted: #e8eaed;\n --ta-border-field: #c9ccd4;\n --ta-border-focus: #6b6e76;\n --ta-text: #1a1a1a;\n --ta-body: #33363b;\n --ta-secondary: #5c5c5c;\n --ta-muted: #8e8e93;\n --ta-brand: #1a1a1a;\n --ta-brand-text: #ffffff;\n --ta-accent: #10a372;\n --ta-link: #1677ff;\n --ta-green: #16a34a;\n --ta-red: #e5484d;\n --ta-yellow: #d97706;\n --ta-blue: #1677ff;\n --ta-code: #f7f8fa;\n --ta-add: rgba(34, 197, 94, 0.1);\n --ta-remove: rgba(239, 68, 68, 0.08);\n --ta-shadow-pop: 0 16px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);\n --ta-shadow-composer: 0 8px 24px rgba(15, 23, 42, 0.07);\n --ta-scrollbar: rgba(0, 0, 0, 0.14);\n color-scheme: light;\n}\n:root {\n /** The height of the title bar the page draws itself; see .ta-titlebar. */\n --ta-titlebar: 0px;\n --ta-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;\n --ta-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;\n --ta-col: 760px;\n --ta-ease: cubic-bezier(0.2, 0.8, 0.2, 1);\n /* The font sizes of the settings (TaSettingsImpl sets the first two). Every font size in px is written\n calc(13px * var(--ta-font-scale)), line heights in px too: the page's size (more on a phone, see\n style/device.ts), and in a conversation (.ta-conversation: its messages and the field of its message\n box) that of conversations on top of it. */\n --ta-page-font-scale: 1;\n --ta-chat-font-scale: 1;\n --ta-device-font-scale: 1;\n --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale));\n}\n.ta-conversation { --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale) * var(--ta-chat-font-scale)); font-size: calc(14px * var(--ta-font-scale)); }\n* { box-sizing: border-box; }\nhtml, body, #cell-root, #root { height: 100%; margin: 0; }\n/* The page and its scrolling areas do not bounce at the ends. Only scrolling areas of their own: on any\n other element (one with overflow: hidden is a scroll container too) it stops the wheel from reaching\n the area under it, and nothing scrolls while the pointer is over a card or a code block. */\nhtml, body, .ta-scroll, .ta-chat-scroll, .ta-side-scroll, .ta-rail-items, .ta-side-view-body, .ta-editor-body,\n.ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-pick-list, .ta-commands,\n.ta-folder-list, .ta-auth-list { overscroll-behavior: none; }\nbody { background: var(--ta-main); color: var(--ta-text); font: calc(14px * var(--ta-font-scale))/1.6 var(--ta-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }\nbutton, input, select, textarea { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\ncode, pre { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\na { color: var(--ta-link); text-decoration: none; }\n* { scrollbar-width: thin; scrollbar-color: var(--ta-scrollbar) transparent; }\n:focus-visible { outline: 2px solid var(--ta-blue); outline-offset: 1px; }\n.ta-muted { color: var(--ta-muted); }\n.ta-small { font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-path { font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-spacer { flex: 1; }\n.ta-icon { flex: none; }\n.ta-narrow-only { display: none !important; }\n.ta-glass { background: var(--ta-card); border: 1px solid var(--ta-border); }\n\n/* Controls */\n.ta-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ta-border); background: transparent; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; color: var(--ta-text); transition: background 120ms, border-color 120ms; }\n.ta-button:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-button:disabled { opacity: 0.45; cursor: default; }\n.ta-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: 0.88; }\n.ta-danger, .ta-stop { color: var(--ta-red); }\n.ta-quiet { border-color: transparent; color: var(--ta-secondary); }\n.ta-wide { width: 100%; height: 38px; }\n.ta-link { background: none; border: 0; padding: 0; color: var(--ta-link); font-size: calc(12px * var(--ta-font-scale)); display: inline-flex; align-items: center; gap: 4px; }\n/* Buttons that hold an icon, centred in a box of their size: without the padding of the browser, which iOS makes 14px a side, so that the icon sat off centre there. */\n.ta-icon-button, .ta-footer-button, .ta-rail-item, .ta-rail-logo, .ta-send, .ta-mic, .ta-editor-tab-close, .ta-attachment-remove, .ta-account-button, .ta-tool-trailing, .ta-to-bottom { padding: 0; }\n.ta-icon-button { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; border: 0; background: transparent; color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-icon-button:hover:not(:disabled) { background: var(--ta-hover); color: var(--ta-text); }\n.ta-icon-button:disabled { opacity: 0.4; }\n.ta-icon-button.ta-on { color: var(--ta-text); background: var(--ta-hover); }\n.ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: 34px; width: 34px; }\n.ta-badge { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--ta-red); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }\n.ta-input, .ta-field { width: 100%; height: 36px; border: 1px solid var(--ta-border-field); background: var(--ta-input); border-radius: 8px; padding: 0 10px; outline: none; transition: border-color 120ms; }\n.ta-field { display: flex; align-items: center; gap: 8px; color: var(--ta-muted); }\n.ta-field-small { height: 34px; }\n.ta-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-input:focus, .ta-field:focus-within { border-color: var(--ta-border-focus); }\n.ta-editor { height: auto; min-height: 140px; padding: 8px 10px; font-family: var(--ta-mono); resize: vertical; }\n.ta-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n/* Levels: the colour of the icon tells the level; the text stays in the colours of text. */\n.ta-level-info { --ta-level: var(--ta-blue); }\n.ta-level-success { --ta-level: var(--ta-green); }\n.ta-level-warning { --ta-level: var(--ta-yellow); }\n.ta-level-error { --ta-level: var(--ta-red); }\n.ta-level-icon { color: var(--ta-level, var(--ta-muted)); }\n/* In its place: a soft tint of its level, the text in the colours of text. */\n.ta-callout { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; text-align: left; color: var(--ta-body); background: color-mix(in srgb, var(--ta-level) 7%, var(--ta-card)); border: 1px solid color-mix(in srgb, var(--ta-level) 18%, var(--ta-border-muted)); }\n.ta-callout > .ta-level-icon { margin-top: 2px; }\n.ta-callout-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-callout-message { white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-callout-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-empty .ta-callout { max-width: min(520px, 100%); }\n.ta-spinner { width: 13px; height: 13px; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite; flex: none; display: inline-block; }\n/*\n * Busy (components/busy.tsx): what waits on something slow says so only once it took a moment (--ta-busy-delay),\n * so that what is quick does not flash, and takes no second click meanwhile. ta-busy a button or an icon\n * button, its spinner (ta-busy-mark; with ta-on-brand on a button of the brand's color) over its label, which keeps its width; ta-pending a row that is being\n * taken away, which fades back; ta-spinner ta-later a spinner of its own; ta-switch ta-busy a switch, which\n * moved at once, its knob turning.\n */\n.ta-busy, .ta-pending { --ta-busy-delay: 160ms; pointer-events: none; }\n.ta-busy:not(.ta-switch) { animation: ta-busy-ink 0s var(--ta-busy-delay) forwards; }\n.ta-button.ta-busy { position: relative; }\n.ta-busy > .ta-busy-mark { position: absolute; inset: 0; margin: auto; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary > .ta-busy-mark, .ta-busy-mark.ta-on-brand { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-button-danger > .ta-busy-mark { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }\n.ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }\n.ta-opening { display: inline-flex; align-items: center; gap: 6px; animation: ta-busy-in 140ms 240ms both; }\n.ta-spinner.ta-later { animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay, 160ms) both; }\n.ta-switch.ta-busy::before { content: ''; position: absolute; z-index: 1; top: 5px; left: 5px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1.6px solid rgba(0, 0, 0, 0.12); border-top-color: #8a8a8a; transition: translate 180ms var(--ta-ease); animation: ta-turn 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-switch.ta-busy:checked::before { translate: 16px 0; border-top-color: var(--ta-green); }\n@keyframes ta-busy-in { from { opacity: 0; } }\n@keyframes ta-busy-ink { to { color: transparent; } }\n@keyframes ta-busy-dim { to { opacity: 0.45; } }\n/* A turn by rotate, which leaves transform and translate to what is turned. */\n@keyframes ta-turn { to rotate: 360deg; }\n/* Nothing to show (EmptyState, ui.Empty): in the middle of the space of its parent, a column of flex; compact, a line of its own in a menu or a picker. */\n.ta-empty { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px 56px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; color: var(--ta-muted); text-wrap: balance; }\n.ta-empty-title { color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; }\n.ta-empty-title + .ta-empty-hint { margin-top: -4px; }\n/* Chinese breaks between its words and after its commas, as the first page of a conversation (.ta-hero p) */\n.ta-empty-hint { max-width: 260px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-empty-compact { flex: none; width: 100%; box-sizing: border-box; padding: 20px 12px; }\n.ta-empty-compact .ta-empty-title { font-size: calc(13px * var(--ta-font-scale)); font-weight: 400; }\n.ta-empty-picture { width: min(200px, 80%); margin-bottom: 8px; animation: ta-in 320ms var(--ta-ease) both; }\n.ta-empty-compact .ta-empty-picture { width: min(150px, 60%); margin-bottom: 4px; }\n.ta-setting-row > .ta-empty-compact { padding: 4px 0; }\n.ta-empty-error .ta-empty-title { color: var(--ta-red); overflow-wrap: anywhere; }\n\n";
|
|
2
|
+
export declare const BASE_STYLE = "\n:root, :root[data-theme='dark'] {\n --ta-main: #141416;\n --ta-side: #1c1c1e;\n --ta-card: #1a1a1c;\n --ta-input: #1a1a1a;\n --ta-raised: #242426;\n --ta-user: #2a2a2d;\n --ta-hover: #2a2a2e;\n --ta-hover-strong: #333338;\n --ta-selected: #2c2c31;\n --ta-chip: #2a2a2e;\n /* The chosen segment of a segmented control, on a track of --ta-raised: above it, lighter in the dark. */\n --ta-segment: #333338;\n --ta-border: #2e2e33;\n --ta-border-muted: #232328;\n --ta-border-field: #3d3d45;\n --ta-border-focus: #8a8a96;\n --ta-text: #e5e5e5;\n --ta-body: #d4d4d6;\n --ta-secondary: #a3a3a3;\n --ta-muted: #7c7c82;\n --ta-brand: #e5e5e5;\n --ta-brand-text: #1a1a1a;\n --ta-accent: #34d399;\n --ta-link: #4dabf7;\n --ta-green: #4ade80;\n --ta-red: #f87171;\n --ta-yellow: #fbbf24;\n --ta-blue: #60a5fa;\n --ta-code: #161618;\n --ta-add: rgba(74, 222, 128, 0.1);\n --ta-remove: rgba(248, 113, 113, 0.1);\n --ta-shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);\n --ta-shadow-composer: 0 12px 32px rgba(0, 0, 0, 0.32);\n --ta-scrollbar: rgba(255, 255, 255, 0.12);\n color-scheme: dark;\n}\n:root[data-theme='light'] {\n --ta-main: #ffffff;\n --ta-side: #f5f5f7;\n --ta-card: #ffffff;\n --ta-input: #ffffff;\n --ta-raised: #f3f3f5;\n --ta-user: #f2f2f2;\n --ta-hover: #ebebf0;\n --ta-hover-strong: #e2e2e8;\n --ta-selected: #e6e6ea;\n --ta-chip: #ececf0;\n --ta-segment: #ffffff;\n --ta-border: #dcdee3;\n --ta-border-muted: #e8eaed;\n --ta-border-field: #c9ccd4;\n --ta-border-focus: #6b6e76;\n --ta-text: #1a1a1a;\n --ta-body: #33363b;\n --ta-secondary: #5c5c5c;\n --ta-muted: #8e8e93;\n --ta-brand: #1a1a1a;\n --ta-brand-text: #ffffff;\n --ta-accent: #10a372;\n --ta-link: #1677ff;\n --ta-green: #16a34a;\n --ta-red: #e5484d;\n --ta-yellow: #d97706;\n --ta-blue: #1677ff;\n --ta-code: #f7f8fa;\n --ta-add: rgba(34, 197, 94, 0.1);\n --ta-remove: rgba(239, 68, 68, 0.08);\n --ta-shadow-pop: 0 16px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.05);\n --ta-shadow-composer: 0 8px 24px rgba(15, 23, 42, 0.07);\n --ta-scrollbar: rgba(0, 0, 0, 0.14);\n color-scheme: light;\n}\n:root {\n /** The height of the title bar the page draws itself; see .ta-titlebar. */\n --ta-titlebar: 0px;\n --ta-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;\n --ta-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Courier New', monospace;\n --ta-col: 760px;\n --ta-ease: cubic-bezier(0.2, 0.8, 0.2, 1);\n /* The font sizes of the settings (TaSettingsImpl sets the first two). Every font size in px is written\n calc(13px * var(--ta-font-scale)), line heights in px too: the page's size (more on a phone, see\n style/device.ts), and in a conversation (.ta-conversation: its messages and the field of its message\n box) that of conversations on top of it. */\n --ta-page-font-scale: 1;\n --ta-chat-font-scale: 1;\n --ta-device-font-scale: 1;\n --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale));\n /* How wide the content of a page is (the pages of Discover, Extensions): a column of rows, a feed or a\n form; or wide, for cards and tiles side by side. Web extensions use them too. */\n --ta-page-width: 720px;\n --ta-page-wide: 880px;\n}\n.ta-conversation { --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale) * var(--ta-chat-font-scale)); font-size: calc(14px * var(--ta-font-scale)); }\n* { box-sizing: border-box; }\nhtml, body, #cell-root, #root { height: 100%; margin: 0; }\n/* The page and its scrolling areas do not bounce at the ends. Only scrolling areas of their own: on any\n other element (one with overflow: hidden is a scroll container too) it stops the wheel from reaching\n the area under it, and nothing scrolls while the pointer is over a card or a code block. */\nhtml, body, .ta-scroll, .ta-chat-scroll, .ta-side-scroll, .ta-rail-items, .ta-side-view-body, .ta-editor-body,\n.ta-workbench-launcher, .ta-workbench-menu, .ta-settings-scroll, .ta-settings-toc, .ta-pick-list, .ta-commands,\n.ta-folder-list, .ta-auth-list { overscroll-behavior: none; }\nbody { background: var(--ta-main); color: var(--ta-text); font: calc(14px * var(--ta-font-scale))/1.6 var(--ta-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }\nbutton, input, select, textarea { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\ncode, pre { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\na { color: var(--ta-link); text-decoration: none; }\n* { scrollbar-width: thin; scrollbar-color: var(--ta-scrollbar) transparent; }\n:focus-visible { outline: 2px solid var(--ta-blue); outline-offset: 1px; }\n.ta-muted { color: var(--ta-muted); }\n.ta-small { font-size: calc(12px * var(--ta-font-scale)); }\n.ta-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-path { font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-spacer { flex: 1; }\n.ta-icon { flex: none; }\n.ta-narrow-only { display: none !important; }\n.ta-glass { background: var(--ta-card); border: 1px solid var(--ta-border); }\n\n/* Controls */\n.ta-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--ta-border); background: transparent; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; color: var(--ta-text); transition: background 120ms, border-color 120ms; }\n.ta-button:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-button:disabled { opacity: 0.45; cursor: default; }\n.ta-primary { background: var(--ta-brand); border-color: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-primary:hover:not(:disabled) { background: var(--ta-brand); opacity: 0.88; }\n.ta-danger, .ta-stop { color: var(--ta-red); }\n.ta-quiet { border-color: transparent; color: var(--ta-secondary); }\n.ta-wide { width: 100%; height: 38px; }\n.ta-link { background: none; border: 0; padding: 0; color: var(--ta-link); font-size: calc(12px * var(--ta-font-scale)); display: inline-flex; align-items: center; gap: 4px; }\n/* Buttons that hold an icon, centred in a box of their size: without the padding of the browser, which iOS makes 14px a side, so that the icon sat off centre there. */\n.ta-icon-button, .ta-footer-button, .ta-rail-item, .ta-rail-logo, .ta-send, .ta-mic, .ta-editor-tab-close, .ta-attachment-remove, .ta-account-button, .ta-tool-trailing, .ta-to-bottom { padding: 0; }\n.ta-icon-button { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; border: 0; background: transparent; color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-icon-button:hover:not(:disabled) { background: var(--ta-hover); color: var(--ta-text); }\n.ta-icon-button:disabled { opacity: 0.4; }\n.ta-icon-button.ta-on { color: var(--ta-text); background: var(--ta-hover); }\n.ta-icon-button-boxed { border: 1px solid var(--ta-border-field); height: 34px; width: 34px; }\n.ta-badge { position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--ta-red); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; }\n.ta-input, .ta-field { width: 100%; height: 36px; border: 1px solid var(--ta-border-field); background: var(--ta-input); border-radius: 8px; padding: 0 10px; outline: none; transition: border-color 120ms; }\n.ta-field { display: flex; align-items: center; gap: 8px; color: var(--ta-muted); }\n.ta-field-small { height: 34px; }\n.ta-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-input:focus, .ta-field:focus-within { border-color: var(--ta-border-focus); }\n.ta-editor { height: auto; min-height: 140px; padding: 8px 10px; font-family: var(--ta-mono); resize: vertical; }\n.ta-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }\n/* Levels: the colour of the icon tells the level; the text stays in the colours of text. */\n.ta-level-info { --ta-level: var(--ta-blue); }\n.ta-level-success { --ta-level: var(--ta-green); }\n.ta-level-warning { --ta-level: var(--ta-yellow); }\n.ta-level-error { --ta-level: var(--ta-red); }\n.ta-level-icon { color: var(--ta-level, var(--ta-muted)); }\n/* In its place: a soft tint of its level, the text in the colours of text. */\n.ta-callout { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; text-align: left; color: var(--ta-body); background: color-mix(in srgb, var(--ta-level) 7%, var(--ta-card)); border: 1px solid color-mix(in srgb, var(--ta-level) 18%, var(--ta-border-muted)); }\n.ta-callout > .ta-level-icon { margin-top: 2px; }\n.ta-callout-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-callout-message { white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-callout-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-empty .ta-callout { max-width: min(520px, 100%); }\n.ta-spinner { width: 13px; height: 13px; border: 1.8px solid var(--ta-border-field); border-top-color: var(--ta-text); border-radius: 50%; animation: ta-spin 0.8s linear infinite; flex: none; display: inline-block; }\n/*\n * Busy (components/busy.tsx): what waits on something slow says so only once it took a moment (--ta-busy-delay),\n * so that what is quick does not flash, and takes no second click meanwhile. ta-busy a button or an icon\n * button, its spinner (ta-busy-mark; with ta-on-brand on a button of the brand's color) over its label, which keeps its width; ta-pending a row that is being\n * taken away, which fades back; ta-spinner ta-later a spinner of its own; ta-switch ta-busy a switch, which\n * moved at once, its knob turning.\n */\n.ta-busy, .ta-pending { --ta-busy-delay: 160ms; pointer-events: none; }\n.ta-busy:not(.ta-switch) { animation: ta-busy-ink 0s var(--ta-busy-delay) forwards; }\n.ta-button.ta-busy { position: relative; }\n.ta-busy > .ta-busy-mark { position: absolute; inset: 0; margin: auto; animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-primary > .ta-busy-mark, .ta-busy-mark.ta-on-brand { border-color: color-mix(in srgb, var(--ta-brand-text) 30%, transparent); border-top-color: var(--ta-brand-text); }\n.ta-button-danger > .ta-busy-mark { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }\n.ta-pending { animation: ta-busy-dim 180ms var(--ta-busy-delay) forwards; }\n.ta-opening { display: inline-flex; align-items: center; gap: 6px; animation: ta-busy-in 140ms 240ms both; }\n.ta-spinner.ta-later { animation: ta-spin 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay, 160ms) both; }\n.ta-switch.ta-busy::before { content: ''; position: absolute; z-index: 1; top: 5px; left: 5px; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1.6px solid rgba(0, 0, 0, 0.12); border-top-color: #8a8a8a; transition: translate 180ms var(--ta-ease); animation: ta-turn 0.8s linear infinite, ta-busy-in 140ms var(--ta-busy-delay) both; }\n.ta-switch.ta-busy:checked::before { translate: 16px 0; border-top-color: var(--ta-green); }\n@keyframes ta-busy-in { from { opacity: 0; } }\n@keyframes ta-busy-ink { to { color: transparent; } }\n@keyframes ta-busy-dim { to { opacity: 0.45; } }\n/* A turn by rotate, which leaves transform and translate to what is turned. */\n@keyframes ta-turn { to rotate: 360deg; }\n/* Nothing to show (EmptyState, ui.Empty): in the middle of the space of its parent, a column of flex; compact, a line of its own in a menu or a picker. */\n.ta-empty { flex: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px 56px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; color: var(--ta-muted); text-wrap: balance; }\n.ta-empty-title { color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; }\n.ta-empty-title + .ta-empty-hint { margin-top: -4px; }\n/* Chinese breaks between its words and after its commas, as the first page of a conversation (.ta-hero p) */\n.ta-empty-hint { max-width: 260px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-empty-compact { flex: none; width: 100%; box-sizing: border-box; padding: 20px 12px; }\n.ta-empty-compact .ta-empty-title { font-size: calc(13px * var(--ta-font-scale)); font-weight: 400; }\n.ta-empty-picture { width: min(200px, 80%); margin-bottom: 8px; animation: ta-in 320ms var(--ta-ease) both; }\n.ta-empty-compact .ta-empty-picture { width: min(150px, 60%); margin-bottom: 4px; }\n.ta-setting-row > .ta-empty-compact { padding: 4px 0; }\n.ta-empty-error .ta-empty-title { color: var(--ta-red); overflow-wrap: anywhere; }\n\n";
|
|
@@ -88,6 +88,10 @@ export const BASE_STYLE = `
|
|
|
88
88
|
--ta-chat-font-scale: 1;
|
|
89
89
|
--ta-device-font-scale: 1;
|
|
90
90
|
--ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale));
|
|
91
|
+
/* How wide the content of a page is (the pages of Discover, Extensions): a column of rows, a feed or a
|
|
92
|
+
form; or wide, for cards and tiles side by side. Web extensions use them too. */
|
|
93
|
+
--ta-page-width: 720px;
|
|
94
|
+
--ta-page-wide: 880px;
|
|
91
95
|
}
|
|
92
96
|
.ta-conversation { --ta-font-scale: calc(var(--ta-device-font-scale) * var(--ta-page-font-scale) * var(--ta-chat-font-scale)); font-size: calc(14px * var(--ta-font-scale)); }
|
|
93
97
|
* { box-sizing: border-box; }
|