/** * Orientation-neutral helpers shared by the horizontal and vertical * hierarchical categorical axes. Both axis painters specialize on top of * this core; the only thing they disagree on is where bracket lines and * leaf labels land on the plot chrome. */ /** * One run of consecutive equal dictionary indices in a level's `indices` * array, with the label pre-resolved. Used by the outer-level bracket * renderer to coalesce a span of contiguous cells into a single labelled * group. */ export interface GroupRun { startIdx: number; /** * Inclusive. */ endIdx: number; label: string; } /** * Single-pass run-length encoding of `indices[startRow..endRow)` keyed * by `dictionary`. Relies on perspective's guarantee that rows sharing * an outer-level dictionary entry are emitted contiguously in traversal * order — equal neighbours always belong to the same span. The emitted * `label` is a direct reference into `dictionary` (no per-row copy). */ export declare function buildGroupRuns(indices: Int32Array | ArrayLike, dictionary: string[], startRow: number, endRow: number): GroupRun[]; /** * Longest string length in a dictionary. O(dictSize), not O(numRows). * Drives the rotation decision on the leaf level of the X axis and the * column-width decision on the Y axis. */ export declare function maxDictLength(dictionary: string[]): number; /** * Filter a precomputed `runs` array to those whose index range * intersects `[visMin, visMax]` (inclusive on both sides). Runs that * straddle an endpoint are clipped so the caller sees `startIdx`/ * `endIdx` pinned to the visible slice — this matches the legacy * `buildGroupRuns(indices, visMin, visMax + 1)` return shape. */ export declare function runsInRange(runs: GroupRun[], visMin: number, visMax: number): GroupRun[];