theme redux

This commit is contained in:
2026-02-05 01:07:22 -05:00
parent 6950deaa88
commit ea9ab4d3f9
25 changed files with 1339 additions and 131 deletions

View File

@@ -1,10 +1,12 @@
import type {
DesktopTheme,
ThemeColors,
ThemeDefinition,
ThemeName,
ThemeToken,
ThemeVariant,
} from "../types/settings"
import type { ColorValue } from "./theme-schema"
// Base theme colors
export const BASE_THEME_COLORS: ThemeColors = {
@@ -63,12 +65,12 @@ export const THEMES_DESKTOP: DesktopTheme = {
warning: "#fab387",
error: "#f38ba8",
success: "#a6e3a1",
layerBackgrounds: {
layer0: "transparent",
layer1: "#181825",
layer2: "#11111b",
layer3: "#0a0a0f",
},
layerBackgrounds: {
layer0: "transparent",
layer1: "#181825",
layer2: "#11111b",
layer3: "#0a0a0f",
},
},
},
{
@@ -150,3 +152,9 @@ export function getDefaultTheme(): ThemeVariant {
(variant) => variant.name === THEMES_DESKTOP.defaultVariant
)!
}
export type ThemeJsonFile = ThemeDefinition
export function isColorReference(value: ColorValue): value is string {
return typeof value === "string" && !value.startsWith("#")
}