@univerjs-pro/collaboration-client 0.2.7 → 0.2.9
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 +0 -1
- package/lib/types/controllers/collab-cursor/collab-cursor.controller.d.ts +0 -1
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-entity.d.ts +0 -1
- package/lib/types/controllers/collab-cursor/doc-collab-cursor-render.controller.d.ts +0 -1
- package/lib/types/controllers/collab-cursor/serialize-text-ranges.d.ts +0 -1
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-entity.d.ts +0 -1
- package/lib/types/controllers/collab-cursor/sheet-collab-cursor-render.controller.d.ts +0 -1
- package/lib/types/controllers/collab-status/collab-status.controller.d.ts +0 -1
- package/lib/types/controllers/collaboration/__tests__/collaboration.controller.spec.d.ts +0 -1
- package/lib/types/controllers/collaboration/__tests__/mock-text-selection-render-manager.service.d.ts +0 -1
- package/lib/types/controllers/collaboration/__tests__/mocks.d.ts +0 -1
- package/lib/types/controllers/collaboration/collaboration-state.d.ts +0 -1
- package/lib/types/controllers/collaboration/collaboration.controller.d.ts +0 -1
- package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +0 -1
- package/lib/types/controllers/collaboration/utils/empty.d.ts +0 -1
- package/lib/types/controllers/data-loader/data-loader.controller.d.ts +0 -1
- package/lib/types/controllers/file-name/file-name.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/models/cursor.d.ts +0 -1
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/auth-server/auth-server.service.d.ts +0 -1
- package/lib/types/services/auth-server/authz-io-http.service.d.ts +0 -1
- package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +0 -1
- package/lib/types/services/color-assign/color-assign.service.d.ts +0 -1
- package/lib/types/services/comment/comment.service.d.ts +0 -1
- package/lib/types/services/image-remote/image-io.service.d.ts +3 -3
- package/lib/types/services/ime-cache-transform/doc-transform-ime-cache.service.d.ts +0 -1
- package/lib/types/services/local-cache/local-cache.service.d.ts +0 -1
- package/lib/types/services/member/member.service.d.ts +0 -1
- package/lib/types/services/permission/permission.service.d.ts +0 -1
- package/lib/types/services/range-selection/sheet-transform-selections.service.d.ts +0 -1
- package/lib/types/services/single-active-unit/single-active-unit.service.d.ts +0 -1
- package/lib/types/services/snapshot-server/snapshot-server.service.d.ts +0 -1
- package/lib/types/services/socket/collaboration-socket.service.d.ts +0 -1
- package/lib/types/services/socket/serialize.d.ts +0 -1
- package/lib/types/services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service.d.ts +0 -1
- package/lib/types/services/text-selection/doc-transform-selections.service.d.ts +0 -1
- package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +0 -1
- package/lib/types/services/url/url.service.d.ts +0 -1
- package/lib/types/services/url/web-url.service.d.ts +0 -1
- package/lib/types/views/components/CollabStatus.d.ts +0 -1
- package/lib/types/views/components/CollabStatus.stories.d.ts +0 -1
- package/lib/types/views/shapes/doc-collab-cursor.d.ts +0 -1
- package/lib/types/views/shapes/sheet-collab-cursor.shape.d.ts +0 -1
- package/lib/types/views/shapes/text-bubble.shape.d.ts +0 -1
- package/lib/umd/index.js +1 -1
- package/package.json +27 -27
package/lib/types/controllers/collab-cursor/__tests__/doc-collab-cursor.controller.spec.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { DocumentDataModel, Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { Nullable } from 'vitest';
|
3
3
|
import { DocumentViewModel, IRenderManagerService, DocumentSkeleton, IRender, IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
4
|
-
|
5
4
|
export declare class MockRenderManagerService implements Pick<IRenderManagerService, 'getRenderById'> {
|
6
5
|
private readonly _injector;
|
7
6
|
constructor(_injector: Injector);
|
@@ -2,7 +2,6 @@ import { Injector, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
3
3
|
import { IDocCollabCursor, ISheetCollabCursor } from '../../models/cursor';
|
4
4
|
import { CollaborationSessionService } from '../../services/collaboration-session/collaboration-session.service';
|
5
|
-
|
6
5
|
/**
|
7
6
|
* This controller adds collaboration cursors to Univer. It works with `CollabCursorRenderController`.
|
8
7
|
*
|
@@ -5,7 +5,6 @@ import { CollaborationSession } from '../../services/collaboration-session/colla
|
|
5
5
|
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
6
6
|
import { MemberService } from '../../services/member/member.service';
|
7
7
|
import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
|
8
|
-
|
9
8
|
/**
|
10
9
|
* Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
|
11
10
|
*/
|
@@ -2,7 +2,6 @@ import { DocumentDataModel, ICommandService, RxDisposable, ThemeService } from '
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
3
|
import { DocSkeletonManagerService } from '@univerjs/docs';
|
4
4
|
import { CollabCursorController } from './collab-cursor.controller';
|
5
|
-
|
6
5
|
/**
|
7
6
|
* This controller works with `CollabCursorController` to render doc collaboration cursors.
|
8
7
|
*/
|
@@ -5,7 +5,6 @@ import { ISheetCollabCursor } from '../../models/cursor';
|
|
5
5
|
import { CollaborationSession } from '../../services/collaboration-session/collaboration-session.service';
|
6
6
|
import { ColorAssignService } from '../../services/color-assign/color-assign.service';
|
7
7
|
import { MemberService } from '../../services/member/member.service';
|
8
|
-
|
9
8
|
/**
|
10
9
|
* Each univer document instance would map to an `CollabCursorEntity` to handle collaborated editing events.
|
11
10
|
*/
|
@@ -2,7 +2,6 @@ import { Workbook, RxDisposable, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
3
|
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
4
4
|
import { CollabCursorController } from './collab-cursor.controller';
|
5
|
-
|
6
5
|
/**
|
7
6
|
* This controller works with `CollabCursorController` to render sheet collaboration cursors.
|
8
7
|
*/
|
@@ -3,7 +3,6 @@ import { IUIPartsService } from '@univerjs/ui';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
4
4
|
import { CollaborationController } from '../collaboration/collaboration.controller';
|
5
5
|
import { CollaborationStatus } from '../collaboration/collaboration-state';
|
6
|
-
|
7
6
|
/**
|
8
7
|
* This controller is responsible for monitoring the collaboration status of the currently focused unit.
|
9
8
|
*/
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Nullable } from '@univerjs/core';
|
2
2
|
import { ITextSelectionInnerParam } from '@univerjs/engine-render';
|
3
|
-
|
4
3
|
export declare class TextSelectionRenderManager {
|
5
4
|
private readonly _textSelectionInner$;
|
6
5
|
readonly textSelectionInner$: import('rxjs').Observable<Nullable<ITextSelectionInnerParam>>;
|
@@ -4,7 +4,6 @@ import { IBeforeCloseService, IMessageService, INotificationService } from '@uni
|
|
4
4
|
import { ICombResponseEvent } from '@univerjs-pro/collaboration';
|
5
5
|
import { Subject } from 'rxjs';
|
6
6
|
import { ICollaborationSocket, ICollaborationSocketService } from '../../../services/socket/collaboration-socket.service';
|
7
|
-
|
8
7
|
/**
|
9
8
|
* The handler object for a mocked socket connection. You can terminate, send messages / error through this object.
|
10
9
|
*/
|
@@ -6,7 +6,6 @@ import { LocalCacheService } from '../../services/local-cache/local-cache.servic
|
|
6
6
|
import { MemberService } from '../../services/member/member.service';
|
7
7
|
import { ICollaborativeUndoRedoService } from '../../services/undoredo/collaborative-undoredo.service';
|
8
8
|
import { ICollabEditingCursor } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
|
9
|
-
|
10
9
|
/** Provide both states when and after changing, so the parent could examine if state transition is correct. */
|
11
10
|
export type StateChangeHandler = (before: CollaborationState, after: CollaborationState) => void;
|
12
11
|
/** A network interface to send changeset and */
|
@@ -12,7 +12,6 @@ import { DocTransformSelectionsService } from '../../services/text-selection/doc
|
|
12
12
|
import { DocSyncEditingCollabCursorService } from '../../services/sync-editing-collab-cursor/doc-sync-editing-collab-cursor.service';
|
13
13
|
import { SheetTransformSelectionsService } from '../../services/range-selection/sheet-transform-selections.service';
|
14
14
|
import { CollaborationState, ICollaborationStateHandler, CollaborationStatus } from './collaboration-state';
|
15
|
-
|
16
15
|
export declare class CollaborationController extends RxDisposable {
|
17
16
|
private readonly _injector;
|
18
17
|
private readonly _collabSessionService;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { IMutationInfo, IUniverInstanceService } from '@univerjs/core';
|
2
2
|
import { IChangeset, RevisionService } from '@univerjs-pro/collaboration';
|
3
3
|
import { MemberService } from '../../../services/member/member.service';
|
4
|
-
|
5
4
|
export interface IAssembledChangeset {
|
6
5
|
changeset: IChangeset;
|
7
6
|
pendingMutations: IMutationInfo[];
|
@@ -3,7 +3,6 @@ import { IRemoteInstanceService } from '@univerjs/rpc';
|
|
3
3
|
import { SnapshotService } from '@univerjs-pro/collaboration';
|
4
4
|
import { LocalCacheService } from '../../services/local-cache/local-cache.service';
|
5
5
|
import { IURLService } from '../../services/url/url.service';
|
6
|
-
|
7
6
|
/**
|
8
7
|
* This controller loads data when URL changes.
|
9
8
|
*/
|
package/lib/types/plugin.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Ctor, DependencyOverride, ILogService, Injector, Plugin } from '@univerjs/core';
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
3
3
|
import { ICollaborationSocketService } from './services/socket/collaboration-socket.service';
|
4
|
-
|
5
4
|
export interface ICollaborationClientPluginConfig {
|
6
5
|
socketService?: Ctor<ICollaborationSocketService>;
|
7
6
|
enableOfflineEditing?: boolean;
|
@@ -19,7 +18,7 @@ export declare class UniverCollaborationClientPlugin extends Plugin {
|
|
19
18
|
protected _injector: Injector;
|
20
19
|
static pluginName: string;
|
21
20
|
constructor(_config: ICollaborationClientPluginConfig | undefined, _logService: ILogService, _renderManagerService: IRenderManagerService, _injector: Injector);
|
22
|
-
onStarting(
|
21
|
+
onStarting(): void;
|
23
22
|
onRendered(): void;
|
24
23
|
private _registerDependencies;
|
25
24
|
private _registerRenderDependencies;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { IAuthzIoService, Disposable, IConfigService } from '@univerjs/core';
|
2
2
|
import { HTTPService } from '@univerjs/network';
|
3
3
|
import { IActionInfo, IAllowedRequest, IBatchAllowedResponse, ICollaborator, ICreateCollaboratorRequest, ICreateRequest, IDeleteCollaboratorRequest, IListCollaboratorRequest, IListPermPointRequest, IListPermPointResponse, IListRolesRequest, IPutCollaboratorsRequest, IUnitRoleKV, IUpdateCollaboratorRequest, IUpdatePermPointRequest, UnitAction } from '@univerjs/protocol';
|
4
|
-
|
5
4
|
/**
|
6
5
|
* The config key to determined the URL provided by the author server.
|
7
6
|
* The URL should not ends with a slash.
|
@@ -5,7 +5,6 @@ import { Observable } from 'rxjs';
|
|
5
5
|
import { MemberService } from '../member/member.service';
|
6
6
|
import { ICollaborationSocket, ICollaborationSocketService } from '../socket/collaboration-socket.service';
|
7
7
|
import { CommentService } from '../comment/comment.service';
|
8
|
-
|
9
8
|
export declare enum SessionStatus {
|
10
9
|
IDLE = 0,
|
11
10
|
JOINING = 1,
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import { Nullable, IConfigService } from '@univerjs/core';
|
1
|
+
import { Nullable, IConfigService, IUniverInstanceService } from '@univerjs/core';
|
2
2
|
import { IImageIoService, IImageIoServiceParam, ImageSourceType } from '@univerjs/drawing';
|
3
3
|
import { HTTPService } from '@univerjs/network';
|
4
4
|
import { IError } from '@univerjs/protocol';
|
5
5
|
import { Observable } from 'rxjs';
|
6
|
-
|
7
6
|
export declare const ALLOW_IMAGE_LIST: string[];
|
8
7
|
export declare const EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY = "EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY";
|
9
8
|
export declare const EXCHANGE_SIGN_URL_SERVER_URL_KEY = "EXCHANGE_SIGN_URL_SERVER_URL_KEY";
|
@@ -14,10 +13,11 @@ export interface ISignUrlResponse {
|
|
14
13
|
export declare class ImageIoService implements IImageIoService {
|
15
14
|
private readonly _httpService;
|
16
15
|
private readonly _configService;
|
16
|
+
private readonly _univerInstanceService;
|
17
17
|
private _waitCount;
|
18
18
|
private _change$;
|
19
19
|
change$: Observable<number>;
|
20
|
-
constructor(_httpService: HTTPService, _configService: IConfigService);
|
20
|
+
constructor(_httpService: HTTPService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
|
21
21
|
setWaitCount(count: number): void;
|
22
22
|
private _imageSourceCache;
|
23
23
|
getImageSourceCache(source: string, imageSourceType: ImageSourceType): HTMLImageElement | undefined;
|
@@ -2,7 +2,6 @@ import { IMutationInfo, Nullable, Disposable, IConfigService, ILocalStorageServi
|
|
2
2
|
import { IBeforeCloseService } from '@univerjs/ui';
|
3
3
|
import { IChangeset, RevisionService } from '@univerjs-pro/collaboration';
|
4
4
|
import { UniverType } from '@univerjs/protocol';
|
5
|
-
|
6
5
|
export interface IUnitCacheData {
|
7
6
|
unitID: string;
|
8
7
|
type: UniverType;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Injector, IPermissionService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
2
2
|
import { CollaborationSessionService } from '../collaboration-session/collaboration-session.service';
|
3
|
-
|
4
3
|
export declare class PermissionService extends RxDisposable {
|
5
4
|
private _injector;
|
6
5
|
private _univerInstanceService;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
2
2
|
import { Observable } from 'rxjs';
|
3
|
-
|
4
3
|
/**
|
5
4
|
* It is not recommended to open multiple units in different browser tabs at the same time,
|
6
5
|
* especially when the there is not access to the internet. There is a great chance of loosing
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { ILogContext, ISnapshotServerService, IConfigService } from '@univerjs/core';
|
2
2
|
import { HTTPService } from '@univerjs/network';
|
3
3
|
import { IFetchMissingChangesetsRequest, IFetchMissingChangesetsResponse, IGetResourcesRequest, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetResponse, ISaveSheetBlockResponse, ISaveSnapshotResponse } from '@univerjs/protocol';
|
4
|
-
|
5
4
|
export declare class SnapshotServerOverHTTPService implements ISnapshotServerService {
|
6
5
|
private readonly _configService;
|
7
6
|
private readonly _httpService;
|
@@ -3,7 +3,6 @@ import { ISocket, HTTPService, WebSocketService } from '@univerjs/network';
|
|
3
3
|
import { ICombRequestEvent, ICombResponseEvent, IFetchingMissEvent, ISubmitChangesetEvent } from '@univerjs-pro/collaboration';
|
4
4
|
import { IChangeset } from '@univerjs/protocol';
|
5
5
|
import { Observable } from 'rxjs';
|
6
|
-
|
7
6
|
export interface ICollaborationSocket extends Pick<ISocket, 'open$' | 'error$' | 'close$'> {
|
8
7
|
memberID: string;
|
9
8
|
message$: Observable<ICombResponseEvent>;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { IUndoRedoService, ICommandService, IContextService, ILogService, IUniverInstanceService, LocalUndoRedoService } from '@univerjs/core';
|
2
2
|
import { IChangeset, ITransformService } from '@univerjs-pro/collaboration';
|
3
|
-
|
4
3
|
/**
|
5
4
|
* `LocalUndoRedoService` cannot transform mutations in the undo redo stack under collaboration conditions.
|
6
5
|
*/
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { RxDisposable } from '@univerjs/core';
|
2
2
|
import { Observable } from 'rxjs';
|
3
3
|
import { IURLService } from './url.service';
|
4
|
-
|
5
4
|
export declare class WebURLService extends RxDisposable implements IURLService {
|
6
5
|
readonly urlChange$: Observable<void>;
|
7
6
|
constructor();
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Observable } from 'rxjs';
|
2
2
|
import { CollaborationStatus } from '../../controllers/collaboration/collaboration-state';
|
3
|
-
|
4
3
|
export interface IOnlineStatusProps {
|
5
4
|
/** The collaboration state of the currently focused unit. */
|
6
5
|
status$: Observable<CollaborationStatus>;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Meta } from '@storybook/react';
|
2
2
|
import { default as React } from 'react';
|
3
3
|
import { CollaborationStatusDisplay } from './CollabStatus';
|
4
|
-
|
5
4
|
declare const meta: Meta<typeof CollaborationStatusDisplay>;
|
6
5
|
export default meta;
|
7
6
|
export declare const Playground: {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { IMouseEvent, IPointerEvent, IShapeProps, Shape } from '@univerjs/engine-render';
|
2
2
|
import { ISheetCollabCursor } from '../../models/cursor';
|
3
|
-
|
4
3
|
export declare const SHEET_COLLAB_CURSOR_ZINDEX = 1;
|
5
4
|
export declare const SHEET_COLLAB_CURSOR_BORDER_WIDTH = 1.5;
|
6
5
|
export interface ISheetCollabCursorShapeProps extends IShapeProps, ISheetCollabCursor {
|