@celljs/ta-web 4.9.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +4 -3
- package/README.md +4 -3
- package/esm/browser/assistant/assistant-chat-list.js +8 -2
- package/esm/browser/assistant/assistant-extension.d.ts +8 -1
- package/esm/browser/assistant/assistant-extension.js +20 -0
- package/esm/browser/assistant/assistant-protocol.d.ts +3 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +2 -0
- package/esm/browser/assistant/assistant-task-util.js +5 -3
- package/esm/browser/assistant/assistant-view.js +81 -56
- package/esm/browser/assistant/assistant.d.ts +10 -1
- package/esm/browser/assistant/assistant.js +44 -5
- package/esm/browser/chat/chat-packages.d.ts +39 -0
- package/esm/browser/chat/chat-packages.js +70 -0
- package/esm/browser/chat/chat-protocol.d.ts +23 -1
- package/esm/browser/chat/chat-stores.d.ts +59 -0
- package/esm/browser/chat/chat-stores.js +121 -0
- package/esm/browser/chat/chat-util.d.ts +17 -0
- package/esm/browser/chat/chat-util.js +61 -0
- package/esm/browser/chat/chat-view.js +33 -12
- package/esm/browser/chat/chat.d.ts +31 -39
- package/esm/browser/chat/chat.js +226 -175
- package/esm/browser/components/app-nav.d.ts +6 -3
- package/esm/browser/components/app-nav.js +19 -10
- package/esm/browser/components/app-shell-hooks.d.ts +2 -2
- package/esm/browser/components/app-shell-hooks.js +7 -3
- package/esm/browser/components/app-view.js +75 -21
- package/esm/browser/components/chat-list.d.ts +20 -2
- package/esm/browser/components/chat-list.js +138 -22
- package/esm/browser/components/composer-box.d.ts +5 -5
- package/esm/browser/components/composer-box.js +111 -4
- package/esm/browser/components/composer.d.ts +7 -0
- package/esm/browser/components/composer.js +5 -4
- package/esm/browser/components/connection-bar.js +50 -17
- package/esm/browser/components/context-menu.d.ts +30 -4
- package/esm/browser/components/context-menu.js +199 -37
- package/esm/browser/components/conversation-scroll.d.ts +129 -6
- package/esm/browser/components/conversation-scroll.js +429 -109
- package/esm/browser/components/earlier-messages.d.ts +2 -1
- package/esm/browser/components/earlier-messages.js +2 -17
- package/esm/browser/components/editor-area.d.ts +3 -1
- package/esm/browser/components/editor-area.js +6 -5
- package/esm/browser/components/empty-pictures.d.ts +0 -2
- package/esm/browser/components/empty-pictures.js +0 -16
- package/esm/browser/components/folder-picker.d.ts +5 -2
- package/esm/browser/components/folder-picker.js +26 -8
- package/esm/browser/components/held-talk.d.ts +28 -0
- package/esm/browser/components/held-talk.js +76 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/icon.d.ts +2 -2
- package/esm/browser/components/icon.js +5 -6
- package/esm/browser/components/image-viewer.d.ts +124 -0
- package/esm/browser/components/image-viewer.js +397 -0
- package/esm/browser/components/lightbox.d.ts +11 -0
- package/esm/browser/components/lightbox.js +24 -0
- package/esm/browser/components/markdown.d.ts +6 -2
- package/esm/browser/components/markdown.js +24 -10
- package/esm/browser/components/media.js +1 -10
- package/esm/browser/components/message-footer.d.ts +16 -2
- package/esm/browser/components/message-footer.js +29 -12
- package/esm/browser/components/message-list.d.ts +24 -3
- package/esm/browser/components/message-list.js +149 -20
- package/esm/browser/components/message-menu.d.ts +3 -1
- package/esm/browser/components/message-menu.js +18 -3
- package/esm/browser/components/nav-places.d.ts +16 -1
- package/esm/browser/components/nav-places.js +12 -3
- package/esm/browser/components/phone-shell.d.ts +4 -1
- package/esm/browser/components/phone-shell.js +3 -1
- package/esm/browser/components/run-status.js +3 -3
- package/esm/browser/components/session-settings.d.ts +6 -0
- package/esm/browser/components/session-settings.js +14 -1
- package/esm/browser/components/session-view.js +8 -4
- package/esm/browser/components/settings-parts.d.ts +2 -2
- package/esm/browser/components/settings-parts.js +24 -1
- package/esm/browser/components/swipe-row.d.ts +2 -2
- package/esm/browser/components/swipe-row.js +7 -3
- package/esm/browser/components/tool-view.js +14 -12
- package/esm/browser/components/voice-button.d.ts +1 -1
- package/esm/browser/components/voice-button.js +1 -1
- package/esm/browser/components/voice-talk.d.ts +43 -0
- package/esm/browser/components/voice-talk.js +222 -0
- package/esm/browser/device/device.d.ts +3 -0
- package/esm/browser/device/device.js +11 -1
- package/esm/browser/device/hold.d.ts +42 -0
- package/esm/browser/device/hold.js +136 -0
- package/esm/browser/device/launch-screen.d.ts +1 -1
- package/esm/browser/device/launch-screen.js +1 -1
- package/esm/browser/device/long-press.d.ts +2 -0
- package/esm/browser/device/long-press.js +16 -1
- package/esm/browser/device/pull-down.d.ts +4 -2
- package/esm/browser/device/pull-down.js +64 -76
- package/esm/browser/device/row-swipe.d.ts +35 -10
- package/esm/browser/device/row-swipe.js +149 -71
- package/esm/browser/device/shake-undo.d.ts +16 -0
- package/esm/browser/device/shake-undo.js +59 -0
- package/esm/browser/device/sheet-swipe.d.ts +118 -18
- package/esm/browser/device/sheet-swipe.js +406 -107
- package/esm/browser/extension/web-extension-api.d.ts +97 -1
- package/esm/browser/extension/web-extension-code.d.ts +6 -0
- package/esm/browser/extension/web-extension-code.js +24 -0
- package/esm/browser/extension/web-extension-protocol.d.ts +23 -1
- package/esm/browser/extension/web-extension-protocol.js +8 -0
- package/esm/browser/extension/web-extensions.d.ts +14 -1
- package/esm/browser/extension/web-extensions.js +122 -23
- package/esm/browser/files/files-protocol.d.ts +25 -0
- package/esm/browser/files/files-protocol.js +2 -0
- package/esm/browser/files/files.d.ts +35 -0
- package/esm/browser/files/files.js +119 -0
- package/esm/browser/i18n/locales.d.ts +24 -2
- package/esm/browser/i18n/messages.d.ts +23 -1
- package/esm/browser/i18n/messages.js +48 -4
- package/esm/browser/index.d.ts +6 -0
- package/esm/browser/index.js +6 -0
- package/esm/browser/notices/notices-protocol.d.ts +9 -1
- package/esm/browser/notices/notices.d.ts +2 -0
- package/esm/browser/notices/notices.js +20 -10
- package/esm/browser/offline/device-values.d.ts +55 -0
- package/esm/browser/offline/device-values.js +142 -0
- package/esm/browser/offline/kept-chats-protocol.d.ts +17 -0
- package/esm/browser/offline/kept-chats-protocol.js +2 -0
- package/esm/browser/offline/kept-chats.d.ts +47 -0
- package/esm/browser/offline/kept-chats.js +146 -0
- package/esm/browser/offline/offline-reads.d.ts +44 -0
- package/esm/browser/offline/offline-reads.js +107 -0
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +57 -17
- package/esm/browser/style/device.js +27 -4
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +67 -15
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +46 -3
- package/esm/browser/util/frame.d.ts +5 -4
- package/esm/browser/util/frame.js +5 -4
- package/esm/browser/util/markdown.d.ts +18 -1
- package/esm/browser/util/markdown.js +119 -5
- package/esm/browser/util/process.d.ts +21 -0
- package/esm/browser/util/process.js +45 -1
- package/esm/browser/util/voice.d.ts +5 -2
- package/esm/browser/util/voice.js +6 -3
- package/esm/browser/util/zoom.d.ts +46 -0
- package/esm/browser/util/zoom.js +96 -0
- package/esm/browser/workbench-calls.d.ts +59 -0
- package/esm/browser/workbench-calls.js +141 -0
- package/esm/browser/workbench-protocol.d.ts +5 -1
- package/esm/browser/workbench-util.d.ts +7 -0
- package/esm/browser/workbench-util.js +9 -2
- package/esm/browser/workbench.d.ts +14 -5
- package/esm/browser/workbench.js +51 -31
- package/lib/browser/assistant/assistant-chat-list.js +8 -2
- package/lib/browser/assistant/assistant-extension.d.ts +8 -1
- package/lib/browser/assistant/assistant-extension.js +20 -0
- package/lib/browser/assistant/assistant-protocol.d.ts +3 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +2 -0
- package/lib/browser/assistant/assistant-task-util.js +5 -3
- package/lib/browser/assistant/assistant-view.js +78 -53
- package/lib/browser/assistant/assistant.d.ts +10 -1
- package/lib/browser/assistant/assistant.js +44 -5
- package/lib/browser/chat/chat-packages.d.ts +40 -0
- package/lib/browser/chat/chat-packages.js +74 -0
- package/lib/browser/chat/chat-protocol.d.ts +23 -1
- package/lib/browser/chat/chat-stores.d.ts +60 -0
- package/lib/browser/chat/chat-stores.js +125 -0
- package/lib/browser/chat/chat-util.d.ts +18 -0
- package/lib/browser/chat/chat-util.js +64 -0
- package/lib/browser/chat/chat-view.js +33 -12
- package/lib/browser/chat/chat.d.ts +31 -39
- package/lib/browser/chat/chat.js +227 -176
- package/lib/browser/components/app-nav.d.ts +6 -3
- package/lib/browser/components/app-nav.js +17 -8
- package/lib/browser/components/app-shell-hooks.d.ts +2 -2
- package/lib/browser/components/app-shell-hooks.js +7 -3
- package/lib/browser/components/app-view.js +74 -20
- package/lib/browser/components/chat-list.d.ts +20 -2
- package/lib/browser/components/chat-list.js +137 -21
- package/lib/browser/components/composer-box.d.ts +5 -5
- package/lib/browser/components/composer-box.js +111 -4
- package/lib/browser/components/composer.d.ts +7 -0
- package/lib/browser/components/composer.js +5 -4
- package/lib/browser/components/connection-bar.js +48 -15
- package/lib/browser/components/context-menu.d.ts +30 -4
- package/lib/browser/components/context-menu.js +198 -36
- package/lib/browser/components/conversation-scroll.d.ts +129 -6
- package/lib/browser/components/conversation-scroll.js +431 -110
- package/lib/browser/components/earlier-messages.d.ts +2 -1
- package/lib/browser/components/earlier-messages.js +2 -17
- package/lib/browser/components/editor-area.d.ts +3 -1
- package/lib/browser/components/editor-area.js +5 -4
- package/lib/browser/components/empty-pictures.d.ts +0 -2
- package/lib/browser/components/empty-pictures.js +0 -17
- package/lib/browser/components/folder-picker.d.ts +5 -2
- package/lib/browser/components/folder-picker.js +26 -8
- package/lib/browser/components/held-talk.d.ts +29 -0
- package/lib/browser/components/held-talk.js +79 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/icon.d.ts +2 -2
- package/lib/browser/components/icon.js +7 -6
- package/lib/browser/components/image-viewer.d.ts +125 -0
- package/lib/browser/components/image-viewer.js +435 -0
- package/lib/browser/components/lightbox.d.ts +12 -0
- package/lib/browser/components/lightbox.js +60 -0
- package/lib/browser/components/markdown.d.ts +6 -2
- package/lib/browser/components/markdown.js +24 -10
- package/lib/browser/components/media.js +2 -11
- package/lib/browser/components/message-footer.d.ts +16 -2
- package/lib/browser/components/message-footer.js +31 -12
- package/lib/browser/components/message-list.d.ts +24 -3
- package/lib/browser/components/message-list.js +146 -16
- package/lib/browser/components/message-menu.d.ts +3 -1
- package/lib/browser/components/message-menu.js +17 -2
- package/lib/browser/components/nav-places.d.ts +16 -1
- package/lib/browser/components/nav-places.js +13 -3
- package/lib/browser/components/phone-shell.d.ts +4 -1
- package/lib/browser/components/phone-shell.js +3 -1
- package/lib/browser/components/run-status.js +3 -3
- package/lib/browser/components/session-settings.d.ts +6 -0
- package/lib/browser/components/session-settings.js +14 -1
- package/lib/browser/components/session-view.js +7 -3
- package/lib/browser/components/settings-parts.d.ts +2 -2
- package/lib/browser/components/settings-parts.js +24 -1
- package/lib/browser/components/swipe-row.d.ts +2 -2
- package/lib/browser/components/swipe-row.js +7 -3
- package/lib/browser/components/tool-view.js +14 -12
- package/lib/browser/components/voice-button.d.ts +1 -1
- package/lib/browser/components/voice-button.js +1 -1
- package/lib/browser/components/voice-talk.d.ts +44 -0
- package/lib/browser/components/voice-talk.js +260 -0
- package/lib/browser/device/device.d.ts +3 -0
- package/lib/browser/device/device.js +11 -1
- package/lib/browser/device/hold.d.ts +43 -0
- package/lib/browser/device/hold.js +173 -0
- package/lib/browser/device/launch-screen.d.ts +1 -1
- package/lib/browser/device/launch-screen.js +1 -1
- package/lib/browser/device/long-press.d.ts +2 -0
- package/lib/browser/device/long-press.js +16 -1
- package/lib/browser/device/pull-down.d.ts +4 -2
- package/lib/browser/device/pull-down.js +63 -75
- package/lib/browser/device/row-swipe.d.ts +35 -10
- package/lib/browser/device/row-swipe.js +148 -70
- package/lib/browser/device/shake-undo.d.ts +17 -0
- package/lib/browser/device/shake-undo.js +63 -0
- package/lib/browser/device/sheet-swipe.d.ts +118 -18
- package/lib/browser/device/sheet-swipe.js +410 -108
- package/lib/browser/extension/web-extension-api.d.ts +97 -1
- package/lib/browser/extension/web-extension-code.d.ts +6 -0
- package/lib/browser/extension/web-extension-code.js +24 -0
- package/lib/browser/extension/web-extension-protocol.d.ts +23 -1
- package/lib/browser/extension/web-extension-protocol.js +9 -1
- package/lib/browser/extension/web-extensions.d.ts +14 -1
- package/lib/browser/extension/web-extensions.js +120 -21
- package/lib/browser/files/files-protocol.d.ts +26 -0
- package/lib/browser/files/files-protocol.js +5 -0
- package/lib/browser/files/files.d.ts +36 -0
- package/lib/browser/files/files.js +122 -0
- package/lib/browser/i18n/locales.d.ts +24 -2
- package/lib/browser/i18n/messages.d.ts +23 -1
- package/lib/browser/i18n/messages.js +48 -4
- package/lib/browser/index.d.ts +6 -0
- package/lib/browser/index.js +6 -0
- package/lib/browser/notices/notices-protocol.d.ts +9 -1
- package/lib/browser/notices/notices.d.ts +2 -0
- package/lib/browser/notices/notices.js +20 -10
- package/lib/browser/offline/device-values.d.ts +56 -0
- package/lib/browser/offline/device-values.js +148 -0
- package/lib/browser/offline/kept-chats-protocol.d.ts +18 -0
- package/lib/browser/offline/kept-chats-protocol.js +5 -0
- package/lib/browser/offline/kept-chats.d.ts +48 -0
- package/lib/browser/offline/kept-chats.js +149 -0
- package/lib/browser/offline/offline-reads.d.ts +45 -0
- package/lib/browser/offline/offline-reads.js +111 -0
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +57 -17
- package/lib/browser/style/device.js +27 -4
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +67 -15
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +46 -3
- package/lib/browser/util/frame.d.ts +5 -4
- package/lib/browser/util/frame.js +5 -4
- package/lib/browser/util/markdown.d.ts +18 -1
- package/lib/browser/util/markdown.js +119 -5
- package/lib/browser/util/process.d.ts +21 -0
- package/lib/browser/util/process.js +46 -2
- package/lib/browser/util/voice.d.ts +5 -2
- package/lib/browser/util/voice.js +6 -3
- package/lib/browser/util/zoom.d.ts +47 -0
- package/lib/browser/util/zoom.js +99 -0
- package/lib/browser/workbench-calls.d.ts +60 -0
- package/lib/browser/workbench-calls.js +145 -0
- package/lib/browser/workbench-protocol.d.ts +5 -1
- package/lib/browser/workbench-util.d.ts +7 -0
- package/lib/browser/workbench-util.js +10 -3
- package/lib/browser/workbench.d.ts +14 -5
- package/lib/browser/workbench.js +51 -31
- package/package.json +10 -10
- package/public/launch.svg +46 -42
|
@@ -1,3 +1,3 @@
|
|
|
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-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.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.ta-chat-scroll { flex: 1; min-height: 0; 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.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; 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-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.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.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 srgb, var(--ta-dino) 16%, transparent); }\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-dot { animation: ta-pulse 1.2s ease-in-out infinite; }\n.ta-dino-dot:nth-of-type(2) { animation-delay: 0.2s; }\n.ta-dino-dot:nth-of-type(3) { animation-delay: 0.4s; }\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@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) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }\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.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-card); 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.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.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; 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-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.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.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 srgb, var(--ta-dino) 16%, transparent); }\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-dot { animation: ta-pulse 1.2s ease-in-out infinite; }\n.ta-dino-dot:nth-of-type(2) { animation-delay: 0.2s; }\n.ta-dino-dot:nth-of-type(3) { animation-delay: 0.4s; }\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@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.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-card); 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";
|
|
3
3
|
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -23,7 +23,7 @@ exports.SHELL_STYLE = `
|
|
|
23
23
|
.ta-chats-title { flex: 1; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }
|
|
24
24
|
.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)); }
|
|
25
25
|
.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); }
|
|
26
|
-
.ta-side-scroll { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
|
|
26
|
+
.ta-side-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
|
|
27
27
|
.ta-side-scroll:has(> .ta-empty) { display: flex; flex-direction: column; }
|
|
28
28
|
.ta-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
29
29
|
.ta-side-row { position: relative; display: flex; align-items: center; border-radius: 10px; }
|
|
@@ -48,7 +48,8 @@ exports.SHELL_STYLE = `
|
|
|
48
48
|
.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; }
|
|
49
49
|
|
|
50
50
|
/* The double's chat */
|
|
51
|
-
.ta-
|
|
51
|
+
/* As .ta-scroll: nothing in a conversation is wider than it, it never scrolls sideways. */
|
|
52
|
+
.ta-chat-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }
|
|
52
53
|
.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; }
|
|
53
54
|
.ta-chat-scroll { overflow-anchor: none; }
|
|
54
55
|
.ta-chat-scroll .ta-chat-col { position: relative; padding-top: 12px; padding-bottom: 24px; min-height: 100%; }
|
|
@@ -124,6 +125,47 @@ exports.SHELL_STYLE = `
|
|
|
124
125
|
.ta-wave i:nth-child(2) { animation-delay: -0.7s; }
|
|
125
126
|
.ta-wave i:nth-child(3) { animation-delay: -0.45s; }
|
|
126
127
|
.ta-wave i:nth-child(4) { animation-delay: -0.2s; }
|
|
128
|
+
/* A conversation by voice (voice-talk.tsx), as WeChat's: the page dims and blurs, a green bubble holds the words as
|
|
129
|
+
they come, 取消 and 编辑 wait to have the finger slid onto them, and the bottom it starts on says what letting go
|
|
130
|
+
does. It comes up from the bottom, says "too short" in a bubble of its own, and fades out. Above the keyboard. */
|
|
131
|
+
.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; }
|
|
132
|
+
:root[data-keyboard] .ta-talk { --ta-talk-base: 104px; bottom: auto; height: var(--ta-viewport, calc(100dvh - var(--ta-keyboard, 0px))); }
|
|
133
|
+
.ta-talk-leaving { opacity: 0; pointer-events: none; }
|
|
134
|
+
.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; }
|
|
135
|
+
.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); }
|
|
136
|
+
.ta-talk-cancel .ta-talk-bubble { background: #fa5151; color: #fff; }
|
|
137
|
+
.ta-talk-short .ta-talk-bubble { background: #f2f2f2; color: #555; }
|
|
138
|
+
.ta-talk-bubble .ta-wave { height: 24px; gap: 4px; }
|
|
139
|
+
.ta-talk-bubble .ta-wave i { width: 4px; }
|
|
140
|
+
.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; }
|
|
141
|
+
.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; }
|
|
142
|
+
.ta-talk-released .ta-talk-zones, .ta-talk-short .ta-talk-zones, .ta-talk-leaving .ta-talk-zones { opacity: 0; }
|
|
143
|
+
/* What a finger counts as on 取消 or 编辑: more than the circle, as a thumb lands. */
|
|
144
|
+
.ta-talk-zone { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 16px; }
|
|
145
|
+
.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); }
|
|
146
|
+
.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; }
|
|
147
|
+
.ta-talk-zone.ta-on .ta-talk-zone-label { opacity: 1; transform: none; }
|
|
148
|
+
.ta-talk-zone.ta-on .ta-talk-zone-circle { transform: scale(1.18); background: #fff; color: #111; }
|
|
149
|
+
.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; }
|
|
150
|
+
.ta-talk-send.ta-talk-listening .ta-talk-base { background: linear-gradient(#f2f2f2, #d6d6d6); color: #333; }
|
|
151
|
+
.ta-talk-hint { font-size: calc(15px * var(--ta-font-scale)); letter-spacing: 0.04em; }
|
|
152
|
+
/* Low screens (a phone on its side): the same, closer together. */
|
|
153
|
+
@media (max-height: 520px) {
|
|
154
|
+
.ta-talk { --ta-talk-base: calc(64px + env(safe-area-inset-bottom)); --ta-talk-gap: 112px; }
|
|
155
|
+
.ta-talk-base { padding-top: 16px; border-radius: 50% 50% 0 0 / 36px 36px 0 0; }
|
|
156
|
+
.ta-talk-zones { bottom: calc(var(--ta-talk-base) + 4px); width: min(100%, 520px); }
|
|
157
|
+
.ta-talk-zone { gap: 8px; padding-bottom: 8px; }
|
|
158
|
+
.ta-talk-zone-circle { width: 56px; height: 56px; }
|
|
159
|
+
.ta-talk-words { max-height: 18vh; }
|
|
160
|
+
}
|
|
161
|
+
@keyframes ta-talk-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }
|
|
162
|
+
@keyframes ta-talk-rise { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }
|
|
163
|
+
@keyframes ta-talk-base { from { transform: translateY(100%); } }
|
|
164
|
+
@media (prefers-reduced-motion: reduce) {
|
|
165
|
+
.ta-talk, .ta-talk * { animation: none !important; transition-duration: 0ms !important; }
|
|
166
|
+
}
|
|
167
|
+
/* 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. */
|
|
168
|
+
.ta-talkable textarea:not(:focus) { pointer-events: none; }
|
|
127
169
|
.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; }
|
|
128
170
|
.ta-send:hover:not(:disabled) { opacity: 0.88; }
|
|
129
171
|
.ta-send:active:not(:disabled) { transform: scale(0.94); }
|
|
@@ -180,7 +222,8 @@ exports.SHELL_STYLE = `
|
|
|
180
222
|
.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }
|
|
181
223
|
.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; }
|
|
182
224
|
.ta-connection-retry:hover { background: var(--ta-hover-strong); }
|
|
183
|
-
.ta-connection:not(.ta-connection-back) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }
|
|
225
|
+
.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }
|
|
226
|
+
.ta-connection-notdone .ta-connection-body { padding-right: 12px; }
|
|
184
227
|
@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }
|
|
185
228
|
/* On a phone: a row in the page, whose height opens and closes. */
|
|
186
229
|
.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }
|
|
@@ -27,12 +27,13 @@ export declare namespace FrameUtil {
|
|
|
27
27
|
/** The room left above a message brought to the top of the view. */
|
|
28
28
|
const ANCHOR_GAP = 12;
|
|
29
29
|
/**
|
|
30
|
-
* Where the view scrolls to show a message at its top (`offset`: from the top of the thread), and
|
|
31
|
-
*
|
|
30
|
+
* Where the view scrolls to show a message at its top (`offset`: from the top of the thread), and the
|
|
31
|
+
* room to add under a thread `height` tall (without that room) for it to get there while what answers
|
|
32
|
+
* it is still short.
|
|
32
33
|
*/
|
|
33
|
-
function anchor(offset: number, viewport: number, gap?: number): {
|
|
34
|
+
function anchor(offset: number, viewport: number, height: number, gap?: number): {
|
|
34
35
|
top: number;
|
|
35
|
-
|
|
36
|
+
room: number;
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=frame.d.ts.map
|
|
@@ -46,12 +46,13 @@ var FrameUtil;
|
|
|
46
46
|
/** The room left above a message brought to the top of the view. */
|
|
47
47
|
FrameUtil.ANCHOR_GAP = 12;
|
|
48
48
|
/**
|
|
49
|
-
* Where the view scrolls to show a message at its top (`offset`: from the top of the thread), and
|
|
50
|
-
*
|
|
49
|
+
* Where the view scrolls to show a message at its top (`offset`: from the top of the thread), and the
|
|
50
|
+
* room to add under a thread `height` tall (without that room) for it to get there while what answers
|
|
51
|
+
* it is still short.
|
|
51
52
|
*/
|
|
52
|
-
function anchor(offset, viewport, gap = FrameUtil.ANCHOR_GAP) {
|
|
53
|
+
function anchor(offset, viewport, height, gap = FrameUtil.ANCHOR_GAP) {
|
|
53
54
|
const top = Math.max(0, offset - gap);
|
|
54
|
-
return { top,
|
|
55
|
+
return { top, room: Math.max(0, Math.ceil(top + viewport - height)) };
|
|
55
56
|
}
|
|
56
57
|
FrameUtil.anchor = anchor;
|
|
57
58
|
})(FrameUtil || (exports.FrameUtil = FrameUtil = {}));
|
|
@@ -17,10 +17,13 @@ export type MarkdownBlock = {
|
|
|
17
17
|
type: 'list';
|
|
18
18
|
ordered: boolean;
|
|
19
19
|
items: string[];
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
|
+
/** Every row has as many cells as the header; `align` is that of each column, as its separator wrote it. */
|
|
22
|
+
| {
|
|
21
23
|
type: 'table';
|
|
22
24
|
header: string[];
|
|
23
25
|
rows: string[][];
|
|
26
|
+
align: TableAlign[];
|
|
24
27
|
}
|
|
25
28
|
/** TeX shown on a line of its own; not `closed` while a reply streams it. */
|
|
26
29
|
| {
|
|
@@ -30,6 +33,8 @@ export type MarkdownBlock = {
|
|
|
30
33
|
} | {
|
|
31
34
|
type: 'rule';
|
|
32
35
|
};
|
|
36
|
+
/** How a column of a table is aligned: `:--`, `:-:`, `--:`, or as the page is (`''`). */
|
|
37
|
+
export type TableAlign = '' | 'left' | 'center' | 'right';
|
|
33
38
|
/** A run of text inside a block. */
|
|
34
39
|
export type MarkdownInline = {
|
|
35
40
|
type: 'text';
|
|
@@ -71,6 +76,18 @@ export type MediaKind = 'image' | 'video' | 'audio';
|
|
|
71
76
|
*/
|
|
72
77
|
export declare namespace MarkdownUtil {
|
|
73
78
|
function blocks(source: string): MarkdownBlock[];
|
|
79
|
+
/**
|
|
80
|
+
* The blocks of a reply while it streams: what is shown only grows, never shows a mark that is about to
|
|
81
|
+
* turn into something else. The last line waits while it may still start a structure (`PENDING_LINE`);
|
|
82
|
+
* a link or a formula on it begun and not closed waits for its end; `**` and `\`` opened on it are closed
|
|
83
|
+
* for now; a table shows from its separator on, a row once it is whole; a formula on lines of its own once
|
|
84
|
+
* it is closed. Code in an open fence streams as it comes.
|
|
85
|
+
*/
|
|
86
|
+
function streaming(source: string): MarkdownBlock[];
|
|
87
|
+
/** The two blocks show the same: one may stand for the other. */
|
|
88
|
+
function same(a: MarkdownBlock | undefined, b: MarkdownBlock): boolean;
|
|
89
|
+
/** A cell long enough to wrap; shorter cells keep to one line, so that a narrow table scrolls rather than squeezes them. */
|
|
90
|
+
function longCell(text: string): boolean;
|
|
74
91
|
function inline(text: string): MarkdownInline[];
|
|
75
92
|
/**
|
|
76
93
|
* What a target of an image shows: by the type of a data URL, else by the extension of its path; an
|
|
@@ -43,6 +43,17 @@ const BEFORE_URL = /[\w/.@:-]/;
|
|
|
43
43
|
/** `$x$`: no space inside the dollars, no digit after the closing one, so that `$5 and $10` stays text. */
|
|
44
44
|
const INLINE_MATH = /^\$(?=[^\s$])([^$]*?[^\s$\\])\$(?!\d)/;
|
|
45
45
|
const PUNCTUATION = /[!-/:-@[-`{-~]/;
|
|
46
|
+
/**
|
|
47
|
+
* The last line of a reply still coming that may yet turn into something else: the start of a fence, a
|
|
48
|
+
* heading, a list, a rule or a row of a table. It shows once the next character tells what it is.
|
|
49
|
+
*/
|
|
50
|
+
const PENDING_LINE = /^\s*(?:`{1,2}|~{1,2}|#{1,6}|[-*+_]{1,2}|\d{1,9}[.)]?|\|.*)$/;
|
|
51
|
+
/** A link or an image the last line has begun: its text, then its target, before the `)` that ends it. */
|
|
52
|
+
const PENDING_LINK = /!?\[[^\]]*(?:\](?:\([^)]*)?)?$/;
|
|
53
|
+
/** Inline TeX begun and not closed: `$` before something that is not a space or a digit (`$5` is a price), or `\\(`. */
|
|
54
|
+
const PENDING_MATH = /(?:(?<![\\$])\$(?=[^\s$\d])[^$]*|\\\((?![\s\S]*\\\)).*)$/;
|
|
55
|
+
/** Cells of a table longer than this (a CJK character counts twice) wrap; shorter ones keep to one line. */
|
|
56
|
+
const LONG_CELL = 24;
|
|
46
57
|
/**
|
|
47
58
|
* The markdown models write: fenced code, headings, lists, quotes, tables, emphasis, code spans, links,
|
|
48
59
|
* images and videos, and TeX between `$`, `$$`, `\\(\\)` or `\\[\\]`. Its output is data for React to
|
|
@@ -136,12 +147,15 @@ var MarkdownUtil;
|
|
|
136
147
|
}
|
|
137
148
|
if (line.includes('|') && TABLE_SEPARATOR.test((_b = lines[i + 1]) !== null && _b !== void 0 ? _b : '') && !paragraph.length) {
|
|
138
149
|
const header = cells(line);
|
|
150
|
+
const marks = cells(lines[i + 1]);
|
|
151
|
+
const align = header.map((_, column) => { var _a; return alignOf((_a = marks[column]) !== null && _a !== void 0 ? _a : ''); });
|
|
139
152
|
const rows = [];
|
|
140
153
|
for (i += 2; i < lines.length && lines[i].includes('|') && lines[i].trim(); i++) {
|
|
141
|
-
|
|
154
|
+
const row = cells(lines[i]);
|
|
155
|
+
rows.push(header.map((_, column) => { var _a; return (_a = row[column]) !== null && _a !== void 0 ? _a : ''; }));
|
|
142
156
|
}
|
|
143
157
|
i--;
|
|
144
|
-
blocks.push({ type: 'table', header, rows });
|
|
158
|
+
blocks.push({ type: 'table', header, rows, align });
|
|
145
159
|
continue;
|
|
146
160
|
}
|
|
147
161
|
paragraph.push(line);
|
|
@@ -150,6 +164,100 @@ var MarkdownUtil;
|
|
|
150
164
|
return blocks;
|
|
151
165
|
}
|
|
152
166
|
MarkdownUtil.blocks = blocks;
|
|
167
|
+
/**
|
|
168
|
+
* The blocks of a reply while it streams: what is shown only grows, never shows a mark that is about to
|
|
169
|
+
* turn into something else. The last line waits while it may still start a structure (`PENDING_LINE`);
|
|
170
|
+
* a link or a formula on it begun and not closed waits for its end; `**` and `\`` opened on it are closed
|
|
171
|
+
* for now; a table shows from its separator on, a row once it is whole; a formula on lines of its own once
|
|
172
|
+
* it is closed. Code in an open fence streams as it comes.
|
|
173
|
+
*/
|
|
174
|
+
function streaming(source) {
|
|
175
|
+
const text = source.replace(/\r\n?/g, '\n');
|
|
176
|
+
const blocks = MarkdownUtil.blocks(settled(text));
|
|
177
|
+
const last = blocks[blocks.length - 1];
|
|
178
|
+
if ((last === null || last === void 0 ? void 0 : last.type) === 'math' && !last.closed) {
|
|
179
|
+
blocks.pop();
|
|
180
|
+
}
|
|
181
|
+
else if ((last === null || last === void 0 ? void 0 : last.type) === 'paragraph' && last.text.trimStart().startsWith('|') && !last.text.includes('\n')) {
|
|
182
|
+
// The head of a table whose separator has not come yet.
|
|
183
|
+
blocks.pop();
|
|
184
|
+
}
|
|
185
|
+
return blocks;
|
|
186
|
+
}
|
|
187
|
+
MarkdownUtil.streaming = streaming;
|
|
188
|
+
function settled(text) {
|
|
189
|
+
var _a, _b;
|
|
190
|
+
var _c, _d;
|
|
191
|
+
if (openFence(text)) {
|
|
192
|
+
return text;
|
|
193
|
+
}
|
|
194
|
+
const start = text.lastIndexOf('\n') + 1;
|
|
195
|
+
let line = text.slice(start);
|
|
196
|
+
if (PENDING_LINE.test(line)) {
|
|
197
|
+
return text.slice(0, start);
|
|
198
|
+
}
|
|
199
|
+
line = line.replace(PENDING_LINK, '').replace(PENDING_MATH, '');
|
|
200
|
+
// A mark cut in two at the end (one `*` of `**`): as if it had not come.
|
|
201
|
+
line = line.replace(/[*`]+$/, '');
|
|
202
|
+
if (((_c = (_a = line.match(/`/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _c !== void 0 ? _c : 0) % 2) {
|
|
203
|
+
line += '`';
|
|
204
|
+
}
|
|
205
|
+
if (((_d = (_b = line.replace(/`[^`]*`/g, '').match(/\*\*/g)) === null || _b === void 0 ? void 0 : _b.length) !== null && _d !== void 0 ? _d : 0) % 2) {
|
|
206
|
+
line += '**';
|
|
207
|
+
}
|
|
208
|
+
return text.slice(0, start) + line;
|
|
209
|
+
}
|
|
210
|
+
/** A fence opened and not closed: the reply is in the middle of code. */
|
|
211
|
+
function openFence(text) {
|
|
212
|
+
let fence;
|
|
213
|
+
for (const line of text.split('\n')) {
|
|
214
|
+
const open = FENCE.exec(line);
|
|
215
|
+
if (!fence) {
|
|
216
|
+
fence = open === null || open === void 0 ? void 0 : open[1];
|
|
217
|
+
}
|
|
218
|
+
else if (new RegExp(`^\\s*${fence[0]}{${fence.length},}\\s*$`).test(line)) {
|
|
219
|
+
fence = undefined;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return fence !== undefined;
|
|
223
|
+
}
|
|
224
|
+
/** The two blocks show the same: one may stand for the other. */
|
|
225
|
+
function same(a, b) {
|
|
226
|
+
if (a === b) {
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
if (!a || a.type !== b.type) {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
switch (b.type) {
|
|
233
|
+
case 'list':
|
|
234
|
+
return a.type === 'list' && a.ordered === b.ordered && sameStrings(a.items, b.items);
|
|
235
|
+
case 'table':
|
|
236
|
+
return (a.type === 'table' &&
|
|
237
|
+
sameStrings(a.header, b.header) &&
|
|
238
|
+
sameStrings(a.align, b.align) &&
|
|
239
|
+
a.rows.length === b.rows.length &&
|
|
240
|
+
a.rows.every((row, index) => sameStrings(row, b.rows[index])));
|
|
241
|
+
default:
|
|
242
|
+
return Object.keys(b).every(key => a[key] === b[key]);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
MarkdownUtil.same = same;
|
|
246
|
+
function sameStrings(a, b) {
|
|
247
|
+
return a.length === b.length && a.every((value, index) => value === b[index]);
|
|
248
|
+
}
|
|
249
|
+
/** A cell long enough to wrap; shorter cells keep to one line, so that a narrow table scrolls rather than squeezes them. */
|
|
250
|
+
function longCell(text) {
|
|
251
|
+
let width = 0;
|
|
252
|
+
for (const char of text) {
|
|
253
|
+
width += char.charCodeAt(0) >= 0x2e80 ? 2 : 1;
|
|
254
|
+
if (width > LONG_CELL) {
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
MarkdownUtil.longCell = longCell;
|
|
153
261
|
function inline(text) {
|
|
154
262
|
var _a, _b, _c, _d, _e;
|
|
155
263
|
const out = [];
|
|
@@ -321,13 +429,19 @@ var MarkdownUtil;
|
|
|
321
429
|
}
|
|
322
430
|
return { block: { type: 'math', tex: tex.join('\n').trim(), closed: false }, end: lines.length - 1 };
|
|
323
431
|
}
|
|
432
|
+
/** The cells of a row; `\\|` is a `|` in a cell. */
|
|
324
433
|
function cells(row) {
|
|
325
434
|
return row
|
|
326
435
|
.trim()
|
|
327
436
|
.replace(/^\|/, '')
|
|
328
|
-
.replace(
|
|
329
|
-
.split(
|
|
330
|
-
.map(cell => cell.trim());
|
|
437
|
+
.replace(/(?<!\\)\|$/, '')
|
|
438
|
+
.split(/(?<!\\)\|/)
|
|
439
|
+
.map(cell => cell.trim().replace(/\\\|/g, '|'));
|
|
440
|
+
}
|
|
441
|
+
function alignOf(mark) {
|
|
442
|
+
const left = mark.startsWith(':');
|
|
443
|
+
const right = mark.endsWith(':');
|
|
444
|
+
return left && right ? 'center' : right ? 'right' : left ? 'left' : '';
|
|
331
445
|
}
|
|
332
446
|
})(MarkdownUtil || (exports.MarkdownUtil = MarkdownUtil = {}));
|
|
333
447
|
//# sourceMappingURL=markdown.js.map
|
|
@@ -10,6 +10,12 @@ export type ProcessStep = {
|
|
|
10
10
|
kind: 'text';
|
|
11
11
|
key: string;
|
|
12
12
|
text: string;
|
|
13
|
+
}
|
|
14
|
+
/** An agent that compacts its own context said its summary of the conversation. */
|
|
15
|
+
| {
|
|
16
|
+
kind: 'summary';
|
|
17
|
+
key: string;
|
|
18
|
+
text: string;
|
|
13
19
|
} | {
|
|
14
20
|
kind: 'tool';
|
|
15
21
|
key: string;
|
|
@@ -41,6 +47,8 @@ export interface TurnItem {
|
|
|
41
47
|
export type ThreadItem = MessageItem | TurnItem;
|
|
42
48
|
/** While the agent works, only the latest steps show; the earlier ones fold into one row. */
|
|
43
49
|
export declare const VISIBLE_STEPS = 8;
|
|
50
|
+
/** A time shows between two items of the conversation this long apart, as in WeChat. */
|
|
51
|
+
export declare const TIME_BREAK_MS: number;
|
|
44
52
|
/**
|
|
45
53
|
* How the conversation is laid out (thinking and tool calls folded into steps): pure functions over pi's
|
|
46
54
|
* messages, so that a component only draws what they return.
|
|
@@ -69,6 +77,19 @@ export declare namespace ProcessUtil {
|
|
|
69
77
|
* waits), then done for the last turn, needing you after an error, and calm for the rest.
|
|
70
78
|
*/
|
|
71
79
|
function mood(item: TurnItem, last: boolean, waiting: boolean): Mood;
|
|
80
|
+
/** When each item began: its first message; one still empty (a turn about to come), when the one before did. */
|
|
81
|
+
function starts(items: ThreadItem[]): number[];
|
|
82
|
+
/**
|
|
83
|
+
* The item draws something: not a custom message the model sees and the user does not (`display`
|
|
84
|
+
* false), unless a web extension registered a renderer for its type (`renderers`).
|
|
85
|
+
*/
|
|
86
|
+
function shown(item: ThreadItem, renderers: Readonly<Record<string, unknown>>): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
89
|
+
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
90
|
+
* item not `shown` has none and is not the one before: two times would else stand one on the other.
|
|
91
|
+
*/
|
|
92
|
+
function timeBreaks(starts: number[], shown?: (index: number) => boolean): (number | undefined)[];
|
|
72
93
|
/** The two items show the same: their messages are the same objects, and so is whether it works. */
|
|
73
94
|
function same(a: ThreadItem, b: ThreadItem): boolean;
|
|
74
95
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProcessUtil = exports.VISIBLE_STEPS = void 0;
|
|
3
|
+
exports.ProcessUtil = exports.TIME_BREAK_MS = exports.VISIBLE_STEPS = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
4
5
|
const message_1 = require("./message");
|
|
5
6
|
/** While the agent works, only the latest steps show; the earlier ones fold into one row. */
|
|
6
7
|
exports.VISIBLE_STEPS = 8;
|
|
8
|
+
/** A time shows between two items of the conversation this long apart, as in WeChat. */
|
|
9
|
+
exports.TIME_BREAK_MS = 5 * 60000;
|
|
7
10
|
const TURN_ROLES = new Set(['assistant', 'toolResult']);
|
|
8
11
|
/**
|
|
9
12
|
* How the conversation is laid out (thinking and tool calls folded into steps): pure functions over pi's
|
|
@@ -55,7 +58,8 @@ var ProcessUtil;
|
|
|
55
58
|
steps.push({ kind: 'thinking', key, text: block.thinking });
|
|
56
59
|
}
|
|
57
60
|
else if (block.type === 'text' && ((_b = block.text) === null || _b === void 0 ? void 0 : _b.trim())) {
|
|
58
|
-
|
|
61
|
+
const summary = ta_protocol_1.TaAgentSummary.read(block.text);
|
|
62
|
+
steps.push(summary === undefined ? { kind: 'text', key, text: block.text } : { kind: 'summary', key, text: summary });
|
|
59
63
|
}
|
|
60
64
|
else if (block.type === 'toolCall') {
|
|
61
65
|
steps.push({ kind: 'tool', key: block.id || key, call: block });
|
|
@@ -126,6 +130,46 @@ var ProcessUtil;
|
|
|
126
130
|
return last && stopReason !== 'aborted' ? 'done' : 'idle';
|
|
127
131
|
}
|
|
128
132
|
ProcessUtil.mood = mood;
|
|
133
|
+
/** When each item began: its first message; one still empty (a turn about to come), when the one before did. */
|
|
134
|
+
function starts(items) {
|
|
135
|
+
let last = Number.NEGATIVE_INFINITY;
|
|
136
|
+
return items.map(item => {
|
|
137
|
+
const first = item.kind === 'turn' ? item.messages[0] : item.message;
|
|
138
|
+
const at = first === null || first === void 0 ? void 0 : first.timestamp;
|
|
139
|
+
last = typeof at === 'number' ? at : last;
|
|
140
|
+
return last;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
ProcessUtil.starts = starts;
|
|
144
|
+
/**
|
|
145
|
+
* The item draws something: not a custom message the model sees and the user does not (`display`
|
|
146
|
+
* false), unless a web extension registered a renderer for its type (`renderers`).
|
|
147
|
+
*/
|
|
148
|
+
function shown(item, renderers) {
|
|
149
|
+
if (item.kind === 'turn' || item.message.role !== 'custom') {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
const { display, customType } = item.message;
|
|
153
|
+
return !!display || (customType !== undefined && renderers[customType] !== undefined);
|
|
154
|
+
}
|
|
155
|
+
ProcessUtil.shown = shown;
|
|
156
|
+
/**
|
|
157
|
+
* The time to show above each item, as WeChat does between messages: above the first item with a time,
|
|
158
|
+
* and above one that began `TIME_BREAK_MS` or more after the one shown before it; else undefined. An
|
|
159
|
+
* item not `shown` has none and is not the one before: two times would else stand one on the other.
|
|
160
|
+
*/
|
|
161
|
+
function timeBreaks(starts, shown = () => true) {
|
|
162
|
+
let before = Number.NEGATIVE_INFINITY;
|
|
163
|
+
return starts.map((at, index) => {
|
|
164
|
+
if (!shown(index)) {
|
|
165
|
+
return undefined;
|
|
166
|
+
}
|
|
167
|
+
const time = Number.isFinite(at) && (!Number.isFinite(before) || at - before >= exports.TIME_BREAK_MS) ? at : undefined;
|
|
168
|
+
before = at;
|
|
169
|
+
return time;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
ProcessUtil.timeBreaks = timeBreaks;
|
|
129
173
|
/** The two items show the same: their messages are the same objects, and so is whether it works. */
|
|
130
174
|
function same(a, b) {
|
|
131
175
|
if (a.kind === 'message' || b.kind === 'message') {
|
|
@@ -7,8 +7,11 @@ export declare namespace Voice {
|
|
|
7
7
|
interface Listening {
|
|
8
8
|
stop(): void;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Listens for one utterance: `onText` gets the words so far, then the final ones with `final` set. `continuous`
|
|
12
|
+
* goes on past a pause, until it is stopped: what a finger held on the box says, not one thing said to it.
|
|
13
|
+
*/
|
|
14
|
+
function listen(language: string, onText: (text: string, final: boolean) => void, onEnd: (error?: string) => void, continuous?: boolean): Listening | undefined;
|
|
12
15
|
/** Text for the ear: no markdown marks, no code. */
|
|
13
16
|
function spoken(markdown: string): string;
|
|
14
17
|
function speak(markdown: string, language: string, onEnd: () => void): void;
|
|
@@ -22,8 +22,11 @@ var Voice;
|
|
|
22
22
|
return typeof speechSynthesis !== 'undefined';
|
|
23
23
|
}
|
|
24
24
|
Voice.canSpeak = canSpeak;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Listens for one utterance: `onText` gets the words so far, then the final ones with `final` set. `continuous`
|
|
27
|
+
* goes on past a pause, until it is stopped: what a finger held on the box says, not one thing said to it.
|
|
28
|
+
*/
|
|
29
|
+
function listen(language, onText, onEnd, continuous = false) {
|
|
27
30
|
const Recognition = recognitionClass();
|
|
28
31
|
if (!Recognition) {
|
|
29
32
|
return undefined;
|
|
@@ -31,7 +34,7 @@ var Voice;
|
|
|
31
34
|
const recognition = new Recognition();
|
|
32
35
|
recognition.lang = language;
|
|
33
36
|
recognition.interimResults = true;
|
|
34
|
-
recognition.continuous =
|
|
37
|
+
recognition.continuous = continuous;
|
|
35
38
|
let text = '';
|
|
36
39
|
recognition.onresult = event => {
|
|
37
40
|
let final = false;
|