@stream-io/video-react-sdk 2.0.0-beta.0 → 2.0.0-beta.1
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 +24 -0
- package/dist/css/embedded.css +2592 -1498
- package/dist/css/embedded.css.map +1 -1
- package/dist/css/styles.css +2388 -1222
- package/dist/css/styles.css.map +1 -1
- package/dist/embedded.cjs.js +535 -476
- package/dist/embedded.cjs.js.map +1 -1
- package/dist/esm/index.js +10 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/src/components/Avatar/Avatar.js +13 -5
- package/dist/esm/src/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/src/components/Badge/Badge.js +21 -0
- package/dist/esm/src/components/Badge/Badge.js.map +1 -0
- package/dist/esm/src/components/Button/Button.js +10 -0
- package/dist/esm/src/components/Button/Button.js.map +1 -0
- package/dist/esm/src/components/Button/CompositeButton.js +10 -17
- package/dist/esm/src/components/Button/CompositeButton.js.map +1 -1
- package/dist/esm/src/components/Button/IconButton.js +3 -9
- package/dist/esm/src/components/Button/IconButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/AcceptCallButton.js +3 -2
- package/dist/esm/src/components/CallControls/AcceptCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/CallControls.js +3 -0
- package/dist/esm/src/components/CallControls/CallControls.js.map +1 -1
- package/dist/esm/src/components/CallControls/CancelCallButton.js +11 -6
- package/dist/esm/src/components/CallControls/CancelCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ReactionsButton.js +7 -3
- package/dist/esm/src/components/CallControls/ReactionsButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/RecordCallButton.js +17 -11
- package/dist/esm/src/components/CallControls/RecordCallButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ScreenShareButton.js +11 -4
- package/dist/esm/src/components/CallControls/ScreenShareButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleAudioButton.js +28 -17
- package/dist/esm/src/components/CallControls/ToggleAudioButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js +9 -4
- package/dist/esm/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -1
- package/dist/esm/src/components/CallControls/ToggleVideoButton.js +32 -23
- package/dist/esm/src/components/CallControls/ToggleVideoButton.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js +3 -3
- package/dist/esm/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js +8 -3
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js +20 -7
- package/dist/esm/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js +8 -5
- package/dist/esm/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -2
- package/dist/esm/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -1
- package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js +7 -3
- package/dist/esm/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceAudioPreviewItem.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelector.js +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelector.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js +2 -2
- package/dist/esm/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/DeviceSettings.js +8 -5
- package/dist/esm/src/components/DeviceSettings/DeviceSettings.js.map +1 -1
- package/dist/esm/src/components/DeviceSettings/SpeakerTest.js +10 -4
- package/dist/esm/src/components/DeviceSettings/SpeakerTest.js.map +1 -1
- package/dist/esm/src/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/esm/src/components/DropdownSelect/DropdownSelect.js.map +1 -1
- package/dist/esm/src/components/Menu/GenericMenu.js +2 -1
- package/dist/esm/src/components/Menu/GenericMenu.js.map +1 -1
- package/dist/esm/src/components/Menu/MenuToggle.js +3 -0
- package/dist/esm/src/components/Menu/MenuToggle.js.map +1 -1
- package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js +6 -3
- package/dist/esm/src/components/Notification/MicCaptureErrorNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/Notification.js +12 -3
- package/dist/esm/src/components/Notification/Notification.js.map +1 -1
- package/dist/esm/src/components/Notification/PermissionNotification.js +2 -2
- package/dist/esm/src/components/Notification/PermissionNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/RecordingInProgressNotification.js +7 -3
- package/dist/esm/src/components/Notification/RecordingInProgressNotification.js.map +1 -1
- package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js +7 -2
- package/dist/esm/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -1
- package/dist/esm/src/components/Permissions/PermissionRequests.js +13 -12
- package/dist/esm/src/components/Permissions/PermissionRequests.js.map +1 -1
- package/dist/esm/src/components/RingingCall/RingingCall.js +38 -14
- package/dist/esm/src/components/RingingCall/RingingCall.js.map +1 -1
- package/dist/esm/src/components/RingingCall/RingingCallControls.js +7 -3
- package/dist/esm/src/components/RingingCall/RingingCallControls.js.map +1 -1
- package/dist/esm/src/components/Search/SearchInput.js +1 -1
- package/dist/esm/src/components/Search/SearchInput.js.map +1 -1
- package/dist/esm/src/components/StreamTheme/StreamTheme.js +2 -2
- package/dist/esm/src/components/StreamTheme/StreamTheme.js.map +1 -1
- package/dist/esm/src/components/Tooltip/Tooltip.js +8 -8
- package/dist/esm/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/src/components/VideoPreview/VideoPreview.js +36 -5
- package/dist/esm/src/components/VideoPreview/VideoPreview.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js +38 -12
- package/dist/esm/src/core/components/CallLayout/LivestreamLayout.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js +9 -5
- package/dist/esm/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js +9 -6
- package/dist/esm/src/core/components/CallLayout/PipLayout/Grid.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js +9 -6
- package/dist/esm/src/core/components/CallLayout/PipLayout/Pip.js.map +1 -1
- package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js +11 -6
- package/dist/esm/src/core/components/CallLayout/SpeakerLayout.js.map +1 -1
- package/dist/esm/src/core/components/ParticipantView/ConnectionQualityIndicator.js +25 -0
- package/dist/esm/src/core/components/ParticipantView/ConnectionQualityIndicator.js.map +1 -0
- package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js +17 -13
- package/dist/esm/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -1
- package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js +13 -8
- package/dist/esm/src/core/components/ParticipantView/ParticipantActionsContextMenu.js.map +1 -1
- package/dist/esm/src/core/components/StreamVideo/StreamVideo.js +24 -3
- package/dist/esm/src/core/components/StreamVideo/StreamVideo.js.map +1 -1
- package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js +3 -13
- package/dist/esm/src/core/components/Video/BaseVideoPlaceholder.js.map +1 -1
- package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js +4 -2
- package/dist/esm/src/core/components/Video/DefaultPictureInPicturePlaceholder.js.map +1 -1
- package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js +4 -2
- package/dist/esm/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -1
- package/dist/esm/src/embedded/EmbeddedClientProvider.js +7 -4
- package/dist/esm/src/embedded/EmbeddedClientProvider.js.map +1 -1
- package/dist/esm/src/embedded/call/CallControls.js +10 -6
- package/dist/esm/src/embedded/call/CallControls.js.map +1 -1
- package/dist/esm/src/embedded/call/CallHeader.js +10 -7
- package/dist/esm/src/embedded/call/CallHeader.js.map +1 -1
- package/dist/esm/src/embedded/call/CallLayout.js +8 -5
- package/dist/esm/src/embedded/call/CallLayout.js.map +1 -1
- package/dist/esm/src/embedded/call/CallStateRouter.js +7 -4
- package/dist/esm/src/embedded/call/CallStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/hooks/useLayout.js +7 -4
- package/dist/esm/src/embedded/hooks/useLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/host/HostLayout.js +12 -7
- package/dist/esm/src/embedded/livestream/host/HostLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/host/HostStateRouter.js +12 -7
- package/dist/esm/src/embedded/livestream/host/HostStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js +9 -6
- package/dist/esm/src/embedded/livestream/viewer/ViewerLayout.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js +12 -9
- package/dist/esm/src/embedded/livestream/viewer/ViewerLobby.js.map +1 -1
- package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js +7 -4
- package/dist/esm/src/embedded/livestream/viewer/ViewerStateRouter.js.map +1 -1
- package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js +13 -9
- package/dist/esm/src/embedded/shared/BlurToggleButton/BlurToggleButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallDuration/CallDuration.js +40 -0
- package/dist/esm/src/embedded/shared/CallDuration/CallDuration.js.map +1 -0
- package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js +8 -6
- package/dist/esm/src/embedded/shared/CallFeedback/CallEndedScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js +26 -2
- package/dist/esm/src/embedded/shared/CallFeedback/RatingScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js +12 -6
- package/dist/esm/src/embedded/shared/CallFeedback/StarRating.js.map +1 -1
- package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js +8 -6
- package/dist/esm/src/embedded/shared/CallFeedback/ThankYouScreen.js.map +1 -1
- package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js +15 -14
- package/dist/esm/src/embedded/shared/ConnectionNotification/ConnectionNotification.js.map +1 -1
- package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js +4 -0
- package/dist/esm/src/embedded/shared/EmbeddedParticipantViewUI/EmbeddedParticipantViewUI.js.map +1 -1
- package/dist/esm/src/embedded/shared/JoinError/JoinError.js +8 -6
- package/dist/esm/src/embedded/shared/JoinError/JoinError.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js +11 -7
- package/dist/esm/src/embedded/shared/Lobby/DeviceControls.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js +6 -4
- package/dist/esm/src/embedded/shared/Lobby/DisabledDeviceButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/Lobby.js +10 -9
- package/dist/esm/src/embedded/shared/Lobby/Lobby.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js +6 -4
- package/dist/esm/src/embedded/shared/Lobby/ToggleCameraButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js +8 -6
- package/dist/esm/src/embedded/shared/Lobby/ToggleMicButton.js.map +1 -1
- package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js +11 -9
- package/dist/esm/src/embedded/shared/Lobby/VideoPreviewFallbacks.js.map +1 -1
- package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js +6 -4
- package/dist/esm/src/embedded/shared/ViewersCount/ViewersCount.js.map +1 -1
- package/dist/esm/src/hooks/useDeviceList.js +4 -2
- package/dist/esm/src/hooks/useDeviceList.js.map +1 -1
- package/dist/esm/src/i18n/Streami18n.js +58 -0
- package/dist/esm/src/i18n/Streami18n.js.map +1 -0
- package/dist/esm/src/i18n/TranslationContext.js +42 -0
- package/dist/esm/src/i18n/TranslationContext.js.map +1 -0
- package/dist/esm/src/i18n/runtimeDefaults.js +20 -0
- package/dist/esm/src/i18n/runtimeDefaults.js.map +1 -0
- package/dist/esm/src/i18n/useStreami18n.js +49 -0
- package/dist/esm/src/i18n/useStreami18n.js.map +1 -0
- package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js +4 -0
- package/dist/esm/src/wrappers/LivestreamPlayer/LivestreamPlayer.js.map +1 -1
- package/dist/index.cjs.js +559 -623
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/src/components/Avatar/Avatar.d.ts +9 -4
- package/dist/src/components/Badge/Badge.d.ts +23 -0
- package/dist/src/components/Badge/index.d.ts +1 -0
- package/dist/src/components/Button/Button.d.ts +16 -0
- package/dist/src/components/Button/CompositeButton.d.ts +6 -3
- package/dist/src/components/Button/IconButton.d.ts +7 -7
- package/dist/src/components/Button/index.d.ts +2 -2
- package/dist/src/components/CallControls/CancelCallButton.d.ts +3 -1
- package/dist/src/components/CallControls/ToggleAudioButton.d.ts +3 -3
- package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +2 -2
- package/dist/src/components/CallControls/ToggleVideoButton.d.ts +3 -3
- package/dist/src/components/CallControls/index.d.ts +0 -1
- package/dist/src/components/Menu/GenericMenu.d.ts +1 -0
- package/dist/src/components/Notification/Notification.d.ts +2 -1
- package/dist/src/components/StreamTheme/StreamTheme.d.ts +2 -1
- package/dist/src/components/VideoPreview/VideoPreview.d.ts +6 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/core/components/ParticipantView/ConnectionQualityIndicator.d.ts +10 -0
- package/dist/src/core/components/ParticipantView/index.d.ts +1 -0
- package/dist/src/core/components/StreamVideo/StreamVideo.d.ts +18 -2
- package/dist/src/embedded/shared/CallDuration/CallDuration.d.ts +9 -0
- package/dist/src/embedded/shared/index.d.ts +1 -0
- package/dist/src/i18n/Streami18n.d.ts +56 -0
- package/dist/src/i18n/TranslationContext.d.ts +30 -0
- package/dist/src/i18n/index.d.ts +16 -0
- package/dist/src/i18n/keys.d.ts +164 -0
- package/dist/src/i18n/runtimeDefaults.d.ts +17 -0
- package/dist/src/i18n/types.d.ts +45 -0
- package/dist/src/i18n/useStreami18n.d.ts +19 -0
- package/index.ts +1 -1
- package/package.json +18 -13
- package/src/components/Avatar/Avatar.tsx +53 -19
- package/src/components/Badge/Badge.tsx +48 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Button/Button.tsx +49 -0
- package/src/components/Button/CompositeButton.tsx +82 -73
- package/src/components/Button/IconButton.tsx +19 -29
- package/src/components/Button/index.ts +2 -2
- package/src/components/CallControls/AcceptCallButton.tsx +3 -1
- package/src/components/CallControls/CancelCallButton.tsx +32 -24
- package/src/components/CallControls/ReactionsButton.tsx +7 -3
- package/src/components/CallControls/RecordCallButton.tsx +50 -23
- package/src/components/CallControls/ScreenShareButton.tsx +27 -6
- package/src/components/CallControls/ToggleAudioButton.tsx +62 -61
- package/src/components/CallControls/ToggleAudioOutputButton.tsx +7 -4
- package/src/components/CallControls/ToggleVideoButton.tsx +66 -66
- package/src/components/CallControls/index.ts +0 -1
- package/src/components/CallParticipantsList/BlockedUserListing.tsx +9 -2
- package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +10 -3
- package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +33 -8
- package/src/components/CallParticipantsList/CallParticipantsList.tsx +21 -5
- package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +2 -2
- package/src/components/CallRecordingList/CallRecordingListHeader.tsx +11 -3
- package/src/components/DeviceSettings/DeviceAudioPreviewItem.tsx +3 -1
- package/src/components/DeviceSettings/DeviceSelector.tsx +1 -1
- package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +2 -7
- package/src/components/DeviceSettings/DeviceSettings.tsx +14 -5
- package/src/components/DeviceSettings/SpeakerTest.tsx +7 -2
- package/src/components/DropdownSelect/DropdownSelect.tsx +3 -1
- package/src/components/Menu/GenericMenu.tsx +4 -0
- package/src/components/Notification/MicCaptureErrorNotification.tsx +7 -2
- package/src/components/Notification/Notification.tsx +20 -4
- package/src/components/Notification/PermissionNotification.tsx +2 -0
- package/src/components/Notification/RecordingInProgressNotification.tsx +5 -6
- package/src/components/Notification/SpeakingWhileMutedNotification.tsx +8 -2
- package/src/components/Permissions/PermissionRequests.tsx +50 -43
- package/src/components/RingingCall/RingingCall.tsx +40 -14
- package/src/components/RingingCall/RingingCallControls.tsx +2 -1
- package/src/components/Search/SearchInput.tsx +2 -3
- package/src/components/StreamTheme/StreamTheme.tsx +3 -1
- package/src/components/Tooltip/Tooltip.tsx +3 -10
- package/src/components/VideoPreview/VideoPreview.tsx +50 -5
- package/src/components/index.ts +1 -1
- package/src/core/components/CallLayout/LivestreamLayout.tsx +48 -18
- package/src/core/components/CallLayout/PaginatedGridLayout.tsx +14 -0
- package/src/core/components/CallLayout/PipLayout/Grid.tsx +10 -2
- package/src/core/components/CallLayout/PipLayout/Pip.tsx +6 -2
- package/src/core/components/CallLayout/SpeakerLayout.tsx +27 -0
- package/src/core/components/CallLayout/partcipantFilter.test.ts +38 -31
- package/src/core/components/ParticipantView/ConnectionQualityIndicator.tsx +54 -0
- package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +60 -27
- package/src/core/components/ParticipantView/ParticipantActionsContextMenu.tsx +63 -22
- package/src/core/components/ParticipantView/index.ts +1 -0
- package/src/core/components/StreamVideo/StreamVideo.tsx +39 -4
- package/src/core/components/Video/BaseVideoPlaceholder.tsx +13 -30
- package/src/core/components/Video/DefaultPictureInPicturePlaceholder.tsx +5 -2
- package/src/core/components/Video/DefaultVideoPlaceholder.tsx +2 -2
- package/src/embedded/call/CallControls.tsx +9 -18
- package/src/embedded/call/CallHeader.tsx +3 -12
- package/src/embedded/call/CallLayout.tsx +1 -1
- package/src/embedded/livestream/host/HostLayout.tsx +26 -20
- package/src/embedded/livestream/host/HostStateRouter.tsx +12 -8
- package/src/embedded/livestream/viewer/ViewerLayout.tsx +8 -11
- package/src/embedded/livestream/viewer/ViewerLobby.tsx +31 -15
- package/src/embedded/shared/BlurToggleButton/BlurToggleButton.tsx +18 -12
- package/src/embedded/shared/CallDuration/CallDuration.tsx +32 -0
- package/src/embedded/shared/CallFeedback/CallEndedScreen.tsx +27 -13
- package/src/embedded/shared/CallFeedback/RatingScreen.tsx +20 -12
- package/src/embedded/shared/CallFeedback/StarRating.tsx +10 -3
- package/src/embedded/shared/CallFeedback/ThankYouScreen.tsx +6 -3
- package/src/embedded/shared/ConnectionNotification/ConnectionNotification.tsx +21 -14
- package/src/embedded/shared/JoinError/JoinError.tsx +7 -6
- package/src/embedded/shared/Lobby/DeviceControls.tsx +25 -3
- package/src/embedded/shared/Lobby/Lobby.tsx +19 -22
- package/src/embedded/shared/Lobby/ToggleMicButton.tsx +10 -3
- package/src/embedded/shared/Lobby/VideoPreviewFallbacks.tsx +4 -2
- package/src/embedded/shared/index.ts +1 -0
- package/src/hooks/useDeviceList.tsx +2 -2
- package/src/i18n/Streami18n.ts +67 -0
- package/src/i18n/TranslationContext.tsx +55 -0
- package/src/i18n/index.ts +22 -0
- package/src/i18n/keys.ts +169 -0
- package/src/i18n/runtimeDefaults.ts +17 -0
- package/src/i18n/types.ts +78 -0
- package/src/i18n/useStreami18n.ts +66 -0
- package/src/utilities/filter.test.ts +132 -124
- package/src/utilities/normalizeString.test.ts +50 -48
- package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js +0 -59
- package/dist/embedded-CallStatsLatencyChart-CpL1M_s0.cjs.js.map +0 -1
- package/dist/esm/src/components/Button/TextButton.js +0 -8
- package/dist/esm/src/components/Button/TextButton.js.map +0 -1
- package/dist/esm/src/components/CallControls/CallStatsButton.js +0 -18
- package/dist/esm/src/components/CallControls/CallStatsButton.js.map +0 -1
- package/dist/esm/src/components/CallStats/CallStats.js +0 -180
- package/dist/esm/src/components/CallStats/CallStats.js.map +0 -1
- package/dist/esm/src/components/CallStats/CallStatsLatencyChart.js +0 -57
- package/dist/esm/src/components/CallStats/CallStatsLatencyChart.js.map +0 -1
- package/dist/esm/src/translations/en.json.js +0 -177
- package/dist/esm/src/translations/en.json.js.map +0 -1
- package/dist/esm/src/translations/index.js +0 -6
- package/dist/esm/src/translations/index.js.map +0 -1
- package/dist/latency-chart-CpL1M_s0.cjs.js +0 -59
- package/dist/latency-chart-CpL1M_s0.cjs.js.map +0 -1
- package/dist/src/components/Button/TextButton.d.ts +0 -2
- package/dist/src/components/CallControls/CallStatsButton.d.ts +0 -4
- package/dist/src/components/CallStats/CallStats.d.ts +0 -22
- package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +0 -7
- package/dist/src/components/CallStats/index.d.ts +0 -1
- package/dist/src/translations/index.d.ts +0 -146
- package/src/components/Button/TextButton.tsx +0 -12
- package/src/components/CallControls/CallStatsButton.tsx +0 -37
- package/src/components/CallStats/CallStats.tsx +0 -439
- package/src/components/CallStats/CallStatsLatencyChart.tsx +0 -76
- package/src/components/CallStats/index.ts +0 -1
- package/src/translations/en.json +0 -154
- package/src/translations/index.ts +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export * from '@stream-io/video-react-bindings';
|
|
|
3
3
|
export * from './src/core';
|
|
4
4
|
export * from './src/components';
|
|
5
5
|
export * from './src/wrappers';
|
|
6
|
-
export * from './src/
|
|
6
|
+
export * from './src/i18n';
|
|
7
7
|
export { useHorizontalScrollPosition, useVerticalScrollPosition, useRequestPermission, usePersistedDevicePreferences, useDeviceList, useModeration, useLoopbackRecording, type LoopbackRecordingState, type StartLoopbackRecordingOptions, type UseLoopbackRecordingResult, } from './src/hooks';
|
|
8
8
|
export { applyFilter, type Filter } from './src/utilities/filter';
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { ComponentProps, CSSProperties } from 'react';
|
|
2
|
+
export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
2
3
|
export type AvatarData = {
|
|
3
4
|
imageSrc?: string;
|
|
4
5
|
name?: string;
|
|
5
6
|
style?: CSSProperties & Record<string, string | number>;
|
|
6
7
|
};
|
|
7
|
-
export type
|
|
8
|
-
|
|
8
|
+
export type AvatarVariantProps = {
|
|
9
|
+
size?: AvatarSize;
|
|
10
|
+
showOutline?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type AvatarProps = AvatarData & ComponentProps<'img'> & AvatarVariantProps;
|
|
13
|
+
export declare const Avatar: ({ imageSrc, name, style, className, size, showOutline, ...rest }: AvatarProps) => import("react").JSX.Element | null;
|
|
9
14
|
type AvatarFallbackProps = {
|
|
10
15
|
names: string[];
|
|
11
16
|
className?: string;
|
|
12
17
|
style?: CSSProperties & Record<string, string | number>;
|
|
13
|
-
};
|
|
14
|
-
export declare const AvatarFallback: ({ className, names, style, }: AvatarFallbackProps) => import("react").JSX.Element;
|
|
18
|
+
} & AvatarVariantProps;
|
|
19
|
+
export declare const AvatarFallback: ({ className, names, style, size, showOutline, }: AvatarFallbackProps) => import("react").JSX.Element;
|
|
15
20
|
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type BadgeVariant = 'default' | 'primary' | 'error' | 'neutral' | 'inverse';
|
|
3
|
+
export type BadgeSize = 'xs' | 'sm' | 'md';
|
|
4
|
+
export type BadgeProps = ComponentPropsWithoutRef<'span'> & {
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
size?: BadgeSize;
|
|
7
|
+
icon?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A compact badge for counts, notifications and error markers.
|
|
11
|
+
*
|
|
12
|
+
* Without `icon` it is a pill that grows with its content; with `icon` it is a
|
|
13
|
+
* circle of the size given by `size`.
|
|
14
|
+
*
|
|
15
|
+
* The badge carries no positioning of its own — whatever it annotates places
|
|
16
|
+
* it. For the call controls, rendering a badge among `CompositeButton`'s
|
|
17
|
+
* children anchors it to the top-right corner of the button.
|
|
18
|
+
*/
|
|
19
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
20
|
+
variant?: BadgeVariant;
|
|
21
|
+
size?: BadgeSize;
|
|
22
|
+
icon?: string;
|
|
23
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'destructive';
|
|
3
|
+
export type ButtonAppearance = 'solid' | 'outline' | 'ghost';
|
|
4
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type ButtonProps = ComponentPropsWithoutRef<'button'> & {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
appearance?: ButtonAppearance;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
appearance?: ButtonAppearance;
|
|
14
|
+
size?: ButtonSize;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ToggleMenuButtonProps } from '../Menu';
|
|
2
2
|
import { ComponentProps, ComponentType, PropsWithChildren, ReactElement } from 'react';
|
|
3
3
|
import { Placement } from '@floating-ui/react';
|
|
4
|
-
|
|
4
|
+
import { ButtonAppearance, ButtonSize, ButtonVariant } from './Button';
|
|
5
|
+
export type CompositeButtonProps<E extends HTMLElement = HTMLButtonElement> = PropsWithChildren<{
|
|
5
6
|
active?: boolean;
|
|
6
7
|
Menu?: ComponentType | ReactElement | null;
|
|
7
8
|
caption?: string;
|
|
@@ -9,7 +10,9 @@ export type IconButtonWithMenuProps<E extends HTMLElement = HTMLButtonElement> =
|
|
|
9
10
|
menuPlacement?: Placement;
|
|
10
11
|
menuOffset?: number;
|
|
11
12
|
ToggleMenuButton?: ComponentType<ToggleMenuButtonProps<E>>;
|
|
12
|
-
variant?:
|
|
13
|
+
variant?: ButtonVariant;
|
|
14
|
+
appearance?: ButtonAppearance;
|
|
15
|
+
size?: Exclude<ButtonSize, 'xs'>;
|
|
13
16
|
onMenuToggle?: (menuShown: boolean) => void;
|
|
14
17
|
}> & ComponentProps<'button'>;
|
|
15
|
-
export declare const CompositeButton: import("react").ForwardRefExoticComponent<Omit<
|
|
18
|
+
export declare const CompositeButton: import("react").ForwardRefExoticComponent<Omit<CompositeButtonProps<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ButtonProps } from './Button';
|
|
2
|
+
export type IconButtonProps = Omit<ButtonProps, 'children'> & {
|
|
3
|
+
icon: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "children"> & {
|
|
6
|
+
icon: string;
|
|
7
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './Button';
|
|
2
2
|
export * from './IconButton';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './CompositeButton';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button';
|
|
2
3
|
export type CancelCallButtonProps = {
|
|
3
4
|
disabled?: boolean;
|
|
4
5
|
caption?: string;
|
|
6
|
+
size?: ButtonProps['size'];
|
|
5
7
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
6
8
|
onLeave?: (err?: Error) => void;
|
|
7
9
|
};
|
|
8
10
|
export declare const CancelCallConfirmButton: ({ onClick, onLeave, }: CancelCallButtonProps) => import("react").JSX.Element;
|
|
9
|
-
export declare const CancelCallButton: ({ disabled, caption, onClick, onLeave, }: CancelCallButtonProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const CancelCallButton: ({ disabled, caption, size, onClick, onLeave, }: CancelCallButtonProps) => import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UseInputMediaDeviceOptions } from '@stream-io/video-react-bindings';
|
|
2
|
-
import {
|
|
2
|
+
import { CompositeButtonProps } from '../Button';
|
|
3
3
|
import { PropsWithErrorHandler } from '../../utilities/callControlHandler';
|
|
4
|
-
export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<Pick<
|
|
4
|
+
export type ToggleAudioPreviewButtonProps = PropsWithErrorHandler<Pick<CompositeButtonProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'> & UseInputMediaDeviceOptions>;
|
|
5
5
|
export declare const ToggleAudioPreviewButton: (props: ToggleAudioPreviewButtonProps) => import("react").JSX.Element;
|
|
6
|
-
export type ToggleAudioPublishingButtonProps = PropsWithErrorHandler<Pick<
|
|
6
|
+
export type ToggleAudioPublishingButtonProps = PropsWithErrorHandler<Pick<CompositeButtonProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'> & UseInputMediaDeviceOptions>;
|
|
7
7
|
export declare const ToggleAudioPublishingButton: (props: ToggleAudioPublishingButtonProps) => import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ToggleAudioOutputButtonProps = Pick<
|
|
1
|
+
import { CompositeButtonProps } from '../Button';
|
|
2
|
+
export type ToggleAudioOutputButtonProps = Pick<CompositeButtonProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'>;
|
|
3
3
|
export declare const ToggleAudioOutputButton: (props: ToggleAudioOutputButtonProps) => import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UseInputMediaDeviceOptions } from '@stream-io/video-react-bindings';
|
|
2
|
-
import {
|
|
2
|
+
import { CompositeButtonProps } from '../Button/';
|
|
3
3
|
import { PropsWithErrorHandler } from '../../utilities/callControlHandler';
|
|
4
|
-
export type ToggleVideoPreviewButtonProps = PropsWithErrorHandler<Pick<
|
|
4
|
+
export type ToggleVideoPreviewButtonProps = PropsWithErrorHandler<Pick<CompositeButtonProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'> & UseInputMediaDeviceOptions>;
|
|
5
5
|
export declare const ToggleVideoPreviewButton: (props: ToggleVideoPreviewButtonProps) => import("react").JSX.Element;
|
|
6
|
-
type ToggleVideoPublishingButtonProps = PropsWithErrorHandler<Pick<
|
|
6
|
+
type ToggleVideoPublishingButtonProps = PropsWithErrorHandler<Pick<CompositeButtonProps, 'caption' | 'Menu' | 'menuPlacement' | 'onMenuToggle'> & UseInputMediaDeviceOptions>;
|
|
7
7
|
export declare const ToggleVideoPublishingButton: (props: ToggleVideoPublishingButtonProps) => import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -3,3 +3,4 @@ export declare const GenericMenu: ({ children, onItemClick, }: PropsWithChildren
|
|
|
3
3
|
onItemClick?: (e: MouseEvent) => void;
|
|
4
4
|
}>) => import("react").JSX.Element;
|
|
5
5
|
export declare const GenericMenuButtonItem: ({ children, ...rest }: Omit<ComponentProps<"button">, "ref">) => import("react").JSX.Element;
|
|
6
|
+
export declare const GenericMenuSeparator: () => import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { Placement } from '@floating-ui/react';
|
|
3
|
+
export type NotificationState = 'success' | 'error' | 'loading';
|
|
3
4
|
export type NotificationProps = {
|
|
4
5
|
message?: ReactNode;
|
|
5
6
|
isVisible?: boolean;
|
|
@@ -7,7 +8,7 @@ export type NotificationProps = {
|
|
|
7
8
|
resetIsVisible?: () => void;
|
|
8
9
|
placement?: Placement;
|
|
9
10
|
className?: string;
|
|
10
|
-
|
|
11
|
+
state?: NotificationState;
|
|
11
12
|
close?: () => void;
|
|
12
13
|
};
|
|
13
14
|
export declare const Notification: (props: PropsWithChildren<NotificationProps>) => import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementType, HTMLProps, PropsWithChildren } from 'react';
|
|
2
2
|
export type StreamThemeProps = HTMLProps<HTMLElement> & {
|
|
3
3
|
as?: ElementType;
|
|
4
|
+
theme?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare const StreamTheme: ({ as: Component, className, children, ...props }: PropsWithChildren<StreamThemeProps>) => import("react").JSX.Element;
|
|
6
|
+
export declare const StreamTheme: ({ as: Component, className, children, theme, ...props }: PropsWithChildren<StreamThemeProps>) => import("react").JSX.Element;
|
|
@@ -20,5 +20,10 @@ export type VideoPreviewProps = {
|
|
|
20
20
|
* Component rendered above the BaseVideo until the video is ready (meaning until the play event is emitted).
|
|
21
21
|
*/
|
|
22
22
|
StartingCameraPreview?: ComponentType;
|
|
23
|
+
/**
|
|
24
|
+
* Outlines the preview while the local user is speaking. Requires the
|
|
25
|
+
* microphone to be enabled. Defaults to false.
|
|
26
|
+
*/
|
|
27
|
+
speakingIndicatorVisible?: boolean;
|
|
23
28
|
};
|
|
24
|
-
export declare const VideoPreview: ({ className, mirror, DisabledVideoPreview, NoCameraPreview, StartingCameraPreview, }: VideoPreviewProps) => import("react").JSX.Element;
|
|
29
|
+
export declare const VideoPreview: ({ className, mirror, DisabledVideoPreview, NoCameraPreview, StartingCameraPreview, speakingIndicatorVisible, }: VideoPreviewProps) => import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './Avatar';
|
|
2
2
|
export * from './BackgroundFilters';
|
|
3
|
+
export * from './Badge';
|
|
3
4
|
export * from './Button';
|
|
4
5
|
export * from './CallControls';
|
|
5
6
|
export * from './CallParticipantsList';
|
|
6
7
|
export * from './CallPreview';
|
|
7
8
|
export * from './CallRecordingList';
|
|
8
|
-
export * from './CallStats';
|
|
9
9
|
export * from './DeviceSettings';
|
|
10
10
|
export * from './DropdownSelect';
|
|
11
11
|
export * from './Icon';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SfuModels } from '@stream-io/video-client';
|
|
2
|
+
export type ConnectionQualityIndicatorProps = {
|
|
3
|
+
quality: SfuModels.ConnectionQuality;
|
|
4
|
+
title?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Three ascending bars showing a participant's connection quality.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ConnectionQualityIndicator: ({ quality, title, className, }: ConnectionQualityIndicatorProps) => import("react").JSX.Element | null;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type StreamVideoProviderProps } from '@stream-io/video-react-bindings';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { type UseStreami18nParams } from '../../../i18n';
|
|
4
|
+
export type StreamVideoProps = StreamVideoProviderProps & UseStreami18nParams;
|
|
5
|
+
/**
|
|
6
|
+
* StreamVideo is the root provider of the SDK: it provides the client to the component tree and
|
|
7
|
+
* mounts the SDK's translation context.
|
|
8
|
+
*
|
|
9
|
+
* The i18n runtime lives here rather than in `@stream-io/video-react-bindings` because the key
|
|
10
|
+
* catalog is generated from *this* package's `t()` call sites.
|
|
11
|
+
*
|
|
12
|
+
* This also fixes a real bug in the previous implementation, which rendered
|
|
13
|
+
* `<StreamVideoProvider translationsOverrides={translations} {...props} />`. Because `{...props}`
|
|
14
|
+
* came last, an integrator passing `translationsOverrides` *replaced* the SDK's bundled strings
|
|
15
|
+
* instead of merging with them, leaving every untranslated key rendering as a raw dotted path.
|
|
16
|
+
* `useStreami18n` layers integrator dictionaries over the SDK's own defaults, so a partial
|
|
17
|
+
* dictionary is now safe.
|
|
18
|
+
*/
|
|
3
19
|
export declare const StreamVideo: {
|
|
4
|
-
(
|
|
20
|
+
({ children, client, i18nInstance, language, translations, }: PropsWithChildren<StreamVideoProps>): import("react").JSX.Element;
|
|
5
21
|
displayName: string;
|
|
6
22
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CallDurationProps {
|
|
2
|
+
/**
|
|
3
|
+
* A formatted duration as produced by `useCallDuration`: `MM:SS`, or
|
|
4
|
+
* `HH:MM:SS` past the hour. Everything up to the last `:` is dimmed.
|
|
5
|
+
*/
|
|
6
|
+
elapsed: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const CallDuration: ({ elapsed }: CallDurationProps) => import("react").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './BlurToggleButton/BlurToggleButton';
|
|
2
|
+
export * from './CallDuration/CallDuration';
|
|
2
3
|
export * from './CallFeedback/CallFeedback';
|
|
3
4
|
export * from './ConnectionNotification/ConnectionNotification';
|
|
4
5
|
export * from './EmbeddedParticipantViewUI/EmbeddedParticipantViewUI';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Streami18n as CoreStreami18n } from '@stream-io/i18n';
|
|
2
|
+
import type { Streami18nOptions as CoreStreami18nOptions } from '@stream-io/i18n';
|
|
3
|
+
import type { BundledKey, TranslationCatalog } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Options for {@link Streami18n}.
|
|
6
|
+
*
|
|
7
|
+
* Core's options, narrowed to this SDK's catalog so `translationsForLanguage` is key-checked.
|
|
8
|
+
* `runtimeDefaults` is *merged* over the SDK's own rather than replacing it, so supplying it adds to
|
|
9
|
+
* what the SDK ships.
|
|
10
|
+
*/
|
|
11
|
+
export type Streami18nOptions = CoreStreami18nOptions<TranslationCatalog>;
|
|
12
|
+
/**
|
|
13
|
+
* Wrapper around [i18next](https://www.i18next.com/) for this SDK's translations. Pass an instance
|
|
14
|
+
* to `<StreamVideo i18nInstance={…}>` to control the language and the copy.
|
|
15
|
+
*
|
|
16
|
+
* The implementation lives in `@stream-io/i18n`, shared with the React Native SDK and with Chat.
|
|
17
|
+
* What this subclass adds is what is this package's own: its bundled translation data, and the two
|
|
18
|
+
* type parameters — core cannot supply either, because the key catalog is generated from *this*
|
|
19
|
+
* package's `t()` call sites.
|
|
20
|
+
*
|
|
21
|
+
* ## Overriding some of the English copy
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* const i18n = new Streami18n({
|
|
25
|
+
* translationsForLanguage: {
|
|
26
|
+
* 'common.participants.label': 'People',
|
|
27
|
+
* },
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Adding a language
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* import 'dayjs/locale/nl';
|
|
35
|
+
*
|
|
36
|
+
* const i18n = new Streami18n({ language: 'nl' });
|
|
37
|
+
* i18n.registerTranslation('nl', {
|
|
38
|
+
* 'callControls.cancelCallButton.leaveCall.title': 'Verlaten',
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* No dayjs locale file defines `calendar` — that field belongs to the calendar plugin — so a
|
|
43
|
+
* language whose relative dates must read natively needs the locale import *and* a `calendar`
|
|
44
|
+
* config passed as the third argument.
|
|
45
|
+
*
|
|
46
|
+
* Type your dictionary as `TranslationDictionary` to turn a typo or a key removed in a later major
|
|
47
|
+
* into a compile error. A **partial dictionary is safe**: any key you leave out renders the English
|
|
48
|
+
* copy that ships inline at each call site, never a raw dotted path — so there is no need to
|
|
49
|
+
* translate everything before shipping a language.
|
|
50
|
+
*
|
|
51
|
+
* Reactivity goes through `i18n.state`, a `StateStore`. `setLanguage()` returns nothing — the new
|
|
52
|
+
* `t` is published to that store, which the provider subscribes to.
|
|
53
|
+
*/
|
|
54
|
+
export declare class Streami18n extends CoreStreami18n<TranslationCatalog, BundledKey> {
|
|
55
|
+
constructor(options?: Streami18nOptions);
|
|
56
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { StreamTFunction, TDateTimeParser } from './types';
|
|
2
|
+
export type TranslationContextValue = {
|
|
3
|
+
t: StreamTFunction;
|
|
4
|
+
tDateTimeParser: TDateTimeParser;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Built from the shared factory in `@stream-io/i18n/react`.
|
|
8
|
+
*
|
|
9
|
+
* A **default value** is supplied rather than making the hook throw, and that is deliberate: it
|
|
10
|
+
* matches what `useI18n` did before this module existed, and it is what lets the `embedded/`
|
|
11
|
+
* components — which are used standalone, outside any provider — render correct English instead of
|
|
12
|
+
* crashing. Chat's React Native SDK throws instead; hence core exposes this as a factory.
|
|
13
|
+
*/
|
|
14
|
+
declare const TranslationContext: import("react").Context<TranslationContextValue>, TranslationProvider: (props: import("react").PropsWithChildren<{
|
|
15
|
+
value: TranslationContextValue;
|
|
16
|
+
}>) => import("react").ReactElement;
|
|
17
|
+
export { TranslationContext, TranslationProvider };
|
|
18
|
+
/**
|
|
19
|
+
* Reads `t` and `tDateTimeParser` from the closest provider.
|
|
20
|
+
*
|
|
21
|
+
* Works outside a provider too — the default translator renders each call site's inline English.
|
|
22
|
+
*
|
|
23
|
+
* The name is `useI18n` rather than core's `useTranslationContext` because ~500 call sites in this
|
|
24
|
+
* SDK already import it; renaming them is churn with no payoff.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* const { t } = useI18n();
|
|
28
|
+
* const label = t('callControls.cancelCallButton.leaveCall.title', 'Leave call');
|
|
29
|
+
*/
|
|
30
|
+
export declare const useI18n: () => TranslationContextValue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './Streami18n';
|
|
2
|
+
export * from './TranslationContext';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './useStreami18n';
|
|
5
|
+
/**
|
|
6
|
+
* Core helpers re-exported so an integrator never needs a direct dependency on `@stream-io/i18n`:
|
|
7
|
+
* that package is an implementation detail of this SDK, and a second copy resolved from their
|
|
8
|
+
* `node_modules` would register dayjs plugins on the wrong module.
|
|
9
|
+
*
|
|
10
|
+
* - `asDynamicKey` — brands a runtime-resolved string as a translation key, the one sanctioned way
|
|
11
|
+
* past the compile-time key check.
|
|
12
|
+
* - `getDateString` — the timestamp renderer, for a custom component formatting dates itself.
|
|
13
|
+
* - `predefinedFormatters` — the built-in i18next formatters, to spread over when adding one.
|
|
14
|
+
* - `defaultDateTimeParser` — the dayjs-backed parser, with the required plugins already applied.
|
|
15
|
+
*/
|
|
16
|
+
export { asDynamicKey, defaultDateTimeParser, getDateString, predefinedFormatters, } from '@stream-io/i18n';
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every translation entry shipped with the SDK, mapped to its English copy.
|
|
3
|
+
*
|
|
4
|
+
* Plural entries appear as `<key>_one` / `<key>_other`; call sites use the bare `<key>` and
|
|
5
|
+
* pass `count`.
|
|
6
|
+
*/
|
|
7
|
+
export type TranslationCatalog = {
|
|
8
|
+
'callControls.blurToggleButton.applying.label': 'Applying...';
|
|
9
|
+
'callControls.blurToggleButton.blurBackground.label': 'Blur background';
|
|
10
|
+
'callControls.blurToggleButton.disableBlur.label': 'Disable blur';
|
|
11
|
+
'callControls.cancelCallButton.endCallForAll.label': 'End call for all';
|
|
12
|
+
'callControls.cancelCallButton.leaveCall.title': 'Leave call';
|
|
13
|
+
'callControls.reactionsButton.reactions.title': 'Reactions';
|
|
14
|
+
'callControls.recordCallButton.confirmEndRecording.description': 'Are you sure you want end the recording?';
|
|
15
|
+
'callControls.recordCallButton.endRecording.title': 'End recording';
|
|
16
|
+
'callControls.recordCallButton.recordCall.title': 'Record call';
|
|
17
|
+
'callControls.recordCallButton.waitingRecordingStart.title': 'Waiting for recording to start...';
|
|
18
|
+
'callControls.recordCallButton.waitingRecordingStop.title': 'Waiting for recording to stop...';
|
|
19
|
+
'callControls.screenShareButton.awaitingApproval.text': 'Awaiting for an approval to share screen.';
|
|
20
|
+
'callControls.screenShareButton.permissionGranted.text': 'You can now share your screen.';
|
|
21
|
+
'callControls.screenShareButton.permissionRevoked.text': 'You can no longer share your screen.';
|
|
22
|
+
'callControls.screenShareButton.shareScreen.title': 'Share screen';
|
|
23
|
+
'callControls.toggleAudioButton.awaitingApproval.text': 'Awaiting for an approval to speak.';
|
|
24
|
+
'callControls.toggleAudioButton.checkBrowserAudioPermissions.title': 'Check your browser audio permissions';
|
|
25
|
+
'callControls.toggleAudioButton.checkBrowserMicPermissions.title': 'Check your browser mic permissions';
|
|
26
|
+
'callControls.toggleAudioButton.mic.title': 'Mic';
|
|
27
|
+
'callControls.toggleAudioButton.microphonePausedBySystem.title': 'Microphone is paused by your system';
|
|
28
|
+
'callControls.toggleAudioButton.noPermissionToShareAudio.title': 'You have no permission to share your audio';
|
|
29
|
+
'callControls.toggleAudioButton.permissionGranted.text': 'You can now speak.';
|
|
30
|
+
'callControls.toggleAudioButton.permissionRevoked.text': 'You can no longer speak.';
|
|
31
|
+
'callControls.toggleAudioOutputButton.speakers.title': 'Speakers';
|
|
32
|
+
'callControls.toggleVideoButton.awaitingApproval.text': 'Awaiting for an approval to share your video.';
|
|
33
|
+
'callControls.toggleVideoButton.cameraPausedBySystem.title': 'Camera is paused by your system';
|
|
34
|
+
'callControls.toggleVideoButton.checkBrowserVideoPermissions.title': 'Check your browser video permissions';
|
|
35
|
+
'callControls.toggleVideoButton.noPermissionToShareVideo.title': 'You have no permission to share your video';
|
|
36
|
+
'callControls.toggleVideoButton.permissionGranted.text': 'You can now share your video.';
|
|
37
|
+
'callControls.toggleVideoButton.permissionRevoked.text': 'You can no longer share your video.';
|
|
38
|
+
'callControls.toggleVideoButton.video.title': 'Video';
|
|
39
|
+
'callControls.toggleVideoButton.videoPublishingDisabled.title': 'Video publishing is disabled by the system';
|
|
40
|
+
'callFeedback.callEndedScreen.callEnded.title': 'Call ended';
|
|
41
|
+
'callFeedback.callEndedScreen.helpUsImprove.text': 'Help us improve';
|
|
42
|
+
'callFeedback.callEndedScreen.leaveFeedback.label': 'Leave feedback';
|
|
43
|
+
'callFeedback.callEndedScreen.leftByMistake.text': 'Left by mistake?';
|
|
44
|
+
'callFeedback.callEndedScreen.rejoinCall.label': 'Rejoin call';
|
|
45
|
+
'callFeedback.ratingScreen.feedbackMessage.ariaLabel': 'Feedback message';
|
|
46
|
+
'callFeedback.ratingScreen.shareYourFeedback.title': 'Share your feedback';
|
|
47
|
+
'callFeedback.ratingScreen.submitFeedback.label': 'Submit feedback';
|
|
48
|
+
'callFeedback.ratingScreen.tellUsAboutExperience.placeholder': 'Tell us about your experience...';
|
|
49
|
+
'callFeedback.starRating.howWasCallQuality.text': 'How was your call quality?';
|
|
50
|
+
'callFeedback.starRating.rateStars.ariaLabel_one': 'Rate {{ count }} star';
|
|
51
|
+
'callFeedback.starRating.rateStars.ariaLabel_other': 'Rate {{ count }} stars';
|
|
52
|
+
'callFeedback.thankYouScreen.feedbackHelpsImprove.text': 'Your feedback helps improve call quality.';
|
|
53
|
+
'callFeedback.thankYouScreen.thankYou.title': 'Thank you!';
|
|
54
|
+
'callLayout.paginatedGridLayout.nextPage.ariaLabel': 'Next page';
|
|
55
|
+
'callLayout.paginatedGridLayout.previousPage.ariaLabel': 'Previous page';
|
|
56
|
+
'callLayout.speakerLayout.scrollParticipantsDown.ariaLabel': 'Scroll participants down';
|
|
57
|
+
'callLayout.speakerLayout.scrollParticipantsLeft.ariaLabel': 'Scroll participants left';
|
|
58
|
+
'callLayout.speakerLayout.scrollParticipantsRight.ariaLabel': 'Scroll participants right';
|
|
59
|
+
'callLayout.speakerLayout.scrollParticipantsUp.ariaLabel': 'Scroll participants up';
|
|
60
|
+
'callRecordingList.callRecordings.title': 'Call Recordings';
|
|
61
|
+
'callRecordingList.refresh.title': 'Refresh';
|
|
62
|
+
'common.allow.label': 'Allow';
|
|
63
|
+
'common.cancel.label': 'Cancel';
|
|
64
|
+
'common.default.label': 'Default';
|
|
65
|
+
'common.dismiss.label': 'Dismiss';
|
|
66
|
+
'common.live.label': 'Live';
|
|
67
|
+
'common.microphone.label': 'Microphone';
|
|
68
|
+
'common.noCameraFound.text': 'No camera found';
|
|
69
|
+
'common.participants.label': 'Participants';
|
|
70
|
+
'common.presentingYourScreen.text': 'You are presenting your screen';
|
|
71
|
+
'common.revoke.label': 'Revoke';
|
|
72
|
+
'common.speaker.label': 'Speaker';
|
|
73
|
+
'common.toggleMenu.ariaLabel': 'Toggle menu';
|
|
74
|
+
'common.tryAgain.label': 'Try again';
|
|
75
|
+
'common.videoDisabled.text': 'Video is disabled';
|
|
76
|
+
'common.waitingForPermission.title': 'Waiting for permission';
|
|
77
|
+
'connectionNotification.failedToRestore.text': 'Failed to restore connection. Please try again.';
|
|
78
|
+
'connectionNotification.joining.text': 'Joining';
|
|
79
|
+
'connectionNotification.migrating.text': 'Migrating...';
|
|
80
|
+
'connectionNotification.offline.text': 'You are offline. Check your internet connection.';
|
|
81
|
+
'connectionNotification.reconnecting.text': 'Reconnecting...';
|
|
82
|
+
'deviceSettings.selectCamera.title': 'Select a Camera';
|
|
83
|
+
'deviceSettings.selectMic.title': 'Select a Mic';
|
|
84
|
+
'deviceSettings.selectSpeakers.title': 'Select Speakers';
|
|
85
|
+
'deviceSettings.speakerTest.stopTest.label': 'Stop test';
|
|
86
|
+
'deviceSettings.speakerTest.testSpeaker.label': 'Test speaker';
|
|
87
|
+
'deviceSettings.toggleDeviceMenu.title': 'Toggle device menu';
|
|
88
|
+
'joinError.couldNotConnect.text': "We couldn't connect to the server. Please check your connection and try again.";
|
|
89
|
+
'joinError.failedToJoin.title': 'Failed to join the call';
|
|
90
|
+
'livestream.backstage.participantsJoinedEarly.text_one': '{{ formattedCount }} participant joined early';
|
|
91
|
+
'livestream.backstage.participantsJoinedEarly.text_other': '{{ formattedCount }} participants joined early';
|
|
92
|
+
'livestream.backstage.startsAt.text': 'Livestream starts at {{ time }}';
|
|
93
|
+
'livestream.backstage.startsSoon.text': 'Livestream starts soon';
|
|
94
|
+
'livestreamHost.backstage.text': 'Backstage';
|
|
95
|
+
'livestreamHost.endLive.label': 'End Live';
|
|
96
|
+
'livestreamHost.endStream.title': 'End Stream';
|
|
97
|
+
'livestreamHost.enterBackstage.label': 'Enter Backstage';
|
|
98
|
+
'livestreamHost.goLive.label': 'Go Live';
|
|
99
|
+
'livestreamHost.prepareLivestream.title': 'Prepare your livestream';
|
|
100
|
+
'livestreamHost.readyToGoLive.title': 'Ready to go live';
|
|
101
|
+
'livestreamHost.startStream.title': 'Start Stream';
|
|
102
|
+
'livestreamViewer.lobby.joinAutomatically.text': 'Join automatically when stream starts';
|
|
103
|
+
'livestreamViewer.lobby.joinStream.label': 'Join Stream';
|
|
104
|
+
'livestreamViewer.lobby.streamReady.title': 'Stream is ready!';
|
|
105
|
+
'livestreamViewer.lobby.waitingForStart.title': 'Waiting for the livestream to start';
|
|
106
|
+
'lobby.deviceControls.permissionNeeded.label': 'Permission needed';
|
|
107
|
+
'lobby.join.label': 'Join';
|
|
108
|
+
'lobby.setUpYourCall.title': 'Set up your call before joining';
|
|
109
|
+
'lobby.videoPreviewFallbacks.grantBrowserPermission.text': 'Please grant your browser permission to access your camera and microphone.';
|
|
110
|
+
'notification.micCaptureError.text': 'Your microphone is not capturing audio. Please check your setup.';
|
|
111
|
+
'notification.recordingInProgress.text': 'Recording in progress...';
|
|
112
|
+
'notification.speakingWhileMuted.text': 'You are muted. Unmute to speak.';
|
|
113
|
+
'participantList.anonymousCount.text': ', and ({{ anonymousCount }}) anonymous';
|
|
114
|
+
'participantList.cameraOff.title': 'Camera off';
|
|
115
|
+
'participantList.cameraOn.title': 'Camera on';
|
|
116
|
+
'participantList.me.text': 'Me';
|
|
117
|
+
'participantList.microphoneOff.title': 'Microphone off';
|
|
118
|
+
'participantList.microphoneOn.title': 'Microphone on';
|
|
119
|
+
'participantList.muteAll.label': 'Mute all';
|
|
120
|
+
'participantList.noParticipantsFound.text': 'No participants found';
|
|
121
|
+
'participantList.pinned.title': 'Pinned';
|
|
122
|
+
'participantList.unknown.text': 'Unknown';
|
|
123
|
+
'participantView.actionsMenu.allowAudio.label': 'Allow audio';
|
|
124
|
+
'participantView.actionsMenu.allowScreenSharing.label': 'Allow screen sharing';
|
|
125
|
+
'participantView.actionsMenu.allowVideo.label': 'Allow video';
|
|
126
|
+
'participantView.actionsMenu.block.label': 'Block';
|
|
127
|
+
'participantView.actionsMenu.disableAudio.label': 'Disable audio';
|
|
128
|
+
'participantView.actionsMenu.disableScreenSharing.label': 'Disable screen sharing';
|
|
129
|
+
'participantView.actionsMenu.disableVideo.label': 'Disable video';
|
|
130
|
+
'participantView.actionsMenu.enterFullscreen.label': 'Enter fullscreen';
|
|
131
|
+
'participantView.actionsMenu.enterPip.label': 'Enter picture-in-picture';
|
|
132
|
+
'participantView.actionsMenu.kick.label': 'Kick';
|
|
133
|
+
'participantView.actionsMenu.leaveFullscreen.label': 'Leave fullscreen';
|
|
134
|
+
'participantView.actionsMenu.leavePip.label': 'Leave picture-in-picture';
|
|
135
|
+
'participantView.actionsMenu.muteAudio.label': 'Mute audio';
|
|
136
|
+
'participantView.actionsMenu.muteScreenShareAudio.label': 'Mute screen share audio';
|
|
137
|
+
'participantView.actionsMenu.pin.label': 'Pin';
|
|
138
|
+
'participantView.actionsMenu.pinForEveryone.label': 'Pin for everyone';
|
|
139
|
+
'participantView.actionsMenu.turnOffScreenShare.label': 'Turn off screen share';
|
|
140
|
+
'participantView.actionsMenu.turnOffVideo.label': 'Turn off video';
|
|
141
|
+
'participantView.actionsMenu.unpinForEveryone.label': 'Unpin for everyone';
|
|
142
|
+
'participantView.audioBlocked.description': 'Click or tap to play audio';
|
|
143
|
+
'participantView.audioBlocked.title': 'Audio is blocked by your system';
|
|
144
|
+
'participantView.audioConnecting.title': 'Audio is connecting...';
|
|
145
|
+
'participantView.connectionQuality.poor.text': 'Poor connection quality. Please check your internet connection.';
|
|
146
|
+
'participantView.moreOptions.title': 'More options';
|
|
147
|
+
'participantView.stopScreenSharing.label': 'Stop Screen Sharing';
|
|
148
|
+
'participantView.unpin.label': 'Unpin';
|
|
149
|
+
'participantView.videoConnecting.title': 'Video is connecting...';
|
|
150
|
+
'participantView.videoPausedInsufficientBandwidth.title': 'Video paused due to insufficient bandwidth';
|
|
151
|
+
'permissions.requestingCamera.text': '{{ userName }} is requesting to share their camera';
|
|
152
|
+
'permissions.requestingPermission.text': '{{ userName }} is requesting permission: {{ permission }}';
|
|
153
|
+
'permissions.requestingScreenShare.text': '{{ userName }} is requesting to present their screen';
|
|
154
|
+
'permissions.requestingToSpeak.text': '{{ userName }} is requesting to speak';
|
|
155
|
+
'ringingCall.callingState.joined.text': 'Joined';
|
|
156
|
+
'ringingCall.callingState.joining.text': 'Joining';
|
|
157
|
+
'ringingCall.callingState.left.text': 'Left call';
|
|
158
|
+
'ringingCall.callingState.migrating.text': 'Migrating';
|
|
159
|
+
'ringingCall.callingState.offline.text': 'No internet connection';
|
|
160
|
+
'ringingCall.callingState.reconnecting.text': 'Re-connecting';
|
|
161
|
+
'ringingCall.callingState.reconnectingFailed.text': 'Failed';
|
|
162
|
+
'ringingCall.callingState.ringing.text': 'Ringing';
|
|
163
|
+
'videoPlaceholder.videoPlayingInPopup.text': 'Video is playing in a popup';
|
|
164
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The SDK's bundled translation data: the keys that cannot carry an inline `defaultValue` at their
|
|
3
|
+
* call site. `Streami18n` layers it under *every* language, so a partial dictionary never knocks
|
|
4
|
+
* these out.
|
|
5
|
+
*
|
|
6
|
+
* Empty, and that is the intended steady state. The four lookups this SDK resolved from a runtime
|
|
7
|
+
* value — the only candidates for an entry here — are written as `switch` statements over literal
|
|
8
|
+
* `t()` calls instead, so every branch carries its own English copy inline and the codegen reads it
|
|
9
|
+
* straight off the call site. Nothing is left without a default. `timestamp.*` / `duration.*`
|
|
10
|
+
* formatter expressions would also live here; this SDK has none yet.
|
|
11
|
+
*
|
|
12
|
+
* Adding an entry later needs no wiring. `Streami18n` already spreads this into the core options and
|
|
13
|
+
* `scripts/generate-i18n-keys.mts` already reads this path, so a new key reaches `keys.ts` on the
|
|
14
|
+
* next `build-translations` run — where a key nothing references, or one that shadows an inline
|
|
15
|
+
* default, fails a codegen guard.
|
|
16
|
+
*/
|
|
17
|
+
export declare const runtimeDefaults: {};
|