import "d3-transition"; import { PointerContext } from "../types/Pointer"; import { Gauge } from "../types/Gauge"; export interface PointerDiagnostics { pointerVanishCount: number; pointerMismatchCount: number; stalePointerCleanups: number; resizeInterruptions: number; animationInterruptions: number; lastVanishTimestamp: number | null; lastMismatchDetails: { expected: number; actual: number; } | null; } export declare const getDiagnostics: () => PointerDiagnostics; export declare const resetDiagnostics: () => void; /** * Ensure pointer element exists, recreate if missing * Tracks vanish events for diagnostics */ export declare const ensurePointerExists: (gauge: Gauge) => boolean; export declare const drawPointer: (gauge: Gauge, resize?: boolean) => void; export declare const setupContext: (gauge: Gauge, isFirstAnimation?: boolean) => PointerContext; export declare const translatePointer: (x: number, y: number, gauge: Gauge) => void; export declare const addPointerElement: (gauge: Gauge) => any; export declare const clearPointerElement: (gauge: Gauge) => void; /** * Calculate value from mouse/touch position on the gauge arc * @param gauge The gauge instance * @param clientX Mouse/touch X coordinate * @param clientY Mouse/touch Y coordinate * @returns The calculated value based on position */ export declare const getValueFromPosition: (gauge: Gauge, clientX: number, clientY: number) => number; /** * Set up drag behavior for the pointer element * This allows users to grab and drag the pointer to set values */ export declare const setupPointerDrag: (gauge: Gauge) => void; /** * Set up click-to-set behavior on the arc * Allows users to click anywhere on the arc to set the value */ export declare const setupArcClick: (gauge: Gauge) => void; /** * Check if gauge is in multi-pointer mode * Returns true only if pointers array exists AND has at least one pointer */ export declare const isMultiPointerMode: (gauge: Gauge) => boolean; /** * Check if gauge has any pointers to draw */ export declare const hasPointersToRender: (gauge: Gauge) => boolean; /** * Validate that rendered pointer count matches expected count from props * Logs warning and corrects if mismatch detected */ export declare const validatePointerCount: (gauge: Gauge) => { valid: boolean; expected: number; actual: number; }; /** * Draw all pointers in multi-pointer mode */ export declare const drawMultiPointers: (gauge: Gauge, resize?: boolean) => void; /** * Clear all multi-pointer elements */ export declare const clearMultiPointers: (gauge: Gauge) => void;