/**
 * Resolve a CSS custom property value to a concrete color string.
 *
 * If the input is a `var(--name)` or `var(--name, fallback)` string,
 * reads the computed value from the canvas element. Otherwise returns
 * the input unchanged.
 *
 * Per-canvas cache avoids repeated `getComputedStyle` calls. Cached entries
 * are tagged with a global version counter that's bumped whenever a theme
 * change is detected — either through `clearCSSColorCache()` (called by
 * Stream Frames on `currentTheme` change) or via the global observer below
 * (catches external class toggles on `<html>` and `prefers-color-scheme`
 * media-query changes that bypass React).
 */
export declare function resolveCSSColor(ctx: CanvasRenderingContext2D, value: string | undefined): string | undefined;
/**
 * Invalidate the CSS variable cache. Stream Frames call this from their
 * `currentTheme` `useEffect` so the next paint reads fresh computed values.
 *
 * The `canvas` argument is accepted for backward compatibility but ignored —
 * invalidation is global because theme changes are global.
 */
export declare function clearCSSColorCache(_canvas?: HTMLCanvasElement): void;
/**
 * Test-only: reset all cache state, including disconnecting any installed
 * observer/matchMedia listeners. Required for test isolation — without it,
 * observers accumulate across files and bump `currentVersion` more than once
 * per real DOM mutation.
 *
 * `currentVersion` is *incremented* (not reset to zero) so any WeakMap entries
 * that survive from a previous test can't accidentally be re-validated by a
 * version collision.
 */
export declare function _resetCSSColorCacheForTest(): void;
