/** * Nebula Core default theme tokens. * @type {{ * colors: Record, * spacing: Record, * radius: Record, * typography: Record, * motion: Record * }} */ export const baseTheme = { colors: { background: "#0b0d12", surface: "#161a22", accent: "#5b7cff", text: "#f5f7ff", textMuted: "#b7c0d8", focus: "#8ddcff", danger: "#ff6363" }, spacing: { xs: 4, sm: 8, md: 16, lg: 24, xl: 32, xxl: 48 }, radius: { sm: 6, md: 10, lg: 16, pill: 999 }, typography: { caption: 12, body: 16, title: 22, display: 32 }, motion: { fast: 120, base: 200, slow: 320 } }; /** * Merge theme overrides with the Nebula base tokens. * @param {Partial} overrides * @returns {typeof baseTheme} */ export function createTheme(overrides = {}) { return { colors: { ...baseTheme.colors, ...overrides.colors }, spacing: { ...baseTheme.spacing, ...overrides.spacing }, radius: { ...baseTheme.radius, ...overrides.radius }, typography: { ...baseTheme.typography, ...overrides.typography }, motion: { ...baseTheme.motion, ...overrides.motion } }; }