import { AwarenessLike, CollaborationConfig, CollaborationTransport } from 'pptx-viewer-shared'; /** A transport-agnostic view of a live Yjs provider. */ export interface CollabProviderHandle { /** The provider's awareness instance (local/remote presence). */ awareness: AwarenessLike; /** * Subscribe to connection-status changes. The callback receives whether the * transport currently reports a connection. Only meaningful for websocket; * webrtc callers rely on {@link connectedNow} instead. */ onStatus: (cb: (connected: boolean) => void) => void; /** Whether the transport reports a connection immediately after creation. */ connectedNow: boolean; /** * Subscribe to the provider's initial-document-sync confirmation. Websocket * fires reliably once the server sync completes; webrtc only fires when a * peer syncs with us (a lone fresh-room peer never receives one, so callers * pair this with a grace timer, see the shared createSyncGate). */ onSynced: (cb: () => void) => void; /** Whether the provider already reports its initial sync as complete. */ syncedNow: boolean; /** Tear the provider down (disconnect + destroy). */ destroy: () => void; } /** The minimal Y.Doc surface both providers accept. */ type YDocInput = ConstructorParameters[2]; /** * Create and return a normalised provider handle for the requested transport. * Callers must destroy any previous provider first: y-webrtc throws when the * same room is joined twice within one page. */ export declare function createCollabProvider(transport: CollaborationTransport, config: CollaborationConfig, doc: YDocInput): Promise; export {}; //# sourceMappingURL=collaboration-provider.d.ts.map