@celljs/ta-web 4.12.0 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-extension.js +14 -0
- package/esm/browser/assistant/assistant-initiative.d.ts +27 -0
- package/esm/browser/assistant/assistant-initiative.js +76 -0
- package/esm/browser/assistant/assistant-task-source.d.ts +7 -0
- package/esm/browser/assistant/assistant-task-source.js +12 -2
- package/esm/browser/assistant/assistant-view.js +5 -4
- package/esm/browser/assistant/assistant.d.ts +5 -0
- package/esm/browser/assistant/assistant.js +25 -6
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +5 -2
- package/esm/browser/components/app-view.js +18 -9
- package/esm/browser/components/asks-badge.d.ts +5 -0
- package/esm/browser/components/asks-badge.js +8 -0
- package/esm/browser/components/chat-asks.d.ts +46 -0
- package/esm/browser/components/chat-asks.js +101 -0
- package/esm/browser/components/chat-list.d.ts +7 -1
- package/esm/browser/components/chat-list.js +46 -17
- package/esm/browser/components/composer-addon-util.d.ts +11 -0
- package/esm/browser/components/composer-addon-util.js +40 -0
- package/esm/browser/components/composer-addons.d.ts +1 -7
- package/esm/browser/components/composer-addons.js +1 -27
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +33 -20
- package/esm/browser/components/connection-bar.js +31 -12
- package/esm/browser/components/conversation-scroll-util.d.ts +5 -0
- package/esm/browser/components/conversation-scroll-util.js +18 -0
- package/esm/browser/components/conversation-scroll.d.ts +12 -2
- package/esm/browser/components/conversation-scroll.js +68 -5
- package/esm/browser/components/discover-view.js +5 -1
- package/esm/browser/components/earlier-messages.d.ts +10 -3
- package/esm/browser/components/earlier-messages.js +14 -8
- package/esm/browser/components/folder-picker.d.ts +2 -0
- package/esm/browser/components/folder-picker.js +7 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/markdown.js +4 -2
- package/esm/browser/components/media.js +4 -39
- package/esm/browser/components/mermaid-view.js +45 -3
- package/esm/browser/components/message-footer.d.ts +2 -0
- package/esm/browser/components/message-footer.js +8 -1
- package/esm/browser/components/message-list.d.ts +12 -0
- package/esm/browser/components/message-list.js +156 -25
- package/esm/browser/components/phone-shell.d.ts +7 -2
- package/esm/browser/components/phone-shell.js +7 -3
- package/esm/browser/components/relay-services.d.ts +24 -0
- package/esm/browser/components/relay-services.js +249 -0
- package/esm/browser/components/relay-view.js +17 -1
- package/esm/browser/components/remote-hosts.js +1 -1
- package/esm/browser/components/session-view.js +16 -4
- package/esm/browser/components/settings-controls.js +3 -3
- package/esm/browser/components/settings-parts.js +13 -1
- package/esm/browser/components/ta-avatar.js +6 -0
- package/esm/browser/components/tool-result.d.ts +13 -0
- package/esm/browser/components/tool-result.js +138 -0
- package/esm/browser/components/tool-view.js +5 -15
- package/esm/browser/components/web-composer.js +2 -1
- package/esm/browser/extension/extension-view.d.ts +3 -1
- package/esm/browser/extension/extension-view.js +7 -0
- package/esm/browser/extension/icons.js +9 -1
- package/esm/browser/extension/web-api-components.d.ts +3 -3
- package/esm/browser/extension/web-api-contributions.d.ts +119 -0
- package/esm/browser/extension/web-extension-api.d.ts +23 -46
- package/esm/browser/extension/web-extension-context.d.ts +6 -1
- package/esm/browser/extension/web-extension-context.js +63 -6
- package/esm/browser/extension/web-extension-protocol.d.ts +5 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extension-run.d.ts +3 -2
- package/esm/browser/extension/web-extension-run.js +3 -0
- package/esm/browser/extension/web-extensions.d.ts +2 -8
- package/esm/browser/extension/web-extensions.js +9 -35
- package/esm/browser/extension/web-page-list.d.ts +25 -0
- package/esm/browser/extension/web-page-list.js +35 -0
- package/esm/browser/extension/web-session-notices.d.ts +6 -1
- package/esm/browser/extension/web-session-notices.js +30 -4
- package/esm/browser/extension/web-sharing.d.ts +5 -2
- package/esm/browser/extension/web-sharing.js +10 -1
- package/esm/browser/i18n/locales.d.ts +69 -3
- package/esm/browser/i18n/messages.d.ts +68 -2
- package/esm/browser/i18n/messages.js +138 -6
- package/esm/browser/markdown/code-renderers.d.ts +4 -0
- package/esm/browser/markdown/code-renderers.js +4 -0
- package/esm/browser/markdown/lazy.d.ts +8 -0
- package/esm/browser/markdown/lazy.js +35 -0
- package/esm/browser/markdown/mermaid.d.ts +15 -3
- package/esm/browser/markdown/mermaid.js +45 -6
- package/esm/browser/notices/notices-protocol.d.ts +5 -0
- package/esm/browser/notices/notices.d.ts +19 -0
- package/esm/browser/notices/notices.js +85 -2
- package/esm/browser/notices/session-notices.d.ts +5 -2
- package/esm/browser/notices/session-notices.js +10 -1
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +2 -1
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +51 -0
- package/esm/browser/style/device.js +3 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +24 -9
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -0
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +2 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +14 -3
- package/esm/browser/util/desktop.d.ts +18 -1
- package/esm/browser/util/desktop.js +13 -0
- package/esm/browser/util/process.d.ts +26 -1
- package/esm/browser/util/process.js +79 -5
- package/esm/browser/util/progress.d.ts +6 -1
- package/esm/browser/util/progress.js +11 -2
- package/esm/browser/util/scroll-rest.d.ts +10 -0
- package/esm/browser/util/scroll-rest.js +44 -0
- package/esm/browser/util/tool-result.d.ts +32 -0
- package/esm/browser/util/tool-result.js +85 -0
- package/esm/browser/util/tool.js +7 -0
- package/lib/browser/assistant/assistant-extension.js +14 -0
- package/lib/browser/assistant/assistant-initiative.d.ts +28 -0
- package/lib/browser/assistant/assistant-initiative.js +80 -0
- package/lib/browser/assistant/assistant-task-source.d.ts +7 -0
- package/lib/browser/assistant/assistant-task-source.js +12 -2
- package/lib/browser/assistant/assistant-view.js +3 -2
- package/lib/browser/assistant/assistant.d.ts +5 -0
- package/lib/browser/assistant/assistant.js +24 -5
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +5 -2
- package/lib/browser/components/app-view.js +17 -8
- package/lib/browser/components/asks-badge.d.ts +6 -0
- package/lib/browser/components/asks-badge.js +44 -0
- package/lib/browser/components/chat-asks.d.ts +47 -0
- package/lib/browser/components/chat-asks.js +104 -0
- package/lib/browser/components/chat-list.d.ts +7 -1
- package/lib/browser/components/chat-list.js +46 -17
- package/lib/browser/components/composer-addon-util.d.ts +12 -0
- package/lib/browser/components/composer-addon-util.js +76 -0
- package/lib/browser/components/composer-addons.d.ts +1 -7
- package/lib/browser/components/composer-addons.js +2 -29
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +33 -19
- package/lib/browser/components/connection-bar.js +30 -11
- package/lib/browser/components/conversation-scroll-util.d.ts +5 -0
- package/lib/browser/components/conversation-scroll-util.js +18 -0
- package/lib/browser/components/conversation-scroll.d.ts +12 -2
- package/lib/browser/components/conversation-scroll.js +68 -5
- package/lib/browser/components/discover-view.js +5 -1
- package/lib/browser/components/earlier-messages.d.ts +10 -3
- package/lib/browser/components/earlier-messages.js +16 -9
- package/lib/browser/components/folder-picker.d.ts +2 -0
- package/lib/browser/components/folder-picker.js +7 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/markdown.js +3 -1
- package/lib/browser/components/media.js +3 -38
- package/lib/browser/components/mermaid-view.js +45 -3
- package/lib/browser/components/message-footer.d.ts +2 -0
- package/lib/browser/components/message-footer.js +8 -0
- package/lib/browser/components/message-list.d.ts +12 -0
- package/lib/browser/components/message-list.js +153 -20
- package/lib/browser/components/phone-shell.d.ts +7 -2
- package/lib/browser/components/phone-shell.js +7 -3
- package/lib/browser/components/relay-services.d.ts +25 -0
- package/lib/browser/components/relay-services.js +286 -0
- package/lib/browser/components/relay-view.js +17 -1
- package/lib/browser/components/remote-hosts.js +1 -1
- package/lib/browser/components/session-view.js +15 -3
- package/lib/browser/components/settings-controls.js +3 -3
- package/lib/browser/components/settings-parts.js +13 -1
- package/lib/browser/components/ta-avatar.js +6 -0
- package/lib/browser/components/tool-result.d.ts +14 -0
- package/lib/browser/components/tool-result.js +175 -0
- package/lib/browser/components/tool-view.js +10 -20
- package/lib/browser/components/web-composer.js +2 -1
- package/lib/browser/extension/extension-view.d.ts +3 -1
- package/lib/browser/extension/extension-view.js +8 -1
- package/lib/browser/extension/icons.js +8 -0
- package/lib/browser/extension/web-api-components.d.ts +3 -3
- package/lib/browser/extension/web-api-contributions.d.ts +119 -0
- package/lib/browser/extension/web-extension-api.d.ts +23 -46
- package/lib/browser/extension/web-extension-context.d.ts +6 -1
- package/lib/browser/extension/web-extension-context.js +63 -6
- package/lib/browser/extension/web-extension-protocol.d.ts +5 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extension-run.d.ts +3 -2
- package/lib/browser/extension/web-extension-run.js +3 -0
- package/lib/browser/extension/web-extensions.d.ts +2 -8
- package/lib/browser/extension/web-extensions.js +9 -35
- package/lib/browser/extension/web-page-list.d.ts +26 -0
- package/lib/browser/extension/web-page-list.js +39 -0
- package/lib/browser/extension/web-session-notices.d.ts +6 -1
- package/lib/browser/extension/web-session-notices.js +30 -4
- package/lib/browser/extension/web-sharing.d.ts +5 -2
- package/lib/browser/extension/web-sharing.js +10 -1
- package/lib/browser/i18n/locales.d.ts +69 -3
- package/lib/browser/i18n/messages.d.ts +68 -2
- package/lib/browser/i18n/messages.js +138 -6
- package/lib/browser/markdown/code-renderers.d.ts +4 -0
- package/lib/browser/markdown/code-renderers.js +5 -1
- package/lib/browser/markdown/lazy.d.ts +8 -0
- package/lib/browser/markdown/lazy.js +37 -1
- package/lib/browser/markdown/mermaid.d.ts +15 -3
- package/lib/browser/markdown/mermaid.js +44 -5
- package/lib/browser/notices/notices-protocol.d.ts +5 -0
- package/lib/browser/notices/notices.d.ts +19 -0
- package/lib/browser/notices/notices.js +84 -1
- package/lib/browser/notices/session-notices.d.ts +5 -2
- package/lib/browser/notices/session-notices.js +10 -1
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +2 -1
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +51 -0
- package/lib/browser/style/device.js +3 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +24 -9
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -0
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +2 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +14 -3
- package/lib/browser/util/desktop.d.ts +18 -1
- package/lib/browser/util/desktop.js +13 -0
- package/lib/browser/util/process.d.ts +26 -1
- package/lib/browser/util/process.js +79 -5
- package/lib/browser/util/progress.d.ts +6 -1
- package/lib/browser/util/progress.js +11 -2
- package/lib/browser/util/scroll-rest.d.ts +11 -0
- package/lib/browser/util/scroll-rest.js +47 -0
- package/lib/browser/util/tool-result.d.ts +33 -0
- package/lib/browser/util/tool-result.js +88 -0
- package/lib/browser/util/tool.js +7 -0
- package/package.json +7 -7
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* workbench over it. Where each rests; the finger moves them in between (device/sheet-swipe.ts), and what
|
|
4
4
|
* a sheet covers moves 30% of the way and darkens a little, as on iOS.
|
|
5
5
|
*/
|
|
6
|
-
export declare const PHONE_STYLE = "\n/* Its screens slide in by transforms, never by scrolling: clipped, so that a focus or a menu that opens near an edge never scrolls it sideways. */\n.ta-phone { position: relative; display: block; overflow: clip; background: var(--ta-side); --ta-sheet: transform 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-home, .ta-phone-screen, .ta-phone > .ta-editors-pane { position: absolute; inset: 0; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-home { display: flex; flex-direction: column; background: var(--ta-side); }\n.ta-phone-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-phone-page > .ta-sidebar, .ta-phone-page > .ta-main { flex: 1; width: auto; min-height: 0; }\n.ta-phone-page .ta-chats, .ta-phone-page .ta-side-view { border-right: 0; padding-bottom: 0; padding-left: calc(8px + env(safe-area-inset-left)); padding-right: calc(8px + env(safe-area-inset-right)); }\n.ta-phone-page .ta-settings-head, .ta-phone-screen .ta-settings-head { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone-screen { z-index: 2; display: flex; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone-screen > .ta-main { flex: 1; min-width: 0; }\n.ta-phone[data-screen] .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n.ta-phone[data-screen] .ta-phone-screen { transform: none; }\n.ta-phone > .ta-editors-pane { z-index: 4; width: auto; min-width: 0; max-width: none; animation: none; transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone[data-workbench] > .ta-editors-pane { transform: none; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen, .ta-phone[data-workbench]:not([data-screen]) .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n/* What a sheet covers darkens a little, as on iOS (sheet-swipe.ts follows the finger with its opacity). */\n.ta-phone-dim { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.1); opacity: 0; pointer-events: none; transition: opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-dim[data-for='workbench'] { z-index: 3; }\n.ta-phone[data-screen] > .ta-phone-dim[data-for='screen'], .ta-phone[data-workbench] > .ta-phone-dim[data-for='workbench'] { opacity: 1; }\n/*\n * A layer at rest out of sight is not drawn: its shadow would show at the edge of the screen, and the page\n * would paint what nobody sees. It goes once it has slid away, and is there at once to come in, or for a finger.\n */\n.ta-phone-screen, .ta-phone > .ta-editors-pane { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-screen] .ta-phone-screen, .ta-phone[data-workbench] > .ta-editors-pane { visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-screen] .ta-phone-home, .ta-phone[data-workbench] .ta-phone-home { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n/*\n * While a finger moves a sheet, or the browser went back by itself (its own swipe was the animation), nothing slides on its own,\n * and what it uncovers is there: as specific as the rules of the layers at rest (style.spec.ts checks), so that the conversation\n * under the workbench shows while the workbench is put away.\n */\n:root[data-sheet-drag] .ta-phone > .ta-phone-home, :root[data-sheet-drag] .ta-phone > .ta-phone-screen, :root[data-sheet-drag] .ta-phone > .ta-editors-pane { visibility: visible; transition: none; }\n:root[data-sheet-drag] .ta-phone-dim { transition: none; }\n/*\n * A frame the page may not read (an HTML file, a PDF, the browser) keeps the touches on it: the left edge of the\n * workbench over it stays the page's, so that a swipe from there puts the workbench away, as iOS keeps its back\n * at the edge over web content. Frames it may read (Markdown) are listened to anywhere (sheet-swipe.ts).\n */\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe) { position: relative; }\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe)::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 24px; }\n/* A screen pushed over the screen (PhoneStack): a section of the settings over their list, as the screen over the tabs. */\n.ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; }\n.ta-phone-stack-base, .ta-phone-stack-top { position: absolute; inset: 0; display: flex; flex-direction: column; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-stack-top { z-index: 2; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-stack-top { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone-stack[data-open] > .ta-phone-stack-base { transform: translate3d(-30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-dim { opacity: 1; }\n:root[data-sheet-drag] .ta-phone-stack-base, :root[data-sheet-drag] .ta-phone-stack-top { visibility: visible; transition: none; }\n/* The tabs: a finger's height above the home indicator; away while the keyboard is up. */\n.ta-tabbar { display: flex; flex: none; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-top: 1px solid var(--ta-border-muted); background: var(--ta-side); }\n:root[data-keyboard] .ta-tabbar { display: none; }\n.ta-tabbar-item { flex: 1; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--ta-muted); font-size: calc(10.5px * var(--ta-font-scale)); -webkit-tap-highlight-color: transparent; }\n.ta-tabbar-item > span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-tabbar-item.ta-active { color: var(--ta-text); font-weight: 600; }\n.ta-tabbar-item > .ta-tabbar-icon { position: relative; display: inline-grid; place-items: center; max-width: none; padding: 0; overflow: visible; }\n.ta-tabbar-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); box-shadow: 0 0 0 2px var(--ta-side); }\n/* A finger drags it off as a drop (UnseenDrop): a wider grip than it looks, and the drop drawn over the page meanwhile. */\n.ta-tabbar-dot.ta-draggable { touch-action: none; }\n.ta-tabbar-dot.ta-draggable::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }\n.ta-tabbar-dot[data-dragging] { visibility: hidden; }\n.ta-unseen-drag { position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: var(--ta-yellow); }\n.ta-unseen-ring { fill: none; stroke: var(--ta-yellow); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ta-unseen-ring 380ms ease-out forwards; }\n.ta-unseen-spark { transform-box: fill-box; transform-origin: center; animation: ta-unseen-spark 400ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }\n@keyframes ta-unseen-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }\n@keyframes ta-unseen-spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }\n/* A row with a dot that the tab scrolled to (PhoneUtil.locate): lit up a moment. */\n[data-unseen][data-flash] { position: relative; }\n[data-unseen][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-yellow) 18%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n@keyframes ta-unseen-flash { 0%, 35% { opacity: 1; } to { opacity: 0; } }\n/* Sideways the height is short: the label beside the icon, as iOS lays its tabs out then. */\n@media (max-height: 500px) and (pointer: coarse) {\n .ta-tabbar-item { height: 40px; flex-direction: row; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); }\n}\n\n/*\n * Over the first tab (ta-launcher.md): the launcher lies under the home, which a pull down moves to a strip at\n * the bottom (device/pull-down.ts); the board comes over it from the right, as a screen does.\n */\n.ta-phone { --ta-peek: calc(72px + env(safe-area-inset-bottom)); }\n.ta-phone-home { z-index: 1; }\n.ta-phone-launcher { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ta-main); visibility: hidden; transition: visibility 0s 360ms; }\n/* The body moves (and so holds what is fixed in it, as menus); what scrolls is inside it. */\n.ta-phone-launcher-body { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translate3d(0, -36px, 0) scale(0.94); transform-origin: 50% 0; will-change: transform, opacity; transition: transform 360ms cubic-bezier(0.32, 0.72, 0, 1), opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-launcher .ta-launcher-scroll { padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(var(--ta-peek) + 20px) calc(16px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-head { padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n:root[data-keyboard] .ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + var(--ta-keyboard, 0px)); }\n/* Searching, the home goes all the way down: the page of the search has the whole screen. */\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-home { transform: translate3d(0, 100%, 0); box-shadow: none; }\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-peek { visibility: hidden; pointer-events: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher { visibility: visible; transition: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher-body { opacity: 1; transform: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-home { transform: translate3d(0, calc(100% - var(--ta-peek)), 0); }\n.ta-phone[data-surface='launcher'] .ta-phone-home, :root[data-pull] .ta-phone-home { overflow: hidden; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12); }\n:root[data-pull] .ta-phone-launcher { visibility: visible; transition: none; }\n:root[data-pull] .ta-phone-launcher-body, :root[data-pull] .ta-phone-home, :root[data-sheet-drag] .ta-phone-board { transition: none; }\n.ta-phone-peek { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: var(--ta-peek); padding: 0; border: 0; background: transparent; visibility: hidden; pointer-events: none; -webkit-tap-highlight-color: transparent; }\n.ta-phone-peek::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--ta-border-field); transform: translateX(-50%); }\n.ta-phone[data-surface='launcher'] .ta-phone-peek { visibility: visible; pointer-events: auto; }\n/* Over the screen, which a drag of it shows at the right edge with its shadow. */\n.ta-phone-board { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--ta-side); transform: translate3d(-100%, 0, 0); box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12); will-change: transform; visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-board .ta-board-head { padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(8px + env(safe-area-inset-left)); }\n.ta-phone-board .ta-board-body { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone[data-surface='board'] .ta-phone-board { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-surface='board'] .ta-phone-home { transform: translate3d(30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-dim[data-for='board'] { z-index: 1; }\n/* The board moved by a finger: the screen and the workbench off to the right stay hidden, their shadows too. */\n:root[data-sheet-drag='board'] .ta-phone > .ta-phone-screen, :root[data-sheet-drag='board'] .ta-phone > .ta-editors-pane { visibility: hidden; }\n/* The search of the launcher put away is never seen, whatever sheet a finger moves. */\n.ta-phone-launcher[inert] .ta-phone-stack-top { visibility: hidden !important; }\n.ta-phone[data-surface='board'] > .ta-phone-dim[data-for='board'] { opacity: 1; }\n\n/* A chat on a phone: its row is a SwipeRow (style/device.ts). */\n.ta-phone .ta-chat-item:active { background: var(--ta-hover); }\n";
|
|
6
|
+
export declare const PHONE_STYLE = "\n/* Its screens slide in by transforms, never by scrolling: clipped, so that a focus or a menu that opens near an edge never scrolls it sideways. */\n.ta-phone { position: relative; display: block; overflow: clip; background: var(--ta-side); --ta-sheet: transform 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-home, .ta-phone-screen, .ta-phone > .ta-editors-pane { position: absolute; inset: 0; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-home { display: flex; flex-direction: column; background: var(--ta-side); }\n.ta-phone-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-phone-page > .ta-sidebar, .ta-phone-page > .ta-main { flex: 1; width: auto; min-height: 0; }\n.ta-phone-page .ta-chats, .ta-phone-page .ta-side-view { border-right: 0; padding-bottom: 0; padding-left: calc(8px + env(safe-area-inset-left)); padding-right: calc(8px + env(safe-area-inset-right)); }\n.ta-phone-page .ta-settings-head, .ta-phone-screen .ta-settings-head { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone-screen { z-index: 2; display: flex; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone-screen > .ta-main { flex: 1; min-width: 0; }\n.ta-phone[data-screen] .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n.ta-phone[data-screen] .ta-phone-screen { transform: none; }\n.ta-phone > .ta-editors-pane { z-index: 4; width: auto; min-width: 0; max-width: none; animation: none; transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }\n.ta-phone[data-workbench] > .ta-editors-pane { transform: none; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen, .ta-phone[data-workbench]:not([data-screen]) .ta-phone-home { transform: translate3d(-30%, 0, 0); }\n/* What a sheet covers darkens a little, as on iOS (sheet-swipe.ts follows the finger with its opacity). */\n.ta-phone-dim { position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.1); opacity: 0; pointer-events: none; transition: opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-dim[data-for='workbench'] { z-index: 3; }\n.ta-phone[data-screen] > .ta-phone-dim[data-for='screen'], .ta-phone[data-workbench] > .ta-phone-dim[data-for='workbench'] { opacity: 1; }\n/*\n * A layer at rest out of sight is not drawn: its shadow would show at the edge of the screen, and the page\n * would paint what nobody sees. It goes once it has slid away, and is there at once to come in, or for a finger.\n */\n.ta-phone-screen, .ta-phone > .ta-editors-pane { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-screen] .ta-phone-screen, .ta-phone[data-workbench] > .ta-editors-pane { visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-screen] .ta-phone-home, .ta-phone[data-workbench] .ta-phone-home { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone[data-workbench][data-screen] .ta-phone-screen { visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n/*\n * While a finger moves a sheet, or the browser went back by itself (its own swipe was the animation), nothing slides on its own,\n * and what it uncovers is there: as specific as the rules of the layers at rest (style.spec.ts checks), so that the conversation\n * under the workbench shows while the workbench is put away.\n */\n:root[data-sheet-drag] .ta-phone > .ta-phone-home, :root[data-sheet-drag] .ta-phone > .ta-phone-screen, :root[data-sheet-drag] .ta-phone > .ta-editors-pane { visibility: visible; transition: none; }\n:root[data-sheet-drag] .ta-phone-dim { transition: none; }\n/*\n * A frame the page may not read (an HTML file, a PDF, the browser) keeps the touches on it: the left edge of the\n * workbench over it stays the page's, so that a swipe from there puts the workbench away, as iOS keeps its back\n * at the edge over web content. Frames it may read (Markdown) are listened to anywhere (sheet-swipe.ts).\n */\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe) { position: relative; }\n.ta-phone > .ta-editors-pane .ta-editor-body:has(iframe)::before { content: ''; position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 24px; }\n/* A screen pushed over the screen (PhoneStack): a section of the settings over their list, as the screen over the tabs. */\n.ta-phone-stack { position: relative; flex: 1; min-height: 0; overflow: hidden; }\n.ta-phone-stack-base, .ta-phone-stack-top { position: absolute; inset: 0; display: flex; flex-direction: column; will-change: transform; transition: var(--ta-sheet); }\n.ta-phone-stack-top { z-index: 2; background: var(--ta-main); transform: translate3d(100%, 0, 0); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-stack-top { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone-stack[data-open] > .ta-phone-stack-base { transform: translate3d(-30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-stack[data-open] > .ta-phone-dim { opacity: 1; }\n:root[data-sheet-drag] .ta-phone-stack-base, :root[data-sheet-drag] .ta-phone-stack-top { visibility: visible; transition: none; }\n/* The tabs: a finger's height above the home indicator; away while the keyboard is up. */\n.ta-tabbar { display: flex; flex: none; padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); border-top: 1px solid var(--ta-border-muted); background: var(--ta-side); }\n:root[data-keyboard] .ta-tabbar { display: none; }\n.ta-tabbar-item { flex: 1; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--ta-muted); font-size: calc(10.5px * var(--ta-font-scale)); -webkit-tap-highlight-color: transparent; }\n.ta-tabbar-item > span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-tabbar-item.ta-active { color: var(--ta-text); font-weight: 600; }\n.ta-tabbar-item > .ta-tabbar-icon { position: relative; display: inline-grid; place-items: center; max-width: none; padding: 0; overflow: visible; }\n.ta-tabbar-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); box-shadow: 0 0 0 2px var(--ta-side); }\n/* A finger drags it off as a drop (UnseenDrop): a wider grip than it looks, and the drop drawn over the page meanwhile. */\n.ta-tabbar-dot.ta-draggable { touch-action: none; }\n.ta-tabbar-dot.ta-draggable::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }\n.ta-tabbar-dot[data-dragging] { visibility: hidden; }\n.ta-unseen-drag { position: fixed; inset: 0; z-index: 2147483000; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: var(--ta-yellow); }\n.ta-unseen-ring { fill: none; stroke: var(--ta-yellow); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ta-unseen-ring 380ms ease-out forwards; }\n.ta-unseen-spark { transform-box: fill-box; transform-origin: center; animation: ta-unseen-spark 400ms cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }\n@keyframes ta-unseen-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }\n@keyframes ta-unseen-spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }\n/* A row with a dot that the tab scrolled to (PhoneUtil.locate): lit up a moment. */\n[data-unseen][data-flash] { position: relative; }\n[data-unseen][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-yellow) 18%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n@keyframes ta-unseen-flash { 0%, 35% { opacity: 1; } to { opacity: 0; } }\n[data-asks][data-flash] { position: relative; }\n[data-asks][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-blue) 16%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }\n/* Sideways the height is short: the label beside the icon, as iOS lays its tabs out then. */\n@media (max-height: 500px) and (pointer: coarse) {\n .ta-tabbar-item { height: 40px; flex-direction: row; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); }\n}\n\n/*\n * Over the first tab (ta-launcher.md): the launcher lies under the home, which a pull down moves to a strip at\n * the bottom (device/pull-down.ts); the board comes over it from the right, as a screen does.\n */\n.ta-phone { --ta-peek: calc(72px + env(safe-area-inset-bottom)); }\n.ta-phone-home { z-index: 1; }\n.ta-phone-launcher { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ta-main); visibility: hidden; transition: visibility 0s 360ms; }\n/* The body moves (and so holds what is fixed in it, as menus); what scrolls is inside it. */\n.ta-phone-launcher-body { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translate3d(0, -36px, 0) scale(0.94); transform-origin: 50% 0; will-change: transform, opacity; transition: transform 360ms cubic-bezier(0.32, 0.72, 0, 1), opacity 360ms cubic-bezier(0.32, 0.72, 0, 1); }\n.ta-phone-launcher .ta-launcher-scroll { padding: calc(14px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(var(--ta-peek) + 20px) calc(16px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-head { padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)); }\n.ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n:root[data-keyboard] .ta-phone-launcher .ta-launcher-search-body { padding-bottom: calc(16px + var(--ta-keyboard, 0px)); }\n/* Searching, the home goes all the way down: the page of the search has the whole screen. */\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-home { transform: translate3d(0, 100%, 0); box-shadow: none; }\n.ta-phone[data-surface='launcher'][data-surface-stack] .ta-phone-peek { visibility: hidden; pointer-events: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher { visibility: visible; transition: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-launcher-body { opacity: 1; transform: none; }\n.ta-phone[data-surface='launcher'] .ta-phone-home { transform: translate3d(0, calc(100% - var(--ta-peek)), 0); }\n.ta-phone[data-surface='launcher'] .ta-phone-home, :root[data-pull] .ta-phone-home { overflow: hidden; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12); }\n:root[data-pull] .ta-phone-launcher { visibility: visible; transition: none; }\n:root[data-pull] .ta-phone-launcher-body, :root[data-pull] .ta-phone-home, :root[data-sheet-drag] .ta-phone-board { transition: none; }\n.ta-phone-peek { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: var(--ta-peek); padding: 0; border: 0; background: transparent; visibility: hidden; pointer-events: none; -webkit-tap-highlight-color: transparent; }\n.ta-phone-peek::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; border-radius: 2px; background: var(--ta-border-field); transform: translateX(-50%); }\n.ta-phone[data-surface='launcher'] .ta-phone-peek { visibility: visible; pointer-events: auto; }\n/* Over the screen, which a drag of it shows at the right edge with its shadow. */\n.ta-phone-board { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: var(--ta-side); transform: translate3d(-100%, 0, 0); box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12); will-change: transform; visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-board .ta-board-head { padding: calc(10px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) 8px calc(8px + env(safe-area-inset-left)); }\n.ta-phone-board .ta-board-body { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }\n.ta-phone[data-surface='board'] .ta-phone-board { transform: none; visibility: visible; transition: var(--ta-sheet); }\n.ta-phone[data-surface='board'] .ta-phone-home { transform: translate3d(30%, 0, 0); visibility: hidden; transition: var(--ta-sheet), visibility 0s 360ms; }\n.ta-phone-dim[data-for='board'] { z-index: 1; }\n/* The board moved by a finger: the screen and the workbench off to the right stay hidden, their shadows too. */\n:root[data-sheet-drag='board'] .ta-phone > .ta-phone-screen, :root[data-sheet-drag='board'] .ta-phone > .ta-editors-pane { visibility: hidden; }\n/* The search of the launcher put away is never seen, whatever sheet a finger moves. */\n.ta-phone-launcher[inert] .ta-phone-stack-top { visibility: hidden !important; }\n.ta-phone[data-surface='board'] > .ta-phone-dim[data-for='board'] { opacity: 1; }\n\n/* A chat on a phone: its row is a SwipeRow (style/device.ts). */\n.ta-phone .ta-chat-item:active { background: var(--ta-hover); }\n";
|
|
@@ -76,6 +76,8 @@ export const PHONE_STYLE = `
|
|
|
76
76
|
[data-unseen][data-flash] { position: relative; }
|
|
77
77
|
[data-unseen][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-yellow) 18%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }
|
|
78
78
|
@keyframes ta-unseen-flash { 0%, 35% { opacity: 1; } to { opacity: 0; } }
|
|
79
|
+
[data-asks][data-flash] { position: relative; }
|
|
80
|
+
[data-asks][data-flash]::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: 12px; background: color-mix(in srgb, var(--ta-blue) 16%, transparent); pointer-events: none; animation: ta-unseen-flash 1s ease-out forwards; }
|
|
79
81
|
/* Sideways the height is short: the label beside the icon, as iOS lays its tabs out then. */
|
|
80
82
|
@media ${DeviceMedia.LOW} {
|
|
81
83
|
.ta-tabbar-item { height: 40px; flex-direction: row; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** The shell: navigation, main column, panel; the double, cards, notices, overlays, sign-in. */
|
|
2
|
-
export declare const SHELL_STYLE = "\n/* Shell: the navigation (rail and chats), the main column, the panel */\n.ta-app { display: flex; height: 100vh; height: var(--ta-viewport, 100dvh); background: var(--ta-main); overflow: hidden; }\n.ta-nav { display: flex; flex: none; height: 100%; z-index: 20; }\n.ta-rail { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 0 calc(10px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-nav:has(> .ta-sidebar) > .ta-rail { border-right-color: transparent; }\n.ta-rail-logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; margin-bottom: 6px; }\n.ta-rail-items { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; scrollbar-width: none; padding: 0 8px; }\n.ta-rail-item { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ta-muted); transition: background 150ms, color 150ms; }\n.ta-rail-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-rail-item.ta-active { background: var(--ta-selected); color: var(--ta-text); }\n.ta-rail-divider { width: 24px; height: 0; flex: none; margin: 4px 0; border: 0; border-top: 1px solid var(--ta-border); }\n.ta-rail-status { display: grid; place-items: center; width: 40px; height: 22px; }\n.ta-ok .ta-dot { color: var(--ta-green); }\n.ta-warn .ta-dot { color: var(--ta-yellow); }\n.ta-chats, .ta-side-view { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 8px calc(8px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-chats-head { display: flex; align-items: center; gap: 2px; height: 40px; flex: none; padding: 0 0 0 8px; margin-bottom: 6px; }\n.ta-chats-title { flex: 1; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-panel-cards { display: flex; flex-direction: column; gap: 12px; min-height: 100%; box-sizing: border-box; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }\n.ta-side-section { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-side-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }\n.ta-side-scroll:has(> .ta-empty) { display: flex; flex-direction: column; }\n.ta-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-side-row { position: relative; display: flex; align-items: center; border-radius: 10px; }\n.ta-side-row:hover, .ta-side-row.ta-selected { background: var(--ta-hover); }\n.ta-side-row.ta-selected { background: var(--ta-selected); }\n.ta-side-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background 120ms; }\n.ta-side-list > li > .ta-side-item:hover { background: var(--ta-hover); }\n.ta-side-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-side-item-title { font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-sub { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-time { align-self: flex-start; font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }\n.ta-close { position: absolute; right: 4px; opacity: 0; width: 26px; height: 26px; }\n.ta-side-row:hover .ta-close, .ta-close:focus-visible { opacity: 1; }\n.ta-task-status { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ta-raised); color: var(--ta-secondary); }\n.ta-task-status-done { color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 14%, transparent); }\n.ta-task-status-failed { color: var(--ta-red); background: color-mix(in srgb, var(--ta-red) 14%, transparent); }\n.ta-task-status-stopped { color: var(--ta-muted); }\n.ta-task-status .ta-spinner { width: 12px; height: 12px; }\n.ta-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: var(--ta-titlebar); background: var(--ta-main); }\n.ta-main-head { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; padding-top: env(safe-area-inset-top); flex: none; }\n.ta-main-title { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n/* A title between the buttons of the head is centred on it, whatever buttons its sides have: a back button on one,\n the workbench's on the other, both or neither. */\n.ta-main-head:has(> .ta-main-title) { display: grid; grid-template-columns: minmax(32px, 1fr) minmax(0, auto) minmax(32px, 1fr); }\n.ta-main-head:has(> .ta-main-title) > * { grid-row: 1; grid-column: 1; justify-self: start; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title { grid-column: 2; justify-self: stretch; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title ~ * { grid-column: 3; justify-self: end; }\n.ta-main-sub { font-size: calc(11.5px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* The double's chat */\n/* As .ta-scroll: nothing in a conversation is wider than it, it never scrolls sideways. */\n.ta-chat-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }\n.ta-chat-col { width: 100%; max-width: calc(var(--ta-col) + 48px); margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }\n.ta-chat-scroll { overflow-anchor: none; }\n.ta-chat-scroll .ta-chat-col { position: relative; padding-top: 12px; padding-bottom: 24px; min-height: 100%; }\n.ta-hero { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0; animation: ta-in 320ms var(--ta-ease); }\n.ta-hero-center { flex: 1; justify-content: center; }\n.ta-hero h1 { margin: 6px 0 0; font-size: calc(22px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n/* Chinese breaks between its words and after its commas, not inside a word, so that balance does not cut \u547D\u4EE4 in two. */\n.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-hero-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-hero-step { display: inline-flex; align-items: center; gap: 7px; }\n.ta-hero-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); }\n.ta-hero-arrow { color: var(--ta-muted); }\n.ta-hero .ta-pic-cards { max-width: 524px; margin-top: 18px; }\n/* Pictures (components/picture.tsx, ui.Picture): a few shapes in the tones of the theme; choices as cards of them */\n.ta-pic-cards { display: grid; grid-template-columns: repeat(var(--ta-pic-columns, 3), minmax(0, 1fr)); gap: 10px; width: 100%; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) { .ta-pic-cards { grid-template-columns: repeat(var(--ta-pic-columns-compact, 3), minmax(0, 1fr)); gap: 8px; } }\n.ta-pic-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 7px 7px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-card); color: var(--ta-body); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: center; cursor: pointer; transition: border-color 140ms, background 140ms, box-shadow 140ms, transform 140ms var(--ta-ease); animation: ta-in 320ms var(--ta-ease) both; }\n.ta-pic-card:nth-child(2) { animation-delay: 50ms; }\n.ta-pic-card:nth-child(3) { animation-delay: 100ms; }\n.ta-pic-card:nth-child(n+4) { animation-delay: 150ms; }\n.ta-pic-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ta-green) 55%, var(--ta-border)); background: var(--ta-hover); color: var(--ta-text); }\n.ta-pic-card:hover:not(:disabled) .ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 26%, transparent); }\n.ta-pic-card:active:not(:disabled) { transform: scale(.98); }\n.ta-pic-card:disabled { opacity: .55; cursor: default; }\n.ta-pic-card-label { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }\n.ta-pic-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-pic-card-hinted { gap: 6px; text-align: left; }\n.ta-pic-card-hinted .ta-pic-card-label { padding: 0 4px; color: var(--ta-text); font-weight: 600; }\n.ta-pic-card-hint { margin-top: -3px; padding: 0 4px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-pic { display: block; width: 100%; height: auto; border-radius: 8px; }\n.ta-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }\n.ta-pic-pane { fill: var(--ta-hover); }\n.ta-pic-line, .ta-pic-dot { fill: var(--ta-hover-strong); }\n.ta-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }\n.ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 16%, transparent); stroke: color-mix(in srgb, var(--ta-green) 70%, transparent); stroke-width: 1; transition: fill 140ms; }\n.ta-pic-mark { fill: var(--ta-green); }\n.ta-pic-soft { opacity: .45; }\n.ta-pic-plus { fill: color-mix(in srgb, var(--ta-green) 55%, transparent); }\n.ta-pic-bad { fill: color-mix(in srgb, var(--ta-red) 85%, transparent); }\n.ta-pic-wait { fill: var(--ta-yellow); }\n.ta-pic-ring { fill: color-mix(in srgb, var(--ta-raised) 60%, transparent); stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-stroke { fill: none; stroke: var(--ta-green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-thin { stroke: var(--ta-border); stroke-width: 2; }\n.ta-pic-path { fill: none; stroke: var(--ta-border); stroke-width: 1.5; stroke-dasharray: 3 4; }\n.ta-pic-hand, .ta-pic-tick, .ta-pic-cross { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-tick { stroke-width: 1.6; }\n.ta-pic-tick-big { stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-text { fill: var(--ta-green); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }\n.ta-pic-fine { stroke-width: 2; }\n.ta-pic-shackle { fill: none; stroke: var(--ta-green); stroke-width: 2.4; stroke-linecap: round; }\n/* Something on its way along a ta-pic-path, and a line that sweeps a screen being scanned */\n@keyframes ta-pic-go { 0% { transform: translateX(-14px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }\n@keyframes ta-pic-sweep { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }\n.ta-pic-go { animation: ta-pic-go 1.8s ease-in-out infinite; transform-box: fill-box; }\n.ta-pic-go-back { animation-delay: .9s; }\n.ta-pic-sweep { animation: ta-pic-sweep 2.4s ease-in-out infinite; transform-box: fill-box; }\n/* Where to tap, as a ring that spreads from it */\n@keyframes ta-pic-pulse { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }\n.ta-pic-pulse { animation: ta-pic-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }\n.ta-msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-msg-bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px 16px 5px 16px; background: var(--ta-user); color: var(--ta-text); white-space: pre-wrap; word-break: break-word; }\n.ta-msg-ta { color: var(--ta-body); line-height: 1.75; display: flex; flex-direction: column; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 8px; margin: 0 -8px; border-radius: 8px; border: 0; background: transparent; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-row-title { color: var(--ta-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-row-meta, .ta-row-label { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); flex: none; }\n.ta-row-chevron { margin-left: auto; color: var(--ta-muted); }\n.ta-row-quiet { color: var(--ta-muted); }\n.ta-row-quiet .ta-row-title { font-weight: 400; color: var(--ta-secondary); }\n.ta-composer-area { flex: none; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n.ta-composer-area .ta-chat-col { gap: 8px; }\n.ta-attention { display: flex; flex-direction: column; gap: 4px; animation: ta-in 220ms var(--ta-ease); }\n.ta-attention-source { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); padding-left: 4px; }\n.ta-mic { height: 30px; min-width: 30px; flex: none; display: inline-grid; place-items: center; padding: 0 8px; border: 0; border-radius: 15px; background: transparent; color: var(--ta-secondary); transition: background 150ms, color 150ms, min-width 200ms var(--ta-ease); }\n.ta-mic:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-mic.ta-on { min-width: 48px; background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-wave { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }\n.ta-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; animation: ta-wave 0.9s ease-in-out infinite; }\n.ta-wave i:nth-child(2) { animation-delay: -0.7s; }\n.ta-wave i:nth-child(3) { animation-delay: -0.45s; }\n.ta-wave i:nth-child(4) { animation-delay: -0.2s; }\n/* A conversation by voice (voice-talk.tsx), as WeChat's: the page dims and blurs, a green bubble holds the words as\n they come, \u53D6\u6D88 and \u7F16\u8F91 wait to have the finger slid onto them, and the bottom it starts on says what letting go\n does. It comes up from the bottom, says \"too short\" in a bubble of its own, and fades out. Above the keyboard. */\n.ta-talk { --ta-talk-base: calc(112px + env(safe-area-inset-bottom)); --ta-talk-gap: 172px; position: fixed; inset: 0; z-index: 96; overflow: hidden; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; animation: ta-fade 160ms ease-out; transition: opacity 160ms ease-in; }\n:root[data-keyboard] .ta-talk { --ta-talk-base: 104px; bottom: auto; height: var(--ta-viewport, calc(100dvh - var(--ta-keyboard, 0px))); }\n.ta-talk-leaving { opacity: 0; pointer-events: none; }\n.ta-talk-bubble { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + var(--ta-talk-gap)); transform: translateX(-50%); box-sizing: border-box; width: max-content; min-width: 140px; max-width: min(80vw, 440px); min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 14px 18px; border-radius: 14px; background: #95ec69; color: #111; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); transform-origin: 50% 100%; animation: ta-talk-pop 240ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 2px; background: inherit; transform: rotate(45deg); }\n.ta-talk-cancel .ta-talk-bubble { background: #fa5151; color: #fff; }\n.ta-talk-short .ta-talk-bubble { background: #f2f2f2; color: #555; }\n.ta-talk-bubble .ta-wave { height: 24px; gap: 4px; }\n.ta-talk-bubble .ta-wave i { width: 4px; }\n.ta-talk-words { position: relative; z-index: 1; margin: 0; max-height: 30vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: calc(17px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-talk-zones { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + 24px); width: min(100%, 420px); transform: translateX(-50%); box-sizing: border-box; display: flex; justify-content: space-between; padding: 0 12px; animation: ta-talk-rise 260ms var(--ta-ease) both; transition: opacity 140ms; }\n.ta-talk-released .ta-talk-zones, .ta-talk-short .ta-talk-zones, .ta-talk-leaving .ta-talk-zones { opacity: 0; }\n/* What a finger counts as on \u53D6\u6D88 or \u7F16\u8F91: more than the circle, as a thumb lands. */\n.ta-talk-zone { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 16px; }\n.ta-talk-zone-label { color: #fff; font-size: calc(13px * var(--ta-font-scale)); opacity: 0; transform: translateY(4px); transition: opacity 120ms, transform 160ms var(--ta-ease); }\n.ta-talk-zone-circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.86); transition: transform 180ms var(--ta-ease), background 160ms, color 160ms; }\n.ta-talk-zone.ta-on .ta-talk-zone-label { opacity: 1; transform: none; }\n.ta-talk-zone.ta-on .ta-talk-zone-circle { transform: scale(1.18); background: #fff; color: #111; }\n.ta-talk-base { position: absolute; left: -12%; right: -12%; bottom: 0; height: var(--ta-talk-base); display: flex; justify-content: center; padding-top: 30px; box-sizing: border-box; border-radius: 50% 50% 0 0 / 60px 60px 0 0; background: #2c2c2e; color: rgba(255, 255, 255, 0.8); animation: ta-talk-base 260ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-send.ta-talk-listening .ta-talk-base { background: linear-gradient(#f2f2f2, #d6d6d6); color: #333; }\n.ta-talk-hint { font-size: calc(15px * var(--ta-font-scale)); letter-spacing: 0.04em; }\n/* Low screens (a phone on its side): the same, closer together. */\n@media (max-height: 520px) {\n .ta-talk { --ta-talk-base: calc(64px + env(safe-area-inset-bottom)); --ta-talk-gap: 112px; }\n .ta-talk-base { padding-top: 16px; border-radius: 50% 50% 0 0 / 36px 36px 0 0; }\n .ta-talk-zones { bottom: calc(var(--ta-talk-base) + 4px); width: min(100%, 520px); }\n .ta-talk-zone { gap: 8px; padding-bottom: 8px; }\n .ta-talk-zone-circle { width: 56px; height: 56px; }\n .ta-talk-words { max-height: 18vh; }\n}\n@keyframes ta-talk-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }\n@keyframes ta-talk-rise { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }\n@keyframes ta-talk-base { from { transform: translateY(100%); } }\n@media (prefers-reduced-motion: reduce) {\n .ta-talk, .ta-talk * { animation: none !important; transition-duration: 0ms !important; }\n}\n/* While the keyboard is down, a finger on the field of a box that talks is the box's: a tap types in it, a hold talks. */\n.ta-talkable textarea:not(:focus) { pointer-events: none; }\n/* The field of a box on a touch screen once its microphone is tapped (TalkBar), as WeChat's: \u6309\u4F4F \u8BF4\u8BDD, the height of a line of text. */\n.ta-console-row > .ta-talk-bar { flex: 1; min-width: 0; height: var(--ta-field-height); margin: 0 2px; border: 0; border-radius: 10px; background: var(--ta-hover); color: var(--ta-text); font-size: var(--ta-field-font); font-weight: 600; letter-spacing: 0.06em; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; transition: background 120ms; }\n.ta-console-row > .ta-talk-bar.ta-on { background: var(--ta-hover-strong); }\n/* Reading a reply aloud (SpeakingButton): the wave of the microphone's, which a tap stops. */\n.ta-speaking { height: 30px; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 9px; border: 0; border-radius: 15px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; animation: ta-in 180ms var(--ta-ease); transition: background 120ms; }\n.ta-speaking:hover { background: color-mix(in srgb, var(--ta-green) 22%, transparent); }\n.ta-speaking .ta-wave { height: 12px; }\n.ta-send { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ta-brand); color: var(--ta-brand-text); transition: opacity 120ms, transform 120ms; }\n.ta-send:hover:not(:disabled) { opacity: 0.88; }\n.ta-send:active:not(:disabled) { transform: scale(0.94); }\n.ta-send:disabled { opacity: 0.25; cursor: default; }\n.ta-send-stop { background: var(--ta-brand); }\n.ta-avatar { flex: none; display: block; overflow: visible; }\n.ta-dino-shadow { fill: #000; fill-opacity: 0.32; }\n:root[data-theme='light'] .ta-dino-shadow { fill-opacity: 0.13; }\n.ta-dino-face { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: color-mix(in oklch, var(--ta-dino) 34%, var(--ta-main)); }\n.ta-dino-face > .ta-avatar { width: 100%; height: 100%; }\n/* The double in the navigation: its face; quieter while another place is shown, as the icons beside it are muted. */\n.ta-nav-face { filter: saturate(0.45); opacity: 0.8; transition: filter 150ms, opacity 150ms; }\n.ta-rail-item:hover .ta-nav-face, .ta-rail-item.ta-active .ta-nav-face, .ta-tabbar-item.ta-active .ta-nav-face { filter: none; opacity: 1; }\n.ta-dino-joy, .ta-dino-poked .ta-dino-look { display: none; }\n.ta-dino-poked .ta-dino-joy { display: inline; }\n.ta-dino-lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: ta-dino-blink 5s ease-in-out infinite; }\n.ta-dino-badge { animation: ta-dino-pop 0.35s var(--ta-ease); }\n.ta-dino-bubble, .ta-dino-z, .ta-dino-wave { animation: ta-pulse 2.4s ease-in-out infinite; }\n.ta-dino-bubble:nth-of-type(2), .ta-dino-z:nth-of-type(2), .ta-dino-wave:nth-of-type(2) { animation-delay: 0.4s; }\n.ta-dino-bubble:nth-of-type(3) { animation-delay: 0.8s; }\n\n/* Cards of web extensions */\n.ta-card-widget { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); }\n.ta-card-widget h2 { margin: 0; }\n.ta-card-widget button { white-space: nowrap; }\n\n/* Notices: cards in the bottom right, the newest nearest the corner; on phones from the top. */\n.ta-toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }\n.ta-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px 11px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-toast-in 220ms var(--ta-ease); }\n.ta-toast.ta-leaving { animation: ta-toast-out 160ms ease-in forwards; }\n.ta-toast > .ta-level-icon { margin-top: 2px; }\n.ta-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 0; }\n.ta-toast-message { color: var(--ta-text); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-count { margin-left: 6px; padding: 0 5px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.ta-toast-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-art { align-self: flex-start; width: 200px; height: auto; margin-top: 8px; border-radius: 10px; }\n.ta-toast-action { align-self: flex-start; margin-top: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--ta-border-field); background: transparent; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-toast-action:hover { background: var(--ta-hover); }\n.ta-toast .ta-toast-close { width: 24px; height: 24px; margin-top: -1px; color: var(--ta-muted); }\n.ta-toast .ta-toast-close svg { width: 14px; height: 14px; }\n.ta-toast-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 4px; padding: 10px 6px 10px 10px; }\n.ta-toast-open { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-toast-face { flex: none; display: grid; place-items: center; width: 38px; height: 38px; }\n.ta-toast-head { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-toast-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ta-text); }\n.ta-toast-session .ta-toast-message { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; color: var(--ta-secondary); }\n.ta-toast-session .ta-toast-close { grid-column: 2; grid-row: 1; }\n.ta-toast-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }\n.ta-toast-session .ta-toast-action { margin-top: 0; }\n@keyframes ta-toast-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } }\n@keyframes ta-toast-out { to { transform: translateX(12px); opacity: 0; } }\n\n/* The connection to ta serve, over the top of the main area while it is down */\n.ta-connection { position: absolute; top: calc(66px + env(safe-area-inset-top) + var(--ta-titlebar)); left: 50%; transform: translateX(-50%); z-index: 15; height: 34px; overflow: hidden; border-radius: 17px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-body); white-space: nowrap; animation: ta-drop 200ms var(--ta-ease); transition: width 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-body { display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(720px, calc(100vw - 24px - var(--ta-left, 0px))); height: 100%; padding: 0 6px 0 12px; animation: ta-fade 160ms ease-out; }\n.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-back .ta-connection-body { padding-right: 12px; }\n.ta-connection-leaving { animation: ta-connection-out 200ms var(--ta-ease) forwards; pointer-events: none; }\n.ta-connection-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-connection-retry { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; border: 0; background: var(--ta-chip); color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-connection-retry:hover { background: var(--ta-hover-strong); }\n.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }\n.ta-connection-notdone .ta-connection-body { padding-right: 12px; }\n@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }\n/* On a phone: a row in the page, whose height opens and closes. */\n.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-banner.ta-open { grid-template-rows: 1fr; }\n.ta-connection-banner.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-banner-inner { min-height: 0; overflow: hidden; }\n/* Over the message box its row brings its own gap (margin under it), none while closed: not that of the column too. */\n.ta-bottom > .ta-connection-banner, .ta-composer-area .ta-chat-col > .ta-connection-banner { margin-bottom: -8px; }\n.ta-connection-banner-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ta-level) 9%, var(--ta-card)); color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.45; text-align: left; transition: background 200ms; -webkit-tap-highlight-color: transparent; }\n.ta-connection-banner-row:active:not(:disabled) { background: color-mix(in srgb, var(--ta-level) 16%, var(--ta-card)); }\n.ta-connection-banner-row:disabled { opacity: 1; cursor: default; }\n.ta-connection-banner-row > .ta-level-icon { flex: none; }\n.ta-connection-banner-text { flex: 1; min-width: 0; }\n.ta-connection-banner-action { display: inline-flex; flex: none; align-items: center; gap: 5px; color: var(--ta-text); font-weight: 500; white-space: nowrap; }\n.ta-connection-retry:disabled { opacity: 1; }\n@keyframes ta-drop { from { transform: translate(-50%, -8px); opacity: 0; } }\n\n/* A question before going ahead */\n.ta-modal.ta-confirm { width: min(400px, 100%); gap: 6px; padding: 18px 18px 16px; }\n.ta-confirm-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-confirm-message { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; }\n.ta-confirm .ta-dialog-actions { margin-top: 12px; }\n.ta-modal.ta-ask { width: min(460px, 100%); gap: 12px; }\n.ta-ask .ta-dialog-actions { margin-top: 2px; }\ntextarea.ta-ask-text { height: auto; min-height: 180px; max-height: 50vh; padding: 8px 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; resize: vertical; }\n.ta-button-danger { background: var(--ta-red); border-color: var(--ta-red); color: #fff; }\n.ta-button-danger:hover:not(:disabled) { background: var(--ta-red); opacity: 0.9; }\n\n/* Built-in pages */\n.ta-assistant { flex: 1; min-height: 0; display: flex; }\n.ta-assistant-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }\n.ta-head-spacer { width: 32px; flex: none; }\n.ta-assistant-tasks { min-height: 100%; box-sizing: border-box; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 10px; }\n.ta-assistant-tasks > .ta-select-bar { margin: auto -10px -12px; }\n.ta-assistant-task { display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.ta-task-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--ta-border-muted); flex: none; }\n.ta-task-head .ta-task-status { width: 26px; height: 26px; }\n.ta-task-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }\n.ta-task-head-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-head-meta { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.ta-task-head-meta .ta-task-time { font-size: inherit; color: inherit; }\n.ta-task-head-take { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; }\n.ta-assistant-task .ta-session { min-height: 0; flex: 1; }\n.ta-assistant-task .ta-session-header { display: none; }\n.ta-assistant-task > .ta-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-task-result { max-width: 760px; margin: 0 auto; padding: 18px 20px 28px; line-height: 1.7; }\n.ta-task-result-note { margin: 0 0 8px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n\n/* Overlays */\n.ta-overlay-close { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }\n.ta-scrim { display: none; }\n.ta-hud { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-setting-section { display: flex; flex-direction: column; gap: 8px; }\n.ta-setting-section h2 { margin: 0; padding: 0 4px; }\n.ta-setting-card { border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); overflow: hidden; }\n.ta-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; min-height: 48px; }\n.ta-setting-row + .ta-setting-row { border-top: 1px solid var(--ta-border-muted); }\n.ta-setting-row.ta-stacked { flex-direction: column; align-items: stretch; gap: 8px; }\n.ta-setting-row.ta-stacked .ta-setting-control { width: 100%; }\n.ta-setting-row.ta-stacked .ta-segmented { flex: 1; }\n.ta-setting-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-setting-icon { flex: none; width: 32px; height: 32px; margin-right: -4px; display: grid; place-items: center; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; }\n.ta-setting-description { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-trusted-add { display: flex; gap: 8px; width: 100%; }\n.ta-trusted-add .ta-input { height: 32px; flex: 1; min-width: 0; }\n.ta-setting-control { display: flex; align-items: center; justify-content: flex-end; flex: none; }\n.ta-segmented { margin: 0; min-width: 0; border: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }\n.ta-segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms, color 120ms; }\n.ta-segmented button:hover { color: var(--ta-text); }\n.ta-segmented .ta-on { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-switch { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; flex: none; border-radius: 10px; background: var(--ta-hover-strong); position: relative; transition: background 160ms; margin: 0; cursor: pointer; }\n.ta-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 180ms var(--ta-ease); }\n.ta-switch:checked { background: var(--ta-green); }\n.ta-switch:checked::after { transform: translateX(16px); }\n\n/* Sign in */\n.ta-signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ta-main); }\n/*\n * The installed app with its title bar hidden (window controls overlay): the page draws up to the top of\n * the window, and the bar is the colour of the side columns, as theme-color is (useTitlebarColor). Each\n * column starts lower by the height of the bar, which is left empty for the window's buttons, and is\n * where the window is dragged.\n */\n.ta-titlebar { display: none; position: fixed; z-index: 25; left: env(titlebar-area-x, 0); top: env(titlebar-area-y, 0); width: env(titlebar-area-width, 100%); height: var(--ta-titlebar); app-region: drag; -webkit-app-region: drag; }\n@media (display-mode: window-controls-overlay) {\n :root { --ta-titlebar: env(titlebar-area-height, 0px); }\n .ta-titlebar { display: block; }\n /* Above the conversation the bar keeps the colour of the side columns, under the browser's buttons too. */\n .ta-main { background: linear-gradient(var(--ta-side) var(--ta-titlebar), var(--ta-main) 0); }\n}\n.ta-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }\n.ta-card h1 { margin: 4px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; }\n.ta-card p { margin: 0 0 8px; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-connect-pic { max-width: 300px; margin: -2px 0 6px; border-radius: 0; }\n.ta-strip-pic { border-radius: 0; }\n.ta-empty-picture:has(> .ta-strip-pic) { width: min(260px, 90%); }\n\n";
|
|
2
|
+
export declare const SHELL_STYLE = "\n/* Shell: the navigation (rail and chats), the main column, the panel */\n.ta-app { display: flex; height: 100vh; height: var(--ta-viewport, 100dvh); background: var(--ta-main); overflow: hidden; }\n.ta-nav { display: flex; flex: none; height: 100%; z-index: 20; }\n.ta-rail { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 0 calc(10px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-nav:has(> .ta-sidebar) > .ta-rail { border-right-color: transparent; }\n.ta-rail-logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; margin-bottom: 6px; }\n.ta-rail-items { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; scrollbar-width: none; padding: 0 8px; }\n.ta-rail-item { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ta-muted); transition: background 150ms, color 150ms; }\n.ta-rail-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-rail-item.ta-active { background: var(--ta-selected); color: var(--ta-text); }\n.ta-rail-divider { width: 24px; height: 0; flex: none; margin: 4px 0; border: 0; border-top: 1px solid var(--ta-border); }\n.ta-rail-status { display: grid; place-items: center; width: 40px; height: 22px; }\n.ta-ok .ta-dot { color: var(--ta-green); }\n.ta-warn .ta-dot { color: var(--ta-yellow); }\n.ta-chats, .ta-side-view { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 8px calc(8px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-chats-head { display: flex; align-items: center; gap: 2px; height: 40px; flex: none; padding: 0 0 0 8px; margin-bottom: 6px; }\n.ta-chats-title { flex: 1; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-panel-cards { display: flex; flex-direction: column; gap: 12px; min-height: 100%; box-sizing: border-box; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }\n.ta-side-section { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-side-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }\n.ta-side-scroll:has(> .ta-empty) { display: flex; flex-direction: column; }\n.ta-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-side-row { position: relative; display: flex; align-items: center; border-radius: 10px; }\n.ta-side-row:hover, .ta-side-row.ta-selected { background: var(--ta-hover); }\n.ta-side-row.ta-selected { background: var(--ta-selected); }\n.ta-side-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background 120ms; }\n.ta-side-list > li > .ta-side-item:hover { background: var(--ta-hover); }\n.ta-side-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-side-item-title { font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-sub { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-time { align-self: flex-start; font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }\n.ta-close { position: absolute; right: 4px; opacity: 0; width: 26px; height: 26px; }\n.ta-side-row:hover .ta-close, .ta-close:focus-visible { opacity: 1; }\n.ta-task-status { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ta-raised); color: var(--ta-secondary); }\n.ta-task-status-done { color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 14%, transparent); }\n.ta-task-status-failed { color: var(--ta-red); background: color-mix(in srgb, var(--ta-red) 14%, transparent); }\n.ta-task-status-stopped { color: var(--ta-muted); }\n.ta-task-status .ta-spinner { width: 12px; height: 12px; }\n.ta-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: var(--ta-titlebar); background: var(--ta-main); }\n.ta-main-head { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; padding-top: env(safe-area-inset-top); flex: none; }\n.ta-main-title { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n/* A title between the buttons of the head is centred on it, whatever buttons its sides have: a back button on one,\n the workbench's on the other, both or neither. */\n.ta-main-head:has(> .ta-main-title) { display: grid; grid-template-columns: minmax(32px, 1fr) minmax(0, auto) minmax(32px, 1fr); }\n.ta-main-head:has(> .ta-main-title) > * { grid-row: 1; grid-column: 1; justify-self: start; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title { grid-column: 2; justify-self: stretch; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title ~ * { grid-column: 3; justify-self: end; }\n.ta-main-sub { font-size: calc(11.5px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* The double's chat */\n/* As .ta-scroll: nothing in a conversation is wider than it, it never scrolls sideways. */\n.ta-chat-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }\n.ta-chat-col { width: 100%; max-width: calc(var(--ta-col) + 48px); margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }\n.ta-chat-scroll { overflow-anchor: none; }\n.ta-chat-scroll .ta-chat-col { position: relative; padding-top: 12px; padding-bottom: 24px; min-height: 100%; }\n.ta-hero { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0; animation: ta-in 320ms var(--ta-ease); }\n.ta-hero-center { flex: 1; justify-content: center; }\n.ta-hero h1 { margin: 6px 0 0; font-size: calc(22px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n/* Chinese breaks between its words and after its commas, not inside a word, so that balance does not cut \u547D\u4EE4 in two. */\n.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-hero-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-hero-step { display: inline-flex; align-items: center; gap: 7px; }\n.ta-hero-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); }\n.ta-hero-arrow { color: var(--ta-muted); }\n.ta-hero .ta-pic-cards { max-width: 524px; margin-top: 18px; }\n/* Pictures (components/picture.tsx, ui.Picture): a few shapes in the tones of the theme; choices as cards of them */\n.ta-pic-cards { display: grid; grid-template-columns: repeat(var(--ta-pic-columns, 3), minmax(0, 1fr)); gap: 10px; width: 100%; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) { .ta-pic-cards { grid-template-columns: repeat(var(--ta-pic-columns-compact, 3), minmax(0, 1fr)); gap: 8px; } }\n.ta-pic-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 7px 7px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-card); color: var(--ta-body); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: center; cursor: pointer; transition: border-color 140ms, background 140ms, box-shadow 140ms, transform 140ms var(--ta-ease); animation: ta-in 320ms var(--ta-ease) both; }\n.ta-pic-card:nth-child(2) { animation-delay: 50ms; }\n.ta-pic-card:nth-child(3) { animation-delay: 100ms; }\n.ta-pic-card:nth-child(n+4) { animation-delay: 150ms; }\n.ta-pic-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ta-green) 55%, var(--ta-border)); background: var(--ta-hover); color: var(--ta-text); }\n.ta-pic-card:hover:not(:disabled) .ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 26%, transparent); }\n.ta-pic-card:active:not(:disabled) { transform: scale(.98); }\n.ta-pic-card:disabled { opacity: .55; cursor: default; }\n.ta-pic-card-label { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }\n.ta-pic-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-pic-card-hinted { gap: 6px; text-align: left; }\n.ta-pic-card-hinted .ta-pic-card-label { padding: 0 4px; color: var(--ta-text); font-weight: 600; }\n.ta-pic-card-hint { margin-top: -3px; padding: 0 4px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-pic { display: block; width: 100%; height: auto; border-radius: 8px; }\n.ta-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }\n.ta-pic-pane { fill: var(--ta-hover); }\n.ta-pic-line, .ta-pic-dot { fill: var(--ta-hover-strong); }\n.ta-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }\n.ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 16%, transparent); stroke: color-mix(in srgb, var(--ta-green) 70%, transparent); stroke-width: 1; transition: fill 140ms; }\n.ta-pic-mark { fill: var(--ta-green); }\n.ta-pic-soft { opacity: .45; }\n.ta-pic-plus { fill: color-mix(in srgb, var(--ta-green) 55%, transparent); }\n.ta-pic-bad { fill: color-mix(in srgb, var(--ta-red) 85%, transparent); }\n.ta-pic-wait { fill: var(--ta-yellow); }\n.ta-pic-ring { fill: color-mix(in srgb, var(--ta-raised) 60%, transparent); stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-stroke { fill: none; stroke: var(--ta-green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-thin { stroke: var(--ta-border); stroke-width: 2; }\n.ta-pic-path { fill: none; stroke: var(--ta-border); stroke-width: 1.5; stroke-dasharray: 3 4; }\n.ta-pic-hand, .ta-pic-tick, .ta-pic-cross { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-tick { stroke-width: 1.6; }\n.ta-pic-tick-big { stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-text { fill: var(--ta-green); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }\n.ta-pic-fine { stroke-width: 2; }\n.ta-pic-shackle { fill: none; stroke: var(--ta-green); stroke-width: 2.4; stroke-linecap: round; }\n/* Something on its way along a ta-pic-path, and a line that sweeps a screen being scanned */\n@keyframes ta-pic-go { 0% { transform: translateX(-14px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }\n@keyframes ta-pic-sweep { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }\n.ta-pic-go { animation: ta-pic-go 1.8s ease-in-out infinite; transform-box: fill-box; }\n.ta-pic-go-back { animation-delay: .9s; }\n.ta-pic-sweep { animation: ta-pic-sweep 2.4s ease-in-out infinite; transform-box: fill-box; }\n/* Where to tap, as a ring that spreads from it */\n@keyframes ta-pic-pulse { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }\n.ta-pic-pulse { animation: ta-pic-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }\n.ta-msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-msg-bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px 16px 5px 16px; background: var(--ta-user); color: var(--ta-text); white-space: pre-wrap; word-break: break-word; }\n.ta-msg-ta { color: var(--ta-body); line-height: 1.75; display: flex; flex-direction: column; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 8px; margin: 0 -8px; border-radius: 8px; border: 0; background: transparent; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-row-title { color: var(--ta-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-row-meta, .ta-row-label { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); flex: none; }\n.ta-row-chevron { margin-left: auto; color: var(--ta-muted); }\n.ta-row-quiet { color: var(--ta-muted); }\n.ta-row-quiet .ta-row-title { font-weight: 400; color: var(--ta-secondary); }\n.ta-composer-area { flex: none; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n.ta-composer-area .ta-chat-col { gap: 8px; }\n.ta-attention { display: flex; flex-direction: column; gap: 4px; animation: ta-in 220ms var(--ta-ease); }\n.ta-attention-source { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); padding-left: 4px; }\n.ta-mic { height: 30px; min-width: 30px; flex: none; display: inline-grid; place-items: center; padding: 0 8px; border: 0; border-radius: 15px; background: transparent; color: var(--ta-secondary); transition: background 150ms, color 150ms, min-width 200ms var(--ta-ease); }\n.ta-mic:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-mic.ta-on { min-width: 48px; background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-wave { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }\n.ta-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; animation: ta-wave 0.9s ease-in-out infinite; }\n.ta-wave i:nth-child(2) { animation-delay: -0.7s; }\n.ta-wave i:nth-child(3) { animation-delay: -0.45s; }\n.ta-wave i:nth-child(4) { animation-delay: -0.2s; }\n/* A conversation by voice (voice-talk.tsx), as WeChat's: the page dims and blurs, a green bubble holds the words as\n they come, \u53D6\u6D88 and \u7F16\u8F91 wait to have the finger slid onto them, and the bottom it starts on says what letting go\n does. It comes up from the bottom, says \"too short\" in a bubble of its own, and fades out. Above the keyboard. */\n.ta-talk { --ta-talk-base: calc(112px + env(safe-area-inset-bottom)); --ta-talk-gap: 172px; position: fixed; inset: 0; z-index: 96; overflow: hidden; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; animation: ta-fade 160ms ease-out; transition: opacity 160ms ease-in; }\n:root[data-keyboard] .ta-talk { --ta-talk-base: 104px; bottom: auto; height: var(--ta-viewport, calc(100dvh - var(--ta-keyboard, 0px))); }\n.ta-talk-leaving { opacity: 0; pointer-events: none; }\n.ta-talk-bubble { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + var(--ta-talk-gap)); transform: translateX(-50%); box-sizing: border-box; width: max-content; min-width: 140px; max-width: min(80vw, 440px); min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 14px 18px; border-radius: 14px; background: #95ec69; color: #111; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); transform-origin: 50% 100%; animation: ta-talk-pop 240ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 2px; background: inherit; transform: rotate(45deg); }\n.ta-talk-cancel .ta-talk-bubble { background: #fa5151; color: #fff; }\n.ta-talk-short .ta-talk-bubble { background: #f2f2f2; color: #555; }\n.ta-talk-bubble .ta-wave { height: 24px; gap: 4px; }\n.ta-talk-bubble .ta-wave i { width: 4px; }\n.ta-talk-words { position: relative; z-index: 1; margin: 0; max-height: 30vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: calc(17px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-talk-zones { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + 24px); width: min(100%, 420px); transform: translateX(-50%); box-sizing: border-box; display: flex; justify-content: space-between; padding: 0 12px; animation: ta-talk-rise 260ms var(--ta-ease) both; transition: opacity 140ms; }\n.ta-talk-released .ta-talk-zones, .ta-talk-short .ta-talk-zones, .ta-talk-leaving .ta-talk-zones { opacity: 0; }\n/* What a finger counts as on \u53D6\u6D88 or \u7F16\u8F91: more than the circle, as a thumb lands. */\n.ta-talk-zone { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 16px; }\n.ta-talk-zone-label { color: #fff; font-size: calc(13px * var(--ta-font-scale)); opacity: 0; transform: translateY(4px); transition: opacity 120ms, transform 160ms var(--ta-ease); }\n.ta-talk-zone-circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.86); transition: transform 180ms var(--ta-ease), background 160ms, color 160ms; }\n.ta-talk-zone.ta-on .ta-talk-zone-label { opacity: 1; transform: none; }\n.ta-talk-zone.ta-on .ta-talk-zone-circle { transform: scale(1.18); background: #fff; color: #111; }\n.ta-talk-base { position: absolute; left: -12%; right: -12%; bottom: 0; height: var(--ta-talk-base); display: flex; justify-content: center; padding-top: 30px; box-sizing: border-box; border-radius: 50% 50% 0 0 / 60px 60px 0 0; background: #2c2c2e; color: rgba(255, 255, 255, 0.8); animation: ta-talk-base 260ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-send.ta-talk-listening .ta-talk-base { background: linear-gradient(#f2f2f2, #d6d6d6); color: #333; }\n.ta-talk-hint { font-size: calc(15px * var(--ta-font-scale)); letter-spacing: 0.04em; }\n/* Low screens (a phone on its side): the same, closer together. */\n@media (max-height: 520px) {\n .ta-talk { --ta-talk-base: calc(64px + env(safe-area-inset-bottom)); --ta-talk-gap: 112px; }\n .ta-talk-base { padding-top: 16px; border-radius: 50% 50% 0 0 / 36px 36px 0 0; }\n .ta-talk-zones { bottom: calc(var(--ta-talk-base) + 4px); width: min(100%, 520px); }\n .ta-talk-zone { gap: 8px; padding-bottom: 8px; }\n .ta-talk-zone-circle { width: 56px; height: 56px; }\n .ta-talk-words { max-height: 18vh; }\n}\n@keyframes ta-talk-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }\n@keyframes ta-talk-rise { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }\n@keyframes ta-talk-base { from { transform: translateY(100%); } }\n@media (prefers-reduced-motion: reduce) {\n .ta-talk, .ta-talk * { animation: none !important; transition-duration: 0ms !important; }\n}\n/* While the keyboard is down, a finger on the field of a box that talks is the box's: a tap types in it, a hold talks. */\n.ta-talkable textarea:not(:focus) { pointer-events: none; }\n/* The field of a box on a touch screen once its microphone is tapped (TalkBar), as WeChat's: \u6309\u4F4F \u8BF4\u8BDD, the height of a line of text. */\n.ta-console-row > .ta-talk-bar { flex: 1; min-width: 0; height: var(--ta-field-height); margin: 0 2px; border: 0; border-radius: 10px; background: var(--ta-hover); color: var(--ta-text); font-size: var(--ta-field-font); font-weight: 600; letter-spacing: 0.06em; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; transition: background 120ms; }\n.ta-console-row > .ta-talk-bar.ta-on { background: var(--ta-hover-strong); }\n/* Reading a reply aloud (SpeakingButton): the wave of the microphone's, which a tap stops. */\n.ta-speaking { height: 30px; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 9px; border: 0; border-radius: 15px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; animation: ta-in 180ms var(--ta-ease); transition: background 120ms; }\n.ta-speaking:hover { background: color-mix(in srgb, var(--ta-green) 22%, transparent); }\n.ta-speaking .ta-wave { height: 12px; }\n.ta-send { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ta-brand); color: var(--ta-brand-text); transition: opacity 120ms, transform 120ms; }\n.ta-send:hover:not(:disabled) { opacity: 0.88; }\n.ta-send:active:not(:disabled) { transform: scale(0.94); }\n.ta-send:disabled { opacity: 0.25; cursor: default; }\n.ta-send-stop { background: var(--ta-brand); }\n.ta-avatar { flex: none; display: block; overflow: visible; }\n.ta-dino-shadow { fill: #000; fill-opacity: 0.32; }\n:root[data-theme='light'] .ta-dino-shadow { fill-opacity: 0.13; }\n.ta-dino-face { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: color-mix(in oklch, var(--ta-dino) 34%, var(--ta-main)); }\n.ta-dino-face > .ta-avatar { width: 100%; height: 100%; }\n/* The double in the navigation: its face; quieter while another place is shown, as the icons beside it are muted. */\n.ta-nav-face { filter: saturate(0.45); opacity: 0.8; transition: filter 150ms, opacity 150ms; }\n.ta-rail-item:hover .ta-nav-face, .ta-rail-item.ta-active .ta-nav-face, .ta-tabbar-item.ta-active .ta-nav-face { filter: none; opacity: 1; }\n.ta-dino-joy, .ta-dino-poked .ta-dino-look { display: none; }\n.ta-dino-poked .ta-dino-joy { display: inline; }\n.ta-dino-lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: ta-dino-blink 5s ease-in-out infinite; }\n.ta-dino-badge { animation: ta-dino-pop 0.35s var(--ta-ease); }\n.ta-dino-bubble, .ta-dino-z, .ta-dino-wave { animation: ta-pulse 2.4s ease-in-out infinite; }\n.ta-dino-bubble:nth-of-type(2), .ta-dino-z:nth-of-type(2), .ta-dino-wave:nth-of-type(2) { animation-delay: 0.4s; }\n.ta-dino-bubble:nth-of-type(3) { animation-delay: 0.8s; }\n\n/* Cards of web extensions */\n.ta-card-widget { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); }\n.ta-card-widget h2 { margin: 0; }\n.ta-card-widget button { white-space: nowrap; }\n\n/* Notices: cards in the bottom right, the newest nearest the corner; on phones from the top. */\n.ta-toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }\n.ta-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px 11px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-toast-in 220ms var(--ta-ease); }\n.ta-toast.ta-leaving { animation: ta-toast-out 160ms ease-in forwards; }\n.ta-toast > .ta-level-icon { margin-top: 2px; }\n.ta-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 0; }\n.ta-toast-message { color: var(--ta-text); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-count { margin-left: 6px; padding: 0 5px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.ta-toast-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-art { align-self: flex-start; width: 200px; height: auto; margin-top: 8px; border-radius: 10px; }\n.ta-toast-action { align-self: flex-start; margin-top: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--ta-border-field); background: transparent; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-toast-action:hover { background: var(--ta-hover); }\n.ta-toast .ta-toast-close { width: 24px; height: 24px; margin-top: -1px; color: var(--ta-muted); }\n.ta-toast .ta-toast-close svg { width: 14px; height: 14px; }\n.ta-toast-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 4px; padding: 10px 6px 10px 10px; }\n.ta-toast-open { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-toast-face { flex: none; display: grid; place-items: center; width: 38px; height: 38px; }\n.ta-toast-head { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-toast-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ta-text); }\n.ta-toast-session .ta-toast-message { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; color: var(--ta-secondary); }\n.ta-toast-session .ta-toast-close { grid-column: 2; grid-row: 1; }\n.ta-toast-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }\n.ta-toast-session .ta-toast-action { margin-top: 0; }\n@keyframes ta-toast-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } }\n@keyframes ta-toast-out { to { transform: translateX(12px); opacity: 0; } }\n\n/* The connection to ta serve, over the top of the main area while it is down */\n.ta-connection { position: absolute; top: calc(66px + env(safe-area-inset-top) + var(--ta-titlebar)); left: 50%; transform: translateX(-50%); z-index: 15; height: 34px; overflow: hidden; border-radius: 17px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-body); white-space: nowrap; animation: ta-drop 200ms var(--ta-ease); transition: width 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-body { display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(720px, calc(100vw - 24px - var(--ta-left, 0px))); height: 100%; padding: 0 6px 0 12px; animation: ta-fade 160ms ease-out; }\n.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-back .ta-connection-body { padding-right: 12px; }\n.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-leaving { animation: ta-connection-out 200ms var(--ta-ease) forwards; pointer-events: none; }\n.ta-connection-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-connection-retry { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; border: 0; background: var(--ta-chip); color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-connection-retry:hover { background: var(--ta-hover-strong); }\n.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone):not(.ta-connection-outdated) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }\n.ta-connection-notdone .ta-connection-body { padding-right: 12px; }\n@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }\n/* On a phone: a row in the page, whose height opens and closes. */\n.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-banner.ta-open { grid-template-rows: 1fr; }\n.ta-connection-banner.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-banner.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-banner-inner { min-height: 0; overflow: hidden; }\n/* Over the message box its row brings its own gap (margin under it), none while closed: not that of the column too. */\n.ta-bottom > .ta-connection-banner, .ta-composer-area .ta-chat-col > .ta-connection-banner { margin-bottom: -8px; }\n.ta-connection-banner-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ta-level) 9%, var(--ta-card)); color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.45; text-align: left; transition: background 200ms; -webkit-tap-highlight-color: transparent; }\n.ta-connection-banner-row:active:not(:disabled) { background: color-mix(in srgb, var(--ta-level) 16%, var(--ta-card)); }\n.ta-connection-banner-row:disabled { opacity: 1; cursor: default; }\n.ta-connection-banner-row > .ta-level-icon { flex: none; }\n.ta-connection-banner-text { flex: 1; min-width: 0; }\n.ta-connection-banner-action { display: inline-flex; flex: none; align-items: center; gap: 5px; color: var(--ta-text); font-weight: 500; white-space: nowrap; }\n.ta-connection-retry:disabled { opacity: 1; }\n@keyframes ta-drop { from { transform: translate(-50%, -8px); opacity: 0; } }\n\n/* A question before going ahead */\n.ta-modal.ta-confirm { width: min(400px, 100%); gap: 6px; padding: 18px 18px 16px; }\n.ta-confirm-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-confirm-message { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; }\n.ta-confirm .ta-dialog-actions { margin-top: 12px; }\n.ta-modal.ta-ask { width: min(460px, 100%); gap: 12px; }\n.ta-ask .ta-dialog-actions { margin-top: 2px; }\ntextarea.ta-ask-text { height: auto; min-height: 180px; max-height: 50vh; padding: 8px 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; resize: vertical; }\n.ta-button-danger { background: var(--ta-red); border-color: var(--ta-red); color: #fff; }\n.ta-button-danger:hover:not(:disabled) { background: var(--ta-red); opacity: 0.9; }\n\n/* Built-in pages */\n.ta-assistant { flex: 1; min-height: 0; display: flex; }\n.ta-assistant-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }\n.ta-head-spacer { width: 32px; flex: none; }\n.ta-assistant-tasks { min-height: 100%; box-sizing: border-box; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 10px; }\n.ta-assistant-tasks > .ta-select-bar { margin: auto -10px -12px; }\n.ta-assistant-task { display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.ta-task-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--ta-border-muted); flex: none; }\n.ta-task-head .ta-task-status { width: 26px; height: 26px; }\n.ta-task-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }\n.ta-task-head-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-head-meta { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.ta-task-head-meta .ta-task-time { font-size: inherit; color: inherit; }\n.ta-task-head-take { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; }\n.ta-assistant-task .ta-session { min-height: 0; flex: 1; }\n.ta-assistant-task .ta-session-header { display: none; }\n.ta-assistant-task > .ta-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-task-result { max-width: 760px; margin: 0 auto; padding: 18px 20px 28px; line-height: 1.7; }\n.ta-task-result-note { margin: 0 0 8px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n\n/* Overlays */\n.ta-overlay-close { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }\n.ta-scrim { display: none; }\n.ta-hud { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-setting-section { display: flex; flex-direction: column; gap: 8px; }\n.ta-setting-section h2 { margin: 0; padding: 0 4px; }\n.ta-setting-card { border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); overflow: hidden; }\n.ta-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; min-height: 48px; }\n.ta-setting-row + .ta-setting-row { border-top: 1px solid var(--ta-border-muted); }\n.ta-setting-row.ta-stacked { flex-direction: column; align-items: stretch; gap: 8px; }\n.ta-setting-row.ta-stacked .ta-setting-control { width: 100%; }\n.ta-setting-row.ta-stacked .ta-segmented { flex: 1; }\n.ta-setting-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-setting-icon { flex: none; width: 32px; height: 32px; margin-right: -4px; display: grid; place-items: center; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; overflow-wrap: anywhere; }\n.ta-setting-description { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-trusted-add { display: flex; gap: 8px; width: 100%; }\n.ta-trusted-add .ta-input { height: 32px; flex: 1; min-width: 0; }\n.ta-store-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; padding: 12px; border-radius: 10px; background: var(--ta-raised); border: 1px solid var(--ta-border-muted); }\n.ta-store-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.ta-store-field .ta-input { height: 32px; width: 100%; }\n.ta-store-field-label { display: inline-flex; align-items: baseline; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-secondary); }\n.ta-store-field-optional { font-weight: 400; color: var(--ta-muted); }\n.ta-store-form-note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-store-form-note svg { flex: none; margin-top: 2px; color: var(--ta-green); }\n.ta-store-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }\n@media (max-width: 640px) { .ta-store-form { grid-template-columns: minmax(0, 1fr); } .ta-store-form-actions .ta-button { flex: 1; } }\n.ta-setting-control { display: flex; align-items: center; justify-content: flex-end; flex: none; }\n.ta-segmented { margin: 0; min-width: 0; border: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }\n.ta-segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms, color 120ms; }\n.ta-segmented button:hover { color: var(--ta-text); }\n.ta-segmented .ta-on { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-switch { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; flex: none; border-radius: 10px; background: var(--ta-hover-strong); position: relative; transition: background 160ms; margin: 0; cursor: pointer; }\n.ta-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 180ms var(--ta-ease); }\n.ta-switch:checked { background: var(--ta-green); }\n.ta-switch:checked::after { transform: translateX(16px); }\n\n/* Sign in */\n.ta-signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ta-main); }\n/*\n * The installed app with its title bar hidden (window controls overlay): the page draws up to the top of\n * the window, and the bar is the colour of the side columns, as theme-color is (useTitlebarColor). Each\n * column starts lower by the height of the bar, which is left empty for the window's buttons, and is\n * where the window is dragged.\n */\n.ta-titlebar { display: none; position: fixed; z-index: 25; left: env(titlebar-area-x, 0); top: env(titlebar-area-y, 0); width: env(titlebar-area-width, 100%); height: var(--ta-titlebar); app-region: drag; -webkit-app-region: drag; }\n@media (display-mode: window-controls-overlay) {\n :root { --ta-titlebar: env(titlebar-area-height, 0px); }\n .ta-titlebar { display: block; }\n /* Above the conversation the bar keeps the colour of the side columns, under the browser's buttons too. */\n .ta-main { background: linear-gradient(var(--ta-side) var(--ta-titlebar), var(--ta-main) 0); }\n}\n.ta-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }\n.ta-card h1 { margin: 4px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; }\n.ta-card p { margin: 0 0 8px; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-connect-pic { max-width: 300px; margin: -2px 0 6px; border-radius: 0; }\n.ta-strip-pic { border-radius: 0; }\n.ta-empty-picture:has(> .ta-strip-pic) { width: min(260px, 90%); }\n\n";
|
|
@@ -238,18 +238,20 @@ export const SHELL_STYLE = `
|
|
|
238
238
|
.ta-connection-body { display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(720px, calc(100vw - 24px - var(--ta-left, 0px))); height: 100%; padding: 0 6px 0 12px; animation: ta-fade 160ms ease-out; }
|
|
239
239
|
.ta-connection-back { --ta-level: var(--ta-green); }
|
|
240
240
|
.ta-connection-back .ta-connection-body { padding-right: 12px; }
|
|
241
|
+
.ta-connection-outdated { --ta-level: var(--ta-blue); }
|
|
241
242
|
.ta-connection-leaving { animation: ta-connection-out 200ms var(--ta-ease) forwards; pointer-events: none; }
|
|
242
243
|
.ta-connection-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
243
244
|
.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }
|
|
244
245
|
.ta-connection-retry { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; border: 0; background: var(--ta-chip); color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }
|
|
245
246
|
.ta-connection-retry:hover { background: var(--ta-hover-strong); }
|
|
246
|
-
.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }
|
|
247
|
+
.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone):not(.ta-connection-outdated) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }
|
|
247
248
|
.ta-connection-notdone .ta-connection-body { padding-right: 12px; }
|
|
248
249
|
@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }
|
|
249
250
|
/* On a phone: a row in the page, whose height opens and closes. */
|
|
250
251
|
.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }
|
|
251
252
|
.ta-connection-banner.ta-open { grid-template-rows: 1fr; }
|
|
252
253
|
.ta-connection-banner.ta-connection-back { --ta-level: var(--ta-green); }
|
|
254
|
+
.ta-connection-banner.ta-connection-outdated { --ta-level: var(--ta-blue); }
|
|
253
255
|
.ta-connection-banner-inner { min-height: 0; overflow: hidden; }
|
|
254
256
|
/* Over the message box its row brings its own gap (margin under it), none while closed: not that of the column too. */
|
|
255
257
|
.ta-bottom > .ta-connection-banner, .ta-composer-area .ta-chat-col > .ta-connection-banner { margin-bottom: -8px; }
|
|
@@ -307,12 +309,21 @@ textarea.ta-ask-text { height: auto; min-height: 180px; max-height: 50vh; paddin
|
|
|
307
309
|
.ta-setting-row.ta-stacked { flex-direction: column; align-items: stretch; gap: 8px; }
|
|
308
310
|
.ta-setting-row.ta-stacked .ta-setting-control { width: 100%; }
|
|
309
311
|
.ta-setting-row.ta-stacked .ta-segmented { flex: 1; }
|
|
310
|
-
.ta-setting-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
312
|
+
.ta-setting-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
311
313
|
.ta-setting-icon { flex: none; width: 32px; height: 32px; margin-right: -4px; display: grid; place-items: center; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); }
|
|
312
|
-
.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; }
|
|
314
|
+
.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; overflow-wrap: anywhere; }
|
|
313
315
|
.ta-setting-description { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }
|
|
314
316
|
.ta-trusted-add { display: flex; gap: 8px; width: 100%; }
|
|
315
317
|
.ta-trusted-add .ta-input { height: 32px; flex: 1; min-width: 0; }
|
|
318
|
+
.ta-store-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; padding: 12px; border-radius: 10px; background: var(--ta-raised); border: 1px solid var(--ta-border-muted); }
|
|
319
|
+
.ta-store-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
320
|
+
.ta-store-field .ta-input { height: 32px; width: 100%; }
|
|
321
|
+
.ta-store-field-label { display: inline-flex; align-items: baseline; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-secondary); }
|
|
322
|
+
.ta-store-field-optional { font-weight: 400; color: var(--ta-muted); }
|
|
323
|
+
.ta-store-form-note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }
|
|
324
|
+
.ta-store-form-note svg { flex: none; margin-top: 2px; color: var(--ta-green); }
|
|
325
|
+
.ta-store-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
|
|
326
|
+
@media (max-width: 640px) { .ta-store-form { grid-template-columns: minmax(0, 1fr); } .ta-store-form-actions .ta-button { flex: 1; } }
|
|
316
327
|
.ta-setting-control { display: flex; align-items: center; justify-content: flex-end; flex: none; }
|
|
317
328
|
.ta-segmented { margin: 0; min-width: 0; border: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }
|
|
318
329
|
.ta-segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms, color 120ms; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -42,6 +42,16 @@ export interface DesktopShots {
|
|
|
42
42
|
/** Called when a screenshot may have been taken; returns what stops it. */
|
|
43
43
|
onChange(listener: () => void): () => void;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* A notice of the system Ta Desktop showed while its window was closed, hidden or minimized (its page tells of
|
|
47
|
+
* none then): tapped, what it is of, for the page to open.
|
|
48
|
+
*/
|
|
49
|
+
export interface DesktopNoticeTarget {
|
|
50
|
+
sessionId?: string;
|
|
51
|
+
sessionFile?: string;
|
|
52
|
+
cwd?: string;
|
|
53
|
+
view?: string;
|
|
54
|
+
}
|
|
45
55
|
/** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
|
|
46
56
|
export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
47
57
|
/**
|
|
@@ -56,6 +66,13 @@ export declare namespace DesktopUtil {
|
|
|
56
66
|
function browserData(scope?: object): DesktopBrowserData | undefined;
|
|
57
67
|
/** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
|
|
58
68
|
function debugWebview(scope?: object): DebugWebview | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Ta Desktop tells of what conversations say while its window is closed, hidden or minimized, with notices of the
|
|
71
|
+
* system of its own: the page leaves those times to it. `onOpen` hears one tapped; undefined elsewhere.
|
|
72
|
+
*/
|
|
73
|
+
function notices(scope?: object): {
|
|
74
|
+
onOpen(listener: (target: DesktopNoticeTarget) => void): () => void;
|
|
75
|
+
} | undefined;
|
|
59
76
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
60
77
|
function recentShots(scope?: object): DesktopShots | undefined;
|
|
61
78
|
}
|
|
@@ -51,6 +51,19 @@ export var DesktopUtil;
|
|
|
51
51
|
return has('debugWebview', scope) && typeof debug === 'function' ? (webContentsId, method, params) => debug(webContentsId, method, params) : undefined;
|
|
52
52
|
}
|
|
53
53
|
DesktopUtil.debugWebview = debugWebview;
|
|
54
|
+
/**
|
|
55
|
+
* Ta Desktop tells of what conversations say while its window is closed, hidden or minimized, with notices of the
|
|
56
|
+
* system of its own: the page leaves those times to it. `onOpen` hears one tapped; undefined elsewhere.
|
|
57
|
+
*/
|
|
58
|
+
function notices(scope = globalThis) {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const onOpen = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.notices) === null || _b === void 0 ? void 0 : _b.onOpen;
|
|
61
|
+
if (!has('notices', scope) || typeof onOpen !== 'function') {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return Object.freeze({ onOpen: (listener) => onOpen(listener) });
|
|
65
|
+
}
|
|
66
|
+
DesktopUtil.notices = notices;
|
|
54
67
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
55
68
|
function recentShots(scope = globalThis) {
|
|
56
69
|
var _a;
|
|
@@ -26,6 +26,12 @@ export type ProcessStep = {
|
|
|
26
26
|
kind: 'error';
|
|
27
27
|
key: string;
|
|
28
28
|
text: string;
|
|
29
|
+
}
|
|
30
|
+
/** What the user said while it worked, which pi gave it after the results of its tools (steering): it went on with it. */
|
|
31
|
+
| {
|
|
32
|
+
kind: 'said';
|
|
33
|
+
key: string;
|
|
34
|
+
message: SessionMessage;
|
|
29
35
|
};
|
|
30
36
|
/**
|
|
31
37
|
* How a turn that is over ended, when not with a reply: an error, stopped by the user, cut off in the middle of
|
|
@@ -37,6 +43,8 @@ export interface MessageItem {
|
|
|
37
43
|
kind: 'message';
|
|
38
44
|
key: string;
|
|
39
45
|
message: SessionMessage;
|
|
46
|
+
/** A message of the user written while the agent was at its reply: it waited for the reply to end (a follow-up). */
|
|
47
|
+
queued?: boolean;
|
|
40
48
|
}
|
|
41
49
|
/**
|
|
42
50
|
* The assistant and tool result messages in a row: the work (thinking, tool calls, what ta said on
|
|
@@ -71,9 +79,16 @@ export declare namespace ProcessUtil {
|
|
|
71
79
|
* fills, not another put in its place. `offset`: where `messages` start in the conversation, so that
|
|
72
80
|
* the keys stay as earlier messages come in front. A message not shown (see `hidden`) in the middle of
|
|
73
81
|
* the work stays in its turn: an external agent that goes on on its own, with the files it changed
|
|
74
|
-
* noted between, reads as one turn, not as a turn for each time it went on.
|
|
82
|
+
* noted between, reads as one turn, not as a turn for each time it went on. So does a message of the user it was
|
|
83
|
+
* given on the way (`steered`): a step of the turn, not the start of another.
|
|
75
84
|
*/
|
|
76
85
|
function items(messages: SessionMessage[], working: boolean, offset?: number, renderers?: Readonly<Record<string, unknown>>): ThreadItem[];
|
|
86
|
+
/**
|
|
87
|
+
* The message at `index`, of the user, steered a turn: it came after the result of a tool and was written before
|
|
88
|
+
* it, while the agent worked; pi gave it to the agent with the results, and the work went on. One after another
|
|
89
|
+
* that did (written at once) did too. A message of the user that steered is a step of its turn, not an ask.
|
|
90
|
+
*/
|
|
91
|
+
function steered(messages: readonly SessionMessage[], index: number): boolean;
|
|
77
92
|
/**
|
|
78
93
|
* Words on the way with a fenced block a web extension draws (WebExtensionAPI.registerCodeRenderer,
|
|
79
94
|
* `renderers` by language in lower case): a card for the user, as a choice to make, stays in sight when
|
|
@@ -84,6 +99,11 @@ export declare namespace ProcessUtil {
|
|
|
84
99
|
}>;
|
|
85
100
|
/** How `item` ended, when it is over and did not end with a reply. */
|
|
86
101
|
function ending(item: TurnItem): TurnEnding | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* The summary of a turn that only compacted the context of an external agent (`/compact`): over, no tool
|
|
104
|
+
* called, no reply, its summary last; else undefined. It shows as pi's own compaction does, not as a turn.
|
|
105
|
+
*/
|
|
106
|
+
function compaction(item: TurnItem): string | undefined;
|
|
87
107
|
/** The tool calls: what "N steps" counts. */
|
|
88
108
|
function tools(steps: ProcessStep[]): ContentBlock[];
|
|
89
109
|
/** The steps shown: all of them, or while it works the latest few when more than two would fold. */
|
|
@@ -109,6 +129,11 @@ export declare namespace ProcessUtil {
|
|
|
109
129
|
function shown(item: ThreadItem, renderers: Readonly<Record<string, unknown>>): boolean;
|
|
110
130
|
/** A custom message the page draws nothing for: `display` false and no renderer of a web extension for its type. */
|
|
111
131
|
function hidden(message: SessionMessage, renderers: Readonly<Record<string, unknown>>): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* What the user said next after each turn (`said` reads a message of theirs), undefined for one they did not answer
|
|
134
|
+
* yet and for every other item: a card of the turn that asked them to pick knows it was answered, typed or tapped.
|
|
135
|
+
*/
|
|
136
|
+
function answers(items: readonly ThreadItem[], said: (message: SessionMessage) => string): (string | undefined)[];
|
|
112
137
|
/**
|
|
113
138
|
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
114
139
|
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
@@ -17,7 +17,8 @@ export var ProcessUtil;
|
|
|
17
17
|
* fills, not another put in its place. `offset`: where `messages` start in the conversation, so that
|
|
18
18
|
* the keys stay as earlier messages come in front. A message not shown (see `hidden`) in the middle of
|
|
19
19
|
* the work stays in its turn: an external agent that goes on on its own, with the files it changed
|
|
20
|
-
* noted between, reads as one turn, not as a turn for each time it went on.
|
|
20
|
+
* noted between, reads as one turn, not as a turn for each time it went on. So does a message of the user it was
|
|
21
|
+
* given on the way (`steered`): a step of the turn, not the start of another.
|
|
21
22
|
*/
|
|
22
23
|
function items(messages, working, offset = 0, renderers = {}) {
|
|
23
24
|
var _a;
|
|
@@ -26,12 +27,17 @@ export var ProcessUtil;
|
|
|
26
27
|
while (index < messages.length) {
|
|
27
28
|
const role = messages[index].role;
|
|
28
29
|
if (!TURN_ROLES.has(role)) {
|
|
29
|
-
|
|
30
|
+
const item = { kind: 'message', key: `m${offset + index}`, message: messages[index] };
|
|
31
|
+
if (index > 0 && writtenBefore(messages[index], messages[index - 1])) {
|
|
32
|
+
item.queued = true;
|
|
33
|
+
}
|
|
34
|
+
items.push(item);
|
|
30
35
|
index++;
|
|
31
36
|
continue;
|
|
32
37
|
}
|
|
33
38
|
const start = index;
|
|
34
|
-
while (index < messages.length &&
|
|
39
|
+
while (index < messages.length &&
|
|
40
|
+
(TURN_ROLES.has(messages[index].role) || hidden(messages[index], renderers) || steered(messages, index))) {
|
|
35
41
|
index++;
|
|
36
42
|
}
|
|
37
43
|
items.push(turn(messages.slice(start, index), offset + start, working && index === messages.length));
|
|
@@ -42,6 +48,34 @@ export var ProcessUtil;
|
|
|
42
48
|
return items;
|
|
43
49
|
}
|
|
44
50
|
ProcessUtil.items = items;
|
|
51
|
+
/**
|
|
52
|
+
* The message at `index`, of the user, steered a turn: it came after the result of a tool and was written before
|
|
53
|
+
* it, while the agent worked; pi gave it to the agent with the results, and the work went on. One after another
|
|
54
|
+
* that did (written at once) did too. A message of the user that steered is a step of its turn, not an ask.
|
|
55
|
+
*/
|
|
56
|
+
function steered(messages, index) {
|
|
57
|
+
var _a;
|
|
58
|
+
if (((_a = messages[index]) === null || _a === void 0 ? void 0 : _a.role) !== 'user') {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
for (let before = index - 1; before >= 0; before--) {
|
|
62
|
+
const { role } = messages[before];
|
|
63
|
+
if (role === 'user') {
|
|
64
|
+
return steered(messages, before);
|
|
65
|
+
}
|
|
66
|
+
if (TURN_ROLES.has(role)) {
|
|
67
|
+
return role === 'toolResult' && writtenBefore(messages[index], messages[before]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
ProcessUtil.steered = steered;
|
|
73
|
+
/** `message`, of the user, was written before `previous`, of the agent, came: while the agent worked. */
|
|
74
|
+
function writtenBefore(message, previous) {
|
|
75
|
+
const { role, timestamp } = message;
|
|
76
|
+
const { role: was, timestamp: at } = previous;
|
|
77
|
+
return role === 'user' && !!was && TURN_ROLES.has(was) && typeof timestamp === 'number' && typeof at === 'number' && timestamp < at;
|
|
78
|
+
}
|
|
45
79
|
function turn(messages, start, active) {
|
|
46
80
|
const steps = [];
|
|
47
81
|
let last;
|
|
@@ -51,7 +85,11 @@ export var ProcessUtil;
|
|
|
51
85
|
}
|
|
52
86
|
messages.forEach((message, offset) => {
|
|
53
87
|
var _a;
|
|
54
|
-
|
|
88
|
+
const { role } = message;
|
|
89
|
+
if (role === 'user') {
|
|
90
|
+
steps.push({ kind: 'said', key: `${start + offset}.u`, message });
|
|
91
|
+
}
|
|
92
|
+
if (role !== 'assistant') {
|
|
55
93
|
return;
|
|
56
94
|
}
|
|
57
95
|
last = message;
|
|
@@ -104,6 +142,7 @@ export var ProcessUtil;
|
|
|
104
142
|
ProcessUtil.pinned = pinned;
|
|
105
143
|
/** How `item` ended, when it is over and did not end with a reply. */
|
|
106
144
|
function ending(item) {
|
|
145
|
+
var _a;
|
|
107
146
|
if (item.active) {
|
|
108
147
|
return undefined;
|
|
109
148
|
}
|
|
@@ -115,9 +154,25 @@ export var ProcessUtil;
|
|
|
115
154
|
if (roles[roles.length - 1] === 'toolResult' || stopReason === 'toolUse') {
|
|
116
155
|
return 'interrupted';
|
|
117
156
|
}
|
|
157
|
+
// An external agent that compacted its context (/compact) ends its turn with the summary, not a reply.
|
|
158
|
+
if (((_a = item.steps[item.steps.length - 1]) === null || _a === void 0 ? void 0 : _a.kind) === 'summary') {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
118
161
|
return item.last && !item.reply.some(text => text.trim()) ? 'silent' : undefined;
|
|
119
162
|
}
|
|
120
163
|
ProcessUtil.ending = ending;
|
|
164
|
+
/**
|
|
165
|
+
* The summary of a turn that only compacted the context of an external agent (`/compact`): over, no tool
|
|
166
|
+
* called, no reply, its summary last; else undefined. It shows as pi's own compaction does, not as a turn.
|
|
167
|
+
*/
|
|
168
|
+
function compaction(item) {
|
|
169
|
+
const last = item.steps[item.steps.length - 1];
|
|
170
|
+
if (item.active || (last === null || last === void 0 ? void 0 : last.kind) !== 'summary' || item.reply.some(text => text.trim()) || item.steps.some(step => step.kind === 'tool')) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
return last.text;
|
|
174
|
+
}
|
|
175
|
+
ProcessUtil.compaction = compaction;
|
|
121
176
|
/** The tool calls: what "N steps" counts. */
|
|
122
177
|
function tools(steps) {
|
|
123
178
|
return steps.flatMap(step => (step.kind === 'tool' ? [step.call] : []));
|
|
@@ -200,6 +255,25 @@ export var ProcessUtil;
|
|
|
200
255
|
return role === 'custom' && !display && (customType === undefined || renderers[customType] === undefined);
|
|
201
256
|
}
|
|
202
257
|
ProcessUtil.hidden = hidden;
|
|
258
|
+
/**
|
|
259
|
+
* What the user said next after each turn (`said` reads a message of theirs), undefined for one they did not answer
|
|
260
|
+
* yet and for every other item: a card of the turn that asked them to pick knows it was answered, typed or tapped.
|
|
261
|
+
*/
|
|
262
|
+
function answers(items, said) {
|
|
263
|
+
const out = new Array(items.length).fill(undefined);
|
|
264
|
+
let next;
|
|
265
|
+
for (let index = items.length - 1; index >= 0; index--) {
|
|
266
|
+
const item = items[index];
|
|
267
|
+
if (item.kind === 'message' && item.message.role === 'user') {
|
|
268
|
+
next = said(item.message);
|
|
269
|
+
}
|
|
270
|
+
else if (item.kind === 'turn') {
|
|
271
|
+
out[index] = next;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return out;
|
|
275
|
+
}
|
|
276
|
+
ProcessUtil.answers = answers;
|
|
203
277
|
/**
|
|
204
278
|
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
205
279
|
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
@@ -247,7 +321,7 @@ export var ProcessUtil;
|
|
|
247
321
|
/** The two items show the same: their messages are the same objects, and so is whether it works. */
|
|
248
322
|
function same(a, b) {
|
|
249
323
|
if (a.kind === 'message' || b.kind === 'message') {
|
|
250
|
-
return a.kind === b.kind && a.message === b.message;
|
|
324
|
+
return a.kind === b.kind && a.message === b.message && a.queued === b.queued;
|
|
251
325
|
}
|
|
252
326
|
return a.active === b.active && a.messages.length === b.messages.length && a.messages.every((message, index) => message === b.messages[index]);
|
|
253
327
|
}
|
|
@@ -24,12 +24,15 @@ export type Phase = {
|
|
|
24
24
|
kind: 'attention';
|
|
25
25
|
} | {
|
|
26
26
|
kind: 'compacting';
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
|
+
/** `error`: what the provider said, for a reason without a word of its own. */
|
|
29
|
+
| {
|
|
28
30
|
kind: 'retrying';
|
|
29
31
|
attempt: number;
|
|
30
32
|
maxAttempts: number;
|
|
31
33
|
seconds: number;
|
|
32
34
|
reason: RetryReason;
|
|
35
|
+
error?: string;
|
|
33
36
|
};
|
|
34
37
|
/** Why pi retries, read from the error of the provider: what the loading line says before its countdown. */
|
|
35
38
|
export type RetryReason = 'rateLimit' | 'overloaded' | 'network' | 'error';
|
|
@@ -50,6 +53,8 @@ export declare namespace ProgressUtil {
|
|
|
50
53
|
}): string;
|
|
51
54
|
/** What ta does now, the most pressing first: a question for the user, then pi's own work, then the model's. */
|
|
52
55
|
function phase(state: SessionState, renderers?: readonly WebToolRendererResolver[]): Phase;
|
|
56
|
+
/** The first line of an error, short enough for the loading line. */
|
|
57
|
+
function brief(error: string | undefined, length?: number): string;
|
|
53
58
|
/** Why a request failed, as the provider said it: a rate limit, a model too busy, the network, or another error. */
|
|
54
59
|
function retryReason(errorMessage: string | undefined): RetryReason;
|
|
55
60
|
/** The seconds left of a wait of `delayMs` that began at `since`, rounded up: 0 once it is over. */
|