@100mslive/roomkit-react 0.4.3-alpha.2 → 0.4.3-alpha.4
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.
- package/dist/Prebuilt/App.d.ts +0 -1
- package/dist/Prebuilt/AppContext.d.ts +0 -1
- package/dist/index.cjs.css +194 -219
- package/dist/index.cjs.css.map +3 -3
- package/dist/index.cjs.js +8 -56
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.css +194 -219
- package/dist/index.css.map +3 -3
- package/dist/index.js +8 -56
- package/dist/index.js.map +3 -3
- package/dist/meta.cjs.json +23 -41
- package/dist/meta.esbuild.json +23 -41
- package/package.json +8 -9
- package/src/Accordion/Accordion.tsx +0 -88
- package/src/Accordion/index.ts +0 -8
- package/src/AudioLevel/AudioLevel.tsx +0 -84
- package/src/AudioLevel/audio-level.png +0 -0
- package/src/AudioLevel/index.ts +0 -2
- package/src/AudioLevel/useBorderAudioLevel.tsx +0 -34
- package/src/Avatar/Avatar.tsx +0 -60
- package/src/Avatar/getAvatarBg.ts +0 -50
- package/src/Avatar/index.ts +0 -1
- package/src/Button/Button.tsx +0 -210
- package/src/Button/index.tsx +0 -1
- package/src/Checkbox/Checkbox.tsx +0 -35
- package/src/Checkbox/index.tsx +0 -1
- package/src/Collapsible/Collapsible.tsx +0 -34
- package/src/Collapsible/index.tsx +0 -1
- package/src/Diagnostics/AudioTest.tsx +0 -188
- package/src/Diagnostics/BrowserTest.tsx +0 -141
- package/src/Diagnostics/ConnectivityTest.tsx +0 -383
- package/src/Diagnostics/DeviceSelector.jsx +0 -71
- package/src/Diagnostics/Diagnostics.tsx +0 -190
- package/src/Diagnostics/DiagnosticsContext.ts +0 -46
- package/src/Diagnostics/VideoTest.tsx +0 -72
- package/src/Diagnostics/components.tsx +0 -70
- package/src/Diagnostics/index.ts +0 -1
- package/src/Divider/Divider.tsx +0 -45
- package/src/Divider/index.ts +0 -1
- package/src/Dropdown/Dropdown.tsx +0 -145
- package/src/Dropdown/index.tsx +0 -1
- package/src/Fieldset/Fieldset.tsx +0 -11
- package/src/Fieldset/index.tsx +0 -1
- package/src/Footer/Footer.tsx +0 -47
- package/src/Footer/index.tsx +0 -1
- package/src/IconButton/IconButton.tsx +0 -43
- package/src/IconButton/index.tsx +0 -1
- package/src/Input/Input.tsx +0 -109
- package/src/Input/index.tsx +0 -1
- package/src/Label/Label.tsx +0 -8
- package/src/Label/index.ts +0 -1
- package/src/Layout/Box.tsx +0 -3
- package/src/Layout/Flex.tsx +0 -76
- package/src/Layout/index.tsx +0 -2
- package/src/Link/Link.tsx +0 -54
- package/src/Link/index.tsx +0 -2
- package/src/Loading/Loading.tsx +0 -30
- package/src/Loading/index.ts +0 -1
- package/src/Modal/Dialog.tsx +0 -57
- package/src/Modal/DialogContent.tsx +0 -65
- package/src/Modal/index.ts +0 -1
- package/src/Pagination/StyledPagination.tsx +0 -70
- package/src/Pagination/index.tsx +0 -1
- package/src/Popover/index.tsx +0 -34
- package/src/Prebuilt/App.tsx +0 -323
- package/src/Prebuilt/AppContext.tsx +0 -34
- package/src/Prebuilt/AppStateContext.tsx +0 -95
- package/src/Prebuilt/IconButton.tsx +0 -26
- package/src/Prebuilt/common/PeersSorter.ts +0 -111
- package/src/Prebuilt/common/constants.ts +0 -151
- package/src/Prebuilt/common/hooks.ts +0 -257
- package/src/Prebuilt/common/utils.js +0 -185
- package/src/Prebuilt/components/AppData/AppData.tsx +0 -208
- package/src/Prebuilt/components/AppData/useChatState.js +0 -18
- package/src/Prebuilt/components/AppData/useSheet.ts +0 -33
- package/src/Prebuilt/components/AppData/useSidepane.js +0 -99
- package/src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx +0 -22
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -212
- package/src/Prebuilt/components/AudioVideoToggle.tsx +0 -411
- package/src/Prebuilt/components/AuthToken.tsx +0 -148
- package/src/Prebuilt/components/CaptionIcon.tsx +0 -27
- package/src/Prebuilt/components/Chat/ArrowNavigation.tsx +0 -44
- package/src/Prebuilt/components/Chat/Chat.tsx +0 -190
- package/src/Prebuilt/components/Chat/ChatActions.tsx +0 -314
- package/src/Prebuilt/components/Chat/ChatBody.tsx +0 -493
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +0 -316
- package/src/Prebuilt/components/Chat/ChatSelector.tsx +0 -228
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.tsx +0 -158
- package/src/Prebuilt/components/Chat/ChatStates.tsx +0 -73
- package/src/Prebuilt/components/Chat/EmptyChat.tsx +0 -58
- package/src/Prebuilt/components/Chat/MwebChatOption.tsx +0 -24
- package/src/Prebuilt/components/Chat/PinnedMessage.tsx +0 -140
- package/src/Prebuilt/components/Chat/StickIndicator.tsx +0 -24
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +0 -32
- package/src/Prebuilt/components/Chat/useUnreadCount.ts +0 -19
- package/src/Prebuilt/components/Chat/utils.ts +0 -11
- package/src/Prebuilt/components/ChatSettings.tsx +0 -68
- package/src/Prebuilt/components/Chip.tsx +0 -40
- package/src/Prebuilt/components/ConferenceScreen.tsx +0 -205
- package/src/Prebuilt/components/Connection/ConnectionIndicator.tsx +0 -89
- package/src/Prebuilt/components/Connection/TileConnection.tsx +0 -93
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +0 -37
- package/src/Prebuilt/components/EmojiReaction.jsx +0 -100
- package/src/Prebuilt/components/EndCallFeedback/Feedback.tsx +0 -71
- package/src/Prebuilt/components/EndCallFeedback/FeedbackForm.tsx +0 -381
- package/src/Prebuilt/components/EndCallFeedback/ThankyouView.tsx +0 -64
- package/src/Prebuilt/components/ErrorBoundary.jsx +0 -102
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +0 -53
- package/src/Prebuilt/components/Footer/EmojiCard.jsx +0 -34
- package/src/Prebuilt/components/Footer/Footer.tsx +0 -115
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +0 -124
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +0 -478
- package/src/Prebuilt/components/Footer/PollsToggle.tsx +0 -37
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +0 -183
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +0 -215
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +0 -52
- package/src/Prebuilt/components/FullPageProgress.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +0 -22
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.tsx +0 -13
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.tsx +0 -72
- package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx +0 -248
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +0 -75
- package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +0 -86
- package/src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx +0 -27
- package/src/Prebuilt/components/HMSVideo/PlayPauseSeekControls.tsx +0 -158
- package/src/Prebuilt/components/HMSVideo/PlayerContext.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/SeekControl.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/VideoProgress.tsx +0 -100
- package/src/Prebuilt/components/HMSVideo/VideoTime.tsx +0 -52
- package/src/Prebuilt/components/HMSVideo/VolumeControl.tsx +0 -70
- package/src/Prebuilt/components/HMSVideo/index.ts +0 -24
- package/src/Prebuilt/components/HMSVideo/utils.ts +0 -37
- package/src/Prebuilt/components/Header/Header.tsx +0 -52
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +0 -57
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +0 -89
- package/src/Prebuilt/components/Header/RoomDetailsHeader.tsx +0 -51
- package/src/Prebuilt/components/Header/StreamActions.tsx +0 -297
- package/src/Prebuilt/components/Header/common.jsx +0 -196
- package/src/Prebuilt/components/Header/index.tsx +0 -1
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +0 -89
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +0 -167
- package/src/Prebuilt/components/Input/KeyboardInputManager.js +0 -107
- package/src/Prebuilt/components/InsetTile.tsx +0 -136
- package/src/Prebuilt/components/LayoutModeSelector.tsx +0 -112
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -166
- package/src/Prebuilt/components/Leave/EndSessionContent.tsx +0 -64
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +0 -26
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +0 -36
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +0 -82
- package/src/Prebuilt/components/Leave/LeaveSessionContent.tsx +0 -61
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +0 -135
- package/src/Prebuilt/components/LeaveScreen.tsx +0 -71
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +0 -60
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +0 -139
- package/src/Prebuilt/components/MoreSettings/CaptionContent.tsx +0 -143
- package/src/Prebuilt/components/MoreSettings/CaptionModal.tsx +0 -37
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx +0 -123
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx +0 -78
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +0 -81
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.tsx +0 -26
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +0 -29
- package/src/Prebuilt/components/MoreSettings/MuteAllContent.tsx +0 -81
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.tsx +0 -72
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +0 -282
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +0 -387
- package/src/Prebuilt/components/MoreSettings/constants.ts +0 -14
- package/src/Prebuilt/components/MwebLandscapePrompt.tsx +0 -81
- package/src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx +0 -39
- package/src/Prebuilt/components/Notifications/ChatNotifications.tsx +0 -34
- package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +0 -18
- package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +0 -86
- package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +0 -56
- package/src/Prebuilt/components/Notifications/HLSFailureModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +0 -78
- package/src/Prebuilt/components/Notifications/InitErrorModal.tsx +0 -42
- package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +0 -24
- package/src/Prebuilt/components/Notifications/Notifications.tsx +0 -65
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +0 -52
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.tsx +0 -144
- package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +0 -33
- package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +0 -24
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +0 -61
- package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +0 -41
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +0 -63
- package/src/Prebuilt/components/Notifications/TranscriptionNotifications.tsx +0 -58
- package/src/Prebuilt/components/Notifications/index.tsx +0 -1
- package/src/Prebuilt/components/PIP/PIPChat.tsx +0 -292
- package/src/Prebuilt/components/PIP/PIPChatOption.tsx +0 -18
- package/src/Prebuilt/components/PIP/PIPComponent.tsx +0 -90
- package/src/Prebuilt/components/PIP/PIPManager.ts +0 -335
- package/src/Prebuilt/components/PIP/PIPProvider.tsx +0 -56
- package/src/Prebuilt/components/PIP/PIPWindow.tsx +0 -13
- package/src/Prebuilt/components/PIP/SetupMediaSession.js +0 -60
- package/src/Prebuilt/components/PIP/context.ts +0 -10
- package/src/Prebuilt/components/PIP/index.jsx +0 -6
- package/src/Prebuilt/components/PIP/pip.test.js +0 -72
- package/src/Prebuilt/components/PIP/pipUtils.js +0 -183
- package/src/Prebuilt/components/PIP/usePIPChat.tsx +0 -105
- package/src/Prebuilt/components/PIP/usePIPWindow.tsx +0 -12
- package/src/Prebuilt/components/Pagination.tsx +0 -60
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx +0 -248
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +0 -142
- package/src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.tsx +0 -74
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.tsx +0 -324
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.tsx +0 -64
- package/src/Prebuilt/components/Polls/Polls.tsx +0 -31
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +0 -76
- package/src/Prebuilt/components/Polls/Voting/LeaderboardSummary.tsx +0 -116
- package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +0 -60
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +0 -221
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.tsx +0 -47
- package/src/Prebuilt/components/Polls/Voting/StatisticBox.tsx +0 -20
- package/src/Prebuilt/components/Polls/Voting/TimedVoting.tsx +0 -55
- package/src/Prebuilt/components/Polls/Voting/Voting.tsx +0 -143
- package/src/Prebuilt/components/Polls/Voting/useQuizSummary.tsx +0 -50
- package/src/Prebuilt/components/Polls/common/Line.tsx +0 -4
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +0 -115
- package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx +0 -38
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +0 -140
- package/src/Prebuilt/components/Polls/common/StatusIndicator.tsx +0 -35
- package/src/Prebuilt/components/Polls/common/VoteCount.tsx +0 -15
- package/src/Prebuilt/components/Polls/common/VoteProgress.tsx +0 -18
- package/src/Prebuilt/components/Polls/common/constants.ts +0 -5
- package/src/Prebuilt/components/Polls/common/utils.ts +0 -22
- package/src/Prebuilt/components/Preview/PreviewForm.tsx +0 -94
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +0 -292
- package/src/Prebuilt/components/Preview/PreviewScreen.tsx +0 -38
- package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +0 -20
- package/src/Prebuilt/components/RaiseHand.tsx +0 -30
- package/src/Prebuilt/components/RemoveParticipant.tsx +0 -35
- package/src/Prebuilt/components/RoleChangeModal.tsx +0 -188
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +0 -75
- package/src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx +0 -94
- package/src/Prebuilt/components/RoomDetails/Duration.tsx +0 -26
- package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +0 -63
- package/src/Prebuilt/components/RoomDetails/RoomDetailsRow.tsx +0 -23
- package/src/Prebuilt/components/RoomDetails/RoomDetailsSheet.tsx +0 -45
- package/src/Prebuilt/components/ScreenShareToggle.jsx +0 -58
- package/src/Prebuilt/components/ScreenshareDisplay.tsx +0 -39
- package/src/Prebuilt/components/ScreenshareTile.tsx +0 -134
- package/src/Prebuilt/components/SecondaryTiles.tsx +0 -81
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +0 -208
- package/src/Prebuilt/components/Settings/LayoutSettings.tsx +0 -74
- package/src/Prebuilt/components/Settings/NotificationSettings.tsx +0 -66
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +0 -301
- package/src/Prebuilt/components/Settings/StartRecording.jsx +0 -101
- package/src/Prebuilt/components/Settings/SwitchWithLabel.tsx +0 -53
- package/src/Prebuilt/components/Settings/common.ts +0 -16
- package/src/Prebuilt/components/ShareMenuIcon.jsx +0 -27
- package/src/Prebuilt/components/SidePaneTabs.tsx +0 -214
- package/src/Prebuilt/components/StatsForNerds.jsx +0 -373
- package/src/Prebuilt/components/Streaming/Common.jsx +0 -143
- package/src/Prebuilt/components/Streaming/ResolutionInput.jsx +0 -88
- package/src/Prebuilt/components/TileMenu/TileMenu.tsx +0 -148
- package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +0 -393
- package/src/Prebuilt/components/TileMenu/utils.ts +0 -7
- package/src/Prebuilt/components/Toast/Toast.jsx +0 -17
- package/src/Prebuilt/components/Toast/ToastBatcher.js +0 -64
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +0 -177
- package/src/Prebuilt/components/Toast/ToastContainer.jsx +0 -30
- package/src/Prebuilt/components/Toast/ToastManager.js +0 -44
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +0 -62
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +0 -43
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +0 -155
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +0 -91
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +0 -66
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -74
- package/src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx +0 -93
- package/src/Prebuilt/components/VideoLayouts/interface.ts +0 -11
- package/src/Prebuilt/components/VideoTile.tsx +0 -203
- package/src/Prebuilt/components/VirtualBackground/VBCollection.tsx +0 -52
- package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +0 -130
- package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +0 -57
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +0 -252
- package/src/Prebuilt/components/VirtualBackground/VBToggle.tsx +0 -50
- package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +0 -20
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +0 -70
- package/src/Prebuilt/components/hooks/useChatBlacklist.ts +0 -29
- package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +0 -17
- package/src/Prebuilt/components/hooks/useDropdownList.ts +0 -24
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +0 -3
- package/src/Prebuilt/components/hooks/useFullscreen.ts +0 -46
- package/src/Prebuilt/components/hooks/useGroupOnStageActions.tsx +0 -54
- package/src/Prebuilt/components/hooks/useMetadata.tsx +0 -56
- package/src/Prebuilt/components/hooks/usePeerOnStageActions.tsx +0 -49
- package/src/Prebuilt/components/hooks/usePinnedBy.tsx +0 -22
- package/src/Prebuilt/components/hooks/usePinnedMessages.ts +0 -78
- package/src/Prebuilt/components/hooks/usePlaylist.js +0 -25
- package/src/Prebuilt/components/hooks/usePlaylistMusic.js +0 -35
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +0 -23
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +0 -39
- package/src/Prebuilt/components/hooks/useScreenshareAudio.js +0 -28
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +0 -128
- package/src/Prebuilt/components/hooks/useUnreadPollQuizPresent.tsx +0 -17
- package/src/Prebuilt/components/hooks/useUserPreferences.jsx +0 -26
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +0 -26
- package/src/Prebuilt/components/init/Init.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +0 -42
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +0 -32
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +0 -211
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +0 -48
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +0 -71
- package/src/Prebuilt/components/peerTileUtils.tsx +0 -42
- package/src/Prebuilt/images/android-perm-1.png +0 -0
- package/src/Prebuilt/images/empty-chat.svg +0 -12
- package/src/Prebuilt/images/ios-perm-0.png +0 -0
- package/src/Prebuilt/images/pdf-share.png +0 -0
- package/src/Prebuilt/images/rtmp.png +0 -0
- package/src/Prebuilt/images/screen-share.png +0 -0
- package/src/Prebuilt/images/transaction_error.svg +0 -12
- package/src/Prebuilt/index.ts +0 -1
- package/src/Prebuilt/layouts/EmbedView.jsx +0 -94
- package/src/Prebuilt/layouts/HLSView.jsx +0 -794
- package/src/Prebuilt/layouts/PDFView.jsx +0 -67
- package/src/Prebuilt/layouts/Sheet.tsx +0 -14
- package/src/Prebuilt/layouts/SidePane.tsx +0 -241
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +0 -164
- package/src/Prebuilt/layouts/WaitingView.tsx +0 -52
- package/src/Prebuilt/plugins/CaptionsViewer.tsx +0 -261
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +0 -154
- package/src/Prebuilt/plugins/RemoteStopScreenshare.jsx +0 -18
- package/src/Prebuilt/plugins/transcription/Transcriber.js +0 -216
- package/src/Prebuilt/plugins/transcription/TranscriptionButton.jsx +0 -138
- package/src/Prebuilt/plugins/transcription/index.jsx +0 -1
- package/src/Prebuilt/primitives/DialogContent.jsx +0 -285
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +0 -46
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +0 -60
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +0 -88
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +0 -10
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +0 -112
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +0 -53
- package/src/Prebuilt/services/FeatureFlags.jsx +0 -46
- package/src/Progress/index.tsx +0 -17
- package/src/QRCode/QRCode.tsx +0 -6
- package/src/QRCode/index.tsx +0 -1
- package/src/RadioGroup/RadioGroup.tsx +0 -33
- package/src/RadioGroup/index.tsx +0 -1
- package/src/ReactSelect/ReactSelect.tsx +0 -97
- package/src/ReactSelect/index.ts +0 -1
- package/src/Select/Select.tsx +0 -63
- package/src/Select/index.ts +0 -1
- package/src/Sheet/Sheet.tsx +0 -122
- package/src/Sheet/index.ts +0 -1
- package/src/Slider/Slider.tsx +0 -70
- package/src/Slider/index.ts +0 -1
- package/src/Stats/Stats.tsx +0 -243
- package/src/Stats/StyledStats.tsx +0 -57
- package/src/Stats/formatBytes.ts +0 -19
- package/src/Stats/index.tsx +0 -2
- package/src/Stats/useQoE.ts +0 -79
- package/src/Switch/Switch.tsx +0 -52
- package/src/Switch/index.ts +0 -1
- package/src/Tabs/Tabs.tsx +0 -41
- package/src/Tabs/index.tsx +0 -1
- package/src/Text/Text.tsx +0 -149
- package/src/Text/index.tsx +0 -1
- package/src/TextArea/TextArea.tsx +0 -30
- package/src/TextArea/index.tsx +0 -1
- package/src/Theme/ThemeProvider.tsx +0 -98
- package/src/Theme/base.config.ts +0 -236
- package/src/Theme/index.tsx +0 -2
- package/src/Theme/stitches.config.ts +0 -88
- package/src/Theme/useSSR.tsx +0 -24
- package/src/TileMenu/StyledMenuTile.tsx +0 -105
- package/src/TileMenu/TileMenu.tsx +0 -98
- package/src/TileMenu/index.tsx +0 -1
- package/src/Toast/Toast.tsx +0 -170
- package/src/Toast/index.tsx +0 -1
- package/src/Tooltip/Tooltip.tsx +0 -79
- package/src/Tooltip/index.ts +0 -1
- package/src/Video/Video.tsx +0 -61
- package/src/Video/index.tsx +0 -1
- package/src/VideoList/StyledVideoList.tsx +0 -39
- package/src/VideoList/index.tsx +0 -2
- package/src/VideoList/videoListUtils.tsx +0 -20
- package/src/VideoTile/StyledVideoTile.tsx +0 -146
- package/src/VideoTile/index.tsx +0 -1
- package/src/context/DialogContext.tsx +0 -13
- package/src/fixtures/chats.ts +0 -25
- package/src/fixtures/peers.ts +0 -27
- package/src/fixtures/tracks.ts +0 -11
- package/src/hooks/useDialogContainerSelector.tsx +0 -7
- package/src/index.ts +0 -41
- package/src/store/SetupFakeStore.ts +0 -33
- package/src/store/StorybookSDK.ts +0 -231
- package/src/utils/animations.ts +0 -114
- package/src/utils/index.ts +0 -2
- package/src/utils/styles.ts +0 -22
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import type { Theme } from './stitches.config';
|
|
3
|
-
import { createTheme, theme } from './stitches.config';
|
|
4
|
-
import useSSR from './useSSR';
|
|
5
|
-
|
|
6
|
-
const defaultAspectRatio = {
|
|
7
|
-
width: 1,
|
|
8
|
-
height: 1,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export enum ThemeTypes {
|
|
12
|
-
// eslint-disable-next-line no-unused-vars
|
|
13
|
-
default = 'default',
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type ThemeContextValue = {
|
|
17
|
-
themeType: string;
|
|
18
|
-
theme: Theme;
|
|
19
|
-
aspectRatio: { width: number; height: number };
|
|
20
|
-
/**
|
|
21
|
-
* @param {ThemeTypes} themeToUpdateTo - optional
|
|
22
|
-
* Use this to toggle or update the currentTheme.
|
|
23
|
-
* if a param is passed, it will set the theme to passed value, otherwise will toggle between light and dark
|
|
24
|
-
* depending on current applied theme
|
|
25
|
-
*/
|
|
26
|
-
toggleTheme: (themeToUpdateTo?: ThemeTypes) => void;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export type ThemeProviderProps = {
|
|
30
|
-
themeType?: string;
|
|
31
|
-
theme?: Theme;
|
|
32
|
-
aspectRatio?: { width: number; height: number };
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const defaultContext = {
|
|
36
|
-
themeType: ThemeTypes.default,
|
|
37
|
-
theme,
|
|
38
|
-
aspectRatio: { width: 1, height: 1 },
|
|
39
|
-
toggleTheme: (_themeToUpdateTo?: ThemeTypes) => {
|
|
40
|
-
return;
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
export const ThemeContext = React.createContext<ThemeContextValue>(defaultContext);
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Wrap this around your root component to get access to theme
|
|
47
|
-
* eg:
|
|
48
|
-
* <ThemeProvider type="dark" appBuilder={{ aspectRatio: { width:1, height: 1} }}>
|
|
49
|
-
* <App />
|
|
50
|
-
* </ThemeProvider>
|
|
51
|
-
*/
|
|
52
|
-
export const HMSThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>> = ({
|
|
53
|
-
themeType,
|
|
54
|
-
theme: userTheme,
|
|
55
|
-
aspectRatio = defaultAspectRatio,
|
|
56
|
-
children,
|
|
57
|
-
}) => {
|
|
58
|
-
const systemTheme = ThemeTypes.default;
|
|
59
|
-
const [currentTheme, setCurrentTheme] = useState(themeType || systemTheme);
|
|
60
|
-
const previousClassName = useRef('');
|
|
61
|
-
const { isBrowser } = useSSR();
|
|
62
|
-
const updatedTheme = useMemo(() => {
|
|
63
|
-
const updatedTheme = createTheme({ themeType: currentTheme, theme: userTheme || {} });
|
|
64
|
-
if (!isBrowser) {
|
|
65
|
-
return updatedTheme;
|
|
66
|
-
}
|
|
67
|
-
if (previousClassName.current) {
|
|
68
|
-
document.documentElement.classList.remove(previousClassName.current);
|
|
69
|
-
}
|
|
70
|
-
previousClassName.current = updatedTheme.className;
|
|
71
|
-
document.documentElement.classList.add(updatedTheme);
|
|
72
|
-
return updatedTheme;
|
|
73
|
-
}, [userTheme, currentTheme, isBrowser]);
|
|
74
|
-
|
|
75
|
-
const toggleTheme = useCallback((themeToUpdateTo?: ThemeTypes) => {
|
|
76
|
-
if (themeToUpdateTo) {
|
|
77
|
-
setCurrentTheme(themeToUpdateTo);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
setCurrentTheme(ThemeTypes.default);
|
|
81
|
-
}, []);
|
|
82
|
-
|
|
83
|
-
useEffect(() => {
|
|
84
|
-
if (themeType) {
|
|
85
|
-
setCurrentTheme(themeType);
|
|
86
|
-
}
|
|
87
|
-
}, [themeType]);
|
|
88
|
-
|
|
89
|
-
return (
|
|
90
|
-
<ThemeContext.Provider
|
|
91
|
-
value={{ themeType: currentTheme, theme: updatedTheme as unknown as Theme, aspectRatio, toggleTheme }}
|
|
92
|
-
>
|
|
93
|
-
{children}
|
|
94
|
-
</ThemeContext.Provider>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const useTheme = () => React.useContext(ThemeContext);
|
package/src/Theme/base.config.ts
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import type * as Stitches from '@stitches/react';
|
|
2
|
-
import { defaultThemeMap as defaultStitchesThemeMap } from '@stitches/react';
|
|
3
|
-
|
|
4
|
-
export const baseConfig = {
|
|
5
|
-
theme: {
|
|
6
|
-
colors: {
|
|
7
|
-
primary_default: '#2572ED',
|
|
8
|
-
primary_bright: '#538DFF',
|
|
9
|
-
primary_dim: '#002D6D',
|
|
10
|
-
primary_disabled: '#004299',
|
|
11
|
-
on_primary_high: 'rgba(245, 249, 255, 0.95)',
|
|
12
|
-
on_primary_medium: 'rgba(224, 236, 255, 0.8)',
|
|
13
|
-
on_primary_low: 'rgba(194, 208, 229, 0.5)',
|
|
14
|
-
secondary_default: '#444954',
|
|
15
|
-
secondary_bright: '#70778B',
|
|
16
|
-
secondary_dim: '#293042',
|
|
17
|
-
secondary_disabled: '#404759',
|
|
18
|
-
on_secondary_high: '#FFFFFF',
|
|
19
|
-
on_secondary_medium: '#D3D9F0',
|
|
20
|
-
on_secondary_low: '#A4ABC0',
|
|
21
|
-
background_default: '#0B0E15',
|
|
22
|
-
background_dim: '#000000',
|
|
23
|
-
surface_default: '#191B23',
|
|
24
|
-
surface_bright: '#272A31',
|
|
25
|
-
surface_brighter: '#2E3038',
|
|
26
|
-
surface_dim: '#11131A',
|
|
27
|
-
on_surface_high: '#EFF0FA',
|
|
28
|
-
on_surface_medium: '#C5C6D0',
|
|
29
|
-
on_surface_low: '#8F9099',
|
|
30
|
-
border_default: '#1D1F27',
|
|
31
|
-
border_bright: '#272A31',
|
|
32
|
-
alert_success: '#36B37E',
|
|
33
|
-
alert_warning: '#FFAB00',
|
|
34
|
-
alert_error_default: '#C74E5B',
|
|
35
|
-
alert_error_bright: '#FFB2B6',
|
|
36
|
-
alert_error_brighter: '#FFEDEC',
|
|
37
|
-
alert_error_dim: '#270005',
|
|
38
|
-
},
|
|
39
|
-
shadows: {
|
|
40
|
-
sm: '0 0 4px 0 #0000004D',
|
|
41
|
-
md: '0 0 8px 0 #0000004D',
|
|
42
|
-
},
|
|
43
|
-
fonts: {
|
|
44
|
-
sans: 'Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif',
|
|
45
|
-
},
|
|
46
|
-
fontSizes: {
|
|
47
|
-
h1: '6rem',
|
|
48
|
-
h2: '3.75rem',
|
|
49
|
-
h3: '3rem',
|
|
50
|
-
h4: '2.125rem',
|
|
51
|
-
h5: '1.5rem',
|
|
52
|
-
h6: '1.25rem',
|
|
53
|
-
tiny: '0.625rem',
|
|
54
|
-
xs: '0.75rem',
|
|
55
|
-
sm: '0.875rem',
|
|
56
|
-
md: '1rem',
|
|
57
|
-
lg: '1.125rem',
|
|
58
|
-
},
|
|
59
|
-
fontWeights: {
|
|
60
|
-
semiBold: 600,
|
|
61
|
-
medium: 500,
|
|
62
|
-
regular: 400,
|
|
63
|
-
},
|
|
64
|
-
lineHeights: {
|
|
65
|
-
h1: '5.75rem',
|
|
66
|
-
h2: '3.5rem',
|
|
67
|
-
h3: '3.25rem',
|
|
68
|
-
h4: '2.5rem',
|
|
69
|
-
h5: '2rem',
|
|
70
|
-
h6: '1.5rem',
|
|
71
|
-
tiny: '1rem',
|
|
72
|
-
xs: '1rem',
|
|
73
|
-
sm: '1.25rem',
|
|
74
|
-
md: '1.5rem',
|
|
75
|
-
},
|
|
76
|
-
radii: {
|
|
77
|
-
'0': '0.25rem',
|
|
78
|
-
'1': '0.5rem',
|
|
79
|
-
'2': '0.75rem',
|
|
80
|
-
'3': '1rem',
|
|
81
|
-
'4': '1.5rem',
|
|
82
|
-
round: '100rem',
|
|
83
|
-
},
|
|
84
|
-
space: {
|
|
85
|
-
0: '0rem',
|
|
86
|
-
xs: '0.5rem',
|
|
87
|
-
sm: '0.75rem',
|
|
88
|
-
md: '1rem',
|
|
89
|
-
lg: '1.25rem',
|
|
90
|
-
xl: '2.25rem',
|
|
91
|
-
px: '1px',
|
|
92
|
-
1: '0.125rem',
|
|
93
|
-
2: '0.25rem',
|
|
94
|
-
3: '0.375rem',
|
|
95
|
-
4: '0.5rem',
|
|
96
|
-
5: '0.625rem',
|
|
97
|
-
6: '0.75rem',
|
|
98
|
-
7: '0.875rem',
|
|
99
|
-
8: '1rem',
|
|
100
|
-
9: '1.25rem',
|
|
101
|
-
10: '1.5rem',
|
|
102
|
-
11: '1.75rem',
|
|
103
|
-
12: '2rem',
|
|
104
|
-
13: '2.25rem',
|
|
105
|
-
14: '2.5rem',
|
|
106
|
-
15: '2.75rem',
|
|
107
|
-
16: '3rem',
|
|
108
|
-
17: '3.5rem',
|
|
109
|
-
18: '4rem',
|
|
110
|
-
19: '4.25rem',
|
|
111
|
-
20: '5rem',
|
|
112
|
-
24: '6rem',
|
|
113
|
-
28: '7rem',
|
|
114
|
-
32: '8rem',
|
|
115
|
-
36: '9rem',
|
|
116
|
-
40: '10rem',
|
|
117
|
-
44: '11rem',
|
|
118
|
-
48: '12rem',
|
|
119
|
-
52: '13rem',
|
|
120
|
-
56: '14rem',
|
|
121
|
-
60: '15rem',
|
|
122
|
-
64: '16rem',
|
|
123
|
-
72: '18rem',
|
|
124
|
-
80: '20rem',
|
|
125
|
-
96: '24rem',
|
|
126
|
-
100: '25rem',
|
|
127
|
-
},
|
|
128
|
-
borderWidths: {
|
|
129
|
-
light: '1px',
|
|
130
|
-
normal: '2px',
|
|
131
|
-
bold: '3px',
|
|
132
|
-
extrabold: '4px',
|
|
133
|
-
black: '5px',
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export const defaultUtils = {
|
|
139
|
-
bg: (value: Stitches.PropertyValue<'backgroundColor'>) => ({
|
|
140
|
-
backgroundColor: value,
|
|
141
|
-
}),
|
|
142
|
-
c: (value: Stitches.PropertyValue<'color'>) => ({
|
|
143
|
-
color: value,
|
|
144
|
-
}),
|
|
145
|
-
r: (value: Stitches.ScaleValue<'radii'>) => ({
|
|
146
|
-
borderRadius: value,
|
|
147
|
-
}),
|
|
148
|
-
fs: (value: Stitches.PropertyValue<'fontSize'> | number | string) => ({
|
|
149
|
-
fontSize: value,
|
|
150
|
-
}),
|
|
151
|
-
size: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
152
|
-
height: value,
|
|
153
|
-
width: value,
|
|
154
|
-
}),
|
|
155
|
-
w: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
156
|
-
width: value,
|
|
157
|
-
}),
|
|
158
|
-
h: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
159
|
-
height: value,
|
|
160
|
-
}),
|
|
161
|
-
p: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
162
|
-
padding: value,
|
|
163
|
-
}),
|
|
164
|
-
pt: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
165
|
-
paddingTop: value,
|
|
166
|
-
}),
|
|
167
|
-
pr: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
168
|
-
paddingRight: value,
|
|
169
|
-
}),
|
|
170
|
-
pb: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
171
|
-
paddingBottom: value,
|
|
172
|
-
}),
|
|
173
|
-
pl: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
174
|
-
paddingLeft: value,
|
|
175
|
-
}),
|
|
176
|
-
px: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
177
|
-
paddingLeft: value,
|
|
178
|
-
paddingRight: value,
|
|
179
|
-
}),
|
|
180
|
-
py: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
181
|
-
paddingTop: value,
|
|
182
|
-
paddingBottom: value,
|
|
183
|
-
}),
|
|
184
|
-
m: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
185
|
-
margin: value,
|
|
186
|
-
}),
|
|
187
|
-
mt: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
188
|
-
marginTop: value,
|
|
189
|
-
}),
|
|
190
|
-
mr: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
191
|
-
marginRight: value,
|
|
192
|
-
}),
|
|
193
|
-
mb: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
194
|
-
marginBottom: value,
|
|
195
|
-
}),
|
|
196
|
-
ml: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
197
|
-
marginLeft: value,
|
|
198
|
-
}),
|
|
199
|
-
mx: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
200
|
-
marginLeft: value,
|
|
201
|
-
marginRight: value,
|
|
202
|
-
}),
|
|
203
|
-
my: (value: Stitches.ScaleValue<'space'> | number | string) => ({
|
|
204
|
-
marginTop: value,
|
|
205
|
-
marginBottom: value,
|
|
206
|
-
}),
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
export const defaultMedia = {
|
|
210
|
-
allowMotion: '(prefers-reduced-motion: no-preference)',
|
|
211
|
-
sm: '(max-width: 640px)',
|
|
212
|
-
md: '(max-width: 768px)',
|
|
213
|
-
lg: '(max-width: 1024px)',
|
|
214
|
-
xl: '(max-width: 1280px)',
|
|
215
|
-
'2xl': '(max-width: 1536px)',
|
|
216
|
-
ls: '(max-width: 1024px) and (orientation: landscape)',
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
export const defaultThemeMap = {
|
|
220
|
-
...defaultStitchesThemeMap,
|
|
221
|
-
width: 'space',
|
|
222
|
-
height: 'space',
|
|
223
|
-
minWidth: 'space',
|
|
224
|
-
maxWidth: 'space',
|
|
225
|
-
minHeight: 'space',
|
|
226
|
-
maxHeight: 'space',
|
|
227
|
-
flexBasis: 'space',
|
|
228
|
-
gridTemplateColumns: 'space',
|
|
229
|
-
gridTemplateRows: 'space',
|
|
230
|
-
blockSize: 'space',
|
|
231
|
-
minBlockSize: 'space',
|
|
232
|
-
maxBlockSize: 'space',
|
|
233
|
-
inlineSize: 'space',
|
|
234
|
-
minInlineSize: 'space',
|
|
235
|
-
maxInlineSize: 'space',
|
|
236
|
-
};
|
package/src/Theme/index.tsx
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type * as Stitches from '@stitches/react';
|
|
2
|
-
import { createStitches } from '@stitches/react';
|
|
3
|
-
import merge from 'lodash.merge';
|
|
4
|
-
import { baseConfig, defaultMedia, defaultThemeMap, defaultUtils } from './base.config';
|
|
5
|
-
import { DEFAULT_PORTAL_CONTAINER } from '../Prebuilt/common/constants';
|
|
6
|
-
|
|
7
|
-
const HmsStitches = createStitches({
|
|
8
|
-
prefix: 'hms-ui',
|
|
9
|
-
theme: {
|
|
10
|
-
...baseConfig.theme,
|
|
11
|
-
colors: {
|
|
12
|
-
...baseConfig.theme.colors,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
media: defaultMedia,
|
|
16
|
-
utils: defaultUtils,
|
|
17
|
-
themeMap: defaultThemeMap,
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export const {
|
|
21
|
-
theme,
|
|
22
|
-
createTheme: createThemeBase,
|
|
23
|
-
styled,
|
|
24
|
-
globalCss,
|
|
25
|
-
keyframes,
|
|
26
|
-
css,
|
|
27
|
-
getCssText,
|
|
28
|
-
config,
|
|
29
|
-
} = HmsStitches;
|
|
30
|
-
|
|
31
|
-
export const globalStyles = globalCss({
|
|
32
|
-
[`${DEFAULT_PORTAL_CONTAINER} *`]: {
|
|
33
|
-
fontFamily: '$sans',
|
|
34
|
-
boxSizing: 'border-box',
|
|
35
|
-
},
|
|
36
|
-
'::-webkit-scrollbar-track': {
|
|
37
|
-
WebkitBoxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
|
|
38
|
-
boxShadow: 'inset 0 0 6px rgba(0, 0, 0, 0.3)',
|
|
39
|
-
backgroundColor: 'transparent',
|
|
40
|
-
},
|
|
41
|
-
'::-webkit-scrollbar': {
|
|
42
|
-
width: '6px',
|
|
43
|
-
height: '6px',
|
|
44
|
-
backgroundColor: 'transparent',
|
|
45
|
-
},
|
|
46
|
-
'::-webkit-scrollbar-thumb': {
|
|
47
|
-
backgroundColor: '#657080',
|
|
48
|
-
borderRadius: '5px',
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* needed for safari. Safari
|
|
52
|
-
* adds background color on its own
|
|
53
|
-
* on hls-viewer on fullscreen
|
|
54
|
-
*/
|
|
55
|
-
'#hls-viewer-dark:fullscreen': {
|
|
56
|
-
backgroundColor: 'black !important',
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
'#hls-viewer-light:fullscreen': {
|
|
60
|
-
backgroundColor: 'white !important',
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
export type ThemeType = 'default';
|
|
65
|
-
export type Theme = typeof HmsStitches.theme;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* This method will be used to create custom themes or update any theme values
|
|
69
|
-
* @param { type: ThemeType; className: string; theme: Theme }
|
|
70
|
-
* @returns
|
|
71
|
-
*/
|
|
72
|
-
export const createTheme = ({
|
|
73
|
-
themeType,
|
|
74
|
-
theme,
|
|
75
|
-
className,
|
|
76
|
-
}: {
|
|
77
|
-
themeType: string;
|
|
78
|
-
className?: string;
|
|
79
|
-
theme?: Partial<Theme>;
|
|
80
|
-
}) => {
|
|
81
|
-
if (!themeType) {
|
|
82
|
-
throw new Error('Theme type is required');
|
|
83
|
-
}
|
|
84
|
-
const mergedTheme = merge(baseConfig.theme, theme || {});
|
|
85
|
-
return createThemeBase(className || `${themeType}-theme`, mergedTheme);
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export type CSS = Stitches.CSS<typeof HmsStitches>;
|
package/src/Theme/useSSR.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
const isBrowser = (): boolean => {
|
|
4
|
-
return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export type SSRState = {
|
|
8
|
-
isBrowser: boolean;
|
|
9
|
-
isServer: boolean;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const useSSR = (): SSRState => {
|
|
13
|
-
const [browser, setBrowser] = useState<boolean>(false);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
setBrowser(isBrowser());
|
|
16
|
-
}, []);
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
isBrowser: browser,
|
|
20
|
-
isServer: !browser,
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default useSSR;
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
-
import { styled } from '../Theme';
|
|
3
|
-
import { popoverAnimation } from '../utils/animations';
|
|
4
|
-
import { flexCenter } from '../utils/styles';
|
|
5
|
-
|
|
6
|
-
const Root = Popover.Root;
|
|
7
|
-
|
|
8
|
-
const StyledTrigger = styled(Popover.Trigger, {
|
|
9
|
-
position: 'absolute',
|
|
10
|
-
bottom: '$2',
|
|
11
|
-
right: '$2',
|
|
12
|
-
zIndex: 10,
|
|
13
|
-
width: '$13',
|
|
14
|
-
height: '$13',
|
|
15
|
-
color: '$on_surface_high',
|
|
16
|
-
borderRadius: '$2',
|
|
17
|
-
backgroundColor: '$surface_bright',
|
|
18
|
-
cursor: 'pointer',
|
|
19
|
-
border: 'none',
|
|
20
|
-
...flexCenter,
|
|
21
|
-
'&:not([disabled]):focus': {
|
|
22
|
-
outline: 'none',
|
|
23
|
-
boxShadow: '0 0 0 3px $colors$primary_bright',
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const StyledContent = styled(Popover.Content, {
|
|
28
|
-
fontFamily: '$sans',
|
|
29
|
-
backgroundColor: '$surface_dim',
|
|
30
|
-
padding: '$5 0',
|
|
31
|
-
display: 'flex',
|
|
32
|
-
flexDirection: 'column',
|
|
33
|
-
borderRadius: '$space$6',
|
|
34
|
-
zIndex: 11,
|
|
35
|
-
width: '$60',
|
|
36
|
-
...popoverAnimation,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const styledItem = {
|
|
40
|
-
fontSize: '$sm',
|
|
41
|
-
color: '$on_surface_high',
|
|
42
|
-
display: 'flex',
|
|
43
|
-
alignItems: 'center',
|
|
44
|
-
padding: '$4 $6',
|
|
45
|
-
width: '100%',
|
|
46
|
-
backgroundColor: '$menuBg',
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const StyledItemButton = styled('button', {
|
|
50
|
-
...styledItem,
|
|
51
|
-
height: '$14',
|
|
52
|
-
border: 'none',
|
|
53
|
-
'&:hover': {
|
|
54
|
-
backgroundColor: '$surface_brighter',
|
|
55
|
-
},
|
|
56
|
-
cursor: 'pointer',
|
|
57
|
-
// TODO: default focus applied cause issues with this style
|
|
58
|
-
'&:focus': {
|
|
59
|
-
outline: 'none',
|
|
60
|
-
// backgroundColor: '$grey3',
|
|
61
|
-
},
|
|
62
|
-
'& > * + *': {
|
|
63
|
-
marginRight: '0',
|
|
64
|
-
marginLeft: '$4',
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const StyledVolumeItem = styled('div', {
|
|
69
|
-
// TODO: maybe keep this as base comp and extend button variant
|
|
70
|
-
...styledItem,
|
|
71
|
-
alignItems: 'start',
|
|
72
|
-
flexDirection: 'column',
|
|
73
|
-
marginBottom: '0',
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
export const Flex = styled('div', {
|
|
77
|
-
display: 'flex',
|
|
78
|
-
'& > * + *': {
|
|
79
|
-
marginRight: '0',
|
|
80
|
-
marginLeft: '$4',
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
const RemoveMenuItem = styled(StyledItemButton, {
|
|
85
|
-
color: '$alert_error_default',
|
|
86
|
-
borderTop: '1px solid $border_bright',
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
interface MenuTileType {
|
|
90
|
-
Root: typeof Root;
|
|
91
|
-
Trigger: typeof StyledTrigger;
|
|
92
|
-
Content: typeof StyledContent;
|
|
93
|
-
ItemButton: typeof StyledItemButton;
|
|
94
|
-
VolumeItem: typeof StyledVolumeItem;
|
|
95
|
-
RemoveItem: typeof RemoveMenuItem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export const StyledMenuTile: MenuTileType = {
|
|
99
|
-
Root,
|
|
100
|
-
Trigger: StyledTrigger,
|
|
101
|
-
Content: StyledContent,
|
|
102
|
-
ItemButton: StyledItemButton,
|
|
103
|
-
VolumeItem: StyledVolumeItem,
|
|
104
|
-
RemoveItem: RemoveMenuItem,
|
|
105
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
HMSPeerID,
|
|
4
|
-
HMSTrack,
|
|
5
|
-
selectAudioTrackByPeerID,
|
|
6
|
-
selectAudioVolumeByPeerID,
|
|
7
|
-
selectPermissions,
|
|
8
|
-
selectVideoTrackByPeerID,
|
|
9
|
-
useHMSActions,
|
|
10
|
-
useHMSStore,
|
|
11
|
-
} from '@100mslive/react-sdk';
|
|
12
|
-
import {
|
|
13
|
-
HorizontalMenuIcon,
|
|
14
|
-
MicOffIcon,
|
|
15
|
-
MicOnIcon,
|
|
16
|
-
RemoveUserIcon,
|
|
17
|
-
SpeakerIcon,
|
|
18
|
-
VideoOffIcon,
|
|
19
|
-
VideoOnIcon,
|
|
20
|
-
} from '@100mslive/react-icons';
|
|
21
|
-
import { Slider } from '../Slider';
|
|
22
|
-
import { Flex, StyledMenuTile } from './StyledMenuTile';
|
|
23
|
-
|
|
24
|
-
export interface TileMenuProps {
|
|
25
|
-
peerId: HMSPeerID;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const TileMenu: React.FC<TileMenuProps> = ({ peerId }) => {
|
|
29
|
-
const actions = useHMSActions();
|
|
30
|
-
const permissions = useHMSStore(selectPermissions);
|
|
31
|
-
// TODO: selectTrackByID vs selectVideoTrackByPeerID
|
|
32
|
-
const videoTrack = useHMSStore(selectVideoTrackByPeerID(peerId));
|
|
33
|
-
const audioTrack = useHMSStore(selectAudioTrackByPeerID(peerId));
|
|
34
|
-
const canMuteVideo = videoTrack?.enabled ? permissions?.mute : permissions?.unmute;
|
|
35
|
-
const canMuteAudio = audioTrack?.enabled ? permissions?.mute : permissions?.unmute;
|
|
36
|
-
|
|
37
|
-
const toggleTrackEnabled = async (track?: HMSTrack | null) => {
|
|
38
|
-
if (track) {
|
|
39
|
-
try {
|
|
40
|
-
await actions.setRemoteTrackEnabled(track.id, !track.enabled);
|
|
41
|
-
} catch (error) {
|
|
42
|
-
// TODO: add toast here
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const trackVolume = useHMSStore(selectAudioVolumeByPeerID(peerId));
|
|
47
|
-
return (
|
|
48
|
-
<StyledMenuTile.Root>
|
|
49
|
-
<StyledMenuTile.Trigger>
|
|
50
|
-
<HorizontalMenuIcon />
|
|
51
|
-
</StyledMenuTile.Trigger>
|
|
52
|
-
<StyledMenuTile.Content side="left" align="start" sideOffset={10}>
|
|
53
|
-
{canMuteVideo ? (
|
|
54
|
-
<StyledMenuTile.ItemButton onClick={() => toggleTrackEnabled(videoTrack)}>
|
|
55
|
-
{videoTrack?.enabled ? <VideoOnIcon /> : <VideoOffIcon />}
|
|
56
|
-
<span>{`${videoTrack?.enabled ? 'Mute' : 'Unmute'} Video`}</span>
|
|
57
|
-
</StyledMenuTile.ItemButton>
|
|
58
|
-
) : null}
|
|
59
|
-
|
|
60
|
-
{canMuteAudio ? (
|
|
61
|
-
<StyledMenuTile.ItemButton onClick={() => toggleTrackEnabled(audioTrack)}>
|
|
62
|
-
{audioTrack?.enabled ? <MicOnIcon /> : <MicOffIcon />}
|
|
63
|
-
<span>{`${audioTrack?.enabled ? 'Mute' : 'Unmute'} Audio`}</span>
|
|
64
|
-
</StyledMenuTile.ItemButton>
|
|
65
|
-
) : null}
|
|
66
|
-
|
|
67
|
-
{audioTrack ? (
|
|
68
|
-
<StyledMenuTile.VolumeItem>
|
|
69
|
-
<Flex>
|
|
70
|
-
<SpeakerIcon /> <span>Volume ({trackVolume})</span>
|
|
71
|
-
</Flex>
|
|
72
|
-
<Slider
|
|
73
|
-
css={{ my: '0.5rem' }}
|
|
74
|
-
step={5}
|
|
75
|
-
value={[trackVolume || 0]}
|
|
76
|
-
onValueChange={e => actions.setVolume(e[0], audioTrack?.id)}
|
|
77
|
-
/>
|
|
78
|
-
</StyledMenuTile.VolumeItem>
|
|
79
|
-
) : null}
|
|
80
|
-
|
|
81
|
-
{permissions?.removeOthers ? (
|
|
82
|
-
<StyledMenuTile.RemoveItem
|
|
83
|
-
onClick={async () => {
|
|
84
|
-
try {
|
|
85
|
-
await actions.removePeer(peerId, '');
|
|
86
|
-
} catch (error) {
|
|
87
|
-
// TODO: Toast here
|
|
88
|
-
}
|
|
89
|
-
}}
|
|
90
|
-
>
|
|
91
|
-
<RemoveUserIcon />
|
|
92
|
-
<span>Remove Participant</span>
|
|
93
|
-
</StyledMenuTile.RemoveItem>
|
|
94
|
-
) : null}
|
|
95
|
-
</StyledMenuTile.Content>
|
|
96
|
-
</StyledMenuTile.Root>
|
|
97
|
-
);
|
|
98
|
-
};
|
package/src/TileMenu/index.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StyledMenuTile } from './StyledMenuTile';
|