import { TreemapNodeData } from './treemapTypes'; /** * Represents a positioned rectangle in the treemap layout. * x0, y0 = top-left corner; x1, y1 = bottom-right corner. * Children are nested rects laid out inside this rect. */ export interface TreemapRect { x0: number; y0: number; x1: number; y1: number; node: TreemapNodeData; children?: TreemapRect[]; } interface ComputeTreemapLayoutOptions { svgMode?: boolean; showSubdivisions?: boolean; } /** Pointer target padding that lets adjacent nodes each own half of the visual gap. */ declare const HOVER_TARGET_PADDING: number; /** Height reserved for the parent header label */ declare const HEADER_HEIGHT = 22; /** Border radius for all rects */ declare const BORDER_RADIUS = 2; /** * Minimum area (px) a leaf must be allocated for it to reach MIN_LEAF_DIM on * its shortest side. Accounts for gap inset and worst-case squarify aspect * ratio (~4:1): shortSide = sqrt(area / 4), so area >= (dim+gap)^2 * 4. */ declare const MIN_LEAF_AREA: number; /** * Computes the full nested treemap layout for a given node's children. * Nested subdivisions are opt-in; otherwise only the current node's direct * children are laid out. When the total descendant count exceeds * SVG_NODE_LIMIT, nesting is disabled so parents render as solid blocks. */ export declare const computeTreemapLayout: (node: TreemapNodeData, width: number, height: number, options?: ComputeTreemapLayoutOptions | boolean) => TreemapRect[]; export interface CollapsedTreemapNodeResult { node: TreemapNodeData | null; collapsedCount: number; tooManySameSizeNodes: boolean; } /** * Collapses small tail nodes into a synthetic "N others" node so all data is * represented in one treemap without pagination. */ export declare const getCollapsedTreemapNode: (currentNode: TreemapNodeData | null | undefined, width: number, height: number, sortedChildren: TreemapNodeData[]) => CollapsedTreemapNodeResult; export { HEADER_HEIGHT, BORDER_RADIUS, MIN_LEAF_AREA, HOVER_TARGET_PADDING }; //# sourceMappingURL=treemapLayout.d.ts.map