@liveblocks/core 0.19.8 → 0.19.9-beta1

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.ts CHANGED
@@ -1292,12 +1292,13 @@ declare enum ServerMsgCode {
1292
1292
  BROADCASTED_EVENT = 103,
1293
1293
  ROOM_STATE = 104,
1294
1294
  INITIAL_STORAGE_STATE = 200,
1295
- UPDATE_STORAGE = 201
1295
+ UPDATE_STORAGE = 201,
1296
+ REJECT_STORAGE_OP = 299
1296
1297
  }
1297
1298
  /**
1298
1299
  * Messages that can be sent from the server to the client.
1299
1300
  */
1300
- declare type ServerMsg<TPresence extends JsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json> = UpdatePresenceServerMsg<TPresence> | UserJoinServerMsg<TUserMeta> | UserLeftServerMsg | BroadcastedEventServerMsg<TRoomEvent> | RoomStateServerMsg<TUserMeta> | InitialDocumentStateServerMsg | UpdateStorageServerMsg;
1301
+ declare type ServerMsg<TPresence extends JsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json> = UpdatePresenceServerMsg<TPresence> | UserJoinServerMsg<TUserMeta> | UserLeftServerMsg | BroadcastedEventServerMsg<TRoomEvent> | RoomStateServerMsg<TUserMeta> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | RejectedStorageOpServerMsg;
1301
1302
  /**
1302
1303
  * Sent by the WebSocket server and broadcasted to all clients to announce that
1303
1304
  * a User updated their presence. For example, when a user moves their cursor.
@@ -1429,6 +1430,16 @@ declare type UpdateStorageServerMsg = {
1429
1430
  readonly type: ServerMsgCode.UPDATE_STORAGE;
1430
1431
  readonly ops: Op[];
1431
1432
  };
1433
+ /**
1434
+ * Sent by the WebSocket server to the client to indicate that certain opIds
1435
+ * have been received but were rejected because they caused mutations that are
1436
+ * incompatible with the Room's schema.
1437
+ */
1438
+ declare type RejectedStorageOpServerMsg = {
1439
+ readonly type: ServerMsgCode.REJECT_STORAGE_OP;
1440
+ readonly opIds: string[];
1441
+ readonly reason: string;
1442
+ };
1432
1443
 
1433
1444
  /**
1434
1445
  * Lookup table for nodes (= SerializedCrdt values) by their IDs.
package/dist/index.js CHANGED
@@ -113,7 +113,7 @@ if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
113
113
  var onMessageFromPanel = eventSource.observable;
114
114
 
115
115
  // src/devtools/index.ts
116
- var VERSION = true ? "0.19.8" : "dev";
116
+ var VERSION = true ? "0.19.9-beta1" : "dev";
117
117
  var _devtoolsSetupHasRun = false;
118
118
  function setupDevTools(getAllRooms) {
119
119
  if (process.env.NODE_ENV === "production" || typeof window === "undefined") {
@@ -2695,6 +2695,7 @@ var ServerMsgCode = /* @__PURE__ */ ((ServerMsgCode2) => {
2695
2695
  ServerMsgCode2[ServerMsgCode2["ROOM_STATE"] = 104] = "ROOM_STATE";
2696
2696
  ServerMsgCode2[ServerMsgCode2["INITIAL_STORAGE_STATE"] = 200] = "INITIAL_STORAGE_STATE";
2697
2697
  ServerMsgCode2[ServerMsgCode2["UPDATE_STORAGE"] = 201] = "UPDATE_STORAGE";
2698
+ ServerMsgCode2[ServerMsgCode2["REJECT_STORAGE_OP"] = 299] = "REJECT_STORAGE_OP";
2698
2699
  return ServerMsgCode2;
2699
2700
  })(ServerMsgCode || {});
2700
2701
 
@@ -4117,7 +4118,7 @@ function prepareCreateWebSocket(liveblocksServer, WebSocketPolyfill) {
4117
4118
  const ws = WebSocketPolyfill || WebSocket;
4118
4119
  return (token) => {
4119
4120
  return new ws(
4120
- `${liveblocksServer}/?token=${token}&version=${true ? "0.19.8" : "dev"}`
4121
+ `${liveblocksServer}/?token=${token}&version=${true ? "0.19.9-beta1" : "dev"}`
4121
4122
  );
4122
4123
  };
4123
4124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liveblocks/core",
3
- "version": "0.19.8",
3
+ "version": "0.19.9-beta1",
4
4
  "description": "Shared code and foundational internals for Liveblocks",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",