@celljs/ta-web 4.14.0 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-initiative.js +1 -1
- package/esm/browser/components/access-view.js +3 -2
- package/esm/browser/components/account-menu.js +10 -3
- package/esm/browser/components/app-view.js +4 -1
- package/esm/browser/components/auth-view.d.ts +1 -1
- package/esm/browser/components/auth-view.js +38 -10
- package/esm/browser/components/custom-provider-advanced.d.ts +14 -0
- package/esm/browser/components/custom-provider-advanced.js +50 -0
- package/esm/browser/components/custom-provider-util.d.ts +38 -0
- package/esm/browser/components/custom-provider-util.js +103 -0
- package/esm/browser/components/custom-provider-view.d.ts +11 -0
- package/esm/browser/components/custom-provider-view.js +181 -0
- package/esm/browser/components/face.js +7 -2
- package/esm/browser/components/gallery.d.ts +9 -0
- package/esm/browser/components/gallery.js +57 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/lightbox.d.ts +8 -1
- package/esm/browser/components/lightbox.js +4 -1
- package/esm/browser/components/markdown.js +6 -1
- package/esm/browser/components/media.d.ts +12 -2
- package/esm/browser/components/media.js +55 -13
- package/esm/browser/components/message-list.js +3 -2
- package/esm/browser/components/notice-center.js +6 -2
- package/esm/browser/components/serve-restart.d.ts +26 -0
- package/esm/browser/components/serve-restart.js +91 -0
- package/esm/browser/components/session-view.js +19 -11
- package/esm/browser/components/settings-choices.js +2 -3
- package/esm/browser/components/settings-controls.d.ts +7 -1
- package/esm/browser/components/settings-controls.js +8 -0
- package/esm/browser/components/settings-parts.js +25 -10
- package/esm/browser/components/sign-in-setup.js +3 -1
- package/esm/browser/editor/monaco-loader.js +7 -1
- package/esm/browser/extension/icons.js +3 -1
- package/esm/browser/extension/web-api-contributions.d.ts +3 -0
- package/esm/browser/extension/web-extension-api.d.ts +7 -0
- package/esm/browser/extension/web-extension-context.d.ts +2 -0
- package/esm/browser/extension/web-extension-context.js +19 -0
- package/esm/browser/game/game-loader.js +22 -2
- package/esm/browser/game/game3d-protocol.d.ts +13 -4
- package/esm/browser/i18n/locales.d.ts +68 -1
- package/esm/browser/i18n/locales.js +25 -1
- package/esm/browser/i18n/messages-ja.d.ts +2 -0
- package/esm/browser/i18n/messages-ja.js +984 -0
- package/esm/browser/i18n/messages-zh-tw.d.ts +3 -0
- package/esm/browser/i18n/messages-zh-tw.js +985 -0
- package/esm/browser/i18n/messages.d.ts +63 -0
- package/esm/browser/i18n/messages.js +126 -1
- package/esm/browser/i18n/use-t.js +3 -2
- package/esm/browser/settings/settings-protocol.d.ts +3 -2
- package/esm/browser/settings/settings-protocol.js +4 -3
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +18 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +2 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +45 -1
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +1 -0
- package/esm/browser/util/desktop.d.ts +17 -1
- package/esm/browser/util/desktop.js +24 -0
- package/esm/browser/util/gallery.d.ts +18 -0
- package/esm/browser/util/gallery.js +123 -0
- package/esm/browser/util/link.d.ts +8 -0
- package/esm/browser/util/link.js +14 -0
- package/esm/browser/util/markdown.d.ts +11 -0
- package/esm/browser/util/markdown.js +4 -0
- package/esm/browser/util/thumbnail.d.ts +18 -0
- package/esm/browser/util/thumbnail.js +26 -0
- package/esm/browser/util/voice.d.ts +20 -1
- package/esm/browser/util/voice.js +27 -11
- package/esm/browser/workbench-protocol.d.ts +8 -0
- package/esm/browser/workbench-util.d.ts +2 -0
- package/esm/browser/workbench-util.js +6 -1
- package/esm/browser/workbench.d.ts +16 -0
- package/esm/browser/workbench.js +67 -0
- package/lib/browser/assistant/assistant-initiative.js +1 -1
- package/lib/browser/components/access-view.js +3 -2
- package/lib/browser/components/account-menu.js +9 -2
- package/lib/browser/components/app-view.js +4 -1
- package/lib/browser/components/auth-view.d.ts +1 -1
- package/lib/browser/components/auth-view.js +37 -9
- package/lib/browser/components/custom-provider-advanced.d.ts +15 -0
- package/lib/browser/components/custom-provider-advanced.js +86 -0
- package/lib/browser/components/custom-provider-util.d.ts +39 -0
- package/lib/browser/components/custom-provider-util.js +106 -0
- package/lib/browser/components/custom-provider-view.d.ts +12 -0
- package/lib/browser/components/custom-provider-view.js +217 -0
- package/lib/browser/components/face.js +7 -2
- package/lib/browser/components/gallery.d.ts +10 -0
- package/lib/browser/components/gallery.js +93 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/lightbox.d.ts +8 -1
- package/lib/browser/components/lightbox.js +4 -1
- package/lib/browser/components/markdown.js +6 -1
- package/lib/browser/components/media.d.ts +12 -2
- package/lib/browser/components/media.js +57 -13
- package/lib/browser/components/message-list.js +3 -2
- package/lib/browser/components/notice-center.js +6 -2
- package/lib/browser/components/serve-restart.d.ts +27 -0
- package/lib/browser/components/serve-restart.js +129 -0
- package/lib/browser/components/session-view.js +21 -13
- package/lib/browser/components/settings-choices.js +1 -2
- package/lib/browser/components/settings-controls.d.ts +7 -1
- package/lib/browser/components/settings-controls.js +9 -0
- package/lib/browser/components/settings-parts.js +23 -8
- package/lib/browser/components/sign-in-setup.js +3 -1
- package/lib/browser/editor/monaco-loader.js +7 -1
- package/lib/browser/extension/icons.js +2 -0
- package/lib/browser/extension/web-api-contributions.d.ts +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +7 -0
- package/lib/browser/extension/web-extension-context.d.ts +2 -0
- package/lib/browser/extension/web-extension-context.js +19 -0
- package/lib/browser/game/game-loader.js +22 -2
- package/lib/browser/game/game3d-protocol.d.ts +13 -4
- package/lib/browser/i18n/locales.d.ts +68 -1
- package/lib/browser/i18n/locales.js +25 -1
- package/lib/browser/i18n/messages-ja.d.ts +3 -0
- package/lib/browser/i18n/messages-ja.js +987 -0
- package/lib/browser/i18n/messages-zh-tw.d.ts +4 -0
- package/lib/browser/i18n/messages-zh-tw.js +988 -0
- package/lib/browser/i18n/messages.d.ts +63 -0
- package/lib/browser/i18n/messages.js +129 -2
- package/lib/browser/i18n/use-t.js +2 -1
- package/lib/browser/settings/settings-protocol.d.ts +3 -2
- package/lib/browser/settings/settings-protocol.js +4 -3
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +18 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +2 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +45 -1
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +1 -0
- package/lib/browser/util/desktop.d.ts +17 -1
- package/lib/browser/util/desktop.js +24 -0
- package/lib/browser/util/gallery.d.ts +19 -0
- package/lib/browser/util/gallery.js +126 -0
- package/lib/browser/util/link.d.ts +8 -0
- package/lib/browser/util/link.js +14 -0
- package/lib/browser/util/markdown.d.ts +11 -0
- package/lib/browser/util/markdown.js +4 -0
- package/lib/browser/util/thumbnail.d.ts +19 -0
- package/lib/browser/util/thumbnail.js +29 -0
- package/lib/browser/util/voice.d.ts +20 -1
- package/lib/browser/util/voice.js +27 -11
- package/lib/browser/workbench-protocol.d.ts +8 -0
- package/lib/browser/workbench-util.d.ts +2 -0
- package/lib/browser/workbench-util.js +6 -1
- package/lib/browser/workbench.d.ts +16 -0
- package/lib/browser/workbench.js +67 -0
- package/package.json +7 -7
|
@@ -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-x: hidden; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }\n.ta-side-scroll:has(> .ta-empty) { display: flex; flex-direction: column; }\n.ta-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-side-row { position: relative; display: flex; align-items: center; border-radius: 10px; }\n.ta-side-row:hover, .ta-side-row.ta-selected { background: var(--ta-hover); }\n.ta-side-row.ta-selected { background: var(--ta-selected); }\n.ta-side-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background 120ms; }\n.ta-side-list > li > .ta-side-item:hover { background: var(--ta-hover); }\n.ta-side-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-side-item-title { font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-sub { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-time { align-self: flex-start; font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }\n.ta-close { position: absolute; right: 4px; opacity: 0; width: 26px; height: 26px; }\n.ta-side-row:hover .ta-close, .ta-close:focus-visible { opacity: 1; }\n.ta-task-status { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ta-raised); color: var(--ta-secondary); }\n.ta-task-status-done { color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 14%, transparent); }\n.ta-task-status-failed { color: var(--ta-red); background: color-mix(in srgb, var(--ta-red) 14%, transparent); }\n.ta-task-status-stopped { color: var(--ta-muted); }\n.ta-task-status .ta-spinner { width: 12px; height: 12px; }\n.ta-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: var(--ta-titlebar); background: var(--ta-main); }\n.ta-main-head { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; padding-top: env(safe-area-inset-top); flex: none; }\n.ta-main-title { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n/* A title between the buttons of the head is centred on it, whatever buttons its sides have: a back button on one,\n the workbench's on the other, both or neither. */\n.ta-main-head:has(> .ta-main-title) { display: grid; grid-template-columns: minmax(32px, 1fr) minmax(0, auto) minmax(32px, 1fr); }\n.ta-main-head:has(> .ta-main-title) > * { grid-row: 1; grid-column: 1; justify-self: start; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title { grid-column: 2; justify-self: stretch; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title ~ * { grid-column: 3; justify-self: end; }\n.ta-main-sub { font-size: calc(11.5px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* The double's chat */\n/* As .ta-scroll: nothing in a conversation is wider than it, it never scrolls sideways. */\n.ta-chat-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }\n.ta-chat-col { width: 100%; max-width: calc(var(--ta-col) + 48px); margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }\n.ta-chat-scroll { overflow-anchor: none; }\n.ta-chat-scroll .ta-chat-col { position: relative; padding-top: 12px; padding-bottom: 24px; min-height: 100%; }\n.ta-hero { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0; animation: ta-in 320ms var(--ta-ease); }\n.ta-hero-center { flex: 1; justify-content: center; }\n.ta-hero h1 { margin: 6px 0 0; font-size: calc(22px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n/* Chinese breaks between its words and after its commas, not inside a word, so that balance does not cut \u547D\u4EE4 in two. */\n.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-hero-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-hero-step { display: inline-flex; align-items: center; gap: 7px; }\n.ta-hero-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); }\n.ta-hero-arrow { color: var(--ta-muted); }\n.ta-hero .ta-pic-cards { max-width: 524px; margin-top: 18px; }\n/* Pictures (components/picture.tsx, ui.Picture): a few shapes in the tones of the theme; choices as cards of them */\n.ta-pic-cards { display: grid; grid-template-columns: repeat(var(--ta-pic-columns, 3), minmax(0, 1fr)); gap: 10px; width: 100%; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) { .ta-pic-cards { grid-template-columns: repeat(var(--ta-pic-columns-compact, 3), minmax(0, 1fr)); gap: 8px; } }\n.ta-pic-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 7px 7px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-card); color: var(--ta-body); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: center; cursor: pointer; transition: border-color 140ms, background 140ms, box-shadow 140ms, transform 140ms var(--ta-ease); animation: ta-in 320ms var(--ta-ease) both; }\n.ta-pic-card:nth-child(2) { animation-delay: 50ms; }\n.ta-pic-card:nth-child(3) { animation-delay: 100ms; }\n.ta-pic-card:nth-child(n+4) { animation-delay: 150ms; }\n.ta-pic-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ta-green) 55%, var(--ta-border)); background: var(--ta-hover); color: var(--ta-text); }\n.ta-pic-card:hover:not(:disabled) .ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 26%, transparent); }\n.ta-pic-card:active:not(:disabled) { transform: scale(.98); }\n.ta-pic-card:disabled { opacity: .55; cursor: default; }\n.ta-pic-card-label { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }\n.ta-pic-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-pic-card-hinted { gap: 6px; text-align: left; }\n.ta-pic-card-hinted .ta-pic-card-label { padding: 0 4px; color: var(--ta-text); font-weight: 600; }\n.ta-pic-card-hint { margin-top: -3px; padding: 0 4px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-pic { display: block; width: 100%; height: auto; border-radius: 8px; }\n.ta-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }\n.ta-pic-pane { fill: var(--ta-hover); }\n.ta-pic-line, .ta-pic-dot { fill: var(--ta-hover-strong); }\n.ta-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }\n.ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 16%, transparent); stroke: color-mix(in srgb, var(--ta-green) 70%, transparent); stroke-width: 1; transition: fill 140ms; }\n.ta-pic-mark { fill: var(--ta-green); }\n.ta-pic-soft { opacity: .45; }\n.ta-pic-plus { fill: color-mix(in srgb, var(--ta-green) 55%, transparent); }\n.ta-pic-bad { fill: color-mix(in srgb, var(--ta-red) 85%, transparent); }\n.ta-pic-wait { fill: var(--ta-yellow); }\n.ta-pic-ring { fill: color-mix(in srgb, var(--ta-raised) 60%, transparent); stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-stroke { fill: none; stroke: var(--ta-green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-thin { stroke: var(--ta-border); stroke-width: 2; }\n.ta-pic-path { fill: none; stroke: var(--ta-border); stroke-width: 1.5; stroke-dasharray: 3 4; }\n.ta-pic-hand, .ta-pic-tick, .ta-pic-cross { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-tick { stroke-width: 1.6; }\n.ta-pic-tick-big { stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-text { fill: var(--ta-green); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }\n.ta-pic-fine { stroke-width: 2; }\n.ta-pic-shackle { fill: none; stroke: var(--ta-green); stroke-width: 2.4; stroke-linecap: round; }\n/* Something on its way along a ta-pic-path, and a line that sweeps a screen being scanned */\n@keyframes ta-pic-go { 0% { transform: translateX(-14px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }\n@keyframes ta-pic-sweep { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }\n.ta-pic-go { animation: ta-pic-go 1.8s ease-in-out infinite; transform-box: fill-box; }\n.ta-pic-go-back { animation-delay: .9s; }\n.ta-pic-sweep { animation: ta-pic-sweep 2.4s ease-in-out infinite; transform-box: fill-box; }\n/* Where to tap, as a ring that spreads from it */\n@keyframes ta-pic-pulse { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }\n.ta-pic-pulse { animation: ta-pic-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }\n.ta-msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-msg-bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px 16px 5px 16px; background: var(--ta-user); color: var(--ta-text); white-space: pre-wrap; word-break: break-word; }\n.ta-msg-ta { color: var(--ta-body); line-height: 1.75; display: flex; flex-direction: column; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 8px; margin: 0 -8px; border-radius: 8px; border: 0; background: transparent; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-row-title { color: var(--ta-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-row-meta, .ta-row-label { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); flex: none; }\n.ta-row-chevron { margin-left: auto; color: var(--ta-muted); }\n.ta-row-quiet { color: var(--ta-muted); }\n.ta-row-quiet .ta-row-title { font-weight: 400; color: var(--ta-secondary); }\n.ta-composer-area { flex: none; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n.ta-composer-area .ta-chat-col { gap: 8px; }\n.ta-attention { display: flex; flex-direction: column; gap: 4px; animation: ta-in 220ms var(--ta-ease); }\n.ta-attention-source { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); padding-left: 4px; }\n.ta-mic { height: 30px; min-width: 30px; flex: none; display: inline-grid; place-items: center; padding: 0 8px; border: 0; border-radius: 15px; background: transparent; color: var(--ta-secondary); transition: background 150ms, color 150ms, min-width 200ms var(--ta-ease); }\n.ta-mic:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-mic.ta-on { min-width: 48px; background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-wave { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }\n.ta-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; animation: ta-wave 0.9s ease-in-out infinite; }\n.ta-wave i:nth-child(2) { animation-delay: -0.7s; }\n.ta-wave i:nth-child(3) { animation-delay: -0.45s; }\n.ta-wave i:nth-child(4) { animation-delay: -0.2s; }\n/* A conversation by voice (voice-talk.tsx), as WeChat's: the page dims and blurs, a green bubble holds the words as\n they come, \u53D6\u6D88 and \u7F16\u8F91 wait to have the finger slid onto them, and the bottom it starts on says what letting go\n does. It comes up from the bottom, says \"too short\" in a bubble of its own, and fades out. Above the keyboard. */\n.ta-talk { --ta-talk-base: calc(112px + env(safe-area-inset-bottom)); --ta-talk-gap: 172px; position: fixed; inset: 0; z-index: 96; overflow: hidden; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; animation: ta-fade 160ms ease-out; transition: opacity 160ms ease-in; }\n:root[data-keyboard] .ta-talk { --ta-talk-base: 104px; bottom: auto; height: var(--ta-viewport, calc(100dvh - var(--ta-keyboard, 0px))); }\n.ta-talk-leaving { opacity: 0; pointer-events: none; }\n.ta-talk-bubble { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + var(--ta-talk-gap)); transform: translateX(-50%); box-sizing: border-box; width: max-content; min-width: 140px; max-width: min(80vw, 440px); min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 14px 18px; border-radius: 14px; background: #95ec69; color: #111; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); transform-origin: 50% 100%; animation: ta-talk-pop 240ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 2px; background: inherit; transform: rotate(45deg); }\n.ta-talk-cancel .ta-talk-bubble { background: #fa5151; color: #fff; }\n.ta-talk-short .ta-talk-bubble { background: #f2f2f2; color: #555; }\n.ta-talk-bubble .ta-wave { height: 24px; gap: 4px; }\n.ta-talk-bubble .ta-wave i { width: 4px; }\n.ta-talk-words { position: relative; z-index: 1; margin: 0; max-height: 30vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: calc(17px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-talk-zones { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + 24px); width: min(100%, 420px); transform: translateX(-50%); box-sizing: border-box; display: flex; justify-content: space-between; padding: 0 12px; animation: ta-talk-rise 260ms var(--ta-ease) both; transition: opacity 140ms; }\n.ta-talk-released .ta-talk-zones, .ta-talk-short .ta-talk-zones, .ta-talk-leaving .ta-talk-zones { opacity: 0; }\n/* What a finger counts as on \u53D6\u6D88 or \u7F16\u8F91: more than the circle, as a thumb lands. */\n.ta-talk-zone { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 16px; }\n.ta-talk-zone-label { color: #fff; font-size: calc(13px * var(--ta-font-scale)); opacity: 0; transform: translateY(4px); transition: opacity 120ms, transform 160ms var(--ta-ease); }\n.ta-talk-zone-circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.86); transition: transform 180ms var(--ta-ease), background 160ms, color 160ms; }\n.ta-talk-zone.ta-on .ta-talk-zone-label { opacity: 1; transform: none; }\n.ta-talk-zone.ta-on .ta-talk-zone-circle { transform: scale(1.18); background: #fff; color: #111; }\n.ta-talk-base { position: absolute; left: -12%; right: -12%; bottom: 0; height: var(--ta-talk-base); display: flex; justify-content: center; padding-top: 30px; box-sizing: border-box; border-radius: 50% 50% 0 0 / 60px 60px 0 0; background: #2c2c2e; color: rgba(255, 255, 255, 0.8); animation: ta-talk-base 260ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-send.ta-talk-listening .ta-talk-base { background: linear-gradient(#f2f2f2, #d6d6d6); color: #333; }\n.ta-talk-hint { font-size: calc(15px * var(--ta-font-scale)); letter-spacing: 0.04em; }\n/* Low screens (a phone on its side): the same, closer together. */\n@media (max-height: 520px) {\n .ta-talk { --ta-talk-base: calc(64px + env(safe-area-inset-bottom)); --ta-talk-gap: 112px; }\n .ta-talk-base { padding-top: 16px; border-radius: 50% 50% 0 0 / 36px 36px 0 0; }\n .ta-talk-zones { bottom: calc(var(--ta-talk-base) + 4px); width: min(100%, 520px); }\n .ta-talk-zone { gap: 8px; padding-bottom: 8px; }\n .ta-talk-zone-circle { width: 56px; height: 56px; }\n .ta-talk-words { max-height: 18vh; }\n}\n@keyframes ta-talk-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }\n@keyframes ta-talk-rise { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }\n@keyframes ta-talk-base { from { transform: translateY(100%); } }\n@media (prefers-reduced-motion: reduce) {\n .ta-talk, .ta-talk * { animation: none !important; transition-duration: 0ms !important; }\n}\n/* While the keyboard is down, a finger on the field of a box that talks is the box's: a tap types in it, a hold talks. */\n.ta-talkable textarea:not(:focus) { pointer-events: none; }\n/* The field of a box on a touch screen once its microphone is tapped (TalkBar), as WeChat's: \u6309\u4F4F \u8BF4\u8BDD, the height of a line of text. */\n.ta-console-row > .ta-talk-bar { flex: 1; min-width: 0; height: var(--ta-field-height); margin: 0 2px; border: 0; border-radius: 10px; background: var(--ta-hover); color: var(--ta-text); font-size: var(--ta-field-font); font-weight: 600; letter-spacing: 0.06em; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; transition: background 120ms; }\n.ta-console-row > .ta-talk-bar.ta-on { background: var(--ta-hover-strong); }\n/* Reading a reply aloud (SpeakingButton): the wave of the microphone's, which a tap stops. */\n.ta-speaking { height: 30px; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 9px; border: 0; border-radius: 15px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; animation: ta-in 180ms var(--ta-ease); transition: background 120ms; }\n.ta-speaking:hover { background: color-mix(in srgb, var(--ta-green) 22%, transparent); }\n.ta-speaking .ta-wave { height: 12px; }\n.ta-send { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ta-brand); color: var(--ta-brand-text); transition: opacity 120ms, transform 120ms; }\n.ta-send:hover:not(:disabled) { opacity: 0.88; }\n.ta-send:active:not(:disabled) { transform: scale(0.94); }\n.ta-send:disabled { opacity: 0.25; cursor: default; }\n.ta-send-stop { background: var(--ta-brand); }\n.ta-avatar { flex: none; display: block; overflow: visible; }\n.ta-dino-shadow { fill: #000; fill-opacity: 0.32; }\n:root[data-theme='light'] .ta-dino-shadow { fill-opacity: 0.13; }\n.ta-dino-face { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: color-mix(in oklch, var(--ta-dino) 34%, var(--ta-main)); }\n.ta-dino-face > .ta-avatar { width: 100%; height: 100%; }\n/* The double in the navigation: its face; quieter while another place is shown, as the icons beside it are muted. */\n.ta-nav-face { filter: saturate(0.45); opacity: 0.8; transition: filter 150ms, opacity 150ms; }\n.ta-rail-item:hover .ta-nav-face, .ta-rail-item.ta-active .ta-nav-face, .ta-tabbar-item.ta-active .ta-nav-face { filter: none; opacity: 1; }\n.ta-dino-joy, .ta-dino-poked .ta-dino-look { display: none; }\n.ta-dino-poked .ta-dino-joy { display: inline; }\n.ta-dino-lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: ta-dino-blink 5s ease-in-out infinite; }\n.ta-dino-badge { animation: ta-dino-pop 0.35s var(--ta-ease); }\n.ta-dino-bubble, .ta-dino-z, .ta-dino-wave { animation: ta-pulse 2.4s ease-in-out infinite; }\n.ta-dino-bubble:nth-of-type(2), .ta-dino-z:nth-of-type(2), .ta-dino-wave:nth-of-type(2) { animation-delay: 0.4s; }\n.ta-dino-bubble:nth-of-type(3) { animation-delay: 0.8s; }\n\n/* Cards of web extensions */\n.ta-card-widget { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); }\n.ta-card-widget h2 { margin: 0; }\n.ta-card-widget button { white-space: nowrap; }\n\n/* Notices: cards in the bottom right, the newest nearest the corner; on phones from the top. */\n.ta-toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }\n.ta-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px 11px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-toast-in 220ms var(--ta-ease); }\n.ta-toast.ta-leaving { animation: ta-toast-out 160ms ease-in forwards; }\n.ta-toast > .ta-level-icon { margin-top: 2px; }\n.ta-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 0; }\n.ta-toast-message { color: var(--ta-text); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-count { margin-left: 6px; padding: 0 5px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.ta-toast-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-art { align-self: flex-start; width: 200px; height: auto; margin-top: 8px; border-radius: 10px; }\n.ta-toast-action { align-self: flex-start; margin-top: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--ta-border-field); background: transparent; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-toast-action:hover { background: var(--ta-hover); }\n.ta-toast .ta-toast-close { width: 24px; height: 24px; margin-top: -1px; color: var(--ta-muted); }\n.ta-toast .ta-toast-close svg { width: 14px; height: 14px; }\n.ta-toast-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 4px; padding: 10px 6px 10px 10px; }\n.ta-toast-open { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-toast-face { flex: none; display: grid; place-items: center; width: 38px; height: 38px; }\n.ta-toast-head { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-toast-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ta-text); }\n.ta-toast-session .ta-toast-message { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; color: var(--ta-secondary); }\n.ta-toast-session .ta-toast-close { grid-column: 2; grid-row: 1; }\n.ta-toast-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }\n.ta-toast-session .ta-toast-action { margin-top: 0; }\n@keyframes ta-toast-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } }\n@keyframes ta-toast-out { to { transform: translateX(12px); opacity: 0; } }\n\n/* The connection to ta serve, over the top of the main area while it is down */\n.ta-connection { position: absolute; top: calc(66px + env(safe-area-inset-top) + var(--ta-titlebar)); left: 50%; transform: translateX(-50%); z-index: 15; height: 34px; overflow: hidden; border-radius: 17px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-body); white-space: nowrap; animation: ta-drop 200ms var(--ta-ease); transition: width 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-body { display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(720px, calc(100vw - 24px - var(--ta-left, 0px))); height: 100%; padding: 0 6px 0 12px; animation: ta-fade 160ms ease-out; }\n.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-back .ta-connection-body { padding-right: 12px; }\n.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-leaving { animation: ta-connection-out 200ms var(--ta-ease) forwards; pointer-events: none; }\n.ta-connection-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-connection-retry { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; border: 0; background: var(--ta-chip); color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-connection-retry:hover { background: var(--ta-hover-strong); }\n.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone):not(.ta-connection-outdated) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }\n.ta-connection-notdone .ta-connection-body { padding-right: 12px; }\n@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }\n/* On a phone: a row in the page, whose height opens and closes. */\n.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-banner.ta-open { grid-template-rows: 1fr; }\n.ta-connection-banner.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-banner.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-banner-inner { min-height: 0; overflow: hidden; }\n/* Over the message box its row brings its own gap (margin under it), none while closed: not that of the column too. */\n.ta-bottom > .ta-connection-banner, .ta-composer-area .ta-chat-col > .ta-connection-banner { margin-bottom: -8px; }\n.ta-connection-banner-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ta-level) 9%, var(--ta-card)); color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.45; text-align: left; transition: background 200ms; -webkit-tap-highlight-color: transparent; }\n.ta-connection-banner-row:active:not(:disabled) { background: color-mix(in srgb, var(--ta-level) 16%, var(--ta-card)); }\n.ta-connection-banner-row:disabled { opacity: 1; cursor: default; }\n.ta-connection-banner-row > .ta-level-icon { flex: none; }\n.ta-connection-banner-text { flex: 1; min-width: 0; }\n.ta-connection-banner-action { display: inline-flex; flex: none; align-items: center; gap: 5px; color: var(--ta-text); font-weight: 500; white-space: nowrap; }\n.ta-connection-retry:disabled { opacity: 1; }\n@keyframes ta-drop { from { transform: translate(-50%, -8px); opacity: 0; } }\n\n/* A question before going ahead */\n.ta-modal.ta-confirm { width: min(400px, 100%); gap: 6px; padding: 18px 18px 16px; }\n.ta-confirm-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-confirm-message { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; }\n.ta-confirm .ta-dialog-actions { margin-top: 12px; }\n.ta-modal.ta-ask { width: min(460px, 100%); gap: 12px; }\n.ta-ask .ta-dialog-actions { margin-top: 2px; }\ntextarea.ta-ask-text { height: auto; min-height: 180px; max-height: 50vh; padding: 8px 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; resize: vertical; }\n.ta-button-danger { background: var(--ta-red); border-color: var(--ta-red); color: #fff; }\n.ta-button-danger:hover:not(:disabled) { background: var(--ta-red); opacity: 0.9; }\n\n/* Built-in pages */\n.ta-assistant { flex: 1; min-height: 0; display: flex; }\n.ta-assistant-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }\n.ta-head-spacer { width: 32px; flex: none; }\n.ta-assistant-tasks { min-height: 100%; box-sizing: border-box; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 10px; }\n.ta-assistant-tasks > .ta-select-bar { margin: auto -10px -12px; }\n.ta-assistant-task { display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.ta-task-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--ta-border-muted); flex: none; }\n.ta-task-head .ta-task-status { width: 26px; height: 26px; }\n.ta-task-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }\n.ta-task-head-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-head-meta { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.ta-task-head-meta .ta-task-time { font-size: inherit; color: inherit; }\n.ta-task-head-take { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; }\n.ta-assistant-task .ta-session { min-height: 0; flex: 1; }\n.ta-assistant-task .ta-session-header { display: none; }\n.ta-assistant-task > .ta-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-task-result { max-width: 760px; margin: 0 auto; padding: 18px 20px 28px; line-height: 1.7; }\n.ta-task-result-note { margin: 0 0 8px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n\n/* Overlays */\n.ta-overlay-close { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }\n.ta-scrim { display: none; }\n.ta-hud { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-setting-section { display: flex; flex-direction: column; gap: 8px; }\n.ta-setting-section h2 { margin: 0; padding: 0 4px; }\n.ta-setting-card { border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); overflow: hidden; }\n.ta-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; min-height: 48px; }\n.ta-setting-row + .ta-setting-row { border-top: 1px solid var(--ta-border-muted); }\n.ta-setting-row.ta-stacked { flex-direction: column; align-items: stretch; gap: 8px; }\n.ta-setting-row.ta-stacked .ta-setting-control { width: 100%; }\n.ta-setting-row.ta-stacked .ta-segmented { flex: 1; }\n.ta-setting-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-setting-icon { flex: none; width: 32px; height: 32px; margin-right: -4px; display: grid; place-items: center; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; overflow-wrap: anywhere; }\n.ta-setting-description { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-trusted-add { display: flex; gap: 8px; width: 100%; }\n.ta-trusted-add .ta-input { height: 32px; flex: 1; min-width: 0; }\n.ta-store-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; padding: 12px; border-radius: 10px; background: var(--ta-raised); border: 1px solid var(--ta-border-muted); }\n.ta-store-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.ta-store-field .ta-input { height: 32px; width: 100%; }\n.ta-store-field-label { display: inline-flex; align-items: baseline; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-secondary); }\n.ta-store-field-optional { font-weight: 400; color: var(--ta-muted); }\n.ta-store-form-note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-store-form-note svg { flex: none; margin-top: 2px; color: var(--ta-green); }\n.ta-store-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }\n@media (max-width: 640px) { .ta-store-form { grid-template-columns: minmax(0, 1fr); } .ta-store-form-actions .ta-button { flex: 1; } }\n.ta-setting-control { display: flex; align-items: center; justify-content: flex-end; flex: none; }\n.ta-segmented { margin: 0; min-width: 0; border: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }\n.ta-segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms, color 120ms; }\n.ta-segmented button:hover { color: var(--ta-text); }\n.ta-segmented .ta-on { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-switch { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; flex: none; border-radius: 10px; background: var(--ta-hover-strong); position: relative; transition: background 160ms; margin: 0; cursor: pointer; }\n.ta-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 180ms var(--ta-ease); }\n.ta-switch:checked { background: var(--ta-green); }\n.ta-switch:checked::after { transform: translateX(16px); }\n\n/* Sign in */\n.ta-signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ta-main); }\n/*\n * The installed app with its title bar hidden (window controls overlay): the page draws up to the top of\n * the window, and the bar is the colour of the side columns, as theme-color is (useTitlebarColor). Each\n * column starts lower by the height of the bar, which is left empty for the window's buttons, and is\n * where the window is dragged.\n */\n.ta-titlebar { display: none; position: fixed; z-index: 25; left: env(titlebar-area-x, 0); top: env(titlebar-area-y, 0); width: env(titlebar-area-width, 100%); height: var(--ta-titlebar); app-region: drag; -webkit-app-region: drag; }\n@media (display-mode: window-controls-overlay) {\n :root { --ta-titlebar: env(titlebar-area-height, 0px); }\n .ta-titlebar { display: block; }\n /* Above the conversation the bar keeps the colour of the side columns, under the browser's buttons too. */\n .ta-main { background: linear-gradient(var(--ta-side) var(--ta-titlebar), var(--ta-main) 0); }\n}\n.ta-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }\n.ta-card h1 { margin: 4px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; }\n.ta-card p { margin: 0 0 8px; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-connect-pic { max-width: 300px; margin: -2px 0 6px; border-radius: 0; }\n.ta-strip-pic { border-radius: 0; }\n.ta-empty-picture:has(> .ta-strip-pic) { width: min(260px, 90%); }\n\n";
|
|
2
|
+
export declare const SHELL_STYLE = "\n/* Shell: the navigation (rail and chats), the main column, the panel */\n.ta-app { display: flex; height: 100vh; height: var(--ta-viewport, 100dvh); background: var(--ta-main); overflow: hidden; }\n.ta-nav { display: flex; flex: none; height: 100%; z-index: 20; }\n.ta-rail { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 0 calc(10px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-nav:has(> .ta-sidebar) > .ta-rail { border-right-color: transparent; }\n.ta-rail-logo { width: 40px; height: 40px; flex: none; display: grid; place-items: center; margin-bottom: 6px; }\n.ta-rail-items { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; overflow-y: auto; scrollbar-width: none; padding: 0 8px; }\n.ta-rail-item { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--ta-muted); transition: background 150ms, color 150ms; }\n.ta-rail-item:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-rail-item.ta-active { background: var(--ta-selected); color: var(--ta-text); }\n.ta-rail-divider { width: 24px; height: 0; flex: none; margin: 4px 0; border: 0; border-top: 1px solid var(--ta-border); }\n.ta-rail-status { display: grid; place-items: center; width: 40px; height: 22px; }\n.ta-ok .ta-dot { color: var(--ta-green); }\n.ta-warn .ta-dot { color: var(--ta-yellow); }\n.ta-chats, .ta-side-view { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: calc(8px + env(safe-area-inset-top) + var(--ta-titlebar)) 8px calc(8px + env(safe-area-inset-bottom)); background: var(--ta-side); border-right: 1px solid var(--ta-border-muted); }\n.ta-chats-head { display: flex; align-items: center; gap: 2px; height: 40px; flex: none; padding: 0 0 0 8px; margin-bottom: 6px; }\n.ta-chats-title { flex: 1; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-panel-cards { display: flex; flex-direction: column; gap: 12px; min-height: 100%; box-sizing: border-box; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }\n.ta-side-section { display: flex; align-items: center; gap: 6px; padding: 6px 8px 2px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-side-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }\n.ta-side-scroll:has(> .ta-empty) { display: flex; flex-direction: column; }\n.ta-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-side-row { position: relative; display: flex; align-items: center; border-radius: 10px; }\n.ta-side-row:hover, .ta-side-row.ta-selected { background: var(--ta-hover); }\n.ta-side-row.ta-selected { background: var(--ta-selected); }\n.ta-side-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background 120ms; }\n.ta-side-list > li > .ta-side-item:hover { background: var(--ta-hover); }\n.ta-side-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.ta-side-item-title { font-size: calc(13.5px * var(--ta-font-scale)); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-sub { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-side-item-time { align-self: flex-start; font-size: calc(11.5px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }\n.ta-close { position: absolute; right: 4px; opacity: 0; width: 26px; height: 26px; }\n.ta-side-row:hover .ta-close, .ta-close:focus-visible { opacity: 1; }\n.ta-task-status { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ta-raised); color: var(--ta-secondary); }\n.ta-task-status-done { color: var(--ta-green); background: color-mix(in srgb, var(--ta-green) 14%, transparent); }\n.ta-task-status-failed { color: var(--ta-red); background: color-mix(in srgb, var(--ta-red) 14%, transparent); }\n.ta-task-status-stopped { color: var(--ta-muted); }\n.ta-task-status .ta-spinner { width: 12px; height: 12px; }\n.ta-main { position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-top: var(--ta-titlebar); background: var(--ta-main); }\n.ta-main-head { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 12px; padding-top: env(safe-area-inset-top); flex: none; }\n.ta-main-title { flex: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n/* A title between the buttons of the head is centred on it, whatever buttons its sides have: a back button on one,\n the workbench's on the other, both or neither. */\n.ta-main-head:has(> .ta-main-title) { display: grid; grid-template-columns: minmax(32px, 1fr) minmax(0, auto) minmax(32px, 1fr); }\n.ta-main-head:has(> .ta-main-title) > * { grid-row: 1; grid-column: 1; justify-self: start; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title { grid-column: 2; justify-self: stretch; }\n.ta-main-head:has(> .ta-main-title) > .ta-main-title ~ * { grid-column: 3; justify-self: end; }\n.ta-main-sub { font-size: calc(11.5px * var(--ta-font-scale)); font-weight: 400; color: var(--ta-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* The double's chat */\n/* As .ta-scroll: nothing in a conversation is wider than it, it never scrolls sideways. */\n.ta-chat-scroll { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }\n.ta-chat-col { width: 100%; max-width: calc(var(--ta-col) + 48px); margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }\n.ta-chat-scroll { overflow-anchor: none; }\n.ta-chat-scroll .ta-chat-col { position: relative; padding-top: 12px; padding-bottom: 24px; min-height: 100%; }\n.ta-hero { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 0; animation: ta-in 320ms var(--ta-ease); }\n.ta-hero-center { flex: 1; justify-content: center; }\n.ta-hero h1 { margin: 6px 0 0; font-size: calc(22px * var(--ta-font-scale)); font-weight: 650; letter-spacing: -0.01em; }\n/* Chinese breaks between its words and after its commas, not inside a word, so that balance does not cut \u547D\u4EE4 in two. */\n.ta-hero p { margin: 0; max-width: 440px; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; color: var(--ta-secondary); font-size: calc(14px * var(--ta-font-scale)); }\n.ta-hero-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-hero-step { display: inline-flex; align-items: center; gap: 7px; }\n.ta-hero-step-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); }\n.ta-hero-arrow { color: var(--ta-muted); }\n.ta-hero .ta-pic-cards { max-width: 524px; margin-top: 18px; }\n/* Pictures (components/picture.tsx, ui.Picture): a few shapes in the tones of the theme; choices as cards of them */\n.ta-pic-cards { display: grid; grid-template-columns: repeat(var(--ta-pic-columns, 3), minmax(0, 1fr)); gap: 10px; width: 100%; }\n@media (max-width: 860px), (max-height: 500px) and (pointer: coarse) { .ta-pic-cards { grid-template-columns: repeat(var(--ta-pic-columns-compact, 3), minmax(0, 1fr)); gap: 8px; } }\n.ta-pic-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 7px 7px 10px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-card); color: var(--ta-body); font: inherit; font-size: calc(13px * var(--ta-font-scale)); text-align: center; cursor: pointer; transition: border-color 140ms, background 140ms, box-shadow 140ms, transform 140ms var(--ta-ease); animation: ta-in 320ms var(--ta-ease) both; }\n.ta-pic-card:nth-child(2) { animation-delay: 50ms; }\n.ta-pic-card:nth-child(3) { animation-delay: 100ms; }\n.ta-pic-card:nth-child(n+4) { animation-delay: 150ms; }\n.ta-pic-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ta-green) 55%, var(--ta-border)); background: var(--ta-hover); color: var(--ta-text); }\n.ta-pic-card:hover:not(:disabled) .ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 26%, transparent); }\n.ta-pic-card:active:not(:disabled) { transform: scale(.98); }\n.ta-pic-card:disabled { opacity: .55; cursor: default; }\n.ta-pic-card-label { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-wrap: balance; }\n.ta-pic-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-pic-card-hinted { gap: 6px; text-align: left; }\n.ta-pic-card-hinted .ta-pic-card-label { padding: 0 4px; color: var(--ta-text); font-weight: 600; }\n.ta-pic-card-hint { margin-top: -3px; padding: 0 4px; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-pic { display: block; width: 100%; height: auto; border-radius: 8px; }\n.ta-pic-frame { fill: var(--ta-raised); stroke: var(--ta-border-muted); stroke-width: 1; }\n.ta-pic-pane { fill: var(--ta-hover); }\n.ta-pic-line, .ta-pic-dot { fill: var(--ta-hover-strong); }\n.ta-pic-box { fill: none; stroke: var(--ta-border); stroke-width: 1; }\n.ta-pic-accent { fill: color-mix(in srgb, var(--ta-green) 16%, transparent); stroke: color-mix(in srgb, var(--ta-green) 70%, transparent); stroke-width: 1; transition: fill 140ms; }\n.ta-pic-mark { fill: var(--ta-green); }\n.ta-pic-soft { opacity: .45; }\n.ta-pic-plus { fill: color-mix(in srgb, var(--ta-green) 55%, transparent); }\n.ta-pic-bad { fill: color-mix(in srgb, var(--ta-red) 85%, transparent); }\n.ta-pic-wait { fill: var(--ta-yellow); }\n.ta-pic-ring { fill: color-mix(in srgb, var(--ta-raised) 60%, transparent); stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-stroke { fill: none; stroke: var(--ta-green); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-thin { stroke: var(--ta-border); stroke-width: 2; }\n.ta-pic-path { fill: none; stroke: var(--ta-border); stroke-width: 1.5; stroke-dasharray: 3 4; }\n.ta-pic-hand, .ta-pic-tick, .ta-pic-cross { fill: none; stroke: var(--ta-raised); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }\n.ta-pic-tick { stroke-width: 1.6; }\n.ta-pic-tick-big { stroke: var(--ta-green); stroke-width: 3; }\n.ta-pic-text { fill: var(--ta-green); font-family: var(--ta-mono); font-size: 8px; font-weight: 600; }\n.ta-pic-fine { stroke-width: 2; }\n.ta-pic-shackle { fill: none; stroke: var(--ta-green); stroke-width: 2.4; stroke-linecap: round; }\n/* Something on its way along a ta-pic-path, and a line that sweeps a screen being scanned */\n@keyframes ta-pic-go { 0% { transform: translateX(-14px); opacity: 0; } 25%, 75% { opacity: 1; } 100% { transform: translateX(14px); opacity: 0; } }\n@keyframes ta-pic-sweep { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }\n.ta-pic-go { animation: ta-pic-go 1.8s ease-in-out infinite; transform-box: fill-box; }\n.ta-pic-go-back { animation-delay: .9s; }\n.ta-pic-sweep { animation: ta-pic-sweep 2.4s ease-in-out infinite; transform-box: fill-box; }\n/* Where to tap, as a ring that spreads from it */\n@keyframes ta-pic-pulse { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }\n.ta-pic-pulse { animation: ta-pic-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }\n.ta-msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-msg-bubble { max-width: 78%; padding: 9px 14px; border-radius: 16px 16px 5px 16px; background: var(--ta-user); color: var(--ta-text); white-space: pre-wrap; word-break: break-word; }\n.ta-msg-ta { color: var(--ta-body); line-height: 1.75; display: flex; flex-direction: column; gap: 6px; animation: ta-in 220ms var(--ta-ease); }\n.ta-row { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 2px 8px; margin: 0 -8px; border-radius: 8px; border: 0; background: transparent; text-align: left; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-row-title { color: var(--ta-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n.ta-row-meta, .ta-row-label { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); flex: none; }\n.ta-row-chevron { margin-left: auto; color: var(--ta-muted); }\n.ta-row-quiet { color: var(--ta-muted); }\n.ta-row-quiet .ta-row-title { font-weight: 400; color: var(--ta-secondary); }\n.ta-composer-area { flex: none; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }\n.ta-composer-area .ta-chat-col { gap: 8px; }\n.ta-attention { display: flex; flex-direction: column; gap: 4px; animation: ta-in 220ms var(--ta-ease); }\n.ta-attention-source { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); padding-left: 4px; }\n.ta-mic { height: 30px; min-width: 30px; flex: none; display: inline-grid; place-items: center; padding: 0 8px; border: 0; border-radius: 15px; background: transparent; color: var(--ta-secondary); transition: background 150ms, color 150ms, min-width 200ms var(--ta-ease); }\n.ta-mic:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-mic.ta-on { min-width: 48px; background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-wave { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }\n.ta-wave i { width: 2.5px; height: 100%; border-radius: 2px; background: currentColor; animation: ta-wave 0.9s ease-in-out infinite; }\n.ta-wave i:nth-child(2) { animation-delay: -0.7s; }\n.ta-wave i:nth-child(3) { animation-delay: -0.45s; }\n.ta-wave i:nth-child(4) { animation-delay: -0.2s; }\n/* A conversation by voice (voice-talk.tsx), as WeChat's: the page dims and blurs, a green bubble holds the words as\n they come, \u53D6\u6D88 and \u7F16\u8F91 wait to have the finger slid onto them, and the bottom it starts on says what letting go\n does. It comes up from the bottom, says \"too short\" in a bubble of its own, and fades out. Above the keyboard. */\n.ta-talk { --ta-talk-base: calc(112px + env(safe-area-inset-bottom)); --ta-talk-gap: 172px; position: fixed; inset: 0; z-index: 96; overflow: hidden; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; animation: ta-fade 160ms ease-out; transition: opacity 160ms ease-in; }\n:root[data-keyboard] .ta-talk { --ta-talk-base: 104px; bottom: auto; height: var(--ta-viewport, calc(100dvh - var(--ta-keyboard, 0px))); }\n.ta-talk-leaving { opacity: 0; pointer-events: none; }\n.ta-talk-bubble { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + var(--ta-talk-gap)); transform: translateX(-50%); box-sizing: border-box; width: max-content; min-width: 140px; max-width: min(80vw, 440px); min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 14px 18px; border-radius: 14px; background: #95ec69; color: #111; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28); transform-origin: 50% 100%; animation: ta-talk-pop 240ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 2px; background: inherit; transform: rotate(45deg); }\n.ta-talk-cancel .ta-talk-bubble { background: #fa5151; color: #fff; }\n.ta-talk-short .ta-talk-bubble { background: #f2f2f2; color: #555; }\n.ta-talk-bubble .ta-wave { height: 24px; gap: 4px; }\n.ta-talk-bubble .ta-wave i { width: 4px; }\n.ta-talk-words { position: relative; z-index: 1; margin: 0; max-height: 30vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: calc(17px * var(--ta-font-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }\n.ta-talk-zones { position: absolute; left: 50%; bottom: calc(var(--ta-talk-base) + 24px); width: min(100%, 420px); transform: translateX(-50%); box-sizing: border-box; display: flex; justify-content: space-between; padding: 0 12px; animation: ta-talk-rise 260ms var(--ta-ease) both; transition: opacity 140ms; }\n.ta-talk-released .ta-talk-zones, .ta-talk-short .ta-talk-zones, .ta-talk-leaving .ta-talk-zones { opacity: 0; }\n/* What a finger counts as on \u53D6\u6D88 or \u7F16\u8F91: more than the circle, as a thumb lands. */\n.ta-talk-zone { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 16px 16px; }\n.ta-talk-zone-label { color: #fff; font-size: calc(13px * var(--ta-font-scale)); opacity: 0; transform: translateY(4px); transition: opacity 120ms, transform 160ms var(--ta-ease); }\n.ta-talk-zone-circle { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.86); transition: transform 180ms var(--ta-ease), background 160ms, color 160ms; }\n.ta-talk-zone.ta-on .ta-talk-zone-label { opacity: 1; transform: none; }\n.ta-talk-zone.ta-on .ta-talk-zone-circle { transform: scale(1.18); background: #fff; color: #111; }\n.ta-talk-base { position: absolute; left: -12%; right: -12%; bottom: 0; height: var(--ta-talk-base); display: flex; justify-content: center; padding-top: 30px; box-sizing: border-box; border-radius: 50% 50% 0 0 / 60px 60px 0 0; background: #2c2c2e; color: rgba(255, 255, 255, 0.8); animation: ta-talk-base 260ms var(--ta-ease); transition: background 160ms, color 160ms; }\n.ta-talk-send.ta-talk-listening .ta-talk-base { background: linear-gradient(#f2f2f2, #d6d6d6); color: #333; }\n.ta-talk-hint { font-size: calc(15px * var(--ta-font-scale)); letter-spacing: 0.04em; }\n/* Low screens (a phone on its side): the same, closer together. */\n@media (max-height: 520px) {\n .ta-talk { --ta-talk-base: calc(64px + env(safe-area-inset-bottom)); --ta-talk-gap: 112px; }\n .ta-talk-base { padding-top: 16px; border-radius: 50% 50% 0 0 / 36px 36px 0 0; }\n .ta-talk-zones { bottom: calc(var(--ta-talk-base) + 4px); width: min(100%, 520px); }\n .ta-talk-zone { gap: 8px; padding-bottom: 8px; }\n .ta-talk-zone-circle { width: 56px; height: 56px; }\n .ta-talk-words { max-height: 18vh; }\n}\n@keyframes ta-talk-pop { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.9); } }\n@keyframes ta-talk-rise { from { opacity: 0; transform: translateX(-50%) translateY(24px); } }\n@keyframes ta-talk-base { from { transform: translateY(100%); } }\n@media (prefers-reduced-motion: reduce) {\n .ta-talk, .ta-talk * { animation: none !important; transition-duration: 0ms !important; }\n}\n/* While the keyboard is down, a finger on the field of a box that talks is the box's: a tap types in it, a hold talks. */\n.ta-talkable textarea:not(:focus) { pointer-events: none; }\n/* The field of a box on a touch screen once its microphone is tapped (TalkBar), as WeChat's: \u6309\u4F4F \u8BF4\u8BDD, the height of a line of text. */\n.ta-console-row > .ta-talk-bar { flex: 1; min-width: 0; height: var(--ta-field-height); margin: 0 2px; border: 0; border-radius: 10px; background: var(--ta-hover); color: var(--ta-text); font-size: var(--ta-field-font); font-weight: 600; letter-spacing: 0.06em; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; transition: background 120ms; }\n.ta-console-row > .ta-talk-bar.ta-on { background: var(--ta-hover-strong); }\n/* Reading a reply aloud (SpeakingButton): the wave of the microphone's, which a tap stops. */\n.ta-speaking { height: 30px; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 9px; border: 0; border-radius: 15px; background: color-mix(in srgb, var(--ta-green) 14%, transparent); color: var(--ta-green); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; animation: ta-in 180ms var(--ta-ease); transition: background 120ms; }\n.ta-speaking:hover { background: color-mix(in srgb, var(--ta-green) 22%, transparent); }\n.ta-speaking .ta-wave { height: 12px; }\n.ta-send { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ta-brand); color: var(--ta-brand-text); transition: opacity 120ms, transform 120ms; }\n.ta-send:hover:not(:disabled) { opacity: 0.88; }\n.ta-send:active:not(:disabled) { transform: scale(0.94); }\n.ta-send:disabled { opacity: 0.25; cursor: default; }\n.ta-send-stop { background: var(--ta-brand); }\n.ta-avatar { flex: none; display: block; overflow: visible; }\n.ta-dino-shadow { fill: #000; fill-opacity: 0.32; }\n:root[data-theme='light'] .ta-dino-shadow { fill-opacity: 0.13; }\n.ta-dino-face { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: color-mix(in oklch, var(--ta-dino) 34%, var(--ta-main)); }\n.ta-dino-face > .ta-avatar { width: 100%; height: 100%; }\n/* The double in the navigation: its face; quieter while another place is shown, as the icons beside it are muted. */\n.ta-nav-face { filter: saturate(0.45); opacity: 0.8; transition: filter 150ms, opacity 150ms; }\n.ta-rail-item:hover .ta-nav-face, .ta-rail-item.ta-active .ta-nav-face, .ta-tabbar-item.ta-active .ta-nav-face { filter: none; opacity: 1; }\n.ta-dino-joy, .ta-dino-poked .ta-dino-look { display: none; }\n.ta-dino-poked .ta-dino-joy { display: inline; }\n.ta-dino-lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); animation: ta-dino-blink 5s ease-in-out infinite; }\n.ta-dino-badge { animation: ta-dino-pop 0.35s var(--ta-ease); }\n.ta-dino-bubble, .ta-dino-z, .ta-dino-wave { animation: ta-pulse 2.4s ease-in-out infinite; }\n.ta-dino-bubble:nth-of-type(2), .ta-dino-z:nth-of-type(2), .ta-dino-wave:nth-of-type(2) { animation-delay: 0.4s; }\n.ta-dino-bubble:nth-of-type(3) { animation-delay: 0.8s; }\n\n/* Cards of web extensions */\n.ta-card-widget { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); }\n.ta-card-widget h2 { margin: 0; }\n.ta-card-widget button { white-space: nowrap; }\n\n/* Notices: cards in the bottom right, the newest nearest the corner; on phones from the top. */\n.ta-toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }\n.ta-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 6px 11px 14px; border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; animation: ta-toast-in 220ms var(--ta-ease); }\n.ta-toast.ta-leaving { animation: ta-toast-out 160ms ease-in forwards; }\n.ta-toast > .ta-level-icon { margin-top: 2px; }\n.ta-toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 0; }\n.ta-toast-message { color: var(--ta-text); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-count { margin-left: 6px; padding: 0 5px; border-radius: 6px; background: var(--ta-chip); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); font-variant-numeric: tabular-nums; }\n.ta-toast-detail { color: var(--ta-secondary); font-size: calc(12px * var(--ta-font-scale)); overflow-wrap: anywhere; white-space: pre-wrap; }\n.ta-toast-art { align-self: flex-start; width: 200px; height: auto; margin-top: 8px; border-radius: 10px; }\n.ta-toast-action { align-self: flex-start; margin-top: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--ta-border-field); background: transparent; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-toast-action:hover { background: var(--ta-hover); }\n.ta-toast .ta-toast-close { width: 24px; height: 24px; margin-top: -1px; color: var(--ta-muted); }\n.ta-toast .ta-toast-close svg { width: 14px; height: 14px; }\n.ta-toast-session { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 4px; padding: 10px 6px 10px 10px; }\n.ta-toast-open { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }\n.ta-toast-face { flex: none; display: grid; place-items: center; width: 38px; height: 38px; }\n.ta-toast-head { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-toast-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ta-text); }\n.ta-toast-session .ta-toast-message { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; color: var(--ta-secondary); }\n.ta-toast-session .ta-toast-close { grid-column: 2; grid-row: 1; }\n.ta-toast-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }\n.ta-toast-session .ta-toast-action { margin-top: 0; }\n.ta-toast-text > .ta-toast-actions { padding-left: 0; margin-top: 6px; }\n.ta-toast-text > .ta-toast-actions .ta-toast-action { margin-top: 0; }\n@keyframes ta-toast-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } }\n@keyframes ta-toast-out { to { transform: translateX(12px); opacity: 0; } }\n\n/* The connection to ta serve, over the top of the main area while it is down */\n.ta-connection { position: absolute; top: calc(66px + env(safe-area-inset-top) + var(--ta-titlebar)); left: 50%; transform: translateX(-50%); z-index: 15; height: 34px; overflow: hidden; border-radius: 17px; border: 1px solid var(--ta-border); background: var(--ta-side); box-shadow: var(--ta-shadow-pop); font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-body); white-space: nowrap; animation: ta-drop 200ms var(--ta-ease); transition: width 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-body { display: flex; align-items: center; gap: 8px; width: max-content; max-width: min(720px, calc(100vw - 24px - var(--ta-left, 0px))); height: 100%; padding: 0 6px 0 12px; animation: ta-fade 160ms ease-out; }\n.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-back .ta-connection-body { padding-right: 12px; }\n.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-leaving { animation: ta-connection-out 200ms var(--ta-ease) forwards; pointer-events: none; }\n.ta-connection-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }\n.ta-connection-when { color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-connection-retry { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; border: 0; background: var(--ta-chip); color: var(--ta-text); font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms; }\n.ta-connection-retry:hover { background: var(--ta-hover-strong); }\n.ta-connection:not(.ta-connection-back):not(.ta-connection-notdone):not(.ta-connection-outdated) .ta-level-icon { animation: ta-pulse 2s ease-in-out infinite; }\n.ta-connection-notdone .ta-connection-body { padding-right: 12px; }\n@keyframes ta-connection-out { to { transform: translate(-50%, -6px); opacity: 0; } }\n/* On a phone: a row in the page, whose height opens and closes. */\n.ta-connection-banner { display: grid; grid-template-rows: 0fr; flex: none; transition: grid-template-rows 240ms var(--ta-ease); --ta-level: var(--ta-yellow); }\n.ta-connection-banner.ta-open { grid-template-rows: 1fr; }\n.ta-connection-banner.ta-connection-back { --ta-level: var(--ta-green); }\n.ta-connection-banner.ta-connection-outdated { --ta-level: var(--ta-blue); }\n.ta-connection-banner-inner { min-height: 0; overflow: hidden; }\n/* Over the message box its row brings its own gap (margin under it), none while closed: not that of the column too. */\n.ta-bottom > .ta-connection-banner, .ta-composer-area .ta-chat-col > .ta-connection-banner { margin-bottom: -8px; }\n.ta-connection-banner-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ta-level) 9%, var(--ta-card)); color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.45; text-align: left; transition: background 200ms; -webkit-tap-highlight-color: transparent; }\n.ta-connection-banner-row:active:not(:disabled) { background: color-mix(in srgb, var(--ta-level) 16%, var(--ta-card)); }\n.ta-connection-banner-row:disabled { opacity: 1; cursor: default; }\n.ta-connection-banner-row > .ta-level-icon { flex: none; }\n.ta-connection-banner-text { flex: 1; min-width: 0; }\n.ta-connection-banner-action { display: inline-flex; flex: none; align-items: center; gap: 5px; color: var(--ta-text); font-weight: 500; white-space: nowrap; }\n.ta-connection-retry:disabled { opacity: 1; }\n@keyframes ta-drop { from { transform: translate(-50%, -8px); opacity: 0; } }\n\n/* A question before going ahead */\n.ta-modal.ta-confirm { width: min(400px, 100%); gap: 6px; padding: 18px 18px 16px; }\n.ta-confirm-title { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-confirm-message { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; }\n.ta-confirm .ta-dialog-actions { margin-top: 12px; }\n.ta-modal.ta-ask { width: min(460px, 100%); gap: 12px; }\n.ta-ask .ta-dialog-actions { margin-top: 2px; }\ntextarea.ta-ask-text { height: auto; min-height: 180px; max-height: 50vh; padding: 8px 10px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.6; resize: vertical; }\n.ta-button-danger { background: var(--ta-red); border-color: var(--ta-red); color: #fff; }\n.ta-button-danger:hover:not(:disabled) { background: var(--ta-red); opacity: 0.9; }\n\n/* Built-in pages */\n.ta-assistant { flex: 1; min-height: 0; display: flex; }\n.ta-assistant-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-assistant-chat { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }\n.ta-head-spacer { width: 32px; flex: none; }\n.ta-assistant-tasks { min-height: 100%; box-sizing: border-box; padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 10px; }\n.ta-assistant-tasks > .ta-select-bar { margin: auto -10px -12px; }\n.ta-assistant-task { display: flex; flex-direction: column; height: 100%; min-height: 0; }\n.ta-task-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--ta-border-muted); flex: none; }\n.ta-task-head .ta-task-status { width: 26px; height: 26px; }\n.ta-task-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }\n.ta-task-head-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-task-head-meta { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }\n.ta-task-head-meta .ta-task-time { font-size: inherit; color: inherit; }\n.ta-task-head-take { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; }\n.ta-assistant-task .ta-session { min-height: 0; flex: 1; }\n.ta-assistant-task .ta-session-header { display: none; }\n.ta-assistant-task > .ta-scroll { flex: 1; min-height: 0; overflow-y: auto; }\n.ta-task-result { max-width: 760px; margin: 0 auto; padding: 18px 20px 28px; line-height: 1.7; }\n.ta-task-result-note { margin: 0 0 8px; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); }\n\n/* Overlays */\n.ta-overlay-close { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: default; }\n.ta-scrim { display: none; }\n.ta-hud { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }\n.ta-setting-section { display: flex; flex-direction: column; gap: 8px; }\n.ta-setting-section h2 { margin: 0; padding: 0 4px; }\n.ta-setting-card { border-radius: 12px; border: 1px solid var(--ta-border); background: var(--ta-card); overflow: hidden; }\n.ta-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; min-height: 48px; }\n.ta-setting-row + .ta-setting-row { border-top: 1px solid var(--ta-border-muted); }\n.ta-setting-row.ta-stacked { flex-direction: column; align-items: stretch; gap: 8px; }\n.ta-setting-row.ta-stacked .ta-setting-control { width: 100%; }\n.ta-setting-row.ta-stacked .ta-segmented { flex: 1; }\n.ta-setting-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-setting-icon { flex: none; width: 32px; height: 32px; margin-right: -4px; display: grid; place-items: center; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); }\n.ta-setting-label { font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; overflow-wrap: anywhere; }\n.ta-setting-description { font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); overflow-wrap: anywhere; }\n.ta-trusted-add { display: flex; gap: 8px; width: 100%; }\n.ta-trusted-add .ta-input { height: 32px; flex: 1; min-width: 0; }\n.ta-store-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; width: 100%; padding: 12px; border-radius: 10px; background: var(--ta-raised); border: 1px solid var(--ta-border-muted); }\n.ta-store-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }\n.ta-store-field .ta-input { height: 32px; width: 100%; }\n.ta-store-field-label { display: inline-flex; align-items: baseline; gap: 6px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-secondary); }\n.ta-store-field-optional { font-weight: 400; color: var(--ta-muted); }\n.ta-store-form-note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-store-form-note svg { flex: none; margin-top: 2px; color: var(--ta-green); }\n.ta-store-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }\n@media (max-width: 640px) { .ta-store-form { grid-template-columns: minmax(0, 1fr); } .ta-store-form-actions .ta-button { flex: 1; } }\n.ta-setting-control { display: flex; align-items: center; justify-content: flex-end; flex: none; }\n.ta-segmented { margin: 0; min-width: 0; border: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 10px; background: var(--ta-raised); }\n.ta-segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; transition: background 120ms, color 120ms; }\n.ta-segmented button:hover { color: var(--ta-text); }\n.ta-segmented .ta-on { background: var(--ta-segment); color: var(--ta-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--ta-border); }\n.ta-switch { appearance: none; -webkit-appearance: none; width: 36px; height: 20px; flex: none; border-radius: 10px; background: var(--ta-hover-strong); position: relative; transition: background 160ms; margin: 0; cursor: pointer; }\n.ta-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 180ms var(--ta-ease); }\n.ta-switch:checked { background: var(--ta-green); }\n.ta-switch:checked::after { transform: translateX(16px); }\n\n/* Sign in */\n.ta-signin { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ta-main); }\n/*\n * The installed app with its title bar hidden (window controls overlay): the page draws up to the top of\n * the window, and the bar is the colour of the side columns, as theme-color is (useTitlebarColor). Each\n * column starts lower by the height of the bar, which is left empty for the window's buttons, and is\n * where the window is dragged.\n */\n.ta-titlebar { display: none; position: fixed; z-index: 25; left: env(titlebar-area-x, 0); top: env(titlebar-area-y, 0); width: env(titlebar-area-width, 100%); height: var(--ta-titlebar); app-region: drag; -webkit-app-region: drag; }\n@media (display-mode: window-controls-overlay) {\n :root { --ta-titlebar: env(titlebar-area-height, 0px); }\n .ta-titlebar { display: block; }\n /* Above the conversation the bar keeps the colour of the side columns, under the browser's buttons too. */\n .ta-main { background: linear-gradient(var(--ta-side) var(--ta-titlebar), var(--ta-main) 0); }\n}\n.ta-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }\n.ta-card h1 { margin: 4px 0 0; font-size: calc(20px * var(--ta-font-scale)); font-weight: 650; }\n.ta-card p { margin: 0 0 8px; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }\n.ta-connect-pic { max-width: 300px; margin: -2px 0 6px; border-radius: 0; }\n.ta-strip-pic { border-radius: 0; }\n.ta-empty-picture:has(> .ta-strip-pic) { width: min(260px, 90%); }\n\n";
|
|
3
3
|
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -233,6 +233,8 @@ exports.SHELL_STYLE = `
|
|
|
233
233
|
.ta-toast-session .ta-toast-close { grid-column: 2; grid-row: 1; }
|
|
234
234
|
.ta-toast-actions { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 48px; }
|
|
235
235
|
.ta-toast-session .ta-toast-action { margin-top: 0; }
|
|
236
|
+
.ta-toast-text > .ta-toast-actions { padding-left: 0; margin-top: 6px; }
|
|
237
|
+
.ta-toast-text > .ta-toast-actions .ta-toast-action { margin-top: 0; }
|
|
236
238
|
@keyframes ta-toast-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
|
|
237
239
|
@keyframes ta-toast-out { to { transform: translateX(12px); opacity: 0; } }
|
|
238
240
|
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* The launcher and the board (ta-launcher.md, components/board.tsx): their cards and rows, and the flyout
|
|
3
3
|
* the rail opens them in on a computer or a tablet. Where they rest on a phone is in style/phone.ts.
|
|
4
4
|
*/
|
|
5
|
-
export declare const SURFACES_STYLE = "\n.ta-kept-page { display: contents; }\n.ta-kept-page[hidden] { display: none; }\n.ta-launcher { display: flex; flex-direction: column; gap: 24px; }\n/* The launcher with its search: the stack fills it, its base scrolls. */\n.ta-launcher-surface { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-launcher-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }\n.ta-launcher-field { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; margin-bottom: 18px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); font: inherit; font-size: calc(14px * var(--ta-font-scale)); cursor: text; -webkit-tap-highlight-color: transparent; transition: background 140ms; }\n.ta-launcher-field:active { background: var(--ta-hover); }\n.ta-launcher-search { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ta-main); }\n.ta-launcher-search-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px 8px; }\n.ta-launcher-search-head input::-webkit-search-cancel-button { display: none; }\n.ta-launcher-clear { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ta-muted); }\n.ta-launcher-cancel { flex: none; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--ta-text); font: inherit; font-size: calc(15px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-search-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 16px; }\n.ta-launcher-results { margin: 0; padding: 0; list-style: none; animation: ta-fade 120ms ease-out; }\n.ta-launcher-results-section + .ta-launcher-results-section { margin-top: 14px; }\n.ta-launcher-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-results-all { border: 0; padding: 4px 0; background: none; color: var(--ta-link); font: inherit; font-weight: 500; cursor: pointer; }\n.ta-launcher-results-wait { padding: 10px 8px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-launcher-more { height: 1px; }\n/* A long list draws the rows in view only; the rest keep their place. */\n.ta-launcher-result-row { position: relative; display: flex; align-items: center; content-visibility: auto; contain-intrinsic-size: auto 56px; }\n.ta-launcher-result-row > .ta-launcher-result { flex: 1; min-width: 0; }\n.ta-launcher-result-letter { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-result-action { flex: none; position: absolute; right: 8px; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; cursor: pointer; transition: background 140ms, transform 120ms var(--ta-ease); }\n.ta-launcher-result-action:hover { background: var(--ta-hover-strong); }\n.ta-launcher-result-action:active { transform: scale(0.95); }\n.ta-launcher-result-row:has(.ta-launcher-result-action) .ta-launcher-result { padding-right: 84px; }\n/* The dialog that hands an extension on. */\n.ta-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 6px; }\n.ta-share-qr { width: 220px; height: 220px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-share-qr svg { display: block; width: 100%; height: 100%; animation: ta-fade 160ms ease-out; }\n.ta-share-qr-busy { display: grid; place-items: center; background: var(--ta-raised); }\n.ta-share-qr-wait { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-share-hint { max-width: 320px; margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-wrap: balance; }\n.ta-share-actions { display: flex; gap: 8px; }\n.ta-share-stop { border: 0; padding: 2px 4px; background: none; color: var(--ta-red); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n.ta-launcher-result:hover, .ta-launcher-result:active { background: var(--ta-hover); }\n.ta-launcher-result-icon { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ta-tile); color: var(--ta-tile-ink); }\n.ta-launcher-result-icon > .ta-busy-mark { width: 16px; height: 16px; border-color: color-mix(in srgb, var(--ta-tile-ink) 25%, transparent); border-top-color: var(--ta-tile-ink); }\n.ta-launcher-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-launcher-result-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(15px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }\n.ta-launcher-result-title mark { background: none; color: var(--ta-accent); font-weight: 600; }\n.ta-launcher-result-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-board { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-board-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 6px 14px 6px 16px; }\n.ta-board-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-board-title { font-size: calc(22px * var(--ta-font-scale)); line-height: calc(28px * var(--ta-font-scale)); font-weight: 700; letter-spacing: -0.01em; color: var(--ta-text); }\n.ta-board-date { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); }\n.ta-board-edit-button { flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--ta-chip); color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; transition: background 160ms, color 160ms, transform 120ms var(--ta-ease); }\n.ta-board-edit-button:hover { background: var(--ta-hover-strong); }\n.ta-board-edit-button:active { transform: scale(0.96); }\n.ta-board-edit-button.ta-active { background: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-board-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px calc(20px + env(safe-area-inset-bottom)); }\n.ta-board-cards { display: flex; flex-direction: column; gap: 12px; }\n.ta-board-card { padding: 12px 14px 14px; border-radius: 20px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted), 0 2px 6px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04); animation: ta-board-in 260ms var(--ta-ease) both; }\n:root[data-theme='dark'] .ta-board-card { background: var(--ta-card); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n@keyframes ta-board-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }\n.ta-board-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); font-weight: 600; }\n.ta-board-card-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--ta-accent) 14%, transparent); color: var(--ta-accent); }\n.ta-board-card-body { min-width: 0; color: var(--ta-body); font-size: calc(14px * var(--ta-font-scale)); }\n/* A card with nothing says so in one quiet line, where its content would start. */\n.ta-board-card-body .ta-empty { min-height: 0; align-items: flex-start; padding: 0 0 2px; text-align: left; }\n.ta-board-card-body .ta-empty-title { color: var(--ta-muted); font-weight: 400; }\n.ta-board-edit { display: flex; flex-direction: column; animation: ta-fade 160ms ease-out; }\n.ta-board-rows { display: flex; flex-direction: column; border-radius: 14px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-board-row { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--ta-main); transition: transform 200ms var(--ta-ease), box-shadow 160ms; }\n.ta-board-row + .ta-board-row::before { content: ''; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--ta-border-muted); }\n.ta-board-row[data-sorting] { z-index: 2; transition: box-shadow 160ms; box-shadow: var(--ta-shadow-pop); }\n.ta-board-row[data-sorting]::before, .ta-board-row[data-sorting] + .ta-board-row::before { display: none; }\n.ta-board-toggle { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; }\n.ta-board-off { color: var(--ta-red); }\n.ta-board-on { color: var(--ta-green); }\n.ta-board-row-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-secondary); }\n.ta-board-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-board-grip { flex: none; display: grid; place-items: center; width: 44px; height: 48px; padding: 0; border: 0; background: none; color: var(--ta-muted); cursor: grab; touch-action: none; }\n.ta-board-row[data-sorting] .ta-board-grip { cursor: grabbing; }\n.ta-board-label { margin: 20px 6px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n\n/* The rail's buttons for them, above the account; the flyout beside it. */\n.ta-rail-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 4px; }\n.ta-flyout { position: fixed; z-index: 50; left: calc(64px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); width: 380px; max-width: calc(100vw - 80px); max-height: min(680px, calc(100vh - 20px - var(--ta-titlebar))); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 16px; background: var(--ta-side); box-shadow: var(--ta-shadow-pop); transform-origin: 0 100%; animation: ta-flyout-in 180ms var(--ta-ease); }\n.ta-flyout > .ta-launcher-surface { height: min(560px, calc(100vh - 20px - var(--ta-titlebar))); flex: none; }\n@keyframes ta-flyout-in { from { opacity: 0; transform: translate3d(-6px, 6px, 0) scale(0.97); } }\n/* The faces of those who are not Ta (components/face.tsx): they blink, and look about while they work */\n:root:not([data-theme='light']) .ta-face[data-face=\"11\"] .ta-face-body > g > circle { fill: #4a4a52; }\n.ta-face { position: relative; display: inline-flex; flex: none; }\n.ta-face svg { display: block; overflow: visible; }\n.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }\n.ta-face[data-face=\"1\"] .ta-face-eyes, .ta-face[data-face=\"5\"] .ta-face-eyes, .ta-face[data-face=\"9\"] .ta-face-eyes, .ta-face[data-face=\"13\"] .ta-face-eyes { animation-delay: -1.7s; }\n.ta-face[data-face=\"2\"] .ta-face-eyes, .ta-face[data-face=\"6\"] .ta-face-eyes, .ta-face[data-face=\"10\"] .ta-face-eyes, .ta-face[data-face=\"14\"] .ta-face-eyes { animation-delay: -3.1s; }\n.ta-face[data-face=\"3\"] .ta-face-eyes, .ta-face[data-face=\"7\"] .ta-face-eyes, .ta-face[data-face=\"11\"] .ta-face-eyes, .ta-face[data-face=\"15\"] .ta-face-eyes { animation-delay: -4.4s; }\n.ta-face-working .ta-face-look { animation: ta-face-look 2.4s ease-in-out infinite; }\n.ta-face-working .ta-face-body { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-face-bob 1.2s ease-in-out infinite; }\n.ta-face-dot { position: absolute; right: -1px; bottom: -1px; width: 27%; height: 27%; min-width: 7px; min-height: 7px; box-sizing: content-box; border-radius: 50%; border: 2px solid var(--ta-face-ring, var(--ta-main)); background: var(--ta-border-field); }\n.ta-face-dot.ta-face-on { background: var(--ta-green); }\n@keyframes ta-face-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }\n@keyframes ta-face-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 70% { transform: translateX(1.4px); } }\n@keyframes ta-face-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }\n@media (prefers-reduced-motion: reduce) { .ta-face * { animation: none !important; } }\n.ta-group-face { position: relative; display: inline-flex; flex: none; }\n.ta-group-face-back { position: absolute; right: 0; top: 0; }\n.ta-group-face-front { position: absolute; left: 0; bottom: 0; z-index: 1; }\n";
|
|
5
|
+
export declare const SURFACES_STYLE = "\n.ta-kept-page { display: contents; }\n.ta-kept-page[hidden] { display: none; }\n.ta-launcher { display: flex; flex-direction: column; gap: 24px; }\n/* The launcher with its search: the stack fills it, its base scrolls. */\n.ta-launcher-surface { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-launcher-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }\n.ta-launcher-field { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 36px; margin-bottom: 18px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); font: inherit; font-size: calc(14px * var(--ta-font-scale)); cursor: text; -webkit-tap-highlight-color: transparent; transition: background 140ms; }\n.ta-launcher-field:active { background: var(--ta-hover); }\n.ta-launcher-search { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--ta-main); }\n.ta-launcher-search-head { flex: none; display: flex; align-items: center; gap: 4px; padding: 10px 12px 8px; }\n.ta-launcher-search-head input::-webkit-search-cancel-button { display: none; }\n.ta-launcher-clear { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ta-muted); }\n.ta-launcher-cancel { flex: none; height: 36px; padding: 0 8px; border: 0; background: none; color: var(--ta-text); font: inherit; font-size: calc(15px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-search-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 16px; }\n.ta-launcher-results { margin: 0; padding: 0; list-style: none; animation: ta-fade 120ms ease-out; }\n.ta-launcher-results-section + .ta-launcher-results-section { margin-top: 14px; }\n.ta-launcher-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 0 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-results-all { border: 0; padding: 4px 0; background: none; color: var(--ta-link); font: inherit; font-weight: 500; cursor: pointer; }\n.ta-launcher-results-wait { padding: 10px 8px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-launcher-more { height: 1px; }\n/* A long list draws the rows in view only; the rest keep their place. */\n.ta-launcher-result-row { position: relative; display: flex; align-items: center; content-visibility: auto; contain-intrinsic-size: auto 56px; }\n.ta-launcher-result-row > .ta-launcher-result { flex: 1; min-width: 0; }\n.ta-launcher-result-letter { font-size: calc(15px * var(--ta-font-scale)); font-weight: 600; }\n.ta-launcher-result-action { flex: none; position: absolute; right: 8px; height: 28px; padding: 0 12px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 600; cursor: pointer; transition: background 140ms, transform 120ms var(--ta-ease); }\n.ta-launcher-result-action:hover { background: var(--ta-hover-strong); }\n.ta-launcher-result-action:active { transform: scale(0.95); }\n.ta-launcher-result-row:has(.ta-launcher-result-action) .ta-launcher-result { padding-right: 84px; }\n/* The dialog that hands an extension on. */\n.ta-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 6px 6px; }\n.ta-share-qr { width: 220px; height: 220px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-share-qr svg { display: block; width: 100%; height: 100%; animation: ta-fade 160ms ease-out; }\n.ta-share-qr-busy { display: grid; place-items: center; background: var(--ta-raised); }\n.ta-share-qr-wait { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); }\n.ta-share-hint { max-width: 320px; margin: 0; text-align: center; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); text-wrap: balance; }\n.ta-share-actions { display: flex; gap: 8px; }\n.ta-share-stop { border: 0; padding: 2px 4px; background: none; color: var(--ta-red); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }\n.ta-launcher-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }\n.ta-launcher-result:hover, .ta-launcher-result:active { background: var(--ta-hover); }\n.ta-launcher-result-icon { flex: none; position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ta-tile); color: var(--ta-tile-ink); }\n.ta-launcher-result-icon > .ta-busy-mark { width: 16px; height: 16px; border-color: color-mix(in srgb, var(--ta-tile-ink) 25%, transparent); border-top-color: var(--ta-tile-ink); }\n.ta-launcher-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-launcher-result-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(15px * var(--ta-font-scale)); line-height: calc(20px * var(--ta-font-scale)); }\n.ta-launcher-result-title mark { background: none; color: var(--ta-accent); font-weight: 600; }\n.ta-launcher-result-detail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n.ta-board { flex: 1; min-height: 0; display: flex; flex-direction: column; }\n.ta-board-head { flex: none; display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 6px 14px 6px 16px; }\n.ta-board-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }\n.ta-board-title { font-size: calc(22px * var(--ta-font-scale)); line-height: calc(28px * var(--ta-font-scale)); font-weight: 700; letter-spacing: -0.01em; color: var(--ta-text); }\n.ta-board-date { color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(17px * var(--ta-font-scale)); }\n.ta-board-edit-button { flex: none; height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--ta-chip); color: var(--ta-text); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; transition: background 160ms, color 160ms, transform 120ms var(--ta-ease); }\n.ta-board-edit-button:hover { background: var(--ta-hover-strong); }\n.ta-board-edit-button:active { transform: scale(0.96); }\n.ta-board-edit-button.ta-active { background: var(--ta-brand); color: var(--ta-brand-text); }\n.ta-board-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px calc(20px + env(safe-area-inset-bottom)); }\n.ta-board-cards { display: flex; flex-direction: column; gap: 12px; }\n.ta-board-card { padding: 12px 14px 14px; border-radius: 20px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted), 0 2px 6px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04); animation: ta-board-in 260ms var(--ta-ease) both; }\n:root[data-theme='dark'] .ta-board-card { background: var(--ta-card); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n@keyframes ta-board-in { from { opacity: 0; transform: translate3d(0, 6px, 0); } }\n.ta-board-card-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(18px * var(--ta-font-scale)); font-weight: 600; }\n.ta-board-card-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--ta-accent) 14%, transparent); color: var(--ta-accent); }\n.ta-board-card-body { min-width: 0; color: var(--ta-body); font-size: calc(14px * var(--ta-font-scale)); }\n/* A card with nothing says so in one quiet line, where its content would start. */\n.ta-board-card-body .ta-empty { min-height: 0; align-items: flex-start; padding: 0 0 2px; text-align: left; }\n.ta-board-card-body .ta-empty-title { color: var(--ta-muted); font-weight: 400; }\n.ta-board-edit { display: flex; flex-direction: column; animation: ta-fade 160ms ease-out; }\n.ta-board-rows { display: flex; flex-direction: column; border-radius: 14px; background: var(--ta-main); box-shadow: 0 0 0 1px var(--ta-border-muted); }\n.ta-board-row { position: relative; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--ta-main); transition: transform 200ms var(--ta-ease), box-shadow 160ms; }\n.ta-board-row + .ta-board-row::before { content: ''; position: absolute; top: 0; left: 76px; right: 0; border-top: 1px solid var(--ta-border-muted); }\n.ta-board-row[data-sorting] { z-index: 2; transition: box-shadow 160ms; box-shadow: var(--ta-shadow-pop); }\n.ta-board-row[data-sorting]::before, .ta-board-row[data-sorting] + .ta-board-row::before { display: none; }\n.ta-board-toggle { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; }\n.ta-board-off { color: var(--ta-red); }\n.ta-board-on { color: var(--ta-green); }\n.ta-board-row-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ta-chip); color: var(--ta-secondary); }\n.ta-board-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ta-text); font-size: calc(15px * var(--ta-font-scale)); }\n.ta-board-grip { flex: none; display: grid; place-items: center; width: 44px; height: 48px; padding: 0; border: 0; background: none; color: var(--ta-muted); cursor: grab; touch-action: none; }\n.ta-board-row[data-sorting] .ta-board-grip { cursor: grabbing; }\n.ta-board-label { margin: 20px 6px 8px; color: var(--ta-muted); font-size: calc(12.5px * var(--ta-font-scale)); line-height: calc(16px * var(--ta-font-scale)); }\n\n/* The rail's buttons for them, above the account; the flyout beside it. */\n.ta-rail-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 4px; }\n.ta-flyout { position: fixed; z-index: 50; left: calc(64px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); width: 380px; max-width: calc(100vw - 80px); max-height: min(680px, calc(100vh - 20px - var(--ta-titlebar))); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--ta-border); border-radius: 16px; background: var(--ta-side); box-shadow: var(--ta-shadow-pop); transform-origin: 0 100%; animation: ta-flyout-in 180ms var(--ta-ease); }\n.ta-flyout > .ta-launcher-surface { height: min(560px, calc(100vh - 20px - var(--ta-titlebar))); flex: none; }\n@keyframes ta-flyout-in { from { opacity: 0; transform: translate3d(-6px, 6px, 0) scale(0.97); } }\n/* The faces of those who are not Ta (components/face.tsx): they blink, and look about while they work */\n:root:not([data-theme='light']) .ta-face[data-face=\"11\"] .ta-face-body > g > circle { fill: #4a4a52; }\n.ta-face { position: relative; display: inline-flex; flex: none; }\n.ta-face svg { display: block; overflow: visible; }\n.ta-face-double { align-items: center; justify-content: center; }\n.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }\n.ta-face[data-face=\"1\"] .ta-face-eyes, .ta-face[data-face=\"5\"] .ta-face-eyes, .ta-face[data-face=\"9\"] .ta-face-eyes, .ta-face[data-face=\"13\"] .ta-face-eyes { animation-delay: -1.7s; }\n.ta-face[data-face=\"2\"] .ta-face-eyes, .ta-face[data-face=\"6\"] .ta-face-eyes, .ta-face[data-face=\"10\"] .ta-face-eyes, .ta-face[data-face=\"14\"] .ta-face-eyes { animation-delay: -3.1s; }\n.ta-face[data-face=\"3\"] .ta-face-eyes, .ta-face[data-face=\"7\"] .ta-face-eyes, .ta-face[data-face=\"11\"] .ta-face-eyes, .ta-face[data-face=\"15\"] .ta-face-eyes { animation-delay: -4.4s; }\n.ta-face-working .ta-face-look { animation: ta-face-look 2.4s ease-in-out infinite; }\n.ta-face-working .ta-face-body { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-face-bob 1.2s ease-in-out infinite; }\n.ta-face-dot { position: absolute; right: -1px; bottom: -1px; width: 27%; height: 27%; min-width: 7px; min-height: 7px; box-sizing: content-box; border-radius: 50%; border: 2px solid var(--ta-face-ring, var(--ta-main)); background: var(--ta-border-field); }\n.ta-face-dot.ta-face-on { background: var(--ta-green); }\n@keyframes ta-face-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }\n@keyframes ta-face-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 70% { transform: translateX(1.4px); } }\n@keyframes ta-face-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }\n@media (prefers-reduced-motion: reduce) { .ta-face * { animation: none !important; } }\n.ta-group-face { position: relative; display: inline-flex; flex: none; }\n.ta-group-face-back { position: absolute; right: 0; top: 0; }\n.ta-group-face-front { position: absolute; left: 0; bottom: 0; z-index: 1; }\n";
|
|
6
6
|
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -95,6 +95,7 @@ exports.SURFACES_STYLE = `
|
|
|
95
95
|
:root:not([data-theme='light']) .ta-face[data-face="11"] .ta-face-body > g > circle { fill: #4a4a52; }
|
|
96
96
|
.ta-face { position: relative; display: inline-flex; flex: none; }
|
|
97
97
|
.ta-face svg { display: block; overflow: visible; }
|
|
98
|
+
.ta-face-double { align-items: center; justify-content: center; }
|
|
98
99
|
.ta-face-eyes { transform-box: fill-box; transform-origin: center; animation: ta-face-blink 5.2s infinite; }
|
|
99
100
|
.ta-face[data-face="1"] .ta-face-eyes, .ta-face[data-face="5"] .ta-face-eyes, .ta-face[data-face="9"] .ta-face-eyes, .ta-face[data-face="13"] .ta-face-eyes { animation-delay: -1.7s; }
|
|
100
101
|
.ta-face[data-face="2"] .ta-face-eyes, .ta-face[data-face="6"] .ta-face-eyes, .ta-face[data-face="10"] .ta-face-eyes, .ta-face[data-face="14"] .ta-face-eyes { animation-delay: -3.1s; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** What Ta Desktop can do for the page beyond a tab of a browser. */
|
|
2
|
-
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices';
|
|
2
|
+
export type DesktopFeature = 'webview' | 'debugWebview' | 'showItemInFolder' | 'browserData' | 'recentShots' | 'notices' | 'speech' | 'restart';
|
|
3
3
|
/** The file manager of the system, from Ta Desktop: {@link WebDesktop} of the extension API. */
|
|
4
4
|
export interface DesktopFileManager {
|
|
5
5
|
/** Node's `process.platform` of the machine: what the file manager is called there. */
|
|
@@ -52,6 +52,15 @@ export interface DesktopNoticeTarget {
|
|
|
52
52
|
cwd?: string;
|
|
53
53
|
view?: string;
|
|
54
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Apple's recognizer on macOS (native/ta-speech of apps/ta-desktop): the messages of a listening (`Voice` of voice.ts), and
|
|
57
|
+
* what it answers them, as the Ta app on iOS has it.
|
|
58
|
+
*/
|
|
59
|
+
export interface DesktopSpeech<Message = object, Answer = object> {
|
|
60
|
+
post(message: Message): void;
|
|
61
|
+
/** Returns what stops hearing them. */
|
|
62
|
+
onAnswer(listener: (answer: Answer) => void): () => void;
|
|
63
|
+
}
|
|
55
64
|
/** A command of the DevTools protocol to the page of a `<webview>` of this page, by its getWebContentsId(). */
|
|
56
65
|
export type DebugWebview = (webContentsId: number, method: string, params?: Record<string, unknown>) => Promise<unknown>;
|
|
57
66
|
/**
|
|
@@ -62,6 +71,11 @@ export declare namespace DesktopUtil {
|
|
|
62
71
|
function has(feature: DesktopFeature, scope?: object): boolean;
|
|
63
72
|
/** The file manager of the system, when the page is in Ta Desktop. */
|
|
64
73
|
function fileManager(scope?: object): DesktopFileManager | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Restarts Ta Desktop with the Ta service it started, to its build installed now: false when the Ta service is not
|
|
76
|
+
* the app's (one started in a terminal), which then restarts by itself (TaServer.restartServer).
|
|
77
|
+
*/
|
|
78
|
+
function restart(scope?: object): (() => Promise<boolean>) | undefined;
|
|
65
79
|
/** The sign-ins of the user's browsers, where Ta Desktop can read them (macOS, Windows). */
|
|
66
80
|
function browserData(scope?: object): DesktopBrowserData | undefined;
|
|
67
81
|
/** `debugWebview` of Ta Desktop; `undefined` elsewhere. */
|
|
@@ -73,6 +87,8 @@ export declare namespace DesktopUtil {
|
|
|
73
87
|
function notices(scope?: object): {
|
|
74
88
|
onOpen(listener: (target: DesktopNoticeTarget) => void): () => void;
|
|
75
89
|
} | undefined;
|
|
90
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
91
|
+
function speech<Message = object, Answer = object>(scope?: object): DesktopSpeech<Message, Answer> | undefined;
|
|
76
92
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
77
93
|
function recentShots(scope?: object): DesktopShots | undefined;
|
|
78
94
|
}
|
|
@@ -27,6 +27,16 @@ var DesktopUtil;
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
DesktopUtil.fileManager = fileManager;
|
|
30
|
+
/**
|
|
31
|
+
* Restarts Ta Desktop with the Ta service it started, to its build installed now: false when the Ta service is not
|
|
32
|
+
* the app's (one started in a terminal), which then restarts by itself (TaServer.restartServer).
|
|
33
|
+
*/
|
|
34
|
+
function restart(scope = globalThis) {
|
|
35
|
+
var _a;
|
|
36
|
+
const restart = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.restart;
|
|
37
|
+
return has('restart', scope) && typeof restart === 'function' ? async () => (await restart()) === true : undefined;
|
|
38
|
+
}
|
|
39
|
+
DesktopUtil.restart = restart;
|
|
30
40
|
/** The sign-ins of the user's browsers, where Ta Desktop can read them (macOS, Windows). */
|
|
31
41
|
function browserData(scope = globalThis) {
|
|
32
42
|
var _a;
|
|
@@ -67,6 +77,20 @@ var DesktopUtil;
|
|
|
67
77
|
return Object.freeze({ onOpen: (listener) => onOpen(listener) });
|
|
68
78
|
}
|
|
69
79
|
DesktopUtil.notices = notices;
|
|
80
|
+
/** Apple's recognizer, where Ta Desktop has it (macOS). */
|
|
81
|
+
function speech(scope = globalThis) {
|
|
82
|
+
var _a;
|
|
83
|
+
var _b;
|
|
84
|
+
const { post, onAnswer } = (_b = (_a = scope.taDesktop) === null || _a === void 0 ? void 0 : _a.speech) !== null && _b !== void 0 ? _b : {};
|
|
85
|
+
if (!has('speech', scope) || typeof post !== 'function' || typeof onAnswer !== 'function') {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
return Object.freeze({
|
|
89
|
+
post: (message) => void post(message),
|
|
90
|
+
onAnswer: (listener) => onAnswer(listener),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
DesktopUtil.speech = speech;
|
|
70
94
|
/** The screenshots of this computer, where Ta Desktop finds them. */
|
|
71
95
|
function recentShots(scope = globalThis) {
|
|
72
96
|
var _a;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type MarkdownBlock, type MarkdownPicture } from './markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Pictures of a reply shown together, as chat apps show several sent at once: two side by side, four in two rows of
|
|
4
|
+
* two, three or more three a row, nine at most, the last saying how many more. Paragraphs of pictures alone one after
|
|
5
|
+
* another are one gallery, and so are pictures each under a short line of its own that names it (`**Dark**`,
|
|
6
|
+
* `Before:`), which shows under its tile.
|
|
7
|
+
*/
|
|
8
|
+
export declare namespace GalleryUtil {
|
|
9
|
+
/** The tiles a gallery shows; the last of them says how many more there are. */
|
|
10
|
+
const TILES = 9;
|
|
11
|
+
function columns(count: number): number;
|
|
12
|
+
/** The blocks with each run of two pictures or more as one gallery. */
|
|
13
|
+
function group(blocks: readonly MarkdownBlock[]): MarkdownBlock[];
|
|
14
|
+
/** The pictures of a paragraph of pictures alone (and spaces between them); undefined for any other. */
|
|
15
|
+
function pictures(text: string): MarkdownPicture[] | undefined;
|
|
16
|
+
/** The words of a short line that names the picture under it, its marks and the colon after it left out. */
|
|
17
|
+
function captionOf(text: string): string | undefined;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=gallery.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GalleryUtil = void 0;
|
|
4
|
+
const markdown_1 = require("./markdown");
|
|
5
|
+
/** A caption is a short line: at most this wide, a CJK character counting twice. */
|
|
6
|
+
const CAPTION_WIDTH = 40;
|
|
7
|
+
/** A line that ends a sentence says something, it does not name a picture. */
|
|
8
|
+
const SENTENCE_END = /[。!?!?;;.]$/;
|
|
9
|
+
/** Alt text that names no picture: a file name, or "image", "screenshot" and the like. */
|
|
10
|
+
const BARE_ALT = /^(?:image|img|picture|pic|photo|screenshot|screen ?shot|图片?|截图|圖片?|截圖|画像|スクリーンショット)?\s*\d*$|\.\w{2,5}$/i;
|
|
11
|
+
/**
|
|
12
|
+
* Pictures of a reply shown together, as chat apps show several sent at once: two side by side, four in two rows of
|
|
13
|
+
* two, three or more three a row, nine at most, the last saying how many more. Paragraphs of pictures alone one after
|
|
14
|
+
* another are one gallery, and so are pictures each under a short line of its own that names it (`**Dark**`,
|
|
15
|
+
* `Before:`), which shows under its tile.
|
|
16
|
+
*/
|
|
17
|
+
var GalleryUtil;
|
|
18
|
+
(function (GalleryUtil) {
|
|
19
|
+
/** The tiles a gallery shows; the last of them says how many more there are. */
|
|
20
|
+
GalleryUtil.TILES = 9;
|
|
21
|
+
function columns(count) {
|
|
22
|
+
return count <= 1 ? 1 : count === 2 || count === 4 ? 2 : 3;
|
|
23
|
+
}
|
|
24
|
+
GalleryUtil.columns = columns;
|
|
25
|
+
/** The blocks with each run of two pictures or more as one gallery. */
|
|
26
|
+
function group(blocks) {
|
|
27
|
+
const out = [];
|
|
28
|
+
for (let i = 0; i < blocks.length;) {
|
|
29
|
+
const run = runFrom(blocks, i);
|
|
30
|
+
const count = run.entries.reduce((sum, entry) => sum + entry.pictures.length, 0);
|
|
31
|
+
if (count < 2) {
|
|
32
|
+
out.push(blocks[i]);
|
|
33
|
+
i++;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const entries = run.entries.slice();
|
|
37
|
+
// One line before the first picture alone introduces them all ("截图如下"), it names none.
|
|
38
|
+
const named = entries.filter(entry => entry.caption).length;
|
|
39
|
+
if (named === 1 && entries[0].caption) {
|
|
40
|
+
out.push(entries[0].caption);
|
|
41
|
+
entries[0] = { pictures: entries[0].pictures };
|
|
42
|
+
}
|
|
43
|
+
const items = entries.flatMap(entry => {
|
|
44
|
+
var _a;
|
|
45
|
+
const caption = ((_a = entry.caption) === null || _a === void 0 ? void 0 : _a.type) === 'paragraph' ? captionOf(entry.caption.text) : undefined;
|
|
46
|
+
return entry.pictures.map(picture => {
|
|
47
|
+
const words = caption !== null && caption !== void 0 ? caption : altCaption(picture.alt);
|
|
48
|
+
return words ? { ...picture, caption: words } : picture;
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
out.push({ type: 'gallery', items });
|
|
52
|
+
i = run.end;
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
GalleryUtil.group = group;
|
|
57
|
+
/** The pictures of a paragraph of pictures alone (and spaces between them); undefined for any other. */
|
|
58
|
+
function pictures(text) {
|
|
59
|
+
const out = [];
|
|
60
|
+
for (const node of markdown_1.MarkdownUtil.inline(text)) {
|
|
61
|
+
if (node.type === 'media' && markdown_1.MarkdownUtil.media(node.src) === 'image') {
|
|
62
|
+
out.push({ src: node.src, alt: node.alt });
|
|
63
|
+
}
|
|
64
|
+
else if (node.type !== 'text' || node.text.trim()) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return out.length > 0 ? out : undefined;
|
|
69
|
+
}
|
|
70
|
+
GalleryUtil.pictures = pictures;
|
|
71
|
+
/** The words of a short line that names the picture under it, its marks and the colon after it left out. */
|
|
72
|
+
function captionOf(text) {
|
|
73
|
+
if (text.includes('\n')) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
const colon = /\s*[::]\s*$/;
|
|
77
|
+
let line = text.trim().replace(colon, '');
|
|
78
|
+
const strong = /^(\*\*|__|\*|_)(.+)\1$/.exec(line);
|
|
79
|
+
if (strong && !strong[2].includes(strong[1])) {
|
|
80
|
+
line = strong[2].trim().replace(colon, '');
|
|
81
|
+
}
|
|
82
|
+
if (!line || SENTENCE_END.test(line) || width(line) > CAPTION_WIDTH) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
return markdown_1.MarkdownUtil.inline(line).every(node => node.type === 'text' || node.type === 'strong' || node.type === 'em' || node.type === 'code')
|
|
86
|
+
? line
|
|
87
|
+
: undefined;
|
|
88
|
+
}
|
|
89
|
+
GalleryUtil.captionOf = captionOf;
|
|
90
|
+
function altCaption(alt) {
|
|
91
|
+
const words = alt.trim();
|
|
92
|
+
return words && !BARE_ALT.test(words) && width(words) <= CAPTION_WIDTH ? words : undefined;
|
|
93
|
+
}
|
|
94
|
+
function runFrom(blocks, start) {
|
|
95
|
+
const entries = [];
|
|
96
|
+
let i = start;
|
|
97
|
+
while (i < blocks.length) {
|
|
98
|
+
const block = blocks[i];
|
|
99
|
+
if (block.type !== 'paragraph') {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
const own = pictures(block.text);
|
|
103
|
+
if (own) {
|
|
104
|
+
entries.push({ pictures: own });
|
|
105
|
+
i++;
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const next = blocks[i + 1];
|
|
109
|
+
const under = (next === null || next === void 0 ? void 0 : next.type) === 'paragraph' && captionOf(block.text) !== undefined ? pictures(next.text) : undefined;
|
|
110
|
+
if ((under === null || under === void 0 ? void 0 : under.length) !== 1) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
entries.push({ pictures: under, caption: block });
|
|
114
|
+
i += 2;
|
|
115
|
+
}
|
|
116
|
+
return { entries, end: i };
|
|
117
|
+
}
|
|
118
|
+
function width(text) {
|
|
119
|
+
let width = 0;
|
|
120
|
+
for (const char of text) {
|
|
121
|
+
width += char.charCodeAt(0) >= 0x2e80 ? 2 : 1;
|
|
122
|
+
}
|
|
123
|
+
return width;
|
|
124
|
+
}
|
|
125
|
+
})(GalleryUtil || (exports.GalleryUtil = GalleryUtil = {}));
|
|
126
|
+
//# sourceMappingURL=gallery.js.map
|
|
@@ -36,6 +36,14 @@ export declare namespace LinkUtil {
|
|
|
36
36
|
function codeReference(text: string): LinkTarget | undefined;
|
|
37
37
|
/** A URL at the start of `text` (text runs on after it), without the punctuation that ends a sentence. */
|
|
38
38
|
function bareUrl(text: string): string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The first web address of a notice, for a button that opens it (a page to sign in on); the text without it
|
|
41
|
+
* when it ends the text, as the button stands for it.
|
|
42
|
+
*/
|
|
43
|
+
function noticeLink(text: string): {
|
|
44
|
+
text: string;
|
|
45
|
+
url?: string;
|
|
46
|
+
};
|
|
39
47
|
/** `path` against the directory `cwd`: the directory to read it in, and the path inside it ('' for the directory itself). */
|
|
40
48
|
function resolve(cwd: string, path: string): {
|
|
41
49
|
cwd: string;
|
package/lib/browser/util/link.js
CHANGED
|
@@ -132,6 +132,20 @@ var LinkUtil;
|
|
|
132
132
|
return /^https?:\/\/[^/?#]/i.test(url) ? url : undefined;
|
|
133
133
|
}
|
|
134
134
|
LinkUtil.bareUrl = bareUrl;
|
|
135
|
+
/**
|
|
136
|
+
* The first web address of a notice, for a button that opens it (a page to sign in on); the text without it
|
|
137
|
+
* when it ends the text, as the button stands for it.
|
|
138
|
+
*/
|
|
139
|
+
function noticeLink(text) {
|
|
140
|
+
const at = text.search(/https?:\/\//i);
|
|
141
|
+
const url = at < 0 ? undefined : bareUrl(text.slice(at));
|
|
142
|
+
if (!url) {
|
|
143
|
+
return { text };
|
|
144
|
+
}
|
|
145
|
+
const after = text.slice(at + url.length).replace(/^[.,;:!?。,;!?]+/, '');
|
|
146
|
+
return { text: after.trim() ? text : text.slice(0, at).replace(/[\s::]+$/, ''), url };
|
|
147
|
+
}
|
|
148
|
+
LinkUtil.noticeLink = noticeLink;
|
|
135
149
|
/** `path` against the directory `cwd`: the directory to read it in, and the path inside it ('' for the directory itself). */
|
|
136
150
|
function resolve(cwd, path) {
|
|
137
151
|
if (cwd.includes('\\') || path.includes('\\')) {
|
|
@@ -35,7 +35,18 @@ export type MarkdownBlock = {
|
|
|
35
35
|
closed: boolean;
|
|
36
36
|
} | {
|
|
37
37
|
type: 'rule';
|
|
38
|
+
}
|
|
39
|
+
/** Pictures one after another, shown together as a grid (GalleryUtil.group). */
|
|
40
|
+
| {
|
|
41
|
+
type: 'gallery';
|
|
42
|
+
items: MarkdownPicture[];
|
|
38
43
|
};
|
|
44
|
+
/** A picture of a gallery: its target, its alt text and the words that name it, if any. */
|
|
45
|
+
export interface MarkdownPicture {
|
|
46
|
+
src: string;
|
|
47
|
+
alt: string;
|
|
48
|
+
caption?: string;
|
|
49
|
+
}
|
|
39
50
|
/** How a column of a table is aligned: `:--`, `:-:`, `--:`, or as the page is (`''`). */
|
|
40
51
|
export type TableAlign = '' | 'left' | 'center' | 'right';
|
|
41
52
|
/** A run of text inside a block. */
|
|
@@ -232,6 +232,10 @@ var MarkdownUtil;
|
|
|
232
232
|
switch (b.type) {
|
|
233
233
|
case 'list':
|
|
234
234
|
return a.type === 'list' && a.ordered === b.ordered && sameStrings(a.items, b.items);
|
|
235
|
+
case 'gallery':
|
|
236
|
+
return (a.type === 'gallery' &&
|
|
237
|
+
a.items.length === b.items.length &&
|
|
238
|
+
a.items.every((item, index) => item.src === b.items[index].src && item.alt === b.items[index].alt && item.caption === b.items[index].caption));
|
|
235
239
|
case 'table':
|
|
236
240
|
return (a.type === 'table' &&
|
|
237
241
|
sameStrings(a.header, b.header) &&
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A picture of the workspace shown smaller than it is (in a reply, a tile of a gallery) is loaded smaller: its URL asks
|
|
3
|
+
* ta serve for a box of the pixels of the device (`?w=&h=`, `fit=cover` for a tile it fills), which makes a smaller PNG
|
|
4
|
+
* of a PNG and sends any other picture as it is. Enlarged, the picture itself loads.
|
|
5
|
+
*/
|
|
6
|
+
export declare namespace ThumbnailUtil {
|
|
7
|
+
/** The box a picture shows in, in pixels of the device; `cover` for a tile it fills. */
|
|
8
|
+
interface Box {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
cover?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** `css` pixels of the page in pixels of the device, three at most to one, rounded up to a step. */
|
|
14
|
+
function side(css: number, ratio?: number): number;
|
|
15
|
+
function url(url: string, width: number, height: number, cover?: boolean): string;
|
|
16
|
+
/** The URL of a file of the workspace asked in `box`, or as it is without one. */
|
|
17
|
+
function boxed(url: string, box?: Box): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=thumbnail.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThumbnailUtil = void 0;
|
|
4
|
+
/** Sides of a smaller picture go up in steps of this, so that pages of nearly the same width share one. */
|
|
5
|
+
const STEP = 160;
|
|
6
|
+
const MAX = 4096;
|
|
7
|
+
/**
|
|
8
|
+
* A picture of the workspace shown smaller than it is (in a reply, a tile of a gallery) is loaded smaller: its URL asks
|
|
9
|
+
* ta serve for a box of the pixels of the device (`?w=&h=`, `fit=cover` for a tile it fills), which makes a smaller PNG
|
|
10
|
+
* of a PNG and sends any other picture as it is. Enlarged, the picture itself loads.
|
|
11
|
+
*/
|
|
12
|
+
var ThumbnailUtil;
|
|
13
|
+
(function (ThumbnailUtil) {
|
|
14
|
+
/** `css` pixels of the page in pixels of the device, three at most to one, rounded up to a step. */
|
|
15
|
+
function side(css, ratio = globalThis.devicePixelRatio || 1) {
|
|
16
|
+
return Math.min(MAX, Math.ceil((css * Math.min(3, Math.max(1, ratio))) / STEP) * STEP);
|
|
17
|
+
}
|
|
18
|
+
ThumbnailUtil.side = side;
|
|
19
|
+
function url(url, width, height, cover = false) {
|
|
20
|
+
return `${url}${url.includes('?') ? '&' : '?'}w=${width}&h=${height}${cover ? '&fit=cover' : ''}`;
|
|
21
|
+
}
|
|
22
|
+
ThumbnailUtil.url = url;
|
|
23
|
+
/** The URL of a file of the workspace asked in `box`, or as it is without one. */
|
|
24
|
+
function boxed(url, box) {
|
|
25
|
+
return box ? ThumbnailUtil.url(url, box.width, box.height, box.cover) : url;
|
|
26
|
+
}
|
|
27
|
+
ThumbnailUtil.boxed = boxed;
|
|
28
|
+
})(ThumbnailUtil || (exports.ThumbnailUtil = ThumbnailUtil = {}));
|
|
29
|
+
//# sourceMappingURL=thumbnail.js.map
|