@univerjs-pro/collaboration-client 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-render.controller.d.ts +6 -7
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-render.controller.d.ts +7 -8
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +3 -1
- package/lib/types/controllers/collaboration/utils/empty.d.ts +3 -0
- package/lib/types/plugin.d.ts +7 -3
- package/lib/umd/index.js +1 -1
- package/package.json +26 -26
@@ -1,22 +1,21 @@
|
|
1
|
-
import {
|
2
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
1
|
+
import { DocumentDataModel, RxDisposable, ThemeService } from '@univerjs/core';
|
2
|
+
import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
|
3
3
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
4
4
|
import { CollabCursorController } from './collab-cursor.controller';
|
5
5
|
|
6
6
|
/**
|
7
7
|
* This controller works with `CollabCursorController` to render doc collaboration cursors.
|
8
8
|
*/
|
9
|
-
export declare class DocCollabCursorRenderController extends RxDisposable {
|
9
|
+
export declare class DocCollabCursorRenderController extends RxDisposable implements IRenderModule {
|
10
|
+
private readonly _context;
|
11
|
+
private readonly _docSkeletonManagerService;
|
10
12
|
private readonly _collabCursorController;
|
11
|
-
private readonly _univerInstanceService;
|
12
13
|
private readonly _renderManagerService;
|
13
|
-
private readonly _docSkeletonManagerService;
|
14
14
|
private readonly _themeService;
|
15
15
|
/** Cursors stored for different Workbooks. */
|
16
16
|
private _cursors;
|
17
|
-
constructor(
|
17
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService, _collabCursorController: CollabCursorController, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
18
18
|
private _init;
|
19
19
|
private _updateCollabCursors;
|
20
20
|
private _removeCollabCursors;
|
21
|
-
private _getDocObject;
|
22
21
|
}
|
@@ -1,21 +1,20 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { Workbook, RxDisposable, ThemeService } from '@univerjs/core';
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
|
+
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
3
4
|
import { CollabCursorController } from './collab-cursor.controller';
|
4
5
|
|
5
6
|
/**
|
6
7
|
* This controller works with `CollabCursorController` to render sheet collaboration cursors.
|
7
8
|
*/
|
8
|
-
export declare class SheetCollabCursorRenderController extends RxDisposable {
|
9
|
+
export declare class SheetCollabCursorRenderController extends RxDisposable implements IRenderModule {
|
10
|
+
private readonly _context;
|
11
|
+
private readonly _sheetSkeletonManagerService;
|
9
12
|
private readonly _collabCursorController;
|
10
|
-
private readonly _univerInstanceService;
|
11
|
-
private readonly _renderManagerService;
|
12
13
|
private readonly _themeService;
|
13
14
|
/** Cursors stored for different Workbooks. */
|
14
15
|
private _cursors;
|
15
16
|
private _lastPointer;
|
16
|
-
|
17
|
-
private get _unitId();
|
18
|
-
constructor(_collabCursorController: CollabCursorController, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
17
|
+
constructor(_context: IRenderContext<Workbook>, _sheetSkeletonManagerService: SheetSkeletonManagerService, _collabCursorController: CollabCursorController, _themeService: ThemeService);
|
19
18
|
private _init;
|
20
19
|
private _updateCollabCursors;
|
21
20
|
private _removeCollabCursors;
|
@@ -110,10 +110,12 @@ export declare abstract class CollaborationState {
|
|
110
110
|
export declare class SyncedState extends CollaborationState {
|
111
111
|
private readonly _injector;
|
112
112
|
private readonly _logService;
|
113
|
+
private readonly _transformService;
|
113
114
|
readonly status = CollaborationStatus.SYNCED;
|
114
|
-
constructor(unitID: string, type: UniverType, handler: ICollaborationStateHandler, revisionService: RevisionService, localCacheService: LocalCacheService, _injector: Injector, undoRedoService: ICollaborativeUndoRedoService, commandService: ICommandService, _logService: ILogService);
|
115
|
+
constructor(unitID: string, type: UniverType, handler: ICollaborationStateHandler, revisionService: RevisionService, localCacheService: LocalCacheService, _injector: Injector, undoRedoService: ICollaborativeUndoRedoService, commandService: ICommandService, _logService: ILogService, _transformService: ITransformService);
|
115
116
|
appendMutation(mutation: IMutationInfo): CollaborationState;
|
116
117
|
onRemoteChangeset(changeset: IChangeset): CollaborationState;
|
118
|
+
private _onConflict;
|
117
119
|
onRemoteAck(): never;
|
118
120
|
onRemoteRej(): CollaborationState;
|
119
121
|
toggleOffline(): CollaborationState;
|
package/lib/types/plugin.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { Ctor, DependencyOverride, ILogService, Injector, Plugin
|
1
|
+
import { Ctor, DependencyOverride, ILogService, Injector, Plugin } from '@univerjs/core';
|
2
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
2
3
|
import { ICollaborationSocketService } from './services/socket/collaboration-socket.service';
|
3
4
|
|
4
5
|
export interface ICollaborationClientPluginConfig {
|
5
6
|
socketService?: Ctor<ICollaborationSocketService>;
|
6
7
|
enableOfflineEditing?: boolean;
|
7
8
|
enableSingleActiveInstanceLock?: boolean;
|
8
|
-
collaborationUniverTypes?: UniverInstanceType[];
|
9
9
|
enableAuthServer?: boolean;
|
10
10
|
/**
|
11
11
|
* Override internal modules with custom implementations.
|
@@ -15,9 +15,13 @@ export interface ICollaborationClientPluginConfig {
|
|
15
15
|
export declare class UniverCollaborationClientPlugin extends Plugin {
|
16
16
|
private readonly _config;
|
17
17
|
private readonly _logService;
|
18
|
+
private readonly _renderManagerService;
|
18
19
|
protected _injector: Injector;
|
19
20
|
static pluginName: string;
|
20
|
-
constructor(_config: ICollaborationClientPluginConfig | undefined, _logService: ILogService, _injector: Injector);
|
21
|
+
constructor(_config: ICollaborationClientPluginConfig | undefined, _logService: ILogService, _renderManagerService: IRenderManagerService, _injector: Injector);
|
21
22
|
onStarting(injector: Injector): void;
|
23
|
+
onRendered(): void;
|
24
|
+
private _registerDependencies;
|
25
|
+
private _registerRenderDependencies;
|
22
26
|
private _initModules;
|
23
27
|
}
|