@loro-dev/flock 4.4.0 → 4.4.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.d.mts CHANGED
@@ -122,8 +122,7 @@ declare class Flock {
122
122
  private inner;
123
123
  private listeners;
124
124
  private nativeUnsubscribe;
125
- /** Debounce state for autoDebounceCommit */
126
- private debounceState;
125
+ private readonly eventBatcher;
127
126
  constructor(peerId?: string);
128
127
  private static fromInner;
129
128
  static fromJson(bundle: ExportBundle, peerId: string): Flock;
@@ -192,8 +191,7 @@ declare class Flock {
192
191
  scan(options?: ScanOptions): ScanRow[];
193
192
  private ensureNativeSubscription;
194
193
  private handleBatch;
195
- private emitBatch;
196
- private resetDebounceTimer;
194
+ private deliverBatch;
197
195
  subscribe(listener: (batch: EventBatch) => void): () => void;
198
196
  /**
199
197
  * Enable auto-debounce mode. Events will be accumulated and emitted after
@@ -250,6 +248,7 @@ declare class Flock {
250
248
  * @returns The return value of the callback
251
249
  * @throws Error if nested transaction attempted
252
250
  * @throws Error if import is called during the transaction (auto-commits first)
251
+ * @throws Error if called while autoDebounceCommit is active
253
252
  *
254
253
  * @example
255
254
  * ```ts
package/dist/index.d.ts CHANGED
@@ -122,8 +122,7 @@ declare class Flock {
122
122
  private inner;
123
123
  private listeners;
124
124
  private nativeUnsubscribe;
125
- /** Debounce state for autoDebounceCommit */
126
- private debounceState;
125
+ private readonly eventBatcher;
127
126
  constructor(peerId?: string);
128
127
  private static fromInner;
129
128
  static fromJson(bundle: ExportBundle, peerId: string): Flock;
@@ -192,8 +191,7 @@ declare class Flock {
192
191
  scan(options?: ScanOptions): ScanRow[];
193
192
  private ensureNativeSubscription;
194
193
  private handleBatch;
195
- private emitBatch;
196
- private resetDebounceTimer;
194
+ private deliverBatch;
197
195
  subscribe(listener: (batch: EventBatch) => void): () => void;
198
196
  /**
199
197
  * Enable auto-debounce mode. Events will be accumulated and emitted after
@@ -250,6 +248,7 @@ declare class Flock {
250
248
  * @returns The return value of the callback
251
249
  * @throws Error if nested transaction attempted
252
250
  * @throws Error if import is called during the transaction (auto-commits first)
251
+ * @throws Error if called while autoDebounceCommit is active
253
252
  *
254
253
  * @example
255
254
  * ```ts