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

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 (418) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/LICENSE +219 -0
  3. package/README.md +5 -0
  4. package/dist/dist/css/styles.css +2351 -0
  5. package/dist/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 +15 -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/CallControls.d.ts +7 -0
  31. package/dist/src/components/CallControls/CallControls.js +8 -0
  32. package/dist/src/components/CallControls/CallControls.js.map +1 -0
  33. package/dist/src/components/CallControls/CallStatsButton.d.ts +6 -0
  34. package/dist/src/components/CallControls/CallStatsButton.js +10 -0
  35. package/dist/src/components/CallControls/CallStatsButton.js.map +1 -0
  36. package/dist/src/components/CallControls/CancelCallButton.d.ts +8 -0
  37. package/dist/src/components/CallControls/CancelCallButton.js +25 -0
  38. package/dist/src/components/CallControls/CancelCallButton.js.map +1 -0
  39. package/dist/src/components/CallControls/ReactionsButton.d.ts +11 -0
  40. package/dist/src/components/CallControls/ReactionsButton.js +33 -0
  41. package/dist/src/components/CallControls/ReactionsButton.js.map +1 -0
  42. package/dist/src/components/CallControls/RecordCallButton.d.ts +7 -0
  43. package/dist/src/components/CallControls/RecordCallButton.js +51 -0
  44. package/dist/src/components/CallControls/RecordCallButton.js.map +1 -0
  45. package/dist/src/components/CallControls/ScreenShareButton.d.ts +7 -0
  46. package/dist/src/components/CallControls/ScreenShareButton.js +54 -0
  47. package/dist/src/components/CallControls/ScreenShareButton.js.map +1 -0
  48. package/dist/src/components/CallControls/ToggleAudioButton.d.ts +9 -0
  49. package/dist/src/components/CallControls/ToggleAudioButton.js +66 -0
  50. package/dist/src/components/CallControls/ToggleAudioButton.js.map +1 -0
  51. package/dist/src/components/CallControls/ToggleAudioOutputButton.d.ts +5 -0
  52. package/dist/src/components/CallControls/ToggleAudioOutputButton.js +9 -0
  53. package/dist/src/components/CallControls/ToggleAudioOutputButton.js.map +1 -0
  54. package/dist/src/components/CallControls/ToggleCameraButton.d.ts +10 -0
  55. package/dist/src/components/CallControls/ToggleCameraButton.js +64 -0
  56. package/dist/src/components/CallControls/ToggleCameraButton.js.map +1 -0
  57. package/dist/src/components/CallControls/ToggleParticipantListButton.d.ts +6 -0
  58. package/dist/src/components/CallControls/ToggleParticipantListButton.js +7 -0
  59. package/dist/src/components/CallControls/ToggleParticipantListButton.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 +19 -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 +15 -0
  73. package/dist/src/components/CallParticipantsList/CallParticipantListingItem.js +77 -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 +82 -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/Debug/DebugParticipantPublishQuality.d.ts +6 -0
  103. package/dist/src/components/Debug/DebugParticipantPublishQuality.js +46 -0
  104. package/dist/src/components/Debug/DebugParticipantPublishQuality.js.map +1 -0
  105. package/dist/src/components/Debug/DebugStatsView.d.ts +7 -0
  106. package/dist/src/components/Debug/DebugStatsView.js +26 -0
  107. package/dist/src/components/Debug/DebugStatsView.js.map +1 -0
  108. package/dist/src/components/Debug/useIsDebugMode.d.ts +5 -0
  109. package/dist/src/components/Debug/useIsDebugMode.js +18 -0
  110. package/dist/src/components/Debug/useIsDebugMode.js.map +1 -0
  111. package/dist/src/components/DeviceSettings/DeviceSelector.d.ts +7 -0
  112. package/dist/src/components/DeviceSettings/DeviceSelector.js +26 -0
  113. package/dist/src/components/DeviceSettings/DeviceSelector.js.map +1 -0
  114. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.d.ts +9 -0
  115. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js +18 -0
  116. package/dist/src/components/DeviceSettings/DeviceSelectorAudio.js.map +1 -0
  117. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.d.ts +5 -0
  118. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js +10 -0
  119. package/dist/src/components/DeviceSettings/DeviceSelectorVideo.js.map +1 -0
  120. package/dist/src/components/DeviceSettings/DeviceSettings.d.ts +2 -0
  121. package/dist/src/components/DeviceSettings/DeviceSettings.js +15 -0
  122. package/dist/src/components/DeviceSettings/DeviceSettings.js.map +1 -0
  123. package/dist/src/components/DeviceSettings/index.d.ts +4 -0
  124. package/dist/src/components/DeviceSettings/index.js +5 -0
  125. package/dist/src/components/DeviceSettings/index.js.map +1 -0
  126. package/dist/src/components/Icon/Icon.d.ts +5 -0
  127. package/dist/src/components/Icon/Icon.js +4 -0
  128. package/dist/src/components/Icon/Icon.js.map +1 -0
  129. package/dist/src/components/Icon/index.d.ts +1 -0
  130. package/dist/src/components/Icon/index.js +2 -0
  131. package/dist/src/components/Icon/index.js.map +1 -0
  132. package/dist/src/components/LoadingIndicator/LoadingIndicator.d.ts +11 -0
  133. package/dist/src/components/LoadingIndicator/LoadingIndicator.js +6 -0
  134. package/dist/src/components/LoadingIndicator/LoadingIndicator.js.map +1 -0
  135. package/dist/src/components/LoadingIndicator/index.d.ts +1 -0
  136. package/dist/src/components/LoadingIndicator/index.js +2 -0
  137. package/dist/src/components/LoadingIndicator/index.js.map +1 -0
  138. package/dist/src/components/Menu/GenericMenu.d.ts +3 -0
  139. package/dist/src/components/Menu/GenericMenu.js +20 -0
  140. package/dist/src/components/Menu/GenericMenu.js.map +1 -0
  141. package/dist/src/components/Menu/MenuToggle.d.ts +12 -0
  142. package/dist/src/components/Menu/MenuToggle.js +40 -0
  143. package/dist/src/components/Menu/MenuToggle.js.map +1 -0
  144. package/dist/src/components/Menu/index.d.ts +2 -0
  145. package/dist/src/components/Menu/index.js +3 -0
  146. package/dist/src/components/Menu/index.js.map +1 -0
  147. package/dist/src/components/Moderation/Restricted.d.ts +19 -0
  148. package/dist/src/components/Moderation/Restricted.js +13 -0
  149. package/dist/src/components/Moderation/Restricted.js.map +1 -0
  150. package/dist/src/components/Moderation/index.d.ts +1 -0
  151. package/dist/src/components/Moderation/index.js +2 -0
  152. package/dist/src/components/Moderation/index.js.map +1 -0
  153. package/dist/src/components/Notification/Notification.d.ts +11 -0
  154. package/dist/src/components/Notification/Notification.js +25 -0
  155. package/dist/src/components/Notification/Notification.js.map +1 -0
  156. package/dist/src/components/Notification/PermissionNotification.d.ts +33 -0
  157. package/dist/src/components/Notification/PermissionNotification.js +26 -0
  158. package/dist/src/components/Notification/PermissionNotification.js.map +1 -0
  159. package/dist/src/components/Notification/SpeakingWhileMutedNotification.d.ts +3 -0
  160. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js +45 -0
  161. package/dist/src/components/Notification/SpeakingWhileMutedNotification.js.map +1 -0
  162. package/dist/src/components/Notification/index.d.ts +3 -0
  163. package/dist/src/components/Notification/index.js +4 -0
  164. package/dist/src/components/Notification/index.js.map +1 -0
  165. package/dist/src/components/Permissions/PermissionRequests.d.ts +8 -0
  166. package/dist/src/components/Permissions/PermissionRequests.js +109 -0
  167. package/dist/src/components/Permissions/PermissionRequests.js.map +1 -0
  168. package/dist/src/components/Permissions/index.d.ts +1 -0
  169. package/dist/src/components/Permissions/index.js +2 -0
  170. package/dist/src/components/Permissions/index.js.map +1 -0
  171. package/dist/src/components/Reaction/Reaction.d.ts +10 -0
  172. package/dist/src/components/Reaction/Reaction.js +28 -0
  173. package/dist/src/components/Reaction/Reaction.js.map +1 -0
  174. package/dist/src/components/Reaction/index.d.ts +1 -0
  175. package/dist/src/components/Reaction/index.js +2 -0
  176. package/dist/src/components/Reaction/index.js.map +1 -0
  177. package/dist/src/components/Search/SearchInput.d.ts +14 -0
  178. package/dist/src/components/Search/SearchInput.js +34 -0
  179. package/dist/src/components/Search/SearchInput.js.map +1 -0
  180. package/dist/src/components/Search/SearchResults.d.ts +14 -0
  181. package/dist/src/components/Search/SearchResults.js +12 -0
  182. package/dist/src/components/Search/SearchResults.js.map +1 -0
  183. package/dist/src/components/Search/hooks/index.d.ts +1 -0
  184. package/dist/src/components/Search/hooks/index.js +2 -0
  185. package/dist/src/components/Search/hooks/index.js.map +1 -0
  186. package/dist/src/components/Search/hooks/useSearch.d.ts +15 -0
  187. package/dist/src/components/Search/hooks/useSearch.js +39 -0
  188. package/dist/src/components/Search/hooks/useSearch.js.map +1 -0
  189. package/dist/src/components/Search/index.d.ts +2 -0
  190. package/dist/src/components/Search/index.js +3 -0
  191. package/dist/src/components/Search/index.js.map +1 -0
  192. package/dist/src/components/StreamCall/CallParticipantsScreenView.d.ts +5 -0
  193. package/dist/src/components/StreamCall/CallParticipantsScreenView.js +34 -0
  194. package/dist/src/components/StreamCall/CallParticipantsScreenView.js.map +1 -0
  195. package/dist/src/components/StreamCall/CallParticipantsView.d.ts +5 -0
  196. package/dist/src/components/StreamCall/CallParticipantsView.js +11 -0
  197. package/dist/src/components/StreamCall/CallParticipantsView.js.map +1 -0
  198. package/dist/src/components/StreamCall/CallStats.d.ts +2 -0
  199. package/dist/src/components/StreamCall/CallStats.js +69 -0
  200. package/dist/src/components/StreamCall/CallStats.js.map +1 -0
  201. package/dist/src/components/StreamCall/CallStatsLatencyChart.d.ts +7 -0
  202. package/dist/src/components/StreamCall/CallStatsLatencyChart.js +39 -0
  203. package/dist/src/components/StreamCall/CallStatsLatencyChart.js.map +1 -0
  204. package/dist/src/components/StreamCall/Stage.d.ts +8 -0
  205. package/dist/src/components/StreamCall/Stage.js +13 -0
  206. package/dist/src/components/StreamCall/Stage.js.map +1 -0
  207. package/dist/src/components/StreamCall/hooks/index.d.ts +1 -0
  208. package/dist/src/components/StreamCall/hooks/index.js +2 -0
  209. package/dist/src/components/StreamCall/hooks/index.js.map +1 -0
  210. package/dist/src/components/StreamCall/hooks/useScrollPosition.d.ts +6 -0
  211. package/dist/src/components/StreamCall/hooks/useScrollPosition.js +63 -0
  212. package/dist/src/components/StreamCall/hooks/useScrollPosition.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/StreamMeeting/StreamMeeting.d.ts +34 -0
  217. package/dist/src/components/StreamMeeting/StreamMeeting.js +26 -0
  218. package/dist/src/components/StreamMeeting/StreamMeeting.js.map +1 -0
  219. package/dist/src/components/StreamMeeting/index.d.ts +1 -0
  220. package/dist/src/components/StreamMeeting/index.js +2 -0
  221. package/dist/src/components/StreamMeeting/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 +13 -0
  238. package/dist/src/components/Video/VideoPreview.js +70 -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 +21 -0
  253. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js +39 -0
  254. package/dist/src/core/components/CallLayout/PaginatedGridLayout.js.map +1 -0
  255. package/dist/src/core/components/CallLayout/SpeakerLayout.d.ts +2 -0
  256. package/dist/src/core/components/CallLayout/SpeakerLayout.js +52 -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/ParticipantBox/ParticipantBox.d.ts +48 -0
  262. package/dist/src/core/components/ParticipantBox/ParticipantBox.js +58 -0
  263. package/dist/src/core/components/ParticipantBox/ParticipantBox.js.map +1 -0
  264. package/dist/src/core/components/ParticipantBox/index.d.ts +1 -0
  265. package/dist/src/core/components/ParticipantBox/index.js +2 -0
  266. package/dist/src/core/components/ParticipantBox/index.js.map +1 -0
  267. package/dist/src/core/components/Video/BaseVideo.d.ts +9 -0
  268. package/dist/src/core/components/Video/BaseVideo.js +54 -0
  269. package/dist/src/core/components/Video/BaseVideo.js.map +1 -0
  270. package/dist/src/core/components/Video/Video.d.ts +8 -0
  271. package/dist/src/core/components/Video/Video.js +151 -0
  272. package/dist/src/core/components/Video/Video.js.map +1 -0
  273. package/dist/src/core/components/Video/VideoPlaceholder.d.ts +6 -0
  274. package/dist/src/core/components/Video/VideoPlaceholder.js +12 -0
  275. package/dist/src/core/components/Video/VideoPlaceholder.js.map +1 -0
  276. package/dist/src/core/components/Video/index.d.ts +2 -0
  277. package/dist/src/core/components/Video/index.js +3 -0
  278. package/dist/src/core/components/Video/index.js.map +1 -0
  279. package/dist/src/core/components/index.d.ts +5 -0
  280. package/dist/src/core/components/index.js +5 -0
  281. package/dist/src/core/components/index.js.map +1 -0
  282. package/dist/src/core/contexts/MediaDevicesContext.d.ts +82 -0
  283. package/dist/src/core/contexts/MediaDevicesContext.js +215 -0
  284. package/dist/src/core/contexts/MediaDevicesContext.js.map +1 -0
  285. package/dist/src/core/contexts/index.d.ts +1 -0
  286. package/dist/src/core/contexts/index.js +2 -0
  287. package/dist/src/core/contexts/index.js.map +1 -0
  288. package/dist/src/core/hooks/index.d.ts +2 -0
  289. package/dist/src/core/hooks/index.js +3 -0
  290. package/dist/src/core/hooks/index.js.map +1 -0
  291. package/dist/src/core/hooks/useAudioPublisher.d.ts +12 -0
  292. package/dist/src/core/hooks/useAudioPublisher.js +89 -0
  293. package/dist/src/core/hooks/useAudioPublisher.js.map +1 -0
  294. package/dist/src/core/hooks/useVideoPublisher.d.ts +12 -0
  295. package/dist/src/core/hooks/useVideoPublisher.js +91 -0
  296. package/dist/src/core/hooks/useVideoPublisher.js.map +1 -0
  297. package/dist/src/core/index.d.ts +3 -0
  298. package/dist/src/core/index.js +4 -0
  299. package/dist/src/core/index.js.map +1 -0
  300. package/dist/src/hooks/index.d.ts +2 -0
  301. package/dist/src/hooks/index.js +3 -0
  302. package/dist/src/hooks/index.js.map +1 -0
  303. package/dist/src/hooks/useFloatingUIPreset.d.ts +9 -0
  304. package/dist/src/hooks/useFloatingUIPreset.js +29 -0
  305. package/dist/src/hooks/useFloatingUIPreset.js.map +1 -0
  306. package/dist/src/hooks/useRtcStats.d.ts +11 -0
  307. package/dist/src/hooks/useRtcStats.js +39 -0
  308. package/dist/src/hooks/useRtcStats.js.map +1 -0
  309. package/dist/src/types/components.d.ts +7 -0
  310. package/dist/src/types/components.js +2 -0
  311. package/dist/src/types/components.js.map +1 -0
  312. package/dist/src/types/index.d.ts +1 -0
  313. package/dist/src/types/index.js +2 -0
  314. package/dist/src/types/index.js.map +1 -0
  315. package/index.ts +18 -0
  316. package/package.json +49 -0
  317. package/src/components/Avatar/Avatar.tsx +45 -0
  318. package/src/components/Avatar/index.ts +1 -0
  319. package/src/components/Button/CompositeButton.tsx +59 -0
  320. package/src/components/Button/CopyToClipboardButton.tsx +129 -0
  321. package/src/components/Button/IconButton.tsx +32 -0
  322. package/src/components/Button/TextButton.tsx +12 -0
  323. package/src/components/Button/index.ts +4 -0
  324. package/src/components/CallControls/CallControls.tsx +32 -0
  325. package/src/components/CallControls/CallStatsButton.tsx +28 -0
  326. package/src/components/CallControls/CancelCallButton.tsx +28 -0
  327. package/src/components/CallControls/ReactionsButton.tsx +75 -0
  328. package/src/components/CallControls/RecordCallButton.tsx +68 -0
  329. package/src/components/CallControls/ScreenShareButton.tsx +85 -0
  330. package/src/components/CallControls/ToggleAudioButton.tsx +112 -0
  331. package/src/components/CallControls/ToggleAudioOutputButton.tsx +21 -0
  332. package/src/components/CallControls/ToggleCameraButton.tsx +109 -0
  333. package/src/components/CallControls/ToggleParticipantListButton.tsx +17 -0
  334. package/src/components/CallControls/index.ts +10 -0
  335. package/src/components/CallParticipantsList/BlockedUserListing.tsx +38 -0
  336. package/src/components/CallParticipantsList/CallParticipantListHeader.tsx +29 -0
  337. package/src/components/CallParticipantsList/CallParticipantListing.tsx +22 -0
  338. package/src/components/CallParticipantsList/CallParticipantListingItem.tsx +249 -0
  339. package/src/components/CallParticipantsList/CallParticipantsList.tsx +255 -0
  340. package/src/components/CallParticipantsList/EmptyParticipantSearchList.tsx +7 -0
  341. package/src/components/CallParticipantsList/index.ts +3 -0
  342. package/src/components/CallRecordingList/CallRecordingList.tsx +60 -0
  343. package/src/components/CallRecordingList/CallRecordingListHeader.tsx +29 -0
  344. package/src/components/CallRecordingList/CallRecordingListItem.tsx +67 -0
  345. package/src/components/CallRecordingList/EmptyCallRecordingListing.tsx +11 -0
  346. package/src/components/CallRecordingList/LoadingCallRecordingListing.tsx +21 -0
  347. package/src/components/CallRecordingList/index.ts +5 -0
  348. package/src/components/Debug/DebugParticipantPublishQuality.tsx +62 -0
  349. package/src/components/Debug/DebugStatsView.tsx +55 -0
  350. package/src/components/Debug/useIsDebugMode.ts +24 -0
  351. package/src/components/DeviceSettings/DeviceSelector.tsx +106 -0
  352. package/src/components/DeviceSettings/DeviceSelectorAudio.tsx +52 -0
  353. package/src/components/DeviceSettings/DeviceSelectorVideo.tsx +22 -0
  354. package/src/components/DeviceSettings/DeviceSettings.tsx +39 -0
  355. package/src/components/DeviceSettings/index.ts +4 -0
  356. package/src/components/Icon/Icon.tsx +11 -0
  357. package/src/components/Icon/index.ts +1 -0
  358. package/src/components/LoadingIndicator/LoadingIndicator.tsx +28 -0
  359. package/src/components/LoadingIndicator/index.ts +1 -0
  360. package/src/components/Menu/GenericMenu.tsx +16 -0
  361. package/src/components/Menu/MenuToggle.tsx +81 -0
  362. package/src/components/Menu/index.ts +2 -0
  363. package/src/components/Moderation/Restricted.tsx +38 -0
  364. package/src/components/Moderation/index.ts +1 -0
  365. package/src/components/Notification/Notification.tsx +61 -0
  366. package/src/components/Notification/PermissionNotification.tsx +97 -0
  367. package/src/components/Notification/SpeakingWhileMutedNotification.tsx +60 -0
  368. package/src/components/Notification/index.ts +3 -0
  369. package/src/components/Permissions/PermissionRequests.tsx +182 -0
  370. package/src/components/Permissions/index.ts +1 -0
  371. package/src/components/Reaction/Reaction.tsx +48 -0
  372. package/src/components/Reaction/index.ts +1 -0
  373. package/src/components/Search/SearchInput.tsx +56 -0
  374. package/src/components/Search/SearchResults.tsx +40 -0
  375. package/src/components/Search/hooks/index.ts +1 -0
  376. package/src/components/Search/hooks/useSearch.ts +52 -0
  377. package/src/components/Search/index.ts +2 -0
  378. package/src/components/StreamCall/CallParticipantsScreenView.tsx +126 -0
  379. package/src/components/StreamCall/CallParticipantsView.tsx +25 -0
  380. package/src/components/StreamCall/CallStats.tsx +162 -0
  381. package/src/components/StreamCall/CallStatsLatencyChart.tsx +58 -0
  382. package/src/components/StreamCall/Stage.tsx +22 -0
  383. package/src/components/StreamCall/hooks/index.ts +1 -0
  384. package/src/components/StreamCall/hooks/useScrollPosition.ts +95 -0
  385. package/src/components/StreamCall/index.ts +4 -0
  386. package/src/components/StreamMeeting/StreamMeeting.tsx +80 -0
  387. package/src/components/StreamMeeting/index.ts +1 -0
  388. package/src/components/Tooltip/Tooltip.tsx +51 -0
  389. package/src/components/Tooltip/WithTooltip.tsx +39 -0
  390. package/src/components/Tooltip/hooks/index.ts +1 -0
  391. package/src/components/Tooltip/hooks/useEnterLeaveHandlers.ts +28 -0
  392. package/src/components/Tooltip/index.ts +2 -0
  393. package/src/components/Video/VideoPreview.tsx +127 -0
  394. package/src/components/Video/index.ts +4 -0
  395. package/src/components/index.ts +16 -0
  396. package/src/core/components/Audio/Audio.tsx +42 -0
  397. package/src/core/components/Audio/index.ts +1 -0
  398. package/src/core/components/CallLayout/PaginatedGridLayout.tsx +163 -0
  399. package/src/core/components/CallLayout/SpeakerLayout.tsx +145 -0
  400. package/src/core/components/CallLayout/index.ts +2 -0
  401. package/src/core/components/ParticipantBox/ParticipantBox.tsx +248 -0
  402. package/src/core/components/ParticipantBox/index.ts +1 -0
  403. package/src/core/components/Video/BaseVideo.tsx +68 -0
  404. package/src/core/components/Video/Video.tsx +238 -0
  405. package/src/core/components/Video/VideoPlaceholder.tsx +40 -0
  406. package/src/core/components/Video/index.ts +2 -0
  407. package/src/core/components/index.ts +7 -0
  408. package/src/core/contexts/MediaDevicesContext.tsx +373 -0
  409. package/src/core/contexts/index.ts +1 -0
  410. package/src/core/hooks/index.ts +2 -0
  411. package/src/core/hooks/useAudioPublisher.ts +118 -0
  412. package/src/core/hooks/useVideoPublisher.ts +120 -0
  413. package/src/core/index.ts +3 -0
  414. package/src/hooks/index.ts +2 -0
  415. package/src/hooks/useFloatingUIPreset.ts +48 -0
  416. package/src/hooks/useRtcStats.ts +36 -0
  417. package/src/types/components.ts +7 -0
  418. package/src/types/index.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../../src/_base.scss","../../src/_global-layout-variables.scss","../../src/_global-theme-variables.scss","../../src/_palette-variables.scss","../../src/_variables.scss","../../src/Avatar/Avatar-layout.scss","../../src/Avatar/Avatar-theme.scss","../../src/_utils.scss","../../src/Button/Button-layout.scss","../../src/Button/Button-theme.scss","../../src/CallControls/CallControls-layout.scss","../../src/CallParticipantsScreenView.scss","../../src/CallParticipantsView.scss","../../src/CallParticipantList/CallParticipantList-layout.scss","../../src/CallParticipantList/CallParticipantList-theme.scss","../../src/CallParticipantList/CallParticiantListingItem-layout.scss","../../src/CallParticipantList/CallParticiantListingItem-theme.scss","../../src/CallRecodingList/CallRecordingList-layout.scss","../../src/CallRecodingList/CallRecordingList-theme.scss","../../src/CallStats.scss","../../src/DeviceSettings/DeviceSettings-layout.scss","../../src/DeviceSettings/DeviceSettings-theme.scss","../../src/LoadingIndicator/LoadingIndicator-layout.scss","../../src/LoadingIndicator/LoadingIndicator-theme.scss","../../src/Menu/Menu-layout.scss","../../src/Menu/Menu-theme.scss","../../src/Menu/GenericMenu-layout.scss","../../src/Menu/GenericMenu-theme.scss","../../src/Notification/Notification-layout.scss","../../src/Notification/Notification-theme.scss","../../src/Permissions/Permissions-layout.scss","../../src/Reaction/Reaction-layout.scss","../../src/Search/SearchInput-layout.scss","../../src/Search/SearchInput-theme.scss","../../src/StreamCall.scss","../../src/Tooltip/Tooltip-layout.scss","../../src/Tooltip/Tooltip-theme.scss","../../src/Video/Video-layout.scss","../../src/Video/Video-theme.scss","../../src/Video/VideoPlaceholder-layout.scss","../../src/Video/VideoPlaceholder-theme.scss","../../src/ParticipantBox/ParticipantBox-layout.scss","../../src/CallLayout/PaginatedGridLayout-layout.scss","../../src/CallLayout/SpeakerLayout-layout.scss","../../src/Icon/Icon-theme.scss","../../src/Icon/Icon-layout.scss","../../src/Debug.scss"],"names":[],"mappings":";AACE;AAAA;AAAA;EAGE;;AAGF;EACE;EACA;EACA;;;AAKF;EACE;EACA;EACA;EACA;;AAGF;AAAA;EAEE;EACA;;;ACzBJ;AACE;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;ACxDF;AACE;EACA;AACA;EACA;AACA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAAA;AAGA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;AAGF;AAAA;AAEE;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AC/KF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACrDF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACrDF;EAJE;EACA;EAKA;;;AAGF;EATE;EACA;EAUA;EACA;EACA;;;ACZF;AACE;EACA;AAEA;EACA;AAEA;EACA;;;AAGF;ECSE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADZF;EACE;EACA;EACA;EACA;EACA;;;AEtBF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;;AAEA;EACE;;AAIF;EACE;EACA;;AAIA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAKN;EACE;EACA;EACA;EACA;EAGA;;;ACpEF;AACE;EACA;AAAA;AAAA;AAIA;EACA;AAAA;AAAA;AAIA;EACA;AAAA;AAAA;AAIA;EACA;AAAA;AAAA;;;AAKF;EFFE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AEFA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAKF;EACE;;AAEA;EACE;;AAIJ;EACE;;;AC1EJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;ACfN;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGJ;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAKN;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;;ACrGJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAEF;EACE;EACA;;AAOA;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;AAFF;EACE;EACA;;;AChEN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AACA;EACE;;AAEF;EACE;EACA;;AACA;EACE;EACA;EACA;;AAKN;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAKN;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EAEE,QADiB;EAEjB,OAFiB;EAGjB,WAHiB;EAIjB,mBAJiB;;AAQrB;EACE;EACA;EACA;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;;AC1GJ;EACE;AAAA;AAAA;EAGA;AAAA;AAAA;EAIA;EAEA;AAAA;AAAA;EAIA;EACA;AAAA;AAAA;EAIA;;;AAGF;EPFE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AOFA;EPLA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EOAE;EACA;;AAGF;EPXA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AOUA;EPjBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AOeE;EPlCF,YOoCM;EPnCN,oBOmCM;EPlCN;EACA;EACA;EACA;EACA,WOkCM;EPjCN,mBOiCM;EPhCN,kBO6BM;;AAQN;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EP5DJ,YO8DU;EP7DV,oBO6DU;EP5DV;EACA;EACA;EACA;EACA,WO0DU;EPzDV,mBOyDU;EPxDV,kBOuDU;;;ACvEZ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;ERbA;EACA;EAEA;EACA;EACA;;AQYA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;;ACvBJ;EACE;;AAIA;ETEF;EACA,oBSDQ;ETER;EACA;EACA;EACA;EACA,WSJQ;ETKR,mBSLQ;ETMR,kBSPQ;;AAKN;ETNF,YSQQ;ETPR,oBSOQ;ETNR;EACA;EACA;EACA;EACA,WSIQ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;EACA,WWoDQ;EXnDR,mBWmDQ;EXlDR,kBWiDQ;;AAKN;EX9DF,YWgEQ;EX/DR,oBW+DQ;EX9DR;EACA;EACA;EACA;EACA,WW4DQ;EX3DR,mBW2DQ;EX1DR,kBWyDQ;;;AAUN;EACE;;;ACtFN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;;AClDF;EACE;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEF;EACE;;;ACrCR;AACE;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;AAGF;EdAE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AcHF;EdJE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AcCF;EACE;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;AACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAEF;EACE;;;AAMR;EACE;EACA;EACA;;AAEA;EdrEA,YcuEM;EdtEN,oBcsEM;EdrEN;EACA;EACA;EACA;EACA,WcmEM;EdlEN,mBckEM;EdjEN,kBcgEM;;AAKN;EAEE;EACA;;;AAIJ;EACE;;;AC/FF;EACE;EACA;EACA;;;ACDF;EhBQE,YgBNI;EhBOJ,oBgBPI;EhBQJ;EACA;EACA;EACA;EACA,WAPmD;EAQnD,mBARmD;EASnD,kBgBbI;EAEJ;;;AAGF;EACE;IACE;;EAEF;IACE;;;ACfJ;EACE;;;ACDF;EACE;;;ACDF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAKJ;EACE;;AAEF;EACE;EACA;EACA;EACA;;;ACpCN;EACE;;AAGE;EACE;;AAGF;EACE;EACA;EACA;;;ACXN;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;;ACXJ;EACE;EACA;EACA;;AAEA;EtBGA,YsBDI;EtBEJ,oBsBFI;EtBGJ;EACA;EACA;EACA;EACA,WsBLI;EtBMJ,mBsBNI;EtBOJ,kBsBRI;;AAKJ;EACE;;;AChBJ;EACE;EACA;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;ACnDN;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;;ACZJ;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;AAAA;EAEE;EACA;EACA;;;ACxBJ;EACE;EACA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;EAEA;EACA;AAAA;EAEA;EAEA;EAEA;;;AAGF;EACE;;;AAEF;E1BHE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;A0BDA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;E1B9BA,Y0BgCI;E1B/BJ,oB0B+BI;E1B9BJ;EACA;EACA;EACA;EACA,W0B4BI;E1B3BJ,mB0B2BI;E1B1BJ,kB0ByBI;;AAIJ;EACE;;AAEA;E1BxCF,Y0B0CM;E1BzCN,oB0ByCM;E1BxCN;EACA;EACA;EACA;EACA,W0BsCM;E1BrCN,mB0BqCM;E1BpCN,kB0BmCM;;;ACrDR;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AC9BJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACNF;AACE;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;AAGF;E7BNE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E6BCA;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;ACzCF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EAEA,OADkB;EAElB;;AAEA;EAEE,QADiB;EAEjB,OAFiB;EAGjB,WAHiB;;;AAOrB;EACE;EACA;EACA;;AAEA;EAEE;;AAGF;EACE;;;ACpCJ;AACE;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;AAEA;EACA;;;AAIF;E/BJE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E+BDA;;;AC5BF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACnBJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACXJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EAEE;EACA;;AAIA;AAAA;AAAA;AAAA;EAEE;;AAIJ;AAAA;EACE;EACA;EACA;EACA;EACA;;AAIA;AAAA;AAAA;AAAA;EAEE;;AAIJ;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;EACA;;AAIJ;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAWA;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A;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AC1JJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ACTF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA","file":"styles.css"}
@@ -0,0 +1,6 @@
1
+ export * from '@stream-io/video-client';
2
+ export * from '@stream-io/video-react-bindings';
3
+ export * from '@stream-io/i18n';
4
+ export * from './src/core';
5
+ export * from './src/components';
6
+ export * from './src/types';
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import { setSdkInfo, SfuModels } from '@stream-io/video-client';
2
+ export * from '@stream-io/video-client';
3
+ export * from '@stream-io/video-react-bindings';
4
+ export * from '@stream-io/i18n';
5
+ export * from './src/core';
6
+ export * from './src/components';
7
+ export * from './src/types';
8
+ // TODO: set valid version
9
+ setSdkInfo({
10
+ type: SfuModels.SdkType.REACT,
11
+ major: '0',
12
+ minor: '0',
13
+ patch: '0',
14
+ });
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAEhC,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAE5B,0BAA0B;AAC1B,UAAU,CAAC;IACT,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,KAAK;IAC7B,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;CACX,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { CSSProperties } from 'react';
2
+ export type AvatarData = {
3
+ imageSrc?: string;
4
+ name?: string;
5
+ style?: CSSProperties & Record<string, string | number>;
6
+ };
7
+ export type AvatarProps = AvatarData;
8
+ export declare const Avatar: ({ imageSrc, name, style }: AvatarProps) => JSX.Element;
9
+ type AvatarFallbackProps = {
10
+ names: string[];
11
+ style?: CSSProperties & Record<string, string | number>;
12
+ };
13
+ export declare const AvatarFallback: ({ names, style }: AvatarFallbackProps) => JSX.Element;
14
+ export {};
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ export const Avatar = ({ imageSrc, name, style }) => {
4
+ const [error, setError] = useState(false);
5
+ return (_jsxs(_Fragment, { children: [(!imageSrc || error) && name && (_jsx(AvatarFallback, { style: style, names: [name] })), imageSrc && !error && (_jsx("img", { onError: () => setError(true), alt: "avatar", className: "str-video__avatar", src: imageSrc, style: style }))] }));
6
+ };
7
+ export const AvatarFallback = ({ names, style }) => {
8
+ var _a;
9
+ return (_jsx("div", Object.assign({ className: "str-video__avatar--initials-fallback", style: style }, { children: _jsxs("div", { children: [names[0][0], (_a = names[1]) === null || _a === void 0 ? void 0 : _a[0]] }) })));
10
+ };
11
+ //# sourceMappingURL=Avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUhD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAe,EAAE,EAAE;IAC/D,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,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,GAAI,CAChD,EACA,QAAQ,IAAI,CAAC,KAAK,IAAI,CACrB,cACE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,GAAG,EAAC,QAAQ,EACZ,SAAS,EAAC,mBAAmB,EAC7B,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,KAAK,GACZ,CACH,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAuB,EAAE,EAAE;;IACtE,OAAO,CACL,4BAAK,SAAS,EAAC,sCAAsC,EAAC,KAAK,EAAE,KAAK,gBAChE,0BACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACX,MAAA,KAAK,CAAC,CAAC,CAAC,0CAAG,CAAC,CAAC,IACV,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Avatar';
@@ -0,0 +1,2 @@
1
+ export * from './Avatar';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ComponentType, PropsWithChildren } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ export type IconButtonWithMenuProps = PropsWithChildren<{
4
+ active?: boolean;
5
+ Menu?: ComponentType | JSX.Element;
6
+ caption?: string;
7
+ menuPlacement?: Placement;
8
+ }>;
9
+ export declare const CompositeButton: import("react").ForwardRefExoticComponent<{
10
+ active?: boolean | undefined;
11
+ Menu?: JSX.Element | ComponentType<{}> | undefined;
12
+ caption?: string | undefined;
13
+ menuPlacement?: Placement | undefined;
14
+ } & {
15
+ children?: import("react").ReactNode;
16
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,15 @@
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, isValidElement, } from 'react';
5
+ import { IconButton } from './IconButton';
6
+ const isComponentType = (elementOrComponent) => {
7
+ return !isValidElement(elementOrComponent);
8
+ };
9
+ export const CompositeButton = forwardRef(({ caption, children, active, Menu, menuPlacement }, ref) => {
10
+ 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', {
11
+ 'str-video__composite-button__button-group--active': active,
12
+ }) }, { 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 })))] })));
13
+ });
14
+ 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 })));
15
+ //# sourceMappingURL=CompositeButton.js.map
@@ -0,0 +1 @@
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,EAEL,UAAU,EACV,cAAc,GAEf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,MAAM,eAAe,GAAG,CACtB,kBAA+C,EACV,EAAE;IACvC,OAAO,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,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"}
@@ -0,0 +1,27 @@
1
+ import { ComponentProps, ComponentPropsWithRef, ComponentType, ForwardedRef } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ type CopyToClipboardButtonProps = ComponentProps<'button'> & {
4
+ /** Custom button component implementation. Will be rendered instead of native button element */
5
+ Button?: ComponentType<ComponentPropsWithRef<'button'> & {
6
+ ref: ForwardedRef<HTMLButtonElement>;
7
+ }>;
8
+ /** Custom function to override the logic of generating the call invitation link */
9
+ copyValue: (() => string) | string;
10
+ /** Callback invoked if the copy-to-clipboard action fails */
11
+ onError?: (button: HTMLButtonElement, e: Error) => void;
12
+ /** Callback invoked if the copy-to-clipboard action succeeds */
13
+ onSuccess?: (button: HTMLButtonElement) => void;
14
+ };
15
+ export declare const CopyToClipboardButton: import("react").ForwardRefExoticComponent<Omit<CopyToClipboardButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
16
+ type CopyToClipboardButtonWithPopupProps = Exclude<CopyToClipboardButtonProps, 'onError' | 'onSuccess'> & {
17
+ dismissAfterMs?: number;
18
+ /** String displayed when copy-to-clipboard action fails */
19
+ onErrorMessage?: string;
20
+ /** String displayed when copy-to-clipboard succeeds fails */
21
+ onSuccessMessage?: string;
22
+ /** Class applied to the popup container element */
23
+ popupClassName?: string;
24
+ popupPlacement?: Placement;
25
+ };
26
+ export declare const CopyToClipboardButtonWithPopup: ({ dismissAfterMs, onErrorMessage, onSuccessMessage, popupClassName, popupPlacement, ...restProps }: CopyToClipboardButtonWithPopupProps) => JSX.Element;
27
+ export {};
@@ -0,0 +1,54 @@
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
@@ -0,0 +1 @@
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,K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AAU,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"}
@@ -0,0 +1,7 @@
1
+ import { ComponentProps } from 'react';
2
+ import { IconProps } from '../Icon';
3
+ export type ButtonWithIconProps = {
4
+ enabled?: boolean;
5
+ variant?: string;
6
+ } & ComponentProps<'button'> & IconProps;
7
+ export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonWithIconProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,26 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ import { ComponentProps } from 'react';
2
+ export declare const TextButton: ({ children, ...rest }: Omit<ComponentProps<'button'>, 'ref' | 'className'>) => JSX.Element;
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,4 @@
1
+ export * from './CompositeButton';
2
+ export * from './CopyToClipboardButton';
3
+ export * from './IconButton';
4
+ export * from './TextButton';
@@ -0,0 +1,5 @@
1
+ export * from './CompositeButton';
2
+ export * from './CopyToClipboardButton';
3
+ export * from './IconButton';
4
+ export * from './TextButton';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Call } from '@stream-io/video-client';
3
+ export type CallControlsProps = {
4
+ call: Call;
5
+ onLeave?: () => void;
6
+ };
7
+ export declare const CallControls: (props: CallControlsProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CallStatsButton, CancelCallButton, RecordCallButton, ScreenShareButton, ToggleAudioPublishingButton, ToggleCameraPublishingButton, } from './index';
3
+ import { SpeakingWhileMutedNotification } from '../Notification';
4
+ export const CallControls = (props) => {
5
+ const { call, onLeave } = props;
6
+ return (_jsxs("div", Object.assign({ className: "str-video__call-controls" }, { children: [_jsx(RecordCallButton, { call: call }), _jsx(CallStatsButton, {}), _jsx(ScreenShareButton, { call: call }), _jsx(SpeakingWhileMutedNotification, { children: _jsx(ToggleAudioPublishingButton, {}) }), _jsx(ToggleCameraPublishingButton, {}), _jsx(CancelCallButton, { call: call, onLeave: onLeave })] })));
7
+ };
8
+ //# sourceMappingURL=CallControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../src/components/CallControls/CallControls.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAOjE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEhC,OAAO,CACL,6BAAK,SAAS,EAAC,0BAA0B,iBACvC,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,GAAI,EAChC,KAAC,eAAe,KAAG,EACnB,KAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,GAAI,EACjC,KAAC,8BAA8B,cAC7B,KAAC,2BAA2B,KAAG,GACA,EACjC,KAAC,4BAA4B,KAAG,EAChC,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,KAC9C,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type CallStatsButtonProps = {
3
+ caption?: string;
4
+ };
5
+ export declare const CallStatsButton: ({ caption, }: CallStatsButtonProps) => JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { CallStats } from '../StreamCall/CallStats';
4
+ import { CompositeButton, IconButton } from '../Button/';
5
+ import { MenuToggle } from '../Menu';
6
+ export const CallStatsButton = ({ caption = 'Stats', }) => {
7
+ return (_jsx(MenuToggle, Object.assign({ placement: "top-end", ToggleButton: ToggleMenuButton }, { children: _jsx(CallStats, {}) })));
8
+ };
9
+ const ToggleMenuButton = forwardRef(({ menuShown }, ref) => (_jsx(CompositeButton, Object.assign({ ref: ref, active: menuShown, caption: 'Stats' }, { children: _jsx(IconButton, { icon: "stats", title: "Statistics" }) }))));
10
+ //# sourceMappingURL=CallStatsButton.js.map
@@ -0,0 +1 @@
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,yBAAyB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,UAAU,EAAyB,MAAM,SAAS,CAAC;AAM5D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,OAAO,GAAG,OAAO,GACI,EAAE,EAAE;IACzB,OAAO,CACL,KAAC,UAAU,kBAAC,SAAS,EAAC,SAAS,EAAC,YAAY,EAAE,gBAAgB,gBAC5D,KAAC,SAAS,KAAG,IACF,CACd,CAAC;AACJ,CAAC,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"}
@@ -0,0 +1,8 @@
1
+ import { MouseEventHandler } from 'react';
2
+ import { Call } from '@stream-io/video-client';
3
+ export type CancelCallButtonProps = {
4
+ call: Call;
5
+ onClick?: MouseEventHandler<HTMLButtonElement>;
6
+ onLeave?: () => void;
7
+ };
8
+ export declare const CancelCallButton: ({ call, onClick, onLeave, }: CancelCallButtonProps) => JSX.Element;
@@ -0,0 +1,25 @@
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
+ export const CancelCallButton = ({ call, onClick, onLeave, }) => {
14
+ const handleClick = useCallback((e) => __awaiter(void 0, void 0, void 0, function* () {
15
+ if (onClick) {
16
+ onClick(e);
17
+ }
18
+ else if (call) {
19
+ yield call.leave();
20
+ onLeave === null || onLeave === void 0 ? void 0 : onLeave();
21
+ }
22
+ }), [onClick, onLeave, call]);
23
+ return _jsx(IconButton, { icon: "call-end", variant: "danger", onClick: handleClick });
24
+ };
25
+ //# sourceMappingURL=CancelCallButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CancelCallButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/CancelCallButton.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAqB,WAAW,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,GACe,EAAE,EAAE;IAC1B,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,KAAC,UAAU,IAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAE,WAAW,GAAI,CAAC;AAC/E,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { StreamReaction } from '@stream-io/video-client';
3
+ export declare const defaultReactions: StreamReaction[];
4
+ export interface ReactionsButtonProps {
5
+ reactions?: StreamReaction[];
6
+ }
7
+ export declare const ReactionsButton: ({ reactions, }: ReactionsButtonProps) => JSX.Element;
8
+ export interface DefaultReactionsMenuProps {
9
+ reactions: StreamReaction[];
10
+ }
11
+ export declare const DefaultReactionsMenu: ({ reactions, }: DefaultReactionsMenuProps) => JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { OwnCapability } from '@stream-io/video-client';
3
+ import { useCall } from '@stream-io/video-react-bindings';
4
+ import { CompositeButton, IconButton } from '../Button';
5
+ import { defaultEmojiReactions } from '../Reaction';
6
+ import { Restricted } from '../Moderation';
7
+ export const defaultReactions = [
8
+ {
9
+ type: 'reaction',
10
+ emoji_code: ':like:',
11
+ },
12
+ {
13
+ // TODO OL: use `prompt` type?
14
+ type: 'raised-hand',
15
+ emoji_code: ':raise-hand:',
16
+ },
17
+ {
18
+ type: 'reaction',
19
+ emoji_code: ':fireworks:',
20
+ },
21
+ ];
22
+ export const ReactionsButton = ({ reactions = defaultReactions, }) => {
23
+ return (_jsx(Restricted, Object.assign({ requiredGrants: [OwnCapability.CREATE_REACTION] }, { children: _jsx(CompositeButton, Object.assign({ active: false, caption: "Reactions", menuPlacement: "top-start", Menu: _jsx(DefaultReactionsMenu, { reactions: reactions }) }, { children: _jsx(IconButton, { icon: "reactions", title: "Reactions", onClick: () => {
24
+ console.log('Reactions');
25
+ } }) })) })));
26
+ };
27
+ export const DefaultReactionsMenu = ({ reactions, }) => {
28
+ const call = useCall();
29
+ 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: () => {
30
+ call === null || call === void 0 ? void 0 : call.sendReaction(reaction);
31
+ } }, { children: reaction.emoji_code && defaultEmojiReactions[reaction.emoji_code] }), reaction.emoji_code))) })));
32
+ };
33
+ //# sourceMappingURL=ReactionsButton.js.map
@@ -0,0 +1 @@
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,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,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;CACF,CAAC;AAMF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,GAAG,gBAAgB,GACP,EAAE,EAAE;IACzB,OAAO,CACL,KAAC,UAAU,kBAAC,cAAc,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,gBACzD,KAAC,eAAe,kBACd,MAAM,EAAE,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,aAAa,EAAC,WAAW,EACzB,IAAI,EAAE,KAAC,oBAAoB,IAAC,SAAS,EAAE,SAAS,GAAI,gBAEpD,KAAC,UAAU,IACT,IAAI,EAAC,WAAW,EAChB,KAAK,EAAC,WAAW,EACjB,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,qBAAqB,CAAC,QAAQ,CAAC,UAAU,CAAC,KAP7D,QAAQ,CAAC,UAAU,CAQjB,CACV,CAAC,IACE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Call } from '@stream-io/video-client';
3
+ export type RecordCallButtonProps = {
4
+ call: Call;
5
+ caption?: string;
6
+ };
7
+ export declare const RecordCallButton: ({ call, caption, }: RecordCallButtonProps) => JSX.Element;
@@ -0,0 +1,51 @@
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, useEffect, useState } from 'react';
12
+ import { OwnCapability } from '@stream-io/video-client';
13
+ import { useIsCallRecordingInProgress } from '@stream-io/video-react-bindings';
14
+ import { CompositeButton, IconButton } from '../Button/';
15
+ import { LoadingIndicator } from '../LoadingIndicator';
16
+ import { Restricted } from '../Moderation';
17
+ export const RecordCallButton = ({ call, caption = 'Record', }) => {
18
+ const isCallRecordingInProgress = useIsCallRecordingInProgress();
19
+ const [isAwaitingResponse, setIsAwaitingResponse] = useState(false);
20
+ useEffect(() => {
21
+ // we wait until call.recording_started/stopped event to flips the
22
+ // `isCallRecordingInProgress` state variable.
23
+ // Once the flip happens, we remove the loading indicator
24
+ setIsAwaitingResponse((isAwaiting) => {
25
+ if (isAwaiting)
26
+ return false;
27
+ return isAwaiting;
28
+ });
29
+ }, [isCallRecordingInProgress]);
30
+ const toggleRecording = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
31
+ try {
32
+ setIsAwaitingResponse(true);
33
+ if (isCallRecordingInProgress) {
34
+ yield call.stopRecording();
35
+ }
36
+ else {
37
+ yield call.startRecording();
38
+ }
39
+ }
40
+ catch (e) {
41
+ console.error(`Failed start recording`, e);
42
+ }
43
+ }), [call, isCallRecordingInProgress]);
44
+ return (_jsx(Restricted, Object.assign({ requiredGrants: [
45
+ OwnCapability.START_RECORD_CALL,
46
+ OwnCapability.STOP_RECORD_CALL,
47
+ ] }, { children: _jsx(CompositeButton, Object.assign({ active: isCallRecordingInProgress, caption: caption }, { children: isAwaitingResponse ? (_jsx(LoadingIndicator, { tooltip: isCallRecordingInProgress
48
+ ? 'Waiting for recording to stop... '
49
+ : 'Waiting for recording to start...' })) : (_jsx(IconButton, { icon: isCallRecordingInProgress ? 'recording-on' : 'recording-off', title: "Record call", onClick: toggleRecording })) })) })));
50
+ };
51
+ //# sourceMappingURL=RecordCallButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecordCallButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/RecordCallButton.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EA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,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,mCAAmC;oBACrC,CAAC,CAAC,mCAAmC,GAEzC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IACT,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,eAAe,EAClE,KAAK,EAAC,aAAa,EACnB,OAAO,EAAE,eAAe,GACxB,CACH,IACe,IACP,CACd,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Call } from '@stream-io/video-client';
3
+ export type ScreenShareButtonProps = {
4
+ call: Call;
5
+ caption?: string;
6
+ };
7
+ export declare const ScreenShareButton: ({ call, caption, }: ScreenShareButtonProps) => JSX.Element;
@@ -0,0 +1,54 @@
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 { useEffect, useState } from 'react';
12
+ import { getScreenShareStream, OwnCapability, SfuModels, } from '@stream-io/video-client';
13
+ import { useHasOngoingScreenShare, useHasPermissions, useLocalParticipant, } from '@stream-io/video-react-bindings';
14
+ import { CompositeButton, IconButton } from '../Button/';
15
+ import { PermissionNotification } from '../Notification';
16
+ import { Restricted } from '../Moderation';
17
+ export const ScreenShareButton = ({ call, caption = 'Screen Share', }) => {
18
+ const localParticipant = useLocalParticipant();
19
+ const isSomeoneScreenSharing = useHasOngoingScreenShare();
20
+ const isScreenSharing = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE);
21
+ const [isAwaitingApproval, setIsAwaitingApproval] = useState(false);
22
+ const hasPermission = useHasPermissions(OwnCapability.SCREENSHARE);
23
+ useEffect(() => {
24
+ if (hasPermission) {
25
+ setIsAwaitingApproval(false);
26
+ }
27
+ }, [hasPermission]);
28
+ return (_jsx(Restricted, Object.assign({ requiredGrants: [OwnCapability.SCREENSHARE] }, { children: _jsx(PermissionNotification, Object.assign({ permission: OwnCapability.SCREENSHARE, isAwaitingApproval: isAwaitingApproval, messageApproved: "You can now share your screen.", messageAwaitingApproval: "Awaiting for an approval to share screen.", messageRevoked: "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: "Share screen", disabled: !isScreenSharing && isSomeoneScreenSharing, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
29
+ if (!hasPermission &&
30
+ call.permissionsContext.canRequest(OwnCapability.SCREENSHARE)) {
31
+ setIsAwaitingApproval(true);
32
+ yield call
33
+ .requestPermissions({
34
+ permissions: [OwnCapability.SCREENSHARE],
35
+ })
36
+ .catch((reason) => {
37
+ console.log('RequestPermissions failed', reason);
38
+ });
39
+ return;
40
+ }
41
+ if (!isScreenSharing && hasPermission) {
42
+ const stream = yield getScreenShareStream().catch((e) => {
43
+ console.log(`Can't share screen: ${e}`);
44
+ });
45
+ if (stream) {
46
+ yield call.publishScreenShareStream(stream);
47
+ }
48
+ }
49
+ else {
50
+ yield call.stopPublish(SfuModels.TrackType.SCREEN_SHARE);
51
+ }
52
+ }) }) })) })) })));
53
+ };
54
+ //# sourceMappingURL=ScreenShareButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScreenShareButton.js","sourceRoot":"","sources":["../../../../src/components/CallControls/ScreenShareButton.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAEL,oBAAoB,EACpB,aAAa,EACb,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,IAAI,EACJ,OAAO,GAAG,cAAc,GACD,EAAE,EAAE;IAC3B,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,sBAAsB,GAAG,wBAAwB,EAAE,CAAC;IAC1D,MAAM,eAAe,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,eAAe,CAAC,QAAQ,CAChE,SAAS,CAAC,SAAS,CAAC,YAAY,CACjC,CAAC;IAEF,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpE,MAAM,aAAa,GAAG,iBAAiB,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACnE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,EAAE;YACjB,qBAAqB,CAAC,KAAK,CAAC,CAAC;SAC9B;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IACpB,OAAO,CACL,KAA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