import { EditorState } from 'prosemirror-state';
import { RemoteCursorState } from '../types.js';
/**
 * Minimal interface for Yjs awareness object.
 */
type AwarenessLike = {
    clientID?: number;
    getStates?: () => Map<number, unknown>;
};
/**
 * Minimal interface for collaboration provider with awareness.
 */
type CollaborationProviderLike = {
    awareness?: AwarenessLike | null;
} | null;
/**
 * Normalizes Yjs awareness states into typed RemoteCursorState objects.
 *
 * Converts relative Yjs positions to absolute ProseMirror positions, validates and clamps
 * positions to document bounds, assigns fallback colors, and manages stale state cleanup.
 * Preserves timestamps for unchanged cursor positions to enable stable sorting and limit
 * enforcement without flickering.
 *
 * @param options - Configuration object
 * @param options.provider - Collaboration provider with awareness capability
 * @param options.editorState - Current ProseMirror editor state
 * @param options.previousState - Previous cursor states for timestamp preservation
 * @param options.fallbackColors - Array of fallback colors for users without custom colors
 * @param options.staleTimeoutMs - Milliseconds after which inactive cursor states are removed
 * @returns Map of client IDs to normalized remote cursor states
 *
 * @remarks
 * - Skips the local client (matching awareness.clientID)
 * - Skips states without cursor data or failed position conversions
 * - Clamps positions to valid document range [0, docSize]
 * - Preserves updatedAt timestamp if cursor position hasn't changed
 * - Removes stale entries (inactive beyond staleTimeoutMs) from previousState map
 * - Returns empty map if provider, awareness, editorState, or ySync plugin is unavailable
 */
export declare function normalizeAwarenessStates(options: {
    provider: CollaborationProviderLike;
    editorState: EditorState | null;
    previousState: Map<number, RemoteCursorState>;
    fallbackColors: readonly string[];
    staleTimeoutMs: number;
}): Map<number, RemoteCursorState>;
export {};
//# sourceMappingURL=RemoteCursorAwareness.d.ts.map