import { Editor } from '../../../core/Editor.js'; import { PartPublisher } from './publisher.js'; import { PartConsumer } from './consumer.js'; /** * Part-sync bootstrap: setup and teardown of publisher + consumer. * * Manages the lifecycle of part synchronization, including: * - Room capability check (mixed-version protection) * - Migration from `meta.docx` when needed * - Seeding from local converter for new/empty rooms * - Initial hydration from Yjs `parts` map * - Publisher and consumer activation */ import * as Y from 'yjs'; export interface PartSyncHandle { publisher: PartPublisher | null; consumer: PartConsumer | null; destroy(): void; } /** * Bootstrap part-sync for a collaborative editor session. * * Decision tree: * 1. Parts + capability → hydrate * 2. Parts, no capability → backfill capability + hydrate * 3. No parts, meta.docx exists → migrate + hydrate * 4. No parts, no meta.docx → seed from local converter * 5. Hydration/seed succeeded → activate publisher + consumer * 6. Critical hydration failure → emit degraded event, return noop (document sync continues) */ export declare function bootstrapPartSync(editor: Editor, ydoc: Y.Doc): PartSyncHandle; //# sourceMappingURL=bootstrap.d.ts.map