import type { ScaleLinear, ScaleLogarithmic, ScaleSymLog, ScaleTime } from 'd3-scale'; import { A11yToolbarTabIndex } from '../types/toolbar.js'; import { ChartZoomConfig } from '../types/zoom.js'; export type PanDirection = 'left' | 'right'; export type PanStepType = 'small' | 'large'; /** * Checks if new domain is the initial zoom state. * @param newDomain - The targeted new domain. * @param initialDomain - The initial domain. * @returns A boolean that compares domains to verify if the zoom-out action reaches the initial zoom state. */ export declare function isDomainMinZoom(newDomain: [number, number], infiniteZoom: boolean, initialDomain?: [number, number]): boolean; /** * Checks if new domain is the maximum possible. * @param newDomain - The targeted new domain. * @returns A boolean that compares domain min and max values to verify if the zoom-in action reaches the max zoom limit. */ export declare function isDomainMaxZoom(newDomain: [number, number], initialDomain: [number, number]): boolean; /** * Get if it is at min or max zoom. * * @param initialDomain - the initial domain as number (number or timestamp) without zoom * @param nextDomain - the domain as number (number or timestamp) to be zoomed in * @param infiniteZoom - Enables or disabled the infiniteZoom. * @returns - if it is at min or max zoom. */ export declare function isZoomBoundaries(initialDomain: [number, number], nextDomain: [number, number], infiniteZoom: boolean): { isMinZoom: boolean; isMaxZoom: boolean; }; /** * Handles a new panning move. * @param xScale - The axis scale. * @param panDirection - The direction of the panning movement. * @param stepType - The scale of the panning. * @param initialXScaleDomain - The initial scale domain. * @returns The new domain. */ export declare const handlePanningMovement: (xScale: ScaleLinear | ScaleLogarithmic | ScaleTime | ScaleSymLog, panDirection: PanDirection, stepType: PanStepType, initialXScaleDomain?: number[] | Date[]) => (number | Date)[]; interface ConfigProps { zoomX?: ChartZoomConfig; pan?: ChartZoomConfig; zoom?: ChartZoomConfig; download?: { enabled: boolean; }; intent?: boolean; /** * Whether the explore ToolbarMenu trigger will be rendered in the initial toolbar state. * When false, the first available control receives tabIndex=0 instead. * @defaultValue true */ hasExploreMenu?: boolean; } /** * Adjusts an existing a11y config array to add or remove the explore entry, * and re-promotes the first remaining entry to tabIndex=0. * Used when shouldShowMenu changes after the initial config was computed. */ export declare function adjustA11yConfigForExplore(config: A11yToolbarTabIndex[], hasExplore: boolean): A11yToolbarTabIndex[]; export declare function getA11yToolbarConfig(config: ConfigProps): A11yToolbarTabIndex[]; /** * Checks if currentDomain and initialDomain are equal * @param currentDomain - The minimum and maximum date of the current domain. * @param initialDomain - The initial domain. * @returns boolean value */ export declare function isSameDomain(currentDomain: (number | Date)[] | undefined, initialDomain: (number | Date)[]): boolean; export {}; //# sourceMappingURL=zoom.d.ts.map