@stream-io/video-react-sdk 0.0.1-alpha.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/LICENSE +219 -0
  3. package/README.md +5 -0
  4. package/dist/css/styles.css +2244 -0
  5. package/dist/css/styles.css.map +1 -0
  6. package/dist/index.d.ts +6 -0
  7. package/dist/index.js +15 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/components/Avatar/Avatar.d.ts +14 -0
  10. package/dist/src/components/Avatar/Avatar.js +11 -0
  11. package/dist/src/components/Avatar/Avatar.js.map +1 -0
  12. package/dist/src/components/Avatar/index.d.ts +1 -0
  13. package/dist/src/components/Avatar/index.js +2 -0
  14. package/dist/src/components/Avatar/index.js.map +1 -0
  15. package/dist/src/components/Button/CompositeButton.d.ts +16 -0
  16. package/dist/src/components/Button/CompositeButton.js +13 -0
  17. package/dist/src/components/Button/CompositeButton.js.map +1 -0
  18. package/dist/src/components/Button/CopyToClipboardButton.d.ts +27 -0
  19. package/dist/src/components/Button/CopyToClipboardButton.js +54 -0
  20. package/dist/src/components/Button/CopyToClipboardButton.js.map +1 -0
  21. package/dist/src/components/Button/IconButton.d.ts +7 -0
  22. package/dist/src/components/Button/IconButton.js +26 -0
  23. package/dist/src/components/Button/IconButton.js.map +1 -0
  24. package/dist/src/components/Button/TextButton.d.ts +2 -0
  25. package/dist/src/components/Button/TextButton.js +17 -0
  26. package/dist/src/components/Button/TextButton.js.map +1 -0
  27. package/dist/src/components/Button/index.d.ts +4 -0
  28. package/dist/src/components/Button/index.js +5 -0
  29. package/dist/src/components/Button/index.js.map +1 -0
  30. package/dist/src/components/CallControls/AcceptCallButton.d.ts +7 -0
  31. package/dist/src/components/CallControls/AcceptCallButton.js +27 -0
  32. package/dist/src/components/CallControls/AcceptCallButton.js.map +1 -0
  33. package/dist/src/components/CallControls/CallControls.d.ts +5 -0
  34. package/dist/src/components/CallControls/CallControls.js +5 -0
  35. package/dist/src/components/CallControls/CallControls.js.map +1 -0
  36. package/dist/src/components/CallControls/CallStatsButton.d.ts +2 -0
  37. package/dist/src/components/CallControls/CallStatsButton.js +8 -0
  38. package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
  39. package/dist/src/components/CallControls/CancelCallButton.d.ts +7 -0
  40. package/dist/src/components/CallControls/CancelCallButton.js +27 -0
  41. package/dist/src/components/CallControls/CancelCallButton.js.map +1 -0
  42. package/dist/src/components/CallControls/ReactionsButton.d.ts +11 -0
  43. package/dist/src/components/CallControls/ReactionsButton.js +32 -0
  44. package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
  45. package/dist/src/components/CallControls/RecordCallButton.d.ts +5 -0
  46. package/dist/src/components/CallControls/RecordCallButton.js +55 -0
  47. package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
  48. package/dist/src/components/CallControls/ScreenShareButton.d.ts +5 -0
  49. package/dist/src/components/CallControls/ScreenShareButton.js +54 -0
  50. package/dist/src/components/CallControls/ScreenShareButton.js.map +1 -0
  51. package/dist/src/components/CallControls/ToggleAudioButton.d.ts +9 -0
  52. package/dist/src/components/CallControls/ToggleAudioButton.js +73 -0
  53. package/dist/src/components/CallControls/ToggleAudioButton.js.map +1 -0
  54. package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +5 -0
  55. package/dist/src/components/CallControls/ToggleAudioOutputButton.js +9 -0
  56. package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
  57. package/dist/src/components/CallControls/ToggleVideoButton.d.ts +10 -0
  58. package/dist/src/components/CallControls/ToggleVideoButton.js +70 -0
  59. package/dist/src/components/CallControls/ToggleVideoButton.js.map +1 -0
  60. package/dist/src/components/CallControls/index.d.ts +10 -0
  61. package/dist/src/components/CallControls/index.js +11 -0
  62. package/dist/src/components/CallControls/index.js.map +1 -0
  63. package/dist/src/components/CallParticipantsList/BlockedUserListing.d.ts +4 -0
  64. package/dist/src/components/CallParticipantsList/BlockedUserListing.js +18 -0
  65. package/dist/src/components/CallParticipantsList/BlockedUserListing.js.map +1 -0
  66. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.d.ts +6 -0
  67. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js +7 -0
  68. package/dist/src/components/CallParticipantsList/CallParticipantListHeader.js.map +1 -0
  69. package/dist/src/components/CallParticipantsList/CallParticipantListing.d.ts +8 -0
  70. package/dist/src/components/CallParticipantsList/CallParticipantListing.js +4 -0
  71. package/dist/src/components/CallParticipantsList/CallParticipantListing.js.map +1 -0
  72. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.d.ts +16 -0
  73. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +85 -0
  74. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js.map +1 -0
  75. package/dist/src/components/CallParticipantsList/CallParticipantsList.d.ts +15 -0
  76. package/dist/src/components/CallParticipantsList/CallParticipantsList.js +81 -0
  77. package/dist/src/components/CallParticipantsList/CallParticipantsList.js.map +1 -0
  78. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.d.ts +2 -0
  79. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js +5 -0
  80. package/dist/src/components/CallParticipantsList/EmptyParticipantSearchList.js.map +1 -0
  81. package/dist/src/components/CallParticipantsList/index.d.ts +3 -0
  82. package/dist/src/components/CallParticipantsList/index.js +4 -0
  83. package/dist/src/components/CallParticipantsList/index.js.map +1 -0
  84. package/dist/src/components/CallRecordingList/CallRecordingList.d.ts +20 -0
  85. package/dist/src/components/CallRecordingList/CallRecordingList.js +9 -0
  86. package/dist/src/components/CallRecordingList/CallRecordingList.js.map +1 -0
  87. package/dist/src/components/CallRecordingList/CallRecordingListHeader.d.ts +7 -0
  88. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js +8 -0
  89. package/dist/src/components/CallRecordingList/CallRecordingListHeader.js.map +1 -0
  90. package/dist/src/components/CallRecordingList/CallRecordingListItem.d.ts +7 -0
  91. package/dist/src/components/CallRecordingList/CallRecordingListItem.js +11 -0
  92. package/dist/src/components/CallRecordingList/CallRecordingListItem.js.map +1 -0
  93. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.d.ts +2 -0
  94. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js +5 -0
  95. package/dist/src/components/CallRecordingList/EmptyCallRecordingListing.js.map +1 -0
  96. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.d.ts +7 -0
  97. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js +7 -0
  98. package/dist/src/components/CallRecordingList/LoadingCallRecordingListing.js.map +1 -0
  99. package/dist/src/components/CallRecordingList/index.d.ts +5 -0
  100. package/dist/src/components/CallRecordingList/index.js +6 -0
  101. package/dist/src/components/CallRecordingList/index.js.map +1 -0
  102. package/dist/src/components/CallStats/CallStats.d.ts +6 -0
  103. package/dist/src/components/CallStats/CallStats.js +69 -0
  104. package/dist/src/components/CallStats/CallStats.js.map +1 -0
  105. package/dist/src/components/CallStats/CallStatsLatencyChart.d.ts +7 -0
  106. package/dist/src/components/CallStats/CallStatsLatencyChart.js +39 -0
  107. package/dist/src/components/CallStats/CallStatsLatencyChart.js.map +1 -0
  108. package/dist/src/components/CallStats/index.d.ts +2 -0
  109. package/dist/src/components/CallStats/index.js +3 -0
  110. package/dist/src/components/CallStats/index.js.map +1 -0
  111. package/dist/src/components/Debug/DebugParticipantPublishQuality.d.ts +6 -0
  112. package/dist/src/components/Debug/DebugParticipantPublishQuality.js +46 -0
  113. package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +1 -0
  114. package/dist/src/components/Debug/DebugStatsView.d.ts +7 -0
  115. package/dist/src/components/Debug/DebugStatsView.js +51 -0
  116. package/dist/src/components/Debug/DebugStatsView.js.map +1 -0
  117. package/dist/src/components/Debug/useIsDebugMode.d.ts +5 -0
  118. package/dist/src/components/Debug/useIsDebugMode.js +18 -0
  119. package/dist/src/components/Debug/useIsDebugMode.js.map +1 -0
  120. package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +7 -0
  121. package/dist/src/components/DeviceSettings/DeviceSelector.js +26 -0
  122. package/dist/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
  123. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +9 -0
  124. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +20 -0
  125. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
  126. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +5 -0
  127. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +11 -0
  128. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
  129. package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +2 -0
  130. package/dist/src/components/DeviceSettings/DeviceSettings.js +15 -0
  131. package/dist/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
  132. package/dist/src/components/DeviceSettings/index.d.ts +4 -0
  133. package/dist/src/components/DeviceSettings/index.js +5 -0
  134. package/dist/src/components/DeviceSettings/index.js.map +1 -0
  135. package/dist/src/components/Icon/Icon.d.ts +5 -0
  136. package/dist/src/components/Icon/Icon.js +4 -0
  137. package/dist/src/components/Icon/Icon.js.map +1 -0
  138. package/dist/src/components/Icon/index.d.ts +1 -0
  139. package/dist/src/components/Icon/index.js +2 -0
  140. package/dist/src/components/Icon/index.js.map +1 -0
  141. package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
  142. package/dist/src/components/LoadingIndicator/LoadingIndicator.js +6 -0
  143. package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
  144. package/dist/src/components/LoadingIndicator/index.d.ts +1 -0
  145. package/dist/src/components/LoadingIndicator/index.js +2 -0
  146. package/dist/src/components/LoadingIndicator/index.js.map +1 -0
  147. package/dist/src/components/Menu/GenericMenu.d.ts +3 -0
  148. package/dist/src/components/Menu/GenericMenu.js +20 -0
  149. package/dist/src/components/Menu/GenericMenu.js.map +1 -0
  150. package/dist/src/components/Menu/MenuToggle.d.ts +12 -0
  151. package/dist/src/components/Menu/MenuToggle.js +40 -0
  152. package/dist/src/components/Menu/MenuToggle.js.map +1 -0
  153. package/dist/src/components/Menu/index.d.ts +2 -0
  154. package/dist/src/components/Menu/index.js +3 -0
  155. package/dist/src/components/Menu/index.js.map +1 -0
  156. package/dist/src/components/Notification/Notification.d.ts +11 -0
  157. package/dist/src/components/Notification/Notification.js +25 -0
  158. package/dist/src/components/Notification/Notification.js.map +1 -0
  159. package/dist/src/components/Notification/PermissionNotification.d.ts +33 -0
  160. package/dist/src/components/Notification/PermissionNotification.js +26 -0
  161. package/dist/src/components/Notification/PermissionNotification.js.map +1 -0
  162. package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +3 -0
  163. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +47 -0
  164. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
  165. package/dist/src/components/Notification/index.d.ts +3 -0
  166. package/dist/src/components/Notification/index.js +4 -0
  167. package/dist/src/components/Notification/index.js.map +1 -0
  168. package/dist/src/components/PendingCallPanel/PendingCallControls.d.ts +2 -0
  169. package/dist/src/components/PendingCallPanel/PendingCallControls.js +13 -0
  170. package/dist/src/components/PendingCallPanel/PendingCallControls.js.map +1 -0
  171. package/dist/src/components/PendingCallPanel/PendingCallPanel.d.ts +14 -0
  172. package/dist/src/components/PendingCallPanel/PendingCallPanel.js +43 -0
  173. package/dist/src/components/PendingCallPanel/PendingCallPanel.js.map +1 -0
  174. package/dist/src/components/PendingCallPanel/index.d.ts +2 -0
  175. package/dist/src/components/PendingCallPanel/index.js +3 -0
  176. package/dist/src/components/PendingCallPanel/index.js.map +1 -0
  177. package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
  178. package/dist/src/components/Permissions/PermissionRequests.js +103 -0
  179. package/dist/src/components/Permissions/PermissionRequests.js.map +1 -0
  180. package/dist/src/components/Permissions/index.d.ts +1 -0
  181. package/dist/src/components/Permissions/index.js +2 -0
  182. package/dist/src/components/Permissions/index.js.map +1 -0
  183. package/dist/src/components/Reaction/Reaction.d.ts +10 -0
  184. package/dist/src/components/Reaction/Reaction.js +28 -0
  185. package/dist/src/components/Reaction/Reaction.js.map +1 -0
  186. package/dist/src/components/Reaction/index.d.ts +1 -0
  187. package/dist/src/components/Reaction/index.js +2 -0
  188. package/dist/src/components/Reaction/index.js.map +1 -0
  189. package/dist/src/components/Search/SearchInput.d.ts +14 -0
  190. package/dist/src/components/Search/SearchInput.js +34 -0
  191. package/dist/src/components/Search/SearchInput.js.map +1 -0
  192. package/dist/src/components/Search/SearchResults.d.ts +14 -0
  193. package/dist/src/components/Search/SearchResults.js +12 -0
  194. package/dist/src/components/Search/SearchResults.js.map +1 -0
  195. package/dist/src/components/Search/hooks/index.d.ts +1 -0
  196. package/dist/src/components/Search/hooks/index.js +2 -0
  197. package/dist/src/components/Search/hooks/index.js.map +1 -0
  198. package/dist/src/components/Search/hooks/useSearch.d.ts +15 -0
  199. package/dist/src/components/Search/hooks/useSearch.js +39 -0
  200. package/dist/src/components/Search/hooks/useSearch.js.map +1 -0
  201. package/dist/src/components/Search/index.d.ts +2 -0
  202. package/dist/src/components/Search/index.js +3 -0
  203. package/dist/src/components/Search/index.js.map +1 -0
  204. package/dist/src/components/StreamCall/CallParticipantsScreenView.d.ts +5 -0
  205. package/dist/src/components/StreamCall/CallParticipantsScreenView.js +34 -0
  206. package/dist/src/components/StreamCall/CallParticipantsScreenView.js.map +1 -0
  207. package/dist/src/components/StreamCall/CallParticipantsView.d.ts +5 -0
  208. package/dist/src/components/StreamCall/CallParticipantsView.js +10 -0
  209. package/dist/src/components/StreamCall/CallParticipantsView.js.map +1 -0
  210. package/dist/src/components/StreamCall/Stage.d.ts +8 -0
  211. package/dist/src/components/StreamCall/Stage.js +13 -0
  212. package/dist/src/components/StreamCall/Stage.js.map +1 -0
  213. package/dist/src/components/StreamCall/index.d.ts +3 -0
  214. package/dist/src/components/StreamCall/index.js +4 -0
  215. package/dist/src/components/StreamCall/index.js.map +1 -0
  216. package/dist/src/components/StreamTheme/StreamTheme.d.ts +5 -0
  217. package/dist/src/components/StreamTheme/StreamTheme.js +18 -0
  218. package/dist/src/components/StreamTheme/StreamTheme.js.map +1 -0
  219. package/dist/src/components/StreamTheme/index.d.ts +1 -0
  220. package/dist/src/components/StreamTheme/index.js +2 -0
  221. package/dist/src/components/StreamTheme/index.js.map +1 -0
  222. package/dist/src/components/Tooltip/Tooltip.d.ts +15 -0
  223. package/dist/src/components/Tooltip/Tooltip.js +22 -0
  224. package/dist/src/components/Tooltip/Tooltip.js.map +1 -0
  225. package/dist/src/components/Tooltip/WithTooltip.d.ts +5 -0
  226. package/dist/src/components/Tooltip/WithTooltip.js +23 -0
  227. package/dist/src/components/Tooltip/WithTooltip.js.map +1 -0
  228. package/dist/src/components/Tooltip/hooks/index.d.ts +1 -0
  229. package/dist/src/components/Tooltip/hooks/index.js +2 -0
  230. package/dist/src/components/Tooltip/hooks/index.js.map +1 -0
  231. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +6 -0
  232. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js +14 -0
  233. package/dist/src/components/Tooltip/hooks/useEnterLeaveHandlers.js.map +1 -0
  234. package/dist/src/components/Tooltip/index.d.ts +2 -0
  235. package/dist/src/components/Tooltip/index.js +3 -0
  236. package/dist/src/components/Tooltip/index.js.map +1 -0
  237. package/dist/src/components/Video/VideoPreview.d.ts +28 -0
  238. package/dist/src/components/Video/VideoPreview.js +75 -0
  239. package/dist/src/components/Video/VideoPreview.js.map +1 -0
  240. package/dist/src/components/Video/index.d.ts +4 -0
  241. package/dist/src/components/Video/index.js +5 -0
  242. package/dist/src/components/Video/index.js.map +1 -0
  243. package/dist/src/components/index.d.ts +16 -0
  244. package/dist/src/components/index.js +17 -0
  245. package/dist/src/components/index.js.map +1 -0
  246. package/dist/src/core/components/Audio/Audio.d.ts +6 -0
  247. package/dist/src/core/components/Audio/Audio.js +39 -0
  248. package/dist/src/core/components/Audio/Audio.js.map +1 -0
  249. package/dist/src/core/components/Audio/index.d.ts +1 -0
  250. package/dist/src/core/components/Audio/index.js +2 -0
  251. package/dist/src/core/components/Audio/index.js.map +1 -0
  252. package/dist/src/core/components/CallLayout/PaginatedGridLayout.d.ts +17 -0
  253. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +38 -0
  254. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
  255. package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +8 -0
  256. package/dist/src/core/components/CallLayout/SpeakerLayout.js +74 -0
  257. package/dist/src/core/components/CallLayout/SpeakerLayout.js.map +1 -0
  258. package/dist/src/core/components/CallLayout/index.d.ts +2 -0
  259. package/dist/src/core/components/CallLayout/index.js +3 -0
  260. package/dist/src/core/components/CallLayout/index.js.map +1 -0
  261. package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.d.ts +18 -0
  262. package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js +36 -0
  263. package/dist/src/core/components/ParticipantView/DefaultParticipantViewUI.js.map +1 -0
  264. package/dist/src/core/components/ParticipantView/ParticipantView.d.ts +79 -0
  265. package/dist/src/core/components/ParticipantView/ParticipantView.js +33 -0
  266. package/dist/src/core/components/ParticipantView/ParticipantView.js.map +1 -0
  267. package/dist/src/core/components/ParticipantView/index.d.ts +2 -0
  268. package/dist/src/core/components/ParticipantView/index.js +3 -0
  269. package/dist/src/core/components/ParticipantView/index.js.map +1 -0
  270. package/dist/src/core/components/StreamCall/StreamCall.d.ts +73 -0
  271. package/dist/src/core/components/StreamCall/StreamCall.js +60 -0
  272. package/dist/src/core/components/StreamCall/StreamCall.js.map +1 -0
  273. package/dist/src/core/components/StreamCall/index.d.ts +1 -0
  274. package/dist/src/core/components/StreamCall/index.js +2 -0
  275. package/dist/src/core/components/StreamCall/index.js.map +1 -0
  276. package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
  277. package/dist/src/core/components/Video/BaseVideo.js +48 -0
  278. package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
  279. package/dist/src/core/components/Video/DefaultVideoPlaceholder.d.ts +6 -0
  280. package/dist/src/core/components/Video/DefaultVideoPlaceholder.js +9 -0
  281. package/dist/src/core/components/Video/DefaultVideoPlaceholder.js.map +1 -0
  282. package/dist/src/core/components/Video/Video.d.ts +13 -0
  283. package/dist/src/core/components/Video/Video.js +154 -0
  284. package/dist/src/core/components/Video/Video.js.map +1 -0
  285. package/dist/src/core/components/Video/index.d.ts +2 -0
  286. package/dist/src/core/components/Video/index.js +3 -0
  287. package/dist/src/core/components/Video/index.js.map +1 -0
  288. package/dist/src/core/components/index.d.ts +6 -0
  289. package/dist/src/core/components/index.js +6 -0
  290. package/dist/src/core/components/index.js.map +1 -0
  291. package/dist/src/core/contexts/MediaDevicesContext.d.ts +180 -0
  292. package/dist/src/core/contexts/MediaDevicesContext.js +177 -0
  293. package/dist/src/core/contexts/MediaDevicesContext.js.map +1 -0
  294. package/dist/src/core/contexts/index.d.ts +1 -0
  295. package/dist/src/core/contexts/index.js +2 -0
  296. package/dist/src/core/contexts/index.js.map +1 -0
  297. package/dist/src/core/hooks/index.d.ts +4 -0
  298. package/dist/src/core/hooks/index.js +5 -0
  299. package/dist/src/core/hooks/index.js.map +1 -0
  300. package/dist/src/core/hooks/useAudioPublisher.d.ts +12 -0
  301. package/dist/src/core/hooks/useAudioPublisher.js +95 -0
  302. package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
  303. package/dist/src/core/hooks/useDevices.d.ts +80 -0
  304. package/dist/src/core/hooks/useDevices.js +113 -0
  305. package/dist/src/core/hooks/useDevices.js.map +1 -0
  306. package/dist/src/core/hooks/useTrackElementVisibility.d.ts +6 -0
  307. package/dist/src/core/hooks/useTrackElementVisibility.js +27 -0
  308. package/dist/src/core/hooks/useTrackElementVisibility.js.map +1 -0
  309. package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
  310. package/dist/src/core/hooks/useVideoPublisher.js +120 -0
  311. package/dist/src/core/hooks/useVideoPublisher.js.map +1 -0
  312. package/dist/src/core/index.d.ts +3 -0
  313. package/dist/src/core/index.js +4 -0
  314. package/dist/src/core/index.js.map +1 -0
  315. package/dist/src/hooks/index.d.ts +2 -0
  316. package/dist/src/hooks/index.js +3 -0
  317. package/dist/src/hooks/index.js.map +1 -0
  318. package/dist/src/hooks/useFloatingUIPreset.d.ts +9 -0
  319. package/dist/src/hooks/useFloatingUIPreset.js +30 -0
  320. package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
  321. package/dist/src/hooks/useScrollPosition.d.ts +6 -0
  322. package/dist/src/hooks/useScrollPosition.js +63 -0
  323. package/dist/src/hooks/useScrollPosition.js.map +1 -0
  324. package/dist/src/types/components.d.ts +7 -0
  325. package/dist/src/types/components.js +2 -0
  326. package/dist/src/types/components.js.map +1 -0
  327. package/dist/src/types/index.d.ts +1 -0
  328. package/dist/src/types/index.js +2 -0
  329. package/dist/src/types/index.js.map +1 -0
  330. package/dist/src/utilities/applyElementToRef.d.ts +2 -0
  331. package/dist/src/utilities/applyElementToRef.js +8 -0
  332. package/dist/src/utilities/applyElementToRef.js.map +1 -0
  333. package/dist/src/utilities/chunk.d.ts +1 -0
  334. package/dist/src/utilities/chunk.js +5 -0
  335. package/dist/src/utilities/chunk.js.map +1 -0
  336. package/dist/src/utilities/index.d.ts +3 -0
  337. package/dist/src/utilities/index.js +4 -0
  338. package/dist/src/utilities/index.js.map +1 -0
  339. package/dist/src/utilities/isComponentType.d.ts +2 -0
  340. package/dist/src/utilities/isComponentType.js +7 -0
  341. package/dist/src/utilities/isComponentType.js.map +1 -0
  342. package/index.ts +18 -0
  343. package/package.json +51 -0
  344. package/src/components/Avatar/Avatar.tsx +45 -0
  345. package/src/components/Avatar/index.ts +1 -0
  346. package/src/components/Button/CompositeButton.tsx +50 -0
  347. package/src/components/Button/CopyToClipboardButton.tsx +129 -0
  348. package/src/components/Button/IconButton.tsx +32 -0
  349. package/src/components/Button/TextButton.tsx +12 -0
  350. package/src/components/Button/index.ts +4 -0
  351. package/src/components/CallControls/AcceptCallButton.tsx +36 -0
  352. package/src/components/CallControls/CallControls.tsx +26 -0
  353. package/src/components/CallControls/CallStatsButton.tsx +20 -0
  354. package/src/components/CallControls/CancelCallButton.tsx +36 -0
  355. package/src/components/CallControls/ReactionsButton.tsx +74 -0
  356. package/src/components/CallControls/RecordCallButton.tsx +73 -0
  357. package/src/components/CallControls/ScreenShareButton.tsx +84 -0
  358. package/src/components/CallControls/ToggleAudioButton.tsx +123 -0
  359. package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
  360. package/src/components/CallControls/ToggleVideoButton.tsx +116 -0
  361. package/src/components/CallControls/index.ts +10 -0
  362. package/src/components/CallParticipantsList/BlockedUserListing.tsx +37 -0
  363. package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
  364. package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
  365. package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +273 -0
  366. package/src/components/CallParticipantsList/CallParticipantsList.tsx +255 -0
  367. package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +7 -0
  368. package/src/components/CallParticipantsList/index.ts +3 -0
  369. package/src/components/CallRecordingList/CallRecordingList.tsx +60 -0
  370. package/src/components/CallRecordingList/CallRecordingListHeader.tsx +29 -0
  371. package/src/components/CallRecordingList/CallRecordingListItem.tsx +67 -0
  372. package/src/components/CallRecordingList/EmptyCallRecordingListing.tsx +11 -0
  373. package/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +21 -0
  374. package/src/components/CallRecordingList/index.ts +5 -0
  375. package/src/components/CallStats/CallStats.tsx +162 -0
  376. package/src/components/CallStats/CallStatsLatencyChart.tsx +58 -0
  377. package/src/components/CallStats/index.ts +2 -0
  378. package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
  379. package/src/components/Debug/DebugStatsView.tsx +108 -0
  380. package/src/components/Debug/useIsDebugMode.ts +24 -0
  381. package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
  382. package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +57 -0
  383. package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +22 -0
  384. package/src/components/DeviceSettings/DeviceSettings.tsx +39 -0
  385. package/src/components/DeviceSettings/index.ts +4 -0
  386. package/src/components/Icon/Icon.tsx +11 -0
  387. package/src/components/Icon/index.ts +1 -0
  388. package/src/components/LoadingIndicator/LoadingIndicator.tsx +28 -0
  389. package/src/components/LoadingIndicator/index.ts +1 -0
  390. package/src/components/Menu/GenericMenu.tsx +16 -0
  391. package/src/components/Menu/MenuToggle.tsx +81 -0
  392. package/src/components/Menu/index.ts +2 -0
  393. package/src/components/Notification/Notification.tsx +61 -0
  394. package/src/components/Notification/PermissionNotification.tsx +97 -0
  395. package/src/components/Notification/SpeakingWhileMutedNotification.tsx +61 -0
  396. package/src/components/Notification/index.ts +3 -0
  397. package/src/components/PendingCallPanel/PendingCallControls.tsx +27 -0
  398. package/src/components/PendingCallPanel/PendingCallPanel.tsx +93 -0
  399. package/src/components/PendingCallPanel/index.ts +2 -0
  400. package/src/components/Permissions/PermissionRequests.tsx +176 -0
  401. package/src/components/Permissions/index.ts +1 -0
  402. package/src/components/Reaction/Reaction.tsx +48 -0
  403. package/src/components/Reaction/index.ts +1 -0
  404. package/src/components/Search/SearchInput.tsx +56 -0
  405. package/src/components/Search/SearchResults.tsx +40 -0
  406. package/src/components/Search/hooks/index.ts +1 -0
  407. package/src/components/Search/hooks/useSearch.ts +52 -0
  408. package/src/components/Search/index.ts +2 -0
  409. package/src/components/StreamCall/CallParticipantsScreenView.tsx +125 -0
  410. package/src/components/StreamCall/CallParticipantsView.tsx +24 -0
  411. package/src/components/StreamCall/Stage.tsx +22 -0
  412. package/src/components/StreamCall/index.ts +4 -0
  413. package/src/components/StreamTheme/StreamTheme.tsx +19 -0
  414. package/src/components/StreamTheme/index.ts +1 -0
  415. package/src/components/Tooltip/Tooltip.tsx +51 -0
  416. package/src/components/Tooltip/WithTooltip.tsx +39 -0
  417. package/src/components/Tooltip/hooks/index.ts +1 -0
  418. package/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +28 -0
  419. package/src/components/Tooltip/index.ts +2 -0
  420. package/src/components/Video/VideoPreview.tsx +152 -0
  421. package/src/components/Video/index.ts +4 -0
  422. package/src/components/index.ts +16 -0
  423. package/src/core/components/Audio/Audio.tsx +42 -0
  424. package/src/core/components/Audio/index.ts +1 -0
  425. package/src/core/components/CallLayout/PaginatedGridLayout.tsx +159 -0
  426. package/src/core/components/CallLayout/SpeakerLayout.tsx +231 -0
  427. package/src/core/components/CallLayout/index.ts +2 -0
  428. package/src/core/components/ParticipantView/DefaultParticipantViewUI.tsx +160 -0
  429. package/src/core/components/ParticipantView/ParticipantView.tsx +156 -0
  430. package/src/core/components/ParticipantView/index.ts +2 -0
  431. package/src/core/components/StreamCall/StreamCall.tsx +157 -0
  432. package/src/core/components/StreamCall/index.ts +1 -0
  433. package/src/core/components/Video/BaseVideo.tsx +53 -0
  434. package/src/core/components/Video/DefaultVideoPlaceholder.tsx +36 -0
  435. package/src/core/components/Video/Video.tsx +252 -0
  436. package/src/core/components/Video/index.ts +2 -0
  437. package/src/core/components/index.ts +8 -0
  438. package/src/core/contexts/MediaDevicesContext.tsx +416 -0
  439. package/src/core/contexts/index.ts +1 -0
  440. package/src/core/hooks/index.ts +4 -0
  441. package/src/core/hooks/useAudioPublisher.ts +124 -0
  442. package/src/core/hooks/useDevices.ts +161 -0
  443. package/src/core/hooks/useTrackElementVisibility.ts +44 -0
  444. package/src/core/hooks/useVideoPublisher.ts +152 -0
  445. package/src/core/index.ts +3 -0
  446. package/src/hooks/index.ts +2 -0
  447. package/src/hooks/useFloatingUIPreset.ts +50 -0
  448. package/src/hooks/useScrollPosition.ts +95 -0
  449. package/src/types/components.ts +7 -0
  450. package/src/types/index.ts +1 -0
  451. package/src/utilities/applyElementToRef.ts +12 -0
  452. package/src/utilities/chunk.ts +8 -0
  453. package/src/utilities/index.ts +3 -0
  454. package/src/utilities/isComponentType.ts +9 -0
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DeviceSettings: () => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { MenuToggle } from '../Menu';
4
+ import { DeviceSelectorAudioInput, DeviceSelectorAudioOutput, } from './DeviceSelectorAudio';
5
+ import { DeviceSelectorVideo } from './DeviceSelectorVideo';
6
+ import { IconButton } from '../Button';
7
+ import clsx from 'clsx';
8
+ export const DeviceSettings = () => {
9
+ return (_jsx(MenuToggle, Object.assign({ placement: "bottom-end", ToggleButton: ToggleMenuButton }, { children: _jsx(Menu, {}) })));
10
+ };
11
+ const Menu = () => (_jsxs("div", Object.assign({ className: "str-video__device-settings" }, { children: [_jsx(DeviceSelectorVideo, {}), _jsx(DeviceSelectorAudioInput, {}), _jsx(DeviceSelectorAudioOutput, {})] })));
12
+ const ToggleMenuButton = forwardRef(({ menuShown }, ref) => (_jsx(IconButton, { className: clsx('str-video__device-settings__button', {
13
+ 'str-video__device-settings__button--active': menuShown,
14
+ }), title: "Toggle device menu", icon: "device-settings", ref: ref })));
15
+ //# sourceMappingURL=DeviceSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceSettings.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/DeviceSettings.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,UAAU,EAAyB,MAAM,SAAS,CAAC;AAC5D,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,OAAO,CACL,KAAC,UAAU,kBAAC,SAAS,EAAC,YAAY,EAAC,YAAY,EAAE,gBAAgB,gBAC/D,KAAC,IAAI,KAAG,IACG,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CACjB,6BAAK,SAAS,EAAC,4BAA4B,iBACzC,KAAC,mBAAmB,KAAG,EACvB,KAAC,wBAAwB,KAAG,EAC5B,KAAC,yBAAyB,KAAG,KACzB,CACP,CAAC;AAEF,MAAM,gBAAgB,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACtB,KAAC,UAAU,IACT,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE;QACpD,4CAA4C,EAAE,SAAS;KACxD,CAAC,EACF,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,iBAAiB,EACtB,GAAG,EAAE,GAAG,GAER,CACH,CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './DeviceSettings';
2
+ export * from './DeviceSelector';
3
+ export * from './DeviceSelectorAudio';
4
+ export * from './DeviceSelectorVideo';
@@ -0,0 +1,5 @@
1
+ export * from './DeviceSettings';
2
+ export * from './DeviceSelector';
3
+ export * from './DeviceSelectorAudio';
4
+ export * from './DeviceSelectorVideo';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/DeviceSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export type IconProps = {
3
+ icon: string;
4
+ };
5
+ export declare const Icon: ({ icon }: IconProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { clsx } from 'clsx';
3
+ export const Icon = ({ icon }) => (_jsx("span", { className: clsx('str-video__icon', icon && `str-video__icon--${icon}`) }));
4
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAM5B,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAa,EAAE,EAAE,CAAC,CAC3C,eACE,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,IAAI,oBAAoB,IAAI,EAAE,CAAC,GACtE,CACH,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Icon';
@@ -0,0 +1,2 @@
1
+ export * from './Icon';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export type LoadingIndicatorProps = {
3
+ className?: string;
4
+ /** String will be injected into class and later used to apply as a CSS mask-image to an element as data URL */
5
+ type?: string;
6
+ /** Text to be displayed under the loading indicator icon */
7
+ text?: string;
8
+ /** Tooltip to be displayed on hover */
9
+ tooltip?: string;
10
+ };
11
+ export declare const LoadingIndicator: ({ className, type, text, tooltip, }: LoadingIndicatorProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import clsx from 'clsx';
3
+ export const LoadingIndicator = ({ className, type = 'spinner', text, tooltip, }) => {
4
+ return (_jsxs("div", Object.assign({ className: clsx('str-video__loading-indicator', className), title: tooltip }, { children: [_jsx("div", { className: clsx('str-video__loading-indicator__icon', type) }), text && _jsx("p", Object.assign({ className: "str-video__loading-indicator-text" }, { children: text }))] })));
5
+ };
6
+ //# sourceMappingURL=LoadingIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingIndicator.js","sourceRoot":"","sources":["../../../../src/components/LoadingIndicator/LoadingIndicator.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAYxB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,IAAI,EACJ,OAAO,GACe,EAAE,EAAE;IAC1B,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CAAC,8BAA8B,EAAE,SAAS,CAAC,EAC1D,KAAK,EAAE,OAAO,iBAEd,cAAK,SAAS,EAAE,IAAI,CAAC,oCAAoC,EAAE,IAAI,CAAC,GAAQ,EACvE,IAAI,IAAI,0BAAG,SAAS,EAAC,mCAAmC,gBAAE,IAAI,IAAK,KAChE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './LoadingIndicator';
@@ -0,0 +1,2 @@
1
+ export * from './LoadingIndicator';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/LoadingIndicator/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { ComponentProps, PropsWithChildren } from 'react';
2
+ export declare const GenericMenu: ({ children }: PropsWithChildren) => JSX.Element;
3
+ export declare const GenericMenuButtonItem: ({ children, ...rest }: Omit<ComponentProps<'button'>, 'ref'>) => JSX.Element;
@@ -0,0 +1,20 @@
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 GenericMenu = ({ children }) => {
14
+ return _jsx("ul", Object.assign({ className: "str-video__generic-menu" }, { children: children }));
15
+ };
16
+ export const GenericMenuButtonItem = (_a) => {
17
+ var { children } = _a, rest = __rest(_a, ["children"]);
18
+ return (_jsx("li", Object.assign({ className: "str-video__generic-menu--item" }, { children: _jsx("button", Object.assign({}, rest, { children: children })) })));
19
+ };
20
+ //# sourceMappingURL=GenericMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericMenu.js","sourceRoot":"","sources":["../../../../src/components/Menu/GenericMenu.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IAC7D,OAAO,2BAAI,SAAS,EAAC,yBAAyB,gBAAE,QAAQ,IAAM,CAAC;AACjE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAGE,EAAE,EAAE;QAHN,EACpC,QAAQ,OAE8B,EADnC,IAAI,cAF6B,YAGrC,CADQ;IAEP,OAAO,CACL,2BAAI,SAAS,EAAC,+BAA+B,gBAC3C,iCAAY,IAAI,cAAG,QAAQ,IAAU,IAClC,CACN,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ComponentType, PropsWithChildren, ForwardedRef } from 'react';
2
+ import { Placement, Strategy } from '@floating-ui/react';
3
+ export type ToggleMenuButtonProps<E extends HTMLElement = HTMLButtonElement> = {
4
+ menuShown: boolean;
5
+ ref: ForwardedRef<E>;
6
+ };
7
+ export type MenuToggleProps<E extends HTMLElement> = PropsWithChildren<{
8
+ ToggleButton: ComponentType<ToggleMenuButtonProps<E>>;
9
+ placement?: Placement;
10
+ strategy?: Strategy;
11
+ }>;
12
+ export declare const MenuToggle: <E extends HTMLElement>({ ToggleButton, placement, strategy, children, }: MenuToggleProps<E>) => JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState, } from 'react';
3
+ import { useFloatingUIPreset } from '../../hooks';
4
+ export const MenuToggle = ({ ToggleButton, placement = 'top-start', strategy = 'absolute', children, }) => {
5
+ const [menuShown, setMenuShown] = useState(false);
6
+ const { floating, domReference, refs, x, y } = useFloatingUIPreset({
7
+ placement,
8
+ strategy,
9
+ });
10
+ useEffect(() => {
11
+ const handleClick = (event) => {
12
+ if (!floating && (domReference === null || domReference === void 0 ? void 0 : domReference.contains(event.target))) {
13
+ setMenuShown(true);
14
+ }
15
+ else if (floating && !(floating === null || floating === void 0 ? void 0 : floating.contains(event.target))) {
16
+ setMenuShown(false);
17
+ }
18
+ };
19
+ const handleKeyDown = (event) => {
20
+ if (event.key.toLowerCase() === 'escape' &&
21
+ !event.altKey &&
22
+ !event.ctrlKey) {
23
+ setMenuShown(false);
24
+ }
25
+ };
26
+ document === null || document === void 0 ? void 0 : document.addEventListener('click', handleClick, { capture: true });
27
+ document === null || document === void 0 ? void 0 : document.addEventListener('keydown', handleKeyDown);
28
+ return () => {
29
+ document === null || document === void 0 ? void 0 : document.removeEventListener('click', handleClick, { capture: true });
30
+ document === null || document === void 0 ? void 0 : document.removeEventListener('keydown', handleKeyDown);
31
+ };
32
+ }, [floating, domReference]);
33
+ return (_jsxs(_Fragment, { children: [menuShown && (_jsx("div", Object.assign({ className: "str-video__menu-container", ref: refs.setFloating, style: {
34
+ position: strategy,
35
+ top: y !== null && y !== void 0 ? y : 0,
36
+ left: x !== null && x !== void 0 ? x : 0,
37
+ overflowY: 'auto',
38
+ } }, { children: children }))), _jsx(ToggleButton, { menuShown: menuShown, ref: refs.setReference })] }));
39
+ };
40
+ //# sourceMappingURL=MenuToggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuToggle.js","sourceRoot":"","sources":["../../../../src/components/Menu/MenuToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAGL,SAAS,EACT,QAAQ,GAET,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAalD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAwB,EAChD,YAAY,EACZ,SAAS,GAAG,WAAW,EACvB,QAAQ,GAAG,UAAU,EACrB,QAAQ,GACW,EAAE,EAAE;IACvB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,mBAAmB,CAAC;QACjE,SAAS;QACT,QAAQ;KACT,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YACxC,IAAI,CAAC,QAAQ,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;gBAC7D,YAAY,CAAC,IAAI,CAAC,CAAC;aACpB;iBAAM,IAAI,QAAQ,IAAI,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,CAAA,EAAE;gBAChE,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC7C,IACE,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,QAAQ;gBACpC,CAAC,KAAK,CAAC,MAAM;gBACb,CAAC,KAAK,CAAC,OAAO,EACd;gBACA,YAAY,CAAC,KAAK,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;QACF,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,gBAAgB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QACrD,OAAO,GAAG,EAAE;YACV,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACvE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;QAC1D,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7B,OAAO,CACL,8BACG,SAAS,IAAI,CACZ,4BACE,SAAS,EAAC,2BAA2B,EACrC,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAE;oBACL,QAAQ,EAAE,QAAQ;oBAClB,GAAG,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACX,IAAI,EAAE,CAAC,aAAD,CAAC,cAAD,CAAC,GAAI,CAAC;oBACZ,SAAS,EAAE,MAAM;iBAClB,gBAEA,QAAQ,IACL,CACP,EACD,KAAC,YAAY,IAAC,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,GAAI,IAC7D,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './MenuToggle';
2
+ export * from './GenericMenu';
@@ -0,0 +1,3 @@
1
+ export * from './MenuToggle';
2
+ export * from './GenericMenu';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ export type NotificationProps = {
4
+ message?: ReactNode;
5
+ isVisible?: boolean;
6
+ visibilityTimeout?: number;
7
+ resetIsVisible?: () => void;
8
+ placement?: Placement;
9
+ iconClassName?: string | null;
10
+ };
11
+ export declare const Notification: (props: PropsWithChildren<NotificationProps>) => JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect } from 'react';
3
+ import { useFloatingUIPreset } from '../../hooks';
4
+ export const Notification = (props) => {
5
+ const { isVisible, message, children, visibilityTimeout, resetIsVisible, placement = 'top', iconClassName = 'str-video__notification__icon', } = props;
6
+ const { refs, x, y, strategy } = useFloatingUIPreset({
7
+ placement,
8
+ strategy: 'absolute',
9
+ });
10
+ useEffect(() => {
11
+ if (!isVisible || !visibilityTimeout || !resetIsVisible)
12
+ return;
13
+ const timeout = setTimeout(() => {
14
+ resetIsVisible();
15
+ }, visibilityTimeout);
16
+ return () => clearTimeout(timeout);
17
+ }, [isVisible, resetIsVisible, visibilityTimeout]);
18
+ return (_jsxs("div", Object.assign({ ref: refs.setReference }, { children: [isVisible && (_jsxs("div", Object.assign({ className: "str-video__notification", ref: refs.setFloating, style: {
19
+ position: strategy,
20
+ top: y !== null && y !== void 0 ? y : 0,
21
+ left: x !== null && x !== void 0 ? x : 0,
22
+ overflowY: 'auto',
23
+ } }, { children: [iconClassName && _jsx("i", { className: iconClassName }), _jsx("span", Object.assign({ className: "str-video__notification__message" }, { children: message }))] }))), children] })));
24
+ };
25
+ //# sourceMappingURL=Notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../../src/components/Notification/Notification.tsx"],"names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kCAAkC,gBAAE,OAAO,IAAQ,KAC/D,CACP,EACA,QAAQ,KACL,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { OwnCapability } from '@stream-io/video-client';
2
+ import { PropsWithChildren } from 'react';
3
+ export type PermissionNotificationProps = PropsWithChildren<{
4
+ /**
5
+ * The permission to check for.
6
+ */
7
+ permission: OwnCapability;
8
+ /**
9
+ * Set this to true if there is ongoing request for the permission.
10
+ */
11
+ isAwaitingApproval: boolean;
12
+ /**
13
+ * The message to display in the notification once
14
+ * the requested permission is granted.
15
+ */
16
+ messageApproved: string;
17
+ /**
18
+ * The message to display in the notification once a permission
19
+ * is revoked.
20
+ */
21
+ messageRevoked: string;
22
+ /**
23
+ * The message to display in the notification while
24
+ * the requested permission is awaiting approval.
25
+ */
26
+ messageAwaitingApproval: string;
27
+ /**
28
+ * The time in milliseconds to display the notification.
29
+ * Defaults to 3500ms.
30
+ */
31
+ visibilityTimeout?: number;
32
+ }>;
33
+ export declare const PermissionNotification: (props: PermissionNotificationProps) => JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Notification } from './Notification';
3
+ import { useCallback, useEffect, useRef, useState, } from 'react';
4
+ import { useHasPermissions } from '@stream-io/video-react-bindings';
5
+ export const PermissionNotification = (props) => {
6
+ const { permission, isAwaitingApproval, messageApproved, messageAwaitingApproval, messageRevoked, visibilityTimeout = 3500, children, } = props;
7
+ const hasPermission = useHasPermissions(permission);
8
+ const prevHasPermission = useRef(hasPermission);
9
+ const [showNotification, setShowNotification] = useState();
10
+ useEffect(() => {
11
+ if (hasPermission && !prevHasPermission.current) {
12
+ setShowNotification('granted');
13
+ prevHasPermission.current = true;
14
+ }
15
+ else if (!hasPermission && prevHasPermission.current) {
16
+ setShowNotification('revoked');
17
+ prevHasPermission.current = false;
18
+ }
19
+ }, [hasPermission]);
20
+ const resetIsVisible = useCallback(() => setShowNotification(undefined), []);
21
+ if (isAwaitingApproval) {
22
+ return (_jsx(Notification, Object.assign({ isVisible: isAwaitingApproval && !hasPermission, message: messageAwaitingApproval }, { children: children })));
23
+ }
24
+ return (_jsx(Notification, Object.assign({ isVisible: !!showNotification, visibilityTimeout: visibilityTimeout, resetIsVisible: resetIsVisible, message: showNotification === 'granted' ? messageApproved : messageRevoked }, { children: children })));
25
+ };
26
+ //# sourceMappingURL=PermissionNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionNotification.js","sourceRoot":"","sources":["../../../../src/components/Notification/PermissionNotification.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAEL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAsCpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC3E,MAAM,EACJ,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,iBAAiB,GAAG,IAAI,EACxB,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IAChD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,EAErD,CAAC;IACJ,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE;YAC/C,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAC/B,iBAAiB,CAAC,OAAO,GAAG,IAAI,CAAC;SAClC;aAAM,IAAI,CAAC,aAAa,IAAI,iBAAiB,CAAC,OAAO,EAAE;YACtD,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAC/B,iBAAiB,CAAC,OAAO,GAAG,KAAK,CAAC;SACnC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7E,IAAI,kBAAkB,EAAE;QACtB,OAAO,CACL,KAAC,YAAY,kBACX,SAAS,EAAE,kBAAkB,IAAI,CAAC,aAAa,EAC/C,OAAO,EAAE,uBAAuB,gBAE/B,QAAQ,IACI,CAChB,CAAC;KACH;IAED,OAAO,CACL,KAAC,YAAY,kBACX,SAAS,EAAE,CAAC,CAAC,gBAAgB,EAC7B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,cAAc,EAC9B,OAAO,EACL,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,cAAc,gBAGlE,QAAQ,IACI,CAChB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ChildrenOnly } from '../../types';
3
+ export declare const SpeakingWhileMutedNotification: ({ children }: ChildrenOnly) => JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from 'react';
3
+ import { createSoundDetector, SfuModels } from '@stream-io/video-client';
4
+ import { useLocalParticipant } from '@stream-io/video-react-bindings';
5
+ import { useMediaDevices } from '../../core';
6
+ import { Notification } from './Notification';
7
+ export const SpeakingWhileMutedNotification = ({ children }) => {
8
+ const localParticipant = useLocalParticipant();
9
+ const { getAudioStream } = useMediaDevices();
10
+ const isAudioMute = !(localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.publishedTracks.includes(SfuModels.TrackType.AUDIO));
11
+ const audioDeviceId = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.audioDeviceId;
12
+ const [isSpeakingWhileMuted, setIsSpeakingWhileMuted] = useState(false);
13
+ useEffect(() => {
14
+ // do nothing when not muted
15
+ if (!isAudioMute)
16
+ return;
17
+ const disposeSoundDetector = getAudioStream({
18
+ deviceId: audioDeviceId,
19
+ }).then((audioStream) => createSoundDetector(audioStream, (isSpeechDetected) => {
20
+ setIsSpeakingWhileMuted((isNotified) => isNotified ? isNotified : isSpeechDetected);
21
+ }));
22
+ disposeSoundDetector.catch((err) => {
23
+ console.error('Error while creating sound detector', err);
24
+ });
25
+ return () => {
26
+ disposeSoundDetector
27
+ .then((dispose) => dispose())
28
+ .catch((err) => {
29
+ console.error('Error while disposing sound detector', err);
30
+ });
31
+ setIsSpeakingWhileMuted(false);
32
+ };
33
+ }, [audioDeviceId, getAudioStream, isAudioMute]);
34
+ useEffect(() => {
35
+ if (!isSpeakingWhileMuted)
36
+ return;
37
+ const timeout = setTimeout(() => {
38
+ setIsSpeakingWhileMuted(false);
39
+ }, 3500);
40
+ return () => {
41
+ clearTimeout(timeout);
42
+ setIsSpeakingWhileMuted(false);
43
+ };
44
+ }, [isSpeakingWhileMuted]);
45
+ return (_jsx(Notification, Object.assign({ message: "You are muted. Unmute to speak.", isVisible: isSpeakingWhileMuted }, { children: children })));
46
+ };
47
+ //# sourceMappingURL=SpeakingWhileMutedNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpeakingWhileMutedNotification.js","sourceRoot":"","sources":["../../../../src/components/Notification/SpeakingWhileMutedNotification.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAAE,QAAQ,EAAg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ACL,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,oBAAoB;YAAE,OAAO;QAClC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC9B,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,uBAAuB,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC3B,OAAO,CACL,KAAC,YAAY,kBACX,OAAO,EAAC,iCAAiC,EACzC,SAAS,EAAE,oBAAoB,gBAE9B,QAAQ,IACI,CAChB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Notification';
2
+ export * from './PermissionNotification';
3
+ export * from './SpeakingWhileMutedNotification';
@@ -0,0 +1,4 @@
1
+ export * from './Notification';
2
+ export * from './PermissionNotification';
3
+ export * from './SpeakingWhileMutedNotification';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Notification/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC"}
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const PendingCallControls: () => JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CallingState } from '@stream-io/video-client';
3
+ import { AcceptCallButton, CancelCallButton } from '../CallControls';
4
+ import { useCall, useCallCallingState } from '@stream-io/video-react-bindings';
5
+ export const PendingCallControls = () => {
6
+ const call = useCall();
7
+ const callCallingState = useCallCallingState();
8
+ if (!call)
9
+ return null;
10
+ const buttonsDisabled = callCallingState !== CallingState.RINGING;
11
+ return (_jsx("div", Object.assign({ className: "str-video__pending-call-controls" }, { children: call.isCreatedByMe ? (_jsx(CancelCallButton, { disabled: buttonsDisabled })) : (_jsxs(_Fragment, { children: [_jsx(AcceptCallButton, { disabled: buttonsDisabled }), _jsx(CancelCallButton, { onClick: () => call.leave({ reject: true }), disabled: buttonsDisabled })] })) })));
12
+ };
13
+ //# sourceMappingURL=PendingCallControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PendingCallControls.js","sourceRoot":"","sources":["../../../../src/components/PendingCallPanel/PendingCallControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAE/C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,eAAe,GAAG,gBAAgB,KAAK,YAAY,CAAC,OAAO,CAAC;IAClE,OAAO,CACL,4BAAK,SAAS,EAAC,kCAAkC,gBAC9C,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CACpB,KAAC,gBAAgB,IAAC,QAAQ,EAAE,eAAe,GAAI,CAChD,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,gBAAgB,IAAC,QAAQ,EAAE,eAAe,GAAI,EAC/C,KAAC,gBAAgB,IACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAC3C,QAAQ,EAAE,eAAe,GACzB,IACD,CACJ,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export type PendingCallPanelProps = {
3
+ /**
4
+ * Whether to include the current user in the list of members to show.
5
+ * @default false.
6
+ */
7
+ includeSelf?: boolean;
8
+ /**
9
+ * The maximum number of members to show.
10
+ * @default 3.
11
+ */
12
+ totalMembersToShow?: number;
13
+ };
14
+ export declare const PendingCallPanel: (props: PendingCallPanelProps) => JSX.Element | null;
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CallingState } from '@stream-io/video-client';
3
+ import { useCall, useCallCallingState, useCallMembers, useConnectedUser, useI18n, } from '@stream-io/video-react-bindings';
4
+ import { Avatar } from '../Avatar';
5
+ import { PendingCallControls } from './PendingCallControls';
6
+ const CALLING_STATE_TO_LABEL = {
7
+ [CallingState.JOINING]: 'Joining',
8
+ [CallingState.RINGING]: 'Ringing',
9
+ [CallingState.RECONNECTING]: 'Re-connecting',
10
+ [CallingState.RECONNECTING_FAILED]: 'Failed',
11
+ [CallingState.OFFLINE]: 'No internet connection',
12
+ [CallingState.IDLE]: '',
13
+ [CallingState.UNKNOWN]: '',
14
+ [CallingState.JOINED]: 'Joined',
15
+ [CallingState.LEFT]: 'Left call',
16
+ };
17
+ export const PendingCallPanel = (props) => {
18
+ const { includeSelf = false, totalMembersToShow = 3 } = props;
19
+ const call = useCall();
20
+ const callingState = useCallCallingState();
21
+ const { t } = useI18n();
22
+ const members = useCallMembers();
23
+ const connectedUser = useConnectedUser();
24
+ if (!call)
25
+ return null;
26
+ // take the first N members to show their avatars
27
+ const membersToShow = (members || [])
28
+ .slice(0, totalMembersToShow)
29
+ .map(({ user }) => user)
30
+ .filter((user) => user.id !== (connectedUser === null || connectedUser === void 0 ? void 0 : connectedUser.id) || includeSelf);
31
+ if (includeSelf &&
32
+ !membersToShow.find((user) => user.id === (connectedUser === null || connectedUser === void 0 ? void 0 : connectedUser.id))) {
33
+ // if the current user is not in the initial batch of members,
34
+ // add it to the beginning of the list
35
+ const self = members.find(({ user }) => user.id === (connectedUser === null || connectedUser === void 0 ? void 0 : connectedUser.id));
36
+ if (self) {
37
+ membersToShow.splice(0, 1, self.user);
38
+ }
39
+ }
40
+ const callingStateLabel = CALLING_STATE_TO_LABEL[callingState];
41
+ return (_jsxs("div", Object.assign({ className: "str-video__call-panel str-video__call-panel--pending" }, { children: [_jsx("div", Object.assign({ className: "str-video__call-panel__members-list" }, { children: membersToShow.map((user) => (_jsxs("div", Object.assign({ className: "str-video__call-panel__member-box" }, { children: [_jsx(Avatar, { name: user.name, imageSrc: user.image }), user.name && (_jsx("div", Object.assign({ className: "str-video__member_details" }, { children: _jsx("span", Object.assign({ className: "str-video__member_name" }, { children: user.name })) })))] }), user.id))) })), callingStateLabel && (_jsx("div", Object.assign({ className: "str-video__call-panel__calling-state-label" }, { children: t(callingStateLabel) }))), [CallingState.RINGING, CallingState.JOINING].includes(callingState) && (_jsx(PendingCallControls, {}))] })));
42
+ };
43
+ //# sourceMappingURL=PendingCallPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PendingCallPanel.js","sourceRoot":"","sources":["../../../../src/components/PendingCallPanel/PendingCallPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAgB,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,OAAO,GACR,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,sBAAsB,GAAiC;IAC3D,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,SAAS;IACjC,CAAC,YAAY,CAAC,OA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';
2
+ export * from './PendingCallPanel';
@@ -0,0 +1,3 @@
1
+ export * from './PendingCallControls';
2
+ export * from './PendingCallPanel';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/PendingCallPanel/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ComponentProps } from 'react';
2
+ import { PermissionRequestEvent } from '@stream-io/video-client';
3
+ export declare const PermissionRequests: () => JSX.Element | null;
4
+ export type PermissionRequestListProps = ComponentProps<'div'> & {
5
+ permissionRequests: PermissionRequestEvent[];
6
+ handleUpdatePermission: (request: PermissionRequestEvent, allow: boolean) => () => Promise<void>;
7
+ };
8
+ export declare const PermissionRequestList: import("react").ForwardRefExoticComponent<Omit<PermissionRequestListProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;