@stream-io/video-react-sdk 0.3.41 → 0.3.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -1
  3. package/dist/index.cjs.js +2737 -0
  4. package/dist/index.cjs.js.map +1 -0
  5. package/dist/index.d.ts +0 -1
  6. package/dist/index.es.js +2633 -0
  7. package/dist/index.es.js.map +1 -0
  8. package/dist/src/components/Button/CompositeButton.d.ts +1 -1
  9. package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +1 -1
  10. package/dist/src/hooks/useFloatingUIPreset.d.ts +1 -1
  11. package/index.ts +3 -3
  12. package/package.json +17 -15
  13. package/src/components/Permissions/PermissionRequests.tsx +1 -1
  14. package/dist/index.js +0 -18
  15. package/dist/index.js.map +0 -1
  16. package/dist/src/components/Avatar/Avatar.js +0 -24
  17. package/dist/src/components/Avatar/Avatar.js.map +0 -1
  18. package/dist/src/components/Avatar/index.js +0 -2
  19. package/dist/src/components/Avatar/index.js.map +0 -1
  20. package/dist/src/components/Button/CompositeButton.js +0 -13
  21. package/dist/src/components/Button/CompositeButton.js.map +0 -1
  22. package/dist/src/components/Button/CopyToClipboardButton.js +0 -54
  23. package/dist/src/components/Button/CopyToClipboardButton.js.map +0 -1
  24. package/dist/src/components/Button/IconButton.js +0 -26
  25. package/dist/src/components/Button/IconButton.js.map +0 -1
  26. package/dist/src/components/Button/TextButton.js +0 -17
  27. package/dist/src/components/Button/TextButton.js.map +0 -1
  28. package/dist/src/components/Button/index.js +0 -5
  29. package/dist/src/components/Button/index.js.map +0 -1
  30. package/dist/src/components/CallControls/AcceptCallButton.js +0 -27
  31. package/dist/src/components/CallControls/AcceptCallButton.js.map +0 -1
  32. package/dist/src/components/CallControls/CallControls.js +0 -5
  33. package/dist/src/components/CallControls/CallControls.js.map +0 -1
  34. package/dist/src/components/CallControls/CallStatsButton.js +0 -8
  35. package/dist/src/components/CallControls/CallStatsButton.js.map +0 -1
  36. package/dist/src/components/CallControls/CancelCallButton.js +0 -27
  37. package/dist/src/components/CallControls/CancelCallButton.js.map +0 -1
  38. package/dist/src/components/CallControls/ReactionsButton.js +0 -45
  39. package/dist/src/components/CallControls/ReactionsButton.js.map +0 -1
  40. package/dist/src/components/CallControls/RecordCallButton.js +0 -22
  41. package/dist/src/components/CallControls/RecordCallButton.js.map +0 -1
  42. package/dist/src/components/CallControls/ScreenShareButton.js +0 -15
  43. package/dist/src/components/CallControls/ScreenShareButton.js.map +0 -1
  44. package/dist/src/components/CallControls/ToggleAudioButton.js +0 -24
  45. package/dist/src/components/CallControls/ToggleAudioButton.js.map +0 -1
  46. package/dist/src/components/CallControls/ToggleAudioOutputButton.js +0 -10
  47. package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +0 -1
  48. package/dist/src/components/CallControls/ToggleVideoButton.js +0 -24
  49. package/dist/src/components/CallControls/ToggleVideoButton.js.map +0 -1
  50. package/dist/src/components/CallControls/index.js +0 -11
  51. package/dist/src/components/CallControls/index.js.map +0 -1
  52. package/dist/src/components/CallParticipantsList/BlockedUserListing.js +0 -18
  53. package/dist/src/components/CallParticipantsList/BlockedUserListing.js.map +0 -1
  54. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js +0 -10
  55. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js.map +0 -1
  56. package/dist/src/components/CallParticipantsList/CallParticipantListing.js +0 -4
  57. package/dist/src/components/CallParticipantsList/CallParticipantListing.js.map +0 -1
  58. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +0 -128
  59. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js.map +0 -1
  60. package/dist/src/components/CallParticipantsList/CallParticipantsList.js +0 -83
  61. package/dist/src/components/CallParticipantsList/CallParticipantsList.js.map +0 -1
  62. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js +0 -7
  63. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +0 -1
  64. package/dist/src/components/CallParticipantsList/index.js +0 -4
  65. package/dist/src/components/CallParticipantsList/index.js.map +0 -1
  66. package/dist/src/components/CallPreview/CallPreview.js +0 -21
  67. package/dist/src/components/CallPreview/CallPreview.js.map +0 -1
  68. package/dist/src/components/CallPreview/index.js +0 -2
  69. package/dist/src/components/CallPreview/index.js.map +0 -1
  70. package/dist/src/components/CallRecordingList/CallRecordingList.js +0 -9
  71. package/dist/src/components/CallRecordingList/CallRecordingList.js.map +0 -1
  72. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js +0 -6
  73. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js.map +0 -1
  74. package/dist/src/components/CallRecordingList/CallRecordingListItem.js +0 -11
  75. package/dist/src/components/CallRecordingList/CallRecordingListItem.js.map +0 -1
  76. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js +0 -5
  77. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +0 -1
  78. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js +0 -7
  79. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +0 -1
  80. package/dist/src/components/CallRecordingList/index.js +0 -6
  81. package/dist/src/components/CallRecordingList/index.js.map +0 -1
  82. package/dist/src/components/CallStats/CallStats.js +0 -70
  83. package/dist/src/components/CallStats/CallStats.js.map +0 -1
  84. package/dist/src/components/CallStats/CallStatsLatencyChart.js +0 -39
  85. package/dist/src/components/CallStats/CallStatsLatencyChart.js.map +0 -1
  86. package/dist/src/components/CallStats/index.js +0 -3
  87. package/dist/src/components/CallStats/index.js.map +0 -1
  88. package/dist/src/components/Debug/DebugParticipantPublishQuality.js +0 -46
  89. package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +0 -1
  90. package/dist/src/components/Debug/DebugStatsView.js +0 -66
  91. package/dist/src/components/Debug/DebugStatsView.js.map +0 -1
  92. package/dist/src/components/Debug/useIsDebugMode.js +0 -18
  93. package/dist/src/components/Debug/useIsDebugMode.js.map +0 -1
  94. package/dist/src/components/DeviceSettings/DeviceSelector.js +0 -26
  95. package/dist/src/components/DeviceSettings/DeviceSelector.js.map +0 -1
  96. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +0 -20
  97. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +0 -1
  98. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +0 -11
  99. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +0 -1
  100. package/dist/src/components/DeviceSettings/DeviceSettings.js +0 -15
  101. package/dist/src/components/DeviceSettings/DeviceSettings.js.map +0 -1
  102. package/dist/src/components/DeviceSettings/index.js +0 -5
  103. package/dist/src/components/DeviceSettings/index.js.map +0 -1
  104. package/dist/src/components/Icon/Icon.js +0 -4
  105. package/dist/src/components/Icon/Icon.js.map +0 -1
  106. package/dist/src/components/Icon/index.js +0 -2
  107. package/dist/src/components/Icon/index.js.map +0 -1
  108. package/dist/src/components/LoadingIndicator/LoadingIndicator.js +0 -6
  109. package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +0 -1
  110. package/dist/src/components/LoadingIndicator/index.js +0 -2
  111. package/dist/src/components/LoadingIndicator/index.js.map +0 -1
  112. package/dist/src/components/Menu/GenericMenu.js +0 -20
  113. package/dist/src/components/Menu/GenericMenu.js.map +0 -1
  114. package/dist/src/components/Menu/MenuToggle.js +0 -40
  115. package/dist/src/components/Menu/MenuToggle.js.map +0 -1
  116. package/dist/src/components/Menu/index.js +0 -3
  117. package/dist/src/components/Menu/index.js.map +0 -1
  118. package/dist/src/components/Notification/Notification.js +0 -25
  119. package/dist/src/components/Notification/Notification.js.map +0 -1
  120. package/dist/src/components/Notification/PermissionNotification.js +0 -26
  121. package/dist/src/components/Notification/PermissionNotification.js.map +0 -1
  122. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +0 -50
  123. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +0 -1
  124. package/dist/src/components/Notification/index.js +0 -4
  125. package/dist/src/components/Notification/index.js.map +0 -1
  126. package/dist/src/components/Permissions/PermissionRequests.js +0 -122
  127. package/dist/src/components/Permissions/PermissionRequests.js.map +0 -1
  128. package/dist/src/components/Permissions/index.js +0 -2
  129. package/dist/src/components/Permissions/index.js.map +0 -1
  130. package/dist/src/components/Reaction/Reaction.js +0 -29
  131. package/dist/src/components/Reaction/Reaction.js.map +0 -1
  132. package/dist/src/components/Reaction/index.js +0 -2
  133. package/dist/src/components/Reaction/index.js.map +0 -1
  134. package/dist/src/components/RingingCall/RingingCall.js +0 -45
  135. package/dist/src/components/RingingCall/RingingCall.js.map +0 -1
  136. package/dist/src/components/RingingCall/RingingCallControls.js +0 -14
  137. package/dist/src/components/RingingCall/RingingCallControls.js.map +0 -1
  138. package/dist/src/components/RingingCall/index.js +0 -3
  139. package/dist/src/components/RingingCall/index.js.map +0 -1
  140. package/dist/src/components/Search/SearchInput.js +0 -34
  141. package/dist/src/components/Search/SearchInput.js.map +0 -1
  142. package/dist/src/components/Search/SearchResults.js +0 -12
  143. package/dist/src/components/Search/SearchResults.js.map +0 -1
  144. package/dist/src/components/Search/hooks/index.js +0 -2
  145. package/dist/src/components/Search/hooks/index.js.map +0 -1
  146. package/dist/src/components/Search/hooks/useSearch.js +0 -39
  147. package/dist/src/components/Search/hooks/useSearch.js.map +0 -1
  148. package/dist/src/components/Search/index.js +0 -3
  149. package/dist/src/components/Search/index.js.map +0 -1
  150. package/dist/src/components/StreamTheme/StreamTheme.js +0 -18
  151. package/dist/src/components/StreamTheme/StreamTheme.js.map +0 -1
  152. package/dist/src/components/StreamTheme/index.js +0 -2
  153. package/dist/src/components/StreamTheme/index.js.map +0 -1
  154. package/dist/src/components/Tooltip/Tooltip.js +0 -22
  155. package/dist/src/components/Tooltip/Tooltip.js.map +0 -1
  156. package/dist/src/components/Tooltip/WithTooltip.js +0 -23
  157. package/dist/src/components/Tooltip/WithTooltip.js.map +0 -1
  158. package/dist/src/components/Tooltip/hooks/index.js +0 -2
  159. package/dist/src/components/Tooltip/hooks/index.js.map +0 -1
  160. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +0 -14
  161. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +0 -1
  162. package/dist/src/components/Tooltip/index.js +0 -3
  163. package/dist/src/components/Tooltip/index.js.map +0 -1
  164. package/dist/src/components/Video/VideoPreview.js +0 -75
  165. package/dist/src/components/Video/VideoPreview.js.map +0 -1
  166. package/dist/src/components/Video/index.js +0 -5
  167. package/dist/src/components/Video/index.js.map +0 -1
  168. package/dist/src/components/index.js +0 -18
  169. package/dist/src/components/index.js.map +0 -1
  170. package/dist/src/core/components/Audio/Audio.js +0 -30
  171. package/dist/src/core/components/Audio/Audio.js.map +0 -1
  172. package/dist/src/core/components/Audio/ParticipantsAudio.js +0 -21
  173. package/dist/src/core/components/Audio/ParticipantsAudio.js.map +0 -1
  174. package/dist/src/core/components/Audio/index.js +0 -3
  175. package/dist/src/core/components/Audio/index.js.map +0 -1
  176. package/dist/src/core/components/CallLayout/LivestreamLayout.js +0 -89
  177. package/dist/src/core/components/CallLayout/LivestreamLayout.js.map +0 -1
  178. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +0 -47
  179. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +0 -1
  180. package/dist/src/core/components/CallLayout/SpeakerLayout.js +0 -71
  181. package/dist/src/core/components/CallLayout/SpeakerLayout.js.map +0 -1
  182. package/dist/src/core/components/CallLayout/hooks.js +0 -41
  183. package/dist/src/core/components/CallLayout/hooks.js.map +0 -1
  184. package/dist/src/core/components/CallLayout/index.js +0 -4
  185. package/dist/src/core/components/CallLayout/index.js.map +0 -1
  186. package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js +0 -48
  187. package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +0 -1
  188. package/dist/src/core/components/ParticipantView/ParticipantView.js +0 -54
  189. package/dist/src/core/components/ParticipantView/ParticipantView.js.map +0 -1
  190. package/dist/src/core/components/ParticipantView/index.js +0 -3
  191. package/dist/src/core/components/ParticipantView/index.js.map +0 -1
  192. package/dist/src/core/components/StreamCall/StreamCall.js +0 -7
  193. package/dist/src/core/components/StreamCall/StreamCall.js.map +0 -1
  194. package/dist/src/core/components/StreamCall/index.js +0 -2
  195. package/dist/src/core/components/StreamCall/index.js.map +0 -1
  196. package/dist/src/core/components/StreamVideo/StreamVideo.js +0 -7
  197. package/dist/src/core/components/StreamVideo/StreamVideo.js.map +0 -1
  198. package/dist/src/core/components/StreamVideo/index.js +0 -2
  199. package/dist/src/core/components/StreamVideo/index.js.map +0 -1
  200. package/dist/src/core/components/Video/BaseVideo.js +0 -48
  201. package/dist/src/core/components/Video/BaseVideo.js.map +0 -1
  202. package/dist/src/core/components/Video/DefaultVideoPlaceholder.js +0 -9
  203. package/dist/src/core/components/Video/DefaultVideoPlaceholder.js.map +0 -1
  204. package/dist/src/core/components/Video/Video.js +0 -82
  205. package/dist/src/core/components/Video/Video.js.map +0 -1
  206. package/dist/src/core/components/Video/index.js +0 -3
  207. package/dist/src/core/components/Video/index.js.map +0 -1
  208. package/dist/src/core/components/index.js +0 -7
  209. package/dist/src/core/components/index.js.map +0 -1
  210. package/dist/src/core/contexts/MediaDevicesContext.js +0 -178
  211. package/dist/src/core/contexts/MediaDevicesContext.js.map +0 -1
  212. package/dist/src/core/contexts/index.js +0 -2
  213. package/dist/src/core/contexts/index.js.map +0 -1
  214. package/dist/src/core/hooks/index.js +0 -5
  215. package/dist/src/core/hooks/index.js.map +0 -1
  216. package/dist/src/core/hooks/useAudioPublisher.js +0 -114
  217. package/dist/src/core/hooks/useAudioPublisher.js.map +0 -1
  218. package/dist/src/core/hooks/useCalculateHardLimit.js +0 -56
  219. package/dist/src/core/hooks/useCalculateHardLimit.js.map +0 -1
  220. package/dist/src/core/hooks/useDevices.js +0 -172
  221. package/dist/src/core/hooks/useDevices.js.map +0 -1
  222. package/dist/src/core/hooks/useTrackElementVisibility.js +0 -15
  223. package/dist/src/core/hooks/useTrackElementVisibility.js.map +0 -1
  224. package/dist/src/core/hooks/useVideoPublisher.js +0 -139
  225. package/dist/src/core/hooks/useVideoPublisher.js.map +0 -1
  226. package/dist/src/core/index.js +0 -4
  227. package/dist/src/core/index.js.map +0 -1
  228. package/dist/src/hooks/index.js +0 -8
  229. package/dist/src/hooks/index.js.map +0 -1
  230. package/dist/src/hooks/useFloatingUIPreset.js +0 -30
  231. package/dist/src/hooks/useFloatingUIPreset.js.map +0 -1
  232. package/dist/src/hooks/useRequestPermission.js +0 -46
  233. package/dist/src/hooks/useRequestPermission.js.map +0 -1
  234. package/dist/src/hooks/useScrollPosition.js +0 -63
  235. package/dist/src/hooks/useScrollPosition.js.map +0 -1
  236. package/dist/src/hooks/useToggleAudioMuteState.js +0 -34
  237. package/dist/src/hooks/useToggleAudioMuteState.js.map +0 -1
  238. package/dist/src/hooks/useToggleCallRecording.js +0 -44
  239. package/dist/src/hooks/useToggleCallRecording.js.map +0 -1
  240. package/dist/src/hooks/useToggleScreenShare.js +0 -38
  241. package/dist/src/hooks/useToggleScreenShare.js.map +0 -1
  242. package/dist/src/hooks/useToggleVideoMuteState.js +0 -34
  243. package/dist/src/hooks/useToggleVideoMuteState.js.map +0 -1
  244. package/dist/src/translations/en.json +0 -73
  245. package/dist/src/translations/index.js +0 -3
  246. package/dist/src/translations/index.js.map +0 -1
  247. package/dist/src/types/components.js +0 -2
  248. package/dist/src/types/components.js.map +0 -1
  249. package/dist/src/types/index.js +0 -2
  250. package/dist/src/types/index.js.map +0 -1
  251. package/dist/src/utilities/applyElementToRef.js +0 -8
  252. package/dist/src/utilities/applyElementToRef.js.map +0 -1
  253. package/dist/src/utilities/chunk.js +0 -5
  254. package/dist/src/utilities/chunk.js.map +0 -1
  255. package/dist/src/utilities/index.js +0 -4
  256. package/dist/src/utilities/index.js.map +0 -1
  257. package/dist/src/utilities/isComponentType.js +0 -7
  258. package/dist/src/utilities/isComponentType.js.map +0 -1
  259. package/dist/version.d.ts +0 -1
  260. package/dist/version.js +0 -2
  261. package/dist/version.js.map +0 -1
@@ -8,7 +8,7 @@ export type IconButtonWithMenuProps = PropsWithChildren<{
8
8
  }>;
9
9
  export declare const CompositeButton: import("react").ForwardRefExoticComponent<{
10
10
  active?: boolean | undefined;
11
- Menu?: JSX.Element | ComponentType<{}> | undefined;
11
+ Menu?: JSX.Element | ComponentType | undefined;
12
12
  caption?: string | undefined;
13
13
  menuPlacement?: Placement | undefined;
14
14
  } & {
@@ -48,7 +48,7 @@ export declare const ParticipantView: import("react").ForwardRefExoticComponent<
48
48
  * pass `null` if you wish to not render anything
49
49
  * @default DefaultParticipantViewUI
50
50
  */
51
- ParticipantViewUI?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ComponentType<{}> | null | undefined;
51
+ ParticipantViewUI?: ReactElement<any, string | import("react").JSXElementConstructor<any>> | ComponentType | null | undefined;
52
52
  /**
53
53
  * The kind of video stream to play for the given participant. The default value is `video`. You can use `none` if you're building an audio-only call.
54
54
  */
@@ -5,5 +5,5 @@ export declare const useFloatingUIPreset: ({ placement, strategy, }: Pick<UseFlo
5
5
  y: number | null;
6
6
  domReference: Element | null;
7
7
  floating: HTMLElement | null;
8
- strategy: import("@floating-ui/react").Strategy;
8
+ strategy: import("@floating-ui/utils").Strategy;
9
9
  };
package/index.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import { setSdkInfo, SfuModels } from '@stream-io/video-client';
2
- import { version } from './version';
3
2
 
4
3
  export * from '@stream-io/video-client';
5
4
  export * from '@stream-io/video-react-bindings';
6
- export * from '@stream-io/i18n';
7
5
 
8
6
  export * from './src/core';
9
7
 
@@ -17,7 +15,9 @@ export {
17
15
  useToggleVideoMuteState,
18
16
  } from './src/hooks';
19
17
 
20
- const [major, minor, patch] = version.split('.');
18
+ const [major, minor, patch] = (
19
+ process.env.PKG_VERSION || '0.0.0-development'
20
+ ).split('.');
21
21
 
22
22
  setSdkInfo({
23
23
  type: SfuModels.SdkType.REACT,
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "0.3.41",
3
+ "version": "0.3.43",
4
4
  "packageManager": "yarn@3.2.4",
5
- "main": "./dist/index.js",
5
+ "main": "./dist/index.cjs.js",
6
+ "module": "./dist/index.es.js",
6
7
  "types": "./dist/index.d.ts",
7
8
  "license": "See license in LICENSE",
8
9
  "scripts": {
9
- "postinstall": "yarn copy-version",
10
10
  "clean": "rimraf dist",
11
- "start": "yarn copy-version && tsc --project tsconfig.json --watch",
12
- "build": "yarn copy-version && tsc --project tsconfig.production.json && yarn copy-css",
11
+ "start": "rollup -c -w",
12
+ "build": "NODE_ENV=production rollup -c && yarn copy-css",
13
13
  "copy-css": "cp -R ../../node_modules/@stream-io/video-styling/dist/* dist/",
14
- "start:docs": "npx stream-chat-docusaurus -s",
15
- "copy-version": "echo \"export const version = '$npm_package_version';\" > ./version.ts"
14
+ "start:docs": "npx stream-chat-docusaurus -s"
16
15
  },
17
16
  "repository": {
18
17
  "type": "git",
@@ -32,10 +31,9 @@
32
31
  "@floating-ui/react": "^0.22.0",
33
32
  "@nivo/core": "^0.80.0",
34
33
  "@nivo/line": "^0.80.0",
35
- "@stream-io/i18n": "^0.1.2",
36
- "@stream-io/video-client": "^0.3.33",
37
- "@stream-io/video-react-bindings": "^0.2.34",
38
- "clsx": "^1.2.1",
34
+ "@stream-io/video-client": "^0.3.35",
35
+ "@stream-io/video-react-bindings": "^0.2.36",
36
+ "clsx": "^2.0.0",
39
37
  "prop-types": "^15.8.1",
40
38
  "rxjs": "~7.8.1"
41
39
  },
@@ -44,11 +42,15 @@
44
42
  "react-dom": "^18.0.0"
45
43
  },
46
44
  "devDependencies": {
47
- "@stream-io/video-styling": "^0.1.12",
48
- "@types/prop-types": "^15.7.5",
45
+ "@rollup/plugin-json": "^6.0.1",
46
+ "@rollup/plugin-replace": "^5.0.4",
47
+ "@rollup/plugin-typescript": "^11.1.5",
48
+ "@stream-io/video-styling": "^0.1.13",
49
+ "@types/prop-types": "^15.7.8",
49
50
  "react": "^18.2.0",
50
51
  "react-dom": "^18.2.0",
51
- "rimraf": "^5.0.1",
52
- "typescript": "^4.9.5"
52
+ "rimraf": "^5.0.5",
53
+ "rollup": "^3.29.4",
54
+ "typescript": "^5.2.2"
53
55
  }
54
56
  }
@@ -14,6 +14,7 @@ import {
14
14
  UserResponse,
15
15
  } from '@stream-io/video-client';
16
16
  import {
17
+ TranslatorFunction,
17
18
  useCall,
18
19
  useCallStateHooks,
19
20
  useHasPermissions,
@@ -22,7 +23,6 @@ import {
22
23
  import clsx from 'clsx';
23
24
 
24
25
  import { useFloatingUIPreset } from '../../hooks';
25
- import { TranslatorFunction } from '@stream-io/i18n';
26
26
 
27
27
  const byNameOrId = (a: UserResponse, b: UserResponse) => {
28
28
  if (a.name && b.name && a.name < b.name) return -1;
package/dist/index.js DELETED
@@ -1,18 +0,0 @@
1
- import { setSdkInfo, SfuModels } from '@stream-io/video-client';
2
- import { version } from './version';
3
- export * from '@stream-io/video-client';
4
- export * from '@stream-io/video-react-bindings';
5
- export * from '@stream-io/i18n';
6
- export * from './src/core';
7
- export * from './src/components';
8
- export * from './src/types';
9
- export * from './src/translations';
10
- export { useHorizontalScrollPosition, useVerticalScrollPosition, useToggleAudioMuteState, useToggleVideoMuteState, } from './src/hooks';
11
- const [major, minor, patch] = version.split('.');
12
- setSdkInfo({
13
- type: SfuModels.SdkType.REACT,
14
- major,
15
- minor,
16
- patch,
17
- });
18
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAEhC,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAEjD,UAAU,CAAC;IACT,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK;IAC7B,KAAK;IACL,KAAK;IACL,KAAK;CACN,CAAC,CAAC"}
@@ -1,24 +0,0 @@
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 clsx from 'clsx';
15
- export const Avatar = (_a) => {
16
- var { imageSrc, name, style, className } = _a, rest = __rest(_a, ["imageSrc", "name", "style", "className"]);
17
- const [error, setError] = useState(false);
18
- return (_jsxs(_Fragment, { children: [(!imageSrc || error) && name && (_jsx(AvatarFallback, { className: className, style: style, names: [name] })), imageSrc && !error && (_jsx("img", Object.assign({ onError: () => setError(true), alt: "avatar", className: clsx('str-video__avatar', className), src: imageSrc, style: style }, rest)))] }));
19
- };
20
- export const AvatarFallback = ({ className, names, style, }) => {
21
- var _a;
22
- return (_jsx("div", Object.assign({ className: clsx('str-video__avatar--initials-fallback', className), style: style }, { children: _jsxs("div", { children: [names[0][0], (_a = names[1]) === null || _a === void 0 ? void 0 : _a[0]] }) })));
23
- };
24
- //# sourceMappingURL=Avatar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAiC,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAMT,EAAE,EAAE;QANK,EACrB,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,OAEG,EADT,IAAI,cALc,0CAMtB,CADQ;IAEP,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE1C,OAAO,CACL,8BACG,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAC/B,KAAC,cAAc,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,GAAI,CACtE,EACA,QAAQ,IAAI,CAAC,KAAK,IAAI,CACrB,4BACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,GAAG,EAAC,QAAQ,EACZ,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,EAC/C,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,IAAI,EACR,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,SAAS,EACT,KAAK,EACL,KAAK,GACe,EAAE,EAAE;;IACxB,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CAAC,sCAAsC,EAAE,SAAS,CAAC,EAClE,KAAK,EAAE,KAAK,gBAEZ,0BACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACX,MAAA,KAAK,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,IACV,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './Avatar';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import clsx from 'clsx';
3
- import { MenuToggle } from '../Menu';
4
- import { forwardRef } from 'react';
5
- import { IconButton } from './IconButton';
6
- import { isComponentType } from '../../utilities';
7
- export const CompositeButton = forwardRef(({ caption, children, active, Menu, menuPlacement }, ref) => {
8
- return (_jsxs("div", Object.assign({ className: "str-video__composite-button", ref: ref }, { children: [_jsxs("div", Object.assign({ className: clsx('str-video__composite-button__button-group', {
9
- 'str-video__composite-button__button-group--active': active,
10
- }) }, { children: [children, Menu && (_jsx(MenuToggle, Object.assign({ placement: menuPlacement, ToggleButton: ToggleMenuButton }, { children: isComponentType(Menu) ? _jsx(Menu, {}) : Menu })))] })), caption && (_jsx("div", Object.assign({ className: "str-video__composite-button__caption" }, { children: caption })))] })));
11
- });
12
- const ToggleMenuButton = forwardRef(({ menuShown }, ref) => (_jsx(IconButton, { className: 'str-video__menu-toggle-button', icon: menuShown ? 'caret-down' : 'caret-up', title: "Toggle device menu", ref: ref })));
13
- //# sourceMappingURL=CompositeButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeButton.js","sourceRoot":"","sources":["../../../../src/components/Button/CompositeButton.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAyB,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAiB,UAAU,EAAqB,MAAM,OAAO,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASlD,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAGvC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE;IAC5D,OAAO,CACL,6BAAK,SAAS,EAAC,6BAA6B,EAAC,GAAG,EAAE,GAAG,iBACnD,6BACE,SAAS,EAAE,IAAI,CAAC,2CAA2C,EAAE;oBAC3D,mDAAmD,EAAE,MAAM;iBAC5D,CAAC,iBAED,QAAQ,EACR,IAAI,IAAI,CACP,KAAC,UAAU,kBAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,gBAAgB,gBACjE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAC,IAAI,KAAG,CAAC,CAAC,CAAC,IAAI,IAC7B,CACd,KACG,EACL,OAAO,IAAI,CACV,4BAAK,SAAS,EAAC,sCAAsC,gBAAE,OAAO,IAAO,CACtE,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtB,KAAC,UAAU,IACT,SAAS,EAAE,+BAA+B,EAC1C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EAC3C,KAAK,EAAC,oBAAoB,EAC1B,GAAG,EAAE,GAAG,GACR,CACH,CACF,CAAC"}
@@ -1,54 +0,0 @@
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 { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
22
- import { forwardRef, useCallback, useState, } from 'react';
23
- import clsx from 'clsx';
24
- import { Tooltip } from '../Tooltip';
25
- export const CopyToClipboardButton = forwardRef((_a, ref) => {
26
- var { Button, className, copyValue, onClick, onError, onSuccess } = _a, restProps = __rest(_a, ["Button", "className", "copyValue", "onClick", "onError", "onSuccess"]);
27
- const handleClick = useCallback((event) => __awaiter(void 0, void 0, void 0, function* () {
28
- if (onClick)
29
- onClick(event);
30
- const value = typeof copyValue === 'function' ? copyValue() : copyValue;
31
- try {
32
- yield (navigator === null || navigator === void 0 ? void 0 : navigator.clipboard.writeText(value));
33
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(event.target);
34
- }
35
- catch (error) {
36
- onError === null || onError === void 0 ? void 0 : onError(event.target, error);
37
- }
38
- }), [copyValue, onClick, onError, onSuccess]);
39
- const props = Object.assign(Object.assign({}, restProps), { ref: ref, className: clsx('str-video__copy-to-clipboard-button', className), onClick: handleClick });
40
- return Button ? _jsx(Button, Object.assign({}, props)) : _jsx("button", Object.assign({}, props));
41
- });
42
- export const CopyToClipboardButtonWithPopup = (_a) => {
43
- var { dismissAfterMs = 1500, onErrorMessage = 'Failed to copy', onSuccessMessage = 'Copied to clipboard', popupClassName, popupPlacement } = _a, restProps = __rest(_a, ["dismissAfterMs", "onErrorMessage", "onSuccessMessage", "popupClassName", "popupPlacement"]);
44
- const [tooltipText, setTooltipText] = useState('');
45
- const [tooltipAnchor, setTooltipAnchor] = useState(null);
46
- const setTemporaryPopup = useCallback((popupText) => {
47
- setTooltipText(popupText);
48
- setTimeout(() => setTooltipText(''), dismissAfterMs);
49
- }, [dismissAfterMs]);
50
- const onSuccess = useCallback(() => setTemporaryPopup(onSuccessMessage), [onSuccessMessage, setTemporaryPopup]);
51
- const onError = useCallback(() => setTemporaryPopup(onErrorMessage), [onErrorMessage, setTemporaryPopup]);
52
- return (_jsxs(_Fragment, { children: [_jsx(Tooltip, Object.assign({ tooltipClassName: clsx('str-video__copy-to-clipboard-button__popup', popupClassName), tooltipPlacement: popupPlacement, referenceElement: tooltipAnchor, visible: !!tooltipText }, { children: tooltipText })), _jsx(CopyToClipboardButton, Object.assign({}, restProps, { onError: onError, onSuccess: onSuccess, ref: setTooltipAnchor }))] }));
53
- };
54
- //# sourceMappingURL=CopyToClipboardButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CopyToClipboardButton.js","sourceRoot":"","sources":["../../../../src/components/Button/CopyToClipboardButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAKL,UAAU,EAEV,WAAW,EACX,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAerC,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAI7C,CACE,EAA2E,EAC3E,GAAG,EACH,EAAE;QAFF,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,OAAgB,EAAX,SAAS,cAAzE,uEAA2E,CAAF;IAGzE,MAAM,WAAW,GAAyC,WAAW,CACnE,CAAO,KAAK,EAAE,EAAE;QACd,IAAI,OAAO;YAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,KAAK,GAAG,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACxE,IAAI;YACF,MAAM,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA,CAAC;YAC5C,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAG,KAAK,CAAC,MAA2B,CAAC,CAAC;SAChD;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,MAA2B,EAAE,KAAc,CAAC,CAAC;SAC9D;IACH,CAAC,CAAA,EACD,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CACzC,CAAC;IAEF,MAAM,KAAK,mCACN,SAAS,KACZ,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAI,CAAC,qCAAqC,EAAE,SAAS,CAAC,EACjE,OAAO,EAAE,WAAW,GACrB,CAAC;IAEF,OAAO,MAAM,CAAC,CAAC,CAAC,KAAC,MAAM,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,iCAAY,KAAK,EAAI,CAAC;AAChE,CAAC,CACF,CAAC;AAiBF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAOT,EAAE,EAAE;QAPK,EAC7C,cAAc,GAAG,IAAI,EACrB,cAAc,GAAG,gBAAgB,EACjC,gBAAgB,GAAG,qBAAqB,EACxC,cAAc,EACd,cAAc,OAEsB,EADjC,SAAS,cANiC,4FAO9C,CADa;IAEZ,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAChD,IAAI,CACL,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,SAAiB,EAAE,EAAE;QACpB,cAAc,CAAC,SAAS,CAAC,CAAC;QAC1B,UAAU,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC,EACD,CAAC,cAAc,CAAC,CACjB,CAAC;IAEF,MAAM,SAAS,GAAG,WAAW,CAC3B,GAAG,EAAE,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EACzC,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CACtC,CAAC;IAEF,MAAM,OAAO,GAAG,WAAW,CACzB,GAAG,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,EACvC,CAAC,cAAc,EAAE,iBAAiB,CAAC,CACpC,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,OAAO,kBACN,gBAAgB,EAAE,IAAI,CACpB,4CAA4C,EAC5C,cAAc,CACf,EACD,gBAAgB,EAAE,cAAc,EAChC,gBAAgB,EAAE,aAAa,EAC/B,OAAO,EAAE,CAAC,CAAC,WAAW,gBAErB,WAAW,IACJ,EACV,KAAC,qBAAqB,oBAChB,SAAS,IACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,gBAAgB,IACrB,IACD,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -1,26 +0,0 @@
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 { forwardRef } from 'react';
14
- import clsx from 'clsx';
15
- import { Icon } from '../Icon';
16
- export const IconButton = forwardRef((props, ref) => {
17
- const { icon, enabled, variant, onClick, className } = props, rest = __rest(props, ["icon", "enabled", "variant", "onClick", "className"]);
18
- return (_jsx("button", Object.assign({ className: clsx('str-video__call-controls__button', className, {
19
- [`str-video__call-controls__button--variant-${variant}`]: variant,
20
- 'str-video__call-controls__button--enabled': enabled,
21
- }), onClick: (e) => {
22
- e.preventDefault();
23
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
24
- }, ref: ref }, rest, { children: _jsx(Icon, { icon: icon }) })));
25
- });
26
- //# sourceMappingURL=IconButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../../src/components/Button/IconButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAgC,UAAU,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,IAAI,EAAa,MAAM,SAAS,CAAC;AAQ1C,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,KAA0B,EAAE,GAAoC,EAAE,EAAE;IACnE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA/D,sDAAuD,CAAQ,CAAC;IACtE,OAAO,CACL,+BACE,SAAS,EAAE,IAAI,CAAC,kCAAkC,EAAE,SAAS,EAAE;YAC7D,CAAC,6CAA6C,OAAO,EAAE,CAAC,EAAE,OAAO;YACjE,2CAA2C,EAAE,OAAO;SACrD,CAAC,EACF,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,CAAC,CAAC,CAAC;QACf,CAAC,EACD,GAAG,EAAE,GAAG,IACJ,IAAI,cAER,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,IACb,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,17 +0,0 @@
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
- export const TextButton = (_a) => {
14
- var { children } = _a, rest = __rest(_a, ["children"]);
15
- return (_jsx("button", Object.assign({}, rest, { className: "str-video__text-button" }, { children: children })));
16
- };
17
- //# sourceMappingURL=TextButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextButton.js","sourceRoot":"","sources":["../../../../src/components/Button/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAG2B,EAAE,EAAE;QAH/B,EACzB,QAAQ,OAE4C,EADjD,IAAI,cAFkB,YAG1B,CADQ;IAEP,OAAO,CACL,iCAAY,IAAI,IAAE,SAAS,EAAC,wBAAwB,gBACjD,QAAQ,IACF,CACV,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export * from './CompositeButton';
2
- export * from './CopyToClipboardButton';
3
- export * from './IconButton';
4
- export * from './TextButton';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
@@ -1,27 +0,0 @@
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 { jsx as _jsx } from "react/jsx-runtime";
11
- import { useCallback } from 'react';
12
- import { IconButton } from '../Button';
13
- import { useCall } from '@stream-io/video-react-bindings';
14
- export const AcceptCallButton = ({ disabled, onAccept, onClick, }) => {
15
- const call = useCall();
16
- const handleClick = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
17
- if (onClick) {
18
- onClick(e);
19
- }
20
- else if (call) {
21
- yield call.join();
22
- onAccept === null || onAccept === void 0 ? void 0 : onAccept();
23
- }
24
- }), [onClick, onAccept, call]);
25
- return (_jsx(IconButton, { disabled: disabled, icon: "call-accept", variant: "success", onClick: handleClick }));
26
- };
27
- //# sourceMappingURL=AcceptCallButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AcceptCallButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/AcceptCallButton.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAQ1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,QAAQ,EACR,OAAO,GACe,EAAE,EAAE;IAC1B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,WAAW,GAAyC,WAAW,CACnE,CAAO,CAAC,EAAE,EAAE;QACV,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;aAAM,IAAI,IAAI,EAAE;YACf,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,EAAI,CAAC;SACd;IACH,CAAC,CAAA,EACD,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAC1B,CAAC;IACF,OAAO,CACL,KAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,aAAa,EAClB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CallStatsButton, CancelCallButton, RecordCallButton, ScreenShareButton, ToggleAudioPublishingButton, ToggleVideoPublishingButton, } from './index';
3
- import { SpeakingWhileMutedNotification } from '../Notification';
4
- export const CallControls = ({ onLeave }) => (_jsxs("div", Object.assign({ className: "str-video__call-controls" }, { children: [_jsx(RecordCallButton, {}), _jsx(CallStatsButton, {}), _jsx(ScreenShareButton, {}), _jsx(SpeakingWhileMutedNotification, { children: _jsx(ToggleAudioPublishingButton, {}) }), _jsx(ToggleVideoPublishingButton, {}), _jsx(CancelCallButton, { onLeave: onLeave })] })));
5
- //# sourceMappingURL=CallControls.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../src/components/CallControls/CallControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAMjE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAqB,EAAE,EAAE,CAAC,CAC9D,6BAAK,SAAS,EAAC,0BAA0B,iBACvC,KAAC,gBAAgB,KAAG,EACpB,KAAC,eAAe,KAAG,EACnB,KAAC,iBAAiB,KAAG,EACrB,KAAC,8BAA8B,cAC7B,KAAC,2BAA2B,KAAG,GACA,EACjC,KAAC,2BAA2B,KAAG,EAC/B,KAAC,gBAAgB,IAAC,OAAO,EAAE,OAAO,GAAI,KAClC,CACP,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import { CallStats } from '../CallStats';
4
- import { CompositeButton, IconButton } from '../Button/';
5
- import { MenuToggle } from '../Menu';
6
- export const CallStatsButton = () => (_jsx(MenuToggle, Object.assign({ placement: "top-end", ToggleButton: ToggleMenuButton }, { children: _jsx(CallStats, {}) })));
7
- const ToggleMenuButton = forwardRef(({ menuShown }, ref) => (_jsx(CompositeButton, Object.assign({ ref: ref, active: menuShown, caption: 'Stats' }, { children: _jsx(IconButton, { icon: "stats", title: "Statistics" }) }))));
8
- //# sourceMappingURL=CallStatsButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallStatsButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/CallStatsButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,UAAU,EAAyB,MAAM,SAAS,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,CACnC,KAAC,UAAU,kBAAC,SAAS,EAAC,SAAS,EAAC,YAAY,EAAE,gBAAgB,gBAC5D,KAAC,SAAS,KAAG,IACF,CACd,CAAC;AAEF,MAAM,gBAAgB,GAAG,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACxB,KAAC,eAAe,kBAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,gBAC5D,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,YAAY,GAAG,IAC9B,CACnB,CAAC,CAAC"}
@@ -1,27 +0,0 @@
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 { jsx as _jsx } from "react/jsx-runtime";
11
- import { useCallback } from 'react';
12
- import { IconButton } from '../Button/';
13
- import { useCall } from '@stream-io/video-react-bindings';
14
- export const CancelCallButton = ({ disabled, onClick, onLeave, }) => {
15
- const call = useCall();
16
- const handleClick = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
17
- if (onClick) {
18
- onClick(e);
19
- }
20
- else if (call) {
21
- yield call.leave();
22
- onLeave === null || onLeave === void 0 ? void 0 : onLeave();
23
- }
24
- }), [onClick, onLeave, call]);
25
- return (_jsx(IconButton, { disabled: disabled, icon: "call-end", variant: "danger", onClick: handleClick }));
26
- };
27
- //# sourceMappingURL=CancelCallButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CancelCallButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/CancelCallButton.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAQ1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,QAAQ,EACR,OAAO,EACP,OAAO,GACe,EAAE,EAAE;IAC1B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,WAAW,GAAyC,WAAW,CACnE,CAAO,CAAC,EAAE,EAAE;QACV,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,CAAC,CAAC,CAAC;SACZ;aAAM,IAAI,IAAI,EAAE;YACf,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,aAAP,OAAO,uBAAP,OAAO,EAAI,CAAC;SACb;IACH,CAAC,CAAA,EACD,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CACzB,CAAC;IACF,OAAO,CACL,KAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAC,UAAU,EACf,OAAO,EAAC,QAAQ,EAChB,OAAO,EAAE,WAAW,GACpB,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -1,45 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { OwnCapability } from '@stream-io/video-client';
3
- import { Restricted, useCall, useI18n } from '@stream-io/video-react-bindings';
4
- import { CompositeButton, IconButton } from '../Button';
5
- import { defaultEmojiReactionMap } from '../Reaction';
6
- export const defaultReactions = [
7
- {
8
- type: 'reaction',
9
- emoji_code: ':like:',
10
- },
11
- {
12
- // TODO OL: use `prompt` type?
13
- type: 'raised-hand',
14
- emoji_code: ':raise-hand:',
15
- },
16
- {
17
- type: 'reaction',
18
- emoji_code: ':fireworks:',
19
- },
20
- {
21
- type: 'reaction',
22
- emoji_code: ':dislike:',
23
- },
24
- {
25
- type: 'reaction',
26
- emoji_code: ':heart:',
27
- },
28
- {
29
- type: 'reaction',
30
- emoji_code: ':smile:',
31
- },
32
- ];
33
- export const ReactionsButton = ({ reactions = defaultReactions, }) => {
34
- const { t } = useI18n();
35
- return (_jsx(Restricted, Object.assign({ requiredGrants: [OwnCapability.CREATE_REACTION] }, { children: _jsx(CompositeButton, Object.assign({ active: false, caption: t('Reactions'), menuPlacement: "top-start", Menu: _jsx(DefaultReactionsMenu, { reactions: reactions }) }, { children: _jsx(IconButton, { icon: "reactions", title: t('Reactions'), onClick: () => {
36
- console.log('Reactions');
37
- } }) })) })));
38
- };
39
- export const DefaultReactionsMenu = ({ reactions, }) => {
40
- const call = useCall();
41
- return (_jsx("div", Object.assign({ className: "str-video__reactions-menu" }, { children: reactions.map((reaction) => (_jsx("button", Object.assign({ type: "button", className: "str-video__reactions-menu__button", onClick: () => {
42
- call === null || call === void 0 ? void 0 : call.sendReaction(reaction);
43
- } }, { children: reaction.emoji_code && defaultEmojiReactionMap[reaction.emoji_code] }), reaction.emoji_code))) })));
44
- };
45
- //# sourceMappingURL=ReactionsButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReactionsButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/ReactionsButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAChD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,QAAQ;KACrB;IACD;QACE,8BAA8B;QAC9B,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE,cAAc;KAC3B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,aAAa;KAC1B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,WAAW;KACxB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,SAAS;KACtB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,SAAS;KACtB;CACF,CAAC;AAMF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,GAAG,gBAAgB,GACP,EAAE,EAAE;IACzB,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IAExB,OAAO,CACL,KAAC,UAAU,kBAAC,cAAc,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,gBACzD,KAAC,eAAe,kBACd,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,EACvB,aAAa,EAAC,WAAW,EACzB,IAAI,EAAE,KAAC,oBAAoB,IAAC,SAAS,EAAE,SAAS,GAAI,gBAEpD,KAAC,UAAU,IACT,IAAI,EAAC,WAAW,EAChB,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,EACrB,OAAO,EAAE,GAAG,EAAE;oBACZ,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;gBAC3B,CAAC,GACD,IACc,IACP,CACd,CAAC;AACJ,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,SAAS,GACiB,EAAE,EAAE;IAC9B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,OAAO,CACL,4BAAK,SAAS,EAAC,2BAA2B,gBACvC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAC3B,+BAEE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,mCAAmC,EAC7C,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;YAC/B,CAAC,gBAEA,QAAQ,CAAC,UAAU,IAAI,uBAAuB,CAAC,QAAQ,CAAC,UAAU,CAAC,KAP/D,QAAQ,CAAC,UAAU,CAQjB,CACV,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { OwnCapability } from '@stream-io/video-client';
3
- import { Restricted, useCall, useI18n } from '@stream-io/video-react-bindings';
4
- import { CompositeButton, IconButton } from '../Button/';
5
- import { LoadingIndicator } from '../LoadingIndicator';
6
- import { useToggleCallRecording } from '../../hooks/useToggleCallRecording';
7
- export const RecordCallButton = ({ caption = 'Record', }) => {
8
- const call = useCall();
9
- const { t } = useI18n();
10
- const { toggleCallRecording, isAwaitingResponse, isCallRecordingInProgress } = useToggleCallRecording();
11
- return (_jsx(Restricted, Object.assign({ requiredGrants: [
12
- OwnCapability.START_RECORD_CALL,
13
- OwnCapability.STOP_RECORD_CALL,
14
- ] }, { children: _jsx(CompositeButton, Object.assign({ active: isCallRecordingInProgress, caption: caption }, { children: isAwaitingResponse ? (_jsx(LoadingIndicator, { tooltip: isCallRecordingInProgress
15
- ? t('Waiting for recording to stop...')
16
- : t('Waiting for recording to start...') })) : (_jsx(IconButton
17
- // FIXME OL: sort out this ambiguity
18
- , {
19
- // FIXME OL: sort out this ambiguity
20
- enabled: !!call, disabled: !call, icon: isCallRecordingInProgress ? 'recording-on' : 'recording-off', title: t('Record call'), onClick: toggleCallRecording })) })) })));
21
- };
22
- //# sourceMappingURL=RecordCallButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RecordCallButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/RecordCallButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAM5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,OAAO,GAAG,QAAQ,GACI,EAAE,EAAE;IAC1B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,GAC1E,sBAAsB,EAAE,CAAC;IAE3B,OAAO,CACL,KAAC,UAAU,kBACT,cAAc,EAAE;YACd,aAAa,CAAC,iBAAiB;YAC/B,aAAa,CAAC,gBAAgB;SAC/B,gBAED,KAAC,eAAe,kBAAC,MAAM,EAAE,yBAAyB,EAAE,OAAO,EAAE,OAAO,gBACjE,kBAAkB,CAAC,CAAC,CAAC,CACpB,KAAC,gBAAgB,IACf,OAAO,EACL,yBAAyB;oBACvB,CAAC,CAAC,CAAC,CAAC,kCAAkC,CAAC;oBACvC,CAAC,CAAC,CAAC,CAAC,mCAAmC,CAAC,GAE5C,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU;YACT,oCAAoC;;gBAApC,oCAAoC;gBACpC,OAAO,EAAE,CAAC,CAAC,IAAI,EACf,QAAQ,EAAE,CAAC,IAAI,EACf,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,EAClE,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,EACvB,OAAO,EAAE,mBAAmB,GAC5B,CACH,IACe,IACP,CACd,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { OwnCapability } from '@stream-io/video-client';
3
- import { Restricted, useCall, useCallStateHooks, useI18n, } from '@stream-io/video-react-bindings';
4
- import { CompositeButton, IconButton } from '../Button/';
5
- import { PermissionNotification } from '../Notification';
6
- import { useToggleScreenShare } from '../../hooks';
7
- export const ScreenShareButton = ({ caption = 'Screen Share', }) => {
8
- const call = useCall();
9
- const { useHasOngoingScreenShare } = useCallStateHooks();
10
- const isSomeoneScreenSharing = useHasOngoingScreenShare();
11
- const { t } = useI18n();
12
- const { toggleScreenShare, isAwaitingPermission, isScreenSharing } = useToggleScreenShare();
13
- return (_jsx(Restricted, Object.assign({ requiredGrants: [OwnCapability.SCREENSHARE] }, { children: _jsx(PermissionNotification, Object.assign({ permission: OwnCapability.SCREENSHARE, isAwaitingApproval: isAwaitingPermission, messageApproved: t('You can now share your screen.'), messageAwaitingApproval: t('Awaiting for an approval to share screen.'), messageRevoked: t('You can no longer share your screen.') }, { children: _jsx(CompositeButton, Object.assign({ active: isSomeoneScreenSharing, caption: caption }, { children: _jsx(IconButton, { icon: isScreenSharing ? 'screen-share-on' : 'screen-share-off', title: t('Share screen'), disabled: (!isScreenSharing && isSomeoneScreenSharing) || !call, onClick: toggleScreenShare }) })) })) })));
14
- };
15
- //# sourceMappingURL=ScreenShareButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScreenShareButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/ScreenShareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,OAAO,GACR,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAMnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,OAAO,GAAG,cAAc,GACD,EAAE,EAAE;IAC3B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,wBAAwB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACzD,MAAM,sBAAsB,GAAG,wBAAwB,EAAE,CAAC;IAE1D,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,GAChE,oBAAoB,EAAE,CAAC;IAEzB,OAAO,CACL,KAAC,UAAU,kBAAC,cAAc,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,gBACrD,KAAC,sBAAsB,kBACrB,UAAU,EAAE,aAAa,CAAC,WAAW,EACrC,kBAAkB,EAAE,oBAAoB,EACxC,eAAe,EAAE,CAAC,CAAC,gCAAgC,CAAC,EACpD,uBAAuB,EAAE,CAAC,CAAC,2CAA2C,CAAC,EACvE,cAAc,EAAE,CAAC,CAAC,sCAAsC,CAAC,gBAEzD,KAAC,eAAe,kBAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,gBAC/D,KAAC,UAAU,IACT,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC9D,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC,EACxB,QAAQ,EAAE,CAAC,CAAC,eAAe,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,EAC/D,OAAO,EAAE,iBAAiB,GAC1B,IACc,IACK,IACd,CACd,CAAC;AACJ,CAAC,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { OwnCapability, SfuModels } from '@stream-io/video-client';
3
- import { Restricted, useCallStateHooks, useI18n, } from '@stream-io/video-react-bindings';
4
- import { useMediaDevices } from '../../core';
5
- import { DeviceSelectorAudioInput } from '../DeviceSettings';
6
- import { CompositeButton, IconButton } from '../Button';
7
- import { PermissionNotification } from '../Notification';
8
- import { useToggleAudioMuteState } from '../../hooks';
9
- export const ToggleAudioPreviewButton = (props) => {
10
- const { initialAudioEnabled, toggleInitialAudioMuteState } = useMediaDevices();
11
- const { t } = useI18n();
12
- const { caption = t('Mic'), Menu = DeviceSelectorAudioInput } = props;
13
- return (_jsx(CompositeButton, Object.assign({ Menu: Menu, active: !initialAudioEnabled, caption: caption || t('Mic') }, { children: _jsx(IconButton, { icon: initialAudioEnabled ? 'mic' : 'mic-off', onClick: toggleInitialAudioMuteState }) })));
14
- };
15
- export const ToggleAudioPublishingButton = (props) => {
16
- const { useLocalParticipant } = useCallStateHooks();
17
- const localParticipant = useLocalParticipant();
18
- const { t } = useI18n();
19
- const { caption = t('Mic'), Menu = DeviceSelectorAudioInput } = props;
20
- const isAudioMute = !(localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.publishedTracks.includes(SfuModels.TrackType.AUDIO));
21
- const { toggleAudioMuteState: handleClick, isAwaitingPermission } = useToggleAudioMuteState();
22
- return (_jsx(Restricted, Object.assign({ requiredGrants: [OwnCapability.SEND_AUDIO] }, { children: _jsx(PermissionNotification, Object.assign({ permission: OwnCapability.SEND_AUDIO, isAwaitingApproval: isAwaitingPermission, messageApproved: t('You can now speak.'), messageAwaitingApproval: t('Awaiting for an approval to speak.'), messageRevoked: t('You can no longer speak.') }, { children: _jsx(CompositeButton, Object.assign({ Menu: Menu, active: isAudioMute, caption: caption }, { children: _jsx(IconButton, { icon: isAudioMute ? 'mic-off' : 'mic', onClick: handleClick }) })) })) })));
23
- };
24
- //# sourceMappingURL=ToggleAudioButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToggleAudioButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/ToggleAudioButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,OAAO,GACR,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAOtD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,KAAoC,EACpC,EAAE;IACF,MAAM,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,GACxD,eAAe,EAAE,CAAC;IACpB,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,wBAAwB,EAAE,GAAG,KAAK,CAAC;IAEtE,OAAO,CACL,KAAC,eAAe,kBACd,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,mBAAmB,EAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,gBAE5B,KAAC,UAAU,IACT,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAC7C,OAAO,EAAE,2BAA2B,GACpC,IACc,CACnB,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,KAAuC,EACvC,EAAE;IACF,MAAM,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACpD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IAExB,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,wBAAwB,EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,WAAW,GAAG,CAAC,CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,eAAe,CAAC,QAAQ,CAC7D,SAAS,CAAC,SAAS,CAAC,KAAK,CAC1B,CAAA,CAAC;IAEF,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAC/D,uBAAuB,EAAE,CAAC;IAE5B,OAAO,CACL,KAAC,UAAU,kBAAC,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,gBACpD,KAAC,sBAAsB,kBACrB,UAAU,EAAE,aAAa,CAAC,UAAU,EACpC,kBAAkB,EAAE,oBAAoB,EACxC,eAAe,EAAE,CAAC,CAAC,oBAAoB,CAAC,EACxC,uBAAuB,EAAE,CAAC,CAAC,oCAAoC,CAAC,EAChE,cAAc,EAAE,CAAC,CAAC,0BAA0B,CAAC,gBAE7C,KAAC,eAAe,kBAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,gBAChE,KAAC,UAAU,IACT,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,EACrC,OAAO,EAAE,WAAW,GACpB,IACc,IACK,IACd,CACd,CAAC;AACJ,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { CompositeButton, IconButton } from '../Button';
3
- import { DeviceSelectorAudioOutput } from '../DeviceSettings';
4
- import { useI18n } from '@stream-io/video-react-bindings';
5
- export const ToggleAudioOutputButton = (props) => {
6
- const { t } = useI18n();
7
- const { caption = t('Speakers'), Menu = DeviceSelectorAudioOutput } = props;
8
- return (_jsx(CompositeButton, Object.assign({ Menu: Menu, active: true, caption: caption }, { children: _jsx(IconButton, { icon: "speaker" }) })));
9
- };
10
- //# sourceMappingURL=ToggleAudioOutputButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToggleAudioOutputButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/ToggleAudioOutputButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAQ1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,KAAmC,EACnC,EAAE;IACF,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,IAAI,GAAG,yBAAyB,EAAE,GAAG,KAAK,CAAC;IAE5E,OAAO,CACL,KAAC,eAAe,kBAAC,IAAI,EAAE,IAAI,EAAE,MAAM,QAAC,OAAO,EAAE,OAAO,gBAClD,KAAC,UAAU,IAAC,IAAI,EAAC,SAAS,GAAG,IACb,CACnB,CAAC;AACJ,CAAC,CAAC"}