import { ReactElement } from 'react'; import { ChartSnapshot } from '../chart-context'; import { GeometrySegment, SeriesGeometry } from '../engine/geometry'; export interface RunoffEdges { /** Plot edge to extend the first segment to, when the data starts at the scale start. */ left?: number; /** Plot edge to extend the last segment to, when the data ends at the scale end. */ right?: number; dataStart: number; dataEnd: number; } /** * Lines and areas continue flat from the first and last observations to the plot edges. * Only when the data starts and ends at the inset scale bounds: a missing first or last * observation stays a visible gap rather than being bridged. */ export declare function runoffEdges(snapshot: ChartSnapshot, geometry: SeriesGeometry): RunoffEdges | null; /** Which edges a segment extends to: the first segment reaches left, the last reaches right. */ export declare function segmentEdges(edges: RunoffEdges | null, index: number, count: number): { left?: number; right?: number; }; type Edges = { left?: number; right?: number; }; /** One continuous line path, so the extension meets the curve without a seam. */ export declare function extendLinePath(segment: GeometrySegment, edges: Edges): string; /** * One continuous area outline. Area paths trace the upper line forward and the lower boundary * back, so the extension adds flat runs at both ends of each boundary. */ export declare function extendAreaPath(segment: GeometrySegment, edges: Edges): string; /** * A mask ID that changes with the fade geometry. Chrome can keep painting a stale, empty mask * after the gradient inside it changes; a new ID forces a fresh mask on every geometry change. */ export declare function runoffMaskId(base: string, snapshot: ChartSnapshot, edges: RunoffEdges): string; /** * A soft horizontal fade over the extensions only: full strength across the data, * easing toward the plot edges. */ export declare function RunoffFade({ id, snapshot, edges, }: { id: string; snapshot: ChartSnapshot; edges: RunoffEdges; }): ReactElement; export {};