import type { IPoint } from '../Core/Types'; /** * Calculate Euclidean distance between two points. * * @param p1 - First point. * @param p2 - Second point. * @returns Distance between points. * * @public */ export declare function getDistance(p1: IPoint, p2: IPoint): number; /** * Calculate delta between two points. * * @param from - Start point. * @param to - End point. * @returns Delta as point. * * @public */ export declare function getDelta(from: IPoint, to: IPoint): IPoint; /** * Add two points. * * @param p1 - First point. * @param p2 - Second point. * @returns Sum of points. * * @public */ export declare function addPoints(p1: IPoint, p2: IPoint): IPoint; /** * Subtract two points. * * @param p1 - First point. * @param p2 - Second point. * @returns Difference of points. * * @public */ export declare function subtractPoints(p1: IPoint, p2: IPoint): IPoint; /** * Check if a point is inside a DOMRect. * * @param point - Point to check. * @param rect - Rectangle. * @returns True if point is inside rect. * * @public */ export declare function isPointInsideRect(point: IPoint, rect: DOMRect): boolean; /** * Check if a point is near the edge of a rect. * * @param point - Point to check. * @param rect - Rectangle. * @param threshold - Distance threshold in pixels. * @returns Object indicating which edges are near. * * @public */ export declare function isPointNearEdge(point: IPoint, rect: DOMRect, threshold: number): { top: boolean; right: boolean; bottom: boolean; left: boolean; }; /** * Get the center point of a DOMRect. * * @param rect - Rectangle. * @returns Center point. * * @public */ export declare function getRectCenter(rect: DOMRect): IPoint; /** * Get the top-left corner of a DOMRect. * * @param rect - Rectangle. * @returns Top-left point. * * @public */ export declare function getRectTopLeft(rect: DOMRect): IPoint; /** * Get element position from PointerEvent. * * @param event - Pointer event. * @returns Point with clientX/clientY. * * @public */ export declare function getPointerPosition(event: PointerEvent | MouseEvent | TouchEvent): IPoint; /** * Get the current viewport dimensions. * * @returns Viewport size. * * @public */ export declare function getViewportSize(): { width: number; height: number; }; /** * Adjust rect for scroll offset. * * @param rect - Original rect. * @param scrollTop - Scroll top offset. * @param scrollLeft - Scroll left offset. * @returns Adjusted rect. * * @public */ export declare function adjustRectForScroll(rect: DOMRect, scrollTop: number, scrollLeft: number): DOMRect; /** * Constrain a point within a boundary rect. * * @param point - Point to constrain. * @param boundary - Boundary rect. * @param elementSize - Size of the element being positioned. * @returns Constrained point. * * @public */ export declare function constrainPointToBoundary(point: IPoint, boundary: DOMRect, elementSize: { width: number; height: number; }): IPoint; /** * Constrain position to axis. * * @param point - Point to constrain. * @param initialPoint - Initial position (for locked axis). * @param lockAxis - Axis to lock ('x', 'y', or null). * @returns Constrained point. * * @public */ export declare function constrainToAxis(point: IPoint, initialPoint: IPoint, lockAxis: 'x' | 'y' | null): IPoint; /** * Apply transform to an element. * * @param element - Element to transform. * @param position - Position to apply. * * @public */ export declare function applyTransform(element: HTMLElement, position: IPoint): void; /** * Clear transform from an element. * * @param element - Element to clear transform from. * * @public */ export declare function clearTransform(element: HTMLElement): void; /** * Get current transform position from an element. * * @param element - Element to read from. * @returns Current transform position. * * @public */ export declare function getTransformPosition(element: HTMLElement): IPoint; /** * Create a clone of an element for preview. * * @param element - Element to clone. * @returns Cloned element. * * @public */ export declare function cloneElement(element: HTMLElement): HTMLElement; /** * Get scrollable parents of an element. * * @param element - Element to check. * @returns Array of scrollable parent elements. * * @public */ export declare function getScrollableParents(element: HTMLElement): Array; /** * Find closest ancestor matching a selector. * * @param element - Starting element. * @param selector - CSS selector. * @returns Matching ancestor or null. * * @public */ export declare function getClosestMatchingAncestor(element: HTMLElement, selector: string): HTMLElement | null; //# sourceMappingURL=PositionUtils.d.ts.map