/** * Input bounds. * * Bounds are checked before schema validation so an absurd document fails fast * and cheaply. Every limit is application-level and deliberately far below any * platform limit, because the same code runs in a CLI, in a library caller, and * inside a worker with a bounded memory budget and a request-size ceiling. */ import { type DiagnosticBag } from '../diagnostics.js'; export declare const LIMITS: { /** Nesting depth of the raw document, root included. */ readonly maxDepth: 24; /** Entries in any `blocks` array, and total authored blocks. */ readonly maxBlocks: 200; /** Objects in the document, anywhere (props objects and list items included). */ readonly maxNodes: 20000; /** Serialized size of the whole document. */ readonly maxSerializedBytes: 1000000; /** Items in any single list. */ readonly maxListItems: 200; /** Keys in an open-keyed map such as `state`. */ readonly maxMapKeys: 200; /** Length of a single-line string. */ readonly maxStringLength: 2000; /** Length of multiline text. */ readonly maxTextLength: 50000; /** Named datasets; enforced with the dataset's path by `validateDatasets`. */ readonly maxDatasets: 20; /** Rows in one dataset or inline `data` list. */ readonly maxDatasetRows: 200; /** Distinct fields across one dataset's rows. */ readonly maxDatasetFields: 32; }; export interface BoundsReport { blocks: number; nodes: number; depth: number; bytes: number; longestString: number; largestList: number; } /** * Measure a raw document and report every exceeded bound. * * The walk is bounded even when the input is not: exceeding a limit stops * descending at that branch instead of continuing to allocate diagnostics. */ export declare function checkBounds(value: unknown, bag: DiagnosticBag): BoundsReport; //# sourceMappingURL=bounds.d.ts.map