@pmndrs/uikit
Version:
Build performant 3D user interfaces with Three.js and yoga.
8 lines (7 loc) • 624 B
TypeScript
import type { CaretTransformation, PositionedGlyphLayout, SelectionTransformation } from './types.js';
export declare function getCharIndex(layout: PositionedGlyphLayout | undefined, x: number, y: number, position: 'between' | 'on'): number;
export declare function getCaretTransformation(layout: PositionedGlyphLayout | undefined, charIndex: number): CaretTransformation | undefined;
export declare function getSelectionTransformations(layout: PositionedGlyphLayout | undefined, range: readonly [number, number] | undefined): {
caret: CaretTransformation | undefined;
selections: Array<SelectionTransformation>;
};