import { next as A } from '@automerge/automerge'; import { type BaseObject } from '@dxos/echo-schema'; import { type KeyPath, type DocAccessor } from './core-db'; import { type AnyLiveObject } from './echo-handler'; export declare const toCursor: (accessor: DocAccessor, pos: number, assoc?: number) => A.Cursor; export declare const toCursorRange: (accessor: DocAccessor, start: number, end: number) => string; export declare const fromCursor: (accessor: DocAccessor, cursor: A.Cursor) => number; /** * Return the text value between two cursor positions. */ export declare const getTextInRange: (accessor: DocAccessor, start: string, end: string) => string | undefined; export declare const getRangeFromCursor: (accessor: DocAccessor, cursor: string) => { start: number; end: number; } | undefined; /** * Helper that updates the text value at the given path. Caller must ensure the path is valid. * @param obj - The object to update. * @param path - The path to the text value to update. * @param newText - The new text value. * @returns The updated object. */ export declare const updateText: (obj: AnyLiveObject, path: KeyPath, newText: string) => AnyLiveObject; //# sourceMappingURL=text.d.ts.map