/** * Comes from https://github.com/BetterTyped/react-zoom-pan-pinch/blob/master/src/core/bounds/bounds.utils.ts * (mirrors v4.1.1 — re-check on every major upgrade, nothing here fails to compile when it diverges) * * The library exports no equivalent, and the window resize handler of the game table needs to clamp a * position it computed itself, so this stays copied. v4 changed the `centerZoomedOut` factor and added * the `disablePadding` / explicit position handling below. */ import { BoundsType, PositionType, ReactZoomPanPinchContext } from 'react-zoom-pan-pinch'; export declare function getComponentsSizes(wrapperComponent: HTMLDivElement, contentComponent: HTMLDivElement, newScale: number): any; export declare const getBounds: (wrapperWidth: number, newContentWidth: number, diffWidth: number, wrapperHeight: number, newContentHeight: number, diffHeight: number, centerZoomedOut: boolean) => BoundsType; export declare const calculateBounds: (contextInstance: ReactZoomPanPinchContext, newScale: number) => BoundsType; /** * Keeps value between given bounds, used for limiting view to given boundaries * 1# eg. boundLimiter(2, 0, 3, true) => 2 * 2# eg. boundLimiter(4, 0, 3, true) => 3 * 3# eg. boundLimiter(-2, 0, 3, true) => 0 * 4# eg. boundLimiter(10, 0, 3, false) => 10 */ export declare const boundLimiter: (value: number, minBound: number, maxBound: number, isActive: boolean) => number; export declare function getMouseBoundedPosition(positionX: number, positionY: number, bounds: BoundsType, limitToBounds: boolean, paddingValueX: number, paddingValueY: number, wrapperComponent: HTMLDivElement | null): PositionType;