@fileverse-dev/ddoc 5.1.0 → 5.1.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.
@@ -29,6 +29,14 @@ export declare class SyncManager {
29
29
  private hydrationIncomplete;
30
30
  private wireFormat;
31
31
  private lastReportedWriteFormat;
32
+ private sessionGen;
33
+ private sendFailures;
34
+ private sendRetryTimer;
35
+ private lastConnectConfig;
36
+ private resumable;
37
+ private resuming;
38
+ private resumeFailures;
39
+ private nextResumeAt;
32
40
  getWireFormat(): WireFormat;
33
41
  private encryptForWire;
34
42
  private emitWireTelemetry;
@@ -54,6 +62,7 @@ export declare class SyncManager {
54
62
  updateRefs(_services: CollabServices | undefined, callbacks: CollabCallbacks | undefined, onLocalUpdate?: (updatedDocContent: string, updateChunk: string) => void): void;
55
63
  get isConnected(): boolean;
56
64
  get isReady(): boolean;
65
+ get isResuming(): boolean;
57
66
  get awareness(): Awareness | null;
58
67
  get status(): CollabStatus;
59
68
  get collabState(): CollabState;
@@ -64,6 +73,11 @@ export declare class SyncManager {
64
73
  private runEntryActions;
65
74
  connect(config: CollabConnectionConfig): Promise<void>;
66
75
  disconnect(): Promise<void>;
76
+ /** Reopens a session that ended on a transient loss (see dropToResumableIdle). A cheap
77
+ * no-op in every other state, so hosts can call it on each local edit, tab focus and
78
+ * network return. */
79
+ resume(): void;
80
+ private dropToResumableIdle;
67
81
  /** Owner rename mid-session — see SocketClient.updateDocumentMeta. */
68
82
  updateTitle(args: {
69
83
  encryptedTitle: string;
@@ -80,11 +94,16 @@ export declare class SyncManager {
80
94
  private flushUpdates;
81
95
  private awaitFlush;
82
96
  /**
83
- * Fire-and-forget: merge all queued updates, encrypt, and emit via Socket.IO
84
- * without awaiting the server ACK. The server broadcasts to peers immediately
85
- * (before MongoDB write), so content reaches observers in near-real-time.
97
+ * Live path: merge the queued updates, encrypt, and emit via Socket.IO without waiting on
98
+ * earlier acks, so peers see typing at the flush cadence. A batch the server does not ack
99
+ * is re-queued, never dropped.
86
100
  */
87
101
  private sendUpdateBatch;
102
+ private takeBatch;
103
+ private isUndeliverable;
104
+ private requeueUnacked;
105
+ private markSendSucceeded;
106
+ private scheduleSendRetry;
88
107
  private sendUpdateBatchAttempt;
89
108
  private isRevocationResponse;
90
109
  private isSessionTerminatedResponse;
@@ -112,6 +131,7 @@ export declare class SyncManager {
112
131
  private cleanupAwareness;
113
132
  private broadcastLocalContents;
114
133
  private processUpdateQueue;
134
+ private removeFromQueue;
115
135
  private processNextUpdate;
116
136
  private handleRemoteContentUpdate;
117
137
  private applyRemoteYjsUpdate;
@@ -57,7 +57,9 @@ export declare class SocketClient {
57
57
  private _socket;
58
58
  private _webSocketStatus;
59
59
  private _isIntentionalDisconnect;
60
+ private _pendingAckFailures;
60
61
  get isConnected(): boolean;
62
+ get isSocketOpen(): boolean;
61
63
  get status(): SocketStatusEnum;
62
64
  private _websocketServiceDid;
63
65
  private roomId;
@@ -94,6 +96,7 @@ export declare class SocketClient {
94
96
  registerAwareness(awareness: Awareness): void;
95
97
  private _stampSocketId;
96
98
  private _emitWithAck;
99
+ private _failPendingAcks;
97
100
  private _fetchRoomMembers;
98
101
  private _recomputePresence;
99
102
  sendUpdate({ update }: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "5.1.0",
5
+ "version": "5.1.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/fileverse/fileverse-ddocs.git"
@@ -197,4 +197,4 @@
197
197
  "vitest": "^2.1.0",
198
198
  "yjs": "13.6.30"
199
199
  }
200
- }
200
+ }