chore(deps): update dependency catppuccin/palette to v1 (#999)
* chore(deps): update dependency catppuccin/palette to v1 * refactor(scripts/labels): update for `@catppuccin/palette` data structure changes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: uncenter <[email protected]>
This commit is contained in:
1 parent
867c571550
commit
ce199b0180
3 files changed
+14
-9
No files matched your search
@@ -4,18 +4,16 @@ import { REPO_ROOT } from "@/deps.ts";
|
||||
import { updateFile } from "@/generate/utils.ts";
|
||||
import { UserStylesSchema } from "@/types/mod.ts";
|
||||
import { stringify } from "std/yaml/stringify.ts";
|
||||
import palette from "https://raw.githubusercontent.com/catppuccin/palette/v0.2.0/palette-porcelain.json" with {
|
||||
type: "json",
|
||||
};
|
||||
import { type ColorName, flavors } from "@catppuccin/palette";
|
||||
|
||||
/**
|
||||
* Macchiato color definitions as hex values.
|
||||
*/
|
||||
const macchiatoHex = Object.entries(palette.macchiato)
|
||||
.reduce((acc, [k, v]) => {
|
||||
acc[k] = `#${v.hex}`;
|
||||
const macchiatoHex = flavors.macchiato.colorEntries
|
||||
.reduce((acc, [identifier, { hex }]) => {
|
||||
acc[identifier] = hex;
|
||||
return acc;
|
||||
}, {} as Record<keyof typeof palette.macchiato, string>);
|
||||
}, {} as Record<ColorName, string>);
|
||||
|
||||
const toIssueLabel = (slug: string | number) => `lbl:${slug}`;
|
||||
|
||||
|
||||
Reference in new issue
Block a user