From e1a4a366d39f59a10ecbade9555f267039cc4f23 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Sun, 12 May 2024 17:03:03 -0400 Subject: [PATCH 1/3] feat: add emoji for each flavor --- mod.ts | 5 +++++ palette.json | 4 ++++ scripts/gen_palette.ts | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/mod.ts b/mod.ts index 2533740..1c8403f 100644 --- a/mod.ts +++ b/mod.ts @@ -68,6 +68,11 @@ export type CatppuccinFlavor = Readonly<{ */ name: string; + /** + * Emoji associated with the flavor + */ + emoji: string; + /** * Order of the flavor in the palette spec */ diff --git a/palette.json b/palette.json index cdc546d..8b5ca96 100644 --- a/palette.json +++ b/palette.json @@ -1,6 +1,7 @@ { "latte": { "name": "Latte", + "emoji": "🌻", "order": 0, "dark": false, "colors": { @@ -424,6 +425,7 @@ }, "frappe": { "name": "Frappé", + "emoji": "🪴", "order": 1, "dark": true, "colors": { @@ -847,6 +849,7 @@ }, "macchiato": { "name": "Macchiato", + "emoji": "🌺", "order": 2, "dark": true, "colors": { @@ -1270,6 +1273,7 @@ }, "mocha": { "name": "Mocha", + "emoji": "🌿", "order": 3, "dark": true, "colors": { diff --git a/scripts/gen_palette.ts b/scripts/gen_palette.ts index e1bf54e..b08d762 100644 --- a/scripts/gen_palette.ts +++ b/scripts/gen_palette.ts @@ -48,6 +48,7 @@ const prettyNames = [ const definitions = { latte: { name: "Latte", + emoji: "🌻", dark: false, colors: { rosewater: "#dc8a78", @@ -80,6 +81,7 @@ const definitions = { }, frappe: { name: "Frappé", + emoji: "🪴", dark: true, colors: { rosewater: "#f2d5cf", @@ -112,6 +114,7 @@ const definitions = { }, macchiato: { name: "Macchiato", + emoji: "🌺", dark: true, colors: { rosewater: "#f4dbd6", @@ -144,6 +147,7 @@ const definitions = { }, mocha: { name: "Mocha", + emoji: "🌿", dark: true, colors: { rosewater: "#f5e0dc", @@ -197,6 +201,7 @@ const formatted = entriesFromObject(definitions) .reduce((acc, [flavorName, flavor], currentIndex) => { acc[flavorName] = { name: flavor.name, + emoji: flavor.emoji, order: currentIndex, dark: flavor.dark, colors: entriesFromObject(flavor.colors).reduce( From 114ac6e65020e31b8cfe2cd7d2a687ee30a1a761 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Sun, 12 May 2024 17:08:35 -0400 Subject: [PATCH 2/3] fix: deno lint complaining about imports --- scripts/gen_palette.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/gen_palette.ts b/scripts/gen_palette.ts index b08d762..7e3fffc 100644 --- a/scripts/gen_palette.ts +++ b/scripts/gen_palette.ts @@ -1,10 +1,10 @@ import { join } from "std/path/join.ts"; import tinycolor from "tinycolor2"; -import { - type CatppuccinColors, - type CatppuccinFlavor, - type Flavors, +import type { + CatppuccinColors, + CatppuccinFlavor, + Flavors, } from "@catppuccin/palette"; type Entries = { From 52c322261d3f8de9240b336f16bdcb1ae6842ea9 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Mon, 13 May 2024 08:05:12 -0400 Subject: [PATCH 3/3] chore: update docstring to mention minimum required unicode version --- mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.ts b/mod.ts index 1c8403f..2df9dc9 100644 --- a/mod.ts +++ b/mod.ts @@ -69,7 +69,7 @@ export type CatppuccinFlavor = Readonly<{ name: string; /** - * Emoji associated with the flavor + * Emoji associated with the flavor. Requires Unicode 13.0 (2020) or later to render */ emoji: string;