@celljs/ta-web 4.13.1 → 4.15.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 +3 -3
- package/README.md +3 -3
- package/esm/browser/assistant/assistant-extension.js +3 -2
- package/esm/browser/assistant/assistant-initiative.js +1 -1
- package/esm/browser/assistant/assistant-state.js +2 -2
- package/esm/browser/components/access-view.js +3 -2
- package/esm/browser/components/account-menu.js +2 -2
- package/esm/browser/components/app-view.js +4 -0
- package/esm/browser/components/auth-view.d.ts +1 -1
- package/esm/browser/components/auth-view.js +38 -10
- package/esm/browser/components/chat-asks.d.ts +8 -0
- package/esm/browser/components/chat-asks.js +10 -0
- package/esm/browser/components/chat-list.js +11 -1
- package/esm/browser/components/composer-box.d.ts +2 -0
- package/esm/browser/components/composer-box.js +2 -1
- package/esm/browser/components/composer.d.ts +3 -1
- package/esm/browser/components/composer.js +16 -4
- package/esm/browser/components/custom-provider-advanced.d.ts +14 -0
- package/esm/browser/components/custom-provider-advanced.js +50 -0
- package/esm/browser/components/custom-provider-util.d.ts +38 -0
- package/esm/browser/components/custom-provider-util.js +103 -0
- package/esm/browser/components/custom-provider-view.d.ts +11 -0
- package/esm/browser/components/custom-provider-view.js +181 -0
- package/esm/browser/components/face.d.ts +13 -1
- package/esm/browser/components/face.js +16 -1
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/message-list.js +20 -1
- package/esm/browser/components/people.d.ts +32 -0
- package/esm/browser/components/people.js +71 -0
- package/esm/browser/components/session-view.d.ts +1 -1
- package/esm/browser/components/session-view.js +56 -36
- package/esm/browser/components/settings-choices.js +2 -3
- package/esm/browser/components/settings-controls.d.ts +7 -1
- package/esm/browser/components/settings-controls.js +8 -0
- package/esm/browser/components/settings-parts.js +25 -8
- package/esm/browser/components/sign-in-setup.d.ts +16 -0
- package/esm/browser/components/sign-in-setup.js +118 -0
- package/esm/browser/components/use-seen-chats.d.ts +2 -0
- package/esm/browser/components/use-seen-chats.js +2 -2
- package/esm/browser/editor/monaco-loader.js +7 -1
- package/esm/browser/extension/web-api-components.d.ts +12 -0
- package/esm/browser/extension/web-api-contributions.d.ts +3 -0
- package/esm/browser/extension/web-extension-api.d.ts +9 -2
- package/esm/browser/extension/web-extension-context.d.ts +2 -0
- package/esm/browser/extension/web-extension-context.js +19 -0
- package/esm/browser/game/game-loader.js +22 -2
- package/esm/browser/game/game3d-protocol.d.ts +13 -4
- package/esm/browser/i18n/locales.d.ts +90 -1
- package/esm/browser/i18n/locales.js +25 -1
- package/esm/browser/i18n/messages-ja.d.ts +2 -0
- package/esm/browser/i18n/messages-ja.js +972 -0
- package/esm/browser/i18n/messages-zh-tw.d.ts +3 -0
- package/esm/browser/i18n/messages-zh-tw.js +973 -0
- package/esm/browser/i18n/messages.d.ts +85 -0
- package/esm/browser/i18n/messages.js +171 -1
- package/esm/browser/i18n/use-t.js +3 -2
- package/esm/browser/presence/presence-reporter.d.ts +32 -0
- package/esm/browser/presence/presence-reporter.js +71 -0
- package/esm/browser/settings/settings-protocol.d.ts +3 -2
- package/esm/browser/settings/settings-protocol.js +4 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +8 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +53 -1
- package/esm/browser/util/desktop.d.ts +12 -1
- package/esm/browser/util/desktop.js +14 -0
- package/esm/browser/util/voice.d.ts +20 -1
- package/esm/browser/util/voice.js +27 -11
- package/esm/browser/workbench-protocol.d.ts +9 -0
- package/esm/browser/workbench-util.d.ts +4 -0
- package/esm/browser/workbench-util.js +24 -1
- package/esm/browser/workbench.d.ts +3 -0
- package/esm/browser/workbench.js +14 -4
- package/lib/browser/assistant/assistant-extension.js +3 -2
- package/lib/browser/assistant/assistant-initiative.js +1 -1
- package/lib/browser/assistant/assistant-state.js +1 -1
- package/lib/browser/components/access-view.js +3 -2
- package/lib/browser/components/account-menu.js +2 -2
- package/lib/browser/components/app-view.js +4 -0
- package/lib/browser/components/auth-view.d.ts +1 -1
- package/lib/browser/components/auth-view.js +37 -9
- package/lib/browser/components/chat-asks.d.ts +8 -0
- package/lib/browser/components/chat-asks.js +10 -0
- package/lib/browser/components/chat-list.js +11 -1
- package/lib/browser/components/composer-box.d.ts +2 -0
- package/lib/browser/components/composer-box.js +2 -1
- package/lib/browser/components/composer.d.ts +3 -1
- package/lib/browser/components/composer.js +16 -4
- package/lib/browser/components/custom-provider-advanced.d.ts +15 -0
- package/lib/browser/components/custom-provider-advanced.js +86 -0
- package/lib/browser/components/custom-provider-util.d.ts +39 -0
- package/lib/browser/components/custom-provider-util.js +106 -0
- package/lib/browser/components/custom-provider-view.d.ts +12 -0
- package/lib/browser/components/custom-provider-view.js +217 -0
- package/lib/browser/components/face.d.ts +13 -1
- package/lib/browser/components/face.js +16 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/message-list.js +19 -0
- package/lib/browser/components/people.d.ts +33 -0
- package/lib/browser/components/people.js +109 -0
- package/lib/browser/components/session-view.d.ts +1 -1
- package/lib/browser/components/session-view.js +56 -36
- package/lib/browser/components/settings-choices.js +1 -2
- package/lib/browser/components/settings-controls.d.ts +7 -1
- package/lib/browser/components/settings-controls.js +9 -0
- package/lib/browser/components/settings-parts.js +24 -7
- package/lib/browser/components/sign-in-setup.d.ts +17 -0
- package/lib/browser/components/sign-in-setup.js +155 -0
- package/lib/browser/components/use-seen-chats.d.ts +2 -0
- package/lib/browser/components/use-seen-chats.js +3 -2
- package/lib/browser/editor/monaco-loader.js +7 -1
- package/lib/browser/extension/web-api-components.d.ts +12 -0
- package/lib/browser/extension/web-api-contributions.d.ts +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +9 -2
- package/lib/browser/extension/web-extension-context.d.ts +2 -0
- package/lib/browser/extension/web-extension-context.js +19 -0
- package/lib/browser/game/game-loader.js +22 -2
- package/lib/browser/game/game3d-protocol.d.ts +13 -4
- package/lib/browser/i18n/locales.d.ts +90 -1
- package/lib/browser/i18n/locales.js +25 -1
- package/lib/browser/i18n/messages-ja.d.ts +3 -0
- package/lib/browser/i18n/messages-ja.js +975 -0
- package/lib/browser/i18n/messages-zh-tw.d.ts +4 -0
- package/lib/browser/i18n/messages-zh-tw.js +976 -0
- package/lib/browser/i18n/messages.d.ts +85 -0
- package/lib/browser/i18n/messages.js +174 -2
- package/lib/browser/i18n/use-t.js +2 -1
- package/lib/browser/presence/presence-reporter.d.ts +33 -0
- package/lib/browser/presence/presence-reporter.js +75 -0
- package/lib/browser/settings/settings-protocol.d.ts +3 -2
- package/lib/browser/settings/settings-protocol.js +4 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +8 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +53 -1
- package/lib/browser/util/desktop.d.ts +12 -1
- package/lib/browser/util/desktop.js +14 -0
- package/lib/browser/util/voice.d.ts +20 -1
- package/lib/browser/util/voice.js +27 -11
- package/lib/browser/workbench-protocol.d.ts +9 -0
- package/lib/browser/workbench-util.d.ts +4 -0
- package/lib/browser/workbench-util.js +24 -1
- package/lib/browser/workbench.d.ts +3 -0
- package/lib/browser/workbench.js +14 -4
- package/package.json +10 -10
|
@@ -467,6 +467,12 @@ export const LAYOUT_STYLE = `
|
|
|
467
467
|
.ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }
|
|
468
468
|
.ta-chat-dir > svg { flex: none; }
|
|
469
469
|
.ta-chat-flag { margin-right: 3px; }
|
|
470
|
+
.ta-chat-flag.ta-replying { color: var(--ta-secondary); }
|
|
471
|
+
.ta-chat-line > .ta-people { margin-left: 4px; }
|
|
472
|
+
/* Out of the way of the button that takes a row out, as its words are. */
|
|
473
|
+
.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }
|
|
474
|
+
.ta-chat-line .ta-people-face { box-shadow: none; background: none; }
|
|
475
|
+
.ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }
|
|
470
476
|
.ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }
|
|
471
477
|
.ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }
|
|
472
478
|
/* Its directory, in place of its time while the pointer is on it. */
|
|
@@ -534,6 +540,7 @@ export const LAYOUT_STYLE = `
|
|
|
534
540
|
.ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }
|
|
535
541
|
.ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
|
|
536
542
|
.ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }
|
|
543
|
+
.ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }
|
|
537
544
|
.ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }
|
|
538
545
|
.ta-folder-bar { display: flex; align-items: center; gap: 6px; }
|
|
539
546
|
.ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
@@ -595,6 +602,7 @@ body:has(.ta-folder) .ta-remote-status { display: none; }
|
|
|
595
602
|
.ta-thread-item.ta-settled { content-visibility: auto; }
|
|
596
603
|
/* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */
|
|
597
604
|
.ta-earlier { display: flex; justify-content: center; padding: 12px 0; }
|
|
605
|
+
.ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }
|
|
598
606
|
|
|
599
607
|
/* Model accounts: the sign-in page, the dialog and a sign-in under way */
|
|
600
608
|
.ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The settings page, the menus of the account, the lists of Discover and Me, and the fade of what streams in. */
|
|
2
|
-
export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n.ta-submenu { left: calc(100% + 8px); bottom: auto; top: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n";
|
|
2
|
+
export declare const PAGES_STYLE = "\n/* The settings: a page of the main area, a table of contents in two levels beside the sections */\n.ta-settings-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-settings-head { justify-content: flex-start; gap: 10px; border-bottom: 1px solid var(--ta-border-muted); }\n.ta-settings-title { flex: none; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; padding-left: 8px; }\n.ta-settings-search { flex: 1; max-width: 420px; height: 32px; margin: 0 auto; display: flex; align-items: center; gap: 6px; color: var(--ta-muted); }\n.ta-settings-search input { color: var(--ta-text); }\n.ta-settings-search .ta-icon-button { width: 22px; height: 22px; }\n.ta-settings-body { flex: 1; min-height: 0; display: flex; }\n.ta-settings-toc { flex: none; width: 200px; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--ta-border-muted); }\n.ta-settings-toc-part { display: flex; flex-direction: column; gap: 1px; }\n.ta-settings-toc-group { border: 0; background: none; text-align: left; padding: 2px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-muted); }\n.ta-settings-toc-group:hover { color: var(--ta-text); }\n.ta-settings-toc-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: none; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); transition: background 120ms, color 120ms; }\n.ta-settings-toc-item .ta-icon { flex: none; color: var(--ta-muted); }\n.ta-settings-toc-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-settings-toc-item.ta-active { background: var(--ta-selected); color: var(--ta-text); font-weight: 500; }\n.ta-settings-scroll { flex: 1; min-width: 0; overflow-y: auto; scroll-padding-top: 16px; }\n.ta-settings-content { max-width: 720px; margin: 0 auto; padding: 18px 24px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 28px; }\n.ta-settings-content:has(> .ta-empty) { min-height: 100%; box-sizing: border-box; }\n.ta-settings-part { display: flex; flex-direction: column; gap: 18px; }\n.ta-settings-part-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n.ta-settings-part-hint { font-size: calc(12px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); }\n.ta-settings-scope { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); align-self: flex-start; max-width: 100%; }\n.ta-settings-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }\n.ta-settings-tab:hover { color: var(--ta-text); }\n.ta-settings-tab.ta-active { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-settings-file { padding: 0 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-settings-note { padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--ta-border); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-setting-row { position: relative; }\n.ta-setting-row.ta-modified::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; border-radius: 0 2px 2px 0; background: var(--ta-blue); }\n.ta-setting-control { gap: 6px; }\n.ta-setting-reset { width: 26px; height: 26px; }\n.ta-setting-row:not(:hover):not(:focus-within) .ta-setting-reset { opacity: 0; }\n.ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 240px; }\n.ta-setting-row:not(.ta-stacked):has(> .ta-setting-icon) > .ta-setting-text { flex-basis: 160px; }\n.ta-setting-row:not(.ta-stacked) { flex-wrap: wrap; row-gap: 8px; }\n.ta-select, .ta-setting-input, .ta-setting-control .ta-model-field { width: 200px; height: 30px; font-size: calc(12.5px * var(--ta-font-scale)); padding: 0 8px; }\n.ta-select { appearance: auto; cursor: pointer; }\n.ta-setting-input::placeholder { color: var(--ta-muted); }\n/* The settings of a phone (PhoneSettings): the sections listed as Me's rows, each a page of grouped rows. */\n.ta-head-balance { flex: none; width: 32px; }\n.ta-settings-phone > .ta-list-head { padding-left: calc(6px + env(safe-area-inset-left)); padding-right: calc(6px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-list-content { gap: 20px; padding-left: calc(12px + env(safe-area-inset-left)); padding-right: calc(12px + env(safe-area-inset-right)); }\n.ta-settings-phone .ta-settings-search { flex: none; max-width: none; height: 38px; margin: 0; padding: 0 10px; border-radius: 10px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-settings-phone-group { display: flex; flex-direction: column; gap: 6px; }\n.ta-settings-phone-caption { margin: 0 4px; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-settings-phone .ta-setting-card { border-radius: 12px; border-color: var(--ta-border-muted); background: var(--ta-list-cell); }\n.ta-settings-phone .ta-setting-row { min-height: 52px; padding: 12px 16px; gap: 12px; }\n.ta-settings-phone .ta-setting-row:not(.ta-stacked) > .ta-setting-text { flex: 1 1 0; }\n.ta-settings-phone .ta-setting-label { font-size: calc(15px * var(--ta-font-scale)); font-weight: 400; }\n.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }\n.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }\n.ta-settings-phone .ta-segmented button { height: 32px; }\n.ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-setting-choice:active { background: var(--ta-hover); }\n.ta-setting-check { flex: none; color: var(--ta-text); }\n.ta-settings-phone .ta-settings-note { border-radius: 12px; }\n.ta-keys { display: inline-flex; gap: 3px; flex: none; }\n.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }\n\n/* The menus of the account at the foot of the rail */\n.ta-account-menu .ta-account-item { width: 100%; }\n.ta-account-menu .ta-account-item.ta-on { background: var(--ta-hover); }\n.ta-account-menu .ta-account-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-menu-chevron { color: var(--ta-muted) !important; }\n.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }\n.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }\n.ta-submenu-anchor { position: relative; }\n/* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */\n.ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-settings-toc { display: none; }\n .ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }\n /* No table of contents: the last section, jumped to from the menu of the account, still scrolls to the top. */\n .ta-settings-scroll { container-type: size; }\n .ta-settings-part:last-child > .ta-setting-section:last-child { min-height: calc(100cqh - 48px - env(safe-area-inset-bottom)); }\n .ta-settings-title { padding-left: 0; }\n .ta-settings-search { margin: 0; }\n .ta-setting-row:has(.ta-select, .ta-setting-input, .ta-model-field) .ta-setting-control { width: 100%; }\n .ta-setting-row .ta-select, .ta-setting-row .ta-setting-input, .ta-setting-row .ta-model-field { flex: 1; width: auto; min-width: 0; }\n .ta-setting-reset { opacity: 1 !important; }\n .ta-submenu { left: 12px; right: auto; top: auto; bottom: calc(100% + 4px); width: 200px; }\n}\n/* Discover and Me: rows in rounded groups, as the settings of a phone (list-rows.tsx) */\n.ta-list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; --ta-list-bg: var(--ta-main); --ta-list-cell: var(--ta-side); background: var(--ta-list-bg); }\n:root[data-theme='light'] .ta-list-page { --ta-list-bg: var(--ta-side); --ta-list-cell: var(--ta-card); }\n.ta-list-head { border-bottom: 1px solid var(--ta-border-muted); }\n.ta-list-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-list-content { max-width: 640px; margin: 0 auto; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }\n.ta-list-group { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); overflow: hidden; }\n.ta-list-row { position: relative; display: flex; align-items: center; min-height: 48px; }\n.ta-list-row + .ta-list-row::before { content: ''; position: absolute; top: 0; right: 0; left: 46px; height: 1px; background: var(--ta-border-muted); }\n.ta-list-main { flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 0; background: none; text-align: left; font-size: calc(14.5px * var(--ta-font-scale)); color: var(--ta-text); transition: background 120ms; }\n.ta-list-main:hover { background: var(--ta-hover); }\n.ta-list-main:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-list-icon { flex: none; color: var(--ta-secondary); }\n.ta-list-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-list-detail { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-list-chevron { flex: none; color: var(--ta-muted); }\n/* In place of the chevron while the page opens: as wide. */\n.ta-list-busy { margin: 0 1.5px; }\n.ta-list-trailing { flex: none; margin-right: 8px; color: var(--ta-muted); }\n/* WebView.mark of a page under Discover: before its pin, as WeChat shows who posted last by Moments. */\n.ta-list-mark { flex: none; display: inline-flex; align-items: center; margin-right: 2px; pointer-events: none; }\n.ta-list-row.ta-action .ta-list-main { justify-content: center; }\n.ta-list-row.ta-action .ta-list-label { flex: none; }\n.ta-list-row.ta-danger .ta-list-main { color: var(--ta-red); }\n.ta-list-row.ta-danger + .ta-list-row::before, .ta-list-row + .ta-list-row.ta-danger::before { left: 0; }\n.ta-list-hint { margin: -6px 4px 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-me-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border-radius: 12px; border: 1px solid var(--ta-border-muted); background: var(--ta-list-cell); font: inherit; text-align: left; color: inherit; transition: background 120ms; }\n.ta-me-card:hover, .ta-me-card:active { background: var(--ta-hover); }\n.ta-me-card:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-account-figure.ta-me-figure { border-radius: 16px; }\n.ta-me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }\n.ta-me-name { font-size: calc(18px * var(--ta-font-scale)); font-weight: 650; color: var(--ta-text); }\n.ta-me-host { font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-me-state { display: flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* The computers of this device (host-view.tsx): rows as the conversations, a sheet from the bottom on a phone */\n.ta-hosts-dialog { width: min(420px, 100%); gap: 12px; }\n.ta-hosts-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-host-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-host-row { border-radius: 12px; --ta-swipe-bg: var(--ta-card); }\n.ta-host-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 12px; background: var(--ta-card); font: inherit; text-align: left; color: var(--ta-text); transition: background 120ms; }\n.ta-host-item:hover, .ta-host-item:active { background: var(--ta-hover); }\n.ta-host-row.ta-selected .ta-host-item { background: var(--ta-selected); }\n.ta-host-item:focus-visible { outline: 1px solid var(--ta-border-focus); outline-offset: -1px; }\n.ta-host-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }\n.ta-host-name { font-size: calc(14.5px * var(--ta-font-scale)); font-weight: 600; }\n.ta-host-detail { font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-host-check { flex: none; color: var(--ta-green); }\n.ta-host-actions { display: flex; gap: 8px; }\n.ta-host-actions .ta-button { flex: 1; height: 40px; justify-content: center; gap: 6px; }\n.ta-host-form { display: flex; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-host-form .ta-field { flex: 1; height: 40px; }\n.ta-host-form .ta-button { height: 40px; min-width: 72px; justify-content: center; }\n.ta-scan-button { height: 46px; gap: 8px; font-size: calc(15px * var(--ta-font-scale)); justify-content: center; }\n.ta-link-button { padding: 4px 8px; border: 0; background: none; font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-link-button:hover { color: var(--ta-text); }\n.ta-host-saved { width: 100%; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-host-saved h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-signin .ta-host-item { background: var(--ta-main); }\n.ta-signin .ta-host-item:hover, .ta-signin .ta-host-item:active { background: var(--ta-hover); }\n.ta-sign-in-accounts { display: flex; flex-direction: column; gap: 8px; width: 100%; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-sign-in-account { height: 42px; gap: 8px; text-decoration: none; font-size: calc(14.5px * var(--ta-font-scale)); }\n.ta-sign-in-account:hover { background: var(--ta-hover); }\n.ta-sign-in-account[aria-busy='true'] { pointer-events: none; opacity: 0.7; }\n.ta-sign-in-mark { flex: none; }\n.ta-sign-in-or { display: flex; align-items: center; gap: 10px; margin: 4px 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-or::before, .ta-sign-in-or::after { content: ''; flex: 1; height: 1px; background: var(--ta-border); }\n.ta-access-account { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }\n.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }\n.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }\n.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }\n.ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }\n.ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }\n.ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }\n.ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-sign-in-field .ta-input { height: 32px; }\n.ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }\n.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }\n.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-environment-own .ta-button { align-self: flex-end; }\n.ta-environment-hint { margin: 0; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: 1.5; }\n.ta-environment-card { gap: 14px; }\n/* While the page loads again for another computer: which one, at once, over all. */\n.ta-switching { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--ta-main); color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); animation: ta-fade 140ms ease-out both; }\n/* Me has no head: the card under the status bar. */\n.ta-me .ta-list-content { padding-top: calc(20px + env(safe-area-inset-top)); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-list-content { padding: 14px 12px calc(24px + env(safe-area-inset-bottom)); }\n .ta-me .ta-list-content { padding-top: calc(14px + env(safe-area-inset-top)); }\n}\n\n/* Streaming: what comes in fades in where it will stay; nothing already shown moves or draws again. */\n.ta-thread-new { animation: ta-in 220ms var(--ta-ease); }\n/* Words ta said on the way move from the reply into the steps when a tool follows them: they were on the screen, so they do not fade in again. */\n.ta-turn-live > .ta-markdown > *, .ta-process-active .ta-process-steps > :not(.ta-more, .ta-step-text), .ta-turn-live .ta-turn-head > .ta-process-head, .ta-turn-live .ta-turn-head > .ta-run-status { animation: ta-fade 240ms ease-out; }\n.ta-run-line { animation: ta-fade 200ms ease-out; }\n.ta-scroll { overflow-anchor: none; }\n/* The scroll bar held while a reply comes in: the thread keeps its height (ConversationScroller), what grows past it waits. */\n.ta-scroll-held { overflow-y: clip; }\n.ta-scroll-held > * { flex-shrink: 0; }\n/* The look of the double: it walks above, the kinds of dinosaur below, then the ways it walks */\n.ta-look { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }\n.ta-look-stage { height: 120px; flex: none; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; }\n.ta-look-figure, .ta-look-walk { border-radius: 12px; background: var(--ta-raised); display: grid; place-items: center; }\n/* Wide enough for the walk to and fro (half the width of the dinosaur to either side of the middle, and itself). */\n.ta-look-walk { min-width: 220px; overflow: hidden; }\n.ta-look-label { font-size: calc(12px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-secondary); }\n.ta-look-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }\n.ta-look-kind { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: transparent; color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); transition: background 120ms, border-color 120ms; }\n.ta-look-kind:hover { background: var(--ta-hover); }\n.ta-look-kind.ta-on { border-color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 8%, transparent); }\n.ta-look-name { max-width: 100%; }\n/* The voice replies are read with: its list, and a button to listen to it. */\n.ta-voice-picker { display: flex; align-items: center; gap: 8px; width: 100%; }\n.ta-voice-picker .ta-select { flex: 1; min-width: 0; }\n.ta-voice-picker .ta-button { flex: none; }\n.ta-look-premium { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 8px; background: linear-gradient(135deg, #FCD866, #D98E14); color: #4a2c00; font-size: calc(10px * var(--ta-font-scale)); font-weight: 600; line-height: calc(14px * var(--ta-font-scale)); }\n/* Scan, as WeChat's: the camera over everything, a green glow sweeping down, round buttons on it; a photo for Ta asks on a sheet. */\n.ta-scan { position: fixed; inset: 0; z-index: 55; overflow: hidden; background: #000; color: #fff; animation: ta-fade 160ms ease-out; -webkit-user-select: none; user-select: none; }\n.ta-scan-video, .ta-scan-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }\n.ta-scan-mirrored { transform: scaleX(-1); }\n.ta-scan-line { position: absolute; left: 0; right: 0; top: 16%; height: 22%; pointer-events: none; background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ta-green) 40%, transparent) 88%, color-mix(in srgb, var(--ta-green) 90%, transparent) 100%); -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 30%, transparent 100%); animation: ta-scan-sweep 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }\n@keyframes ta-scan-sweep { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(220%); opacity: 0; } }\n.ta-scan-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #fff; background: var(--ta-green); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); animation: ta-scan-pop 260ms var(--ta-ease) both; }\n@keyframes ta-scan-pop { from { transform: scale(0.3); opacity: 0; } }\n.ta-scan-problem { position: absolute; top: 42%; left: 32px; right: 32px; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: calc(15px * var(--ta-font-scale)); line-height: calc(22px * var(--ta-font-scale)); }\n.ta-scan-top { position: absolute; top: calc(env(safe-area-inset-top) + 14px); left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }\n.ta-scan-round { pointer-events: auto; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.32); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }\n.ta-scan-bottom { position: absolute; left: 18px; right: 18px; bottom: calc(env(safe-area-inset-bottom) + 28px); display: flex; align-items: center; gap: 12px; }\n.ta-scan-side, .ta-scan-ask { border: 0; color: #fff; background: rgba(48, 48, 48, 0.58); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); transition: transform 120ms, background 120ms; }\n.ta-scan-side { flex: none; width: 62px; height: 62px; display: grid; place-items: center; padding: 0; border-radius: 50%; }\n.ta-scan-ask { flex: 1; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 14px; border-radius: 31px; }\n.ta-scan-side:active, .ta-scan-ask:active { transform: scale(0.96); background: rgba(70, 70, 70, 0.66); }\n.ta-scan-side:disabled, .ta-scan-ask:disabled { opacity: 0.45; }\n.ta-scan-ask-title { display: flex; align-items: center; gap: 6px; font-size: calc(17px * var(--ta-font-scale)); font-weight: 600; line-height: calc(24px * var(--ta-font-scale)); }\n.ta-scan-ask-hint { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, 0.62); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-scan-sheet { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--ta-card); color: var(--ta-text); box-shadow: var(--ta-shadow-pop); animation: ta-in 220ms var(--ta-ease); }\n:root[data-keyboard] .ta-scan-sheet { bottom: var(--ta-keyboard, 0px); padding-bottom: 12px; }\n.ta-scan-sheet-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-scan-chips { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-scan-chip { padding: 8px 14px; border: 1px solid var(--ta-border); border-radius: 999px; background: var(--ta-main); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-scan-chip:active { background: var(--ta-hover); }\n.ta-scan-field { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border: 1px solid var(--ta-border); border-radius: 22px; background: var(--ta-main); }\n.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }\n.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }\n.ta-scan-send:disabled { opacity: 0.5; }\n/* A model service added by its address and key (custom-provider-view) */\n.ta-custom-flow { flex: 1 1 auto; min-height: 0; }\n.ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }\n.ta-custom-form .ta-select { width: 100%; height: 32px; }\n.ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }\n.ta-custom-models:focus-within { border-color: var(--ta-border-focus); }\n.ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }\n.ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }\n.ta-custom-fetch { align-self: flex-start; margin-top: 2px; }\n.ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }\n.ta-custom-fetched .ta-auth-note { white-space: normal; }\n.ta-custom-fetched .ta-input { height: 32px; }\n.ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }\n.ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }\n.ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }\n.ta-custom-actions .ta-danger { margin-right: auto; }\n.ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }\n.ta-custom-add { width: 100%; }\n.ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }\n.ta-custom-advanced-toggle:hover { background: var(--ta-hover); }\n.ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }\n.ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }\n.ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }\n.ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }\n.ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }\n.ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }\n.ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }\n.ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }\n.ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }\n .ta-custom-actions .ta-button { flex: 1; }\n}\n";
|
|
@@ -55,6 +55,9 @@ export const PAGES_STYLE = `
|
|
|
55
55
|
.ta-settings-phone .ta-setting-description { margin-top: 2px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.4; }
|
|
56
56
|
.ta-settings-phone .ta-setting-row.ta-stacked { gap: 10px; }
|
|
57
57
|
.ta-settings-phone .ta-segmented button { height: 32px; }
|
|
58
|
+
.ta-setting-choice { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
59
|
+
.ta-setting-choice:active { background: var(--ta-hover); }
|
|
60
|
+
.ta-setting-check { flex: none; color: var(--ta-text); }
|
|
58
61
|
.ta-settings-phone .ta-settings-note { border-radius: 12px; }
|
|
59
62
|
.ta-keys { display: inline-flex; gap: 3px; flex: none; }
|
|
60
63
|
.ta-kbd { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--ta-border); border-bottom-width: 2px; background: var(--ta-raised); font: 500 calc(11px * var(--ta-font-scale)) var(--ta-sans); color: var(--ta-secondary); }
|
|
@@ -68,7 +71,8 @@ export const PAGES_STYLE = `
|
|
|
68
71
|
.ta-menu-check { width: 15px; flex: none; display: grid; place-items: center; color: var(--ta-text); }
|
|
69
72
|
.ta-account-menu .ta-kbd { height: 18px; min-width: 18px; font-size: calc(10.5px * var(--ta-font-scale)); }
|
|
70
73
|
.ta-submenu-anchor { position: relative; }
|
|
71
|
-
|
|
74
|
+
/* The account menu sits at the foot of the window: a second menu grows up from its entry, or the last choices would fall below it. */
|
|
75
|
+
.ta-submenu { left: calc(100% + 8px); top: auto; bottom: -6px; width: 180px; }
|
|
72
76
|
@media ${DeviceMedia.COMPACT} {
|
|
73
77
|
.ta-settings-toc { display: none; }
|
|
74
78
|
.ta-settings-content { padding: 14px 14px calc(32px + env(safe-area-inset-bottom)); }
|
|
@@ -152,6 +156,14 @@ export const PAGES_STYLE = `
|
|
|
152
156
|
.ta-access-avatar { width: 22px; height: 22px; flex: none; border-radius: 50%; object-fit: cover; }
|
|
153
157
|
.ta-access-avatar.ta-chat-avatar { font-size: calc(11px * var(--ta-font-scale)); }
|
|
154
158
|
.ta-access-bind { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
159
|
+
.ta-sign-in-name { display: inline-flex; align-items: center; gap: 6px; }
|
|
160
|
+
.ta-sign-in-callbacks { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; }
|
|
161
|
+
.ta-sign-in-callback { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--ta-hover); }
|
|
162
|
+
.ta-sign-in-callback code { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
163
|
+
.ta-sign-in-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
|
|
164
|
+
.ta-sign-in-field { display: flex; flex-direction: column; gap: 4px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }
|
|
165
|
+
.ta-sign-in-field .ta-input { height: 32px; }
|
|
166
|
+
.ta-sign-in-actions { display: flex; justify-content: flex-end; gap: 8px; }
|
|
155
167
|
.ta-environment-chooser { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
|
|
156
168
|
.ta-environment-own { display: flex; flex-direction: column; gap: 8px; animation: ta-in 200ms var(--ta-ease) both; }
|
|
157
169
|
.ta-environment-own .ta-button { align-self: flex-end; }
|
|
@@ -221,5 +233,45 @@ export const PAGES_STYLE = `
|
|
|
221
233
|
.ta-scan-field input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--ta-text); font-size: max(16px, calc(15px * var(--ta-font-scale))); }
|
|
222
234
|
.ta-scan-send { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--ta-text); color: var(--ta-main); }
|
|
223
235
|
.ta-scan-send:disabled { opacity: 0.5; }
|
|
236
|
+
/* A model service added by its address and key (custom-provider-view) */
|
|
237
|
+
.ta-custom-flow { flex: 1 1 auto; min-height: 0; }
|
|
238
|
+
.ta-custom-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; margin: 0 -4px; padding: 0 4px; overflow-y: auto; }
|
|
239
|
+
.ta-custom-form .ta-select { width: 100%; height: 32px; }
|
|
240
|
+
.ta-custom-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--ta-border-field); border-radius: 8px; background: var(--ta-input); transition: border-color 120ms; }
|
|
241
|
+
.ta-custom-models:focus-within { border-color: var(--ta-border-focus); }
|
|
242
|
+
.ta-custom-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; height: 24px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); animation: ta-in 160ms var(--ta-ease) both; }
|
|
243
|
+
.ta-custom-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
244
|
+
.ta-custom-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ta-muted); cursor: pointer; }
|
|
245
|
+
.ta-custom-chip button:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
246
|
+
.ta-custom-model-input { flex: 1; min-width: 140px; height: 26px; border: 0; outline: none; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); }
|
|
247
|
+
.ta-custom-fetch { align-self: flex-start; margin-top: 2px; }
|
|
248
|
+
.ta-custom-fetched { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
|
|
249
|
+
.ta-custom-fetched .ta-auth-note { white-space: normal; }
|
|
250
|
+
.ta-custom-fetched .ta-input { height: 32px; }
|
|
251
|
+
.ta-custom-fetched-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; padding: 2px; border: 1px solid var(--ta-border-muted); border-radius: 8px; }
|
|
252
|
+
.ta-custom-fetched-list .ta-auth-item { height: 32px; flex: none; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
253
|
+
.ta-custom-fetched-list .ta-auth-item > .ta-custom-picked { margin-left: auto; color: var(--ta-accent); }
|
|
254
|
+
.ta-custom-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; background: var(--ta-card); }
|
|
255
|
+
.ta-custom-actions .ta-danger { margin-right: auto; }
|
|
256
|
+
.ta-custom-add > .ta-icon:first-child { color: var(--ta-accent); }
|
|
257
|
+
.ta-custom-add { width: 100%; }
|
|
258
|
+
.ta-custom-advanced { border: 1px solid var(--ta-border-muted); border-radius: 10px; }
|
|
259
|
+
.ta-custom-advanced-toggle { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; cursor: pointer; }
|
|
260
|
+
.ta-custom-advanced-toggle:hover { background: var(--ta-hover); }
|
|
261
|
+
.ta-custom-advanced-toggle .ta-auth-note { font-weight: 400; }
|
|
262
|
+
.ta-custom-advanced-toggle > .ta-icon { margin-left: auto; color: var(--ta-muted); transition: transform 160ms var(--ta-ease); }
|
|
263
|
+
.ta-custom-advanced.ta-open .ta-custom-advanced-toggle > .ta-icon { transform: rotate(180deg); }
|
|
264
|
+
.ta-custom-advanced-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 10px 12px; animation: ta-in 200ms var(--ta-ease) both; }
|
|
265
|
+
.ta-custom-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
|
266
|
+
.ta-custom-check { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }
|
|
267
|
+
.ta-custom-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ta-accent); }
|
|
268
|
+
.ta-custom-header { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 6px; align-items: center; }
|
|
269
|
+
.ta-custom-header .ta-input { height: 32px; font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }
|
|
270
|
+
.ta-custom-header-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ta-muted); cursor: pointer; }
|
|
271
|
+
.ta-custom-header-remove:hover { background: var(--ta-hover); color: var(--ta-text); }
|
|
272
|
+
@media ${DeviceMedia.COMPACT} {
|
|
273
|
+
.ta-custom-form .ta-input, .ta-custom-model-input { font-size: max(16px, calc(14px * var(--ta-font-scale))); }
|
|
274
|
+
.ta-custom-actions .ta-button { flex: 1; }
|
|
275
|
+
}
|
|
224
276
|
`;
|
|
225
277
|
//# sourceMappingURL=pages.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -52,6 +52,15 @@ export interface DesktopNoticeTarget {
|
|
|
52
52
|
cwd?: string;
|
|
53
53
|
view?: string;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Apple's recognizer on macOS (native/ta-speech of apps/ta-desktop): the messages of a listening (`Voice` of voice.ts), and
|
|
57
|
+
* what it answers them, as the Ta app on iOS has it.
|
|
58
|
+
*/
|
|
59
|
+
export interface DesktopSpeech<Message = object, Answer = object> {
|
|
60
|
+
post(message: Message): void;
|
|
61
|
+
/** Returns what stops hearing them. */
|
|
62
|
+
onAnswer(listener: (answer: Answer) => void): () => void;
|
|
63
|
+
}
|
|
55
64
|
/** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
|
|
56
65
|
export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
57
66
|
/**
|
|
@@ -73,6 +82,8 @@ export declare namespace DesktopUtil {
|
|
|
73
82
|
function notices(scope?: object): {
|
|
74
83
|
onOpen(listener: (target: DesktopNoticeTarget) => void): () => void;
|
|
75
84
|
} | undefined;
|
|
85
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
86
|
+
function speech<Message = object, Answer = object>(scope?: object): DesktopSpeech<Message, Answer> | undefined;
|
|
76
87
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
77
88
|
function recentShots(scope?: object): DesktopShots | undefined;
|
|
78
89
|
}
|
|
@@ -64,6 +64,20 @@ export var DesktopUtil;
|
|
|
64
64
|
return Object.freeze({ onOpen: (listener) => onOpen(listener) });
|
|
65
65
|
}
|
|
66
66
|
DesktopUtil.notices = notices;
|
|
67
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
68
|
+
function speech(scope = globalThis) {
|
|
69
|
+
var _a;
|
|
70
|
+
var _b;
|
|
71
|
+
const { post, onAnswer } = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.speech) !== null && _b !== void 0 ? _b : {};
|
|
72
|
+
if (!has('speech', scope) || typeof post !== 'function' || typeof onAnswer !== 'function') {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
return Object.freeze({
|
|
76
|
+
post: (message) => void post(message),
|
|
77
|
+
onAnswer: (listener) => onAnswer(listener),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
DesktopUtil.speech = speech;
|
|
67
81
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
68
82
|
function recentShots(scope = globalThis) {
|
|
69
83
|
var _a;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/** What the page tells Apple's recognizer: of the Ta app on iOS (TaSpeech.swift of apps/ta-mobile) or of Ta Desktop on macOS. */
|
|
2
|
+
export type NativeSpeechMessage = {
|
|
3
|
+
id: string;
|
|
4
|
+
action: 'start';
|
|
5
|
+
language: string;
|
|
6
|
+
continuous: boolean;
|
|
7
|
+
hints: string[];
|
|
8
|
+
} | {
|
|
9
|
+
id: string;
|
|
10
|
+
action: 'stop';
|
|
11
|
+
};
|
|
12
|
+
/** What it answers: the words so far of a listening, or its end. */
|
|
13
|
+
export interface NativeSpeechEvent {
|
|
14
|
+
id: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
final?: boolean;
|
|
17
|
+
end?: boolean;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
1
20
|
/** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
|
|
2
21
|
export declare namespace Voice {
|
|
3
22
|
/** The window event the Ta app on iOS answers a listening with. */
|
|
@@ -40,7 +59,7 @@ export declare namespace Voice {
|
|
|
40
59
|
function spoken(markdown: string): string;
|
|
41
60
|
/** What a text is read in: its sentences and lines, a long one in pieces at its commas. */
|
|
42
61
|
function sentences(text: string): string[];
|
|
43
|
-
/** The language a text is read in: Chinese for Chinese, whatever the page's. */
|
|
62
|
+
/** The language a text is read in: Japanese for kana, Chinese for other Han (the page's, if Chinese or Japanese), whatever the page's. */
|
|
44
63
|
function languageOf(text: string, language: string): string;
|
|
45
64
|
/**
|
|
46
65
|
* How natural a voice sounds, from what its name and address say: the neural voices of Edge and the premium
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DesktopUtil } from './desktop.js';
|
|
1
2
|
/** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
|
|
2
3
|
export var Voice;
|
|
3
4
|
(function (Voice) {
|
|
@@ -63,10 +64,24 @@ export var Voice;
|
|
|
63
64
|
const scope = globalThis;
|
|
64
65
|
return (_a = scope.SpeechRecognition) !== null && _a !== void 0 ? _a : scope.webkitSpeechRecognition;
|
|
65
66
|
}
|
|
66
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Apple's recognizer: of the Ta app on iOS, where WebKit's repeats what it heard and leaves out punctuation, and of
|
|
69
|
+
* Ta Desktop on macOS, where Chrome's, which Electron has, always fails with `network` (only Chrome may use its service).
|
|
70
|
+
*/
|
|
67
71
|
function nativeSpeech() {
|
|
68
72
|
var _a, _b;
|
|
69
|
-
|
|
73
|
+
const ios = (_b = (_a = globalThis.webkit) === null || _a === void 0 ? void 0 : _a.messageHandlers) === null || _b === void 0 ? void 0 : _b.taSpeech;
|
|
74
|
+
if (ios) {
|
|
75
|
+
return {
|
|
76
|
+
post: message => ios.postMessage(message),
|
|
77
|
+
onAnswer: listener => {
|
|
78
|
+
const heard = (event) => listener(event.detail);
|
|
79
|
+
globalThis.addEventListener(Voice.NATIVE_EVENT, heard);
|
|
80
|
+
return () => globalThis.removeEventListener(Voice.NATIVE_EVENT, heard);
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return DesktopUtil.speech();
|
|
70
85
|
}
|
|
71
86
|
function canListen() {
|
|
72
87
|
return nativeSpeech() !== undefined || recognitionClass() !== undefined;
|
|
@@ -154,23 +169,21 @@ export var Voice;
|
|
|
154
169
|
function listenNatively(native, language, onText, onEnd, options) {
|
|
155
170
|
const id = crypto.randomUUID();
|
|
156
171
|
let ended = false;
|
|
157
|
-
const
|
|
158
|
-
const answer = event.detail;
|
|
172
|
+
const stopHearing = native.onAnswer(answer => {
|
|
159
173
|
if (ended || (answer === null || answer === void 0 ? void 0 : answer.id) !== id) {
|
|
160
174
|
return;
|
|
161
175
|
}
|
|
162
176
|
if (answer.end) {
|
|
163
177
|
ended = true;
|
|
164
|
-
|
|
178
|
+
stopHearing();
|
|
165
179
|
onEnd(answer.error === 'no-speech' ? undefined : answer.error);
|
|
166
180
|
}
|
|
167
181
|
else if (typeof answer.text === 'string') {
|
|
168
182
|
onText(answer.text, answer.final === true);
|
|
169
183
|
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
native.
|
|
173
|
-
return { stop: () => !ended && native.postMessage({ id, action: 'stop' }) };
|
|
184
|
+
});
|
|
185
|
+
native.post({ id, action: 'start', language, continuous: options.continuous === true, hints: hints(options.hints) });
|
|
186
|
+
return { stop: () => !ended && native.post({ id, action: 'stop' }) };
|
|
174
187
|
}
|
|
175
188
|
function canSpeak() {
|
|
176
189
|
return typeof speechSynthesis !== 'undefined';
|
|
@@ -225,9 +238,12 @@ export var Voice;
|
|
|
225
238
|
return pieces;
|
|
226
239
|
}
|
|
227
240
|
Voice.sentences = sentences;
|
|
228
|
-
/** The language a text is read in: Chinese for Chinese, whatever the page's. */
|
|
241
|
+
/** The language a text is read in: Japanese for kana, Chinese for other Han (the page's, if Chinese or Japanese), whatever the page's. */
|
|
229
242
|
function languageOf(text, language) {
|
|
230
|
-
|
|
243
|
+
if (/[\u3040-\u30ff]/.test(text)) {
|
|
244
|
+
return 'ja-JP';
|
|
245
|
+
}
|
|
246
|
+
return /[\u4e00-\u9fff]/.test(text) && !/^(zh|ja)\b/i.test(language) ? 'zh-CN' : language;
|
|
231
247
|
}
|
|
232
248
|
Voice.languageOf = languageOf;
|
|
233
249
|
/** Toys and the voices of a screen reader of old (Eloquence), which sound as machines. */
|
|
@@ -65,6 +65,13 @@ export interface WorkbenchState {
|
|
|
65
65
|
archived?: TaSavedSessionInfo[];
|
|
66
66
|
}
|
|
67
67
|
/** The web client's side of `ta serve`: one connection and the open sessions. */
|
|
68
|
+
/** What this page is at, for the others in the same Ta (PresenceReporter). */
|
|
69
|
+
export interface WorkbenchPresence {
|
|
70
|
+
/** The conversation in front of the user, the page seen; none otherwise. */
|
|
71
|
+
look(sessionId: string | undefined): void;
|
|
72
|
+
/** What the box of a conversation holds now: typing while it holds something and keys come. */
|
|
73
|
+
type(sessionId: string, typing: boolean): void;
|
|
74
|
+
}
|
|
68
75
|
export interface TaWorkbench {
|
|
69
76
|
readonly state: WorkbenchState;
|
|
70
77
|
readonly server: TaServer;
|
|
@@ -79,6 +86,8 @@ export interface TaWorkbench {
|
|
|
79
86
|
readonly relay: TaRelayServer;
|
|
80
87
|
readonly remote: TaRemoteServer;
|
|
81
88
|
readonly rooms: TaRoomServer;
|
|
89
|
+
/** What this page tells the others in the same Ta it is at (TaPresenceServer). */
|
|
90
|
+
readonly presence: WorkbenchPresence;
|
|
82
91
|
subscribe(listener: (state: WorkbenchState) => void): () => void;
|
|
83
92
|
/** Signs in with the token of the URL fragment (`ta serve --web`) or the one this page used before. */
|
|
84
93
|
start(): Promise<void>;
|
|
@@ -40,11 +40,15 @@ export declare class WorkbenchError extends Error {
|
|
|
40
40
|
export declare namespace WorkbenchUtil {
|
|
41
41
|
/** A pairing link (`ta pair`) or else a token. */
|
|
42
42
|
function credential(text: string): Credential;
|
|
43
|
+
/** What a page was opened to sign in with, in its fragment: `token`, or `pair` (a pairing link); undefined for neither or one not whole. */
|
|
44
|
+
function fromFragment(fragment: URLSearchParams): Credential | undefined;
|
|
43
45
|
/**
|
|
44
46
|
* Whether the ta serve in use runs on another machine than this browser: reached through a relay, from
|
|
45
47
|
* the app, or at an address that is not this machine's. A sign-in there cannot come back to it by itself.
|
|
46
48
|
*/
|
|
47
49
|
function elsewhere(hostId: string | undefined, hostname?: string): boolean;
|
|
50
|
+
/** An address of this machine alone (`localhost`, `127.0.0.1`, `::1`), which no provider of accounts sends a browser back to. */
|
|
51
|
+
function loopback(hostname?: string): boolean;
|
|
48
52
|
/** In the Ta app on a phone, where no ta serve serves the page: it reaches one through a relay. */
|
|
49
53
|
function isApp(): boolean;
|
|
50
54
|
function readPairing(text: string | null): RelayPairing | undefined;
|
|
@@ -52,14 +52,37 @@ export var WorkbenchUtil;
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
WorkbenchUtil.credential = credential;
|
|
55
|
+
/** What a page was opened to sign in with, in its fragment: `token`, or `pair` (a pairing link); undefined for neither or one not whole. */
|
|
56
|
+
function fromFragment(fragment) {
|
|
57
|
+
const token = fragment.get('token');
|
|
58
|
+
if (token) {
|
|
59
|
+
return { token };
|
|
60
|
+
}
|
|
61
|
+
const pair = fragment.get('pair');
|
|
62
|
+
if (!pair) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
return { pairing: RelayPairingUtil.parse(pair) };
|
|
67
|
+
}
|
|
68
|
+
catch (_a) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
WorkbenchUtil.fromFragment = fromFragment;
|
|
55
73
|
/**
|
|
56
74
|
* Whether the ta serve in use runs on another machine than this browser: reached through a relay, from
|
|
57
75
|
* the app, or at an address that is not this machine's. A sign-in there cannot come back to it by itself.
|
|
58
76
|
*/
|
|
59
77
|
function elsewhere(hostId, hostname = typeof location === 'undefined' ? '' : location.hostname) {
|
|
60
|
-
return isApp() || Boolean(hostId === null || hostId === void 0 ? void 0 : hostId.startsWith('relay ')) || !
|
|
78
|
+
return isApp() || Boolean(hostId === null || hostId === void 0 ? void 0 : hostId.startsWith('relay ')) || !loopback(hostname);
|
|
61
79
|
}
|
|
62
80
|
WorkbenchUtil.elsewhere = elsewhere;
|
|
81
|
+
/** An address of this machine alone (`localhost`, `127.0.0.1`, `::1`), which no provider of accounts sends a browser back to. */
|
|
82
|
+
function loopback(hostname = typeof location === 'undefined' ? '' : location.hostname) {
|
|
83
|
+
return ['localhost', '127.0.0.1', '[::1]', '::1'].includes(hostname);
|
|
84
|
+
}
|
|
85
|
+
WorkbenchUtil.loopback = loopback;
|
|
63
86
|
/** In the Ta app on a phone, where no ta serve serves the page: it reaches one through a relay. */
|
|
64
87
|
function isApp() {
|
|
65
88
|
var _a, _b;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SessionStore, type SessionStoreOptions, TaConnection } from '@celljs/ta-client';
|
|
2
2
|
import { type TaAccessServer, type TaAuthEvent, type TaAuthServer, type TaGatewayServer, type TaPackageServer, type TaRelayServer, type TaRemoteEvent, type TaRemoteServer, type TaRoomEvent, type TaRoomServer, type TaRoomWatch, type TaServer, type TaServerInfo, type TaSessionInfo, type TaSettingsServer, type TaTerminalServer, type TaWorkspaceServer } from '@celljs/ta-protocol';
|
|
3
3
|
import { type HostList } from './hosts.js';
|
|
4
|
+
import { PresenceReporter } from './presence/presence-reporter.js';
|
|
4
5
|
import { WorkbenchCalls } from './workbench-calls.js';
|
|
5
6
|
import { type Credential, TaWorkbench, type WorkbenchState } from './workbench-protocol.js';
|
|
6
7
|
import { type ServiceName } from './workbench-util.js';
|
|
@@ -8,6 +9,8 @@ export declare class TaWorkbenchImpl implements TaWorkbench {
|
|
|
8
9
|
protected list: HostList;
|
|
9
10
|
protected current: WorkbenchState;
|
|
10
11
|
protected connection?: TaConnection;
|
|
12
|
+
/** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
|
|
13
|
+
readonly presence: PresenceReporter;
|
|
11
14
|
protected retryTimer?: ReturnType<typeof setTimeout>;
|
|
12
15
|
/** While ta serve is not running: the next attempt, which `reconnect` makes at once. */
|
|
13
16
|
protected retry?: () => void;
|
package/esm/browser/workbench.js
CHANGED
|
@@ -10,6 +10,7 @@ import { TA_WEBSOCKET_PATH, TaErrorCode, TaRoomWatchUtil, } from '@celljs/ta-pro
|
|
|
10
10
|
import { RelaySocket } from '@celljs/ta-relay';
|
|
11
11
|
import { HostUtil } from './hosts.js';
|
|
12
12
|
import { deviceValues, OfflineKeys } from './offline/device-values.js';
|
|
13
|
+
import { PresenceReporter } from './presence/presence-reporter.js';
|
|
13
14
|
import { DEFAULT_SETTINGS } from './settings/settings-protocol.js';
|
|
14
15
|
import { StateUtil } from './state/state-protocol.js';
|
|
15
16
|
import { WorkbenchCalls } from './workbench-calls.js';
|
|
@@ -19,6 +20,12 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
19
20
|
constructor() {
|
|
20
21
|
this.list = WorkbenchUtil.readHosts(storage());
|
|
21
22
|
this.current = { status: 'connecting', hosts: this.list.hosts, host: this.list.current, sessions: [], saved: [] };
|
|
23
|
+
/** On the connection of the time, only while it is open: what it was at goes again once it opens (resend). */
|
|
24
|
+
this.presence = new PresenceReporter(state => {
|
|
25
|
+
if (this.connection && this.current.status === 'online') {
|
|
26
|
+
this.connection.presence.report(state).catch(() => undefined);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
22
29
|
this.attempts = 0;
|
|
23
30
|
this.graceMs = GRACE_MS;
|
|
24
31
|
/** What was kept of the computers dropped, being taken off the device. */
|
|
@@ -138,13 +145,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
138
145
|
}
|
|
139
146
|
async start() {
|
|
140
147
|
this.watchWake();
|
|
141
|
-
const
|
|
148
|
+
const fragment = new URLSearchParams(location.hash.slice(1));
|
|
149
|
+
// A token of `ta serve --web`, or a pairing link: the page of a relay opened for one let in from a browser (docs/design/ta-team.md 8.3).
|
|
150
|
+
const fromUrl = WorkbenchUtil.fromFragment(fragment);
|
|
142
151
|
if (fromUrl) {
|
|
143
152
|
// Out of the address bar, the history and bookmarks.
|
|
144
153
|
history.replaceState(null, '', location.pathname + location.search);
|
|
145
|
-
|
|
146
|
-
if (fromUrl) {
|
|
147
|
-
this.keepHosts(HostUtil.use(this.list, WorkbenchUtil.serverOf({ token: fromUrl }, pageHost()), { token: fromUrl }, Date.now()));
|
|
154
|
+
this.keepHosts(HostUtil.use(this.list, WorkbenchUtil.serverOf(fromUrl, pageHost()), fromUrl, Date.now()));
|
|
148
155
|
}
|
|
149
156
|
const host = this.list.hosts.find(one => one.id === this.list.current);
|
|
150
157
|
if (host) {
|
|
@@ -348,6 +355,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
348
355
|
return;
|
|
349
356
|
}
|
|
350
357
|
this.update({ status: 'online', retryAt: undefined });
|
|
358
|
+
this.presence.resend();
|
|
351
359
|
void this.refresh();
|
|
352
360
|
void this.watchRemote(connection);
|
|
353
361
|
this.roomsWatched = undefined;
|
|
@@ -362,6 +370,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
362
370
|
// Through a relay the computer has let the page in once the socket is open, and no gateway is behind
|
|
363
371
|
// it: the calls of the page go now, with the one that reads who it is, not a round trip after it.
|
|
364
372
|
this.update({ status: 'online', error: undefined, retryAt: undefined });
|
|
373
|
+
this.presence.resend();
|
|
365
374
|
}
|
|
366
375
|
let server;
|
|
367
376
|
try {
|
|
@@ -380,6 +389,7 @@ let TaWorkbenchImpl = class TaWorkbenchImpl {
|
|
|
380
389
|
}
|
|
381
390
|
this.keepHosts(HostUtil.use(this.list, WorkbenchUtil.serverOf(credential, pageHost()), credential, Date.now(), { user: server.user, host: server.host }));
|
|
382
391
|
this.update({ status: 'online', error: undefined, retryAt: undefined, server });
|
|
392
|
+
this.presence.resend();
|
|
383
393
|
await this.refresh();
|
|
384
394
|
}
|
|
385
395
|
/** A connection to the computer of `credential`, not opened yet, and whether that computer refused it once it failed. */
|
|
@@ -135,8 +135,9 @@ let AssistantWebExtension = class AssistantWebExtension {
|
|
|
135
135
|
remove,
|
|
136
136
|
asking: task => {
|
|
137
137
|
var _a;
|
|
138
|
-
const
|
|
139
|
-
|
|
138
|
+
const { sessions, saved } = this.workbench.state;
|
|
139
|
+
const entry = chat_asks_1.ChatAskUtil.entryOf(sessions, saved, task);
|
|
140
|
+
return entry && ((_a = chat_asks_1.ChatAskUtil.asking(entry, this.persisted.get(chat_asks_1.LET_GO_ASKS))) === null || _a === void 0 ? void 0 : _a.question);
|
|
140
141
|
},
|
|
141
142
|
watchAsking: listener => {
|
|
142
143
|
const stops = [this.workbench.subscribe(() => listener()), this.persisted.subscribe(() => listener())];
|
|
@@ -4,7 +4,7 @@ exports.AssistantInitiative = exports.START_TASK = void 0;
|
|
|
4
4
|
/** The double starting a task it hands out: by default without asking, as pi asks nothing (Settings.confirmTasks). */
|
|
5
5
|
exports.START_TASK = {
|
|
6
6
|
id: 'double.start-task',
|
|
7
|
-
title: { en: 'The double starts the tasks it hands out', zh: '分身开始它交出的任务' },
|
|
7
|
+
title: { en: 'The double starts the tasks it hands out', zh: '分身开始它交出的任务', tw: '分身開始它交出的任務', ja: '分身が割り当てたタスクを開始' },
|
|
8
8
|
reversible: true,
|
|
9
9
|
level: 'act',
|
|
10
10
|
};
|
|
@@ -9,7 +9,7 @@ const state_protocol_1 = require("../state/state-protocol");
|
|
|
9
9
|
exports.ASSISTANT_NAME_STATE = { key: 'assistant.name', tier: 'user', initial: '', parse: state_protocol_1.StateUtil.string };
|
|
10
10
|
/** The kind of dinosaur the double is and how it walks: the figure of the account follows it, in every browser. */
|
|
11
11
|
exports.ASSISTANT_SPECIES_STATE = {
|
|
12
|
-
key:
|
|
12
|
+
key: ta_protocol_1.TA_DOUBLE_LOOK.key,
|
|
13
13
|
tier: 'user',
|
|
14
14
|
initial: dino_species_1.DinoSpecies.DEFAULT,
|
|
15
15
|
parse: value => dino_species_1.DinoSpecies.IDS.find(id => id === value),
|
|
@@ -96,8 +96,9 @@ function AccessSettings({ info, onChange }) {
|
|
|
96
96
|
await onChange().catch(() => undefined);
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
// The sign-in goes through the page's own ta serve: not from the app, nor for another computer
|
|
100
|
-
|
|
99
|
+
// The sign-in goes through the page's own ta serve: not from the app, nor for another computer, nor at an address of
|
|
100
|
+
// this machine alone (the desktop app's), which the provider sends no one back to and where the token lets in anyway.
|
|
101
|
+
const here = !workbench_util_1.WorkbenchUtil.isApp() && !workbench_util_1.WorkbenchUtil.loopback() && workbench.host === workbench_util_1.WorkbenchUtil.serverOf({ token: '' }, location.host);
|
|
101
102
|
// Behind a gateway, only its administrators let accounts in; everyone sees the browsers of their own.
|
|
102
103
|
const manage = info.canManage !== false;
|
|
103
104
|
const bind = (provider) => run(async () => {
|