/** * World file validator — structural + semantic checks for CAM world JSON files. * * Validates the WorldJSON shape consumed by sceneRenderer / CAM: * - Top-level: scene, characters, objects, dialogs, timeline, variations, animations, filename * - Characters: unique string ids, finite numeric coordinates / dimensions / zIndex * - Timeline: supports BOTH conventions — * * lane-based: [{ characterId, lanes: [{ property, keyframes: [{time, value, easing?}] }] }] * * action-based: [{ time, actions: [{ target, type, parameters }] }] (CAM export style) * - Animations: map of { id, name, frames[] } * - Cross-references: timeline → characters, animation lanes → animations map * - evaluateScene() smoke test (catches malformed timeline that would throw at render time) * * Errors fail validation; warnings are advisory (unknown keys, offscreen positions, etc.). */ export type WorldIssueSeverity = 'error' | 'warning'; export type WorldIssueCategory = 'structure' | 'scene' | 'characters' | 'objects' | 'dialogs' | 'timeline' | 'animations' | 'variations' | 'crossref' | 'evaluate'; export interface WorldIssue { field: string; message: string; severity: WorldIssueSeverity; category: WorldIssueCategory; } export interface WorldValidationResult { /** true only when there are zero errors (warnings are allowed) */ valid: boolean; issues: WorldIssue[]; errors: WorldIssue[]; warnings: WorldIssue[]; checked: { has_scene: boolean; characters: number; objects: number; dialogs: number; timeline_lane_tracks: number; timeline_action_events: number; animations: number; variations: number; top_level_keys: string[]; }; } export interface WorldValidateOptions { /** Run evaluateScene() smoke test at t=0 and max timeline time (default: true) */ evaluate?: boolean; /** Skip strict per-keyframe value-type checks (default: false) */ lenient?: boolean; } /** Structural + semantic validation of a world file (already JSON.parsed). */ export declare function validateWorld(data: unknown, options?: WorldValidateOptions): WorldValidationResult; //# sourceMappingURL=worldValidator.d.ts.map