@liveblocks/react 1.9.5 → 1.9.6-clafix
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.js +8 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _core = require('@liveblocks/core');
|
|
|
5
5
|
|
|
6
6
|
// src/version.ts
|
|
7
7
|
var PKG_NAME = "@liveblocks/react";
|
|
8
|
-
var PKG_VERSION = "1.9.
|
|
8
|
+
var PKG_VERSION = "1.9.6-clafix";
|
|
9
9
|
var PKG_FORMAT = "cjs";
|
|
10
10
|
|
|
11
11
|
// src/ClientSideSuspense.tsx
|
|
@@ -41,7 +41,6 @@ var _nanoid = require('nanoid');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var _shim = require('use-sync-external-store/shim');
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
// src/comments/errors.ts
|
|
@@ -325,7 +324,7 @@ function createCommentsRoom(errorEventSource) {
|
|
|
325
324
|
return threads;
|
|
326
325
|
}, [room, manager]);
|
|
327
326
|
const revalidateCache = useRevalidateCache(manager, fetcher);
|
|
328
|
-
const status =
|
|
327
|
+
const status = useSyncExternalStore3(
|
|
329
328
|
room.events.status.subscribe,
|
|
330
329
|
room.getStatus,
|
|
331
330
|
room.getStatus
|
|
@@ -1234,7 +1233,7 @@ var missing_unstable_batchedUpdates = (reactVersion, roomId) => `We noticed you\
|
|
|
1234
1233
|
|
|
1235
1234
|
Why? Please see https://liveblocks.io/docs/platform/troubleshooting#stale-props-zombie-child for more information`;
|
|
1236
1235
|
var superfluous_unstable_batchedUpdates = "You don\u2019t need to pass unstable_batchedUpdates to RoomProvider anymore, since you\u2019re on React 18+ already.";
|
|
1237
|
-
function
|
|
1236
|
+
function useSyncExternalStore3(s, gs, gss) {
|
|
1238
1237
|
return _withselectorjs.useSyncExternalStoreWithSelector.call(void 0, s, gs, gss, identity);
|
|
1239
1238
|
}
|
|
1240
1239
|
var STABLE_EMPTY_LIST = Object.freeze([]);
|
|
@@ -1386,13 +1385,13 @@ function createRoomContext(client, options) {
|
|
|
1386
1385
|
const subscribe2 = room.events.status.subscribe;
|
|
1387
1386
|
const getSnapshot2 = room.getStatus;
|
|
1388
1387
|
const getServerSnapshot = room.getStatus;
|
|
1389
|
-
return
|
|
1388
|
+
return useSyncExternalStore3(subscribe2, getSnapshot2, getServerSnapshot);
|
|
1390
1389
|
}
|
|
1391
1390
|
function useMyPresence() {
|
|
1392
1391
|
const room = useRoom();
|
|
1393
1392
|
const subscribe2 = room.events.myPresence.subscribe;
|
|
1394
1393
|
const getSnapshot2 = room.getPresence;
|
|
1395
|
-
const presence =
|
|
1394
|
+
const presence = useSyncExternalStore3(subscribe2, getSnapshot2, getSnapshot2);
|
|
1396
1395
|
const setPresence = room.updatePresence;
|
|
1397
1396
|
return [presence, setPresence];
|
|
1398
1397
|
}
|
|
@@ -1531,7 +1530,7 @@ function createRoomContext(client, options) {
|
|
|
1531
1530
|
const subscribe2 = room.events.storageDidLoad.subscribeOnce;
|
|
1532
1531
|
const getSnapshot2 = room.getStorageSnapshot;
|
|
1533
1532
|
const getServerSnapshot = alwaysNull;
|
|
1534
|
-
return
|
|
1533
|
+
return useSyncExternalStore3(subscribe2, getSnapshot2, getServerSnapshot);
|
|
1535
1534
|
}
|
|
1536
1535
|
function useStorageRoot() {
|
|
1537
1536
|
return [useMutableStorageRoot()];
|
|
@@ -1549,13 +1548,13 @@ function createRoomContext(client, options) {
|
|
|
1549
1548
|
const room = useRoom();
|
|
1550
1549
|
const subscribe2 = room.events.history.subscribe;
|
|
1551
1550
|
const canUndo = room.history.canUndo;
|
|
1552
|
-
return
|
|
1551
|
+
return useSyncExternalStore3(subscribe2, canUndo, canUndo);
|
|
1553
1552
|
}
|
|
1554
1553
|
function useCanRedo() {
|
|
1555
1554
|
const room = useRoom();
|
|
1556
1555
|
const subscribe2 = room.events.history.subscribe;
|
|
1557
1556
|
const canRedo = room.history.canRedo;
|
|
1558
|
-
return
|
|
1557
|
+
return useSyncExternalStore3(subscribe2, canRedo, canRedo);
|
|
1559
1558
|
}
|
|
1560
1559
|
function useBatch() {
|
|
1561
1560
|
return useRoom().batch;
|