@liveblocks/react 2.18.4-uns2 → 2.20.0

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.
@@ -1,6 +1,6 @@
1
1
  // src/version.ts
2
2
  var PKG_NAME = "@liveblocks/react";
3
- var PKG_VERSION = "2.18.4-uns2";
3
+ var PKG_VERSION = "2.20.0";
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-6WL36X3I.js.map
23
+ //# sourceMappingURL=chunk-TZMZRFYM.js.map
@@ -2855,9 +2855,9 @@ function RoomProviderInner(props) {
2855
2855
  }, [roomId, frozenProps, stableEnterRoom]);
2856
2856
  return /* @__PURE__ */ jsx2(RoomContext.Provider, { value: room, children: props.children });
2857
2857
  }
2858
- function useRoom() {
2858
+ function useRoom(options) {
2859
2859
  const room = useRoomOrNull();
2860
- if (room === null) {
2860
+ if (room === null && !options?.allowOutsideRoom) {
2861
2861
  throw new Error("RoomProvider is missing from the React tree.");
2862
2862
  }
2863
2863
  return room;
@@ -4009,7 +4009,6 @@ var _useUpdateMyPresence = useUpdateMyPresence;
4009
4009
 
4010
4010
  export {
4011
4011
  RoomContext,
4012
- useRoomOrNull,
4013
4012
  useSyncExternalStoreWithSelector,
4014
4013
  useSignal,
4015
4014
  ClientContext,
@@ -4113,4 +4112,4 @@ export {
4113
4112
  _useStorageRoot,
4114
4113
  _useUpdateMyPresence
4115
4114
  };
4116
- //# sourceMappingURL=chunk-OVSZW7FP.js.map
4115
+ //# sourceMappingURL=chunk-URVBSXYW.js.map