import * as i0 from '@angular/core'; import { InjectionToken, ElementRef, Provider } from '@angular/core'; import { _XAxis, _YAxis } from '@angular/cdk/scrolling'; declare const SMOOTH_SCROLL_OPTIONS: InjectionToken; declare function provideSmoothScrollOptions(options: SmoothScrollOptions): Provider[]; /** * Interface for an element that can be scrolled smoothly. */ type SmoothScrollElement = Element | ElementRef | string; /** * Interface for options provided for smooth scrolling. */ type SmoothScrollToOptions = Partial & Pick<_YAxis, keyof _YAxis>> & SmoothScrollOptions; /** * Interface for options provided for smooth scrolling to an element. */ type SmoothScrollToElementOptions = SmoothScrollToOptions & { center?: boolean; }; interface SmoothScrollOptions { duration?: number; easing?: BezierEasingOptions; } interface BezierEasingOptions { x1: number; y1: number; x2: number; y2: number; } declare class SmoothScrollManager { private readonly document; private readonly _defaultOptions; private onGoingAnimations; private abortControllers; /** * Handles a given parameter of type HTMLElement, ElementRef or selector */ private getElement; private cancelOngoingAnimation; private cleanup; private applyScrollToOptions; /** * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo * method, since browsers are not consistent about what scrollLeft means in RTL. For this method * left and right always refer to the left and right side of the scrolling container irrespective * of the layout direction. start and end refer to left and right in an LTR context and vice-versa * in an RTL context. * @param scrollable element * @param customOptions specified the offsets to scroll to. */ scrollTo(scrollable: SmoothScrollElement, customOptions: SmoothScrollToOptions): Promise; /** * Scroll to element by reference or selector */ scrollToElement(scrollable: SmoothScrollElement, target: SmoothScrollElement, customOptions?: SmoothScrollToElementOptions): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class SmoothScroll { private readonly smoothScroll; private readonly element; scrollTo(options: SmoothScrollToOptions): Promise; scrollToElement(target: SmoothScrollElement, options: SmoothScrollToElementOptions): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export { SMOOTH_SCROLL_OPTIONS, SmoothScroll, SmoothScrollManager, provideSmoothScrollOptions }; export type { BezierEasingOptions, SmoothScrollElement, SmoothScrollOptions, SmoothScrollToElementOptions, SmoothScrollToOptions };