feat: add emoji for each flavor (#81)
This commit is contained in:
parent
408f081b64
commit
0abf33dc57
5
mod.ts
5
mod.ts
|
@ -68,6 +68,11 @@ export type CatppuccinFlavor = Readonly<{
|
|||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Emoji associated with the flavor. Requires Unicode 13.0 (2020) or later to render
|
||||
*/
|
||||
emoji: string;
|
||||
|
||||
/**
|
||||
* Order of the flavor in the palette spec
|
||||
*/
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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<T> = {
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue