fix(types): add accent/monochromatic color name types (#65)

This commit is contained in:
winston 2024-01-02 21:31:41 +01:00 committed by GitHub
parent 71ca10d24b
commit 3d415e7c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 3 deletions

17
mod.ts
View File

@ -13,9 +13,9 @@ const entriesFromObject = <T extends object>(obj: T): Entries<T> =>
export type FlavorName = "latte" | "frappe" | "macchiato" | "mocha"; export type FlavorName = "latte" | "frappe" | "macchiato" | "mocha";
/** /**
* All color names of Catppuccin * Accent colors of Catppuccin.
*/ */
export type ColorName = export type AccentNames =
| "rosewater" | "rosewater"
| "flamingo" | "flamingo"
| "pink" | "pink"
@ -29,7 +29,13 @@ export type ColorName =
| "sky" | "sky"
| "sapphire" | "sapphire"
| "blue" | "blue"
| "lavender" | "lavender";
/**
* Monochromatic colors of Catppuccin,
* from `text` to `crust`
*/
export type MonochromaticNames =
| "text" | "text"
| "subtext1" | "subtext1"
| "subtext0" | "subtext0"
@ -43,6 +49,11 @@ export type ColorName =
| "mantle" | "mantle"
| "crust"; | "crust";
/**
* All color names of Catppuccin
*/
export type ColorName = AccentNames | MonochromaticNames;
/** /**
* Generic to map type T to all Catppuccin color names * Generic to map type T to all Catppuccin color names
*/ */