@fileverse-dev/ddoc 3.0.62 → 3.0.64-rtc-patch-1
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 +25401 -27156
- package/dist/package/extensions/mardown-paste-handler/mark-down-html-guard-plugin.d.ts +3 -0
- package/dist/package/hooks/use-tab-editor.d.ts +2 -2
- package/dist/package/hooks/use-yjs-setup.d.ts +3 -3
- package/dist/package/sync-local/SyncManager.d.ts +52 -0
- package/dist/package/sync-local/index.d.ts +3 -6
- package/dist/package/sync-local/socketClient.d.ts +17 -26
- package/dist/package/sync-local/types/index.d.ts +85 -120
- package/dist/package/sync-local/useSyncManager.d.ts +13 -0
- package/dist/package/sync-local/utils/createAwarenessUpdateHandler.d.ts +3 -3
- package/dist/package/use-ddoc-editor.d.ts +2 -2
- package/package.json +2 -6
- package/dist/package/hooks/use-rtc-websocket-disconnector.d.ts +0 -1
- package/dist/package/sync-local/actions/index.d.ts +0 -137
- package/dist/package/sync-local/actions/syncMachineActions.d.ts +0 -1
- package/dist/package/sync-local/constants/config.d.ts +0 -7
- package/dist/package/sync-local/constants/index.d.ts +0 -5
- package/dist/package/sync-local/guards/syncMachineGuards.d.ts +0 -10
- package/dist/package/sync-local/services/syncMachineServices.d.ts +0 -19
- package/dist/package/sync-local/syncMachine.d.ts +0 -13
- package/dist/package/sync-local/useSyncMachine.d.ts +0 -38
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SyncMachineContext } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare const syncMachineGuards: {
|
|
4
|
-
isUserConnected: (context: SyncMachineContext) => boolean;
|
|
5
|
-
hasMoreUpdates: (context: SyncMachineContext) => boolean;
|
|
6
|
-
isOwner: (context: SyncMachineContext) => boolean;
|
|
7
|
-
errorIsLessThanRetryCount: (context: SyncMachineContext) => boolean;
|
|
8
|
-
shouldRetryConnection: (context: SyncMachineContext) => boolean;
|
|
9
|
-
shouldRefetchCommit: (context: SyncMachineContext) => boolean;
|
|
10
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Sender } from 'xstate';
|
|
2
|
-
import { SyncMachineContext, SyncMachinEvent } from '../types';
|
|
3
|
-
|
|
4
|
-
export declare const syncMachineServices: {
|
|
5
|
-
connectSocket: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
|
|
6
|
-
disconnectSocket: (context: SyncMachineContext) => () => Promise<void>;
|
|
7
|
-
processNextUpdate: (context: SyncMachineContext) => () => Promise<{
|
|
8
|
-
updateId: string | undefined;
|
|
9
|
-
queueOffset: number;
|
|
10
|
-
} | undefined>;
|
|
11
|
-
processCommit: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
|
|
12
|
-
syncLatestCommitFromIpfs: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<{
|
|
13
|
-
ids: string[];
|
|
14
|
-
unbroadcastedUpdate: string | null;
|
|
15
|
-
}>;
|
|
16
|
-
broadcastLocalContents: (context: SyncMachineContext, event: SyncMachinEvent) => () => Promise<boolean>;
|
|
17
|
-
commitLocalContents: (context: SyncMachineContext, event: SyncMachinEvent) => (send: Sender<SyncMachinEvent>) => Promise<string | undefined>;
|
|
18
|
-
verifyConnectionState: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
|
|
19
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SyncMachineContext } from './types';
|
|
2
|
-
|
|
3
|
-
declare const syncMachine: import('xstate').StateMachine<SyncMachineContext, any, {
|
|
4
|
-
type: string;
|
|
5
|
-
data: any;
|
|
6
|
-
}, {
|
|
7
|
-
value: any;
|
|
8
|
-
context: SyncMachineContext;
|
|
9
|
-
}, import('xstate').BaseActionObject, import('xstate').ServiceMap, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, {
|
|
10
|
-
type: string;
|
|
11
|
-
data: any;
|
|
12
|
-
}, import('xstate').BaseActionObject, import('xstate').ServiceMap>>;
|
|
13
|
-
export default syncMachine;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { SyncMachineContext } from '.';
|
|
2
|
-
|
|
3
|
-
export interface IConnectConf {
|
|
4
|
-
username?: string;
|
|
5
|
-
roomKey: string;
|
|
6
|
-
roomId: string;
|
|
7
|
-
isOwner: boolean;
|
|
8
|
-
ownerEdSecret?: string;
|
|
9
|
-
contractAddress?: string;
|
|
10
|
-
ownerAddress?: string;
|
|
11
|
-
isEns?: boolean;
|
|
12
|
-
wsUrl: string;
|
|
13
|
-
roomInfo?: {
|
|
14
|
-
documentTitle: string;
|
|
15
|
-
portalAddress: string;
|
|
16
|
-
commentKey: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare const useSyncMachine: (config: Partial<SyncMachineContext>) => {
|
|
20
|
-
connect: (connectConfig: IConnectConf) => void;
|
|
21
|
-
disconnect: () => void;
|
|
22
|
-
isConnected: any;
|
|
23
|
-
isReady: boolean;
|
|
24
|
-
error: any;
|
|
25
|
-
terminateSession: () => void;
|
|
26
|
-
awareness: any;
|
|
27
|
-
hasCollabContentInitialised: boolean;
|
|
28
|
-
state: import('xstate').State<SyncMachineContext, {
|
|
29
|
-
type: string;
|
|
30
|
-
data: any;
|
|
31
|
-
}, any, {
|
|
32
|
-
value: any;
|
|
33
|
-
context: SyncMachineContext;
|
|
34
|
-
}, import('xstate').ResolveTypegenMeta<import('xstate').TypegenDisabled, {
|
|
35
|
-
type: string;
|
|
36
|
-
data: any;
|
|
37
|
-
}, import('xstate').BaseActionObject, import('xstate').ServiceMap>>;
|
|
38
|
-
};
|