@fileverse-dev/ddoc 2.3.0-rtc-patch-13 → 2.3.0-rtc-patch-15

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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-CaAn_0OI.mjs";
1
+ import { D as d, E as r, P as s, R as a, h as t, u as i } from "./index-DpHrthQW.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as Editor,
@@ -24,6 +24,7 @@ export declare const websocketInitializer: (context: SyncMachineContext, event:
24
24
  wsUrl: any;
25
25
  onCollaborationCommit: (file: File) => Promise<string>;
26
26
  onFetchCommitContent: (cid: string) => Promise<any>;
27
+ onSessionTerminated: () => void;
27
28
  };
28
29
  export declare const yjsUpdateHandler: (context: SyncMachineContext, event: SyncMachinEvent) => {
29
30
  uncommittedUpdatesIdList?: undefined;
@@ -59,9 +59,11 @@ export declare class SocketClient {
59
59
  private _handleHandShake;
60
60
  private _executeRequestCallback;
61
61
  private _dispatchEventHandler;
62
+ private _onSessionTerminated;
62
63
  private _processMessage;
63
64
  private _clearSequenceCallbackMap;
64
65
  connectSocket(): Promise<void> | undefined;
65
66
  init(config: ISocketInitConfig): Promise<void>;
67
+ private resetSocketClient;
66
68
  }
67
69
  export {};
@@ -63,6 +63,7 @@ export interface SyncMachineContext {
63
63
  onCollaborationConnectCallback: (response: any) => void;
64
64
  onCollaborationCommit: (file: File) => Promise<string>;
65
65
  onFetchCommitContent: (cid: string) => Promise<any>;
66
+ onSessionTerminated: () => void;
66
67
  }
67
68
  export interface ErrorResponseMessage {
68
69
  status: boolean;
@@ -17,41 +17,13 @@ interface IConnectConf {
17
17
  };
18
18
  }
19
19
  export declare const useSyncMachine: (config: Partial<SyncMachineContext>) => {
20
- machine: (import('xstate').State<SyncMachineContext, {
21
- type: string;
22
- data: any;
23
- }, any, {
24
- value: any;
25
- context: SyncMachineContext;
26
- }, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, {
27
- type: string;
28
- data: any;
29
- }, import('xstate').BaseActionObject, import('xstate').ServiceMap>> | ((event: import("xstate").SCXML.Event<{
30
- type: string;
31
- data: any;
32
- }> | import('xstate').SingleOrArray<import('xstate').Event<{
33
- type: string;
34
- data: any;
35
- }>>, payload?: import('xstate').EventData) => import('xstate').State<SyncMachineContext, {
36
- type: string;
37
- data: any;
38
- }, any, {
39
- value: any;
40
- context: SyncMachineContext;
41
- }, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, {
42
- type: string;
43
- data: any;
44
- }, import('xstate').BaseActionObject, import('xstate').ServiceMap>>))[];
45
20
  connect: (connectConfig: IConnectConf) => void;
46
21
  disconnect: () => void;
47
- isConnected: boolean;
48
- isReady: boolean;
22
+ isConnected: any;
23
+ isReady: any;
49
24
  getYjsEncodedState: () => string;
50
25
  applyYjsEncodedState: (update: string) => void;
51
- error: {
52
- message: string;
53
- } | null;
54
- context: any;
26
+ error: any;
55
27
  terminateSession: () => void;
56
28
  awareness: any;
57
29
  };
@@ -157,6 +157,7 @@ export interface DdocProps extends CommentAccountProps {
157
157
  onCollaborationConnectCallback?: (response: any) => void;
158
158
  onCollaborationCommit?: (file: File) => Promise<string>;
159
159
  onFetchCommitContent?: (cid: string) => Promise<any>;
160
+ onCollabSessionTermination?: () => void;
160
161
  }
161
162
  export interface IEditorSelectionData {
162
163
  from: number;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "2.3.0-rtc-patch-13",
5
+ "version": "2.3.0-rtc-patch-15",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {