@stream-io/video-react-sdk 0.0.1-alpha.100
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/CHANGELOG.md +101 -0
- package/LICENSE +219 -0
- package/README.md +5 -0
- package/dist/css/styles.css +2244 -0
- package/dist/css/styles.css.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/src/components/Avatar/Avatar.d.ts +14 -0
- package/dist/src/components/Avatar/Avatar.js +11 -0
- package/dist/src/components/Avatar/Avatar.js.map +1 -0
- package/dist/src/components/Avatar/index.d.ts +1 -0
- package/dist/src/components/Avatar/index.js +2 -0
- package/dist/src/components/Avatar/index.js.map +1 -0
- package/dist/src/components/Button/CompositeButton.d.ts +16 -0
- package/dist/src/components/Button/CompositeButton.js +13 -0
- package/dist/src/components/Button/CompositeButton.js.map +1 -0
- package/dist/src/components/Button/CopyToClipboardButton.d.ts +27 -0
- package/dist/src/components/Button/CopyToClipboardButton.js +54 -0
- package/dist/src/components/Button/CopyToClipboardButton.js.map +1 -0
- package/dist/src/components/Button/IconButton.d.ts +7 -0
- package/dist/src/components/Button/IconButton.js +26 -0
- package/dist/src/components/Button/IconButton.js.map +1 -0
- package/dist/src/components/Button/TextButton.d.ts +2 -0
- package/dist/src/components/Button/TextButton.js +17 -0
- package/dist/src/components/Button/TextButton.js.map +1 -0
- package/dist/src/components/Button/index.d.ts +4 -0
- package/dist/src/components/Button/index.js +5 -0
- package/dist/src/components/Button/index.js.map +1 -0
- package/dist/src/components/CallControls/AcceptCallButton.d.ts +7 -0
- package/dist/src/components/CallControls/AcceptCallButton.js +27 -0
- package/dist/src/components/CallControls/AcceptCallButton.js.map +1 -0
- package/dist/src/components/CallControls/CallControls.d.ts +5 -0
- package/dist/src/components/CallControls/CallControls.js +5 -0
- package/dist/src/components/CallControls/CallControls.js.map +1 -0
- package/dist/src/components/CallControls/CallStatsButton.d.ts +2 -0
- package/dist/src/components/CallControls/CallStatsButton.js +8 -0
- package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
- package/dist/src/components/CallControls/CancelCallButton.d.ts +7 -0
- package/dist/src/components/CallControls/CancelCallButton.js +27 -0
- package/dist/src/components/CallControls/CancelCallButton.js.map +1 -0
- package/dist/src/components/CallControls/ReactionsButton.d.ts +11 -0
- package/dist/src/components/CallControls/ReactionsButton.js +32 -0
- package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
- package/dist/src/components/CallControls/RecordCallButton.d.ts +5 -0
- package/dist/src/components/CallControls/RecordCallButton.js +55 -0
- package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
- package/dist/src/components/CallControls/ScreenShareButton.d.ts +5 -0
- package/dist/src/components/CallControls/ScreenShareButton.js +54 -0
- package/dist/src/components/CallControls/ScreenShareButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +9 -0
- package/dist/src/components/CallControls/ToggleAudioButton.js +73 -0
- package/dist/src/components/CallControls/ToggleAudioButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +5 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.js +9 -0
- package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
- package/dist/src/components/CallControls/ToggleVideoButton.d.ts +10 -0
- package/dist/src/components/CallControls/ToggleVideoButton.js +70 -0
- package/dist/src/components/CallControls/ToggleVideoButton.js.map +1 -0
- package/dist/src/components/CallControls/index.d.ts +10 -0
- package/dist/src/components/CallControls/index.js +11 -0
- package/dist/src/components/CallControls/index.js.map +1 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +4 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.js +18 -0
- package/dist/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +6 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js +7 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +8 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.js +4 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListing.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +16 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +85 -0
- package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +15 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.js +81 -0
- package/dist/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +2 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -0
- package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -0
- package/dist/src/components/CallParticipantsList/index.d.ts +3 -0
- package/dist/src/components/CallParticipantsList/index.js +4 -0
- package/dist/src/components/CallParticipantsList/index.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +20 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.js +9 -0
- package/dist/src/components/CallRecordingList/CallRecordingList.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +7 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.js +8 -0
- package/dist/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +7 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.js +11 -0
- package/dist/src/components/CallRecordingList/CallRecordingListItem.js.map +1 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +2 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js +5 -0
- package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +1 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +7 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js +7 -0
- package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +1 -0
- package/dist/src/components/CallRecordingList/index.d.ts +5 -0
- package/dist/src/components/CallRecordingList/index.js +6 -0
- package/dist/src/components/CallRecordingList/index.js.map +1 -0
- package/dist/src/components/CallStats/CallStats.d.ts +6 -0
- package/dist/src/components/CallStats/CallStats.js +69 -0
- package/dist/src/components/CallStats/CallStats.js.map +1 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +7 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.js +39 -0
- package/dist/src/components/CallStats/CallStatsLatencyChart.js.map +1 -0
- package/dist/src/components/CallStats/index.d.ts +2 -0
- package/dist/src/components/CallStats/index.js +3 -0
- package/dist/src/components/CallStats/index.js.map +1 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.d.ts +6 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.js +46 -0
- package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +1 -0
- package/dist/src/components/Debug/DebugStatsView.d.ts +7 -0
- package/dist/src/components/Debug/DebugStatsView.js +51 -0
- package/dist/src/components/Debug/DebugStatsView.js.map +1 -0
- package/dist/src/components/Debug/useIsDebugMode.d.ts +5 -0
- package/dist/src/components/Debug/useIsDebugMode.js +18 -0
- package/dist/src/components/Debug/useIsDebugMode.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +7 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.js +26 -0
- package/dist/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +9 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +20 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +5 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +11 -0
- package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +2 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.js +15 -0
- package/dist/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
- package/dist/src/components/DeviceSettings/index.d.ts +4 -0
- package/dist/src/components/DeviceSettings/index.js +5 -0
- package/dist/src/components/DeviceSettings/index.js.map +1 -0
- package/dist/src/components/Icon/Icon.d.ts +5 -0
- package/dist/src/components/Icon/Icon.js +4 -0
- package/dist/src/components/Icon/Icon.js.map +1 -0
- package/dist/src/components/Icon/index.d.ts +1 -0
- package/dist/src/components/Icon/index.js +2 -0
- package/dist/src/components/Icon/index.js.map +1 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.js +6 -0
- package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
- package/dist/src/components/LoadingIndicator/index.d.ts +1 -0
- package/dist/src/components/LoadingIndicator/index.js +2 -0
- package/dist/src/components/LoadingIndicator/index.js.map +1 -0
- package/dist/src/components/Menu/GenericMenu.d.ts +3 -0
- package/dist/src/components/Menu/GenericMenu.js +20 -0
- package/dist/src/components/Menu/GenericMenu.js.map +1 -0
- package/dist/src/components/Menu/MenuToggle.d.ts +12 -0
- package/dist/src/components/Menu/MenuToggle.js +40 -0
- package/dist/src/components/Menu/MenuToggle.js.map +1 -0
- package/dist/src/components/Menu/index.d.ts +2 -0
- package/dist/src/components/Menu/index.js +3 -0
- package/dist/src/components/Menu/index.js.map +1 -0
- package/dist/src/components/Notification/Notification.d.ts +11 -0
- package/dist/src/components/Notification/Notification.js +25 -0
- package/dist/src/components/Notification/Notification.js.map +1 -0
- package/dist/src/components/Notification/PermissionNotification.d.ts +33 -0
- package/dist/src/components/Notification/PermissionNotification.js +26 -0
- package/dist/src/components/Notification/PermissionNotification.js.map +1 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +3 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +47 -0
- package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
- package/dist/src/components/Notification/index.d.ts +3 -0
- package/dist/src/components/Notification/index.js +4 -0
- package/dist/src/components/Notification/index.js.map +1 -0
- package/dist/src/components/PendingCallPanel/PendingCallControls.d.ts +2 -0
- package/dist/src/components/PendingCallPanel/PendingCallControls.js +13 -0
- package/dist/src/components/PendingCallPanel/PendingCallControls.js.map +1 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.d.ts +14 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.js +43 -0
- package/dist/src/components/PendingCallPanel/PendingCallPanel.js.map +1 -0
- package/dist/src/components/PendingCallPanel/index.d.ts +2 -0
- package/dist/src/components/PendingCallPanel/index.js +3 -0
- package/dist/src/components/PendingCallPanel/index.js.map +1 -0
- package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
- package/dist/src/components/Permissions/PermissionRequests.js +103 -0
- package/dist/src/components/Permissions/PermissionRequests.js.map +1 -0
- package/dist/src/components/Permissions/index.d.ts +1 -0
- package/dist/src/components/Permissions/index.js +2 -0
- package/dist/src/components/Permissions/index.js.map +1 -0
- package/dist/src/components/Reaction/Reaction.d.ts +10 -0
- package/dist/src/components/Reaction/Reaction.js +28 -0
- package/dist/src/components/Reaction/Reaction.js.map +1 -0
- package/dist/src/components/Reaction/index.d.ts +1 -0
- package/dist/src/components/Reaction/index.js +2 -0
- package/dist/src/components/Reaction/index.js.map +1 -0
- package/dist/src/components/Search/SearchInput.d.ts +14 -0
- package/dist/src/components/Search/SearchInput.js +34 -0
- package/dist/src/components/Search/SearchInput.js.map +1 -0
- package/dist/src/components/Search/SearchResults.d.ts +14 -0
- package/dist/src/components/Search/SearchResults.js +12 -0
- package/dist/src/components/Search/SearchResults.js.map +1 -0
- package/dist/src/components/Search/hooks/index.d.ts +1 -0
- package/dist/src/components/Search/hooks/index.js +2 -0
- package/dist/src/components/Search/hooks/index.js.map +1 -0
- package/dist/src/components/Search/hooks/useSearch.d.ts +15 -0
- package/dist/src/components/Search/hooks/useSearch.js +39 -0
- package/dist/src/components/Search/hooks/useSearch.js.map +1 -0
- package/dist/src/components/Search/index.d.ts +2 -0
- package/dist/src/components/Search/index.js +3 -0
- package/dist/src/components/Search/index.js.map +1 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.d.ts +5 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.js +34 -0
- package/dist/src/components/StreamCall/CallParticipantsScreenView.js.map +1 -0
- package/dist/src/components/StreamCall/CallParticipantsView.d.ts +5 -0
- package/dist/src/components/StreamCall/CallParticipantsView.js +10 -0
- package/dist/src/components/StreamCall/CallParticipantsView.js.map +1 -0
- package/dist/src/components/StreamCall/Stage.d.ts +8 -0
- package/dist/src/components/StreamCall/Stage.js +13 -0
- package/dist/src/components/StreamCall/Stage.js.map +1 -0
- package/dist/src/components/StreamCall/index.d.ts +3 -0
- package/dist/src/components/StreamCall/index.js +4 -0
- package/dist/src/components/StreamCall/index.js.map +1 -0
- package/dist/src/components/StreamTheme/StreamTheme.d.ts +5 -0
- package/dist/src/components/StreamTheme/StreamTheme.js +18 -0
- package/dist/src/components/StreamTheme/StreamTheme.js.map +1 -0
- package/dist/src/components/StreamTheme/index.d.ts +1 -0
- package/dist/src/components/StreamTheme/index.js +2 -0
- package/dist/src/components/StreamTheme/index.js.map +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +15 -0
- package/dist/src/components/Tooltip/Tooltip.js +22 -0
- package/dist/src/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/src/components/Tooltip/WithTooltip.d.ts +5 -0
- package/dist/src/components/Tooltip/WithTooltip.js +23 -0
- package/dist/src/components/Tooltip/WithTooltip.js.map +1 -0
- package/dist/src/components/Tooltip/hooks/index.d.ts +1 -0
- package/dist/src/components/Tooltip/hooks/index.js +2 -0
- package/dist/src/components/Tooltip/hooks/index.js.map +1 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +6 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +14 -0
- package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +1 -0
- package/dist/src/components/Tooltip/index.d.ts +2 -0
- package/dist/src/components/Tooltip/index.js +3 -0
- package/dist/src/components/Tooltip/index.js.map +1 -0
- package/dist/src/components/Video/VideoPreview.d.ts +28 -0
- package/dist/src/components/Video/VideoPreview.js +75 -0
- package/dist/src/components/Video/VideoPreview.js.map +1 -0
- package/dist/src/components/Video/index.d.ts +4 -0
- package/dist/src/components/Video/index.js +5 -0
- package/dist/src/components/Video/index.js.map +1 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/components/index.js +17 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/core/components/Audio/Audio.d.ts +6 -0
- package/dist/src/core/components/Audio/Audio.js +39 -0
- package/dist/src/core/components/Audio/Audio.js.map +1 -0
- package/dist/src/core/components/Audio/index.d.ts +1 -0
- package/dist/src/core/components/Audio/index.js +2 -0
- package/dist/src/core/components/Audio/index.js.map +1 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +17 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +38 -0
- package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +8 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.js +74 -0
- package/dist/src/core/components/CallLayout/SpeakerLayout.js.map +1 -0
- package/dist/src/core/components/CallLayout/index.d.ts +2 -0
- package/dist/src/core/components/CallLayout/index.js +3 -0
- package/dist/src/core/components/CallLayout/index.js.map +1 -0
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.d.ts +18 -0
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js +36 -0
- package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +79 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.js +33 -0
- package/dist/src/core/components/ParticipantView/ParticipantView.js.map +1 -0
- package/dist/src/core/components/ParticipantView/index.d.ts +2 -0
- package/dist/src/core/components/ParticipantView/index.js +3 -0
- package/dist/src/core/components/ParticipantView/index.js.map +1 -0
- package/dist/src/core/components/StreamCall/StreamCall.d.ts +73 -0
- package/dist/src/core/components/StreamCall/StreamCall.js +60 -0
- package/dist/src/core/components/StreamCall/StreamCall.js.map +1 -0
- package/dist/src/core/components/StreamCall/index.d.ts +1 -0
- package/dist/src/core/components/StreamCall/index.js +2 -0
- package/dist/src/core/components/StreamCall/index.js.map +1 -0
- package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
- package/dist/src/core/components/Video/BaseVideo.js +48 -0
- package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.d.ts +6 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.js +9 -0
- package/dist/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -0
- package/dist/src/core/components/Video/Video.d.ts +13 -0
- package/dist/src/core/components/Video/Video.js +154 -0
- package/dist/src/core/components/Video/Video.js.map +1 -0
- package/dist/src/core/components/Video/index.d.ts +2 -0
- package/dist/src/core/components/Video/index.js +3 -0
- package/dist/src/core/components/Video/index.js.map +1 -0
- package/dist/src/core/components/index.d.ts +6 -0
- package/dist/src/core/components/index.js +6 -0
- package/dist/src/core/components/index.js.map +1 -0
- package/dist/src/core/contexts/MediaDevicesContext.d.ts +180 -0
- package/dist/src/core/contexts/MediaDevicesContext.js +177 -0
- package/dist/src/core/contexts/MediaDevicesContext.js.map +1 -0
- package/dist/src/core/contexts/index.d.ts +1 -0
- package/dist/src/core/contexts/index.js +2 -0
- package/dist/src/core/contexts/index.js.map +1 -0
- package/dist/src/core/hooks/index.d.ts +4 -0
- package/dist/src/core/hooks/index.js +5 -0
- package/dist/src/core/hooks/index.js.map +1 -0
- package/dist/src/core/hooks/useAudioPublisher.d.ts +12 -0
- package/dist/src/core/hooks/useAudioPublisher.js +95 -0
- package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
- package/dist/src/core/hooks/useDevices.d.ts +80 -0
- package/dist/src/core/hooks/useDevices.js +113 -0
- package/dist/src/core/hooks/useDevices.js.map +1 -0
- package/dist/src/core/hooks/useTrackElementVisibility.d.ts +6 -0
- package/dist/src/core/hooks/useTrackElementVisibility.js +27 -0
- package/dist/src/core/hooks/useTrackElementVisibility.js.map +1 -0
- package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
- package/dist/src/core/hooks/useVideoPublisher.js +120 -0
- package/dist/src/core/hooks/useVideoPublisher.js.map +1 -0
- package/dist/src/core/index.d.ts +3 -0
- package/dist/src/core/index.js +4 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/index.js +3 -0
- package/dist/src/hooks/index.js.map +1 -0
- package/dist/src/hooks/useFloatingUIPreset.d.ts +9 -0
- package/dist/src/hooks/useFloatingUIPreset.js +30 -0
- package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
- package/dist/src/hooks/useScrollPosition.d.ts +6 -0
- package/dist/src/hooks/useScrollPosition.js +63 -0
- package/dist/src/hooks/useScrollPosition.js.map +1 -0
- package/dist/src/types/components.d.ts +7 -0
- package/dist/src/types/components.js +2 -0
- package/dist/src/types/components.js.map +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/utilities/applyElementToRef.d.ts +2 -0
- package/dist/src/utilities/applyElementToRef.js +8 -0
- package/dist/src/utilities/applyElementToRef.js.map +1 -0
- package/dist/src/utilities/chunk.d.ts +1 -0
- package/dist/src/utilities/chunk.js +5 -0
- package/dist/src/utilities/chunk.js.map +1 -0
- package/dist/src/utilities/index.d.ts +3 -0
- package/dist/src/utilities/index.js +4 -0
- package/dist/src/utilities/index.js.map +1 -0
- package/dist/src/utilities/isComponentType.d.ts +2 -0
- package/dist/src/utilities/isComponentType.js +7 -0
- package/dist/src/utilities/isComponentType.js.map +1 -0
- package/index.ts +18 -0
- package/package.json +51 -0
- package/src/components/Avatar/Avatar.tsx +45 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Button/CompositeButton.tsx +50 -0
- package/src/components/Button/CopyToClipboardButton.tsx +129 -0
- package/src/components/Button/IconButton.tsx +32 -0
- package/src/components/Button/TextButton.tsx +12 -0
- package/src/components/Button/index.ts +4 -0
- package/src/components/CallControls/AcceptCallButton.tsx +36 -0
- package/src/components/CallControls/CallControls.tsx +26 -0
- package/src/components/CallControls/CallStatsButton.tsx +20 -0
- package/src/components/CallControls/CancelCallButton.tsx +36 -0
- package/src/components/CallControls/ReactionsButton.tsx +74 -0
- package/src/components/CallControls/RecordCallButton.tsx +73 -0
- package/src/components/CallControls/ScreenShareButton.tsx +84 -0
- package/src/components/CallControls/ToggleAudioButton.tsx +123 -0
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
- package/src/components/CallControls/ToggleVideoButton.tsx +116 -0
- package/src/components/CallControls/index.ts +10 -0
- package/src/components/CallParticipantsList/BlockedUserListing.tsx +37 -0
- package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
- package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +273 -0
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +255 -0
- package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +7 -0
- package/src/components/CallParticipantsList/index.ts +3 -0
- package/src/components/CallRecordingList/CallRecordingList.tsx +60 -0
- package/src/components/CallRecordingList/CallRecordingListHeader.tsx +29 -0
- package/src/components/CallRecordingList/CallRecordingListItem.tsx +67 -0
- package/src/components/CallRecordingList/EmptyCallRecordingListing.tsx +11 -0
- package/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +21 -0
- package/src/components/CallRecordingList/index.ts +5 -0
- package/src/components/CallStats/CallStats.tsx +162 -0
- package/src/components/CallStats/CallStatsLatencyChart.tsx +58 -0
- package/src/components/CallStats/index.ts +2 -0
- package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
- package/src/components/Debug/DebugStatsView.tsx +108 -0
- package/src/components/Debug/useIsDebugMode.ts +24 -0
- package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
- package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +57 -0
- package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +22 -0
- package/src/components/DeviceSettings/DeviceSettings.tsx +39 -0
- package/src/components/DeviceSettings/index.ts +4 -0
- package/src/components/Icon/Icon.tsx +11 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +28 -0
- package/src/components/LoadingIndicator/index.ts +1 -0
- package/src/components/Menu/GenericMenu.tsx +16 -0
- package/src/components/Menu/MenuToggle.tsx +81 -0
- package/src/components/Menu/index.ts +2 -0
- package/src/components/Notification/Notification.tsx +61 -0
- package/src/components/Notification/PermissionNotification.tsx +97 -0
- package/src/components/Notification/SpeakingWhileMutedNotification.tsx +61 -0
- package/src/components/Notification/index.ts +3 -0
- package/src/components/PendingCallPanel/PendingCallControls.tsx +27 -0
- package/src/components/PendingCallPanel/PendingCallPanel.tsx +93 -0
- package/src/components/PendingCallPanel/index.ts +2 -0
- package/src/components/Permissions/PermissionRequests.tsx +176 -0
- package/src/components/Permissions/index.ts +1 -0
- package/src/components/Reaction/Reaction.tsx +48 -0
- package/src/components/Reaction/index.ts +1 -0
- package/src/components/Search/SearchInput.tsx +56 -0
- package/src/components/Search/SearchResults.tsx +40 -0
- package/src/components/Search/hooks/index.ts +1 -0
- package/src/components/Search/hooks/useSearch.ts +52 -0
- package/src/components/Search/index.ts +2 -0
- package/src/components/StreamCall/CallParticipantsScreenView.tsx +125 -0
- package/src/components/StreamCall/CallParticipantsView.tsx +24 -0
- package/src/components/StreamCall/Stage.tsx +22 -0
- package/src/components/StreamCall/index.ts +4 -0
- package/src/components/StreamTheme/StreamTheme.tsx +19 -0
- package/src/components/StreamTheme/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.tsx +51 -0
- package/src/components/Tooltip/WithTooltip.tsx +39 -0
- package/src/components/Tooltip/hooks/index.ts +1 -0
- package/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +28 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/Video/VideoPreview.tsx +152 -0
- package/src/components/Video/index.ts +4 -0
- package/src/components/index.ts +16 -0
- package/src/core/components/Audio/Audio.tsx +42 -0
- package/src/core/components/Audio/index.ts +1 -0
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +159 -0
- package/src/core/components/CallLayout/SpeakerLayout.tsx +231 -0
- package/src/core/components/CallLayout/index.ts +2 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +160 -0
- package/src/core/components/ParticipantView/ParticipantView.tsx +156 -0
- package/src/core/components/ParticipantView/index.ts +2 -0
- package/src/core/components/StreamCall/StreamCall.tsx +157 -0
- package/src/core/components/StreamCall/index.ts +1 -0
- package/src/core/components/Video/BaseVideo.tsx +53 -0
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +36 -0
- package/src/core/components/Video/Video.tsx +252 -0
- package/src/core/components/Video/index.ts +2 -0
- package/src/core/components/index.ts +8 -0
- package/src/core/contexts/MediaDevicesContext.tsx +416 -0
- package/src/core/contexts/index.ts +1 -0
- package/src/core/hooks/index.ts +4 -0
- package/src/core/hooks/useAudioPublisher.ts +124 -0
- package/src/core/hooks/useDevices.ts +161 -0
- package/src/core/hooks/useTrackElementVisibility.ts +44 -0
- package/src/core/hooks/useVideoPublisher.ts +152 -0
- package/src/core/index.ts +3 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useFloatingUIPreset.ts +50 -0
- package/src/hooks/useScrollPosition.ts +95 -0
- package/src/types/components.ts +7 -0
- package/src/types/index.ts +1 -0
- package/src/utilities/applyElementToRef.ts +12 -0
- package/src/utilities/chunk.ts +8 -0
- package/src/utilities/index.ts +3 -0
- package/src/utilities/isComponentType.ts +9 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { forwardRef, Fragment, useEffect, useState, } from 'react';
|
|
23
|
+
import { OwnCapability, } from '@stream-io/video-client';
|
|
24
|
+
import { useCall, useHasPermissions } from '@stream-io/video-react-bindings';
|
|
25
|
+
import clsx from 'clsx';
|
|
26
|
+
import { useFloatingUIPreset } from '../../hooks';
|
|
27
|
+
const byNameOrId = (a, b) => {
|
|
28
|
+
if (a.name && b.name && a.name < b.name)
|
|
29
|
+
return -1;
|
|
30
|
+
if (a.name && b.name && a.name > b.name)
|
|
31
|
+
return 1;
|
|
32
|
+
if (a.id < b.id)
|
|
33
|
+
return -1;
|
|
34
|
+
if (a.id > b.id)
|
|
35
|
+
return 1;
|
|
36
|
+
return 0;
|
|
37
|
+
};
|
|
38
|
+
export const PermissionRequests = () => {
|
|
39
|
+
const call = useCall();
|
|
40
|
+
const [expanded, setExpanded] = useState(false);
|
|
41
|
+
const [permissionRequests, setPermissionRequests] = useState([]);
|
|
42
|
+
const canUpdateCallPermissions = useHasPermissions(OwnCapability.UPDATE_CALL_PERMISSIONS);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!call || !canUpdateCallPermissions)
|
|
45
|
+
return;
|
|
46
|
+
return call.on('call.permission_request', (event) => {
|
|
47
|
+
if (event.type !== 'call.permission_request')
|
|
48
|
+
return;
|
|
49
|
+
setPermissionRequests((requests) => [...requests, event].sort((a, b) => byNameOrId(a.user, b.user)));
|
|
50
|
+
});
|
|
51
|
+
}, [call, canUpdateCallPermissions]);
|
|
52
|
+
const handleUpdatePermission = (request, allow) => {
|
|
53
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
54
|
+
const { user, permissions } = request;
|
|
55
|
+
if (allow) {
|
|
56
|
+
yield (call === null || call === void 0 ? void 0 : call.grantPermissions(user.id, permissions));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
yield (call === null || call === void 0 ? void 0 : call.revokePermissions(user.id, permissions));
|
|
60
|
+
}
|
|
61
|
+
setPermissionRequests((requests) => requests.filter((r) => r !== request));
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const { refs, x, y, strategy } = useFloatingUIPreset({
|
|
65
|
+
placement: 'bottom',
|
|
66
|
+
strategy: 'absolute',
|
|
67
|
+
});
|
|
68
|
+
// don't render anything if there are no permission requests
|
|
69
|
+
if (permissionRequests.length === 0)
|
|
70
|
+
return null;
|
|
71
|
+
return (_jsxs("div", Object.assign({ className: "str-video__permission-requests", ref: refs.setReference }, { children: [_jsxs("div", Object.assign({ className: "str-video__permission-requests__notification" }, { children: [_jsxs("span", Object.assign({ className: "str-video__permission-requests__notification__message" }, { children: [permissionRequests.length, " pending permission requests"] })), _jsx(Button, Object.assign({ type: "button", onClick: () => {
|
|
72
|
+
setExpanded((e) => !e);
|
|
73
|
+
} }, { children: expanded ? 'Hide requests' : 'Show requests' }))] })), expanded && (_jsx(PermissionRequestList, { ref: refs.setFloating, style: {
|
|
74
|
+
position: strategy,
|
|
75
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
76
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
77
|
+
overflowY: 'auto',
|
|
78
|
+
}, permissionRequests: permissionRequests, handleUpdatePermission: handleUpdatePermission }))] })));
|
|
79
|
+
};
|
|
80
|
+
export const PermissionRequestList = forwardRef((props, ref) => {
|
|
81
|
+
const { permissionRequests, handleUpdatePermission } = props, rest = __rest(props, ["permissionRequests", "handleUpdatePermission"]);
|
|
82
|
+
return (_jsx("div", Object.assign({ className: "str-video__permission-requests-list", ref: ref }, rest, { children: permissionRequests.map((request, reqIndex) => {
|
|
83
|
+
const { user, permissions } = request;
|
|
84
|
+
return (_jsx(Fragment, { children: permissions.map((permission) => (_jsxs("div", Object.assign({ className: "str-video__permission-request" }, { children: [_jsx("div", Object.assign({ className: "str-video__permission-request__message" }, { children: messageForPermission(user.name || user.id, permission) })), _jsx(Button, Object.assign({ className: "str-video__permission-request__button--allow", type: "button", onClick: handleUpdatePermission(request, true) }, { children: "Allow" })), _jsx(Button, Object.assign({ className: "str-video__permission-request__button--reject", type: "button", onClick: handleUpdatePermission(request, false) }, { children: "Reject" }))] }), permission))) }, `${user.id}/${reqIndex}`));
|
|
85
|
+
}) })));
|
|
86
|
+
});
|
|
87
|
+
const Button = (props) => {
|
|
88
|
+
const { className } = props, rest = __rest(props, ["className"]);
|
|
89
|
+
return (_jsx("button", Object.assign({ className: clsx('str-video__permission-request__button', className) }, rest)));
|
|
90
|
+
};
|
|
91
|
+
const messageForPermission = (userName, permission) => {
|
|
92
|
+
switch (permission) {
|
|
93
|
+
case OwnCapability.SEND_AUDIO:
|
|
94
|
+
return `${userName} is requesting to speak`;
|
|
95
|
+
case OwnCapability.SEND_VIDEO:
|
|
96
|
+
return `${userName} is requesting to share their camera`;
|
|
97
|
+
case OwnCapability.SCREENSHARE:
|
|
98
|
+
return `${userName} is requesting to present their screen`;
|
|
99
|
+
default:
|
|
100
|
+
return `${userName} is requesting permission: ${permission}`;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=PermissionRequests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PermissionRequests.js","sourceRoot":"","sources":["../../../../src/components/Permissions/PermissionRequests.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAGL,UAAU,EACV,QAAQ,EAER,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EACL,aAAa,GAGd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,CAAe,EAAE,CAAe,EAAE,EAAE;IACtD,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI;QAAE,OAAO,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAA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AU,CAkBxD,CACP,CAAC,IArBW,GAAG,IAAI,CAAC,EAAE,IAAI,QAAQ,EAAE,CAsB5B,CACZ,CAAC;QACJ,CAAC,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,MAAM,GAAG,CACb,KAAiE,EACjE,EAAE;IACF,MAAM,EAAE,SAAS,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA9B,aAAsB,CAAQ,CAAC;IACrC,OAAO,CACL,+BACE,SAAS,EAAE,IAAI,CAAC,uCAAuC,EAAE,SAAS,CAAC,IAC/D,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,QAAgB,EAAE,UAAkB,EAAE,EAAE;IACpE,QAAQ,UAAU,EAAE;QAClB,KAAK,aAAa,CAAC,UAAU;YAC3B,OAAO,GAAG,QAAQ,yBAAyB,CAAC;QAC9C,KAAK,aAAa,CAAC,UAAU;YAC3B,OAAO,GAAG,QAAQ,sCAAsC,CAAC;QAC3D,KAAK,aAAa,CAAC,WAAW;YAC5B,OAAO,GAAG,QAAQ,wCAAwC,CAAC;QAC7D;YACE,OAAO,GAAG,QAAQ,8BAA8B,UAAU,EAAE,CAAC;KAChE;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PermissionRequests';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Permissions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Call, StreamReaction } from '@stream-io/video-client';
|
|
3
|
+
export type ReactionProps = {
|
|
4
|
+
reaction: StreamReaction;
|
|
5
|
+
sessionId: string;
|
|
6
|
+
call: Call;
|
|
7
|
+
hideAfterTimeoutInMs?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const defaultEmojiReactions: Record<string, string>;
|
|
10
|
+
export declare const Reaction: (props: ReactionProps) => JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
export const defaultEmojiReactions = {
|
|
5
|
+
':like:': '👍',
|
|
6
|
+
':raise-hand:': '✋',
|
|
7
|
+
':fireworks:': '🎉',
|
|
8
|
+
};
|
|
9
|
+
export const Reaction = (props) => {
|
|
10
|
+
const { reaction, sessionId, call, hideAfterTimeoutInMs = 5500 } = props;
|
|
11
|
+
const [isShowing, setIsShowing] = useState(false);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
let timeoutId;
|
|
14
|
+
if (reaction) {
|
|
15
|
+
setIsShowing(true);
|
|
16
|
+
timeoutId = setTimeout(() => {
|
|
17
|
+
setIsShowing(false);
|
|
18
|
+
call.resetReaction(sessionId);
|
|
19
|
+
}, hideAfterTimeoutInMs);
|
|
20
|
+
}
|
|
21
|
+
return () => {
|
|
22
|
+
clearTimeout(timeoutId);
|
|
23
|
+
};
|
|
24
|
+
}, [call, hideAfterTimeoutInMs, reaction, sessionId]);
|
|
25
|
+
const { emoji_code } = reaction;
|
|
26
|
+
return (_jsx("div", Object.assign({ className: clsx('str-video__reaction', isShowing && 'str-video__reaction--visible') }, { children: _jsx("span", Object.assign({ className: "str-video__reaction__emoji" }, { children: emoji_code && defaultEmojiReactions[emoji_code] })) })));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=Reaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Reaction.js","sourceRoot":"","sources":["../../../../src/components/Reaction/Reaction.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,IAAI,MAAM,MAAM,CAAC;AASxB,MAAM,CAAC,MAAM,qBAAqB,GAA2B;IAC3D,QAAQ,EAAE,IAAI;IACd,cAAc,EAAE,GAAG;IACnB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC/C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAyB,CAAC;QAC9B,IAAI,QAAQ,EAAE;YACZ,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC1B,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YAChC,CAAC,EAAE,oBAAoB,CAAC,CAAC;SAC1B;QACD,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,SAAS,CAAC,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAEtD,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAChC,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CACb,qBAAqB,EACrB,SAAS,IAAI,8BAA8B,CAC5C,gBAED,6BAAM,SAAS,EAAC,4BAA4B,gBACzC,UAAU,IAAI,qBAAqB,CAAC,UAAU,CAAC,IAC3C,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Reaction';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Reaction/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
type SearchInputProps = ComponentProps<'input'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Resets the search to its initial state.
|
|
5
|
+
* The function is called when Esc key or inputs clear button are pressed
|
|
6
|
+
*/
|
|
7
|
+
exitSearch: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Flag to signal, whether search input elements should be rendered as active
|
|
10
|
+
*/
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const SearchInput: ({ exitSearch, isActive, ...rest }: SearchInputProps) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useState } from 'react';
|
|
14
|
+
import clsx from 'clsx';
|
|
15
|
+
export const SearchInput = (_a) => {
|
|
16
|
+
var { exitSearch, isActive } = _a, rest = __rest(_a, ["exitSearch", "isActive"]);
|
|
17
|
+
const [inputElement, setInputElement] = useState(null);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!inputElement)
|
|
20
|
+
return;
|
|
21
|
+
const handleKeyDown = (e) => {
|
|
22
|
+
if (e.key.toLowerCase() === 'escape')
|
|
23
|
+
exitSearch();
|
|
24
|
+
};
|
|
25
|
+
inputElement.addEventListener('keydown', handleKeyDown);
|
|
26
|
+
return () => {
|
|
27
|
+
inputElement.removeEventListener('keydown', handleKeyDown);
|
|
28
|
+
};
|
|
29
|
+
}, [exitSearch, inputElement]);
|
|
30
|
+
return (_jsxs("div", Object.assign({ className: clsx('str-video__search-input__container', {
|
|
31
|
+
'str-video__search-input__container--active': isActive,
|
|
32
|
+
}) }, { children: [_jsx("input", Object.assign({ placeholder: "Search" }, rest, { ref: setInputElement })), isActive ? (_jsx("button", Object.assign({ className: "str-video__search-input__clear-btn", onClick: exitSearch }, { children: _jsx("span", { className: "str-video__search-input__icon--active" }) }))) : (_jsx("span", { className: "str-video__search-input__icon" }))] })));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../../src/components/Search/SearchInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,IAAI,MAAM,MAAM,CAAC;AAaxB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAIT,EAAE,EAAE;QAJK,EAC1B,UAAU,EACV,QAAQ,OAES,EADd,IAAI,cAHmB,0BAI3B,CADQ;IAEP,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,IAAI,CACL,CAAC;IACF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,YAAY;YAAE,OAAO;QAE1B,MAAM,aAAa,GAAG,CAAC,CAAgB,EAAE,EAAE;YACzC,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,QAAQ;gBAAE,UAAU,EAAE,CAAC;QACrD,CAAC,CAAC;QAEF,YAAY,CAAC,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAExD,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAC7D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAE/B,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE;YACpD,4CAA4C,EAAE,QAAQ;SACvD,CAAC,iBAEF,8BAAO,WAAW,EAAC,QAAQ,IAAK,IAAI,IAAE,GAAG,EAAE,eAAe,IAAI,EAC7D,QAAQ,CAAC,CAAC,CAAC,CACV,+BACE,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAE,UAAU,gBAEnB,eAAM,SAAS,EAAC,uCAAuC,GAAG,IACnD,CACV,CAAC,CAAC,CAAC,CACF,eAAM,SAAS,EAAC,+BAA+B,GAAG,CACnD,KACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { SearchController } from './hooks';
|
|
3
|
+
export type SearchResultListProps<T> = {
|
|
4
|
+
data: T[];
|
|
5
|
+
};
|
|
6
|
+
export type SearchResultsProps<T> = Pick<SearchController<T>, 'searchResults' | 'searchQueryInProgress'> & {
|
|
7
|
+
/** Component to be displayed, when empty array of search results is provided */
|
|
8
|
+
EmptySearchResultComponent: ComponentType;
|
|
9
|
+
/** Component will be used to render non-empty array of search results */
|
|
10
|
+
SearchResultList: ComponentType<SearchResultListProps<T>>;
|
|
11
|
+
/** Component to be displayed while the search query request is in progress */
|
|
12
|
+
LoadingIndicator?: ComponentType;
|
|
13
|
+
};
|
|
14
|
+
export declare const SearchResults: <T extends unknown>({ EmptySearchResultComponent, LoadingIndicator, searchQueryInProgress, searchResults, SearchResultList, }: SearchResultsProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LoadingIndicator as DefaultLoadingIndicator } from '../LoadingIndicator';
|
|
3
|
+
export const SearchResults = ({ EmptySearchResultComponent, LoadingIndicator = DefaultLoadingIndicator, searchQueryInProgress, searchResults, SearchResultList, }) => {
|
|
4
|
+
if (searchQueryInProgress) {
|
|
5
|
+
return (_jsx("div", Object.assign({ className: "str-video__search-results--loading" }, { children: _jsx(LoadingIndicator, {}) })));
|
|
6
|
+
}
|
|
7
|
+
if (!searchResults.length) {
|
|
8
|
+
return _jsx(EmptySearchResultComponent, {});
|
|
9
|
+
}
|
|
10
|
+
return _jsx(SearchResultList, { data: searchResults });
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SearchResults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResults.js","sourceRoot":"","sources":["../../../../src/components/Search/SearchResults.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAmBlF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAoB,EAC/C,0BAA0B,EAC1B,gBAAgB,GAAG,uBAAuB,EAC1C,qBAAqB,EACrB,aAAa,EACb,gBAAgB,GACM,EAAE,EAAE;IAC1B,IAAI,qBAAqB,EAAE;QACzB,OAAO,CACL,4BAAK,SAAS,EAAC,oCAAoC,gBACjD,KAAC,gBAAgB,KAAG,IAChB,CACP,CAAC;KACH;IACD,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE;QACzB,OAAO,KAAC,0BAA0B,KAAG,CAAC;KACvC;IAED,OAAO,KAAC,gBAAgB,IAAC,IAAI,EAAE,aAAa,GAAI,CAAC;AACnD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSearch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/Search/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type SearchController<T> = {
|
|
2
|
+
/** Flag signals that the search request is flight await the response */
|
|
3
|
+
searchQueryInProgress: boolean;
|
|
4
|
+
/** Array of items returned by the search query */
|
|
5
|
+
searchResults: T[];
|
|
6
|
+
};
|
|
7
|
+
export type UseSearchParams<T> = {
|
|
8
|
+
/** Search function performing the search request */
|
|
9
|
+
searchFn: (searchQuery: string) => Promise<T[]>;
|
|
10
|
+
/** Debounce interval applied to the search function */
|
|
11
|
+
debounceInterval: number;
|
|
12
|
+
/** Search query string */
|
|
13
|
+
searchQuery?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const useSearch: <T>({ debounceInterval, searchFn, searchQuery, }: UseSearchParams<T>) => SearchController<T>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
|
+
export const useSearch = ({ debounceInterval, searchFn, searchQuery = '', }) => {
|
|
12
|
+
const [searchResults, setSearchResults] = useState([]);
|
|
13
|
+
const [searchQueryInProgress, setSearchQueryInProgress] = useState(false);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!searchQuery.length)
|
|
16
|
+
return setSearchResults([]);
|
|
17
|
+
setSearchQueryInProgress(true);
|
|
18
|
+
const timeout = setTimeout(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
try {
|
|
20
|
+
const results = yield searchFn(searchQuery);
|
|
21
|
+
setSearchResults(results);
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error(error);
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
setSearchQueryInProgress(false);
|
|
28
|
+
}
|
|
29
|
+
}), debounceInterval);
|
|
30
|
+
return () => {
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
};
|
|
33
|
+
}, [debounceInterval, searchFn, searchQuery]);
|
|
34
|
+
return {
|
|
35
|
+
searchQueryInProgress,
|
|
36
|
+
searchResults,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=useSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearch.js","sourceRoot":"","sources":["../../../../../src/components/Search/hooks/useSearch.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAkB5C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAI,EAC3B,gBAAgB,EAChB,QAAQ,EACR,WAAW,GAAG,EAAE,GACG,EAAuB,EAAE;IAC5C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAM,EAAE,CAAC,CAAC;IAC5D,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1E,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,WAAW,CAAC,MAAM;YAAE,OAAO,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAErD,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAE/B,MAAM,OAAO,GAAG,UAAU,CAAC,GAAS,EAAE;YACpC,IAAI;gBACF,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAC;gBAC5C,gBAAgB,CAAC,OAAO,CAAC,CAAC;aAC3B;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACtB;oBAAS;gBACR,wBAAwB,CAAC,KAAK,CAAC,CAAC;aACjC;QACH,CAAC,CAAA,EAAE,gBAAgB,CAAC,CAAC;QAErB,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAE9C,OAAO;QACL,qBAAqB;QACrB,aAAa;KACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Search/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { SfuModels } from '@stream-io/video-client';
|
|
4
|
+
import { useLocalParticipant, useParticipants, } from '@stream-io/video-react-bindings';
|
|
5
|
+
import { ParticipantView, DefaultParticipantViewUI } from '../../core';
|
|
6
|
+
import { Video } from '../Video';
|
|
7
|
+
import { useVerticalScrollPosition } from '../../hooks';
|
|
8
|
+
import { IconButton } from '../Button';
|
|
9
|
+
export const CallParticipantsScreenView = (props) => {
|
|
10
|
+
const { call } = props;
|
|
11
|
+
const localParticipant = useLocalParticipant();
|
|
12
|
+
const allParticipants = useParticipants();
|
|
13
|
+
const firstScreenSharingParticipant = allParticipants.find((p) => p.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE));
|
|
14
|
+
const [scrollWrapper, setScrollWrapper] = useState(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!scrollWrapper)
|
|
17
|
+
return;
|
|
18
|
+
const cleanup = call.viewportTracker.setViewport(scrollWrapper);
|
|
19
|
+
return () => cleanup();
|
|
20
|
+
}, [scrollWrapper, call.viewportTracker]);
|
|
21
|
+
const scrollUpClickHandler = () => {
|
|
22
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ top: -150, behavior: 'smooth' });
|
|
23
|
+
};
|
|
24
|
+
const scrollDownClickHandler = () => {
|
|
25
|
+
scrollWrapper === null || scrollWrapper === void 0 ? void 0 : scrollWrapper.scrollBy({ top: 150, behavior: 'smooth' });
|
|
26
|
+
};
|
|
27
|
+
const scrollPosition = useVerticalScrollPosition(scrollWrapper);
|
|
28
|
+
const [overlayVisible, setOverlayVisible] = useState(() => (firstScreenSharingParticipant === null || firstScreenSharingParticipant === void 0 ? void 0 : firstScreenSharingParticipant.sessionId) === (localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.sessionId));
|
|
29
|
+
return (_jsxs("div", Object.assign({ className: "str-video__call-participants-screen-view" }, { children: [_jsx("div", Object.assign({ className: "str-video__call-participants-screen-view__screen" }, { children: firstScreenSharingParticipant && (_jsxs(_Fragment, { children: [_jsxs("span", Object.assign({ className: "str-video__call-participants-screen-view__screen__presenter" }, { children: [firstScreenSharingParticipant.name ||
|
|
30
|
+
firstScreenSharingParticipant.userId, ' ', "is presenting their screen."] })), _jsxs("div", Object.assign({ className: "str-video__call-participants-screen-view__wrapper" }, { children: [_jsx(Video, { className: "str-video__screen-share", participant: firstScreenSharingParticipant, kind: "screen", autoPlay: true, muted: true }), overlayVisible && (_jsxs("div", Object.assign({ className: "str-video__call-participants-screen-view__overlay" }, { children: [_jsxs("div", { children: [_jsx("div", { children: "To avoid an infinity mirror, don't share your entire screen or browser window." }), _jsx("div", { children: "Share just a single tab or a different window instead." })] }), _jsx("button", Object.assign({ type: "button", onClick: () => {
|
|
31
|
+
setOverlayVisible(false);
|
|
32
|
+
} }, { children: "Got it" }))] })))] }))] })) })), _jsxs("div", Object.assign({ className: "str-video__call-participants-screen-view__buttons-wrapper" }, { children: [scrollPosition && scrollPosition !== 'top' && (_jsx(IconButton, { onClick: scrollUpClickHandler, icon: "caret-up", className: "str-video__call-participants-screen-view__button-up" })), _jsx("div", Object.assign({ ref: setScrollWrapper, className: "str-video__call-participants-screen-view__participants-wrapper" }, { children: _jsx("div", Object.assign({ className: "str-video__call-participants-screen-view__participants" }, { children: allParticipants.map((participant) => (_jsx(ParticipantView, { participant: participant, sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId, ParticipantViewUI: DefaultParticipantViewUI }, participant.sessionId))) })) })), scrollPosition && scrollPosition !== 'bottom' && (_jsx(IconButton, { onClick: scrollDownClickHandler, icon: "caret-down", className: "str-video__call-participants-screen-view__button-down" }))] }))] })));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=CallParticipantsScreenView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallParticipantsScreenView.js","sourceRoot":"","sources":["../../../../src/components/StreamCall/CallParticipantsScreenView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAQ,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EACL,mBAAmB,EACnB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAqB,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAA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AI,EAAC,YAAY,EACjB,SAAS,EAAC,uDAAuD,GACjE,CACH,KACG,KACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DefaultParticipantViewUI, ParticipantView } from '../../core';
|
|
3
|
+
import { useLocalParticipant, useParticipants, } from '@stream-io/video-react-bindings';
|
|
4
|
+
export const CallParticipantsView = (props) => {
|
|
5
|
+
const localParticipant = useLocalParticipant();
|
|
6
|
+
const participants = useParticipants();
|
|
7
|
+
const grid = `str-video__grid-${participants.length || 1}`;
|
|
8
|
+
return (_jsx("div", Object.assign({ className: `str-video__call-participants-view ${grid}` }, { children: participants.map((participant) => (_jsx(ParticipantView, { participant: participant, sinkId: localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioOutputDeviceId, ParticipantViewUI: DefaultParticipantViewUI }, participant.sessionId))) })));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=CallParticipantsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallParticipantsView.js","sourceRoot":"","sources":["../../../../src/components/StreamCall/CallParticipantsView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC5D,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,mBAAmB,YAAY,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;IAC3D,OAAO,CACL,4BAAK,SAAS,EAAE,qCAAqC,IAAI,EAAE,gBACxD,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACjC,KAAC,eAAe,IAEd,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,mBAAmB,EAC7C,iBAAiB,EAAE,wBAAwB,IAHtC,WAAW,CAAC,SAAS,CAI1B,CACH,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useHasOngoingScreenShare } from '@stream-io/video-react-bindings';
|
|
3
|
+
import { CallParticipantsView } from './CallParticipantsView';
|
|
4
|
+
import { CallParticipantsScreenView } from './CallParticipantsScreenView';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
*/
|
|
8
|
+
export const Stage = (props) => {
|
|
9
|
+
const { call } = props;
|
|
10
|
+
const hasScreenShare = useHasOngoingScreenShare();
|
|
11
|
+
return (_jsx("div", Object.assign({ className: "str-video__stage" }, { children: hasScreenShare ? (_jsx(CallParticipantsScreenView, { call: call })) : (_jsx(CallParticipantsView, { call: call })) })));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stage.js","sourceRoot":"","sources":["../../../../src/components/StreamCall/Stage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC7C,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,cAAc,GAAG,wBAAwB,EAAE,CAAC;IAClD,OAAO,CACL,4BAAK,SAAS,EAAC,kBAAkB,gBAC9B,cAAc,CAAC,CAAC,CAAC,CAChB,KAAC,0BAA0B,IAAC,IAAI,EAAE,IAAI,GAAI,CAC3C,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,GAAI,CACrC,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/StreamCall/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AAExB,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ElementType, HTMLProps, PropsWithChildren } from 'react';
|
|
2
|
+
export type StreamThemeProps = HTMLProps<HTMLElement> & {
|
|
3
|
+
as?: ElementType;
|
|
4
|
+
};
|
|
5
|
+
export declare const StreamTheme: ({ as: Component, className, children, ...props }: PropsWithChildren<StreamThemeProps>) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import clsx from 'clsx';
|
|
14
|
+
export const StreamTheme = (_a) => {
|
|
15
|
+
var { as: Component = 'div', className, children } = _a, props = __rest(_a, ["as", "className", "children"]);
|
|
16
|
+
return (_jsx(Component, Object.assign({}, props, { className: clsx('str-video', className) }, { children: children })));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=StreamTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StreamTheme.js","sourceRoot":"","sources":["../../../../src/components/StreamTheme/StreamTheme.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAKU,EAAE,EAAE;QALd,EAC1B,EAAE,EAAE,SAAS,GAAG,KAAK,EACrB,SAAS,EACT,QAAQ,OAE4B,EADjC,KAAK,cAJkB,+BAK3B,CADS;IAER,OAAO,CACL,KAAC,SAAS,oBAAK,KAAK,IAAE,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,gBAC1D,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StreamTheme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/StreamTheme/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
export type TooltipProps<T extends HTMLElement> = PropsWithChildren<{
|
|
4
|
+
/** Reference element to which the tooltip should attach to */
|
|
5
|
+
referenceElement: T | null;
|
|
6
|
+
/** Additional class applied to the tooltip root element */
|
|
7
|
+
tooltipClassName?: string;
|
|
8
|
+
/** Popper's modifier (offset) property - [xAxis offset, yAxis offset], default [0, 10] */
|
|
9
|
+
offset?: [number, number];
|
|
10
|
+
/** Popper's placement property defining default position of the tooltip, default 'top' */
|
|
11
|
+
tooltipPlacement?: Placement;
|
|
12
|
+
/** Tells component whether to render its contents */
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const Tooltip: <T extends HTMLElement>({ children, referenceElement, tooltipClassName, tooltipPlacement, visible, }: TooltipProps<T>) => JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useFloatingUIPreset } from '../../hooks';
|
|
5
|
+
export const Tooltip = ({ children, referenceElement, tooltipClassName, tooltipPlacement = 'top', visible = false, }) => {
|
|
6
|
+
const { refs, x, y, strategy } = useFloatingUIPreset({
|
|
7
|
+
placement: tooltipPlacement,
|
|
8
|
+
strategy: 'absolute',
|
|
9
|
+
});
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
refs.setReference(referenceElement);
|
|
12
|
+
}, [referenceElement, refs]);
|
|
13
|
+
if (!visible)
|
|
14
|
+
return null;
|
|
15
|
+
return (_jsx("div", Object.assign({ className: clsx('str-video__tooltip', tooltipClassName), ref: refs.setFloating, style: {
|
|
16
|
+
position: strategy,
|
|
17
|
+
top: y !== null && y !== void 0 ? y : 0,
|
|
18
|
+
left: x !== null && x !== void 0 ? x : 0,
|
|
19
|
+
overflowY: 'auto',
|
|
20
|
+
} }, { children: children })));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAgBlD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAwB,EAC7C,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GAAG,KAAK,EACxB,OAAO,GAAG,KAAK,GACC,EAAE,EAAE;IACpB,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAAC;QACnD,SAAS,EAAE,gBAAgB;QAC3B,QAAQ,EAAE,UAAU;KACrB,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACtC,CAAC,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EACvD,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAE;YACL,QAAQ,EAAE,QAAQ;YAClB,GAAG,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;YACX,IAAI,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;YACZ,SAAS,EAAE,MAAM;SAClB,gBAEA,QAAQ,IACL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { TooltipProps } from './Tooltip';
|
|
3
|
+
type WithPopupProps = ComponentProps<'div'> & Omit<TooltipProps<HTMLDivElement>, 'referenceElement'>;
|
|
4
|
+
export declare const WithTooltip: ({ title, tooltipClassName, tooltipPlacement, ...props }: WithPopupProps) => JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useState } from 'react';
|
|
14
|
+
import { Tooltip } from './Tooltip';
|
|
15
|
+
import { useEnterLeaveHandlers } from './hooks';
|
|
16
|
+
// todo: duplicate of CallParticipantList.tsx#MediaIndicator - refactor to a single component
|
|
17
|
+
export const WithTooltip = (_a) => {
|
|
18
|
+
var { title, tooltipClassName, tooltipPlacement } = _a, props = __rest(_a, ["title", "tooltipClassName", "tooltipPlacement"]);
|
|
19
|
+
const { handleMouseEnter, handleMouseLeave, tooltipVisible } = useEnterLeaveHandlers();
|
|
20
|
+
const [tooltipAnchor, setTooltipAnchor] = useState(null);
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, Object.assign({ referenceElement: tooltipAnchor, visible: tooltipVisible, tooltipClassName: tooltipClassName, tooltipPlacement: tooltipPlacement }, { children: title || '' })), _jsx("div", Object.assign({ ref: setTooltipAnchor, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, props))] }));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=WithTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithTooltip.js","sourceRoot":"","sources":["../../../../src/components/Tooltip/WithTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAkB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAKhD,6FAA6F;AAC7F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAKX,EAAE,EAAE;QALO,EAC1B,KAAK,EACL,gBAAgB,EAChB,gBAAgB,OAED,EADZ,KAAK,cAJkB,iDAK3B,CADS;IAER,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAC1D,qBAAqB,EAAkB,CAAC;IAC1C,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAChD,IAAI,CACL,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,OAAO,kBACN,gBAAgB,EAAE,aAAa,EAC/B,OAAO,EAAE,cAAc,EACvB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,gBAEjC,KAAK,IAAI,EAAE,IACJ,EACV,4BACE,GAAG,EAAE,gBAAgB,EACrB,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,IAC1B,KAAK,EACT,IACD,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useEnterLeaveHandlers';
|