/** * Token CSS Compiler -- `TokenDef` to CSS custom properties + `@property` registrations. * * Emits `:root` fallbacks, `@property` declarations for animatable tokens, * and themed overrides via `html[data-theme]` selectors. * * @module */ import type { Token, Theme } from '@czap/core'; /** * Output of {@link TokenCSSCompiler.compile}. * * `properties` is the list of CSS custom property names emitted for this * token (usually one). `customProperties` bundles any `@property` * registrations and the `:root` fallback block. `themed` contains * per-variant override blocks derived from an optional theme. */ export interface TokenCSSResult { /** CSS custom property names emitted for this token. */ readonly properties: readonly string[]; /** `@property` registrations plus the `:root { … }` fallback block. */ readonly customProperties: string; /** `html[data-theme="…"]` override blocks (empty when no theme supplied). */ readonly themed: string; } /** * Compile a single {@link Token.Shape} into CSS custom property definitions. * * Emits any applicable `@property` registration, the `:root` fallback, and * (when a `theme` is supplied) per-variant override selectors. */ declare function compile(token: Token.Shape, theme?: Theme.Shape): TokenCSSResult; /** * Token CSS compiler namespace. * * Compiles a single {@link Token.Shape} into its CSS custom property * definitions (with optional `@property` registration for animatable * values) and, when a theme is supplied, the per-variant override blocks. */ export declare const TokenCSSCompiler: { /** Compile a token (optionally with theme overrides) into CSS. */ readonly compile: typeof compile; }; export {}; //# sourceMappingURL=token-css.d.ts.map