import { Point } from 'spase'; import { DirtyInfo, ResponsiveDescriptor, ScrollOptions } from '../types/index.js'; import { UpdateDelegate } from './UpdateDelegate.js'; /** * A specific type of {@link UpdateDelegate} that has position and size update * events set up. */ export declare class ScrollDelegate extends UpdateDelegate { protected static DEFAULT_DIRTY_INFO: DirtyInfo; /** * Creates a new {@link ScrollDelegate} instance. If descriptors are not * specified, this instance will be automatically set up to listen for size * and position update events of the window. * * @param updateHandler The handler to invoke upon every update event. * @param descriptors Map of responsive descriptors. */ constructor(updateHandler: (info: DirtyInfo, delegate: UpdateDelegate) => void, descriptors?: Record); /** * Gets the minimum scroll position of the reference element. * * @returns Minimum scroll position. */ get minPosition(): Point; /** * Gets the maximum scroll position of the reference element. * * @returns Maximum scroll position. */ get maxPosition(): Point; /** * Scrolls the scroll event listener to the top of its minimum vertical scroll * position. * * @param options See {@link ScrollOptions}. */ scrollToTop(options?: ScrollOptions): void; /** * Scrolls the scroll event listener to the bottom of its maximum vertical * scroll position. * * @param options See {@link ScrollOptions}. */ scrollToBottom(options?: ScrollOptions): void; /** * Scrolls the scroll event listener to the left of its maximum horizontal * scroll position. * * @param options See {@link ScrollOptions}. */ scrollToLeft(options?: ScrollOptions): void; /** * Scrolls the scroll event listener to the right of its maximum horizontal * scroll position. * * @param options See {@link ScrollOptions}. */ scrollToRight(options?: ScrollOptions): void; /** * Scrolls the scroll event listener to the specified position. * * @param position The position to scroll to. * @param options See {@link ScrollOptions}. */ scrollTo(position: Point, options?: ScrollOptions): void; /** * Scrolls the scroll event listener horizontally to the specified * x-coordinate. * * @param x The x-coordinate to scroll to. * @param options See {@link ScrollOptions}. */ hscrollTo(x: number, options?: ScrollOptions): void; /** * Scrolls the scroll event listener horizontally to the specified * y-coordinate. * * @param y The y-coordinate to scroll to. * @param options See {@link ScrollOptions}. */ vscrollTo(y: number, options?: ScrollOptions): void; }