@liveblocks/react 2.18.3 → 2.18.4-uns2
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 +73 -73
- package/dist/_private.js.map +1 -1
- package/dist/{chunk-IBC3TDQO.js → chunk-3Q3PQKVX.cjs} +2 -2
- package/dist/chunk-3Q3PQKVX.cjs.map +1 -0
- package/dist/{chunk-ZDS6KSNG.mjs → chunk-6WL36X3I.js} +2 -2
- package/dist/{chunk-5RVW253W.js → chunk-EC62ST5F.cjs} +29 -50
- package/dist/chunk-EC62ST5F.cjs.map +1 -0
- package/dist/{chunk-XU3ECI3P.mjs → chunk-OVSZW7FP.js} +13 -34
- package/dist/chunk-OVSZW7FP.js.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 -131
- package/dist/_private.mjs.map +0 -1
- package/dist/chunk-5RVW253W.js.map +0 -1
- package/dist/chunk-IBC3TDQO.js.map +0 -1
- package/dist/chunk-XU3ECI3P.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-ZDS6KSNG.mjs.map → chunk-6WL36X3I.js.map} +0 -0
|
@@ -236,14 +236,14 @@ 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
|
|
@@ -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
|