This commit is contained in:
LitoMore 2022-10-10 14:54:51 +08:00
parent 79e9185fd6
commit 553c46871a
No known key found for this signature in database
GPG key ID: B8653F9344667340
2 changed files with 6 additions and 2 deletions

View file

@ -187,18 +187,21 @@ export type ModifierName = keyof Modifier;
/** /**
Basic foreground color names. Basic foreground color names.
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
*/ */
export type ForegroundColorName = keyof ForegroundColor; export type ForegroundColorName = keyof ForegroundColor;
/** /**
Basic background color names. Basic background color names.
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
*/ */
export type BackgroundColorName = keyof BackgroundColor; export type BackgroundColorName = keyof BackgroundColor;
/** /**
Basic color names. The combination of foreground and background color names. Basic color names. The combination of foreground and background color names.
[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) [More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support)
*/ */
export type ColorName = ForegroundColorName | BackgroundColorName; export type ColorName = ForegroundColorName | BackgroundColorName;

View file

@ -214,9 +214,10 @@ function assembleStyles() {
} }
const ansiStyles = assembleStyles(); const ansiStyles = assembleStyles();
export default ansiStyles;
export const modifierNames = Object.keys(styles.modifier); export const modifierNames = Object.keys(styles.modifier);
export const foregroundColorNames = Object.keys(styles.color); export const foregroundColorNames = Object.keys(styles.color);
export const backgroundColorNames = Object.keys(styles.bgColor); export const backgroundColorNames = Object.keys(styles.bgColor);
export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; export const colorNames = [...foregroundColorNames, ...backgroundColorNames];
export default ansiStyles;