@100mslive/roomkit-react 0.1.6-alpha.1 → 0.1.6-alpha.2

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 (38) hide show
  1. package/dist/{HLSView-HNVYG5VE.js → HLSView-QMU5JK7U.js} +3 -3
  2. package/dist/Prebuilt/components/Footer/ChatToggle.d.ts +1 -3
  3. package/dist/Prebuilt/components/SidePaneTabs.d.ts +7 -0
  4. package/dist/{VirtualBackground-UM2FOUHQ.js → VirtualBackground-37FXUPYO.js} +6 -6
  5. package/dist/VirtualBackground-37FXUPYO.js.map +7 -0
  6. package/dist/{chunk-POE7H4IE.js → chunk-KBVIZGYW.js} +2 -2
  7. package/dist/{chunk-POE7H4IE.js.map → chunk-KBVIZGYW.js.map} +1 -1
  8. package/dist/{chunk-LYSAET4G.js → chunk-WVGGQZK4.js} +100 -106
  9. package/dist/{chunk-LYSAET4G.js.map → chunk-WVGGQZK4.js.map} +3 -3
  10. package/dist/{chunk-364HP22I.js → chunk-ZKE2N5LH.js} +2 -2
  11. package/dist/{conference-UWLJHMB2.js → conference-FJJQ4TXX.js} +419 -384
  12. package/dist/conference-FJJQ4TXX.js.map +7 -0
  13. package/dist/index.cjs.js +594 -570
  14. package/dist/index.cjs.js.map +4 -4
  15. package/dist/index.js +2 -2
  16. package/dist/meta.cjs.json +127 -127
  17. package/dist/meta.esbuild.json +161 -160
  18. package/package.json +6 -6
  19. package/src/Prebuilt/components/Chat/Chat.jsx +2 -6
  20. package/src/Prebuilt/components/Footer/ChatToggle.tsx +2 -9
  21. package/src/Prebuilt/components/Footer/Footer.tsx +22 -6
  22. package/src/Prebuilt/components/Footer/ParticipantList.jsx +0 -2
  23. package/src/Prebuilt/components/Header/HeaderComponents.jsx +8 -1
  24. package/src/Prebuilt/components/InsetTile.tsx +1 -0
  25. package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +1 -1
  26. package/src/Prebuilt/components/Notifications/Notifications.jsx +14 -7
  27. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +2 -3
  28. package/src/Prebuilt/components/RoleChangeRequestModal.tsx +6 -4
  29. package/src/Prebuilt/components/SidePaneTabs.tsx +120 -0
  30. package/src/Prebuilt/components/hooks/useMetadata.jsx +7 -25
  31. package/src/Prebuilt/layouts/SidePane.tsx +12 -10
  32. package/src/Prebuilt/plugins/VirtualBackground/VirtualBackground.jsx +3 -3
  33. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +2 -2
  34. package/dist/VirtualBackground-UM2FOUHQ.js.map +0 -7
  35. package/dist/conference-UWLJHMB2.js.map +0 -7
  36. package/src/Prebuilt/components/Chat/ChatParticipantHeader.jsx +0 -84
  37. /package/dist/{HLSView-HNVYG5VE.js.map → HLSView-QMU5JK7U.js.map} +0 -0
  38. /package/dist/{chunk-364HP22I.js.map → chunk-ZKE2N5LH.js.map} +0 -0
@@ -1,84 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { selectPeerCount, useHMSStore } from '@100mslive/react-sdk';
3
- import { CrossIcon } from '@100mslive/react-icons';
4
- import { Flex, IconButton, Tabs, Text } from '../../..';
5
- import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
6
- import { useSidepaneToggle } from '../AppData/useSidepane';
7
- import { SIDE_PANE_OPTIONS } from '../../common/constants';
8
-
9
- const tabTriggerCSS = {
10
- color: '$on_surface_high',
11
- p: '$4',
12
- fontWeight: '$semiBold',
13
- fontSize: '$sm',
14
- w: '100%',
15
- justifyContent: 'center',
16
- };
17
-
18
- export const ChatParticipantHeader = React.memo(({ activeTabValue = SIDE_PANE_OPTIONS.CHAT }) => {
19
- const toggleChat = useSidepaneToggle(SIDE_PANE_OPTIONS.CHAT);
20
- const toggleParticipants = useSidepaneToggle(SIDE_PANE_OPTIONS.PARTICIPANTS);
21
- const [activeTab, setActiveTab] = useState(activeTabValue);
22
- const peerCount = useHMSStore(selectPeerCount);
23
- const { elements } = useRoomLayoutConferencingScreen();
24
- const showChat = !!elements?.chat;
25
- const showParticipants = !!elements?.participant_list;
26
- const hideTabs = !(showChat && showParticipants);
27
-
28
- return (
29
- <Flex
30
- align="center"
31
- css={{
32
- color: '$on_primary_high',
33
- h: '$16',
34
- }}
35
- >
36
- {hideTabs ? (
37
- <Text variant="sm" css={{ fontWeight: '$semiBold', c: '$on_surface_high' }}>
38
- {showChat ? 'Chat' : `Participants (${peerCount})`}
39
- </Text>
40
- ) : (
41
- <Flex css={{ w: '100%', bg: '$surface_default', borderRadius: '$2' }}>
42
- <Tabs.Root value={activeTab} onValueChange={setActiveTab} css={{ w: '100%' }}>
43
- <Tabs.List css={{ w: '100%', p: '$2' }}>
44
- <Tabs.Trigger
45
- value={SIDE_PANE_OPTIONS.CHAT}
46
- onClick={toggleChat}
47
- css={{
48
- ...tabTriggerCSS,
49
- color: activeTab !== SIDE_PANE_OPTIONS.CHAT ? '$on_surface_low' : '$on_surface_high',
50
- }}
51
- >
52
- Chat
53
- </Tabs.Trigger>
54
- <Tabs.Trigger
55
- value={SIDE_PANE_OPTIONS.PARTICIPANTS}
56
- onClick={toggleParticipants}
57
- css={{
58
- ...tabTriggerCSS,
59
- color: activeTab !== SIDE_PANE_OPTIONS.PARTICIPANTS ? '$on_surface_low' : '$on_surface_high',
60
- }}
61
- >
62
- Participants ({peerCount})
63
- </Tabs.Trigger>
64
- </Tabs.List>
65
- </Tabs.Root>
66
- </Flex>
67
- )}
68
- <IconButton
69
- css={{ ml: 'auto' }}
70
- onClick={e => {
71
- e.stopPropagation();
72
- if (activeTab === SIDE_PANE_OPTIONS.CHAT) {
73
- toggleChat();
74
- } else {
75
- toggleParticipants();
76
- }
77
- }}
78
- data-testid="close_chat"
79
- >
80
- <CrossIcon />
81
- </IconButton>
82
- </Flex>
83
- );
84
- });