@fileverse-dev/ddoc 2.3.0-rtc-patch-12 → 2.3.0-rtc-patch-14
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/{ccip-Bd1RV-pb.mjs → ccip-DqF8xd6Y.mjs} +1 -1
- package/dist/{index-DzFllHX1.mjs → index-DpHrthQW.mjs} +25552 -25519
- package/dist/index.es.js +1 -1
- package/dist/package/sync-local/actions/index.d.ts +1 -0
- package/dist/package/sync-local/socketClient.d.ts +2 -0
- package/dist/package/sync-local/types/index.d.ts +1 -0
- package/dist/package/sync-local/useSyncMachine.d.ts +3 -31
- package/dist/package/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -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:
|
48
|
-
isReady:
|
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
|
};
|
package/dist/package/types.d.ts
CHANGED
@@ -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;
|