import { z } from 'zod'; export declare const CURRENT_SCHEMA_VERSION = 4; export declare const ELEMENT_TYPES: readonly ["text", "image", "svg", "line", "figure", "gif", "video", "table", "group"]; /** Non-strict: strips unknown keys, fills defaults. `normalizeDesign` uses this. */ export declare const designSchemaLenient: z.ZodObject<{ schemaVersion: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; unit: z.ZodDefault>; dpi: z.ZodDefault; custom: z.ZodOptional; fonts: z.ZodDefault; styles: z.ZodOptional; fontWeight: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; pages: z.ZodDefault]>>; height: z.ZodDefault]>>; background: z.ZodDefault; bleed: z.ZodDefault; bleedTop: z.ZodOptional; bleedRight: z.ZodOptional; bleedBottom: z.ZodOptional; bleedLeft: z.ZodOptional; custom: z.ZodOptional; duration: z.ZodDefault; children: z.ZodDefault>>>; }, z.core.$strip>>>; audios: z.ZodDefault; src: z.ZodDefault; duration: z.ZodDefault; startTime: z.ZodDefault; endTime: z.ZodDefault; volume: z.ZodDefault; delay: z.ZodDefault; speed: z.ZodDefault; custom: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; /** * Accepted input shape for `normalizeDesign`: a design with every defaultable * field optional (defaults get filled). Use this to type converter builders and * the JSON an exporter accepts before normalization. */ export type DesignInput = z.input; /** * Strict: rejects unknown keys (additionalProperties:false) at every level. * Built with `z.strictObject` at runtime; the cast keeps the lenient leaf types * as the single inferred source (this tree is only ever parsed, never inferred). */ export declare const designSchemaCanonical: z.ZodObject<{ schemaVersion: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; unit: z.ZodDefault>; dpi: z.ZodDefault; custom: z.ZodOptional; fonts: z.ZodDefault; styles: z.ZodOptional; fontWeight: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; pages: z.ZodDefault]>>; height: z.ZodDefault]>>; background: z.ZodDefault; bleed: z.ZodDefault; bleedTop: z.ZodOptional; bleedRight: z.ZodOptional; bleedBottom: z.ZodOptional; bleedLeft: z.ZodOptional; custom: z.ZodOptional; duration: z.ZodDefault; children: z.ZodDefault>>>; }, z.core.$strip>>>; audios: z.ZodDefault; src: z.ZodDefault; duration: z.ZodDefault; startTime: z.ZodDefault; endTime: z.ZodDefault; volume: z.ZodDefault; delay: z.ZodDefault; speed: z.ZodDefault; custom: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; /** * Lenient per-type leaf schemas, used by the compile-time type-drift guard. * `z.infer` is identical whether strict or not, so the non-strict wrapping here * matches the hand-written `./types`. Recursive group/page/design are excluded. */ export declare const leafSchemas: { text: z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodDefault; placeholder: z.ZodDefault; fontSize: z.ZodDefault; fontFamily: z.ZodDefault; fontStyle: z.ZodDefault; fontWeight: z.ZodDefault; textDecoration: z.ZodDefault; textTransform: z.ZodDefault; fill: z.ZodDefault; align: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; verticalAlign: z.ZodDefault; strokeWidth: z.ZodDefault; stroke: z.ZodDefault; strokeLineJoin: z.ZodDefault; lineHeight: z.ZodDefault>; letterSpacing: z.ZodDefault; backgroundEnabled: z.ZodDefault; backgroundColor: z.ZodDefault; backgroundOpacity: z.ZodDefault; backgroundCornerRadius: z.ZodDefault; backgroundPadding: z.ZodDefault; curveEnabled: z.ZodDefault; curvePower: z.ZodDefault; legacyBackground: z.ZodOptional; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; image: z.ZodObject<{ type: z.ZodLiteral<"image">; src: z.ZodDefault; cropX: z.ZodDefault; cropY: z.ZodDefault; cropWidth: z.ZodDefault; cropHeight: z.ZodDefault; cornerRadius: z.ZodDefault; flipX: z.ZodDefault; flipY: z.ZodDefault; clipSrc: z.ZodDefault; borderColor: z.ZodDefault; borderSize: z.ZodDefault; keepRatio: z.ZodDefault; stretchEnabled: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; svg: z.ZodObject<{ type: z.ZodLiteral<"svg">; src: z.ZodDefault; maskSrc: z.ZodDefault; cropX: z.ZodDefault; cropY: z.ZodDefault; cropWidth: z.ZodDefault; cropHeight: z.ZodDefault; keepRatio: z.ZodDefault; stretchEnabled: z.ZodDefault; flipX: z.ZodDefault; flipY: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; borderColor: z.ZodDefault; borderSize: z.ZodDefault; cornerRadius: z.ZodDefault; colorsReplace: z.ZodDefault>; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; line: z.ZodObject<{ type: z.ZodLiteral<"line">; width: z.ZodDefault; height: z.ZodDefault; color: z.ZodDefault; dash: z.ZodDefault>; startHead: z.ZodDefault; endHead: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; figure: z.ZodObject<{ type: z.ZodLiteral<"figure">; subType: z.ZodDefault; fill: z.ZodDefault; dash: z.ZodDefault>; strokeWidth: z.ZodDefault; stroke: z.ZodDefault; cornerRadius: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; gif: z.ZodObject<{ type: z.ZodLiteral<"gif">; duration: z.ZodDefault; keepRatio: z.ZodDefault; src: z.ZodDefault; cropX: z.ZodDefault; cropY: z.ZodDefault; cropWidth: z.ZodDefault; cropHeight: z.ZodDefault; cornerRadius: z.ZodDefault; flipX: z.ZodDefault; flipY: z.ZodDefault; clipSrc: z.ZodDefault; borderColor: z.ZodDefault; borderSize: z.ZodDefault; stretchEnabled: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; video: z.ZodObject<{ type: z.ZodLiteral<"video">; duration: z.ZodDefault; startTime: z.ZodDefault; endTime: z.ZodDefault; volume: z.ZodDefault; speed: z.ZodDefault; src: z.ZodDefault; cropX: z.ZodDefault; cropY: z.ZodDefault; cropWidth: z.ZodDefault; cropHeight: z.ZodDefault; cornerRadius: z.ZodDefault; flipX: z.ZodDefault; flipY: z.ZodDefault; clipSrc: z.ZodDefault; borderColor: z.ZodDefault; borderSize: z.ZodDefault; keepRatio: z.ZodDefault; stretchEnabled: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; width: z.ZodDefault; height: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; blurEnabled: z.ZodDefault; blurRadius: z.ZodDefault; brightnessEnabled: z.ZodDefault; brightness: z.ZodDefault; sepiaEnabled: z.ZodDefault; grayscaleEnabled: z.ZodDefault; filters: z.ZodDefault; }, z.core.$strip>>>; shadowEnabled: z.ZodDefault; shadowBlur: z.ZodDefault; shadowOffsetX: z.ZodDefault; shadowOffsetY: z.ZodDefault; shadowColor: z.ZodDefault; shadowOpacity: z.ZodDefault; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; table: z.ZodObject<{ type: z.ZodLiteral<"table">; width: z.ZodDefault; height: z.ZodDefault; rows: z.ZodDefault; cols: z.ZodDefault; colWidths: z.ZodDefault>; rowHeights: z.ZodDefault>; cells: z.ZodDefault>; text: z.ZodDefault; opacity: z.ZodOptional; rowSpan: z.ZodOptional; colSpan: z.ZodOptional; mergedInto: z.ZodOptional; name: z.ZodOptional; custom: z.ZodOptional; borders: z.ZodOptional; width: z.ZodOptional; style: z.ZodOptional>; }, z.core.$strip>>; right: z.ZodOptional; width: z.ZodOptional; style: z.ZodOptional>; }, z.core.$strip>>; bottom: z.ZodOptional; width: z.ZodOptional; style: z.ZodOptional>; }, z.core.$strip>>; left: z.ZodOptional; width: z.ZodOptional; style: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>>; fontSize: z.ZodOptional; fontFamily: z.ZodOptional; fontWeight: z.ZodOptional; fontStyle: z.ZodOptional; textDecoration: z.ZodOptional; textTransform: z.ZodOptional; fill: z.ZodOptional; align: z.ZodOptional; verticalAlign: z.ZodOptional; lineHeight: z.ZodOptional>; letterSpacing: z.ZodOptional; strokeWidth: z.ZodOptional; stroke: z.ZodOptional; cellBackground: z.ZodOptional; cellPadding: z.ZodOptional; }, z.core.$strip>>>; borderColor: z.ZodDefault; borderWidth: z.ZodDefault; borderStyle: z.ZodDefault>; fontSize: z.ZodDefault; fontFamily: z.ZodDefault; fontWeight: z.ZodDefault; fontStyle: z.ZodDefault; textDecoration: z.ZodDefault; textTransform: z.ZodDefault; fill: z.ZodDefault; align: z.ZodDefault; verticalAlign: z.ZodDefault; lineHeight: z.ZodDefault>; letterSpacing: z.ZodDefault; strokeWidth: z.ZodDefault; stroke: z.ZodDefault; cellBackground: z.ZodDefault; cellPadding: z.ZodDefault; id: z.ZodString; name: z.ZodDefault; custom: z.ZodOptional; x: z.ZodDefault; y: z.ZodDefault; rotation: z.ZodDefault; opacity: z.ZodDefault; animations: z.ZodDefault; duration: z.ZodDefault; enabled: z.ZodDefault; type: z.ZodEnum<{ enter: "enter"; exit: "exit"; loop: "loop"; }>; name: z.ZodDefault; data: z.ZodDefault; }, z.core.$strip>>>; visible: z.ZodDefault; draggable: z.ZodDefault; resizable: z.ZodDefault; selectable: z.ZodDefault; removable: z.ZodDefault; contentEditable: z.ZodDefault; styleEditable: z.ZodDefault; alwaysOnTop: z.ZodDefault; showInExport: z.ZodDefault; }, z.core.$strip>; font: z.ZodObject<{ fontFamily: z.ZodString; url: z.ZodDefault; styles: z.ZodOptional; fontWeight: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; audio: z.ZodObject<{ id: z.ZodString; name: z.ZodDefault; src: z.ZodDefault; duration: z.ZodDefault; startTime: z.ZodDefault; endTime: z.ZodDefault; volume: z.ZodDefault; delay: z.ZodDefault; speed: z.ZodDefault; custom: z.ZodOptional; }, z.core.$strip>; }; export interface ValidationError { path: string; message: string; } export interface ValidationResult { valid: boolean; errors: ValidationError[]; } export interface ValidateOptions { mode?: 'partial' | 'canonical'; } export declare function cloneDropNulls(value: any): any; export declare function validateDesign(input: unknown, opts?: ValidateOptions): ValidationResult; export declare function assertValidDesign(input: unknown, opts?: ValidateOptions): void; /** * Validate AND normalize in a single schema pass (safeParse both raises the * same DESIGN_INVALID as `assertValidDesign` and returns the defaults-filled * result). The only other copy on this path is the one `migrateDesign` makes, * which parseDesign reuses as its working copy rather than cloning again. * For canonical mode the single pass is equally faithful: input that passes * the strict schema has no unknown keys, so its parse result equals the * lenient one. */ export declare function parseValidDesign(input: unknown, opts?: ValidateOptions): unknown;