/** The deepest level opened by the guarded default; deeper nodes start collapsed. */ export declare const AUTO_EXPAND_DEPTH = 1; /** * The deepest level EXPAND-ALL reaches. Past it a node opens only on an explicit * click, so the one action that opens the whole tree still cannot force an * unbounded-depth payload into the DOM in a single stroke. */ export declare const MAX_AUTO_DEPTH = 6; /** Children rendered per page; the rest wait behind a "show more" control. */ export declare const PAGE_SIZE = 100; /** * The most rendered nodes EXPAND-ALL may auto-open in one stroke. The depth cap and * the per-page limit each bound ONE dimension, but a payload that is wide AND deep * multiplies them — auto-opening every node up to the cap would lay out on the order * of PAGE_SIZE^depth nodes and freeze the tab. Expand-all instead opens containers * breadth-first only until this budget is spent; a node past it stays collapsed and * opens on an explicit click, so a huge payload opens a bounded, usable subset. */ export declare const AUTO_EXPAND_NODE_BUDGET = 1500; /** Whether a value is a disclosure (object or array) rather than a leaf. */ export declare function isContainer(value: unknown): boolean; /** A container's child count, without materializing its entries. */ export declare function containerCount(value: unknown): number; /** * The first `end` entries of a container, arrays keyed by index and objects by * key. Only the visible window is materialized, so a million-element array's * children never all exist at once. */ export declare function sliceEntries(value: unknown, end: number): [string, unknown][]; /** One container's summary text: its kind and its child count. */ export declare function containerSummary(value: unknown, count: number): string; /** * A child's identity for the open-state map. Each segment is percent-encoded, so a * key that itself contains the separator cannot collide with a different path. */ export declare function childPath(parent: string, name: string): string; /** The default open state a call site's `defaultExpanded` selects. */ export type Baseline = 'depth' | 'expanded' | 'collapsed'; export declare function initialBaseline(defaultExpanded: boolean | undefined): Baseline; /** * The set of paths EXPAND-ALL auto-opens: a breadth-first sweep that opens each * container in turn — spending its visible child count against a shared node budget * and enqueuing that page's own container children — skipping any node whose page * would overspend {@link AUTO_EXPAND_NODE_BUDGET} or that sits past {@link MAX_AUTO_DEPTH}. * Only a bounded window of a huge payload is materialized, so this stays cheap even * when the data is enormous; the paths it omits stay collapsed and open on a click. */ export declare function expandedOpenPaths(root: unknown): ReadonlySet; /** * Whether a node is open, from the baseline and the reader's own toggles. An * explicit toggle always wins; otherwise the baseline decides — the depth-guarded * default opens through {@link AUTO_EXPAND_DEPTH}, expand-all opens the budgeted * breadth-first set, collapse-all opens nothing. */ export declare function computeOpen(baseline: Baseline, overrides: ReadonlyMap, expandedPaths: ReadonlySet | null, path: string, depth: number): boolean; //# sourceMappingURL=json-tree-model.d.ts.map