@liveblocks/core 1.2.2-test4 → 1.2.2-test5

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
@@ -856,6 +856,7 @@ declare type YDocUpdate = {
856
856
  readonly type: ServerMsgCode.UPDATE_YDOC;
857
857
  readonly update: string;
858
858
  readonly isSync: boolean;
859
+ readonly stateVector: string | null;
859
860
  };
860
861
  /**
861
862
  * Sent by the WebSocket server and broadcasted to all clients to announce that
package/dist/index.d.ts CHANGED
@@ -856,6 +856,7 @@ declare type YDocUpdate = {
856
856
  readonly type: ServerMsgCode.UPDATE_YDOC;
857
857
  readonly update: string;
858
858
  readonly isSync: boolean;
859
+ readonly stateVector: string | null;
859
860
  };
860
861
  /**
861
862
  * Sent by the WebSocket server and broadcasted to all clients to announce that
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/version.ts
2
2
  var PKG_NAME = "@liveblocks/core";
3
- var PKG_VERSION = "1.2.2-test4";
3
+ var PKG_VERSION = "1.2.2-test5";
4
4
  var PKG_FORMAT = "cjs";
5
5
 
6
6
  // src/dupe-detection.ts
@@ -5280,10 +5280,14 @@ ${Array.from(traces).join("\n\n")}`
5280
5280
  };
5281
5281
  }
5282
5282
  function fetchYDoc(vector) {
5283
- context.buffer.messages.push({
5284
- type: 300 /* FETCH_YDOC */,
5285
- vector
5286
- });
5283
+ if (!context.buffer.messages.find((m) => {
5284
+ return m.type === 300 /* FETCH_YDOC */ && m.vector === vector;
5285
+ })) {
5286
+ context.buffer.messages.push({
5287
+ type: 300 /* FETCH_YDOC */,
5288
+ vector
5289
+ });
5290
+ }
5287
5291
  flushNowOrSoon();
5288
5292
  }
5289
5293
  function undo() {