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";
/**
* All color names of Catppuccin
* Accent colors of Catppuccin.
*/
export type ColorName =
export type AccentNames =
| "rosewater"
| "flamingo"
| "pink"
@ -29,7 +29,13 @@ export type ColorName =
| "sky"
| "sapphire"
| "blue"
| "lavender"
| "lavender";
/**
* Monochromatic colors of Catppuccin,
* from `text` to `crust`
*/
export type MonochromaticNames =
| "text"
| "subtext1"
| "subtext0"
@ -43,6 +49,11 @@ export type ColorName =
| "mantle"
| "crust";
/**
* All color names of Catppuccin
*/
export type ColorName = AccentNames | MonochromaticNames;
/**
* Generic to map type T to all Catppuccin color names
*/