@univerjs-pro/collaboration-client 0.2.4-alpha.0 → 0.2.4
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/__tests__/doc-collab-cursor.controller.spec.d.ts +2 -1
- package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +2 -1
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-entity.d.ts +2 -1
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-entity.d.ts +2 -1
- package/lib/types/controllers/collab-status/collab-status.controller.d.ts +2 -1
- package/lib/types/controllers/collaboration/__tests__/mock-text-selection-render-manager.service.d.ts +1 -1
- package/lib/types/controllers/collaboration/__tests__/mocks.d.ts +2 -1
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +2 -1
- package/lib/types/controllers/collaboration/collaboration.controller.d.ts +2 -1
- package/lib/types/index.d.ts +4 -0
- package/lib/types/models/cursor.d.ts +3 -1
- package/lib/types/plugin.d.ts +2 -1
- package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +2 -1
- package/lib/types/services/ime-cache-transform/doc-transform-ime-cache.service.d.ts +1 -1
- package/lib/types/services/local-cache/local-cache.service.d.ts +1 -1
- package/lib/types/services/permission/permission.service.d.ts +2 -1
- package/lib/types/services/range-selection/sheet-transform-selections.service.d.ts +1 -1
- package/lib/types/services/single-active-unit/single-active-unit.service.d.ts +1 -1
- package/lib/types/services/socket/collaboration-socket.service.d.ts +1 -1
- package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +1 -1
- package/lib/types/services/url/url.service.d.ts +1 -1
- package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +29 -27
package/lib/types/controllers/collab-cursor/__tests__/doc-collab-cursor.controller.spec.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { DocumentDataModel,
|
1
|
+
import { DocumentDataModel, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
2
3
|
import { Nullable } from 'vitest';
|
3
4
|
import { DocumentViewModel, IRenderManagerService, DocumentSkeleton, IRender, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
4
5
|
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
2
3
|
import { Observable } from 'rxjs';
|
3
4
|
import { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
|
4
5
|
import { CollaborationSessionService } from '../../services/collaboration-session/collaboration-session.service';
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { ICommandService,
|
1
|
+
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { ICollaborationUser, ITransformService } from '@univerjs-pro/collaboration';
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
3
4
|
import { IDocCollabCursor } from '../../models/cursor';
|
4
5
|
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session.service';
|
5
6
|
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { ICommandService,
|
1
|
+
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { RefRangeService } from '@univerjs/sheets';
|
3
3
|
import { ICollaborationUser } from '@univerjs-pro/collaboration';
|
4
|
+
import { Injector } from '@wendellhu/redi';
|
4
5
|
import { ISheetCollabCursor } from '../../models/cursor';
|
5
6
|
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session.service';
|
6
7
|
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import { Disposable,
|
1
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
2
2
|
import { IUIPartsService } from '@univerjs/ui';
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
3
4
|
import { BehaviorSubject } from 'rxjs';
|
4
5
|
import { CollaborationController } from '../collaboration/collaboration.controller';
|
5
6
|
import { CollaborationStatus } from '../collaboration/collaboration-state';
|
@@ -7,4 +7,4 @@ export declare class TextSelectionRenderManager {
|
|
7
7
|
removeAllTextRanges(): void;
|
8
8
|
addTextRanges(): void;
|
9
9
|
}
|
10
|
-
export declare const ITextSelectionRenderManager: import('@
|
10
|
+
export declare const ITextSelectionRenderManager: import('@wendellhu/redi').IdentifierDecorator<TextSelectionRenderManager>;
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { ILocalStorageService, Nullable, ILogService } from '@univerjs/core';
|
2
2
|
import { IMessageOptions, IMessageProps } from '@univerjs/design';
|
3
3
|
import { IBeforeCloseService, IMessageService, INotificationService } from '@univerjs/ui';
|
4
4
|
import { ICombResponseEvent } from '@univerjs-pro/collaboration';
|
5
|
+
import { IDisposable } from '@wendellhu/redi';
|
5
6
|
import { Subject } from 'rxjs';
|
6
7
|
import { ICollaborationSocket, ICollaborationSocketService } from '../../../services/socket/collaboration-socket.service';
|
7
8
|
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { IMutationInfo, Nullable, ICommandService, IConfigService, ILogService,
|
1
|
+
import { IMutationInfo, Nullable, ICommandService, IConfigService, ILogService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
2
2
|
import { INotificationService } from '@univerjs/ui';
|
3
3
|
import { IAcknowledgedChangeset, IChangeset, ITransformService, RevisionService } from '@univerjs-pro/collaboration';
|
4
4
|
import { UniverType } from '@univerjs/protocol';
|
5
|
+
import { Injector } from '@wendellhu/redi';
|
5
6
|
import { LocalCacheService } from '../../services/local-cache/local-cache.service';
|
6
7
|
import { MemberService } from '../../services/member/member.service';
|
7
8
|
import { ICollaborativeUndoRedoService } from '../../services/undoredo/collaborative-undoredo.service';
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { IMutationInfo, Nullable, ICommandService, ILogService, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { IMessageService } from '@univerjs/ui';
|
3
3
|
import { CompressMutationService, RevisionService } from '@univerjs-pro/collaboration';
|
4
4
|
import { UniverType } from '@univerjs/protocol';
|
5
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
5
6
|
import { Observable, BehaviorSubject } from 'rxjs';
|
6
7
|
import { DocStateChangeManagerService } from '@univerjs/docs';
|
7
8
|
import { CollaborationSession, CollaborationSessionService } from '../../services/collaboration-session/collaboration-session.service';
|
package/lib/types/index.d.ts
CHANGED
@@ -13,4 +13,8 @@ export { DesktopCollaborationStatusDisplayController } from './controllers/colla
|
|
13
13
|
export { AUTHZ_URL_KEY, AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
|
14
14
|
export { deserializeToCombResponse, serializeCombRequest } from './services/socket/serialize';
|
15
15
|
export { CollaborationStatusDisplay } from './views/components/CollabStatus';
|
16
|
+
export { SnapshotServerOverHTTPService } from './services/snapshot-server/snapshot-server.service';
|
16
17
|
export { CommentService } from './services/comment/comment.service';
|
18
|
+
export { SheetCollaborationEntity } from './controllers/collaboration/collaboration.controller';
|
19
|
+
export { SheetCollabCursorShape, type ISheetCollabCursorShapeProps } from './views/shapes/sheet-collab-cursor.shape';
|
20
|
+
export { ImageIoService } from './services/image-remote/image-io.service';
|
@@ -5,7 +5,7 @@ import { ITextRangeWithStyle } from '@univerjs/engine-render';
|
|
5
5
|
* The data structure to store collab cursor info of sheet.
|
6
6
|
*/
|
7
7
|
export interface ISheetCollabCursor {
|
8
|
-
/**
|
8
|
+
/** Stroke color of this collab cursor */
|
9
9
|
color: string;
|
10
10
|
/** Position of this cursor */
|
11
11
|
range: IRange;
|
@@ -15,6 +15,8 @@ export interface ISheetCollabCursor {
|
|
15
15
|
selection: string;
|
16
16
|
/** Worksheet ID */
|
17
17
|
sheetID: string;
|
18
|
+
/** Background color of this collab cursor */
|
19
|
+
backgroundColor?: string;
|
18
20
|
}
|
19
21
|
/**
|
20
22
|
* The data structure to store collab cursor info of doc.
|
package/lib/types/plugin.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { DependencyOverride, ILogService, Plugin, UniverInstanceType } from '@univerjs/core';
|
2
|
+
import { Ctor, Injector } from '@wendellhu/redi';
|
2
3
|
import { ICollaborationSocketService } from './services/socket/collaboration-socket.service';
|
3
4
|
|
4
5
|
export interface ICollaborationClientPluginConfig {
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { Nullable, Disposable, IConfigService, ILogService, LocaleService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { IBeforeCloseService, IMessageService } from '@univerjs/ui';
|
3
3
|
import { ICollaborationEvent } from '@univerjs-pro/collaboration';
|
4
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
4
5
|
import { Observable } from 'rxjs';
|
5
6
|
import { MemberService } from '../member/member.service';
|
6
7
|
import { ICollaborationSocket, ICollaborationSocketService } from '../socket/collaboration-socket.service';
|
@@ -32,7 +32,7 @@ export declare class LocalCacheService extends Disposable {
|
|
32
32
|
private _scheduleSaving;
|
33
33
|
private _getSaveTimeout;
|
34
34
|
private _saveCache;
|
35
|
-
|
35
|
+
exhaustSavingTask(): Promise<void>;
|
36
36
|
private _setupBeforeClosingHandler;
|
37
37
|
}
|
38
38
|
export declare function getLocalCacheKey(unitID: string): string;
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { Injector
|
1
|
+
import { Injector } from '@wendellhu/redi';
|
2
|
+
import { IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
2
3
|
import { CollaborationSessionService } from '../collaboration-session/collaboration-session.service';
|
3
4
|
|
4
5
|
export declare class PermissionService extends RxDisposable {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IChangeset, ITransformService } from '@univerjs-pro/collaboration';
|
2
|
-
import { Injector } from '@
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
3
3
|
|
4
4
|
export declare function extractTargetFromFirstChangeset(changeset: IChangeset): {
|
5
5
|
unitId: string;
|
@@ -6,7 +6,7 @@ import { Observable } from 'rxjs';
|
|
6
6
|
* especially when the there is not access to the internet. There is a great chance of loosing
|
7
7
|
* offline data! So we should make there is only one active unit at a time.
|
8
8
|
*/
|
9
|
-
export declare const ISingleActiveUnitService: import('@
|
9
|
+
export declare const ISingleActiveUnitService: import('@wendellhu/redi').IdentifierDecorator<ISingleActiveUnitService>;
|
10
10
|
export interface ISingleActiveUnitService {
|
11
11
|
editingUnit: (unitID: string) => void;
|
12
12
|
getUnitStatus$: (unitID: string) => Observable<UnitStatus>;
|
@@ -16,7 +16,7 @@ export interface ICollaborationSocket extends Pick<ISocket, 'open$' | 'error$' |
|
|
16
16
|
export interface ICollaborationSocketService {
|
17
17
|
createSocket: (url: string) => Nullable<ICollaborationSocket>;
|
18
18
|
}
|
19
|
-
export declare const ICollaborationSocketService: import('@
|
19
|
+
export declare const ICollaborationSocketService: import('@wendellhu/redi').IdentifierDecorator<ICollaborationSocketService>;
|
20
20
|
export declare class CollaborationSocketService implements ICollaborationSocketService {
|
21
21
|
protected readonly _http: HTTPService;
|
22
22
|
protected readonly _ws: WebSocketService;
|
@@ -10,4 +10,4 @@ export interface IURLService {
|
|
10
10
|
removeParam: (key: string, useReplace?: boolean) => void;
|
11
11
|
urlChange$: Observable<void>;
|
12
12
|
}
|
13
|
-
export declare const IURLService: import('@
|
13
|
+
export declare const IURLService: import('@wendellhu/redi').IdentifierDecorator<IURLService>;
|
@@ -16,6 +16,7 @@ export declare class SheetCollabCursorShape<T extends ISheetCollabCursorShapePro
|
|
16
16
|
private _range;
|
17
17
|
private _name;
|
18
18
|
private _labelPosition;
|
19
|
+
private _backgroundColor?;
|
19
20
|
constructor(key?: string, props?: T);
|
20
21
|
setShapeProps(props: Partial<ISheetCollabCursorShapeProps>): void;
|
21
22
|
onMouseMove(position: {
|