import type { AnimateTranslateCanvasValues, AppState, ScrollConstraints } from "../types"; type CanvasTranslate = Pick; /** * Calculates the scroll center coordinates and the optimal zoom level to fit the constrained scrollable area within the viewport. * * @param state - The application state. * @param scroll - Object containing current scrollX and scrollY. * @returns An object with the calculated scrollX, scrollY, and zoom. */ export declare const calculateConstrainedScrollCenter: (state: AppState, { scrollX, scrollY }: Pick) => CanvasTranslate; /** * Encodes scroll constraints into a compact string. * * @param constraints - The scroll constraints to encode. * @returns A compact encoded string representing the scroll constraints. */ export declare const encodeConstraints: (constraints: ScrollConstraints) => string; /** * Decodes a compact string back into scroll constraints. * * @param encoded - The encoded string representing the scroll constraints. * @returns The decoded scroll constraints object. */ export declare const decodeConstraints: (encoded: string) => ScrollConstraints; /** * Constrains the AppState scroll values within the defined scroll constraints. * * constraintMode can be "elastic", "rigid", or "loose": * - "elastic": snaps to constraints but allows overscroll * - "rigid": snaps to constraints without overscroll * - "loose": allows overscroll and disables animation/snapping to constraints * * @param state - The original AppState. * @param options - Options for allowing overscroll and disabling animation. * @returns A new AppState object with constrained scroll values. */ export declare const constrainScrollState: (state: AppState, constraintMode?: "elastic" | "rigid" | "loose") => AppState; /** * Checks if two canvas translate values are close within a threshold. * * @param from - First set of canvas translate values. * @param to - Second set of canvas translate values. * @returns True if the values are close, false otherwise. */ export declare const areCanvasTranslatesClose: (from: AnimateTranslateCanvasValues, to: AnimateTranslateCanvasValues) => boolean; export {};