@celljs/ta-web 4.30.0 → 4.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/account/account-side.js +1 -1
- package/esm/browser/account/device-account.d.ts +8 -0
- package/esm/browser/account/device-account.js +26 -0
- package/esm/browser/assistant/assistant-view.js +1 -1
- package/esm/browser/components/account-menu.d.ts +1 -1
- package/esm/browser/components/account-menu.js +8 -4
- package/esm/browser/components/account-view.d.ts +7 -0
- package/esm/browser/components/account-view.js +90 -10
- package/esm/browser/components/chat-tag.d.ts +13 -5
- package/esm/browser/components/chat-tag.js +23 -6
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-protocol.d.ts +5 -0
- package/esm/browser/components/composer-box.js +12 -7
- package/esm/browser/components/composer.d.ts +2 -0
- package/esm/browser/components/composer.js +3 -3
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -3
- package/esm/browser/components/me-rows.d.ts +2 -0
- package/esm/browser/components/me-rows.js +1 -1
- package/esm/browser/components/scan-screen.js +10 -0
- package/esm/browser/components/session-view.js +2 -2
- package/esm/browser/components/tool-view.js +10 -4
- package/esm/browser/components/voice-button.d.ts +7 -0
- package/esm/browser/components/voice-button.js +25 -2
- package/esm/browser/components/voice-talk.js +1 -1
- package/esm/browser/components/workbench-view.js +2 -2
- package/esm/browser/device/back-stack.d.ts +7 -0
- package/esm/browser/device/back-stack.js +13 -1
- package/esm/browser/device/code-scan.d.ts +5 -2
- package/esm/browser/device/code-scan.js +22 -2
- package/esm/browser/device/mini-program.d.ts +69 -0
- package/esm/browser/device/mini-program.js +251 -0
- package/esm/browser/device/sheet-swipe.js +4 -1
- package/esm/browser/device/swipe-util.d.ts +2 -0
- package/esm/browser/device/swipe-util.js +5 -0
- package/esm/browser/extension/extension-view.d.ts +1 -1
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-api-chats.d.ts +2 -0
- package/esm/browser/extension/web-api-components.d.ts +10 -1
- package/esm/browser/extension/web-api-storage.d.ts +20 -0
- package/esm/browser/extension/web-api-storage.js +3 -0
- package/esm/browser/extension/web-extension-api.d.ts +3 -27
- package/esm/browser/extension/web-extension-context.js +1 -1
- package/esm/browser/extension/web-home.d.ts +1 -1
- package/esm/browser/extension/web-home.js +7 -2
- package/esm/browser/extension/web-pages.js +2 -2
- package/esm/browser/i18n/en/account.d.ts +3 -1
- package/esm/browser/i18n/en/account.js +3 -1
- package/esm/browser/i18n/en/chat.d.ts +2 -0
- package/esm/browser/i18n/en/chat.js +3 -1
- package/esm/browser/i18n/en/common.d.ts +1 -0
- package/esm/browser/i18n/en/common.js +1 -0
- package/esm/browser/i18n/ja/account.js +3 -1
- package/esm/browser/i18n/ja/chat.js +3 -1
- package/esm/browser/i18n/ja/common.js +1 -0
- package/esm/browser/i18n/locales.d.ts +7 -2
- package/esm/browser/i18n/messages.d.ts +6 -1
- package/esm/browser/i18n/zh/account.js +3 -1
- package/esm/browser/i18n/zh/chat.js +3 -1
- package/esm/browser/i18n/zh/common.js +1 -0
- package/esm/browser/i18n/zh-tw/account.js +3 -1
- package/esm/browser/i18n/zh-tw/chat.js +3 -1
- package/esm/browser/i18n/zh-tw/common.js +1 -0
- package/esm/browser/links/links.d.ts +4 -1
- package/esm/browser/links/links.js +10 -1
- package/esm/browser/settings/settings.js +3 -0
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +2 -0
- package/esm/browser/style/device.js +4 -2
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +0 -1
- package/esm/browser/util/composer.d.ts +2 -2
- package/esm/browser/util/composer.js +3 -3
- package/esm/browser/util/tool.d.ts +6 -2
- package/esm/browser/util/tool.js +28 -5
- package/esm/browser/util/voice.d.ts +9 -0
- package/esm/browser/util/voice.js +20 -0
- package/esm/browser/workbench-util.d.ts +5 -0
- package/esm/browser/workbench-util.js +9 -0
- package/esm/browser/workbench.js +6 -1
- package/lib/browser/account/account-side.js +1 -1
- package/lib/browser/account/device-account.d.ts +8 -0
- package/lib/browser/account/device-account.js +26 -0
- package/lib/browser/assistant/assistant-view.js +1 -1
- package/lib/browser/components/account-menu.d.ts +1 -1
- package/lib/browser/components/account-menu.js +6 -2
- package/lib/browser/components/account-view.d.ts +7 -0
- package/lib/browser/components/account-view.js +91 -10
- package/lib/browser/components/chat-tag.d.ts +13 -5
- package/lib/browser/components/chat-tag.js +22 -5
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-protocol.d.ts +5 -0
- package/lib/browser/components/composer-box.js +11 -6
- package/lib/browser/components/composer.d.ts +2 -0
- package/lib/browser/components/composer.js +3 -3
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +3 -3
- package/lib/browser/components/me-rows.d.ts +2 -0
- package/lib/browser/components/me-rows.js +1 -1
- package/lib/browser/components/scan-screen.js +10 -0
- package/lib/browser/components/session-view.js +2 -2
- package/lib/browser/components/tool-view.js +10 -4
- package/lib/browser/components/voice-button.d.ts +7 -0
- package/lib/browser/components/voice-button.js +26 -2
- package/lib/browser/components/voice-talk.js +1 -1
- package/lib/browser/components/workbench-view.js +2 -2
- package/lib/browser/device/back-stack.d.ts +7 -0
- package/lib/browser/device/back-stack.js +13 -1
- package/lib/browser/device/code-scan.d.ts +5 -2
- package/lib/browser/device/code-scan.js +22 -2
- package/lib/browser/device/mini-program.d.ts +70 -0
- package/lib/browser/device/mini-program.js +254 -0
- package/lib/browser/device/sheet-swipe.js +4 -1
- package/lib/browser/device/swipe-util.d.ts +2 -0
- package/lib/browser/device/swipe-util.js +5 -0
- package/lib/browser/extension/extension-view.d.ts +1 -1
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-api-chats.d.ts +2 -0
- package/lib/browser/extension/web-api-components.d.ts +10 -1
- package/lib/browser/extension/web-api-storage.d.ts +21 -0
- package/lib/browser/extension/web-api-storage.js +4 -0
- package/lib/browser/extension/web-extension-api.d.ts +3 -27
- package/lib/browser/extension/web-extension-context.js +1 -1
- package/lib/browser/extension/web-home.d.ts +1 -1
- package/lib/browser/extension/web-home.js +7 -2
- package/lib/browser/extension/web-pages.js +1 -1
- package/lib/browser/i18n/en/account.d.ts +3 -1
- package/lib/browser/i18n/en/account.js +3 -1
- package/lib/browser/i18n/en/chat.d.ts +2 -0
- package/lib/browser/i18n/en/chat.js +3 -1
- package/lib/browser/i18n/en/common.d.ts +1 -0
- package/lib/browser/i18n/en/common.js +1 -0
- package/lib/browser/i18n/ja/account.js +3 -1
- package/lib/browser/i18n/ja/chat.js +3 -1
- package/lib/browser/i18n/ja/common.js +1 -0
- package/lib/browser/i18n/locales.d.ts +7 -2
- package/lib/browser/i18n/messages.d.ts +6 -1
- package/lib/browser/i18n/zh/account.js +3 -1
- package/lib/browser/i18n/zh/chat.js +3 -1
- package/lib/browser/i18n/zh/common.js +1 -0
- package/lib/browser/i18n/zh-tw/account.js +3 -1
- package/lib/browser/i18n/zh-tw/chat.js +3 -1
- package/lib/browser/i18n/zh-tw/common.js +1 -0
- package/lib/browser/links/links.d.ts +4 -1
- package/lib/browser/links/links.js +10 -1
- package/lib/browser/settings/settings.js +3 -0
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +2 -0
- package/lib/browser/style/device.js +4 -2
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +0 -1
- package/lib/browser/util/composer.d.ts +2 -2
- package/lib/browser/util/composer.js +3 -3
- package/lib/browser/util/tool.d.ts +6 -2
- package/lib/browser/util/tool.js +28 -5
- package/lib/browser/util/voice.d.ts +9 -0
- package/lib/browser/util/voice.js +20 -0
- package/lib/browser/workbench-util.d.ts +5 -0
- package/lib/browser/workbench-util.js +9 -0
- package/lib/browser/workbench.js +6 -1
- package/package.json +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The list of chats: its search, its rows, the letters and faces of their groups. */
|
|
2
|
-
export declare const CHAT_LIST_STYLE = "\n/* The list of chats: a search, then the chats by directory (a line each under the head of its group) or by day (each with the avatar of its directory) */\n.ta-chats { gap: 8px; }\n/* On a phone a folder opened is pushed over the list (PhoneStack): the same ground and spacing as the list. */\n.ta-chats > .ta-phone-stack > .ta-phone-stack-base, .ta-chats > .ta-phone-stack > .ta-phone-stack-top { gap: 8px; }\n.ta-chats > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-chats-head { gap: 4px; padding: 0; margin-bottom: 0; }\n.ta-chats-search { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); border: 1px solid transparent; transition: border-color 120ms, background 120ms; }\n.ta-chats-search:focus-within { border-color: var(--ta-border-field); background: var(--ta-input); }\n.ta-chats-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13.5px * var(--ta-font-scale)); }\n.ta-chats-search input::placeholder { color: var(--ta-muted); }\n.ta-chats-clear { width: 24px; height: 24px; }\n.ta-chips { display: flex; gap: 6px; flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 2px; }\n.ta-chips::-webkit-scrollbar { display: none; }\n.ta-chip-filter { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--ta-border); background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; transition: background 120ms, color 120ms, border-color 120ms; }\n.ta-chip-filter:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chip-filter[aria-selected='true'] { background: var(--ta-selected); border-color: transparent; color: var(--ta-text); font-weight: 500; }\n.ta-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone-ink); }\n.ta-chip-count { color: var(--ta-muted); font-variant-numeric: tabular-nums; font-weight: 400; }\n.ta-chat-section + .ta-chat-section { margin-top: 6px; }\n.ta-chats-view { width: 26px; height: 26px; border-radius: 7px; color: var(--ta-muted); }\n.ta-chats-view[aria-pressed='true'] { color: var(--ta-text); background: var(--ta-hover-strong); }\n.ta-chat-group + .ta-chat-group { margin-top: 4px; }\n.ta-chat-group-head { position: relative; display: flex; align-items: center; }\n.ta-chat-group-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 40px 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; }\n.ta-chat-group-toggle:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chat-group-avatar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--tone-tint); color: var(--tone-ink); font-size: 11px; font-weight: 600; }\n.ta-chat-group-toggle .ta-host-tag { margin-right: -3px; }\n.ta-chat-group-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-group-count { flex: none; color: var(--ta-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.ta-chat-group-chevron { flex: none; color: var(--ta-muted); transition: transform 150ms ease; }\n.ta-chat-group-toggle[aria-expanded='true'] .ta-chat-group-chevron { transform: rotate(90deg); }\n.ta-chat-group-add { position: absolute; right: 6px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); opacity: 0; }\n.ta-chat-group-head:hover .ta-chat-group-add, .ta-chat-group-add:focus-visible { opacity: 1; }\n.ta-chat-group-toggle .ta-chat-icon, .ta-chat-folder-head .ta-chat-icon { flex: none; border-radius: 6px; }\n.ta-chat-folder-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 2px; border-bottom: 1px solid var(--ta-border); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-chat-folder-back { width: 30px; height: 30px; flex: none; }\n.ta-chat-folder-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-item.ta-compact { min-height: 34px; padding: 7px 10px 7px 38px; border-radius: 10px; }\n.ta-chat-row:has(.ta-chat-item.ta-compact) { border-radius: 10px; }\n.ta-compact .ta-chat-title { font-weight: 400; color: var(--ta-body); }\n.ta-chat-section-title { padding: 8px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-fold { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }\n.ta-chat-fold:hover { color: var(--ta-text); }\n.ta-chat-fold svg { transition: transform 0.15s ease; }\n.ta-chat-fold[aria-expanded=\"true\"] svg { transform: rotate(90deg); }\n.ta-chat-removed .ta-chat-item { opacity: 0.72; }\n.ta-chat-group .ta-chat-fold { margin-top: 0; padding-left: 14px; }\n.ta-chat-more { height: 1px; }\n/* Rows out of view are not laid out or painted (their menu opens in a portal, their actions within them). */\n.ta-chat-row { position: relative; border-radius: 12px; content-visibility: auto; contain-intrinsic-size: auto 60px; }\n.ta-chat-row:has(.ta-compact) { contain-intrinsic-size: auto 36px; }\n.ta-chat-row:hover { background: var(--ta-hover); }\n.ta-chat-row.ta-selected { background: var(--ta-selected); }\n.ta-chat-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }\n.ta-chat-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tone-tint); color: var(--tone-ink); font-size: 15px; font-weight: 600; }\n.ta-chat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-chat-line { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-chat-title { flex: 1; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* After the title, what it is (a group chat with friends): small, green, the title as short as it is so it sits beside it. */\n.ta-chat-title.ta-badged { flex: 0 1 auto; }\n.ta-chat-tag { display: inline-flex; align-items: center; gap: 2px; }\n.ta-chat-tag.ta-tone-blue { background: color-mix(in oklab, var(--ta-blue) 13%, transparent); color: var(--ta-blue); }\n.ta-chat-tag.ta-tone-gray { background: color-mix(in oklab, var(--ta-muted) 14%, transparent); color: var(--ta-muted); }\n.ta-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }\n.ta-title-line > .ta-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-title-line > .ta-chat-tag { margin: 0; }\n.ta-chat-badge { flex: none; margin-right: auto; margin-left: -2px; height: calc(16px * var(--ta-font-scale)); padding: 0 5px; border-radius: 4px; background: color-mix(in oklab, var(--ta-green) 13%, transparent); color: var(--ta-green); font-size: calc(10.5px * var(--ta-font-scale)); font-weight: 500; line-height: calc(16px * var(--ta-font-scale)); white-space: nowrap; }\n.ta-chat-sub { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-line .ta-spinner { width: 12px; height: 12px; }\n/* Someone to talk to: the double's face, or the face an extension draws for its agent, in place of a letter. */\n.ta-chat-face { flex: none; display: inline-grid; place-items: center; }\n/* A conversation of an extension that is no one to talk to (a brief, a question): its icon on a tile of its tint. */\n.ta-chat-icon { background: var(--ta-tile); color: var(--ta-tile-ink); }\n/* In a row of one line, in the room left of its title, under the letter of its group: the title stays where the others are. */\n.ta-compact .ta-chat-face { margin-left: -28px; }\n/* What goes on in it, at the end of a line: answering (a spinner, on the line under the title), a task that failed or was stopped. */\n.ta-chat-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); white-space: nowrap; }\n.ta-chat-state .ta-status { width: 8px; }\n.ta-chat-state.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n/* Under the title, as a messaging app: the last thing said, or its directory; how a task ended, before it, as WeChat's [Draft]. */\n.ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }\n.ta-chat-dir > svg { flex: none; }\n.ta-chat-flag { margin-right: 3px; }\n.ta-chat-flag.ta-replying { color: var(--ta-secondary); }\n.ta-chat-line > .ta-people { margin-left: 4px; }\n/* Out of the way of the button that takes a row out, as its words are. */\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }\n.ta-chat-line .ta-people-face { box-shadow: none; background: none; }\n.ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }\n.ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n.ta-chat-flag.ta-draft { color: var(--ta-red); }\n.ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }\n/* Its directory, in place of its time while the pointer is on it. */\n.ta-chat-place { display: none; flex: 0 1 auto; align-items: center; gap: 4px; min-width: 0; max-width: 45%; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-place > svg { flex: none; }\n.ta-chat-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n@media (hover: hover) {\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-place { display: inline-flex; }\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-time { display: none; }\n}\n.ta-chats-add { width: 36px; height: 36px; border-radius: 10px; background: var(--ta-raised); }\n/* On the line under the title, at its end; in the middle of a row of one line. */\n.ta-chat-delete { position: absolute; bottom: 7px; right: 8px; width: 26px; height: 26px; opacity: 0; }\n.ta-chat-row:has(.ta-compact) .ta-chat-delete { bottom: auto; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); }\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n.ta-chat-delete:hover:not(:disabled) { color: var(--ta-red); }\n.ta-chat-row:hover .ta-chat-delete, .ta-chat-delete:focus-visible { opacity: 1; }\n/* Taken out, while ta serve closes it: its button stays, turning. */\n.ta-chat-row .ta-chat-delete.ta-icon-button.ta-busy { display: inline-grid; opacity: 1; }\n.ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: hidden; }\n/*\n * Unseen, as a messenger's unread: an amber dot on the corner of the avatar (before the time in a row of one line), as\n * the agents of the side bar have; it grows in and shrinks away. Cut out of the avatar by the color of the row.\n */\n.ta-chat-avatar-box { position: relative; display: inline-flex; flex: none; }\n.ta-chat-row { --ta-chat-bg: var(--ta-side); }\n.ta-chat-row:hover { --ta-chat-bg: var(--ta-hover); }\n.ta-chat-row.ta-selected { --ta-chat-bg: var(--ta-selected); }\n/* A row that slides past others to its new place (ListMotion) goes over them, in the color of its row. */\n.ta-chat-row[data-moving] { z-index: 1; background: var(--ta-chat-bg); }\n.ta-chat-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); transform: scale(0); opacity: 0; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.18s ease; }\n.ta-chat-line > .ta-chat-dot:not(.ta-on) { width: 0; margin-left: -8px; }\n.ta-chat-avatar-box > .ta-chat-dot { position: absolute; right: -2px; bottom: -2px; z-index: 1; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--ta-chat-bg); }\n.ta-chat-dot.ta-on { transform: none; opacity: 1; }\n/* A conversation that waits for the user to decide: a blue ? in place of the amber dot, which seeing it does not take away. */\n.ta-chat-dot.ta-asks { display: grid; place-items: center; background: var(--ta-blue); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }\n.ta-chat-line > .ta-chat-dot.ta-asks { width: 13px; height: 13px; }\n.ta-chat-avatar-box > .ta-chat-dot.ta-asks { right: -3px; bottom: -3px; width: 17px; height: 17px; font-size: 10px; }\n/* Only those going on (the row of the double opened the list): a chip that clears it, its count beside its label. */\n.ta-chat-filter { display: flex; padding: 0 2px 2px; }\n.ta-chat-filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms; }\n.ta-chat-filter-chip:hover { background: var(--ta-selected); }\n.ta-chat-filter-chip > svg { color: var(--ta-muted); }\n.ta-chat-filter-count { font-variant-numeric: tabular-nums; color: var(--ta-secondary); }\n/* How many wait for the user to decide, on the entry of the chats: over the corner of its icon. */\n.ta-asks-badge { position: absolute; top: 3px; right: 1px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--ta-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--ta-side); }\n.ta-tabbar-icon > .ta-asks-badge { top: -5px; right: -11px; }\n@media (prefers-reduced-motion: reduce) { .ta-chat-dot { transition: opacity 0.18s ease; } }\n/* What came unseen reads as unread: in the color of the text, not muted. */\n.ta-chat-sub.ta-unseen { color: var(--ta-text); }\n/* Above the box: where a new conversation will work (ComposerBox's head), a pill of its directory. */\n.ta-console-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 0 6px; }\n.ta-console-head .ta-cwd-chip { max-width: min(100%, 360px); height: 26px; padding: 0 8px 0 7px; background: transparent; }\n.ta-console-head .ta-cwd-chip:hover { background: var(--ta-hover); }\n.ta-console-head .ta-cwd-chip .ta-ellipsis { flex: 0 1 auto; min-width: 0; max-width: none; }\n.ta-cwd-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; max-width: 180px; overflow: hidden; height: 30px; padding: 0 9px 0 10px; border: 0; border-radius: 15px; background: var(--ta-hover); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); transition: background 120ms, color 120ms; }\n.ta-cwd-chip:hover { background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-cwd-chip svg { flex: none; }\n@media (max-width: 600px) { .ta-cwd-chip { max-width: 120px; } }\n/* The letters of the list in hues of the agents' faces (yellow, blue, orange, green, violet, pink), drawn as tints of the theme (--ta-tint-<n>, style/tints.ts). */\n.ta-tone-0 { --tone-tint: var(--ta-tint-2); --tone-ink: var(--ta-tint-ink-2); }\n.ta-tone-1 { --tone-tint: var(--ta-tint-0); --tone-ink: var(--ta-tint-ink-0); }\n.ta-tone-2 { --tone-tint: var(--ta-tint-4); --tone-ink: var(--ta-tint-ink-4); }\n.ta-tone-3 { --tone-tint: var(--ta-tint-3); --tone-ink: var(--ta-tint-ink-3); }\n.ta-tone-4 { --tone-tint: var(--ta-tint-5); --tone-ink: var(--ta-tint-ink-5); }\n.ta-tone-5 { --tone-tint: var(--ta-tint-7); --tone-ink: var(--ta-tint-ink-7); }\n/* The partners (PartnersList): agents, friends and group chats, each a section under a small title, rows as the chats. */\n.ta-partners .ta-chat-section-title { display: flex; align-items: center; gap: 6px; }\n.ta-partners .ta-chat-group + .ta-chat-group { margin-top: 6px; }\n.ta-partner-online { position: absolute; left: -1px; bottom: -1px; z-index: 1; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ta-chat-bg); background: var(--ta-green); }\n/* Starting a chat (GroupPicker): agents and friends to tick, the one of a chat it starts from ticked already. */\n.ta-partner-pick { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-partner-pick-lead { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; max-height: min(56vh, 420px); margin: 0; padding: 0; overflow-y: auto; list-style: none; }\n.ta-partner-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; }\n.ta-partner-pick-row:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-partner-pick-row:disabled { cursor: default; }\n.ta-partner-pick-box { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid var(--ta-border-field); border-radius: 50%; color: #fff; transition: background 0.12s, border-color 0.12s; }\n.ta-partner-pick-box.ta-on { border-color: var(--ta-green); background: var(--ta-green); }\n.ta-partner-pick-row:disabled .ta-partner-pick-box.ta-on { opacity: 0.5; }\n.ta-partner-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-partner-pick-kind { flex: none; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-partner-pick-error { margin: 0; color: var(--ta-red); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-foot { display: flex; justify-content: flex-end; }\n";
|
|
2
|
+
export declare const CHAT_LIST_STYLE = "\n/* The list of chats: a search, then the chats by directory (a line each under the head of its group) or by day (each with the avatar of its directory) */\n.ta-chats { gap: 8px; }\n/* On a phone a folder opened is pushed over the list (PhoneStack): the same ground and spacing as the list. */\n.ta-chats > .ta-phone-stack > .ta-phone-stack-base, .ta-chats > .ta-phone-stack > .ta-phone-stack-top { gap: 8px; }\n.ta-chats > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-chats-head { gap: 4px; padding: 0; margin-bottom: 0; }\n.ta-chats-search { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); border: 1px solid transparent; transition: border-color 120ms, background 120ms; }\n.ta-chats-search:focus-within { border-color: var(--ta-border-field); background: var(--ta-input); }\n.ta-chats-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13.5px * var(--ta-font-scale)); }\n.ta-chats-search input::placeholder { color: var(--ta-muted); }\n.ta-chats-clear { width: 24px; height: 24px; }\n.ta-chips { display: flex; gap: 6px; flex: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 2px; }\n.ta-chips::-webkit-scrollbar { display: none; }\n.ta-chip-filter { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--ta-border); background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; transition: background 120ms, color 120ms, border-color 120ms; }\n.ta-chip-filter:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chip-filter[aria-selected='true'] { background: var(--ta-selected); border-color: transparent; color: var(--ta-text); font-weight: 500; }\n.ta-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone-ink); }\n.ta-chip-count { color: var(--ta-muted); font-variant-numeric: tabular-nums; font-weight: 400; }\n.ta-chat-section + .ta-chat-section { margin-top: 6px; }\n.ta-chats-view { width: 26px; height: 26px; border-radius: 7px; color: var(--ta-muted); }\n.ta-chats-view[aria-pressed='true'] { color: var(--ta-text); background: var(--ta-hover-strong); }\n.ta-chat-group + .ta-chat-group { margin-top: 4px; }\n.ta-chat-group-head { position: relative; display: flex; align-items: center; }\n.ta-chat-group-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 40px 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; }\n.ta-chat-group-toggle:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chat-group-avatar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--tone-tint); color: var(--tone-ink); font-size: 11px; font-weight: 600; }\n.ta-chat-group-toggle .ta-host-tag { margin-right: -3px; }\n.ta-chat-group-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-group-count { flex: none; color: var(--ta-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.ta-chat-group-chevron { flex: none; color: var(--ta-muted); transition: transform 150ms ease; }\n.ta-chat-group-toggle[aria-expanded='true'] .ta-chat-group-chevron { transform: rotate(90deg); }\n.ta-chat-group-add { position: absolute; right: 6px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); opacity: 0; }\n.ta-chat-group-head:hover .ta-chat-group-add, .ta-chat-group-add:focus-visible { opacity: 1; }\n.ta-chat-group-toggle .ta-chat-icon, .ta-chat-folder-head .ta-chat-icon { flex: none; border-radius: 6px; }\n.ta-chat-folder-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 2px; border-bottom: 1px solid var(--ta-border); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-chat-folder-back { width: 30px; height: 30px; flex: none; }\n.ta-chat-folder-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-item.ta-compact { min-height: 34px; padding: 7px 10px 7px 38px; border-radius: 10px; }\n.ta-chat-row:has(.ta-chat-item.ta-compact) { border-radius: 10px; }\n.ta-compact .ta-chat-title { font-weight: 400; color: var(--ta-body); }\n.ta-chat-section-title { padding: 8px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-fold { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }\n.ta-chat-fold:hover { color: var(--ta-text); }\n.ta-chat-fold svg { transition: transform 0.15s ease; }\n.ta-chat-fold[aria-expanded=\"true\"] svg { transform: rotate(90deg); }\n.ta-chat-removed .ta-chat-item { opacity: 0.72; }\n.ta-chat-group .ta-chat-fold { margin-top: 0; padding-left: 14px; }\n.ta-chat-more { height: 1px; }\n/* Rows out of view are not laid out or painted (their menu opens in a portal, their actions within them). */\n.ta-chat-row { position: relative; border-radius: 12px; content-visibility: auto; contain-intrinsic-size: auto 60px; }\n.ta-chat-row:has(.ta-compact) { contain-intrinsic-size: auto 36px; }\n.ta-chat-row:hover { background: var(--ta-hover); }\n.ta-chat-row.ta-selected { background: var(--ta-selected); }\n.ta-chat-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }\n.ta-chat-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tone-tint); color: var(--tone-ink); font-size: 15px; font-weight: 600; }\n.ta-chat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-chat-line { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-chat-title { flex: 1; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n/* After the title, what it is (a group chat with friends): small, green, the title as short as it is so it sits beside it. */\n.ta-chat-title.ta-badged { flex: 0 1 auto; }\n.ta-chat-tag { display: inline-flex; align-items: center; gap: 2px; }\n.ta-chat-tag.ta-tone-blue { background: color-mix(in oklab, var(--ta-blue) 13%, transparent); color: var(--ta-blue); }\n.ta-chat-tag.ta-tone-gray { background: color-mix(in oklab, var(--ta-muted) 14%, transparent); color: var(--ta-muted); }\n.ta-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }\n.ta-title-line > .ta-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-title-line > .ta-chat-tag { margin: 0; }\n.ta-chat-tag-open { border: 0; font-family: inherit; cursor: pointer; }\n.ta-chat-tag-open:hover { filter: brightness(0.94); }\n.ta-chat-badge { flex: none; margin-right: auto; margin-left: -2px; height: calc(16px * var(--ta-font-scale)); padding: 0 5px; border-radius: 4px; background: color-mix(in oklab, var(--ta-green) 13%, transparent); color: var(--ta-green); font-size: calc(10.5px * var(--ta-font-scale)); font-weight: 500; line-height: calc(16px * var(--ta-font-scale)); white-space: nowrap; }\n.ta-chat-sub { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-line .ta-spinner { width: 12px; height: 12px; }\n/* Someone to talk to: the double's face, or the face an extension draws for its agent, in place of a letter. */\n.ta-chat-face { flex: none; display: inline-grid; place-items: center; }\n/* A conversation of an extension that is no one to talk to (a brief, a question): its icon on a tile of its tint. */\n.ta-chat-icon { background: var(--ta-tile); color: var(--ta-tile-ink); }\n/* In a row of one line, in the room left of its title, under the letter of its group: the title stays where the others are. */\n.ta-compact .ta-chat-face { margin-left: -28px; }\n/* What goes on in it, at the end of a line: answering (a spinner, on the line under the title), a task that failed or was stopped. */\n.ta-chat-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); white-space: nowrap; }\n.ta-chat-state .ta-status { width: 8px; }\n.ta-chat-state.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n/* Under the title, as a messaging app: the last thing said, or its directory; how a task ended, before it, as WeChat's [Draft]. */\n.ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }\n.ta-chat-dir > svg { flex: none; }\n.ta-chat-flag { margin-right: 3px; }\n.ta-chat-flag.ta-replying { color: var(--ta-secondary); }\n.ta-chat-line > .ta-people { margin-left: 4px; }\n/* Out of the way of the button that takes a row out, as its words are. */\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }\n.ta-chat-line .ta-people-face { box-shadow: none; background: none; }\n.ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }\n.ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n.ta-chat-flag.ta-draft { color: var(--ta-red); }\n.ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }\n/* Its directory, in place of its time while the pointer is on it. */\n.ta-chat-place { display: none; flex: 0 1 auto; align-items: center; gap: 4px; min-width: 0; max-width: 45%; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-place > svg { flex: none; }\n.ta-chat-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n@media (hover: hover) {\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-place { display: inline-flex; }\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-time { display: none; }\n}\n.ta-chats-add { width: 36px; height: 36px; border-radius: 10px; background: var(--ta-raised); }\n/* On the line under the title, at its end; in the middle of a row of one line. */\n.ta-chat-delete { position: absolute; bottom: 7px; right: 8px; width: 26px; height: 26px; opacity: 0; }\n.ta-chat-row:has(.ta-compact) .ta-chat-delete { bottom: auto; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); }\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n.ta-chat-delete:hover:not(:disabled) { color: var(--ta-red); }\n.ta-chat-row:hover .ta-chat-delete, .ta-chat-delete:focus-visible { opacity: 1; }\n/* Taken out, while ta serve closes it: its button stays, turning. */\n.ta-chat-row .ta-chat-delete.ta-icon-button.ta-busy { display: inline-grid; opacity: 1; }\n.ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: hidden; }\n/*\n * Unseen, as a messenger's unread: an amber dot on the corner of the avatar (before the time in a row of one line), as\n * the agents of the side bar have; it grows in and shrinks away. Cut out of the avatar by the color of the row.\n */\n.ta-chat-avatar-box { position: relative; display: inline-flex; flex: none; }\n.ta-chat-row { --ta-chat-bg: var(--ta-side); }\n.ta-chat-row:hover { --ta-chat-bg: var(--ta-hover); }\n.ta-chat-row.ta-selected { --ta-chat-bg: var(--ta-selected); }\n/* A row that slides past others to its new place (ListMotion) goes over them, in the color of its row. */\n.ta-chat-row[data-moving] { z-index: 1; background: var(--ta-chat-bg); }\n.ta-chat-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); transform: scale(0); opacity: 0; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.18s ease; }\n.ta-chat-line > .ta-chat-dot:not(.ta-on) { width: 0; margin-left: -8px; }\n.ta-chat-avatar-box > .ta-chat-dot { position: absolute; right: -2px; bottom: -2px; z-index: 1; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--ta-chat-bg); }\n.ta-chat-dot.ta-on { transform: none; opacity: 1; }\n/* A conversation that waits for the user to decide: a blue ? in place of the amber dot, which seeing it does not take away. */\n.ta-chat-dot.ta-asks { display: grid; place-items: center; background: var(--ta-blue); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }\n.ta-chat-line > .ta-chat-dot.ta-asks { width: 13px; height: 13px; }\n.ta-chat-avatar-box > .ta-chat-dot.ta-asks { right: -3px; bottom: -3px; width: 17px; height: 17px; font-size: 10px; }\n/* Only those going on (the row of the double opened the list): a chip that clears it, its count beside its label. */\n.ta-chat-filter { display: flex; padding: 0 2px 2px; }\n.ta-chat-filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms; }\n.ta-chat-filter-chip:hover { background: var(--ta-selected); }\n.ta-chat-filter-chip > svg { color: var(--ta-muted); }\n.ta-chat-filter-count { font-variant-numeric: tabular-nums; color: var(--ta-secondary); }\n/* How many wait for the user to decide, on the entry of the chats: over the corner of its icon. */\n.ta-asks-badge { position: absolute; top: 3px; right: 1px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--ta-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--ta-side); }\n.ta-tabbar-icon > .ta-asks-badge { top: -5px; right: -11px; }\n@media (prefers-reduced-motion: reduce) { .ta-chat-dot { transition: opacity 0.18s ease; } }\n/* What came unseen reads as unread: in the color of the text, not muted. */\n.ta-chat-sub.ta-unseen { color: var(--ta-text); }\n/* Above the box: where a new conversation will work (ComposerBox's head), a pill of its directory. */\n.ta-console-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 0 6px; }\n.ta-console-head .ta-cwd-chip { max-width: min(100%, 360px); height: 26px; padding: 0 8px 0 7px; background: transparent; }\n.ta-console-head .ta-cwd-chip:hover { background: var(--ta-hover); }\n.ta-console-head .ta-cwd-chip .ta-ellipsis { flex: 0 1 auto; min-width: 0; max-width: none; }\n.ta-cwd-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; max-width: 180px; overflow: hidden; height: 30px; padding: 0 9px 0 10px; border: 0; border-radius: 15px; background: var(--ta-hover); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); transition: background 120ms, color 120ms; }\n.ta-cwd-chip:hover { background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-cwd-chip svg { flex: none; }\n@media (max-width: 600px) { .ta-cwd-chip { max-width: 120px; } }\n/* The letters of the list in hues of the agents' faces (yellow, blue, orange, green, violet, pink), drawn as tints of the theme (--ta-tint-<n>, style/tints.ts). */\n.ta-tone-0 { --tone-tint: var(--ta-tint-2); --tone-ink: var(--ta-tint-ink-2); }\n.ta-tone-1 { --tone-tint: var(--ta-tint-0); --tone-ink: var(--ta-tint-ink-0); }\n.ta-tone-2 { --tone-tint: var(--ta-tint-4); --tone-ink: var(--ta-tint-ink-4); }\n.ta-tone-3 { --tone-tint: var(--ta-tint-3); --tone-ink: var(--ta-tint-ink-3); }\n.ta-tone-4 { --tone-tint: var(--ta-tint-5); --tone-ink: var(--ta-tint-ink-5); }\n.ta-tone-5 { --tone-tint: var(--ta-tint-7); --tone-ink: var(--ta-tint-ink-7); }\n/* The partners (PartnersList): agents, friends and group chats, each a section under a small title, rows as the chats. */\n.ta-partners .ta-chat-section-title { display: flex; align-items: center; gap: 6px; }\n.ta-partners .ta-chat-group + .ta-chat-group { margin-top: 6px; }\n.ta-partner-online { position: absolute; left: -1px; bottom: -1px; z-index: 1; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ta-chat-bg); background: var(--ta-green); }\n/* Starting a chat (GroupPicker): agents and friends to tick, the one of a chat it starts from ticked already. */\n.ta-partner-pick { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-partner-pick-lead { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; max-height: min(56vh, 420px); margin: 0; padding: 0; overflow-y: auto; list-style: none; }\n.ta-partner-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; }\n.ta-partner-pick-row:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-partner-pick-row:disabled { cursor: default; }\n.ta-partner-pick-box { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid var(--ta-border-field); border-radius: 50%; color: #fff; transition: background 0.12s, border-color 0.12s; }\n.ta-partner-pick-box.ta-on { border-color: var(--ta-green); background: var(--ta-green); }\n.ta-partner-pick-row:disabled .ta-partner-pick-box.ta-on { opacity: 0.5; }\n.ta-partner-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-partner-pick-kind { flex: none; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-partner-pick-error { margin: 0; color: var(--ta-red); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-foot { display: flex; justify-content: flex-end; }\n";
|
|
@@ -67,6 +67,8 @@ export const CHAT_LIST_STYLE = `
|
|
|
67
67
|
.ta-title-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
|
68
68
|
.ta-title-line > .ta-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
69
69
|
.ta-title-line > .ta-chat-tag { margin: 0; }
|
|
70
|
+
.ta-chat-tag-open { border: 0; font-family: inherit; cursor: pointer; }
|
|
71
|
+
.ta-chat-tag-open:hover { filter: brightness(0.94); }
|
|
70
72
|
.ta-chat-badge { flex: none; margin-right: auto; margin-left: -2px; height: calc(16px * var(--ta-font-scale)); padding: 0 5px; border-radius: 4px; background: color-mix(in oklab, var(--ta-green) 13%, transparent); color: var(--ta-green); font-size: calc(10.5px * var(--ta-font-scale)); font-weight: 500; line-height: calc(16px * var(--ta-font-scale)); white-space: nowrap; }
|
|
71
73
|
.ta-chat-sub { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
72
74
|
.ta-chat-line .ta-spinner { width: 12px; height: 12px; }
|
|
@@ -166,6 +166,8 @@ export const DEVICE_STYLE = `
|
|
|
166
166
|
.ta-swipe-content { position: relative; display: flow-root; border-radius: inherit; }
|
|
167
167
|
.ta-swipe-row[data-swipeable] { touch-action: pan-y; }
|
|
168
168
|
.ta-swipe-row[data-swipe-clip] { overflow: hidden; }
|
|
169
|
+
/* Moving or open, the row has no color of its own (a hover a touch left, a selection): its content carries it, and at its edges, at a fraction of a pixel, what is under it would show as a line. */
|
|
170
|
+
.ta-swipe-row[data-swipeable][data-swipe-clip] { background: none; }
|
|
169
171
|
.ta-swipe-row[data-swipeable] > .ta-swipe-content { z-index: 1; background: var(--ta-swipe-bg, var(--ta-side)); transition: transform 300ms ${DeviceMotion.SHEET_CURVE}; }
|
|
170
172
|
.ta-swipe-row[data-swiped] > .ta-swipe-content { transform: translate3d(calc(-1 * var(--ta-swipe-width)), 0, 0); }
|
|
171
173
|
.ta-swipe-row[data-swiping] > .ta-swipe-content { transition: none; }
|
|
@@ -178,11 +180,11 @@ export const DEVICE_STYLE = `
|
|
|
178
180
|
.ta-swipe-row[data-swiped] > .ta-swipe-actions > .ta-swipe-action { transform: none; }
|
|
179
181
|
.ta-swipe-row[data-swiping] > .ta-swipe-actions > .ta-swipe-action { transition: none; }
|
|
180
182
|
.ta-swipe-action.ta-danger { background: var(--ta-red); }
|
|
181
|
-
/* Each action fills what it leaves to its right as the row stretches past them (at most BEYOND_PX), under the next one; the first one what the content leaves, should their edges part by a pixel. */
|
|
183
|
+
/* Each action fills what it leaves to its right as the row stretches past them (at most BEYOND_PX), under the next one; the first one what the content leaves, should their edges part by a pixel (no wider: under the content its color would show at the content's edges). */
|
|
182
184
|
.ta-swipe-action::after, .ta-swipe-action:first-child::before { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; background: inherit; }
|
|
183
185
|
/* Over its edge by a pixel: at a fraction of a pixel the two would show a seam. */
|
|
184
186
|
.ta-swipe-action::after { left: calc(100% - 1px); }
|
|
185
|
-
.ta-swipe-action:first-child::before { right: calc(100% - 1px); }
|
|
187
|
+
.ta-swipe-action:first-child::before { right: calc(100% - 1px); width: 2px; }
|
|
186
188
|
.ta-swipe-action:active { filter: brightness(0.9); }
|
|
187
189
|
/* Moved by the finger, the row is not pressed: what it shows pressed goes back to what it is under it, unless it is the one chosen. */
|
|
188
190
|
.ta-swipe-row[data-swiping] > .ta-swipe-content > :active:not([aria-current]) { background: var(--ta-swipe-bg, var(--ta-side)); }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Dialogs and sheets, the picker of machines, rows far up a conversation, the sign-in to model accounts, Ta on a phone. */
|
|
2
|
-
export declare const DIALOGS_STYLE = "\n/* A dialog in the middle of the page; a sheet from the bottom on a phone */\n.ta-modal-scrim { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 12px 12px; background: rgba(0, 0, 0, 0.32); animation: ta-fade 140ms ease-out; }\n.ta-modal { position: relative; z-index: 1; width: min(520px, 100%); max-height: 76vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 14px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); }\n.ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }\n.ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }\n.ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-folder-bar { display: flex; align-items: center; gap: 6px; }\n.ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n/* The path on a touch screen: its folders as buttons, scrolled to the last; it fills the bar as the field does. */\n.ta-folder-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; border-radius: 8px; background: var(--ta-input); border: 1px solid var(--ta-border-field); white-space: nowrap; }\n.ta-folder-crumbs::-webkit-scrollbar { display: none; }\n.ta-folder-crumbs[data-clipped] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }\n.ta-folder-crumb { flex: none; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-folder-crumb:active { background: var(--ta-hover); }\n.ta-folder-crumb.ta-current { color: var(--ta-text); font-weight: 600; }\n.ta-folder-crumb-sep { flex: none; color: var(--ta-muted); }\n.ta-folder-machines .ta-chip-filter { flex: none; max-width: 70%; }\n.ta-folder-list { list-style: none; flex: none; height: min(340px, 44vh); overflow-y: auto; margin: 0; padding: 4px; border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-folder-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); text-align: left; }\n.ta-folder-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-folder-item > .ta-icon:first-child, .ta-folder-chevron { color: var(--ta-muted); }\n.ta-folder-chevron { opacity: 0; }\n.ta-folder-item:hover .ta-folder-chevron { opacity: 1; }\n.ta-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-folder-note { display: flex; justify-content: center; padding: 28px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-failed { color: var(--ta-red); font-size: calc(12.5px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-folder-note { gap: 8px; align-items: center; }\n.ta-folder-step { color: var(--ta-secondary); }\n.ta-folder-unreachable { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-folder-unreachable span { max-width: 100%; color: var(--ta-muted); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n/* The machines of the picker: this one, the hosts of ssh, + another */\n.ta-modal.ta-folder { width: min(640px, 100%); }\n.ta-folder-machines { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin: 0; padding: 0 0 2px; gap: 6px; scrollbar-width: none; }\n.ta-folder-machines::-webkit-scrollbar { display: none; }\n.ta-folder-machines .ta-icon-button { flex: none; width: 28px; height: 28px; border-radius: 14px; }\n/* A host to add: a row of its own under the machines, as wide as the path, what it may be said under it. */\n.ta-folder-add { display: flex; flex-direction: column; gap: 6px; }\n.ta-folder-add-row { display: flex; align-items: center; gap: 8px; }\n.ta-folder-add-row .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-add-row .ta-field:has(input[aria-invalid='true']) { border-color: var(--ta-red); }\n.ta-folder-add-row .ta-button { flex: none; height: 34px; }\n.ta-folder-add-hint { padding: 0 2px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-remote-state { display: inline-flex; align-items: center; gap: 6px; }\n.ta-remote-light { width: 7px; height: 7px; border-radius: 50%; background: var(--ta-border-field); flex: none; }\n.ta-remote-light.ta-on { background: var(--ta-green); }\n.ta-remote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ta-green); flex: none; }\n/* The host of a directory of another machine, before its name */\n.ta-host-tag { display: inline-flex; align-items: center; gap: 3px; flex: none; box-sizing: border-box; max-width: 120px; height: 17px; padding: 0 5px 0 4px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-blue) 11%, transparent); color: color-mix(in srgb, var(--ta-blue) 82%, var(--ta-text)); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); white-space: nowrap; vertical-align: middle; }\n.ta-host-tag > svg { flex: none; }\n.ta-host-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* In a narrow chip the host gives way before the name of the folder, and both stay inside it. */\n.ta-cwd-chip .ta-host-tag { flex: 0 10 auto; min-width: 0; margin: 0 0 0 2px; }\n.ta-cwd-chip .ta-ellipsis { flex: none; max-width: 60%; }\n/* What ssh asks, and the line while a host connects */\n.ta-remote-prompt { width: min(440px, 100%); gap: 12px; }\n.ta-remote-prompt .ta-confirm-title { display: flex; align-items: center; gap: 8px; }\n.ta-remote-message { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ta-hover); color: var(--ta-body); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; }\n.ta-remote-status { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top) + var(--ta-titlebar, 0px)); z-index: 65; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ta-fade 160ms ease-out; }\n/* The picker says it itself */\nbody:has(.ta-folder) .ta-remote-status { display: none; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-modal-scrim { align-items: flex-end; padding: 0; }\n .ta-modal { max-height: 88dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: ta-up 260ms var(--ta-ease); }\n .ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: visible; }\n .ta-chat-row:not(.ta-selected) .ta-chat-delete { display: none; }\n .ta-chat-row.ta-selected .ta-chat-delete { opacity: 1; }\n .ta-chat-row.ta-selected .ta-compact .ta-chat-time, .ta-chat-row.ta-selected .ta-chat-state { visibility: hidden; }\n .ta-chat-row.ta-selected .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n .ta-folder-chevron { opacity: 1; }\n}\n/* A tap leaves no hover behind on a folder; a press shows. */\n@media (pointer: coarse) {\n .ta-folder-item:hover { background: transparent; color: var(--ta-body); }\n .ta-folder-item:active { background: var(--ta-hover); color: var(--ta-text); }\n}\n\n/* Performance (t6): rows far up the conversation skip layout and paint until they come into view */\n.ta-thread-item { display: flex; flex-direction: column; min-width: 0; contain-intrinsic-size: auto 160px; }\n/* A message nothing is drawn of (pi's note of a changed prompt) takes no gap: the first message does not move down when it comes. */\n.ta-thread-item:empty { display: none; }\n.ta-thread-item.ta-settled { content-visibility: auto; }\n/* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */\n.ta-earlier { display: flex; justify-content: center; padding: 12px 0; }\n.ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }\n\n/* Model accounts: the sign-in page, the dialog and a sign-in under way */\n.ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }\n.ta-login-card h1 { margin: 6px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-login-card > p { margin: 0 0 6px; color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-login-card .ta-auth-panel { width: 100%; text-align: left; }\n.ta-login-card .ta-auth-list { max-height: min(46vh, 420px); }\n.ta-login-later { margin-top: 2px; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-login-later:hover { color: var(--ta-text); }\n.ta-login-card .ta-pic-cards { margin-top: 4px; }\n.ta-auth-dialog { width: min(520px, 100%); gap: 12px; padding: 16px 18px 18px; }\n.ta-auth-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-auth-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-auth-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 56vh; }\n.ta-auth-group h3 { margin: 0 0 4px; padding: 0 10px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-auth-row { display: flex; align-items: center; gap: 4px; }\n.ta-auth-item { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.ta-auth-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-auth-item > .ta-icon:last-child { color: var(--ta-muted); }\n.ta-auth-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); }\n.ta-auth-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--ta-raised); color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }\n.ta-auth-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-auth-on { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--ta-green); font-size: calc(12px * var(--ta-font-scale)); max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }\n.ta-auth-item .ta-auth-on + .ta-icon { margin-left: 0; }\n.ta-auth-item > .ta-auth-kind + .ta-icon { margin-left: auto; }\n.ta-auth-flow { display: flex; flex-direction: column; gap: 14px; text-align: left; }\n.ta-auth-flow-head { display: flex; align-items: center; gap: 8px; }\n.ta-auth-flow-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-auth-step { display: flex; flex-direction: column; gap: 10px; }\n.ta-auth-step p { margin: 0; color: var(--ta-body); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-auth-code { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(20px * var(--ta-font-scale)); letter-spacing: 0.12em; user-select: all; }\n.ta-auth-options { display: flex; flex-direction: column; gap: 2px; }\n.ta-auth-link { display: block; margin-top: 4px; color: var(--ta-link, var(--ta-brand)); word-break: break-all; }\n/* The sign-in comes in step by step; its pictures answer the pointer */\n@keyframes ta-rise { from { transform: translateY(10px); opacity: 0; } }\n@keyframes ta-key-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; transform: translateY(-1.5px); } }\n@keyframes ta-tick { from { stroke-dashoffset: 12; } }\n@keyframes ta-code-in { from { letter-spacing: 0.4em; opacity: 0; } }\n.ta-login-card > * { animation: ta-rise 420ms var(--ta-ease) both; }\n.ta-login-card > :nth-child(2) { animation-delay: 60ms; }\n.ta-login-card > :nth-child(3) { animation-delay: 100ms; }\n.ta-login-card > :nth-child(4) { animation-delay: 150ms; }\n.ta-login-card > :nth-child(5) { animation-delay: 220ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-tick { stroke-dasharray: 12; animation: ta-tick 420ms var(--ta-ease) both; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot { animation: ta-key-dot 900ms ease-in-out infinite; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+8) { animation-delay: 90ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+10) { animation-delay: 180ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+12) { animation-delay: 270ms; }\n.ta-auth-flow > *, .ta-auth-panel > *, .ta-auth-group { animation: ta-in 260ms var(--ta-ease) both; }\n.ta-auth-code { animation: ta-code-in 420ms var(--ta-ease) both; }\n.ta-auth-item { transition: background 120ms, color 120ms, transform 120ms var(--ta-ease); }\n.ta-auth-item:hover > .ta-icon:last-child { transform: translateX(2px); transition: transform 160ms var(--ta-ease); }\n/* Ta on a phone: a picture of the way through the relay, the code to scan, the devices */\n@keyframes ta-qr-in { from { transform: scale(.94); opacity: 0; } }\n.ta-relay-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-relay-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-relay-start, .ta-relay-pairing { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-relay-start p, .ta-relay-pairing p { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-relay-pic { width: 100%; max-width: 320px; border-radius: 0; }\n.ta-relay-form { display: flex; gap: 8px; width: 100%; }\n.ta-relay-form .ta-field { flex: 1; }\n.ta-qr { width: 220px; height: 220px; border-radius: 12px; animation: ta-qr-in 320ms var(--ta-ease) both; }\n.ta-relay-state { margin-left: 8px; font-weight: 400; color: var(--ta-muted); }\n.ta-relay-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--ta-muted); vertical-align: middle; }\n.ta-relay-state.ta-on::before { background: var(--ta-green); }\n.ta-relay-device { gap: 10px; height: 38px; padding: 0 4px 0 10px; color: var(--ta-muted); }\n.ta-relay-device .ta-auth-note { flex: none; margin-left: auto; }\n.ta-relay-awake { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 10px; }\n.ta-relay-awake-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }\n.ta-relay-awake-text .ta-auth-note { white-space: normal; line-height: 1.5; }\n/* The account and its devices (account-view.tsx) */\n.ta-account-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; overflow-y: auto; }\n.ta-account-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-account-hint { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-ways, .ta-account-signing { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }\n.ta-account-signing p { margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 2px; text-align: center; }\n.ta-account-waiting strong { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-waiting p { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-code { padding: 12px 22px; border-radius: 14px; background: var(--ta-hover); font-family: var(--ta-mono); font-size: calc(30px * var(--ta-font-scale)); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ta-text); white-space: nowrap; }\n.ta-account-devices { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.ta-account-device { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 6px 6px 8px; border-radius: 12px; }\n.ta-account-device.ta-waiting { background: var(--ta-hover); }\n.ta-account-device-icon { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-account-device.ta-waiting .ta-account-device-icon { background: var(--ta-card); }\n.ta-account-dot { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ta-muted); box-shadow: 0 0 0 2px var(--ta-card); }\n.ta-account-dot.ta-on { background: var(--ta-green); }\n.ta-account-device-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; font-size: calc(14px * var(--ta-font-scale)); }\n.ta-account-device-detail { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-account-device-actions { flex: none; display: flex; align-items: center; gap: 6px; }\n.ta-account-device-actions .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ta-border-muted); }\n.ta-account-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-foot .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-sign-in { display: flex; width: 100%; flex-direction: column; gap: 12px; text-align: left; }\n.ta-account-signed { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; text-align: center; }\n.ta-account-signed .ta-account-who { font-size: calc(14px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-account-offer { display: flex; flex-direction: column; gap: 10px; }\n.ta-account-others { display: flex; flex-direction: column; gap: 6px; }\n.ta-account-others h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-account-recent-mark { display: grid; place-items: center; background: var(--ta-hover); color: var(--ta-text); }\n.ta-account-ask { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 58; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; width: min(420px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); transform: translateX(-50%); animation: ta-fade 160ms ease-out; }\n.ta-account-ask-text { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; }\n.ta-account-ask-text strong { max-width: 100%; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-ask .ta-account-code { padding: 4px 10px; border-radius: 8px; font-size: calc(20px * var(--ta-font-scale)); }\n.ta-account-ask-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }\n.ta-account-ask-actions .ta-link-button { margin-right: auto; }\n";
|
|
2
|
+
export declare const DIALOGS_STYLE = "\n/* A dialog in the middle of the page; a sheet from the bottom on a phone */\n.ta-modal-scrim { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 12px 12px; background: rgba(0, 0, 0, 0.32); animation: ta-fade 140ms ease-out; }\n.ta-modal { position: relative; z-index: 1; width: min(520px, 100%); max-height: 76vh; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: 14px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); }\n.ta-modal-head { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }\n.ta-modal-title { font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-web-dialog { width: min(480px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-web-dialog > :not(.ta-modal-head) { min-height: 0; overflow-y: auto; }\n.ta-web-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-folder-bar { display: flex; align-items: center; gap: 6px; }\n.ta-folder-bar .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n/* The path on a touch screen: its folders as buttons, scrolled to the last; it fills the bar as the field does. */\n.ta-folder-crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 34px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; border-radius: 8px; background: var(--ta-input); border: 1px solid var(--ta-border-field); white-space: nowrap; }\n.ta-folder-crumbs::-webkit-scrollbar { display: none; }\n.ta-folder-crumbs[data-clipped] { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px); mask-image: linear-gradient(to right, transparent 0, #000 28px); }\n.ta-folder-crumb { flex: none; height: 26px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-folder-crumb:active { background: var(--ta-hover); }\n.ta-folder-crumb.ta-current { color: var(--ta-text); font-weight: 600; }\n.ta-folder-crumb-sep { flex: none; color: var(--ta-muted); }\n.ta-folder-machines .ta-chip-filter { flex: none; max-width: 70%; }\n.ta-folder-list { list-style: none; flex: none; height: min(340px, 44vh); overflow-y: auto; margin: 0; padding: 4px; border: 1px solid var(--ta-border-muted); border-radius: 10px; }\n.ta-folder-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); text-align: left; }\n.ta-folder-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-folder-item > .ta-icon:first-child, .ta-folder-chevron { color: var(--ta-muted); }\n.ta-folder-chevron { opacity: 0; }\n.ta-folder-item:hover .ta-folder-chevron { opacity: 1; }\n.ta-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-folder-note { display: flex; justify-content: center; padding: 28px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-failed { color: var(--ta-red); font-size: calc(12.5px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-folder-note { gap: 8px; align-items: center; }\n.ta-folder-step { color: var(--ta-secondary); }\n.ta-folder-unreachable { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-folder-unreachable span { max-width: 100%; color: var(--ta-muted); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n/* The machines of the picker: this one, the hosts of ssh, + another */\n.ta-modal.ta-folder { width: min(640px, 100%); }\n.ta-folder-machines { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin: 0; padding: 0 0 2px; gap: 6px; scrollbar-width: none; }\n.ta-folder-machines::-webkit-scrollbar { display: none; }\n.ta-folder-machines .ta-icon-button { flex: none; width: 28px; height: 28px; border-radius: 14px; }\n/* A host to add: a row of its own under the machines, as wide as the path, what it may be said under it. */\n.ta-folder-add { display: flex; flex-direction: column; gap: 6px; }\n.ta-folder-add-row { display: flex; align-items: center; gap: 8px; }\n.ta-folder-add-row .ta-field input { font-family: var(--ta-mono); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-folder-add-row .ta-field:has(input[aria-invalid='true']) { border-color: var(--ta-red); }\n.ta-folder-add-row .ta-button { flex: none; height: 34px; }\n.ta-folder-add-hint { padding: 0 2px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; }\n.ta-remote-state { display: inline-flex; align-items: center; gap: 6px; }\n.ta-remote-light { width: 7px; height: 7px; border-radius: 50%; background: var(--ta-border-field); flex: none; }\n.ta-remote-light.ta-on { background: var(--ta-green); }\n.ta-remote-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ta-green); flex: none; }\n/* The host of a directory of another machine, before its name */\n.ta-host-tag { display: inline-flex; align-items: center; gap: 3px; flex: none; box-sizing: border-box; max-width: 120px; height: 17px; padding: 0 5px 0 4px; margin-right: 5px; border-radius: 5px; background: color-mix(in srgb, var(--ta-blue) 11%, transparent); color: color-mix(in srgb, var(--ta-blue) 82%, var(--ta-text)); font-size: calc(11px * var(--ta-font-scale)); font-weight: 500; line-height: calc(17px * var(--ta-font-scale)); white-space: nowrap; vertical-align: middle; }\n.ta-host-tag > svg { flex: none; }\n.ta-host-tag > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }\n/* In a narrow chip the host gives way before the name of the folder, and both stay inside it. */\n.ta-cwd-chip .ta-host-tag { flex: 0 10 auto; min-width: 0; margin: 0 0 0 2px; }\n.ta-cwd-chip .ta-ellipsis { flex: none; max-width: 60%; }\n/* What ssh asks, and the line while a host connects */\n.ta-remote-prompt { width: min(440px, 100%); gap: 12px; }\n.ta-remote-prompt .ta-confirm-title { display: flex; align-items: center; gap: 8px; }\n.ta-remote-message { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--ta-hover); color: var(--ta-body); font-family: var(--ta-mono); font-size: calc(12px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow-y: auto; }\n.ta-remote-status { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top) + var(--ta-titlebar, 0px)); z-index: 65; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ta-fade 160ms ease-out; }\n/* The picker says it itself */\nbody:has(.ta-folder) .ta-remote-status { display: none; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) {\n .ta-modal-scrim { align-items: flex-end; padding: 0; }\n .ta-modal { max-height: 88dvh; border-radius: 16px 16px 0 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); animation: ta-up 260ms var(--ta-ease); }\n .ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: visible; }\n .ta-chat-row:not(.ta-selected) .ta-chat-delete { display: none; }\n .ta-chat-row.ta-selected .ta-chat-delete { opacity: 1; }\n .ta-chat-row.ta-selected .ta-compact .ta-chat-time, .ta-chat-row.ta-selected .ta-chat-state { visibility: hidden; }\n .ta-chat-row.ta-selected .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n .ta-folder-chevron { opacity: 1; }\n}\n/* A tap leaves no hover behind on a folder; a press shows. */\n@media (pointer: coarse) {\n .ta-folder-item:hover { background: transparent; color: var(--ta-body); }\n .ta-folder-item:active { background: var(--ta-hover); color: var(--ta-text); }\n}\n\n/* Performance (t6): rows far up the conversation skip layout and paint until they come into view */\n.ta-thread-item { display: flex; flex-direction: column; min-width: 0; contain-intrinsic-size: auto 160px; }\n/* A message nothing is drawn of (pi's note of a changed prompt) takes no gap: the first message does not move down when it comes. */\n.ta-thread-item:empty { display: none; }\n.ta-thread-item.ta-settled { content-visibility: auto; }\n/* Above the messages while the earlier ones of a long conversation load, as it is scrolled up. */\n.ta-earlier { display: flex; justify-content: center; padding: 12px 0; }\n.ta-earlier-idle .ta-spinner { visibility: hidden; animation: none; }\n\n/* Model accounts: the sign-in page, the dialog and a sign-in under way */\n.ta-login-card { width: min(460px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }\n.ta-login-card h1 { margin: 6px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-login-card > p { margin: 0 0 6px; color: var(--ta-secondary); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-login-card .ta-auth-panel { width: 100%; text-align: left; }\n.ta-login-card .ta-auth-list { max-height: min(46vh, 420px); }\n.ta-login-later { margin-top: 2px; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(13px * var(--ta-font-scale)); cursor: pointer; }\n.ta-login-later:hover { color: var(--ta-text); }\n.ta-login-card .ta-pic-cards { margin-top: 4px; }\n.ta-auth-dialog { width: min(520px, 100%); gap: 12px; padding: 16px 18px 18px; }\n.ta-auth-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-auth-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-auth-list { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 56vh; }\n.ta-auth-group h3 { margin: 0 0 4px; padding: 0 10px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-auth-row { display: flex; align-items: center; gap: 4px; }\n.ta-auth-item { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ta-body); font: inherit; font-size: calc(13.5px * var(--ta-font-scale)); text-align: left; cursor: pointer; }\n.ta-auth-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-auth-item > .ta-icon:last-child { color: var(--ta-muted); }\n.ta-auth-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); }\n.ta-auth-kind { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--ta-raised); color: var(--ta-muted); font-size: calc(11.5px * var(--ta-font-scale)); }\n.ta-auth-note { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-auth-on { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--ta-green); font-size: calc(12px * var(--ta-font-scale)); max-width: 45%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }\n.ta-auth-item .ta-auth-on + .ta-icon { margin-left: 0; }\n.ta-auth-item > .ta-auth-kind + .ta-icon { margin-left: auto; }\n.ta-auth-flow { display: flex; flex-direction: column; gap: 14px; text-align: left; }\n.ta-auth-flow-head { display: flex; align-items: center; gap: 8px; }\n.ta-auth-flow-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; color: var(--ta-text); }\n.ta-auth-step { display: flex; flex-direction: column; gap: 10px; }\n.ta-auth-step p { margin: 0; color: var(--ta-body); font-size: calc(13.5px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }\n.ta-auth-code { align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-text); font-family: var(--ta-mono); font-size: calc(20px * var(--ta-font-scale)); letter-spacing: 0.12em; user-select: all; }\n.ta-auth-options { display: flex; flex-direction: column; gap: 2px; }\n.ta-auth-link { display: block; margin-top: 4px; color: var(--ta-link, var(--ta-brand)); word-break: break-all; }\n/* The sign-in comes in step by step; its pictures answer the pointer */\n@keyframes ta-rise { from { transform: translateY(10px); opacity: 0; } }\n@keyframes ta-key-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; transform: translateY(-1.5px); } }\n@keyframes ta-tick { from { stroke-dashoffset: 12; } }\n@keyframes ta-code-in { from { letter-spacing: 0.4em; opacity: 0; } }\n.ta-login-card > * { animation: ta-rise 420ms var(--ta-ease) both; }\n.ta-login-card > :nth-child(2) { animation-delay: 60ms; }\n.ta-login-card > :nth-child(3) { animation-delay: 100ms; }\n.ta-login-card > :nth-child(4) { animation-delay: 150ms; }\n.ta-login-card > :nth-child(5) { animation-delay: 220ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-tick { stroke-dasharray: 12; animation: ta-tick 420ms var(--ta-ease) both; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot { animation: ta-key-dot 900ms ease-in-out infinite; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+8) { animation-delay: 90ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+10) { animation-delay: 180ms; }\n.ta-login-card .ta-pic-card:hover .ta-pic-dot:nth-child(n+12) { animation-delay: 270ms; }\n.ta-auth-flow > *, .ta-auth-panel > *, .ta-auth-group { animation: ta-in 260ms var(--ta-ease) both; }\n.ta-auth-code { animation: ta-code-in 420ms var(--ta-ease) both; }\n.ta-auth-item { transition: background 120ms, color 120ms, transform 120ms var(--ta-ease); }\n.ta-auth-item:hover > .ta-icon:last-child { transform: translateX(2px); transition: transform 160ms var(--ta-ease); }\n/* Ta on a phone: a picture of the way through the relay, the code to scan, the devices */\n@keyframes ta-qr-in { from { transform: scale(.94); opacity: 0; } }\n.ta-relay-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; }\n.ta-relay-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-relay-start, .ta-relay-pairing { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: ta-in 260ms var(--ta-ease) both; }\n.ta-relay-start p, .ta-relay-pairing p { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; }\n.ta-relay-pic { width: 100%; max-width: 320px; border-radius: 0; }\n.ta-relay-form { display: flex; gap: 8px; width: 100%; }\n.ta-relay-form .ta-field { flex: 1; }\n.ta-qr { width: 220px; height: 220px; border-radius: 12px; animation: ta-qr-in 320ms var(--ta-ease) both; }\n.ta-relay-state { margin-left: 8px; font-weight: 400; color: var(--ta-muted); }\n.ta-relay-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--ta-muted); vertical-align: middle; }\n.ta-relay-state.ta-on::before { background: var(--ta-green); }\n.ta-relay-device { gap: 10px; height: 38px; padding: 0 4px 0 10px; color: var(--ta-muted); }\n.ta-relay-device .ta-auth-note { flex: none; margin-left: auto; }\n.ta-relay-awake { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 10px; }\n.ta-relay-awake-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }\n.ta-relay-awake-text .ta-auth-note { white-space: normal; line-height: 1.5; }\n/* The account and its devices (account-view.tsx) */\n.ta-account-dialog { width: min(440px, 100%); gap: 14px; padding: 16px 18px 18px; overflow-y: auto; }\n.ta-account-dialog .ta-modal-title { font-size: calc(16px * var(--ta-font-scale)); }\n.ta-account-hint { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-ways, .ta-account-signing { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }\n.ta-account-signing p { margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-waiting { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 2px; text-align: center; }\n.ta-account-waiting strong { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-waiting p { margin: 0; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; }\n.ta-account-code { padding: 12px 22px; border-radius: 14px; background: var(--ta-hover); font-family: var(--ta-mono); font-size: calc(30px * var(--ta-font-scale)); font-weight: 600; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ta-text); white-space: nowrap; }\n.ta-account-devices { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }\n.ta-account-device { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 6px 6px 8px; border-radius: 12px; }\n.ta-account-device.ta-waiting { background: var(--ta-hover); }\n.ta-account-device-icon { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-account-device.ta-waiting .ta-account-device-icon { background: var(--ta-card); }\n.ta-account-dot { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ta-muted); box-shadow: 0 0 0 2px var(--ta-card); }\n.ta-account-dot.ta-on { background: var(--ta-green); }\n.ta-account-device-text { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; font-size: calc(14px * var(--ta-font-scale)); }\n.ta-account-device-detail { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-account-device-actions { flex: none; display: flex; align-items: center; gap: 6px; }\n.ta-account-device-actions .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--ta-border-muted); }\n.ta-account-who { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-account-foot .ta-button { height: 30px; padding: 0 12px; }\n.ta-account-sign-in { display: flex; width: 100%; flex-direction: column; gap: 12px; text-align: left; }\n.ta-account-signed { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; text-align: center; }\n.ta-account-signed .ta-account-who { font-size: calc(14px * var(--ta-font-scale)); color: var(--ta-text); }\n.ta-account-others { display: flex; flex-direction: column; gap: 6px; }\n.ta-account-others h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-account-recent-mark { display: grid; place-items: center; background: var(--ta-hover); color: var(--ta-text); }\n.ta-account-ask { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 58; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; width: min(420px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 16px; border: 1px solid var(--ta-border); background: var(--ta-card); box-shadow: var(--ta-shadow-pop); transform: translateX(-50%); animation: ta-fade 160ms ease-out; }\n.ta-account-ask-text { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; }\n.ta-account-ask-text strong { max-width: 100%; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-account-ask .ta-account-code { padding: 4px 10px; border-radius: 8px; font-size: calc(20px * var(--ta-font-scale)); }\n.ta-account-ask-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }\n.ta-account-ask-actions .ta-link-button { margin-right: auto; }\n";
|
|
@@ -185,7 +185,6 @@ body:has(.ta-folder) .ta-remote-status { display: none; }
|
|
|
185
185
|
.ta-account-sign-in { display: flex; width: 100%; flex-direction: column; gap: 12px; text-align: left; }
|
|
186
186
|
.ta-account-signed { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; text-align: center; }
|
|
187
187
|
.ta-account-signed .ta-account-who { font-size: calc(14px * var(--ta-font-scale)); color: var(--ta-text); }
|
|
188
|
-
.ta-account-offer { display: flex; flex-direction: column; gap: 10px; }
|
|
189
188
|
.ta-account-others { display: flex; flex-direction: column; gap: 6px; }
|
|
190
189
|
.ta-account-others h2 { margin: 0 4px; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }
|
|
191
190
|
.ta-account-recent-mark { display: grid; place-items: center; background: var(--ta-hover); color: var(--ta-text); }
|
|
@@ -73,8 +73,8 @@ export declare namespace ComposerUtil {
|
|
|
73
73
|
function commands<T extends {
|
|
74
74
|
name: string;
|
|
75
75
|
}>(all: T[], query: string, limit?: number): T[];
|
|
76
|
-
/** One button sends and stops: it stops while the agent works and there is nothing to send. */
|
|
77
|
-
function action(working: boolean, sendable: boolean): 'send' | 'stop';
|
|
76
|
+
/** One button sends and stops: it stops while the agent works, or the conversation is compacted, and there is nothing to send. */
|
|
77
|
+
function action(working: boolean, sendable: boolean, compacting?: boolean): 'send' | 'stop';
|
|
78
78
|
/** The empty box's words: on a finger only the short ones, which fit a phone beside the + and the buttons. */
|
|
79
79
|
function placeholderKey(working: boolean, touch: boolean): MessageId;
|
|
80
80
|
/** Why a pasted or dropped file is not taken, if it is not. */
|
|
@@ -76,9 +76,9 @@ export var ComposerUtil;
|
|
|
76
76
|
return [...starts, ...contains].slice(0, limit);
|
|
77
77
|
}
|
|
78
78
|
ComposerUtil.commands = commands;
|
|
79
|
-
/** One button sends and stops: it stops while the agent works and there is nothing to send. */
|
|
80
|
-
function action(working, sendable) {
|
|
81
|
-
return working && !sendable ? 'stop' : 'send';
|
|
79
|
+
/** One button sends and stops: it stops while the agent works, or the conversation is compacted, and there is nothing to send. */
|
|
80
|
+
function action(working, sendable, compacting = false) {
|
|
81
|
+
return (working || compacting) && !sendable ? 'stop' : 'send';
|
|
82
82
|
}
|
|
83
83
|
ComposerUtil.action = action;
|
|
84
84
|
/** The empty box's words: on a finger only the short ones, which fit a phone beside the + and the buttons. */
|
|
@@ -37,10 +37,14 @@ export declare namespace ToolUtil {
|
|
|
37
37
|
/** What the resolvers of web extensions use for a tool, from `index` on: the first asks the next. */
|
|
38
38
|
function renderer(resolvers: readonly WebToolRendererResolver[], name: string, index?: number): WebToolRenderer | undefined;
|
|
39
39
|
/** A call in one line; a tool a web extension draws reads as it says (`resolvers`, WebToolRendererResolver). */
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* `input`: what another agent gave its call (`details.input` of an `agent_tool` result), for a call of one
|
|
42
|
+
* of Ta's own tools it made through MCP to read as Ta's call does.
|
|
43
|
+
*/
|
|
44
|
+
function summary(name: string, args: Record<string, unknown>, resolvers?: readonly WebToolRendererResolver[], input?: Record<string, unknown>): ToolSummary;
|
|
41
45
|
/**
|
|
42
46
|
* What a call does, in words: the verb ta or the extension gave; else the name, as words, for a name in
|
|
43
|
-
* snake case (`list_channels`: List channels), as it is for others (
|
|
47
|
+
* snake case (`list_channels`: List channels), as it is for others (`ViewImage`).
|
|
44
48
|
*/
|
|
45
49
|
function verb(summary: Pick<ToolSummary, 'verb' | 'label' | 'name'>, t: Translate): string;
|
|
46
50
|
/** What a script says it does in its first comment, when it has one. */
|
package/esm/browser/util/tool.js
CHANGED
|
@@ -83,6 +83,11 @@ function command(name, text) {
|
|
|
83
83
|
? { verb: said.verb, name, target: line(said.target), code: said.code }
|
|
84
84
|
: { verb: 'ta.tool.verb.bash', name, target: line(ShellWords.work(text)), code: true };
|
|
85
85
|
}
|
|
86
|
+
/** An MCP tool's name, `mcp__server__tool`, as its server and tool. */
|
|
87
|
+
function mcp(name) {
|
|
88
|
+
const found = /^mcp__(.+?)__(.+)$/.exec(name);
|
|
89
|
+
return found ? { server: found[1], tool: found[2] } : undefined;
|
|
90
|
+
}
|
|
86
91
|
/** A path in a line: the file and the folder it is in, not where that folder is (`…/util/tool.ts`). */
|
|
87
92
|
function short(path) {
|
|
88
93
|
const parts = path.split('/').filter(Boolean);
|
|
@@ -97,7 +102,11 @@ export var ToolUtil;
|
|
|
97
102
|
}
|
|
98
103
|
ToolUtil.renderer = renderer;
|
|
99
104
|
/** A call in one line; a tool a web extension draws reads as it says (`resolvers`, WebToolRendererResolver). */
|
|
100
|
-
|
|
105
|
+
/**
|
|
106
|
+
* `input`: what another agent gave its call (`details.input` of an `agent_tool` result), for a call of one
|
|
107
|
+
* of Ta's own tools it made through MCP to read as Ta's call does.
|
|
108
|
+
*/
|
|
109
|
+
function summary(name, args, resolvers, input) {
|
|
101
110
|
var _a, _b;
|
|
102
111
|
var _c, _d;
|
|
103
112
|
if (resolvers === null || resolvers === void 0 ? void 0 : resolvers.length) {
|
|
@@ -141,6 +150,16 @@ export var ToolUtil;
|
|
|
141
150
|
const kind = str(args.kind);
|
|
142
151
|
const tool = str(args.tool) || str(args.title) || name;
|
|
143
152
|
const target = line(str(args.target) || str(args.title));
|
|
153
|
+
const via = mcp(tool);
|
|
154
|
+
if ((via === null || via === void 0 ? void 0 : via.server) === 'ta') {
|
|
155
|
+
// One of Ta's own tools, called through MCP: read as Ta's call of it, by what it was given;
|
|
156
|
+
// before the agent says (while it runs), by what it was on.
|
|
157
|
+
const own = summary(via.tool, input !== null && input !== void 0 ? input : {}, resolvers);
|
|
158
|
+
return own.label || own.verb ? { ...own, name: tool, target: own.target || target } : { name: via.tool, target, code: false };
|
|
159
|
+
}
|
|
160
|
+
if (via) {
|
|
161
|
+
return { name: via.tool, target: target === tool ? '' : target, code: false };
|
|
162
|
+
}
|
|
144
163
|
if (kind === 'execute') {
|
|
145
164
|
return { ...command(tool, str(args.target) || str(args.title)), name: tool };
|
|
146
165
|
}
|
|
@@ -168,18 +187,22 @@ export var ToolUtil;
|
|
|
168
187
|
ToolUtil.summary = summary;
|
|
169
188
|
/**
|
|
170
189
|
* What a call does, in words: the verb ta or the extension gave; else the name, as words, for a name in
|
|
171
|
-
* snake case (`list_channels`: List channels), as it is for others (
|
|
190
|
+
* snake case (`list_channels`: List channels), as it is for others (`ViewImage`).
|
|
172
191
|
*/
|
|
173
192
|
function verb(summary, t) {
|
|
193
|
+
var _a;
|
|
174
194
|
if (summary.label) {
|
|
175
195
|
return summary.label;
|
|
176
196
|
}
|
|
177
197
|
if (summary.verb) {
|
|
178
198
|
return t(summary.verb);
|
|
179
199
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
200
|
+
// An MCP tool reads by its own name, not its server's (`mcp__github__search_issues`: Search issues).
|
|
201
|
+
const via = (_a = mcp(summary.name)) === null || _a === void 0 ? void 0 : _a.tool;
|
|
202
|
+
const name = via !== null && via !== void 0 ? via : summary.name;
|
|
203
|
+
return (via ? /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/ : /^[a-z][a-z0-9]*(_[a-z0-9]+)+$/).test(name)
|
|
204
|
+
? name.charAt(0).toUpperCase() + name.slice(1).replace(/_/g, ' ')
|
|
205
|
+
: name;
|
|
183
206
|
}
|
|
184
207
|
ToolUtil.verb = verb;
|
|
185
208
|
/** What a script says it does in its first comment, when it has one. */
|
|
@@ -26,9 +26,18 @@ export declare namespace Voice {
|
|
|
26
26
|
* At most 100 are taken, with the directory and the names a box adds.
|
|
27
27
|
*/
|
|
28
28
|
const VOCABULARY: readonly string[];
|
|
29
|
+
/**
|
|
30
|
+
* Whether the page can listen. Not in WeChat's mini program, on a phone or a computer: its web-view has the
|
|
31
|
+
* recognition of WebKit or Chromium, and always refuses it (`not-allowed`), with nowhere for the user to allow it.
|
|
32
|
+
*/
|
|
29
33
|
function canListen(): boolean;
|
|
30
34
|
/** The user, the system or the browser does not let the page listen: the microphone or speech recognition is not allowed. */
|
|
31
35
|
function denied(error: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* What to tell the user of a listening that failed. `service-not-allowed` is the browser's recognizer that is not
|
|
38
|
+
* there (Siri and dictation off on iOS, a browser without the service): no setting of the page's allows it.
|
|
39
|
+
*/
|
|
40
|
+
function failure(error: string): 'ta.composer.voiceDenied' | 'ta.composer.voiceUnavailable' | 'ta.composer.voiceFailed';
|
|
32
41
|
interface Listening {
|
|
33
42
|
stop(): void;
|
|
34
43
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MiniProgram } from '../device/mini-program.js';
|
|
1
2
|
import { DesktopUtil } from './desktop.js';
|
|
2
3
|
/** Talking to ta and hearing it, with what the browser or the app has: no service, no dependency. */
|
|
3
4
|
export var Voice;
|
|
@@ -83,7 +84,14 @@ export var Voice;
|
|
|
83
84
|
}
|
|
84
85
|
return DesktopUtil.speech();
|
|
85
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Whether the page can listen. Not in WeChat's mini program, on a phone or a computer: its web-view has the
|
|
89
|
+
* recognition of WebKit or Chromium, and always refuses it (`not-allowed`), with nowhere for the user to allow it.
|
|
90
|
+
*/
|
|
86
91
|
function canListen() {
|
|
92
|
+
if (MiniProgram.inside()) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
87
95
|
return nativeSpeech() !== undefined || recognitionClass() !== undefined;
|
|
88
96
|
}
|
|
89
97
|
Voice.canListen = canListen;
|
|
@@ -92,6 +100,18 @@ export var Voice;
|
|
|
92
100
|
return error === 'not-allowed' || error === 'service-not-allowed';
|
|
93
101
|
}
|
|
94
102
|
Voice.denied = denied;
|
|
103
|
+
/**
|
|
104
|
+
* What to tell the user of a listening that failed. `service-not-allowed` is the browser's recognizer that is not
|
|
105
|
+
* there (Siri and dictation off on iOS, a browser without the service): no setting of the page's allows it.
|
|
106
|
+
*/
|
|
107
|
+
function failure(error) {
|
|
108
|
+
return error === 'service-not-allowed'
|
|
109
|
+
? 'ta.composer.voiceUnavailable'
|
|
110
|
+
: error === 'not-allowed'
|
|
111
|
+
? 'ta.composer.voiceDenied'
|
|
112
|
+
: 'ta.composer.voiceFailed';
|
|
113
|
+
}
|
|
114
|
+
Voice.failure = failure;
|
|
95
115
|
/**
|
|
96
116
|
* The words of a recognition's results. Safari's repeat what came before: a result may be all the words so far
|
|
97
117
|
* rather than the next ones, and a phrase may come twice over. A result that starts with what was said before it
|
|
@@ -51,6 +51,11 @@ export declare namespace WorkbenchUtil {
|
|
|
51
51
|
function loopback(hostname?: string): boolean;
|
|
52
52
|
/** In the Ta app on a phone, where no ta serve serves the page: it reaches one through a relay. */
|
|
53
53
|
function isApp(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A device of the user's own, with an account of its own (docs/design/ta-account.md): the Ta app, or Ta's mini
|
|
56
|
+
* program of WeChat (docs/design/ta-weapp.md); no ta serve serves its page, it pairs with computers through a relay.
|
|
57
|
+
*/
|
|
58
|
+
function ownDevice(): boolean;
|
|
54
59
|
function readPairing(text: string | null): RelayPairing | undefined;
|
|
55
60
|
/**
|
|
56
61
|
* Whether the server of the page answers at all. A WebSocket that does not open cannot say why: a
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TA_WEBSOCKET_PATH } from '@celljs/ta-protocol';
|
|
2
2
|
import { RelayPairingUtil } from '@celljs/ta-relay';
|
|
3
|
+
import { MiniProgram } from './device/mini-program.js';
|
|
3
4
|
import { HostUtil } from './hosts.js';
|
|
4
5
|
/** Before the list of hosts (HostUtil.KEY): the one token or pairing, taken into the list once. */
|
|
5
6
|
const TOKEN_KEY = 'ta.token';
|
|
@@ -92,6 +93,14 @@ export var WorkbenchUtil;
|
|
|
92
93
|
return Boolean((_b = (_a = globalThis.Capacitor) === null || _a === void 0 ? void 0 : _a.isNativePlatform) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
93
94
|
}
|
|
94
95
|
WorkbenchUtil.isApp = isApp;
|
|
96
|
+
/**
|
|
97
|
+
* A device of the user's own, with an account of its own (docs/design/ta-account.md): the Ta app, or Ta's mini
|
|
98
|
+
* program of WeChat (docs/design/ta-weapp.md); no ta serve serves its page, it pairs with computers through a relay.
|
|
99
|
+
*/
|
|
100
|
+
function ownDevice() {
|
|
101
|
+
return isApp() || MiniProgram.inside();
|
|
102
|
+
}
|
|
103
|
+
WorkbenchUtil.ownDevice = ownDevice;
|
|
95
104
|
function readPairing(text) {
|
|
96
105
|
try {
|
|
97
106
|
return text ? RelayPairingUtil.parse(RelayPairingUtil.link(JSON.parse(text))) : undefined;
|
package/esm/browser/workbench.js
CHANGED
|
@@ -12,6 +12,7 @@ import { TaConnection } from '@celljs/ta-client';
|
|
|
12
12
|
import { TaErrorCode, TaRoomWatchUtil } from '@celljs/ta-protocol';
|
|
13
13
|
import { RelayRouteSocket } from '@celljs/ta-relay';
|
|
14
14
|
import { TaCallKeeper } from './assistant/call-keeper.js';
|
|
15
|
+
import { MiniProgram } from './device/mini-program.js';
|
|
15
16
|
import { HostUtil } from './hosts.js';
|
|
16
17
|
import { PresenceReporter } from './presence/presence-reporter.js';
|
|
17
18
|
import { PageBuild } from './pwa/page-build.js';
|
|
@@ -163,9 +164,13 @@ let TaWorkbenchImpl = class TaWorkbenchImpl extends WorkbenchHosts {
|
|
|
163
164
|
const fragment = new URLSearchParams(location.hash.slice(1));
|
|
164
165
|
// 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).
|
|
165
166
|
const fromUrl = WorkbenchUtil.fromFragment(fragment);
|
|
166
|
-
|
|
167
|
+
// A code the scan page of Ta's mini program of WeChat read, opened once connected (ScanHost).
|
|
168
|
+
const scanned = MiniProgram.arrive(fragment);
|
|
169
|
+
if (fromUrl || scanned) {
|
|
167
170
|
// Out of the address bar, the history and bookmarks.
|
|
168
171
|
history.replaceState(null, '', location.pathname + location.search);
|
|
172
|
+
}
|
|
173
|
+
if (fromUrl) {
|
|
169
174
|
this.keepHosts(HostUtil.use(this.list, WorkbenchUtil.serverOf(fromUrl, pageHost()), fromUrl, Date.now()));
|
|
170
175
|
}
|
|
171
176
|
const host = this.list.hosts.find(one => one.id === this.list.current);
|
|
@@ -68,7 +68,7 @@ async function appService(hosts, current) {
|
|
|
68
68
|
*/
|
|
69
69
|
function useAccountSide() {
|
|
70
70
|
const [{ status, hosts, host }, bench] = (0, hooks_1.useWorkbench)();
|
|
71
|
-
const app = workbench_util_1.WorkbenchUtil.
|
|
71
|
+
const app = workbench_util_1.WorkbenchUtil.ownDevice();
|
|
72
72
|
const where = React.useRef({ hosts, host });
|
|
73
73
|
where.current = { hosts, host };
|
|
74
74
|
const online = status === 'online';
|
|
@@ -9,6 +9,8 @@ export interface AccountSide {
|
|
|
9
9
|
approve(id: string): Promise<TaAccountInfo>;
|
|
10
10
|
remove(id: string): Promise<TaAccountInfo>;
|
|
11
11
|
signOut(): Promise<TaAccountInfo>;
|
|
12
|
+
/** The device's own (DeviceAccount.joinThrough): signs in as the computer in use is, which lets it in. */
|
|
13
|
+
joinThrough?(): Promise<TaAccountInfo>;
|
|
12
14
|
}
|
|
13
15
|
/** The computers a device's account brings, kept with the device's computers (TaWorkbench). */
|
|
14
16
|
export interface AccountHosts {
|
|
@@ -84,6 +86,12 @@ export declare class DeviceAccount implements AccountSide {
|
|
|
84
86
|
protected bringPending(): Promise<void>;
|
|
85
87
|
/** The computers this device brought in, let in as soon as they ask. */
|
|
86
88
|
protected letInBrought(view: AccountView): Promise<AccountView>;
|
|
89
|
+
/**
|
|
90
|
+
* Signs in as the computer in use is (docs/design/ta-account.md 4.4): this device, connected to it by its code, joins
|
|
91
|
+
* its account with a token it gives, and the computer lets it in at once. No page of a provider to open, which the
|
|
92
|
+
* mini program of WeChat cannot.
|
|
93
|
+
*/
|
|
94
|
+
joinThrough(): Promise<TaAccountInfo>;
|
|
87
95
|
/** The one of the page, once made. */
|
|
88
96
|
static current(): DeviceAccount | undefined;
|
|
89
97
|
/** The one of the page. */
|
|
@@ -125,6 +125,32 @@ class DeviceAccount {
|
|
|
125
125
|
}
|
|
126
126
|
return next;
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Signs in as the computer in use is (docs/design/ta-account.md 4.4): this device, connected to it by its code, joins
|
|
130
|
+
* its account with a token it gives, and the computer lets it in at once. No page of a provider to open, which the
|
|
131
|
+
* mini program of WeChat cannot.
|
|
132
|
+
*/
|
|
133
|
+
async joinThrough() {
|
|
134
|
+
var _a, _b;
|
|
135
|
+
const { host } = this.hosts.state;
|
|
136
|
+
const { service, token } = await this.hosts.account.inviteDevice();
|
|
137
|
+
const there = await this.hosts.account.getAccount();
|
|
138
|
+
const kept = await ta_relay_1.AccountAgent.create(service, token, { id: '', name: '' }, 'phone', DeviceAccount.deviceName());
|
|
139
|
+
(_a = (0, workbench_util_1.storage)()) === null || _a === void 0 ? void 0 : _a.setItem(KEY, JSON.stringify(kept));
|
|
140
|
+
(_b = (0, workbench_util_1.storage)()) === null || _b === void 0 ? void 0 : _b.removeItem(OFF_KEY);
|
|
141
|
+
this.signingIn = undefined;
|
|
142
|
+
this.agent = this.agentOf(kept);
|
|
143
|
+
this.view = await this.agent.sync();
|
|
144
|
+
await this.hosts.account.approve(kept.self.id);
|
|
145
|
+
const computer = there.devices.find(one => one.self);
|
|
146
|
+
if (host && computer) {
|
|
147
|
+
this.hosts.markAccountHost(host, computer.id);
|
|
148
|
+
}
|
|
149
|
+
this.view = await this.agent.sync();
|
|
150
|
+
this.error = undefined;
|
|
151
|
+
this.schedule(0);
|
|
152
|
+
return this.read();
|
|
153
|
+
}
|
|
128
154
|
/** The one of the page, once made. */
|
|
129
155
|
static current() {
|
|
130
156
|
return DeviceAccount.instance;
|
|
@@ -357,7 +357,7 @@ function Chat({ store, tasks, taskStates, onTask, onMood, onTasks }) {
|
|
|
357
357
|
React.createElement(connection_bar_1.ConnectionBanner, null),
|
|
358
358
|
addons.above,
|
|
359
359
|
React.createElement(voice_call_bar_1.CallBar, { state: callState, call: call }),
|
|
360
|
-
React.createElement(composer_1.Composer, { ref: box, store: store, server: bench.server, workspace: bench.workspace, working: state.working, commands: session.settings.commands, cwd: cwd, placeholder: t('ta.assistant.placeholder'), actions: actions, onSending: hush, onStopTimed: stopTimed, onError: fail, after: speaking ? React.createElement(voice_button_1.SpeakingButton, { onStop: hush }) : undefined, voiceSends: true, recentShots: settingsState.settings.recentShots, talkPlace: "double", draft: drafts_protocol_1.DraftPlaces.DOUBLE, onTalkSent: () => {
|
|
360
|
+
React.createElement(composer_1.Composer, { ref: box, store: store, server: bench.server, workspace: bench.workspace, working: state.working, compacting: !!state.compacting, commands: session.settings.commands, cwd: cwd, placeholder: t('ta.assistant.placeholder'), actions: actions, onSending: hush, onStopTimed: stopTimed, onError: fail, after: speaking ? React.createElement(voice_button_1.SpeakingButton, { onStop: hush }) : undefined, voiceSends: true, recentShots: settingsState.settings.recentShots, talkPlace: "double", draft: drafts_protocol_1.DraftPlaces.DOUBLE, onTalkSent: () => {
|
|
361
361
|
aloud.current = speakTalk;
|
|
362
362
|
}, onTalkCall: voice_1.Voice.canSpeak() && voice_1.Voice.canListen() && !callState.active ? (0, voice_call_bar_1.talkCall)(call) : undefined, talkCalls: talkCalls, onListening: on => {
|
|
363
363
|
setListening(on);
|
|
@@ -2,7 +2,7 @@ import { type LucideIcon } from 'lucide-react';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { SettingsSection } from './settings-view';
|
|
4
4
|
/** What an entry of the account opens over the page. */
|
|
5
|
-
export type AccountDialog = 'accounts' | 'relay' | 'devices' | 'profile';
|
|
5
|
+
export type AccountDialog = 'accounts' | 'relay' | 'devices' | 'profile' | 'signIn';
|
|
6
6
|
/** An entry of the account: an item of the menu of the rail, a row of Me on a phone. */
|
|
7
7
|
export interface AccountEntry {
|
|
8
8
|
key: string;
|
|
@@ -76,7 +76,7 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
76
76
|
const side = (0, account_side_1.useAccountSide)();
|
|
77
77
|
const { info } = (0, account_side_1.useAccountInfo)(side, 15000);
|
|
78
78
|
const signedIn = Boolean(info === null || info === void 0 ? void 0 : info.account);
|
|
79
|
-
const app = workbench_util_1.WorkbenchUtil.
|
|
79
|
+
const app = workbench_util_1.WorkbenchUtil.ownDevice();
|
|
80
80
|
const [{ views }, extensions] = (0, hooks_1.useWebExtensions)();
|
|
81
81
|
const own = views.filter(view => view.group === 'me' && view.location === 'page');
|
|
82
82
|
// Signed in, out of the account (its computers go, those connected by a code stay); else out of the computer in use.
|
|
@@ -122,6 +122,7 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
122
122
|
}
|
|
123
123
|
entry('install', t('ta.pwa.install'), lucide_react_1.Download, () => void pwa.install(), { action: true });
|
|
124
124
|
// As WeChat's: the account in use kept, with its computers, to come back to in one tap (docs/design/ta-me.md 4).
|
|
125
|
+
entry('signIn', t('ta.me.signIn'), lucide_react_1.LogIn, () => onDialog('signIn'));
|
|
125
126
|
entry('switchAccount', t('ta.account.switchSignIn'), lucide_react_1.ArrowLeftRight, () => { var _a; return (_a = device_account_1.DeviceAccount.current()) === null || _a === void 0 ? void 0 : _a.switchAccount(); });
|
|
126
127
|
entry('signOut', t('ta.settings.signOut'), lucide_react_1.LogOut, () => void signOut(), { danger: true });
|
|
127
128
|
return me_rows_1.MeUtil.keys({
|
|
@@ -130,6 +131,8 @@ function useAccountEntries(onSettings, onDialog) {
|
|
|
130
131
|
update: Boolean(update),
|
|
131
132
|
installable: installable && !standalone,
|
|
132
133
|
switchAccount: app && signedIn,
|
|
134
|
+
// The account is who the user is, not one of their devices (docs/design/ta-me.md 4).
|
|
135
|
+
signIn: Boolean(info) && !signedIn,
|
|
133
136
|
pairPhone: !app && !handheld,
|
|
134
137
|
}).map(group => group.map(key => entries[key]));
|
|
135
138
|
}
|
|
@@ -139,7 +142,8 @@ function AccountDialogs({ dialog, onClose, onDialog }) {
|
|
|
139
142
|
dialog === 'profile' && React.createElement(profile_view_1.ProfileDialog, { onClose: onClose, onDevices: () => onDialog('devices') }),
|
|
140
143
|
dialog === 'accounts' && React.createElement(auth_view_1.AuthDialog, { onClose: onClose }),
|
|
141
144
|
dialog === 'relay' && React.createElement(relay_view_1.RelayDialog, { onClose: onClose }),
|
|
142
|
-
dialog === 'devices' && React.createElement(account_view_1.DevicesDialog, { onClose: onClose })
|
|
145
|
+
dialog === 'devices' && React.createElement(account_view_1.DevicesDialog, { onClose: onClose }),
|
|
146
|
+
dialog === 'signIn' && React.createElement(account_view_1.AccountSignInDialog, { onClose: onClose })));
|
|
143
147
|
}
|
|
144
148
|
/**
|
|
145
149
|
* The round figure of the user: the picture they gave themselves (docs/design/ta-me.md 3), else the close-up of the
|
|
@@ -35,6 +35,13 @@ export declare function RecentAccounts(): React.JSX.Element;
|
|
|
35
35
|
export declare function DevicesDialog({ onClose }: {
|
|
36
36
|
onClose(): void;
|
|
37
37
|
}): React.ReactPortal;
|
|
38
|
+
/**
|
|
39
|
+
* Signing in to an account, from Me (docs/design/ta-me.md 4): who the user is, not one of their devices. The ways, the
|
|
40
|
+
* code to enter at the provider, waiting to be let in; closed once signed in, the computers of the account coming in.
|
|
41
|
+
*/
|
|
42
|
+
export declare function AccountSignInDialog({ onClose }: {
|
|
43
|
+
onClose(): void;
|
|
44
|
+
}): React.ReactPortal;
|
|
38
45
|
/**
|
|
39
46
|
* A device asks to join the account: whichever device of it the user has at hand says so, with the code to compare,
|
|
40
47
|
* until it is let in, refused, or put off for now.
|