/** * SvGrid's built-in design-system theme presets (shadcn/ui, Tailwind, Material 3, * Excel, Fluent 2, ...). Each preset carries an explicit light + dark palette; * resolving one (plus a light/dark mode) yields the full `--sg-*` token set that * restyles the whole grid - not just the accent. * * Pure, framework-agnostic data + helpers - safe to import from Node or the * browser. `@svgrid/enterprise`'s Studio layer builds its `ProjectTheme`-aware * wrapper on top of this module instead of keeping its own copy. */ export type ThemeMode = 'light' | 'dark'; /** The core palette for one mode. */ export type ThemePalette = { bg: string; fg: string; muted: string; border: string; headerBg: string; headerFg: string; accent: string; rowAlt: string; rowHover: string; selectionBg: string; /** Inset surface (master-detail region, generated auth pages). Defaults to `headerBg`. */ bgSubtle?: string; /** Underline below the leaf header row, when it should read stronger than a cell border. */ headerBorder?: string; /** Header label color, when it should differ from `headerFg`. */ headerLabel?: string; /** Frozen-column body cells. Without it the grid derives a tint from `headerBg` + `accent`. */ pinnedBg?: string; /** Frozen-column header cells. */ pinnedHeaderBg?: string; /** The 1px line on a pinned column's inside edge. Defaults to `border`. */ pinnedDivider?: string; /** Top/bottom border of pinned ROWS. Defaults to a translucent accent. */ pinnedBorder?: string; /** Drop shadow cast by a pinned column into the scroll area. */ pinnedShadow?: string; /** Errors, destructive actions, invalid cells. */ danger?: string; /** Confirmations, positive deltas. */ success?: string; /** Cautions, pending states, the rating star. */ warning?: string; /** Neutral informational callouts. */ info?: string; /** Focus outline color. Defaults to the preset's accent. */ focusRing?: string; }; export type ThemePreset = { /** Stable id, e.g. used as a CSS file name (`themes/.css`). */ id: string; /** Display name shown on a theme picker. */ name: string; /** Control corner rounding (px). */ radius: number; /** Font stack applied to the app surface. */ font: string; /** Header label typography. Mode-independent, like `radius` and `font`. */ headerType?: { weight?: string; size?: string; transform?: string; tracking?: string; }; light: ThemePalette; dark: ThemePalette; }; /** The built-in theme presets, in gallery order (SvGrid's own theme first). */ export declare const themePresets: ThemePreset[]; /** The default preset (used when nothing is chosen). */ export declare const defaultThemePreset: ThemePreset; /** Look up a preset by id. */ export declare const getThemePreset: (id?: string) => ThemePreset | undefined; /** Resolve the effective `--sg-*` tokens for a preset in a given mode, with an * optional accent override applied. */ export declare function resolveThemeTokens(preset: ThemePreset | undefined, mode: ThemeMode, accentOverride?: string): Record;