Openstatus
www.openstatus.dev
1export * from "./types";
2import { DEFAULT_ROUNDED_THEME, DEFAULT_THEME } from "./default";
3import { GITHUB_CONTRAST } from "./github-contrast";
4import { SUPABASE } from "./supabase";
5import type { Theme, ThemeMap } from "./types";
6
7// TODO: Add validation to ensure that the theme IDs are unique
8const THEMES_LIST = [
9 DEFAULT_THEME,
10 DEFAULT_ROUNDED_THEME,
11 SUPABASE,
12 GITHUB_CONTRAST,
13] satisfies Theme[];
14
15export const THEMES = THEMES_LIST.reduce<ThemeMap>((acc, theme) => {
16 acc[theme.id as keyof ThemeMap] = theme;
17 return acc;
18}, {} as ThemeMap);
19
20export const THEME_KEYS = THEMES_LIST.map((theme) => theme.id);
21export type ThemeKey = (typeof THEME_KEYS)[number];