interface JsnviewConfig { showType: boolean; showFoldmarker: boolean; showLen: boolean; collapsed: boolean; maxDepth: number; } export default class Jsnview { private data; private config; private root; /** * Initializes the JSON viewer. * @param {any} data - The JSON data to display. * @param {Partial} options - Configuration options. */ constructor(data: any, options?: Partial); /** * Creates the main container element for the viewer. * @returns {HTMLDivElement} The root element. */ private createRootElement; /** * Binds a single click event listener to the root for event delegation. */ private bindEvents; /** * Renders the initial JSON tree. */ private render; /** * Recursively creates the HTML structure for the JSON data. * @param {any} data - The current piece of data (object, array, primitive). * @param {number} depth - The current nesting depth. * @returns {HTMLElement} The generated HTML element for the data. */ private createTree; /** * Applies syntax highlighting styles to a value element. * @param {HTMLElement} element - The element to style. * @param {any} value - The value to be styled. */ private applyValueStyles; /** * Returns the root DOM element of the viewer. * @returns {HTMLDivElement} */ getElement(): HTMLDivElement; /** * Collapses all collapsible nodes in the tree. */ collapseAll(): void; /** * Expands all collapsible nodes in the tree. */ expandAll(): void; } export {};