import type { App } from '../App'; import type { Node } from '../Node'; import type { Shadow } from '../types'; import type { UiThemeTokens } from './uiTheme'; /** Canvas UI palette — same fields as `UI`, but mutable after app theme resolve. */ export type UiCanvasTheme = { primary: string; primaryHover: string; primaryActive: string; primarySubtle: string; primaryMuted: string; secondary: string; secondaryHover: string; success: string; successBg: string; warning: string; danger: string; surface: string; surfaceMuted: string; surfaceInset: string; overlay: string; border: string; borderStrong: string; borderFocus: string; text: string; textSecondary: string; textMuted: string; textInverse: string; textPlaceholder: string; radius: number; radiusSm: number; radiusLg: number; radiusFull: number; font: string; fontSize: number; fontSizeSm: number; fontSizeLg: number; controlHeight: number; inputHeight: number; spaceXs: number; spaceSm: number; spaceMd: number; spaceLg: number; spaceXl: number; shadowSm: Shadow; shadowMd: Shadow; shadowLg: Shadow; shadowPrimary: Shadow; }; /** Merge app UI tokens onto canvas defaults. Empty tokens → identical to `UI`. */ export declare function resolveUiCanvasTheme(tokens?: Partial): UiCanvasTheme; /** Sync App-scoped canvas palette (called from App on init / setUiTheme / create). */ export declare function syncActiveCanvasUiTheme(tokens: Partial, app?: App | null): UiCanvasTheme; /** * Current canvas UI palette for builders. * Prefer calling inside a create/refresh (stack); optional `app` uses WeakMap snapshot. */ export declare function getActiveUi(app?: App | null): UiCanvasTheme; /** Run factory/refresh with a fixed palette on the build stack. */ export declare function runWithCanvasUiTheme(theme: UiCanvasTheme, fn: () => R): R; /** Resolve palette for an app instance (does not mutate the active theme). */ export declare function getCanvasUiTheme(app?: App | null): UiCanvasTheme; /** Walk stage and update canvas UI component part colors (per-node uiTheme wins). */ export declare function refreshCanvasUi(root: Node, app?: App | null): void;