@liveblocks/core 1.4.1-test1 → 1.4.1-test3

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
@@ -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-test1";
9
+ var PKG_VERSION = "1.4.1-test3";
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
 
@@ -2341,7 +2343,15 @@ var LiveList = class _LiveList extends AbstractCrdt {
2341
2343
  }
2342
2344
  return list;
2343
2345
  }
2344
- /** @internal */
2346
+ /**
2347
+ * @internal
2348
+ * This function assumes that the resulting ops will be sent to the server if they have an 'opId'
2349
+ * so we mutate _unacknowledgedSets to avoid potential flickering
2350
+ * https://github.com/liveblocks/liveblocks/pull/1177
2351
+ *
2352
+ * This is quite unintuitive and should disappear as soon as
2353
+ * we introduce an explicit LiveList.Set operation
2354
+ */
2345
2355
  _toOps(parentId, parentKey, pool) {
2346
2356
  if (this._id === void 0) {
2347
2357
  throw new Error("Cannot serialize item is not attached");