import { Point } from 'spase'; import { ScrollOptions } from '../types/index.js'; /** * A type describing an active scrolling operation. */ export interface ScrollInstance { /** * The target element that is actively scrolling. */ target: Window | HTMLElement; /** * The animation frame (from `requestAnimationFrame` or `setTimeout`) request * ID. */ animationFrameRequestId: number; /** * Scrolling options. */ options: ScrollOptions; } /** * Scrolls to the top bound inside the target element. * * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function scrollToTop(target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Scrolls to the bottom bound inside the target element. * * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function scrollToBottom(target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Scrolls to the left bound inside the target element. * * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function scrollToLeft(target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Scrolls to the right bound inside the target element. * * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function scrollToRight(target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Horizontally scrolls to the specified `x` position inside the target element. * * @param x The `x` position to scroll to (relative to the target element's * coordinate space). * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function hscrollTo(x: number, target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Vertically scrolls to the specified `y` position inside the target element.. * * @param y The `y` position to scroll to (relative to the target element's * coordinate space). * @param target The target element. * @param options See {@link ScrollOptions}. */ export declare function vscrollTo(y: number, target?: Window | HTMLElement, options?: ScrollOptions): void; /** * Scrolls to the specified `Point` inside the target element. * * @param position The target position. * @param target The target element. * @param param2 See {@link ScrollOptions}. */ export declare function scrollTo(position: Point, target?: Window | HTMLElement, { easing, ...opts }?: ScrollOptions): void; /** * Cancels all active scrolling operations (that are managed by `dirty-dom` * inside the target element. * * @param target The target element. */ export declare function cancelScroll(target: Window | HTMLElement): void; /** * Cancels all active scrolling operations (that are managed by `dirty-dom`). */ export declare function cancelAllScrolls(): void;