@100mslive/roomkit-react 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/dist/{HLSView-PWVM4OIP.js → HLSView-IENE4HRP.js} +2 -2
  2. package/dist/Prebuilt/App.d.ts +0 -2
  3. package/dist/Prebuilt/AppContext.d.ts +0 -2
  4. package/dist/Prebuilt/common/constants.d.ts +110 -0
  5. package/dist/Prebuilt/components/AppData/AppData.d.ts +2 -0
  6. package/dist/Prebuilt/components/Chat/MwebChatOption.d.ts +7 -0
  7. package/dist/Prebuilt/components/Chat/Navigation.d.ts +8 -0
  8. package/dist/Prebuilt/components/Chat/PinnedMessage.d.ts +4 -0
  9. package/dist/Prebuilt/components/Footer/Footer.d.ts +3 -2
  10. package/dist/Prebuilt/components/Notifications/ChatNotifications.d.ts +2 -0
  11. package/dist/Prebuilt/components/Preview/PreviewJoin.d.ts +2 -1
  12. package/dist/Prebuilt/components/VirtualBackground/VBCollection.d.ts +2 -1
  13. package/dist/Prebuilt/components/VirtualBackground/VBPicker.d.ts +3 -0
  14. package/dist/Prebuilt/components/VirtualBackground/constants.d.ts +0 -6
  15. package/dist/Prebuilt/components/hooks/useChatBlacklist.d.ts +4 -0
  16. package/dist/Prebuilt/components/hooks/useSetPinnedMessages.d.ts +16 -0
  17. package/dist/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.d.ts +3 -2
  18. package/dist/{chunk-WREKGNP6.js → chunk-U4AB6X6M.js} +2178 -1148
  19. package/dist/chunk-U4AB6X6M.js.map +7 -0
  20. package/dist/index.cjs.js +2746 -1638
  21. package/dist/index.cjs.js.map +4 -4
  22. package/dist/index.js +1 -1
  23. package/dist/meta.cjs.json +803 -208
  24. package/dist/meta.esbuild.json +812 -217
  25. package/package.json +8 -7
  26. package/src/Prebuilt/App.tsx +3 -14
  27. package/src/Prebuilt/AppContext.tsx +0 -2
  28. package/src/Prebuilt/common/{constants.js → constants.ts} +22 -20
  29. package/src/Prebuilt/components/AppData/{AppData.jsx → AppData.tsx} +8 -22
  30. package/src/Prebuilt/components/AppData/useUISettings.js +0 -4
  31. package/src/Prebuilt/components/AuthToken.jsx +15 -5
  32. package/src/Prebuilt/components/Chat/Chat.jsx +49 -73
  33. package/src/Prebuilt/components/Chat/ChatBody.jsx +241 -51
  34. package/src/Prebuilt/components/Chat/ChatFooter.tsx +56 -6
  35. package/src/Prebuilt/components/Chat/ChatStates.jsx +68 -0
  36. package/src/Prebuilt/components/Chat/MwebChatOption.tsx +24 -0
  37. package/src/Prebuilt/components/Chat/Navigation.tsx +60 -0
  38. package/src/Prebuilt/components/Chat/PinnedMessage.tsx +116 -0
  39. package/src/Prebuilt/components/Footer/Footer.tsx +4 -7
  40. package/src/Prebuilt/components/Header/common.jsx +1 -1
  41. package/src/Prebuilt/components/Notifications/ChatNotifications.tsx +34 -0
  42. package/src/Prebuilt/components/Notifications/Notifications.tsx +2 -0
  43. package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +6 -4
  44. package/src/Prebuilt/components/Polls/Voting/TimedVoting.jsx +3 -2
  45. package/src/Prebuilt/components/Polls/common/VoteCount.jsx +6 -4
  46. package/src/Prebuilt/components/Preview/PreviewJoin.tsx +7 -9
  47. package/src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx +4 -1
  48. package/src/Prebuilt/components/Settings/DeviceSettings.jsx +1 -1
  49. package/src/Prebuilt/components/SidePaneTabs.tsx +3 -2
  50. package/src/Prebuilt/components/Toast/ToastConfig.jsx +1 -0
  51. package/src/Prebuilt/components/VirtualBackground/VBCollection.tsx +4 -4
  52. package/src/Prebuilt/components/VirtualBackground/{VBPicker.jsx → VBPicker.tsx} +64 -44
  53. package/src/Prebuilt/components/VirtualBackground/constants.ts +0 -8
  54. package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +10 -1
  55. package/src/Prebuilt/components/hooks/useChatBlacklist.ts +21 -0
  56. package/src/Prebuilt/components/hooks/useSetPinnedMessages.ts +75 -0
  57. package/src/Prebuilt/components/hooks/useUserPreferences.jsx +1 -0
  58. package/src/Prebuilt/layouts/SidePane.tsx +1 -1
  59. package/src/Prebuilt/layouts/VideoStreamingSection.tsx +16 -8
  60. package/src/Prebuilt/plugins/whiteboard/PusherCommunicationProvider.js +1 -1
  61. package/src/Prebuilt/plugins/whiteboard/README.md +1 -1
  62. package/src/Prebuilt/primitives/DialogContent.jsx +1 -1
  63. package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +12 -1
  64. package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +5 -1
  65. package/dist/chunk-WREKGNP6.js.map +0 -7
  66. package/src/Prebuilt/components/hooks/useSetPinnedMessage.js +0 -38
  67. package/src/Prebuilt/services/tokenService.js +0 -49
  68. /package/dist/{HLSView-PWVM4OIP.js.map → HLSView-IENE4HRP.js.map} +0 -0
@@ -22,7 +22,7 @@ import {
22
22
  init_define_process_env,
23
23
  styled,
24
24
  useTheme
25
- } from "./chunk-WREKGNP6.js";
25
+ } from "./chunk-U4AB6X6M.js";
26
26
 
27
27
  // src/Prebuilt/layouts/HLSView.jsx
28
28
  init_define_process_env();
@@ -880,4 +880,4 @@ var HLSView_default = HLSView;
880
880
  export {
881
881
  HLSView_default as default
882
882
  };
883
- //# sourceMappingURL=HLSView-PWVM4OIP.js.map
883
+ //# sourceMappingURL=HLSView-IENE4HRP.js.map
@@ -15,8 +15,6 @@ export declare type HMSPrebuiltProps = {
15
15
  options?: HMSPrebuiltOptions;
16
16
  screens?: Screens;
17
17
  authToken?: string;
18
- roomId?: string;
19
- role?: string;
20
18
  onLeave?: () => void;
21
19
  onJoin?: () => void;
22
20
  /**
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  declare type HMSPrebuiltContextType = {
3
3
  roomCode: string;
4
- roomId?: string;
5
- role?: string;
6
4
  userName?: string;
7
5
  userId?: string;
8
6
  containerSelector: string;
@@ -0,0 +1,110 @@
1
+ export declare const DEFAULT_WAITING_VIEWER_ROLE = "waiting-room";
2
+ export declare const QUERY_PARAM_SKIP_PREVIEW = "skip_preview";
3
+ export declare const QUERY_PARAM_SKIP_PREVIEW_HEADFUL = "skip_preview_headful";
4
+ export declare const QUERY_PARAM_NAME = "name";
5
+ export declare const QUERY_PARAM_VIEW_MODE = "ui_mode";
6
+ export declare const QUERY_PARAM_PREVIEW_AS_ROLE = "preview_as_role";
7
+ export declare const UI_MODE_GRID = "grid";
8
+ export declare const MAX_TOASTS = 5;
9
+ export declare const RTMP_RECORD_RESOLUTION_MIN = 480;
10
+ export declare const RTMP_RECORD_RESOLUTION_MAX = 1280;
11
+ export declare const RTMP_RECORD_DEFAULT_RESOLUTION: {
12
+ width: number;
13
+ height: number;
14
+ };
15
+ export declare const EMOJI_REACTION_TYPE = "EMOJI_REACTION";
16
+ export declare const CHAT_SELECTOR: {
17
+ PEER_ID: string;
18
+ ROLE: string;
19
+ };
20
+ export declare const APP_DATA: {
21
+ uiSettings: string;
22
+ chatOpen: string;
23
+ chatSelector: string;
24
+ chatDraft: string;
25
+ appConfig: string;
26
+ sidePane: string;
27
+ hlsStats: string;
28
+ waitingViewerRole: string;
29
+ subscribedNotifications: string;
30
+ logo: string;
31
+ appLayout: string;
32
+ hlsStarted: string;
33
+ rtmpStarted: string;
34
+ recordingStarted: string;
35
+ embedConfig: string;
36
+ pinnedTrackId: string;
37
+ dropdownList: string;
38
+ authToken: string;
39
+ pdfConfig: string;
40
+ minimiseInset: string;
41
+ activeScreensharePeerId: string;
42
+ disableNotifications: string;
43
+ pollState: string;
44
+ background: string;
45
+ backgroundType: string;
46
+ };
47
+ export declare const UI_SETTINGS: {
48
+ isAudioOnly: string;
49
+ maxTileCount: string;
50
+ uiViewMode: string;
51
+ showStatsOnTiles: string;
52
+ enableAmbientMusic: string;
53
+ mirrorLocalVideo: string;
54
+ };
55
+ export declare const SIDE_PANE_OPTIONS: {
56
+ PARTICIPANTS: string;
57
+ CHAT: string;
58
+ STREAMING: string;
59
+ POLLS: string;
60
+ VB: string;
61
+ };
62
+ export declare const POLL_STATE: {
63
+ pollInView: string;
64
+ view: string;
65
+ };
66
+ export declare const POLL_VIEWS: {
67
+ CREATE_POLL_QUIZ: string;
68
+ CREATE_QUESTIONS: string;
69
+ VOTE: string;
70
+ RESULTS: string;
71
+ };
72
+ export declare const SUBSCRIBED_NOTIFICATIONS: {
73
+ PEER_JOINED: string;
74
+ PEER_LEFT: string;
75
+ METADATA_UPDATED: string;
76
+ NEW_MESSAGE: string;
77
+ ERROR: string;
78
+ };
79
+ export declare const CREATE_ROOM_DOC_URL = "https://github.com/100mslive/100ms-web/wiki/Creating-and-joining-a-room";
80
+ export declare const HLS_TIMED_METADATA_DOC_URL = "https://www.100ms.live/docs/javascript/v2/how--to-guides/record-and-live-stream/hls/hls-timed-metadata";
81
+ export declare const REMOTE_STOP_SCREENSHARE_TYPE = "REMOTE_STOP_SCREENSHARE";
82
+ export declare const isChrome: boolean;
83
+ export declare const isFirefox: boolean;
84
+ export declare const isSafari: boolean;
85
+ export declare const isIOS: boolean;
86
+ export declare const isMacOS: boolean;
87
+ export declare const isAndroid: boolean;
88
+ export declare const isIPadOS = false;
89
+ export declare enum SESSION_STORE_KEY {
90
+ TRANSCRIPTION_STATE = "transcriptionState",
91
+ PINNED_MESSAGES = "pinnedMessages",
92
+ SPOTLIGHT = "spotlight",
93
+ CHAT_PEER_BLACKLIST = "chatPeerBlacklist",
94
+ CHAT_MESSAGE_BLACKLIST = "chatMessageBlacklist",
95
+ CHAT_STATE = "chatState"
96
+ }
97
+ export declare enum INTERACTION_TYPE {
98
+ POLL = "Poll",
99
+ QUIZ = "Quiz"
100
+ }
101
+ export declare enum QUESTION_TYPE_TITLE {
102
+ 'single-choice' = "Single Choice",
103
+ 'multiple-choice' = "Multiple Choice"
104
+ }
105
+ export declare enum QUESTION_TYPE {
106
+ SINGLE_CHOICE = "single-choice",
107
+ MULTIPLE_CHOICE = "multiple-choice"
108
+ }
109
+ export declare const ROLE_CHANGE_DECLINED = "role_change_declined";
110
+ export declare const DEFAULT_PORTAL_CONTAINER = "#prebuilt-container";
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AppData: React.MemoExoticComponent<() => React.JSX.Element>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const MwebChatOption: ({ icon, text, onClick, color, }: {
3
+ icon: any;
4
+ text: string;
5
+ onClick: () => void | Promise<void>;
6
+ color: string;
7
+ }) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export declare const Navigation: ({ total, index, showPrevious, showNext, isMobile, }: {
3
+ total: number;
4
+ index: number;
5
+ showPrevious: () => void;
6
+ showNext: () => void;
7
+ isMobile: boolean;
8
+ }) => React.JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const PinnedMessage: ({ clearPinnedMessage }: {
3
+ clearPinnedMessage: (index: number) => void;
4
+ }) => React.JSX.Element | null;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { ConferencingScreen, DefaultConferencingScreen_Elements, HLSLiveStreamingScreen_Elements } from '@100mslive/types-prebuilt';
2
+ import { ConferencingScreen } from '@100mslive/types-prebuilt';
3
+ import { ConferencingScreenElements } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
3
4
  export declare const Footer: ({ screenType, elements, }: {
4
5
  screenType: keyof ConferencingScreen;
5
- elements: DefaultConferencingScreen_Elements | HLSLiveStreamingScreen_Elements;
6
+ elements: ConferencingScreenElements;
6
7
  }) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const ChatNotifications: () => React.JSX.Element;
@@ -8,8 +8,9 @@ export declare const PreviewTile: ({ name, error }: {
8
8
  name: string;
9
9
  error?: boolean | undefined;
10
10
  }) => React.JSX.Element;
11
- export declare const PreviewControls: ({ hideSettings }: {
11
+ export declare const PreviewControls: ({ hideSettings, vbEnabled }: {
12
12
  hideSettings: boolean;
13
+ vbEnabled: boolean;
13
14
  }) => React.JSX.Element;
14
15
  export declare const PreviewSettings: React.MemoExoticComponent<() => React.JSX.Element>;
15
16
  export default PreviewJoin;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { HMSVirtualBackgroundTypes } from '@100mslive/hms-virtual-background';
2
3
  export declare const VBCollection: ({ options, title, activeBackgroundType, activeBackground, }: {
3
4
  options: {
4
5
  title?: string | undefined;
@@ -9,5 +10,5 @@ export declare const VBCollection: ({ options, title, activeBackgroundType, acti
9
10
  }[];
10
11
  title: string;
11
12
  activeBackground: HTMLImageElement | string;
12
- activeBackgroundType: string;
13
+ activeBackgroundType: HMSVirtualBackgroundTypes;
13
14
  }) => React.JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { VirtualBackground } from '@100mslive/types-prebuilt/elements/virtual_background';
3
+ export declare const VBPicker: ({ background_media }?: VirtualBackground) => React.JSX.Element | null;
@@ -1,9 +1,3 @@
1
1
  import { HMSVBPlugin } from '@100mslive/hms-virtual-background';
2
- export declare const VB_EFFECT: {
3
- BLUR: string;
4
- BEAUTIFY: string;
5
- NONE: string;
6
- MEDIA: string;
7
- };
8
2
  export declare const defaultMedia: string[];
9
3
  export declare const vbPlugin: HMSVBPlugin;
@@ -0,0 +1,4 @@
1
+ import { SESSION_STORE_KEY } from '../../common/constants';
2
+ export declare const useChatBlacklist: (sessionStoreKey: SESSION_STORE_KEY.CHAT_MESSAGE_BLACKLIST | SESSION_STORE_KEY.CHAT_PEER_BLACKLIST) => {
3
+ blacklistItem: (blacklistedIDs: string[], blacklistID: string) => Promise<any>;
4
+ };
@@ -0,0 +1,16 @@
1
+ import { HMSMessage } from '@100mslive/react-sdk';
2
+ declare type PinnedMessage = {
3
+ text: string;
4
+ id: string;
5
+ authorId: string;
6
+ pinnedBy: string;
7
+ };
8
+ /**
9
+ * set pinned chat message by updating the session store
10
+ */
11
+ export declare const useSetPinnedMessages: () => {
12
+ setPinnedMessages: (pinnedMessages: PinnedMessage[] | undefined, message: HMSMessage, pinnedBy: string) => Promise<void>;
13
+ removePinnedMessage: (pinnedMessages: PinnedMessage[] | undefined, indexToRemove: number) => Promise<void>;
14
+ unpinBlacklistedMessages: (pinnedMessages: PinnedMessage[] | undefined, blacklistedPeerIDSet: Set<string>, blacklistedMessageIDSet: Set<string>) => Promise<void>;
15
+ };
16
+ export {};
@@ -1,4 +1,4 @@
1
- import { ConferencingScreen, DefaultPreviewScreen_Elements, Screens } from '@100mslive/types-prebuilt';
1
+ import { ConferencingScreen, DefaultConferencingScreen_Elements, DefaultPreviewScreen_Elements, HLSLiveStreamingScreen_Elements, Screens } from '@100mslive/types-prebuilt';
2
2
  export declare type useRoomLayoutScreenProps = {
3
3
  screen: keyof Screens;
4
4
  };
@@ -7,9 +7,10 @@ export declare function useRoomLayoutPreviewScreen(): {
7
7
  elements: DefaultPreviewScreen_Elements | undefined;
8
8
  screenType: "default" | undefined;
9
9
  };
10
+ export declare type ConferencingScreenElements = DefaultConferencingScreen_Elements & HLSLiveStreamingScreen_Elements;
10
11
  export declare function useRoomLayoutConferencingScreen(): {
11
12
  hideSections: string[];
12
- elements: import("@100mslive/types-prebuilt").DefaultConferencingScreen_Elements | import("@100mslive/types-prebuilt").HLSLiveStreamingScreen_Elements | undefined;
13
+ elements: ConferencingScreenElements;
13
14
  screenType: keyof ConferencingScreen;
14
15
  };
15
16
  export declare function useRoomLayoutLeaveScreen(): {