UNPKG

open-collaboration-service-process

Version:

A service process for integrating non Typescript projects with the Open Collaboration Tools project

30 lines 1.63 kB
import * as types from 'open-collaboration-protocol'; import { DisposableCollection } from 'open-collaboration-protocol'; import { OpenCollaborationYjsProvider } from 'open-collaboration-yjs'; import * as Y from 'yjs'; import * as awarenessProtocol from 'y-protocols/awareness'; import { ClientTextSelection, TextDocumentInsert } from './messages.js'; import { MessageConnection } from 'vscode-jsonrpc'; export declare class CollaborationInstance implements types.Disposable { currentConnection: types.ProtocolBroadcastConnection; protected communicationHandler: MessageConnection; protected host: boolean; protected peers: Map<string, types.Peer>; protected hostInfo: types.Deferred<types.Peer>; protected peerInfo: types.Peer; protected yjsProvider?: OpenCollaborationYjsProvider; protected YjsDoc: Y.Doc; protected yjsAwareness: awarenessProtocol.Awareness; private yjsMutex; protected connectionDisposables: DisposableCollection; protected identity: types.Deferred<types.Peer>; constructor(currentConnection: types.ProtocolBroadcastConnection, communicationHandler: MessageConnection, host: boolean, workspace?: types.Workspace); registerYjsObject(type: string, documentPath: string, text: string): Promise<void>; updateYjsObjectContent(documentPath: string, changes: TextDocumentInsert[]): void; private selectionState; checkSelectionUpdated(): void; updateYjsObjectSelection(documentPath: string, clientSelections: ClientTextSelection[]): void; private setSharedSelection; dispose(): void; } //# sourceMappingURL=collaboration-instance.d.ts.map