/** * Heuristic adherence check: does generated UI code actually use the active * kit's palette, or did the model drift to off-palette hardcoded colors? * * `verifyFiles` is pure over file contents; `runDesignVerify` adds the node-side * file collection (explicit list or a bounded UI-file walk) so the `design` tool * and the WebUI handler share identical rules. For each file it scans color * literals (`#hex`, `oklch()`, `rgb()`) and generic Tailwind color utilities * (`bg-blue-500`), then flags any that don't resolve to a kit token (directly or * via the materialized CSS var / token name). It can't prove adherence — it * surfaces likely drift to steer a correction pass. */ import type { DesignKitTokens } from '../types/design-kit.js'; /** Which design axis a violation belongs to. */ export type DesignAxis = 'color' | 'radius' | 'spacing' | 'type' | 'motion'; export interface DesignViolation { file: string; line: number; snippet: string; reason: string; /** The design axis this drift belongs to. Defaults to 'color' (legacy). */ axis?: DesignAxis; } export interface DesignVerifyReport { filesScanned: number; /** Normalized kit palette (hex). */ palette: string[]; /** Kit color token names (for var/utility matching). */ tokenNames: string[]; violations: DesignViolation[]; /** 0..1 — share of color signals that are on-palette. 1 when no signals. */ score: number; ok: boolean; } /** * Verify a batch of file contents against a kit's (override-applied) tokens. */ export declare function verifyFiles(tokens: DesignKitTokens, files: { path: string; text: string; }[]): DesignVerifyReport; /** * Resolve + read UI files (explicit list, or a bounded walk) and verify them * against a kit's tokens. Shared by the `design` tool and the WebUI handler so * the file-collection rules stay identical. */ export declare function runDesignVerify(projectRoot: string, tokens: DesignKitTokens, explicitFiles?: string[] | undefined): Promise; //# sourceMappingURL=design-verify.d.ts.map