import type { Peritext } from '../../../../../json-crdt-extensions'; import type { Point } from '../../../../../json-crdt-extensions/peritext/rga/Point'; import type { PeritextUiApi, Rect, UiLineEdge, UiLineInfo } from './types'; export declare class UiHandle { readonly txt: Peritext; readonly api: PeritextUiApi; constructor(txt: Peritext, api: PeritextUiApi); protected point(pos: number | Point): Point; /** * Finds the position of the character at the given point (position between * characters). The first position has index of 0. Have to specify the * direction of the search, forward or backward. * * @param point The index of the character in the text, or a {@link Point}. * @param fwd Whether to find the location of the next character after the * given {@link Point} or before, defaults to `true`. * @returns The bounding rectangle of the character at the given index. */ getPointRect(pos: number | Point, right?: boolean): Rect | undefined; /** * Same as {@link getPointRect} but if the character in the given direction is * inside an atomic slice (not individually measurable in DOM), falls back to * measuring from the opposite direction. */ private getPointRectRobust; pointX(pos: number | Point): [x: number, rect: Rect] | undefined; findPointAtX(targetX: number, line: UiLineInfo): Point; getLineEnd(pos: number | Point, right?: boolean): UiLineEdge | undefined; getLineInfo(pos: number | Point): UiLineInfo | undefined; getNextLineInfo(line: UiLineInfo, direction?: 1 | -1): UiLineInfo | undefined; } //# sourceMappingURL=UiHandle.d.ts.map