Allow themes to theme the UI (#769)

This commit is contained in:
Miguel Solorio
2025-06-05 14:35:47 -07:00
committed by GitHub
parent 2285bba66e
commit 8a0a2523ca
33 changed files with 533 additions and 385 deletions

View File

@@ -4,11 +4,27 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { darkTheme, Theme } from './theme.js';
import { darkTheme, Theme, type ColorsTheme } from './theme.js';
const ansiColors: ColorsTheme = {
type: 'dark',
Background: 'black',
Foreground: 'white',
LightBlue: 'bluebright',
AccentBlue: '#0000FF',
AccentPurple: 'magenta',
AccentCyan: 'cyan',
AccentGreen: 'green',
AccentYellow: 'yellow',
AccentRed: 'red',
Comment: 'gray',
Gray: 'gray',
GradientColors: darkTheme.GradientColors, // Fallback
};
export const ANSI: Theme = new Theme(
'ANSI',
'dark',
'dark', // Consistent with its color palette base
{
hljs: {
display: 'block',
@@ -135,5 +151,5 @@ export const ANSI: Theme = new Theme(
color: 'yellow', // Mapped from #D7BA7D
},
},
darkTheme,
ansiColors,
);