/** * Config -- unified project configuration hub. * * Config.make() produces a frozen, FNV-1a content-addressed Config.Shape. * Projection functions are pure — no side effects, no I/O. */ import type { ContentAddress } from './brands.js'; import type { Boundary } from './boundary.js'; import type { Token } from './token.js'; import type { Theme } from './theme.js'; import type { Style } from './style.js'; /** Top-level discriminator for czap primitives: which bucket a declaration belongs to. */ export type PrimitiveKind = 'boundary' | 'token' | 'theme' | 'style'; /** * Vite-plugin slice of a czap {@link Config.Shape}: source directories per * primitive kind, HMR opt-in, environment targeting, and optional WASM hints. */ export interface PluginConfig { readonly dirs?: Partial>; readonly hmr?: boolean; readonly environments?: readonly ('browser' | 'server' | 'shader')[]; readonly wasm?: boolean | { readonly enabled?: boolean; readonly path?: string; }; } /** Astro-integration slice of a czap {@link Config.Shape}. */ export interface AstroConfig { readonly satellite?: boolean; readonly edgeRuntime?: boolean; } /** * Config namespace — the single hub that every czap adapter (Vite, Astro, test * runners, edge runtime) projects from. {@link Config.make} produces a frozen, * FNV-1a content-addressed {@link Config.Shape}; every projection function * (`toViteConfig`, `toAstroConfig`, `toTestAliases`) is pure. */ export declare const Config: { /** Build a frozen, content-addressed {@link Config.Shape} from raw input. */ make(input: Config.Input): Config.Shape; /** Project the Vite-plugin slice of a config for `@czap/vite`. */ toViteConfig(cfg: Config.Shape): PluginConfig; /** Project the Astro-integration slice of a config for `@czap/astro`. */ toAstroConfig(cfg: Config.Shape): AstroConfig; /** Materialize the `@czap/*` → source-path alias map used by the vitest runner. */ toTestAliases(cfg: Config.Shape, repoRoot: string): Record; }; export declare namespace Config { /** Raw user-facing input to {@link Config.make} — every field is optional. */ interface Input { readonly boundaries?: Record; readonly tokens?: Record; readonly themes?: Record; readonly styles?: Record; readonly vite?: Partial; readonly astro?: Partial; } /** Frozen, content-addressed result of {@link Config.make}. */ interface Shape { readonly _tag: 'ConfigDef'; readonly id: ContentAddress; readonly boundaries: Record; readonly tokens: Record; readonly themes: Record; readonly styles: Record; readonly vite?: Partial; readonly astro?: Partial; } } /** Thin alias for {@link Config.make} — matches the `defineConfig(...)` ergonomics other tools use. */ export declare function defineConfig(input: Config.Input): Config.Shape; //# sourceMappingURL=config.d.ts.map