From 3d415e7c8dd67e332225ce6c7af2700d2c3ad404 Mon Sep 17 00:00:00 2001 From: winston Date: Tue, 2 Jan 2024 21:31:41 +0100 Subject: [PATCH] fix(types): add accent/monochromatic color name types (#65) --- mod.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mod.ts b/mod.ts index edc0f0b..8e53127 100644 --- a/mod.ts +++ b/mod.ts @@ -13,9 +13,9 @@ const entriesFromObject = (obj: T): Entries => 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 */