@fileverse-dev/ddoc 3.0.60-patch-1 → 3.0.60-patch-2

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.
@@ -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
- };