( footerTheme: TuiThemeCurrent, scrollbackTheme: TuiThemeCurrent, splash: RunSplashTheme, syntax?: SyntaxStyle, subtleSyntax?: SyntaxStyle, )
| 498 | } |
| 499 | |
| 500 | function map( |
| 501 | footerTheme: TuiThemeCurrent, |
| 502 | scrollbackTheme: TuiThemeCurrent, |
| 503 | splash: RunSplashTheme, |
| 504 | syntax?: SyntaxStyle, |
| 505 | subtleSyntax?: SyntaxStyle, |
| 506 | ): RunTheme { |
| 507 | const opaqueSubtleSyntax = opaqueSyntaxStyle(subtleSyntax, scrollbackTheme.background) |
| 508 | subtleSyntax?.destroy() |
| 509 | const footerBackground = alpha(footerTheme.background, 1) |
| 510 | const footerMode = mode(footerBackground) |
| 511 | const shade = fade(footerTheme.backgroundMenu, footerTheme.background, 0.12, 0.56, 0.72) |
| 512 | const surface = fade(footerTheme.backgroundMenu, footerTheme.background, 0.18, 0.76, 0.9) |
| 513 | const line = fade(footerTheme.backgroundMenu, footerTheme.background, 0.24, 0.9, 0.98) |
| 514 | const statusBase = tint(footerBackground, rgba("#000000"), footerMode === "dark" ? 0.12 : 0.06) |
| 515 | const statusAccentBase = |
| 516 | footerMode === "dark" ? tint(footerBackground, rgba("#ffffff"), 0.06) : tint(statusBase, rgba("#000000"), 0.04) |
| 517 | const collapsedStatus = footerMode === "dark" && luminance(statusBase) <= 0.04 |
| 518 | // Pure-black backgrounds need a slight lift or the row disappears into the terminal background. |
| 519 | const status = collapsedStatus ? tint(statusBase, statusAccentBase, 0.7) : statusBase |
| 520 | const statusAccent = collapsedStatus ? tint(status, rgba("#ffffff"), 0.06) : statusAccentBase |
| 521 | |
| 522 | return { |
| 523 | background: footerTheme.background, |
| 524 | footer: { |
| 525 | highlight: footerTheme.primary, |
| 526 | selected: footerTheme.backgroundElement, |
| 527 | selectedText: footerTheme.selectedListItemText, |
| 528 | warning: footerTheme.warning, |
| 529 | success: footerTheme.success, |
| 530 | error: footerTheme.error, |
| 531 | muted: footerTheme.textMuted, |
| 532 | text: footerTheme.text, |
| 533 | status, |
| 534 | statusAccent, |
| 535 | shade, |
| 536 | surface, |
| 537 | pane: footerTheme.backgroundMenu, |
| 538 | border: footerTheme.border, |
| 539 | line, |
| 540 | }, |
| 541 | entry: { |
| 542 | system: { |
| 543 | body: scrollbackTheme.textMuted, |
| 544 | }, |
| 545 | user: { |
| 546 | body: scrollbackTheme.primary, |
| 547 | }, |
| 548 | assistant: { |
| 549 | body: scrollbackTheme.text, |
| 550 | }, |
| 551 | reasoning: { |
| 552 | body: scrollbackTheme.textMuted, |
| 553 | }, |
| 554 | tool: { |
| 555 | body: scrollbackTheme.text, |
| 556 | start: scrollbackTheme.textMuted, |
| 557 | }, |
no test coverage detected