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 { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const atomOneDarkColors: ColorsTheme = {
|
const atomOneDarkColors: ColorsTheme = {
|
||||||
type: 'dark',
|
type: 'dark',
|
||||||
@@ -143,5 +142,4 @@ export const AtomOneDark: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
atomOneDarkColors,
|
atomOneDarkColors,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { lightSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const ayuLightColors: ColorsTheme = {
|
const ayuLightColors: ColorsTheme = {
|
||||||
type: 'light',
|
type: 'light',
|
||||||
@@ -135,5 +134,4 @@ export const AyuLight: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
ayuLightColors,
|
ayuLightColors,
|
||||||
lightSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const ayuDarkColors: ColorsTheme = {
|
const ayuDarkColors: ColorsTheme = {
|
||||||
type: 'dark',
|
type: 'dark',
|
||||||
@@ -109,5 +108,4 @@ export const AyuDark: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
ayuDarkColors,
|
ayuDarkColors,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { lightTheme, Theme } from './theme.js';
|
import { lightTheme, Theme } from './theme.js';
|
||||||
import { lightSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
export const DefaultLight: Theme = new Theme(
|
export const DefaultLight: Theme = new Theme(
|
||||||
'Default Light',
|
'Default Light',
|
||||||
@@ -104,5 +103,4 @@ export const DefaultLight: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
lightTheme,
|
lightTheme,
|
||||||
lightSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { darkTheme, Theme } from './theme.js';
|
import { darkTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
export const DefaultDark: Theme = new Theme(
|
export const DefaultDark: Theme = new Theme(
|
||||||
'Default',
|
'Default',
|
||||||
@@ -147,5 +146,4 @@ export const DefaultDark: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
darkTheme,
|
darkTheme,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const draculaColors: ColorsTheme = {
|
const draculaColors: ColorsTheme = {
|
||||||
type: 'dark',
|
type: 'dark',
|
||||||
@@ -120,5 +119,4 @@ export const Dracula: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
draculaColors,
|
draculaColors,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const githubDarkColors: ColorsTheme = {
|
const githubDarkColors: ColorsTheme = {
|
||||||
type: 'dark',
|
type: 'dark',
|
||||||
@@ -143,5 +142,4 @@ export const GitHubDark: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
githubDarkColors,
|
githubDarkColors,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { lightSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const githubLightColors: ColorsTheme = {
|
const githubLightColors: ColorsTheme = {
|
||||||
type: 'light',
|
type: 'light',
|
||||||
@@ -145,5 +144,4 @@ export const GitHubLight: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
githubLightColors,
|
githubLightColors,
|
||||||
lightSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { lightTheme, Theme, type ColorsTheme } from './theme.js';
|
import { type ColorsTheme, Theme, lightTheme } from './theme.js';
|
||||||
import { lightSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const googleCodeColors: ColorsTheme = {
|
const googleCodeColors: ColorsTheme = {
|
||||||
type: 'light',
|
type: 'light',
|
||||||
@@ -142,5 +141,4 @@ export const GoogleCode: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
googleCodeColors,
|
googleCodeColors,
|
||||||
lightSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* @author Ahmad Awais <https://twitter.com/mrahmadawais/>
|
* @author Ahmad Awais <https://twitter.com/mrahmadawais/>
|
||||||
*/
|
*/
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { darkSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const shadesOfPurpleColors: ColorsTheme = {
|
const shadesOfPurpleColors: ColorsTheme = {
|
||||||
type: 'dark',
|
type: 'dark',
|
||||||
@@ -348,5 +347,4 @@ export const ShadesOfPurple = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
shadesOfPurpleColors,
|
shadesOfPurpleColors,
|
||||||
darkSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ export class Theme {
|
|||||||
* to Ink-compatible color strings (hex or name).
|
* to Ink-compatible color strings (hex or name).
|
||||||
*/
|
*/
|
||||||
protected readonly _colorMap: Readonly<Record<string, string>>;
|
protected readonly _colorMap: Readonly<Record<string, string>>;
|
||||||
|
readonly semanticColors: SemanticColors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Theme instance.
|
* Creates a new Theme instance.
|
||||||
@@ -152,8 +153,37 @@ export class Theme {
|
|||||||
readonly type: ThemeType,
|
readonly type: ThemeType,
|
||||||
rawMappings: Record<string, CSSProperties>,
|
rawMappings: Record<string, CSSProperties>,
|
||||||
readonly colors: ColorsTheme,
|
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
|
this._colorMap = Object.freeze(this._buildColorMap(rawMappings)); // Build and freeze the map
|
||||||
|
|
||||||
// Determine the default foreground color
|
// Determine the default foreground color
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { type ColorsTheme, Theme } from './theme.js';
|
import { type ColorsTheme, Theme } from './theme.js';
|
||||||
import { lightSemanticColors } from './semantic-tokens.js';
|
|
||||||
|
|
||||||
const xcodeColors: ColorsTheme = {
|
const xcodeColors: ColorsTheme = {
|
||||||
type: 'light',
|
type: 'light',
|
||||||
@@ -150,5 +149,4 @@ export const XCode: Theme = new Theme(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
xcodeColors,
|
xcodeColors,
|
||||||
lightSemanticColors,
|
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user