import type { HTMLAttributes } from "react";
/**
* JsonViewer — read-only collapsible JSON tree, dependency-free.
*
* Collapse: `collapsed` mirrors the SOTA contract — `true` collapses every
* node, a number collapses everything at depth >= N (root is depth 0).
* Collapsed subtrees are NOT rendered (lazy): that is the performance guard —
* a huge payload fully expanded is the consumer's responsibility (ADR D1);
* prefer `collapsed={1}` for large payloads.
*
* Safety: circular references render a "[Circular]" marker (and serialize as
* such on copy) instead of overflowing the stack. Copy limitation: the
* serializer conservatively marks REPEATED (shared, non-circular) references
* as "[Circular]" too — output is always JSON.parse-able — the studied SOTA reference
* does not handle this. BigInt renders with the `n` suffix; NaN/Infinity
* follow JSON semantics on copy (null).
*
*
*/
interface JsonViewerProps extends Omit, "children"> {
/** Data to render. Any value — objects, arrays, primitives, BigInt, Date. */
value: unknown;
/** true = all collapsed; number = collapse at depth >= N. Default: all expanded. */
collapsed?: boolean | number;
/** Truncate strings longer than this (click to reveal). Default 60. */
shortenTextAfterLength?: number;
/** Show a copy button on the root and on object/array nodes. */
enableCopy?: boolean;
}
declare const JsonViewer: import("react").ForwardRefExoticComponent>;
export { JsonViewer };
export type { JsonViewerProps };