import { type VisualTheme } from './theme-library.ts'; import type { ThemeTokens } from '../types.ts'; import { type TemplateCatalog } from './template-catalog.ts'; import { type AdaptationPreferences } from './template-adaptation.ts'; export declare const BRAND_PATH = "onboarding/theme-brand.json"; export declare const SELECTION_PATH = "agent/theme-selection.json"; export declare const THEME_DESIGN_NODES: Set; export declare const themeDependentNode: (node: { id: string; eval: string; }) => boolean; export type BrandColor = { value: string; source: string; confidence: 'explicit' | 'captured'; }; export type BrandContext = { schemaVersion: 1; siteId: string; name: string; logo?: { path: string; hash: string; source: string; }; colors: BrandColor[]; fallback: boolean; }; export type ThemeSelection = { schemaVersion: 1; siteId: string; themeId: string; themeRelease: string; themeHash: string; catalogHash?: string; brandContextHash: string; notes: string; source: 'user-ui' | 'user-chat' | 'agent-delegated' | 'test-simulation'; operationId: string; selectedAt: string; previousSelectionHash: string | null; delegation?: string; adaptation?: AdaptationPreferences; }; export type SelectionStore = { schemaVersion: 1; current: ThemeSelection; history: ThemeSelection[]; }; export declare function themeSelectionEnabled(root: string): boolean; export declare function normalizeBrandColor(value: string): string | undefined; export declare function luminance(color: string): number; export declare function contrast(a: string, b: string): number; /** Repeated action colors, excluding only genuinely achromatic RGB values. */ export declare function colorsFromComputedActions(values: string[], source: string): BrandColor[]; /** Raster-only allowlist with real-path confinement; never embed captured SVG/HTML. */ export declare function logoData(root: string, brand: BrandContext): string | undefined; /** One bounded pass over retained markup: only repeated action/nav color evidence, never photos. */ export declare function colorsFromCapturedHtml(html: string, source: string): BrandColor[]; export declare function ensureBrandContext(root: string): BrandContext; export declare function validateBrand(b: BrandContext): void; export declare function bindTheme(theme: VisualTheme, brand: BrandContext, assets?: NonNullable): { tokens: ThemeTokens; brandAccent: string; cacheKey: string; guide: string; }; export declare function selectionStore(root: string): SelectionStore | undefined; export declare const currentSelectionHash: (root: string) => string | null; export declare function selectionDraft(root: string, id: string, notes: string, source: ThemeSelection['source'], delegation?: string, themeRelease?: string): ThemeSelection; export declare function validateSelection(value: unknown, brand: BrandContext, root?: string): asserts value is ThemeSelection; /** A single atomic document preserves history and makes retries safe even after later revisions. */ export declare function submitSelection(root: string, value: unknown): { selection: ThemeSelection; replay: boolean; }; export declare function selectedThemeContext(root: string): string;