@fileverse-dev/ddoc 3.0.64-rtc-patch-1 → 3.0.65-export-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.
Files changed (28) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.es.js +27782 -25648
  3. package/dist/package/components/export-modal.d.ts +4 -5
  4. package/dist/package/extensions/font-family-persistence.d.ts +11 -0
  5. package/dist/package/extensions/typography-persistence.d.ts +22 -0
  6. package/dist/package/hooks/use-ddoc-export.d.ts +6 -1
  7. package/dist/package/hooks/use-export-headless-editor-content.d.ts +31 -0
  8. package/dist/package/hooks/use-headless-editor.d.ts +3 -2
  9. package/dist/package/hooks/use-rtc-websocket-disconnector.d.ts +1 -0
  10. package/dist/package/hooks/use-tab-editor.d.ts +2 -2
  11. package/dist/package/hooks/use-yjs-setup.d.ts +3 -3
  12. package/dist/package/sync-local/actions/index.d.ts +137 -0
  13. package/dist/package/sync-local/actions/syncMachineActions.d.ts +1 -0
  14. package/dist/package/sync-local/constants/config.d.ts +7 -0
  15. package/dist/package/sync-local/constants/index.d.ts +5 -0
  16. package/dist/package/sync-local/guards/syncMachineGuards.d.ts +10 -0
  17. package/dist/package/sync-local/index.d.ts +6 -3
  18. package/dist/package/sync-local/services/syncMachineServices.d.ts +19 -0
  19. package/dist/package/sync-local/socketClient.d.ts +26 -17
  20. package/dist/package/sync-local/syncMachine.d.ts +13 -0
  21. package/dist/package/sync-local/types/index.d.ts +120 -85
  22. package/dist/package/sync-local/useSyncMachine.d.ts +38 -0
  23. package/dist/package/sync-local/utils/createAwarenessUpdateHandler.d.ts +3 -3
  24. package/dist/package/use-ddoc-editor.d.ts +2 -2
  25. package/dist/style.css +1 -1
  26. package/package.json +7 -3
  27. package/dist/package/sync-local/SyncManager.d.ts +0 -52
  28. package/dist/package/sync-local/useSyncManager.d.ts +0 -13
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.0.64-rtc-patch-1",
5
+ "version": "3.0.65-export-1",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -76,6 +76,8 @@
76
76
  "@tiptap/suggestion": "^3.11.0",
77
77
  "@types/uuid": "^10.0.0",
78
78
  "@ucans/ucans": "^0.12.0",
79
+ "@xstate-ninja/react": "^1.1.3",
80
+ "@xstate/react": "^3.2.2",
79
81
  "base64-js": "^1.5.1",
80
82
  "classnames": "^2.5.1",
81
83
  "color": "^5.0.3",
@@ -93,7 +95,7 @@
93
95
  "mammoth": "^1.10.0",
94
96
  "markdown-it-footnote": "^4.0.0",
95
97
  "ollama": "^0.5.14",
96
- "socket.io-client": "^4.7.5",
98
+ "partysocket": "^1.0.2",
97
99
  "platform": "^1.3.6",
98
100
  "prosemirror-model": "^1.21.0",
99
101
  "prosemirror-state": "^1.4.3",
@@ -109,6 +111,8 @@
109
111
  "vaul": "^0.9.1",
110
112
  "vite-plugin-dts": "^3.6.3",
111
113
  "ws": "^8.18.0",
114
+ "xstate": "^4.38.2",
115
+ "xstate-ninja": "^1.3.10",
112
116
  "y-indexeddb": "^9.0.12",
113
117
  "y-prosemirror": "^1.2.5",
114
118
  "y-protocols": "^1.0.6",
@@ -152,4 +156,4 @@
152
156
  "typescript": "^5.2.2",
153
157
  "vite": "^5.0.0"
154
158
  }
155
- }
159
+ }
@@ -1,52 +0,0 @@
1
- import { SyncManagerConfig, ConnectConfig, SyncManagerSnapshot } from './types';
2
-
3
- export declare class SyncManager {
4
- private onStateChange;
5
- private _status;
6
- private _isConnected;
7
- private _isReady;
8
- private _errorMessage;
9
- private _awareness;
10
- private _initialDocumentDecryptionState;
11
- private socketClient;
12
- private roomKey;
13
- private roomKeyBytes;
14
- private isOwner;
15
- private updateQueue;
16
- private uncommittedUpdatesIdList;
17
- private contentTobeAppliedQueue;
18
- private isProcessing;
19
- private errorCount;
20
- private _awarenessUpdateHandler;
21
- private ydoc;
22
- private onError?;
23
- private onCollaborationConnectCallback?;
24
- private onCollaborationCommit?;
25
- private onFetchCommitContent?;
26
- private onSessionTerminated?;
27
- private onUnMergedUpdates?;
28
- private onLocalUpdate?;
29
- constructor(config: SyncManagerConfig, onStateChange: (snapshot: SyncManagerSnapshot) => void);
30
- private notify;
31
- private setStatus;
32
- connect(config: ConnectConfig): Promise<void>;
33
- disconnect(): Promise<void>;
34
- terminateSession(): Promise<void>;
35
- enqueueLocalUpdate(update: Uint8Array): void;
36
- initializeAwareness(): void;
37
- forceCleanup(): void;
38
- private handleReconnection;
39
- private connectSocket;
40
- private syncLatestCommit;
41
- private commitLocalContents;
42
- private broadcastLocalContents;
43
- private processUpdateQueue;
44
- private processNextUpdate;
45
- private processCommit;
46
- private handleRemoteContentUpdate;
47
- private applyRemoteYjsUpdate;
48
- private applyQueuedRemoteContents;
49
- private withRetry;
50
- private disconnectInternal;
51
- private reset;
52
- }
@@ -1,13 +0,0 @@
1
- import { SyncManagerConfig, SyncStatus, ConnectConfig } from './types';
2
-
3
- export declare const useSyncManager: (config: SyncManagerConfig) => {
4
- connect: (connectConfig: ConnectConfig) => void;
5
- disconnect: () => void;
6
- terminateSession: () => void;
7
- isConnected: boolean;
8
- isReady: boolean;
9
- error: string;
10
- awareness: import('y-protocols/awareness.js').Awareness | null;
11
- hasCollabContentInitialised: boolean;
12
- status: SyncStatus;
13
- };