import type { Project } from "@uxloom/journeygraph"; /** A screen×state frame recovered from a design export. */ export interface DesignFrame { screen: string; state: string; journey?: string; /** Where it was found: manifest entry, or a file path relative to the export root. */ source: string; } export interface DesignAuditFinding { code: "design-screen-unmapped" | "design-state-missing" | "design-frame-unmapped"; severity: "error" | "warning"; screen?: string; state?: string; journey?: string; message: string; fix: string; } export interface DesignAuditResult { frames: DesignFrame[]; findings: DesignAuditFinding[]; /** A draft `{ screens }` fragment for frames not in the contract (R28 --scaffold). */ scaffold: { screens: Array<{ id: string; requiredStates: string[]; designedStates: string[]; }>; }; summary: { screens: number; requiredStates: number; framesFound: number; coveredStates: number; missingStates: number; unmappedScreens: number; unmappedFrames: number; }; } /** * Parse a design export (file or directory) into frames. A manifest, if * present at `/index.json`, is authoritative and short-circuits parsing. * Frames are de-duplicated by screen×state and returned in deterministic order. */ export declare function parseDesignExport(path: string): DesignFrame[]; /** Diff a design's frame coverage against the contract. Pure and deterministic. */ export declare function auditDesign(project: Project, frames: DesignFrame[]): DesignAuditResult;