@liveblocks/core 3.13.0-vincent2 → 3.13.0-vincent3
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.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2523,6 +2523,7 @@ declare const ServerMsgCode: Readonly<{
|
|
|
2523
2523
|
ROOM_STATE: 104;
|
|
2524
2524
|
STORAGE_STATE_V7: 200;
|
|
2525
2525
|
STORAGE_CHUNK: 210;
|
|
2526
|
+
STORAGE_STREAM_END: 211;
|
|
2526
2527
|
UPDATE_STORAGE: 201;
|
|
2527
2528
|
UPDATE_YDOC: 300;
|
|
2528
2529
|
THREAD_CREATED: 400;
|
|
@@ -2544,6 +2545,7 @@ declare namespace ServerMsgCode {
|
|
|
2544
2545
|
type ROOM_STATE = typeof ServerMsgCode.ROOM_STATE;
|
|
2545
2546
|
type STORAGE_STATE_V7 = typeof ServerMsgCode.STORAGE_STATE_V7;
|
|
2546
2547
|
type STORAGE_CHUNK = typeof ServerMsgCode.STORAGE_CHUNK;
|
|
2548
|
+
type STORAGE_STREAM_END = typeof ServerMsgCode.STORAGE_STREAM_END;
|
|
2547
2549
|
type UPDATE_STORAGE = typeof ServerMsgCode.UPDATE_STORAGE;
|
|
2548
2550
|
type UPDATE_YDOC = typeof ServerMsgCode.UPDATE_YDOC;
|
|
2549
2551
|
type THREAD_CREATED = typeof ServerMsgCode.THREAD_CREATED;
|
|
@@ -2560,7 +2562,7 @@ declare namespace ServerMsgCode {
|
|
|
2560
2562
|
/**
|
|
2561
2563
|
* Messages that can be sent from the server to the client.
|
|
2562
2564
|
*/
|
|
2563
|
-
type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
|
|
2565
|
+
type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | StorageEndServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
|
|
2564
2566
|
type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
|
|
2565
2567
|
type ThreadCreatedEvent = {
|
|
2566
2568
|
type: ServerMsgCode.THREAD_CREATED;
|
|
@@ -2747,24 +2749,24 @@ type StorageStateServerMsg_V7 = {
|
|
|
2747
2749
|
};
|
|
2748
2750
|
/**
|
|
2749
2751
|
* Sent by the WebSocket server to a single client in response to the client
|
|
2750
|
-
* sending a FetchStorageClientMsg message, to provide the initial
|
|
2751
|
-
* state of the Room.
|
|
2752
|
+
* sending a FetchStorageClientMsg message, to provide one chunk of the initial
|
|
2753
|
+
* Storage state of the Room.
|
|
2752
2754
|
*
|
|
2753
|
-
* The server will respond with
|
|
2754
|
-
*
|
|
2755
|
-
* done=true.
|
|
2755
|
+
* The server will respond with 1+ STORAGE_CHUNK messages, followed by exactly
|
|
2756
|
+
* one STORAGE_STREAM_END message to mark the end of the transmission.
|
|
2756
2757
|
*
|
|
2757
2758
|
* If the room is using the new storage engine that supports streaming, then
|
|
2758
|
-
* potentially multiple chunks might get sent.
|
|
2759
|
-
*
|
|
2760
|
-
*
|
|
2761
|
-
* a single/large chunk (non-streaming).
|
|
2759
|
+
* potentially multiple chunks might get sent. If the room is using the old
|
|
2760
|
+
* storage engine, then all nodes will be sent in a single/large chunk
|
|
2761
|
+
* (non-streaming).
|
|
2762
2762
|
*/
|
|
2763
2763
|
type StorageChunkServerMsg = {
|
|
2764
2764
|
readonly type: ServerMsgCode.STORAGE_CHUNK;
|
|
2765
|
-
readonly done: boolean;
|
|
2766
2765
|
readonly nodes: CompactNode[];
|
|
2767
2766
|
};
|
|
2767
|
+
type StorageEndServerMsg = {
|
|
2768
|
+
readonly type: ServerMsgCode.STORAGE_STREAM_END;
|
|
2769
|
+
};
|
|
2768
2770
|
/**
|
|
2769
2771
|
* Sent by the WebSocket server and broadcasted to all clients to announce that
|
|
2770
2772
|
* a change occurred in the Storage document.
|
package/dist/index.d.ts
CHANGED
|
@@ -2523,6 +2523,7 @@ declare const ServerMsgCode: Readonly<{
|
|
|
2523
2523
|
ROOM_STATE: 104;
|
|
2524
2524
|
STORAGE_STATE_V7: 200;
|
|
2525
2525
|
STORAGE_CHUNK: 210;
|
|
2526
|
+
STORAGE_STREAM_END: 211;
|
|
2526
2527
|
UPDATE_STORAGE: 201;
|
|
2527
2528
|
UPDATE_YDOC: 300;
|
|
2528
2529
|
THREAD_CREATED: 400;
|
|
@@ -2544,6 +2545,7 @@ declare namespace ServerMsgCode {
|
|
|
2544
2545
|
type ROOM_STATE = typeof ServerMsgCode.ROOM_STATE;
|
|
2545
2546
|
type STORAGE_STATE_V7 = typeof ServerMsgCode.STORAGE_STATE_V7;
|
|
2546
2547
|
type STORAGE_CHUNK = typeof ServerMsgCode.STORAGE_CHUNK;
|
|
2548
|
+
type STORAGE_STREAM_END = typeof ServerMsgCode.STORAGE_STREAM_END;
|
|
2547
2549
|
type UPDATE_STORAGE = typeof ServerMsgCode.UPDATE_STORAGE;
|
|
2548
2550
|
type UPDATE_YDOC = typeof ServerMsgCode.UPDATE_YDOC;
|
|
2549
2551
|
type THREAD_CREATED = typeof ServerMsgCode.THREAD_CREATED;
|
|
@@ -2560,7 +2562,7 @@ declare namespace ServerMsgCode {
|
|
|
2560
2562
|
/**
|
|
2561
2563
|
* Messages that can be sent from the server to the client.
|
|
2562
2564
|
*/
|
|
2563
|
-
type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
|
|
2565
|
+
type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | StorageEndServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
|
|
2564
2566
|
type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
|
|
2565
2567
|
type ThreadCreatedEvent = {
|
|
2566
2568
|
type: ServerMsgCode.THREAD_CREATED;
|
|
@@ -2747,24 +2749,24 @@ type StorageStateServerMsg_V7 = {
|
|
|
2747
2749
|
};
|
|
2748
2750
|
/**
|
|
2749
2751
|
* Sent by the WebSocket server to a single client in response to the client
|
|
2750
|
-
* sending a FetchStorageClientMsg message, to provide the initial
|
|
2751
|
-
* state of the Room.
|
|
2752
|
+
* sending a FetchStorageClientMsg message, to provide one chunk of the initial
|
|
2753
|
+
* Storage state of the Room.
|
|
2752
2754
|
*
|
|
2753
|
-
* The server will respond with
|
|
2754
|
-
*
|
|
2755
|
-
* done=true.
|
|
2755
|
+
* The server will respond with 1+ STORAGE_CHUNK messages, followed by exactly
|
|
2756
|
+
* one STORAGE_STREAM_END message to mark the end of the transmission.
|
|
2756
2757
|
*
|
|
2757
2758
|
* If the room is using the new storage engine that supports streaming, then
|
|
2758
|
-
* potentially multiple chunks might get sent.
|
|
2759
|
-
*
|
|
2760
|
-
*
|
|
2761
|
-
* a single/large chunk (non-streaming).
|
|
2759
|
+
* potentially multiple chunks might get sent. If the room is using the old
|
|
2760
|
+
* storage engine, then all nodes will be sent in a single/large chunk
|
|
2761
|
+
* (non-streaming).
|
|
2762
2762
|
*/
|
|
2763
2763
|
type StorageChunkServerMsg = {
|
|
2764
2764
|
readonly type: ServerMsgCode.STORAGE_CHUNK;
|
|
2765
|
-
readonly done: boolean;
|
|
2766
2765
|
readonly nodes: CompactNode[];
|
|
2767
2766
|
};
|
|
2767
|
+
type StorageEndServerMsg = {
|
|
2768
|
+
readonly type: ServerMsgCode.STORAGE_STREAM_END;
|
|
2769
|
+
};
|
|
2768
2770
|
/**
|
|
2769
2771
|
* Sent by the WebSocket server and broadcasted to all clients to announce that
|
|
2770
2772
|
* a change occurred in the Storage document.
|
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 = "3.13.0-
|
|
9
|
+
var PKG_VERSION = "3.13.0-vincent3";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -3094,6 +3094,8 @@ var ServerMsgCode = Object.freeze({
|
|
|
3094
3094
|
// Only sent in V7
|
|
3095
3095
|
STORAGE_CHUNK: 210,
|
|
3096
3096
|
// Used in V8+
|
|
3097
|
+
STORAGE_STREAM_END: 211,
|
|
3098
|
+
// Used in V8+
|
|
3097
3099
|
UPDATE_STORAGE: 201,
|
|
3098
3100
|
// For Yjs Docs
|
|
3099
3101
|
UPDATE_YDOC: 300,
|
|
@@ -9540,13 +9542,12 @@ function createRoom(options, config) {
|
|
|
9540
9542
|
updates.others.push(onRoomStateMessage(message));
|
|
9541
9543
|
break;
|
|
9542
9544
|
}
|
|
9543
|
-
case ServerMsgCode.STORAGE_CHUNK:
|
|
9545
|
+
case ServerMsgCode.STORAGE_CHUNK:
|
|
9544
9546
|
partialNodes.append(compactNodesToNodeStream(message.nodes));
|
|
9545
|
-
if (message.done) {
|
|
9546
|
-
processInitialStorage(partialNodes.clear());
|
|
9547
|
-
}
|
|
9548
9547
|
break;
|
|
9549
|
-
|
|
9548
|
+
case ServerMsgCode.STORAGE_STREAM_END:
|
|
9549
|
+
processInitialStorage(partialNodes.clear());
|
|
9550
|
+
break;
|
|
9550
9551
|
case ServerMsgCode.UPDATE_STORAGE: {
|
|
9551
9552
|
const applyResult = applyOps(
|
|
9552
9553
|
message.ops,
|