@liveblocks/core 1.4.1-test1 → 1.4.1-test2
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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +4 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1052,13 +1052,15 @@ declare enum ServerMsgCode {
|
|
|
1052
1052
|
THREAD_METADATA_UPDATED = 401,
|
|
1053
1053
|
COMMENT_CREATED = 402,
|
|
1054
1054
|
COMMENT_EDITED = 403,
|
|
1055
|
-
COMMENT_DELETED = 404
|
|
1055
|
+
COMMENT_DELETED = 404,
|
|
1056
|
+
COMMENT_REACTION_ADDED = 405,
|
|
1057
|
+
COMMENT_REACTION_REMOVED = 406
|
|
1056
1058
|
}
|
|
1057
1059
|
/**
|
|
1058
1060
|
* Messages that can be sent from the server to the client.
|
|
1059
1061
|
*/
|
|
1060
1062
|
declare type ServerMsg<TPresence extends JsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json> = UpdatePresenceServerMsg<TPresence> | UserJoinServerMsg<TUserMeta> | UserLeftServerMsg | BroadcastedEventServerMsg<TRoomEvent> | RoomStateServerMsg<TUserMeta> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | RejectedStorageOpServerMsg | YDocUpdateServerMsg | CommentsEventServerMsg;
|
|
1061
|
-
declare type CommentsEventServerMsg = ThreadCreatedEvent | ThreadMetadataUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent;
|
|
1063
|
+
declare type CommentsEventServerMsg = ThreadCreatedEvent | ThreadMetadataUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
|
|
1062
1064
|
declare type ThreadCreatedEvent = {
|
|
1063
1065
|
type: ServerMsgCode.THREAD_CREATED;
|
|
1064
1066
|
threadId: string;
|
|
@@ -1082,6 +1084,18 @@ declare type CommentDeletedEvent = {
|
|
|
1082
1084
|
threadId: string;
|
|
1083
1085
|
commentId: string;
|
|
1084
1086
|
};
|
|
1087
|
+
declare type CommentReactionAdded = {
|
|
1088
|
+
type: ServerMsgCode.COMMENT_REACTION_ADDED;
|
|
1089
|
+
threadId: string;
|
|
1090
|
+
commentId: string;
|
|
1091
|
+
emoji: string;
|
|
1092
|
+
};
|
|
1093
|
+
declare type CommentReactionRemoved = {
|
|
1094
|
+
type: ServerMsgCode.COMMENT_REACTION_REMOVED;
|
|
1095
|
+
threadId: string;
|
|
1096
|
+
commentId: string;
|
|
1097
|
+
emoji: string;
|
|
1098
|
+
};
|
|
1085
1099
|
/**
|
|
1086
1100
|
* Sent by the WebSocket server and broadcasted to all clients to announce that
|
|
1087
1101
|
* a User updated their presence. For example, when a user moves their cursor.
|
package/dist/index.d.ts
CHANGED
|
@@ -1052,13 +1052,15 @@ declare enum ServerMsgCode {
|
|
|
1052
1052
|
THREAD_METADATA_UPDATED = 401,
|
|
1053
1053
|
COMMENT_CREATED = 402,
|
|
1054
1054
|
COMMENT_EDITED = 403,
|
|
1055
|
-
COMMENT_DELETED = 404
|
|
1055
|
+
COMMENT_DELETED = 404,
|
|
1056
|
+
COMMENT_REACTION_ADDED = 405,
|
|
1057
|
+
COMMENT_REACTION_REMOVED = 406
|
|
1056
1058
|
}
|
|
1057
1059
|
/**
|
|
1058
1060
|
* Messages that can be sent from the server to the client.
|
|
1059
1061
|
*/
|
|
1060
1062
|
declare type ServerMsg<TPresence extends JsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json> = UpdatePresenceServerMsg<TPresence> | UserJoinServerMsg<TUserMeta> | UserLeftServerMsg | BroadcastedEventServerMsg<TRoomEvent> | RoomStateServerMsg<TUserMeta> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | RejectedStorageOpServerMsg | YDocUpdateServerMsg | CommentsEventServerMsg;
|
|
1061
|
-
declare type CommentsEventServerMsg = ThreadCreatedEvent | ThreadMetadataUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent;
|
|
1063
|
+
declare type CommentsEventServerMsg = ThreadCreatedEvent | ThreadMetadataUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
|
|
1062
1064
|
declare type ThreadCreatedEvent = {
|
|
1063
1065
|
type: ServerMsgCode.THREAD_CREATED;
|
|
1064
1066
|
threadId: string;
|
|
@@ -1082,6 +1084,18 @@ declare type CommentDeletedEvent = {
|
|
|
1082
1084
|
threadId: string;
|
|
1083
1085
|
commentId: string;
|
|
1084
1086
|
};
|
|
1087
|
+
declare type CommentReactionAdded = {
|
|
1088
|
+
type: ServerMsgCode.COMMENT_REACTION_ADDED;
|
|
1089
|
+
threadId: string;
|
|
1090
|
+
commentId: string;
|
|
1091
|
+
emoji: string;
|
|
1092
|
+
};
|
|
1093
|
+
declare type CommentReactionRemoved = {
|
|
1094
|
+
type: ServerMsgCode.COMMENT_REACTION_REMOVED;
|
|
1095
|
+
threadId: string;
|
|
1096
|
+
commentId: string;
|
|
1097
|
+
emoji: string;
|
|
1098
|
+
};
|
|
1085
1099
|
/**
|
|
1086
1100
|
* Sent by the WebSocket server and broadcasted to all clients to announce that
|
|
1087
1101
|
* a User updated their presence. For example, when a user moves their cursor.
|
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.4.1-
|
|
9
|
+
var PKG_VERSION = "1.4.1-test2";
|
|
10
10
|
var PKG_FORMAT = "cjs";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -642,6 +642,8 @@ var ServerMsgCode = /* @__PURE__ */ ((ServerMsgCode2) => {
|
|
|
642
642
|
ServerMsgCode2[ServerMsgCode2["COMMENT_CREATED"] = 402] = "COMMENT_CREATED";
|
|
643
643
|
ServerMsgCode2[ServerMsgCode2["COMMENT_EDITED"] = 403] = "COMMENT_EDITED";
|
|
644
644
|
ServerMsgCode2[ServerMsgCode2["COMMENT_DELETED"] = 404] = "COMMENT_DELETED";
|
|
645
|
+
ServerMsgCode2[ServerMsgCode2["COMMENT_REACTION_ADDED"] = 405] = "COMMENT_REACTION_ADDED";
|
|
646
|
+
ServerMsgCode2[ServerMsgCode2["COMMENT_REACTION_REMOVED"] = 406] = "COMMENT_REACTION_REMOVED";
|
|
645
647
|
return ServerMsgCode2;
|
|
646
648
|
})(ServerMsgCode || {});
|
|
647
649
|
|
|
@@ -2356,16 +2358,7 @@ var LiveList = class _LiveList extends AbstractCrdt {
|
|
|
2356
2358
|
};
|
|
2357
2359
|
ops.push(op);
|
|
2358
2360
|
for (const item of this._items) {
|
|
2359
|
-
|
|
2360
|
-
const childOps = HACK_addIntentAndDeletedIdToOperation(
|
|
2361
|
-
item._toOps(this._id, parentKey2, pool),
|
|
2362
|
-
void 0
|
|
2363
|
-
);
|
|
2364
|
-
const childOpId = childOps[0].opId;
|
|
2365
|
-
if (childOpId !== void 0) {
|
|
2366
|
-
this._unacknowledgedSets.set(parentKey2, childOpId);
|
|
2367
|
-
}
|
|
2368
|
-
ops.push(...childOps);
|
|
2361
|
+
ops.push(...item._toOps(this._id, item._getParentKeyOrThrow(), pool));
|
|
2369
2362
|
}
|
|
2370
2363
|
return ops;
|
|
2371
2364
|
}
|