/** * Theme customization constants and types. * * Lives in `lib/` (not `context/`) so it can be imported alongside the * provider without breaking React Fast Refresh boundaries. */ export const THEME_PRESETS = [ { value: 'default', name: 'Default', swatches: ['oklch(0.13 0 0)', 'oklch(0.95 0 0)'], }, { value: 'underground', name: 'Underground', swatches: ['oklch(0.5315 0.0694 156.19)', 'oklch(0.5748 0.0862 336.52)'], }, { value: 'rose-garden', name: 'Rose Garden', swatches: ['oklch(0.5827 0.2418 12.23)', 'oklch(0.8131 0.1129 5.67)'], }, { value: 'lake-view', name: 'Lake View', swatches: ['oklch(0.765 0.177 163.22)', 'oklch(0.551 0.0899 200.52)'], }, { value: 'sunset-glow', name: 'Sunset Glow', swatches: ['oklch(0.5591 0.1882 25.33)', 'oklch(0.7938 0.1248 42.42)'], }, { value: 'forest-whisper', name: 'Forest Whisper', swatches: ['oklch(0.5276 0.1072 182.22)', 'oklch(0.5236 0.0505 250.18)'], }, { value: 'ocean-breeze', name: 'Ocean Breeze', swatches: ['oklch(0.5461 0.2152 262.88)', 'oklch(0.5854 0.2041 277.12)'], }, { value: 'lavender-dream', name: 'Lavender Dream', swatches: ['oklch(0.5709 0.1808 306.89)', 'oklch(0.811 0.0589 201.14)'], }, ] as const export type ThemePreset = (typeof THEME_PRESETS)[number]['value'] export type ThemeRadius = 'default' | 'none' | 'sm' | 'md' | 'lg' | 'xl' export type ThemeScale = 'default' | 'sm' | 'lg' export type ContentLayout = 'full' | 'centered' export type ThemeCustomization = { preset: ThemePreset radius: ThemeRadius scale: ThemeScale contentLayout: ContentLayout } export const DEFAULT_THEME_CUSTOMIZATION: ThemeCustomization = { preset: 'default', radius: 'default', scale: 'default', contentLayout: 'full', } export const THEME_PRESET_VALUES = new Set( THEME_PRESETS.map((p) => p.value) ) as ReadonlySet export const THEME_RADIUS_VALUES: ReadonlySet = new Set([ 'default', 'none', 'sm', 'md', 'lg', 'xl', ]) export const THEME_SCALE_VALUES: ReadonlySet = new Set([ 'default', 'sm', 'lg', ]) export const CONTENT_LAYOUT_VALUES: ReadonlySet = new Set([ 'full', 'centered', ]) export const THEME_COOKIE_KEYS = { preset: 'theme_preset', radius: 'theme_radius', scale: 'theme_scale', contentLayout: 'theme_content_layout', } as const