import { Point } from '../geom/point.js'; /** An element rectangle after the cushion has been applied to every edge. */ export type CalibratedBounds = { width: number; height: number; left: number; right: number; top: number; bottom: number; }; import type { Device } from './device.js'; declare class VisualBoundsDesktopRectangle { /** * Gets the horizontal scroll position of the window. * @returns {number} The horizontal scroll position in pixels. */ get x(): number; /** * Gets the vertical scroll position of the window. * @returns {number} The vertical scroll position in pixels. */ get y(): number; /** * Gets the width of the window. * @returns {number} The width of the window in pixels. */ get width(): number; /** * Gets the height of the window. * @returns {number} The height of the window in pixels. */ get height(): number; } declare class LayoutBoundsDesktopRectangle { /** * Gets the horizontal scroll position of the window. * @returns {number} The horizontal scroll position in pixels. */ readonly x = 0; /** * Gets the vertical scroll position of the window. * @returns {number} The vertical scroll position in pixels. */ readonly y = 0; /** * Gets the width of the window. * @returns {number} The width of the window in pixels. */ get width(): number; /** * Gets the height of the window. * @returns {number} The height of the window in pixels. */ get height(): number; } declare class VisualBoundsRectangle { /** * Gets the horizontal scroll position of the document. * @returns {number} The horizontal scroll position in pixels. */ get x(): number; /** * Gets the vertical scroll position of the document. * @returns {number} The vertical scroll position in pixels. */ get y(): number; /** * TBD. * @returns {number} TBD. */ get width(): number; /** * TBD. * @returns {number} TBD. */ get height(): number; } declare class LayoutBoundsRectangle { /** * TBD. * @returns {number} TBD. */ readonly x = 0; /** * TBD. * @returns {number} TBD. */ readonly y = 0; /** * TBD. * @returns {number} TBD. */ get width(): number; /** * TBD. * @returns {number} TBD. */ get height(): number; } declare class DocumentBoundsRectangle { /** * TBD. * @returns {number} TBD. */ readonly x = 0; /** * TBD. * @returns {number} TBD. */ readonly y = 0; /** * TBD. * @returns {number} TBD. */ get width(): number; /** * TBD. * @returns {number} TBD. */ get height(): number; } export declare class DOM { treatAsDesktop: boolean; visualBounds: VisualBoundsDesktopRectangle | VisualBoundsRectangle; layoutBounds: LayoutBoundsDesktopRectangle | LayoutBoundsRectangle; documentBounds: DocumentBoundsRectangle; scrollXProvider: () => number; scrollYProvider: () => number; /** * TBD. * @param {Device} device - TBD. */ constructor(device: Device); /** * Gets the offset position of an element relative to the document. * @param {HTMLCanvasElement} element - The element to get the offset for. * @param {Point} point - Optional Point object to store the result. * @returns {Point} The offset position of the element. */ getOffset(element: HTMLCanvasElement, point?: Point | null): Point; /** * Gets the bounding rectangle of an element with optional cushion. * @param {HTMLCanvasElement} element - The element to get bounds for. * @param {number} cushion - Optional padding to add around the element. * @returns {boolean} True if bounds were successfully retrieved, false otherwise. */ getBounds(element: HTMLCanvasElement, cushion?: number): CalibratedBounds | false; /** * Calibrates DOM rectangle coordinates with optional cushion. * @param {DOMRect} coords - The DOM rectangle coordinates to calibrate. * @param {number} cushion - Optional padding to add around the rectangle. * @returns {{width: number, height: number, left: number, right: number, top: number, bottom: number}} The calibrated rectangle. */ calibrate(coords: DOMRect, cushion?: number): CalibratedBounds; /** * Gets the screen orientation. * @param {string} primaryFallback - The fallback method to use if screen orientation API is not available. * @returns {string} The screen orientation ('portrait-primary', 'landscape-primary', etc.). */ getScreenOrientation(primaryFallback?: string | null): OrientationType; /** * Gets the horizontal scroll position of the window. * @returns {number} The horizontal scroll position in pixels. */ get scrollX(): number; /** * Gets the vertical scroll position of the window. * @returns {number} The vertical scroll position in pixels. */ get scrollY(): number; /** * Gets the width of the window's client area. * @returns {number} The width of the client area in pixels. */ get clientWidth(): number; /** * Gets the height of the window's client area. * @returns {number} The height of the client area in pixels. */ get clientHeight(): number; } export {}; //# sourceMappingURL=dom.d.ts.map