import type { DOMRange, Position, Rect } from "./types";
/**
 * Given two positions relative to the same origin, return `child`'s position
 * relative to `parent`'s position.
 */
export declare function getRelativePosition(child: Position, parent: Position): Position;
/**
 * `getRelativePosition`, but for Rects.
 *
 * Given a rectangle and a position relative to the same origin, return a new
 * rectangle of the same size, whose position is relative to the given
 * position.
 */
export declare function getRelativeRect({ left, top, width, height }: Rect, parent: Position): Rect;
/**
 * Given a DOMRange, return a list of client-relative rects that cover the text
 * inside the DOMRange.
 *
 * This behaves differently than the browser's built-in `getClientRects` method
 * for DOMRanges, because this method only gets rects for the *text* nodes,
 * whereas the browser's method will also return rects for any fully-contained
 * *element* nodes.
 *
 * For example, if an entire paragraph is selected, then `getClientRects` will
 * return a rectangle that covers the entire paragraph block, whereas this
 * method will only return rectangles for the text inside the paragraph.
 */
export declare function getClientRectsForTextInRange(range: DOMRange): ReadonlyArray<Rect>;
