import { Editor } from '../../../core/Editor.js'; import { PartChangedEvent } from '../../../core/parts/types.js'; /** * Part-sync publisher: local part mutations → Yjs `parts` map. * * Subscribes to `partChanged` events from the mutation core. Writes * `{ v, clientId, data }` envelopes to the Yjs `parts` map. * * During compound mutations (`_compoundDepth > 0`), events are buffered * and flushed in a single Yjs transaction on compound success. */ import * as Y from 'yjs'; export interface PartPublisher { /** Publish immediately or buffer depending on compound depth. */ handlePartChanged(event: PartChangedEvent): void; /** Flush buffered compound events to Yjs. Called on compound success. */ flush(): void; /** Drop buffered compound events. Called on compound failure. */ drop(): void; /** Tear down listeners. */ destroy(): void; } export declare function createPartPublisher(editor: Editor, ydoc: Y.Doc, options?: { stalenessWindowMs?: number; }): PartPublisher; //# sourceMappingURL=publisher.d.ts.map