@liveblocks/core 1.10.1 → 1.10.3

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
@@ -206,6 +206,8 @@ declare enum WebsocketCloseCodes {
206
206
  MAX_NUMBER_OF_MESSAGES_PER_DAY_PER_APP = 4004,
207
207
  /** Room is full, disconnect */
208
208
  MAX_NUMBER_OF_CONCURRENT_CONNECTIONS_PER_ROOM = 4005,
209
+ /** The room's ID was updated, disconnect */
210
+ ROOM_ID_UPDATED = 4006,
209
211
  /** The server kicked the connection from the room. */
210
212
  KICKED = 4100,
211
213
  /** The auth token is expired, reauthorize to get a fresh one. In spirit akin to HTTP 401 */
package/dist/index.d.ts CHANGED
@@ -206,6 +206,8 @@ declare enum WebsocketCloseCodes {
206
206
  MAX_NUMBER_OF_MESSAGES_PER_DAY_PER_APP = 4004,
207
207
  /** Room is full, disconnect */
208
208
  MAX_NUMBER_OF_CONCURRENT_CONNECTIONS_PER_ROOM = 4005,
209
+ /** The room's ID was updated, disconnect */
210
+ ROOM_ID_UPDATED = 4006,
209
211
  /** The server kicked the connection from the room. */
210
212
  KICKED = 4100,
211
213
  /** The auth token is expired, reauthorize to get a fresh one. In spirit akin to HTTP 401 */
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "1.10.1";
9
+ var PKG_VERSION = "1.10.3";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -668,6 +668,7 @@ var WebsocketCloseCodes = /* @__PURE__ */ ((WebsocketCloseCodes2) => {
668
668
  WebsocketCloseCodes2[WebsocketCloseCodes2["MAX_NUMBER_OF_CONCURRENT_CONNECTIONS"] = 4003] = "MAX_NUMBER_OF_CONCURRENT_CONNECTIONS";
669
669
  WebsocketCloseCodes2[WebsocketCloseCodes2["MAX_NUMBER_OF_MESSAGES_PER_DAY_PER_APP"] = 4004] = "MAX_NUMBER_OF_MESSAGES_PER_DAY_PER_APP";
670
670
  WebsocketCloseCodes2[WebsocketCloseCodes2["MAX_NUMBER_OF_CONCURRENT_CONNECTIONS_PER_ROOM"] = 4005] = "MAX_NUMBER_OF_CONCURRENT_CONNECTIONS_PER_ROOM";
671
+ WebsocketCloseCodes2[WebsocketCloseCodes2["ROOM_ID_UPDATED"] = 4006] = "ROOM_ID_UPDATED";
671
672
  WebsocketCloseCodes2[WebsocketCloseCodes2["KICKED"] = 4100] = "KICKED";
672
673
  WebsocketCloseCodes2[WebsocketCloseCodes2["TOKEN_EXPIRED"] = 4109] = "TOKEN_EXPIRED";
673
674
  WebsocketCloseCodes2[WebsocketCloseCodes2["CLOSE_WITHOUT_RETRY"] = 4999] = "CLOSE_WITHOUT_RETRY";
@@ -3980,15 +3981,14 @@ var LiveObject = class _LiveObject extends AbstractCrdt {
3980
3981
  constructor(obj = {}) {
3981
3982
  super();
3982
3983
  this._propToLastUpdate = /* @__PURE__ */ new Map();
3983
- for (const key in obj) {
3984
- const value = obj[key];
3985
- if (value === void 0) {
3986
- continue;
3987
- } else if (isLiveNode(value)) {
3984
+ const o = compactObject(obj);
3985
+ for (const key of Object.keys(o)) {
3986
+ const value = o[key];
3987
+ if (isLiveNode(value)) {
3988
3988
  value._setParentLink(this, key);
3989
3989
  }
3990
3990
  }
3991
- this._map = new Map(Object.entries(obj));
3991
+ this._map = new Map(Object.entries(o));
3992
3992
  }
3993
3993
  /** @internal */
3994
3994
  static _buildRootAndParentToChildren(items) {