import { Duration } from "luxon"; /** enum for amplitude modes, RAW, ZERO, MINMAX, MEAN */ export declare enum AMPLITUDE_MODE { Raw = "raw",// raw values, no centering Zero = "zero",// same as Raw, but also includes zero MinMax = "minmax",// centered on midpoint of min-max Mean = "mean" } /** The Golden ratio. */ export declare const PHI: number; export declare const SQRT_PHI: number; export declare class MinMaxable { min: number; max: number; constructor(min: number, max: number); get middle(): number; get halfWidth(): number; get fullWidth(): number; union(omm?: MinMaxable): MinMaxable; expandPercentage(percent: number): MinMaxable; /** * This as a d3 style 2 element array. * * @returns length 2 array of min then max */ asArray(): [number, number]; toString(): string; /** * Create MinMaxable from a d3 style two element array. * * @param minmax array of min then max * @returns new MinMaxable */ static fromArray(minmax: number[]): MinMaxable; static fromMiddleHalfWidth(mid: number, halfWidth: number): MinMaxable; } export declare class AmplitudeScalable { minMax: MinMaxable; constructor(minMax?: MinMaxable); notifyAmplitudeChange(_middle: number, _halfWidth: number): void; get middle(): number; get halfWidth(): number; get fullWidth(): number; get min(): number; get max(): number; toString(): string; } export declare class TimeScalable { alignmentTimeOffset: Duration; duration: Duration; constructor(alignmentTimeOffset: Duration, duration: Duration); notifyTimeRangeChange(_alignmentTimeOffset: Duration, _duration: Duration): void; } /** * Links amplitude scales across multiple seismographs, respecting doRmean. * * @param graphList optional list of AmplitudeScalable to link */ export declare class LinkedAmplitudeScale { /** * @private */ _graphSet: Set; _halfWidth: number; _recalcTimeoutID: ReturnType | null; _scaleId: number; constructor(graphList?: Array); get halfWidth(): number; set halfWidth(val: number); /** * Links new Seismograph with this amplitude scale. * * @param graphList Array of AmplitudeScalable to link */ linkAll(graphList: Array): void; /** * Link new Seismograph with this amplitude scale. * * @param graph AmplitudeScalable to link */ link(graph: AmplitudeScalable | { amp_scalable: AmplitudeScalable; }): void; /** * Unlink Seismograph with this amplitude scale. * * @param graph AmplitudeScalable to unlink */ unlink(graph: AmplitudeScalable): void; /** * Recalculate the best amplitude scale for all Seismographs. Causes a redraw. * * @returns array of promise of best amp scales */ recalculate(): Promise>; _internalNotifyAll(): Promise>; notifyAll(): Promise>; get graphList(): AmplitudeScalable[]; } export declare class IndividualAmplitudeScale extends LinkedAmplitudeScale { constructor(graphList?: Array); recalculate(): Promise>; notifyAll(): Promise>; } export declare class FixedHalfWidthAmplitudeScale extends LinkedAmplitudeScale { constructor(halfWidth: number, graphList?: Array); recalculate(): Promise>; notifyAll(): Promise>; } /** * Links time scales across multiple seismographs. * * @param graphList optional list of TimeScalables to link */ export declare class LinkedTimeScale { /** * @private */ _graphSet: Set; _originalDuration: Duration; _originalOffset: Duration; _zoomedDuration: null | Duration; _zoomedOffset: null | Duration; _scaleId: number; _prev_zoom_k: number; _prev_zoom_x: number; constructor(graphList?: Array, originalDuration?: Duration, originalOffset?: Duration, scaleId?: number); /** * Link new TimeScalable with this time scale. * * @param graph TimeScalable to link */ link(graph: TimeScalable | { time_scalable: TimeScalable; }): void; /** * Links TimeScalable with this time scale. Each * object in the array should either be a TimeScalable * or have a time_scalable field that is a TimeScalable. * * @param graphList Array of TimeScalable to link */ linkAll(graphList: Array): void; /** * Unlink TimeScalable with this amplitude scale. * * @param graph TimeScalable to unlink */ unlink(graph: TimeScalable): void; zoom(startOffset: Duration, duration: Duration): void; /** * Return to original no-zoom zoom level */ unzoom(): void; get offset(): Duration; set offset(offset: Duration); get duration(): Duration; set duration(duration: Duration); get origOffset(): Duration; get origDuration(): Duration; /** * Recalculate the best time scale for all Seismographs. Causes a redraw. * @returns promise to array of all linked items */ recalculate(): Promise>; notifyAll(): Promise>; get graphList(): TimeScalable[]; } /** * Linked Time Scale that only modifies the alignment via the offset. The * duration of the linked TimeScalable is reused. * @param graphList [description] * @param originalDuration [description] * @param originalOffset [description] * @param scaleId [description] */ export declare class AlignmentLinkedTimeScale extends LinkedTimeScale { constructor(graphList?: Array, originalDuration?: Duration, originalOffset?: Duration, scaleId?: number); /** * Does no calculation, just causes a redraw. * @returns promise to all linked items */ recalculate(): Promise>; notifyAll(): Promise>; } export declare class PanZoomer { isMouseDown: boolean; _target: HTMLElement | SVGSVGElement | SVGForeignObjectElement; width: number; linkedTimeScale: LinkedTimeScale; wheelZoom: boolean; _prev_zoom_k: number; _prev_zoom_x: number; min_k: number; max_k: number; constructor(target: HTMLElement | SVGSVGElement | SVGForeignObjectElement, linkedTimeScale: LinkedTimeScale, wheelZoom?: boolean); set target(target: HTMLElement | SVGSVGElement | SVGForeignObjectElement); get target(): HTMLElement | SVGSVGElement | SVGForeignObjectElement; transitionZoom(factor: number, offsetX: number, duration?: number): void; doZoom(k: number, x: number, width: number): void; } //# sourceMappingURL=scale.d.mts.map