/**
 * @file tokens.ts
 * @input DefinedTheme objects and token names
 * @output Server-safe token helpers for resolving theme values and building CSS var references
 * @position Public theme utility; backs useTheme and external styling-library adapters
 *
 * Use these helpers when code outside React hooks needs Astryx token values:
 * build-time theme adapters, chart configuration, canvas/SVG rendering, tests,
 * or plain JS theme objects for other styling libraries.
 *
 * Derived tokens can reference other tokens (`var(--color-accent)`) and use CSS
 * color functions (`color-mix`). The resolver follows those references through
 * the theme iteratively and evaluates the supported color functions so callers
 * receive concrete raw values, not CSS expressions.
 *
 * SYNC: When modified, update:
 * - /packages/core/src/theme/useTheme.ts
 * - /packages/core/src/theme/index.ts
 */
import { type DefinedTheme, type TokenName } from './defineTheme';
/** Resolved color mode used when choosing the side of light/dark token values. */
export type ResolvedThemeMode = 'light' | 'dark';
/** Options for resolving all tokens from a theme object. */
export interface ResolveThemeTokensOptions {
    /** Effective mode to resolve. Pass an explicit value; this helper does not read media queries. */
    mode: ResolvedThemeMode;
}
/** Options for resolving one token from a theme object. */
export interface ResolveThemeTokenOptions extends ResolveThemeTokensOptions {
    /** Value to return when the token name is unknown. Defaults to an empty string. */
    fallback?: string;
}
/**
 * Return a CSS custom property reference for an Astryx token name.
 *
 * Useful for non-StyleX styling-library configs (Panda, Chakra, MUI,
 * Emotion, styled-components, UnoCSS, CSS Modules) where the value should
 * stay connected to the active Astryx theme through the CSS cascade.
 *
 * @example
 * ```ts
 * const theme = {
 *   colors: {
 *     text: tokenVar('--color-text-primary'),
 *     surface: tokenVar('--color-background-surface'),
 *   },
 * };
 * ```
 */
export declare function tokenVar(name: TokenName | (string & {})): string;
/** Flat map of every known Astryx token name to its `var(--token-name)` reference. */
export declare const tokenVars: Record<TokenName, string>;
/**
 * Resolve all Astryx token values for a theme and effective color mode.
 *
 * The result starts with `tokenDefaults`, applies `theme.tokens`, then
 * reapplies `theme.__inputTokens` when available so explicit tuple overrides
 * retain their original light/dark sides instead of relying on CSS parsing.
 * A final pass resolves any `var()` references between tokens and evaluates
 * the CSS color functions the theme generator emits (e.g. `color-mix`), so
 * derived tokens like `--color-text-accent` return concrete values rather than
 * `var(--color-accent)`. This mirrors the token resolution used by
 * `useTheme()` but does not need React context or media queries.
 *
 * Pass `theme` as null/undefined to resolve defaults only.
 */
export declare function resolveThemeTokens(theme: DefinedTheme | null | undefined, options: ResolveThemeTokensOptions): Record<string, string>;
/** Resolve one Astryx token value for a theme and effective color mode. */
export declare function resolveThemeToken(theme: DefinedTheme | null | undefined, name: TokenName | (string & {}), options: ResolveThemeTokenOptions): string;
//# sourceMappingURL=tokens.d.ts.map