import type { PageDensityProp } from "../props/vocabulary/layout.prop.js"; /** * Theme spine — `data-theme` (alias of the legacy `.dark` class). `"system"` is a CHOICE, not a * rendered value: it defers to the OS `prefers-color-scheme` and is what gets persisted, so the * app keeps following the OS tomorrow morning. `data-theme` only ever carries `light` or `dark`. */ export type AppTheme = "light" | "dark" | "system"; /** What `data-theme` actually carries — the resolution of an {@link AppTheme} choice. */ export type ResolvedAppTheme = Exclude; /** Primary-palette preset — `data-brand`. `null` = keep the app's own `--primary`. */ export type AppBrand = "brand" | "crm" | "logistics" | "partner" | "slate" | "dxs"; /** Control / table / spacing density — `data-density` (same vocab as PageContainer). */ export type AppDensity = PageDensityProp; /** Base type size — `data-font-size`; a preset rescales the whole golden scale. */ export type AppFontSize = "sm" | "default" | "lg"; export declare const APP_THEMES: readonly ["light", "dark", "system"]; export declare const APP_BRANDS: readonly ["brand", "crm", "logistics", "partner", "slate", "dxs"]; export declare const APP_DENSITIES: readonly ["compact", "default", "comfortable"]; export declare const APP_FONT_SIZES: readonly ["sm", "default", "lg"]; /** The axes as held by AppProvider. `brand: null` opts out (app token wins). */ export type AppThemeAxes = { theme: AppTheme; brand: AppBrand | null; density: AppDensity; fontSize: AppFontSize; scaling: number | null; }; export declare const isAppTheme: (v: unknown) => v is AppTheme; /** The media query `theme: "system"` follows. */ export declare const PREFERS_DARK_SCHEME_QUERY = "(prefers-color-scheme: dark)"; /** `false` wherever there is no `matchMedia` (SSR, jsdom without the stub) — light is the default. */ export declare function prefersDarkScheme(): boolean; /** * Resolve a stored CHOICE to the value `data-theme` carries. `light`/`dark` pass through * untouched, so a preference stored before `system` existed keeps working. */ export declare function resolveAppTheme(theme: AppTheme): ResolvedAppTheme; export declare const isAppBrand: (v: unknown) => v is AppBrand; export declare const isAppDensity: (v: unknown) => v is AppDensity; export declare const isAppFontSize: (v: unknown) => v is AppFontSize; /** * Write the axis attributes onto a root element (default ``). Pass `brand: null` to remove * `data-brand` so the app's own `--primary` token applies. */ export declare function applyThemeAxes(el: HTMLElement, axes: Partial): void; /** Apply an entity's action palette, including portals. Call the returned cleanup on scope exit. */ export declare function applyPrimaryColor(root: HTMLElement, color: string, foreground?: string | null): () => void;