@naviedu/room-platform-react 0.0.28 → 0.0.30

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.
Files changed (2) hide show
  1. package/index.esm.js +11 -11
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -6805,13 +6805,6 @@ var reduceRoomControlState = function(current, next) {
6805
6805
  };
6806
6806
  };
6807
6807
 
6808
- var RoomPlatformPrivateRoomContext = createContext(undefined);
6809
- function useRoomPlatformPrivateRoomContext() {
6810
- var context = useContext(RoomPlatformPrivateRoomContext);
6811
- if (!context) throw new Error('useRoomPlatformPrivateRoomContext must be used inside RoomPlatformProvider');
6812
- return context;
6813
- }
6814
-
6815
6808
  var WhiteboardContext = createContext(undefined);
6816
6809
  function useWhiteboard() {
6817
6810
  var context = useContext(WhiteboardContext);
@@ -13576,6 +13569,13 @@ function toWhiteboardProviderProps(integration, roomId) {
13576
13569
  };
13577
13570
  }
13578
13571
 
13572
+ var RoomPlatformPrivateRoomContext = createContext(undefined);
13573
+ function useRoomPlatformPrivateRoomContext() {
13574
+ var context = useContext(RoomPlatformPrivateRoomContext);
13575
+ if (!context) throw new Error('useRoomPlatformPrivateRoomContext must be used inside RoomPlatformProvider');
13576
+ return context;
13577
+ }
13578
+
13579
13579
  var RoomPlatformGatewayErrorCode = {
13580
13580
  ACCESS_SESSION_INVALID: 'ROOM_PLATFORM_ACCESS_SESSION_INVALID',
13581
13581
  LAUNCH_TICKET_INVALID: 'ROOM_PLATFORM_LAUNCH_TICKET_INVALID'
@@ -14100,6 +14100,7 @@ function RoomPlatformProvider(param) {
14100
14100
  var pendingLocalMediaRef = useRef(new Map());
14101
14101
  var hasFirstSuccessfulConnectionRef = useRef(false);
14102
14102
  var localPreviewTrackRef = useRef(null);
14103
+ var initialLaunchTokenRef = useRef(launchToken);
14103
14104
  var recoveryRef = useRef(undefined);
14104
14105
  var roomConnectionRef = useRef(null);
14105
14106
  var privateRoomRef = useRef(undefined);
@@ -14859,7 +14860,7 @@ function RoomPlatformProvider(param) {
14859
14860
  ]);
14860
14861
  return [
14861
14862
  4,
14862
- connectFromTicket(launchToken, lifecycle)
14863
+ connectFromTicket(initialLaunchTokenRef.current, lifecycle)
14863
14864
  ];
14864
14865
  case 2:
14865
14866
  _state.sent();
@@ -14935,7 +14936,6 @@ function RoomPlatformProvider(param) {
14935
14936
  connectFromTicket,
14936
14937
  disposeRoom,
14937
14938
  isLifecycleActive,
14938
- launchToken,
14939
14939
  recover,
14940
14940
  reportError
14941
14941
  ]);
@@ -28420,7 +28420,7 @@ var RoomPlatformWorkspaceContent = function(param) {
28420
28420
  var topBarTrailing = /*#__PURE__*/ jsxs("div", {
28421
28421
  className: "flex items-center gap-2",
28422
28422
  children: [
28423
- /*#__PURE__*/ jsx("div", {
28423
+ modes.length > 1 ? /*#__PURE__*/ jsx("div", {
28424
28424
  className: "flex rounded-lg border border-white/20 p-1",
28425
28425
  children: modes.map(function(mode) {
28426
28426
  return /*#__PURE__*/ jsx(Button, {
@@ -28473,7 +28473,7 @@ var RoomPlatformWorkspaceContent = function(param) {
28473
28473
  children: mode.label
28474
28474
  }, mode.key);
28475
28475
  })
28476
- }),
28476
+ }) : null,
28477
28477
  TopBarTrailing ? /*#__PURE__*/ jsx(RoomPlatformExtensionZone, {
28478
28478
  component: TopBarTrailing,
28479
28479
  extensionProps: extensionProps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naviedu/room-platform-react",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "type": "module",
5
5
  "main": "./index.esm.js",
6
6
  "module": "./index.esm.js",