@100mslive/roomkit-react 0.3.10-alpha.5 → 0.3.10-alpha.6

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  theme,
63
63
  useBorderAudioLevel,
64
64
  useTheme
65
- } from "./chunk-QEGMYXQ6.js";
65
+ } from "./chunk-US5K5MP3.js";
66
66
  export {
67
67
  Accordion,
68
68
  AudioLevel,
@@ -5982,7 +5982,7 @@
5982
5982
  "format": "esm"
5983
5983
  },
5984
5984
  "src/Prebuilt/components/Footer/ParticipantList.tsx": {
5985
- "bytes": 13879,
5985
+ "bytes": 13982,
5986
5986
  "imports": [
5987
5987
  {
5988
5988
  "path": "react",
@@ -8677,7 +8677,7 @@
8677
8677
  "format": "esm"
8678
8678
  },
8679
8679
  "src/Prebuilt/components/TileMenu/TileMenuContent.tsx": {
8680
- "bytes": 12133,
8680
+ "bytes": 12236,
8681
8681
  "imports": [
8682
8682
  {
8683
8683
  "path": "react",
@@ -13439,7 +13439,7 @@
13439
13439
  "imports": [],
13440
13440
  "exports": [],
13441
13441
  "inputs": {},
13442
- "bytes": 3327315
13442
+ "bytes": 3327627
13443
13443
  },
13444
13444
  "dist/index.cjs.js": {
13445
13445
  "imports": [
@@ -16448,7 +16448,7 @@
16448
16448
  "entryPoint": "src/index.ts",
16449
16449
  "inputs": {
16450
16450
  "<define:process.env>": {
16451
- "bytesInOutput": 17745
16451
+ "bytesInOutput": 17764
16452
16452
  },
16453
16453
  "src/Theme/base.config.ts": {
16454
16454
  "bytesInOutput": 6078
@@ -17042,7 +17042,7 @@
17042
17042
  "bytesInOutput": 2005
17043
17043
  },
17044
17044
  "src/Prebuilt/components/Footer/ParticipantList.tsx": {
17045
- "bytesInOutput": 15785
17045
+ "bytesInOutput": 15907
17046
17046
  },
17047
17047
  "src/Prebuilt/components/Footer/PollsToggle.tsx": {
17048
17048
  "bytesInOutput": 1521
@@ -17210,7 +17210,7 @@
17210
17210
  "bytesInOutput": 266
17211
17211
  },
17212
17212
  "src/Prebuilt/components/TileMenu/TileMenuContent.tsx": {
17213
- "bytesInOutput": 14192
17213
+ "bytesInOutput": 14314
17214
17214
  },
17215
17215
  "src/Prebuilt/components/TileMenu/TileMenu.tsx": {
17216
17216
  "bytesInOutput": 5672
@@ -17513,7 +17513,7 @@
17513
17513
  "bytesInOutput": 2980
17514
17514
  }
17515
17515
  },
17516
- "bytes": 1551898
17516
+ "bytes": 1552161
17517
17517
  }
17518
17518
  }
17519
17519
  }
@@ -5982,7 +5982,7 @@
5982
5982
  "format": "esm"
5983
5983
  },
5984
5984
  "src/Prebuilt/components/Footer/ParticipantList.tsx": {
5985
- "bytes": 13879,
5985
+ "bytes": 13982,
5986
5986
  "imports": [
5987
5987
  {
5988
5988
  "path": "react",
@@ -8677,7 +8677,7 @@
8677
8677
  "format": "esm"
8678
8678
  },
8679
8679
  "src/Prebuilt/components/TileMenu/TileMenuContent.tsx": {
8680
- "bytes": 12133,
8680
+ "bytes": 12236,
8681
8681
  "imports": [
8682
8682
  {
8683
8683
  "path": "react",
@@ -13444,7 +13444,7 @@
13444
13444
  "dist/index.js": {
13445
13445
  "imports": [
13446
13446
  {
13447
- "path": "dist/chunk-QEGMYXQ6.js",
13447
+ "path": "dist/chunk-US5K5MP3.js",
13448
13448
  "kind": "import-statement"
13449
13449
  }
13450
13450
  ],
@@ -13517,16 +13517,16 @@
13517
13517
  "inputs": {},
13518
13518
  "bytes": 1822
13519
13519
  },
13520
- "dist/HLSView-RNJDC3BS.js.map": {
13520
+ "dist/HLSView-SBTTOL3J.js.map": {
13521
13521
  "imports": [],
13522
13522
  "exports": [],
13523
13523
  "inputs": {},
13524
13524
  "bytes": 100337
13525
13525
  },
13526
- "dist/HLSView-RNJDC3BS.js": {
13526
+ "dist/HLSView-SBTTOL3J.js": {
13527
13527
  "imports": [
13528
13528
  {
13529
- "path": "dist/chunk-QEGMYXQ6.js",
13529
+ "path": "dist/chunk-US5K5MP3.js",
13530
13530
  "kind": "import-statement"
13531
13531
  },
13532
13532
  {
@@ -13762,13 +13762,13 @@
13762
13762
  },
13763
13763
  "bytes": 58752
13764
13764
  },
13765
- "dist/chunk-QEGMYXQ6.js.map": {
13765
+ "dist/chunk-US5K5MP3.js.map": {
13766
13766
  "imports": [],
13767
13767
  "exports": [],
13768
13768
  "inputs": {},
13769
- "bytes": 3223077
13769
+ "bytes": 3223540
13770
13770
  },
13771
- "dist/chunk-QEGMYXQ6.js": {
13771
+ "dist/chunk-US5K5MP3.js": {
13772
13772
  "imports": [
13773
13773
  {
13774
13774
  "path": "react",
@@ -16216,7 +16216,7 @@
16216
16216
  "external": true
16217
16217
  },
16218
16218
  {
16219
- "path": "dist/HLSView-RNJDC3BS.js",
16219
+ "path": "dist/HLSView-SBTTOL3J.js",
16220
16220
  "kind": "dynamic-import"
16221
16221
  },
16222
16222
  {
@@ -16693,7 +16693,7 @@
16693
16693
  ],
16694
16694
  "inputs": {
16695
16695
  "<define:process.env>": {
16696
- "bytesInOutput": 17745
16696
+ "bytesInOutput": 17764
16697
16697
  },
16698
16698
  "../../node_modules/lodash/lodash.js": {
16699
16699
  "bytesInOutput": 224301
@@ -17239,7 +17239,7 @@
17239
17239
  "bytesInOutput": 1445
17240
17240
  },
17241
17241
  "src/Prebuilt/components/Footer/ParticipantList.tsx": {
17242
- "bytesInOutput": 12830
17242
+ "bytesInOutput": 12965
17243
17243
  },
17244
17244
  "src/Prebuilt/components/Connection/ConnectionIndicator.tsx": {
17245
17245
  "bytesInOutput": 3835
@@ -17440,7 +17440,7 @@
17440
17440
  "bytesInOutput": 4614
17441
17441
  },
17442
17442
  "src/Prebuilt/components/TileMenu/TileMenuContent.tsx": {
17443
- "bytesInOutput": 11826
17443
+ "bytesInOutput": 11961
17444
17444
  },
17445
17445
  "src/Prebuilt/components/TileMenu/utils.ts": {
17446
17446
  "bytesInOutput": 130
@@ -17665,7 +17665,7 @@
17665
17665
  "bytesInOutput": 651
17666
17666
  }
17667
17667
  },
17668
- "bytes": 1290139
17668
+ "bytes": 1290428
17669
17669
  }
17670
17670
  }
17671
17671
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "prebuilt",
11
11
  "roomkit"
12
12
  ],
13
- "version": "0.3.10-alpha.5",
13
+ "version": "0.3.10-alpha.6",
14
14
  "author": "100ms",
15
15
  "license": "MIT",
16
16
  "repository": {
@@ -73,11 +73,11 @@
73
73
  "react": ">=17.0.2 <19.0.0"
74
74
  },
75
75
  "dependencies": {
76
- "@100mslive/hls-player": "0.3.10-alpha.5",
76
+ "@100mslive/hls-player": "0.3.10-alpha.6",
77
77
  "@100mslive/hms-noise-cancellation": "0.0.1",
78
- "@100mslive/hms-virtual-background": "1.13.10-alpha.5",
79
- "@100mslive/react-icons": "0.10.10-alpha.5",
80
- "@100mslive/react-sdk": "0.10.10-alpha.5",
78
+ "@100mslive/hms-virtual-background": "1.13.10-alpha.6",
79
+ "@100mslive/react-icons": "0.10.10-alpha.6",
80
+ "@100mslive/react-sdk": "0.10.10-alpha.6",
81
81
  "@100mslive/types-prebuilt": "0.12.8",
82
82
  "@emoji-mart/data": "^1.0.6",
83
83
  "@emoji-mart/react": "^1.0.1",
@@ -113,5 +113,5 @@
113
113
  "uuid": "^8.3.2",
114
114
  "worker-timers": "^7.0.40"
115
115
  },
116
- "gitHead": "d1f3685d51a2c197e6f73b7449e4f43ddd3538bc"
116
+ "gitHead": "23975a232d89a2f12d46d313030c6b8ddc6cd89e"
117
117
  }
@@ -4,6 +4,7 @@ import {
4
4
  HMSPeer,
5
5
  HMSPeerType,
6
6
  HMSRoleName,
7
+ selectAvailableRoleNames,
7
8
  selectHandRaisedPeers,
8
9
  selectHasPeerHandRaised,
9
10
  selectIsLargeRoom,
@@ -372,6 +373,7 @@ const ParticipantMoreActions = ({ peerId, role }: { peerId: string; role: string
372
373
  } = usePeerOnStageActions({ peerId, role });
373
374
  const canChangeRole = !!useHMSStore(selectPermissions)?.changeRole;
374
375
  const [openRoleChangeModal, setOpenRoleChangeModal] = useState(false);
376
+ const roles = useHMSStore(selectAvailableRoleNames);
375
377
 
376
378
  return (
377
379
  <>
@@ -409,7 +411,7 @@ const ParticipantMoreActions = ({ peerId, role }: { peerId: string; role: string
409
411
  </Dropdown.Item>
410
412
  ) : null}
411
413
 
412
- {canChangeRole ? (
414
+ {canChangeRole && roles.length > 1 ? (
413
415
  <Dropdown.Item css={{ bg: '$surface_default' }} onClick={() => setOpenRoleChangeModal(true)}>
414
416
  <PersonSettingsIcon />
415
417
  <Text variant="sm" css={{ ml: '$4', fontWeight: '$semiBold', c: '$on_surface_high' }}>
@@ -5,6 +5,7 @@ import {
5
5
  HMSSimulcastLayerDefinition,
6
6
  HMSTrackID,
7
7
  HMSVideoTrack,
8
+ selectAvailableRoleNames,
8
9
  selectPermissions,
9
10
  selectSessionStore,
10
11
  selectTrackByID,
@@ -247,6 +248,7 @@ export const TileMenuContent = ({
247
248
  const canChangeRole = !!permissions?.changeRole;
248
249
  const removeOthers = !!permissions?.removeOthers;
249
250
  const { userName } = useHMSPrebuiltContext();
251
+ const roles = useHMSStore(selectAvailableRoleNames);
250
252
 
251
253
  const { isAudioEnabled, isVideoEnabled, setVolume, toggleAudio, toggleVideo, volume } = useRemoteAVToggle(
252
254
  audioTrackID,
@@ -315,7 +317,7 @@ export const TileMenuContent = ({
315
317
  </StyledMenuTile.ItemButton>
316
318
  ) : null}
317
319
 
318
- {canChangeRole ? (
320
+ {canChangeRole && roles.length > 1 ? (
319
321
  <StyledMenuTile.ItemButton
320
322
  className={dragClassName}
321
323
  css={spacingCSS}