@liveblocks/react 2.18.2 → 2.18.4-uns1
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/_private.cjs +131 -0
- package/dist/_private.cjs.map +1 -0
- package/dist/{_private.d.mts → _private.d.cts} +1 -1
- package/dist/_private.d.ts +1 -1
- package/dist/_private.js +75 -73
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-LJCQ446S.js → chunk-EC62ST5F.cjs} +32 -53
- package/dist/chunk-EC62ST5F.cjs.map +1 -0
- package/dist/{chunk-N5KCAECN.mjs → chunk-FKN4BSVX.js} +2 -2
- package/dist/{chunk-OSTPNTQF.mjs → chunk-OVSZW7FP.js} +17 -38
- package/dist/chunk-OVSZW7FP.js.map +1 -0
- package/dist/{chunk-2KLGC2VG.js → chunk-XFNPHHAO.cjs} +2 -2
- package/dist/chunk-XFNPHHAO.cjs.map +1 -0
- package/dist/index.cjs +145 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +142 -142
- package/dist/index.js.map +1 -1
- package/dist/{room-Bf3S78LF.d.mts → room-1E8LCqCD.d.cts} +17 -0
- package/dist/{room-Bf3S78LF.d.ts → room-1E8LCqCD.d.ts} +17 -0
- package/dist/suspense.cjs +139 -0
- package/dist/suspense.cjs.map +1 -0
- package/dist/{suspense.d.mts → suspense.d.cts} +2 -2
- package/dist/suspense.d.ts +1 -1
- package/dist/suspense.js +136 -136
- package/dist/suspense.js.map +1 -1
- package/package.json +21 -21
- package/dist/_private.mjs +0 -129
- package/dist/_private.mjs.map +0 -1
- package/dist/chunk-2KLGC2VG.js.map +0 -1
- package/dist/chunk-LJCQ446S.js.map +0 -1
- package/dist/chunk-OSTPNTQF.mjs.map +0 -1
- package/dist/index.mjs +0 -145
- package/dist/index.mjs.map +0 -1
- package/dist/suspense.mjs +0 -139
- package/dist/suspense.mjs.map +0 -1
- /package/dist/{chunk-N5KCAECN.mjs.map → chunk-FKN4BSVX.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/version.ts
|
|
2
2
|
var PKG_NAME = "@liveblocks/react";
|
|
3
|
-
var PKG_VERSION = "2.18.
|
|
3
|
+
var PKG_VERSION = "2.18.4-uns1";
|
|
4
4
|
var PKG_FORMAT = "esm";
|
|
5
5
|
|
|
6
6
|
// src/ClientSideSuspense.tsx
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
PKG_FORMAT,
|
|
21
21
|
ClientSideSuspense
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-FKN4BSVX.js.map
|
|
@@ -129,7 +129,7 @@ var config = {
|
|
|
129
129
|
ROOM_THREADS_POLL_INTERVAL: 5 * MINUTES,
|
|
130
130
|
ROOM_THREADS_MAX_STALE_TIME: 5 * SECONDS,
|
|
131
131
|
USER_THREADS_POLL_INTERVAL: 1 * MINUTES,
|
|
132
|
-
USER_THREADS_MAX_STALE_TIME:
|
|
132
|
+
USER_THREADS_MAX_STALE_TIME: 30 * SECONDS,
|
|
133
133
|
HISTORY_VERSIONS_POLL_INTERVAL: 1 * MINUTES,
|
|
134
134
|
HISTORY_VERSIONS_MAX_STALE_TIME: 5 * SECONDS,
|
|
135
135
|
NOTIFICATION_SETTINGS_POLL_INTERVAL: 1 * MINUTES,
|
|
@@ -236,17 +236,17 @@ import {
|
|
|
236
236
|
batch as batch2,
|
|
237
237
|
compactObject,
|
|
238
238
|
console as console2,
|
|
239
|
+
createUserNotificationSettings,
|
|
239
240
|
DefaultMap,
|
|
240
241
|
DerivedSignal,
|
|
241
|
-
entries,
|
|
242
|
-
keys,
|
|
243
242
|
kInternal,
|
|
244
243
|
MutableSignal as MutableSignal2,
|
|
245
244
|
nanoid,
|
|
246
245
|
nn,
|
|
246
|
+
patchUserNotificationSettings,
|
|
247
247
|
shallow as shallow3,
|
|
248
248
|
Signal,
|
|
249
|
-
|
|
249
|
+
stableStringify
|
|
250
250
|
} from "@liveblocks/core";
|
|
251
251
|
|
|
252
252
|
// src/lib/autobind.ts
|
|
@@ -438,10 +438,10 @@ var ThreadDB = class _ThreadDB {
|
|
|
438
438
|
|
|
439
439
|
// src/umbrella-store.ts
|
|
440
440
|
function makeRoomThreadsQueryKey(roomId, query) {
|
|
441
|
-
return
|
|
441
|
+
return stableStringify([roomId, query ?? {}]);
|
|
442
442
|
}
|
|
443
443
|
function makeUserThreadsQueryKey(query) {
|
|
444
|
-
return
|
|
444
|
+
return stableStringify(query ?? {});
|
|
445
445
|
}
|
|
446
446
|
function usify(promise) {
|
|
447
447
|
if ("status" in promise) {
|
|
@@ -731,14 +731,11 @@ function createStore_forPermissionHints() {
|
|
|
731
731
|
};
|
|
732
732
|
}
|
|
733
733
|
function createStore_forUserNotificationSettings(updates) {
|
|
734
|
-
const signal = new Signal(
|
|
734
|
+
const signal = new Signal(
|
|
735
|
+
createUserNotificationSettings({})
|
|
736
|
+
);
|
|
735
737
|
function update(settings) {
|
|
736
|
-
signal.set(
|
|
737
|
-
return {
|
|
738
|
-
...prevSettings,
|
|
739
|
-
...settings
|
|
740
|
-
};
|
|
741
|
-
});
|
|
738
|
+
signal.set(settings);
|
|
742
739
|
}
|
|
743
740
|
return {
|
|
744
741
|
signal: DerivedSignal.from(
|
|
@@ -1499,32 +1496,14 @@ function applyOptimisticUpdates_forSettings(settingsLUT, optimisticUpdates) {
|
|
|
1499
1496
|
}
|
|
1500
1497
|
return settingsByRoomId;
|
|
1501
1498
|
}
|
|
1502
|
-
function applyOptimisticUpdates_forUserNotificationSettings(
|
|
1503
|
-
|
|
1504
|
-
for (const
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
const incomingSettings = optimisticUpdate.settings;
|
|
1508
|
-
for (const channelKey of keys(incomingSettings)) {
|
|
1509
|
-
const key = channelKey;
|
|
1510
|
-
const channelUpdates = incomingSettings[key];
|
|
1511
|
-
if (channelUpdates) {
|
|
1512
|
-
const realChannelUpdates = Object.fromEntries(
|
|
1513
|
-
entries(channelUpdates).filter(
|
|
1514
|
-
([_, value]) => value !== void 0
|
|
1515
|
-
)
|
|
1516
|
-
);
|
|
1517
|
-
outcomingSettings[key] = {
|
|
1518
|
-
...outcomingSettings[key],
|
|
1519
|
-
...realChannelUpdates
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
break;
|
|
1524
|
-
}
|
|
1499
|
+
function applyOptimisticUpdates_forUserNotificationSettings(settings, optimisticUpdates) {
|
|
1500
|
+
let outcoming = settings;
|
|
1501
|
+
for (const update of optimisticUpdates) {
|
|
1502
|
+
if (update.type === "update-user-notification-settings") {
|
|
1503
|
+
outcoming = patchUserNotificationSettings(outcoming, update.settings);
|
|
1525
1504
|
}
|
|
1526
1505
|
}
|
|
1527
|
-
return
|
|
1506
|
+
return outcoming;
|
|
1528
1507
|
}
|
|
1529
1508
|
function compareInboxNotifications(inboxNotificationA, inboxNotificationB) {
|
|
1530
1509
|
if (inboxNotificationA.notifiedAt > inboxNotificationB.notifiedAt) {
|
|
@@ -4134,4 +4113,4 @@ export {
|
|
|
4134
4113
|
_useStorageRoot,
|
|
4135
4114
|
_useUpdateMyPresence
|
|
4136
4115
|
};
|
|
4137
|
-
//# sourceMappingURL=chunk-
|
|
4116
|
+
//# sourceMappingURL=chunk-OVSZW7FP.js.map
|