import type { SceneNode, LineSceneNode, AreaSceneNode, PointSceneNode, RectSceneNode, HeatcellSceneNode, Style, StreamScales, CurveType } from "./types";
import type { Datum } from "../charts/shared/datumTypes";
export declare function buildLineNode(data: Datum[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, style: Style, group?: string): LineSceneNode;
export declare function buildAreaNode(data: Datum[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, baselineY: number, style: Style, group?: string, y0Get?: (d: Datum) => number): AreaSceneNode;
/** Per-group-per-x stacked top values, keyed by group then x */
export type StackedTops = Map<string, Map<number, number>>;
export type StackBaseline = "zero" | "wiggle" | "silhouette";
/**
 * Compute per-x stack baseline offsets. Shared between scene rendering
 * (`buildStackedAreaNodes`) and extent computation (`PipelineStore`) so
 * both see the same y-bounds — without this, the wiggle offset's
 * accumulated drift can exceed `±total/2` and clip against a too-small
 * y-domain.
 *
 * Inputs:
 *   xValues   — sorted unique x values
 *   groupKeys — group keys in stacking order (same order both callers use)
 *   valueAt   — (groupKey, x) → group's value at x (0 if absent)
 */
export declare function computeStackOffsets(xValues: number[], groupKeys: string[], valueAt: (groupKey: string, x: number) => number, baseline: StackBaseline): Map<number, number>;
export declare function buildStackedAreaNodes(groups: {
    key: string;
    data: Datum[];
}[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, styleFn: (group: string, sampleDatum?: Datum) => Style, normalize?: boolean, curve?: CurveType, baseline?: StackBaseline): {
    nodes: AreaSceneNode[];
    stackedTops: StackedTops;
};
export declare function buildPointNode(datum: Datum, scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, r: number, style: Style, pointId?: string): PointSceneNode | null;
export declare function buildRectNode(x: number, y: number, w: number, h: number, style: Style, datum: any, group?: string): RectSceneNode;
export declare function buildHeatcellNode(x: number, y: number, w: number, h: number, fill: string, datum: any, options?: {
    value?: number;
    showValues?: boolean;
    valueFormat?: (v: number) => string;
}): HeatcellSceneNode;
export interface SceneGraphData {
    nodes: SceneNode[];
    version: number;
}
export declare function createSceneGraph(): SceneGraphData;
export declare function updateSceneGraph(scene: SceneGraphData, nodes: SceneNode[]): SceneGraphData;
