mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Update colors tokens for inputer/footer (#6523)
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const atomOneDarkColors: ColorsTheme = {
|
||||
type: 'dark',
|
||||
@@ -143,5 +142,4 @@ export const AtomOneDark: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
atomOneDarkColors,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { lightSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const ayuLightColors: ColorsTheme = {
|
||||
type: 'light',
|
||||
@@ -135,5 +134,4 @@ export const AyuLight: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
ayuLightColors,
|
||||
lightSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const ayuDarkColors: ColorsTheme = {
|
||||
type: 'dark',
|
||||
@@ -109,5 +108,4 @@ export const AyuDark: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
ayuDarkColors,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { lightTheme, Theme } from './theme.js';
|
||||
import { lightSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
export const DefaultLight: Theme = new Theme(
|
||||
'Default Light',
|
||||
@@ -104,5 +103,4 @@ export const DefaultLight: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
lightTheme,
|
||||
lightSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { darkTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
export const DefaultDark: Theme = new Theme(
|
||||
'Default',
|
||||
@@ -147,5 +146,4 @@ export const DefaultDark: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
darkTheme,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const draculaColors: ColorsTheme = {
|
||||
type: 'dark',
|
||||
@@ -120,5 +119,4 @@ export const Dracula: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
draculaColors,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const githubDarkColors: ColorsTheme = {
|
||||
type: 'dark',
|
||||
@@ -143,5 +142,4 @@ export const GitHubDark: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
githubDarkColors,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { lightSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const githubLightColors: ColorsTheme = {
|
||||
type: 'light',
|
||||
@@ -145,5 +144,4 @@ export const GitHubLight: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
githubLightColors,
|
||||
lightSemanticColors,
|
||||
);
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { lightTheme, Theme, type ColorsTheme } from './theme.js';
|
||||
import { lightSemanticColors } from './semantic-tokens.js';
|
||||
import { type ColorsTheme, Theme, lightTheme } from './theme.js';
|
||||
|
||||
const googleCodeColors: ColorsTheme = {
|
||||
type: 'light',
|
||||
@@ -142,5 +141,4 @@ export const GoogleCode: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
googleCodeColors,
|
||||
lightSemanticColors,
|
||||
);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* @author Ahmad Awais <https://twitter.com/mrahmadawais/>
|
||||
*/
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { darkSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const shadesOfPurpleColors: ColorsTheme = {
|
||||
type: 'dark',
|
||||
@@ -348,5 +347,4 @@ export const ShadesOfPurple = new Theme(
|
||||
},
|
||||
},
|
||||
shadesOfPurpleColors,
|
||||
darkSemanticColors,
|
||||
);
|
||||
|
||||
@@ -141,6 +141,7 @@ export class Theme {
|
||||
* to Ink-compatible color strings (hex or name).
|
||||
*/
|
||||
protected readonly _colorMap: Readonly<Record<string, string>>;
|
||||
readonly semanticColors: SemanticColors;
|
||||
|
||||
/**
|
||||
* Creates a new Theme instance.
|
||||
@@ -152,8 +153,37 @@ export class Theme {
|
||||
readonly type: ThemeType,
|
||||
rawMappings: Record<string, CSSProperties>,
|
||||
readonly colors: ColorsTheme,
|
||||
readonly semanticColors: SemanticColors,
|
||||
semanticColors?: SemanticColors,
|
||||
) {
|
||||
this.semanticColors = semanticColors ?? {
|
||||
text: {
|
||||
primary: this.colors.Foreground,
|
||||
secondary: this.colors.Gray,
|
||||
link: this.colors.AccentBlue,
|
||||
accent: this.colors.AccentPurple,
|
||||
},
|
||||
background: {
|
||||
primary: this.colors.Background,
|
||||
diff: {
|
||||
added: this.colors.DiffAdded,
|
||||
removed: this.colors.DiffRemoved,
|
||||
},
|
||||
},
|
||||
border: {
|
||||
default: this.colors.Gray,
|
||||
focused: this.colors.AccentBlue,
|
||||
},
|
||||
ui: {
|
||||
comment: this.colors.Comment,
|
||||
symbol: this.colors.Gray,
|
||||
gradient: this.colors.GradientColors,
|
||||
},
|
||||
status: {
|
||||
error: this.colors.AccentRed,
|
||||
success: this.colors.AccentGreen,
|
||||
warning: this.colors.AccentYellow,
|
||||
},
|
||||
};
|
||||
this._colorMap = Object.freeze(this._buildColorMap(rawMappings)); // Build and freeze the map
|
||||
|
||||
// Determine the default foreground color
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { lightSemanticColors } from './semantic-tokens.js';
|
||||
|
||||
const xcodeColors: ColorsTheme = {
|
||||
type: 'light',
|
||||
@@ -150,5 +149,4 @@ export const XCode: Theme = new Theme(
|
||||
},
|
||||
},
|
||||
xcodeColors,
|
||||
lightSemanticColors,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user