import { CrudeTimeStamp, TimeSpan, TimeStamp } from '@synnaxlabs/x';
/**
 * Predefined time scale steps used for generating tick marks.
 * Ranges from 1 nanosecond to 1 second in standardized increments.
 */
export declare const TIME_SCALE_STEPS: TimeSpan[];
/**
 * Configuration properties for creating a PreciseTimeScale.
 */
export interface PreciseTimeScaleProps {
    /** The domain of the time scale as [start, end] timestamps */
    domain: [CrudeTimeStamp, CrudeTimeStamp];
    /** The range of the scale as [start, end] numbers for visual representation */
    range: [number, number];
}
/**
 * PreciseTimeScale provides a high-precision time scaling utility for visualizing time-based data.
 * It supports nanosecond precision and provides methods for scaling timestamps to pixel coordinates,
 * generating tick marks, and formatting time values.
 *
 * The scale maps a time domain to a numeric range (typically pixels) while maintaining
 * nanosecond precision using BigInt internally.
 *
 * @example
 * ```typescript
 * const scale = preciseTimeScale()
 *   .domain([new Date('2023-01-01'), new Date('2023-01-02')])
 *   .range([0, 1000]);
 *
 * // Convert a timestamp to a pixel position
 * const pixelPos = scale.scale(new Date('2023-01-01T12:00:00'));
 *
 * // Generate tick marks
 * const ticks = scale.ticks(5);
 * ```
 */
export declare class PreciseTimeScale {
    private _domain;
    private _range;
    private _span;
    /**
     * Creates a new PreciseTimeScale instance with default domain [0, 1] and range [0, 1].
     */
    constructor();
    /**
     * Gets or sets the time domain of the scale.
     *
     * @param domain - Optional domain to set as [start, end] timestamps
     * @returns Current domain if no argument provided, or this instance for chaining
     */
    domain(): [TimeStamp, TimeStamp];
    domain(domain: [CrudeTimeStamp, CrudeTimeStamp]): this;
    /**
     * Gets or sets the numeric range of the scale.
     *
     * @param range - Optional range to set as [start, end] numbers
     * @returns Current range if no argument provided, or this instance for chaining
     */
    range(): [number, number];
    range(range: [number, number]): this;
    /**
     * Scales a timestamp to its corresponding position in the range.
     *
     * @param value - The timestamp to scale
     * @returns The scaled numeric value within the range
     */
    scale(value: CrudeTimeStamp): number;
    /**
     * Generates an array of evenly spaced tick marks within the domain.
     * The ticks are automatically adjusted to use human-friendly time intervals.
     *
     * @param count - Desired number of ticks (actual count may differ to maintain nice intervals)
     * @returns Array of timestamps representing tick positions
     */
    ticks(count: number): TimeStamp[];
    /**
     * Calculates the optimal step size for tick generation based on the desired tick count.
     * Uses predefined steps from TIME_SCALE_STEPS to ensure human-readable intervals.
     *
     * @param targetCount - Desired number of ticks
     * @returns The optimal TimeSpan step size
     */
    private calculateOptimalStep;
    /**
     * Formats a timestamp for display on tick marks.
     * Automatically adjusts the format based on the current time scale:
     * - For spans < 50µs: displays microseconds
     * - For spans >= 50µs: displays milliseconds
     *
     * @param value - The timestamp to format
     * @returns Formatted string representation of the timestamp
     */
    formatTick(value: TimeStamp): string;
}
/**
 * Creates a new PreciseTimeScale instance.
 *
 * @returns A new PreciseTimeScale instance with default settings
 */
export declare const preciseTimeScale: () => PreciseTimeScale;
//# sourceMappingURL=preciseTimeScale.d.ts.map