import type { LiveChartPoint, Marker, SeriesConfig } from "../types"; /** Screen-space position for one marker, index-aligned with the marker array. */ export interface ProjectedMarker { x: number; y: number; visible: boolean; /** Collapsed cluster member that the representative stands in for — not drawn, * not hit-tested. Set by the cluster pass; `false` outside `markerCluster`. */ hidden: boolean; /** This marker is the representative (count badge) of a collapsed cluster. */ isGrouped: boolean; /** Size of the collapsed cluster this marker represents (`0` when not grouped). */ groupCount: number; /** Index of the cluster's representative marker for collapsed members (and the * representative itself), else `-1`. Used to gather members on tap. */ groupRep: number; } export interface ProjectMarkersOpts { canvasWidth: number; canvasHeight: number; padTop: number; padBottom: number; padLeft: number; padRight: number; timestamp: number; displayWindow: number; displayMin: number; displayMax: number; /** Multi-series data, used to anchor markers by `seriesId`. */ series?: SeriesConfig[]; /** Single-series line data; anchors markers that omit `value` (and `seriesId`). */ lineData?: LiveChartPoint[]; /** When the single-series line is drawn with `line.curve === "linear"`, anchor * `lineData` markers on the straight chord (linear interpolation) instead of the * monotone spline so the glyph sits exactly on the rendered line. Multi-series * markers read their curve per-series from {@link SeriesConfig.curve}. */ lineLinear?: boolean; } /** * Project markers to screen positions, mutating `out` in place (reused buffer). * y comes from `value` (absolute) or, failing that, from interpolating the * `seriesId` series' data at the marker's time. Returns `out`. */ export declare function projectMarkers(markers: Marker[], out: ProjectedMarker[], opts: ProjectMarkersOpts): ProjectedMarker[]; /** * Project a single marker by its anchor fields, returning a fresh * `ProjectedMarker`. Used per-glyph at render so each glyph owns its position * (no shared index buffer → no flicker when the marker array reorders). */ export declare function projectPoint(time: number, value: number | undefined, seriesId: string | undefined, opts: ProjectMarkersOpts): ProjectedMarker; /** Stable signature over marker id / kind / color / icon / size / image-presence * (snapshot sync, not per-tick). */ export declare function markersSignature(markers: Marker[]): string; /** * Index of the nearest visible marker within `radius` px of `(x, y)`, or `-1`. * Ties resolve to the later index (drawn on top). */ export declare function nearestMarkerIndex(positions: ProjectedMarker[], x: number, y: number, radius: number): number; //# sourceMappingURL=markers.d.ts.map