@univerjs-pro/collaboration-client 0.2.5 → 0.2.7

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.
@@ -1,22 +1,25 @@
1
- import { IUniverInstanceService, RxDisposable, ThemeService } from '@univerjs/core';
2
- import { IRenderManagerService } from '@univerjs/engine-render';
1
+ import { DocumentDataModel, ICommandService, RxDisposable, ThemeService } from '@univerjs/core';
2
+ import { IRenderContext, IRenderModule } 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 {
10
- private readonly _collabCursorController;
11
- private readonly _univerInstanceService;
12
- private readonly _renderManagerService;
9
+ export declare class DocCollabCursorRenderController extends RxDisposable implements IRenderModule {
10
+ private readonly _context;
13
11
  private readonly _docSkeletonManagerService;
12
+ private readonly _collabCursorController;
13
+ private readonly _commandService;
14
14
  private readonly _themeService;
15
15
  /** Cursors stored for different Workbooks. */
16
+ private _cursorShapes;
16
17
  private _cursors;
17
- constructor(_collabCursorController: CollabCursorController, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _themeService: ThemeService);
18
+ constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService, _collabCursorController: CollabCursorController, _commandService: ICommandService, _themeService: ThemeService);
18
19
  private _init;
19
20
  private _updateCollabCursors;
21
+ private _refreshCollabCursors;
20
22
  private _removeCollabCursors;
21
- private _getDocObject;
23
+ private _initCommandExecutedListener;
24
+ private _initResize;
22
25
  }
@@ -1,21 +1,20 @@
1
- import { IUniverInstanceService, RxDisposable, ThemeService } from '@univerjs/core';
2
- import { IRenderManagerService } from '@univerjs/engine-render';
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
- private get _sheetSkeletonManagerService();
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;
@@ -0,0 +1,3 @@
1
+ import { IMutationInfo } from '@univerjs/core';
2
+
3
+ export declare const EmptyMutationInfo: IMutationInfo;
@@ -1,11 +1,11 @@
1
- import { Ctor, DependencyOverride, ILogService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
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
  }
@@ -21,7 +21,8 @@ export declare class DocCollabCursor {
21
21
  private _render;
22
22
  private _drawAnchor;
23
23
  private _handleHover;
24
- private _drawRange;
24
+ private _drawTextRange;
25
+ private _drawRectRange;
25
26
  private _getAnchorBounding;
26
27
  private _getScale;
27
28
  }