Files
andrew 987ff560f5 Add initial Nebula Core packages and docs
Import initial monorepo structure for Nebula Core: add packages (@nebula/core, core-glyphs, core-input, core-navigation, core-theme, core-ui, core-utils) with source, dist, tests and assets. Expand README with overview, quick start and API snippets, and add package-level documentation files. Add jsconfig.json for path mapping, package.json and lockfiles to bootstrap the repo. This commit sets up the project layout, docs, and local package links for further development.
2026-01-31 22:57:16 +13:00

62 lines
1.2 KiB
JavaScript

/**
* Nebula Core default theme tokens.
* @type {{
* colors: Record<string, string>,
* spacing: Record<string, number>,
* radius: Record<string, number>,
* typography: Record<string, number>,
* motion: Record<string, number>
* }}
*/
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<typeof baseTheme>} 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 }
};
}