import { SelectionTarget } from '../../../../../../document-api/src/index.js'; import { Editor } from '../../core/Editor.js'; /** The Yjs awareness `cursor` field shape consumed by the cursor render side. */ export interface CollaborationCursorPayload { anchor: unknown; head: unknown; } /** * Encode a SelectionTarget into a collaboration-cursor awareness payload. * * Returns `null` when the editor has no collaborative Yjs binding (no ySync * plugin / binding mapping), or when position conversion fails. Callers should * treat `null` as "not a collaborative session". Target-shape and * target-not-found errors propagate from {@link resolveSelectionTarget} so the * caller surfaces them; this function does not invent a looser shape. * * @param editor - The engine editor (collaboratively bound). * @param target - A Document API SelectionTarget (a collapsed start==end target is a caret). */ export declare function encodeCollaborationCursorFromSelectionTarget(editor: Editor, target: SelectionTarget): CollaborationCursorPayload | null; //# sourceMappingURL=collaboration-cursor-encoder.d.ts.map