import type { Context2D } from "../canvas-types"; import { PlotLayout } from "../../layout/plot-layout"; import type { Theme } from "../../theme/theme"; import type { CategoricalDomain } from "../../axis/categorical-axis"; interface LevelTickLayout { size: number; } export interface CategoricalYAxisOptions { /** * Drop the innermost level of the domain before rendering, promoting * the second-to-last level into the leaf position. Used by the * heatmap, whose column names encode `split…|aggregate` — with a * single aggregate the leaf level is a redundant constant column, * and showing the last split as the leaf reads more naturally. * * No-op when `levels.length <= 1` (there's nothing left to promote); * the axis renders nothing in that case. */ skipLeafLevel?: boolean; } /** * Map a Y category index to a pixel y-coordinate. Matches the convention * chosen for the heatmap plot: yIdx=0 sits at the *bottom* (math Y-up), * so a higher yIdx maps to a lower pixel value via `dataToPixel`'s * standard (1 - t) flip. */ export declare function categoryIndexToPixelY(layout: PlotLayout, index: number): number; /** * Per-level widths for a vertical categorical axis. Leaf width is * derived from the longest label in that level's dictionary; outer * levels get a fixed narrow column for the bracket + short text. */ export declare function measureCategoricalYLevels(domain: CategoricalDomain, opts?: CategoricalYAxisOptions): LevelTickLayout[]; /** * Total CSS-pixel width required for the categorical tick band (levels), * NOT including the per-axis-label allowance. Caller feeds this to * `PlotLayout` as `leftExtra`; the axis label is added via `hasYLabel`. */ export declare function measureCategoricalAxisWidth(domain: CategoricalDomain, opts?: CategoricalYAxisOptions): number; /** * Render hierarchical Y-axis tick marks, leaf labels, and outer-level * bracket labels on the chrome canvas. The axis line is drawn by the * caller alongside the X axis. */ export declare function renderCategoricalYTicks(ctx: Context2D, layout: PlotLayout, domain: CategoricalDomain, theme: Theme, opts?: CategoricalYAxisOptions): void; export {};