import { MotionValue } from 'motion/react'; import { ChartAxis, ChartAxisStyle, ChartHoverStyle } from '../types'; /** Visual center of x tick labels below the plot; pills center on the same line. */ export declare const X_LABEL_CENTER = 22; /** The inspection pill positions, shared so axis labels can react to the approaching pill. */ export interface AxisCursor { /** Center of the x pill, which stays inside the plot near its edges. */ x: MotionValue; /** The inspected position itself, for marks that must line up with the crosshair. */ pointerX: MotionValue; /** * The inspected column, unsprung: it jumps to each observation the moment it is read, in step * with the bars that light up, for marks that snap to a column rather than glide. */ columnX: MotionValue; /** * The color of the inspected column's mark: the hovered series' bar, or a candle's direction. * Empty until a column is read; it keeps the last color while the band fades out. */ columnColor: MotionValue; y: MotionValue; /** 1 while this chart owns an inspection with pills on its axes, else 0. */ active: MotionValue; /** 1 while any reading is shown, whatever the readout, else 0. */ inspecting: MotionValue; /** The preset each axis uses. */ axis: ResolvedAxis; pill: ChartHoverStyle; /** Padding between the plot edges and axis labels or pills, for plots that run edge to edge. */ inset: number; /** Continue lines and areas, faded, from the first and last observations to the plot edges. */ runoff: boolean; /** How far edge labels may hang past the plot edges to stay centered on their ticks. */ overhang: number; /** Where the value pill sits: on the y axis, or above the hovered mark. */ pillPosition: 'axis' | 'mark'; } export declare const AxisCursorContext: import('react').Context; export declare function useAxisCursor(): AxisCursor; /** 1 when far from the pill, easing to 0 when the pill is on top of the label. */ export declare function proximityOpacity(distance: number, reach: number, active: number): number; /** The preset each axis uses, and a segmented axis's color scale. */ export interface ResolvedAxis { x: ChartAxisStyle; y: ChartAxisStyle; xGradient?: boolean | readonly string[]; yGradient?: boolean | readonly string[]; } /** Split an `axis` prop into one preset per axis. An axis left out is `minimal`. */ export declare function resolveAxis(axis: ChartAxis | undefined): ResolvedAxis; /** * Y axes that keep their labels in a gutter beside the plot: classic, segmented, and dots, whose * labels lead into the plot along a dotted line. */ export declare function hasYGutter(style: ChartAxisStyle): boolean; /** Pills sit on the y axis when it has labels, and above the hovered mark when it does not. */ export declare function resolvePillPosition(position: 'auto' | 'axis' | 'mark', style: ChartAxisStyle): 'axis' | 'mark';