@liveblocks/react 2.9.0 → 2.9.2-emails1
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/{chunk-T6ILO2YI.js → chunk-2WZXFCH3.js} +25 -25
- package/dist/chunk-2WZXFCH3.js.map +1 -0
- package/dist/{chunk-V7FAMENR.mjs → chunk-XBY6DFJ2.mjs} +14 -14
- package/dist/chunk-XBY6DFJ2.mjs.map +1 -0
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/suspense.js +3 -3
- package/dist/suspense.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-T6ILO2YI.js.map +0 -1
- package/dist/chunk-V7FAMENR.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
2
|
var PKG_NAME = "@liveblocks/react";
|
|
3
|
-
var PKG_VERSION = "2.9.
|
|
3
|
+
var PKG_VERSION = "2.9.2-emails1";
|
|
4
4
|
var PKG_FORMAT = "esm";
|
|
5
5
|
|
|
6
6
|
// src/ClientSideSuspense.tsx
|
|
@@ -64,7 +64,7 @@ function isMoreRecentlyUpdated(a, b) {
|
|
|
64
64
|
return byMostRecentlyUpdated(a, b) < 0;
|
|
65
65
|
}
|
|
66
66
|
function byMostRecentlyUpdated(a, b) {
|
|
67
|
-
return
|
|
67
|
+
return b.updatedAt.getTime() - a.updatedAt.getTime();
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
// src/lib/guards.ts
|
|
@@ -87,8 +87,11 @@ function matchesMetadata(thread, q) {
|
|
|
87
87
|
const metadata = thread.metadata;
|
|
88
88
|
return q.metadata === void 0 || Object.entries(q.metadata).every(
|
|
89
89
|
([key, op]) => (
|
|
90
|
-
//
|
|
91
|
-
|
|
90
|
+
// NOTE: `op` can be explicitly-`undefined` here, which ideally would not
|
|
91
|
+
// mean "filter for absence" like it does now, as this does not match the
|
|
92
|
+
// backend behavior at the moment. For an in-depth discussion, see
|
|
93
|
+
// https://liveblocks.slack.com/archives/C02PZL7QAAW/p1728546988505989
|
|
94
|
+
matchesOperator(metadata[key], op)
|
|
92
95
|
)
|
|
93
96
|
);
|
|
94
97
|
}
|
|
@@ -595,7 +598,7 @@ var UmbrellaStore = class {
|
|
|
595
598
|
if (existing.deletedAt !== void 0) {
|
|
596
599
|
return cache;
|
|
597
600
|
}
|
|
598
|
-
if (!!updatedAt &&
|
|
601
|
+
if (!!updatedAt && existing.updatedAt > updatedAt) {
|
|
599
602
|
return cache;
|
|
600
603
|
}
|
|
601
604
|
return { ...cache, [threadId]: callback(existing) };
|
|
@@ -780,7 +783,6 @@ var UmbrellaStore = class {
|
|
|
780
783
|
async fetchNotificationsDeltaUpdate() {
|
|
781
784
|
const lastRequestedAt = this._notificationsLastRequestedAt;
|
|
782
785
|
if (lastRequestedAt === null) {
|
|
783
|
-
console2.warn("Notifications polled before first page loaded");
|
|
784
786
|
return;
|
|
785
787
|
}
|
|
786
788
|
const client = nn(
|
|
@@ -844,7 +846,6 @@ var UmbrellaStore = class {
|
|
|
844
846
|
async fetchRoomThreadsDeltaUpdate(roomId) {
|
|
845
847
|
const lastRequestedAt = this._roomThreadsLastRequestedAtByRoom.get(roomId);
|
|
846
848
|
if (lastRequestedAt === void 0) {
|
|
847
|
-
console2.warn("Room threads polled before first page loaded");
|
|
848
849
|
return;
|
|
849
850
|
}
|
|
850
851
|
const client = nn(
|
|
@@ -907,7 +908,6 @@ var UmbrellaStore = class {
|
|
|
907
908
|
async fetchUserThreadsDeltaUpdate() {
|
|
908
909
|
const lastRequestedAt = this._userThreadsLastRequestedAt;
|
|
909
910
|
if (lastRequestedAt === null) {
|
|
910
|
-
console2.warn("User threads polled before first page loaded");
|
|
911
911
|
return;
|
|
912
912
|
}
|
|
913
913
|
const client = nn(
|
|
@@ -948,7 +948,7 @@ function internalToExternalState(state) {
|
|
|
948
948
|
if (thread.deletedAt !== void 0) {
|
|
949
949
|
break;
|
|
950
950
|
}
|
|
951
|
-
if (thread.updatedAt
|
|
951
|
+
if (thread.updatedAt > optimisticUpdate.updatedAt) {
|
|
952
952
|
break;
|
|
953
953
|
}
|
|
954
954
|
computed.threadsById[thread.id] = {
|
|
@@ -1211,7 +1211,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
1211
1211
|
);
|
|
1212
1212
|
if (existingComment === void 0) {
|
|
1213
1213
|
const updatedAt = new Date(
|
|
1214
|
-
Math.max(thread.updatedAt
|
|
1214
|
+
Math.max(thread.updatedAt.getTime(), comment.createdAt.getTime())
|
|
1215
1215
|
);
|
|
1216
1216
|
const updatedThread = {
|
|
1217
1217
|
...thread,
|
|
@@ -1231,7 +1231,7 @@ function applyUpsertComment(thread, comment) {
|
|
|
1231
1231
|
...thread,
|
|
1232
1232
|
updatedAt: new Date(
|
|
1233
1233
|
Math.max(
|
|
1234
|
-
thread.updatedAt
|
|
1234
|
+
thread.updatedAt.getTime(),
|
|
1235
1235
|
comment.editedAt?.getTime() || comment.createdAt.getTime()
|
|
1236
1236
|
)
|
|
1237
1237
|
),
|
|
@@ -1298,7 +1298,7 @@ function applyAddReaction(thread, commentId, reaction) {
|
|
|
1298
1298
|
return {
|
|
1299
1299
|
...thread,
|
|
1300
1300
|
updatedAt: new Date(
|
|
1301
|
-
Math.max(reaction.createdAt.getTime(), thread.updatedAt
|
|
1301
|
+
Math.max(reaction.createdAt.getTime(), thread.updatedAt.getTime())
|
|
1302
1302
|
),
|
|
1303
1303
|
comments: updatedComments
|
|
1304
1304
|
};
|
|
@@ -1331,7 +1331,7 @@ function applyRemoveReaction(thread, commentId, emoji, userId, removedAt) {
|
|
|
1331
1331
|
return {
|
|
1332
1332
|
...thread,
|
|
1333
1333
|
updatedAt: new Date(
|
|
1334
|
-
Math.max(removedAt.getTime(), thread.updatedAt
|
|
1334
|
+
Math.max(removedAt.getTime(), thread.updatedAt.getTime())
|
|
1335
1335
|
),
|
|
1336
1336
|
comments: updatedComments
|
|
1337
1337
|
};
|
|
@@ -3850,4 +3850,4 @@ export {
|
|
|
3850
3850
|
_useStorageRoot,
|
|
3851
3851
|
_useUpdateMyPresence
|
|
3852
3852
|
};
|
|
3853
|
-
//# sourceMappingURL=chunk-
|
|
3853
|
+
//# sourceMappingURL=chunk-XBY6DFJ2.mjs.map
|