From 43a6cdcf74e385a69712cd1123f1a2982fbb3c73 Mon Sep 17 00:00:00 2001 From: nekowinston Date: Tue, 12 Dec 2023 07:15:05 +0100 Subject: [PATCH] fix(settings): customUIColors color key names (#246) --- schemas/customUIColors.schema.json | 12 ++++++++++++ src/hooks/updateSchemas.ts | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/schemas/customUIColors.schema.json b/schemas/customUIColors.schema.json index 58eda7ee..16aef98e 100644 --- a/schemas/customUIColors.schema.json +++ b/schemas/customUIColors.schema.json @@ -39,6 +39,18 @@ "sapphire", "blue", "lavender", + "text", + "subtext1", + "subtext0", + "overlay2", + "overlay1", + "overlay0", + "surface2", + "surface1", + "surface0", + "base", + "mantle", + "crust", "accent" ] }, diff --git a/src/hooks/updateSchemas.ts b/src/hooks/updateSchemas.ts index 5e626167..7c45ba5b 100644 --- a/src/hooks/updateSchemas.ts +++ b/src/hooks/updateSchemas.ts @@ -1,5 +1,6 @@ import { writeFile } from "node:fs/promises"; import { join } from "node:path"; +import { labels } from "@catppuccin/palette"; import { repoRoot, vscodeSchemasRoot } from "./constants"; import { accents } from "./updatePackageJson"; @@ -22,7 +23,7 @@ const customUiColorsSchema = (workbenchColors: any) => { catppuccinColor: { anyOf: [ // allow plain color names, - { enum: validColors }, + { enum: [...Object.keys(labels), "accent"] }, // custom hex codes, { format: "color-hex" }, // and plain color names + opacity