@stream-io/video-react-native-sdk 0.0.1-alpha.141

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 (360) hide show
  1. package/CHANGELOG.md +739 -0
  2. package/LICENSE +219 -0
  3. package/README.md +19 -0
  4. package/dist/__tests__/components/ActiveCall.test.d.ts +1 -0
  5. package/dist/__tests__/components/ActiveCall.test.js +89 -0
  6. package/dist/__tests__/components/ActiveCall.test.js.map +1 -0
  7. package/dist/__tests__/components/Avatar.test.d.ts +1 -0
  8. package/dist/__tests__/components/Avatar.test.js +34 -0
  9. package/dist/__tests__/components/Avatar.test.js.map +1 -0
  10. package/dist/__tests__/components/ParticipantView.test.d.ts +1 -0
  11. package/dist/__tests__/components/ParticipantView.test.js +66 -0
  12. package/dist/__tests__/components/ParticipantView.test.js.map +1 -0
  13. package/dist/__tests__/mocks/call.d.ts +2 -0
  14. package/dist/__tests__/mocks/call.js +21 -0
  15. package/dist/__tests__/mocks/call.js.map +1 -0
  16. package/dist/__tests__/mocks/client.d.ts +2 -0
  17. package/dist/__tests__/mocks/client.js +31 -0
  18. package/dist/__tests__/mocks/client.js.map +1 -0
  19. package/dist/__tests__/mocks/participant.d.ts +3 -0
  20. package/dist/__tests__/mocks/participant.js +25 -0
  21. package/dist/__tests__/mocks/participant.js.map +1 -0
  22. package/dist/__tests__/utils/RNTLTools.d.ts +15 -0
  23. package/dist/__tests__/utils/RNTLTools.js +54 -0
  24. package/dist/__tests__/utils/RNTLTools.js.map +1 -0
  25. package/dist/index.d.ts +9 -0
  26. package/dist/index.js +39 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/jest-setup.d.ts +1 -0
  29. package/dist/jest-setup.js +34 -0
  30. package/dist/jest-setup.js.map +1 -0
  31. package/dist/src/components/ActiveCall.d.ts +18 -0
  32. package/dist/src/components/ActiveCall.js +117 -0
  33. package/dist/src/components/ActiveCall.js.map +1 -0
  34. package/dist/src/components/Avatar.d.ts +25 -0
  35. package/dist/src/components/Avatar.js +55 -0
  36. package/dist/src/components/Avatar.js.map +1 -0
  37. package/dist/src/components/CallControlsButton.d.ts +22 -0
  38. package/dist/src/components/CallControlsButton.js +43 -0
  39. package/dist/src/components/CallControlsButton.js.map +1 -0
  40. package/dist/src/components/CallControlsView.d.ts +9 -0
  41. package/dist/src/components/CallControlsView.js +95 -0
  42. package/dist/src/components/CallControlsView.js.map +1 -0
  43. package/dist/src/components/CallParticipantsBadge.d.ts +1 -0
  44. package/dist/src/components/CallParticipantsBadge.js +48 -0
  45. package/dist/src/components/CallParticipantsBadge.js.map +1 -0
  46. package/dist/src/components/CallParticipantsInfoView.d.ts +21 -0
  47. package/dist/src/components/CallParticipantsInfoView.js +213 -0
  48. package/dist/src/components/CallParticipantsInfoView.js.map +1 -0
  49. package/dist/src/components/CallParticipantsList.d.ts +25 -0
  50. package/dist/src/components/CallParticipantsList.js +124 -0
  51. package/dist/src/components/CallParticipantsList.js.map +1 -0
  52. package/dist/src/components/CallParticipantsOptions.d.ts +8 -0
  53. package/dist/src/components/CallParticipantsOptions.js +189 -0
  54. package/dist/src/components/CallParticipantsOptions.js.map +1 -0
  55. package/dist/src/components/CallParticipantsSpotlightView.d.ts +1 -0
  56. package/dist/src/components/CallParticipantsSpotlightView.js +40 -0
  57. package/dist/src/components/CallParticipantsSpotlightView.js.map +1 -0
  58. package/dist/src/components/CallParticipantsView.d.ts +1 -0
  59. package/dist/src/components/CallParticipantsView.js +31 -0
  60. package/dist/src/components/CallParticipantsView.js.map +1 -0
  61. package/dist/src/components/IncomingCallView.d.ts +1 -0
  62. package/dist/src/components/IncomingCallView.js +98 -0
  63. package/dist/src/components/IncomingCallView.js.map +1 -0
  64. package/dist/src/components/LobbyView.d.ts +1 -0
  65. package/dist/src/components/LobbyView.js +215 -0
  66. package/dist/src/components/LobbyView.js.map +1 -0
  67. package/dist/src/components/LocalVideoView.d.ts +34 -0
  68. package/dist/src/components/LocalVideoView.js +100 -0
  69. package/dist/src/components/LocalVideoView.js.map +1 -0
  70. package/dist/src/components/NetworkQualityIndicator.d.ts +8 -0
  71. package/dist/src/components/NetworkQualityIndicator.js +36 -0
  72. package/dist/src/components/NetworkQualityIndicator.js.map +1 -0
  73. package/dist/src/components/OutgoingCallView.d.ts +1 -0
  74. package/dist/src/components/OutgoingCallView.js +103 -0
  75. package/dist/src/components/OutgoingCallView.js.map +1 -0
  76. package/dist/src/components/ParticipantReaction.d.ts +7 -0
  77. package/dist/src/components/ParticipantReaction.js +45 -0
  78. package/dist/src/components/ParticipantReaction.js.map +1 -0
  79. package/dist/src/components/ParticipantView.d.ts +42 -0
  80. package/dist/src/components/ParticipantView.js +256 -0
  81. package/dist/src/components/ParticipantView.js.map +1 -0
  82. package/dist/src/components/ReactionsModal.d.ts +7 -0
  83. package/dist/src/components/ReactionsModal.js +65 -0
  84. package/dist/src/components/ReactionsModal.js.map +1 -0
  85. package/dist/src/components/ToggleAudioButton.d.ts +1 -0
  86. package/dist/src/components/ToggleAudioButton.js +78 -0
  87. package/dist/src/components/ToggleAudioButton.js.map +1 -0
  88. package/dist/src/components/ToggleVideoButton.d.ts +1 -0
  89. package/dist/src/components/ToggleVideoButton.js +78 -0
  90. package/dist/src/components/ToggleVideoButton.js.map +1 -0
  91. package/dist/src/components/UserInfoView.d.ts +13 -0
  92. package/dist/src/components/UserInfoView.js +82 -0
  93. package/dist/src/components/UserInfoView.js.map +1 -0
  94. package/dist/src/components/VideoRenderer.d.ts +65 -0
  95. package/dist/src/components/VideoRenderer.js +18 -0
  96. package/dist/src/components/VideoRenderer.js.map +1 -0
  97. package/dist/src/components/index.d.ts +12 -0
  98. package/dist/src/components/index.js +29 -0
  99. package/dist/src/components/index.js.map +1 -0
  100. package/dist/src/constants/A11yLabels.d.ts +20 -0
  101. package/dist/src/constants/A11yLabels.js +29 -0
  102. package/dist/src/constants/A11yLabels.js.map +1 -0
  103. package/dist/src/constants/index.d.ts +11 -0
  104. package/dist/src/constants/index.js +30 -0
  105. package/dist/src/constants/index.js.map +1 -0
  106. package/dist/src/contexts/StreamVideoContext/createStoreContext.d.ts +14 -0
  107. package/dist/src/contexts/StreamVideoContext/createStoreContext.js +100 -0
  108. package/dist/src/contexts/StreamVideoContext/createStoreContext.js.map +1 -0
  109. package/dist/src/contexts/StreamVideoContext/index.d.ts +30 -0
  110. package/dist/src/contexts/StreamVideoContext/index.js +18 -0
  111. package/dist/src/contexts/StreamVideoContext/index.js.map +1 -0
  112. package/dist/src/contexts/index.d.ts +1 -0
  113. package/dist/src/contexts/index.js +18 -0
  114. package/dist/src/contexts/index.js.map +1 -0
  115. package/dist/src/hooks/index.d.ts +10 -0
  116. package/dist/src/hooks/index.js +27 -0
  117. package/dist/src/hooks/index.js.map +1 -0
  118. package/dist/src/hooks/useCallControls.d.ts +14 -0
  119. package/dist/src/hooks/useCallControls.js +148 -0
  120. package/dist/src/hooks/useCallControls.js.map +1 -0
  121. package/dist/src/hooks/useCallCycleEffect.d.ts +8 -0
  122. package/dist/src/hooks/useCallCycleEffect.js +62 -0
  123. package/dist/src/hooks/useCallCycleEffect.js.map +1 -0
  124. package/dist/src/hooks/useCallKeep.d.ts +11 -0
  125. package/dist/src/hooks/useCallKeep.js +41 -0
  126. package/dist/src/hooks/useCallKeep.js.map +1 -0
  127. package/dist/src/hooks/useCreateStreamVideoClient.d.ts +33 -0
  128. package/dist/src/hooks/useCreateStreamVideoClient.js +40 -0
  129. package/dist/src/hooks/useCreateStreamVideoClient.js.map +1 -0
  130. package/dist/src/hooks/useIncallManager.d.ts +13 -0
  131. package/dist/src/hooks/useIncallManager.js +24 -0
  132. package/dist/src/hooks/useIncallManager.js.map +1 -0
  133. package/dist/src/hooks/useLocalVideoStream.d.ts +7 -0
  134. package/dist/src/hooks/useLocalVideoStream.js +34 -0
  135. package/dist/src/hooks/useLocalVideoStream.js.map +1 -0
  136. package/dist/src/hooks/useMutingState.d.ts +12 -0
  137. package/dist/src/hooks/useMutingState.js +25 -0
  138. package/dist/src/hooks/useMutingState.js.map +1 -0
  139. package/dist/src/hooks/usePermissionNotification.d.ts +18 -0
  140. package/dist/src/hooks/usePermissionNotification.js +33 -0
  141. package/dist/src/hooks/usePermissionNotification.js.map +1 -0
  142. package/dist/src/hooks/usePermissionRequest.d.ts +1 -0
  143. package/dist/src/hooks/usePermissionRequest.js +62 -0
  144. package/dist/src/hooks/usePermissionRequest.js.map +1 -0
  145. package/dist/src/hooks/usePublishMediaStreams.d.ts +6 -0
  146. package/dist/src/hooks/usePublishMediaStreams.js +49 -0
  147. package/dist/src/hooks/usePublishMediaStreams.js.map +1 -0
  148. package/dist/src/icons/ArrowRight.d.ts +5 -0
  149. package/dist/src/icons/ArrowRight.js +9 -0
  150. package/dist/src/icons/ArrowRight.js.map +1 -0
  151. package/dist/src/icons/CameraSwitch.d.ts +5 -0
  152. package/dist/src/icons/CameraSwitch.js +9 -0
  153. package/dist/src/icons/CameraSwitch.js.map +1 -0
  154. package/dist/src/icons/Chat.d.ts +5 -0
  155. package/dist/src/icons/Chat.js +9 -0
  156. package/dist/src/icons/Chat.js.map +1 -0
  157. package/dist/src/icons/Cross.d.ts +5 -0
  158. package/dist/src/icons/Cross.js +9 -0
  159. package/dist/src/icons/Cross.js.map +1 -0
  160. package/dist/src/icons/Mic.d.ts +5 -0
  161. package/dist/src/icons/Mic.js +10 -0
  162. package/dist/src/icons/Mic.js.map +1 -0
  163. package/dist/src/icons/MicOff.d.ts +5 -0
  164. package/dist/src/icons/MicOff.js +9 -0
  165. package/dist/src/icons/MicOff.js.map +1 -0
  166. package/dist/src/icons/Participants.d.ts +5 -0
  167. package/dist/src/icons/Participants.js +9 -0
  168. package/dist/src/icons/Participants.js.map +1 -0
  169. package/dist/src/icons/Phone.d.ts +5 -0
  170. package/dist/src/icons/Phone.js +9 -0
  171. package/dist/src/icons/Phone.js.map +1 -0
  172. package/dist/src/icons/PhoneDown.d.ts +5 -0
  173. package/dist/src/icons/PhoneDown.js +10 -0
  174. package/dist/src/icons/PhoneDown.js.map +1 -0
  175. package/dist/src/icons/Pin.d.ts +5 -0
  176. package/dist/src/icons/Pin.js +9 -0
  177. package/dist/src/icons/Pin.js.map +1 -0
  178. package/dist/src/icons/Reaction.d.ts +5 -0
  179. package/dist/src/icons/Reaction.js +9 -0
  180. package/dist/src/icons/Reaction.js.map +1 -0
  181. package/dist/src/icons/ScreenShare.d.ts +5 -0
  182. package/dist/src/icons/ScreenShare.js +40 -0
  183. package/dist/src/icons/ScreenShare.js.map +1 -0
  184. package/dist/src/icons/Settings.d.ts +5 -0
  185. package/dist/src/icons/Settings.js +34 -0
  186. package/dist/src/icons/Settings.js.map +1 -0
  187. package/dist/src/icons/Spotlight.d.ts +5 -0
  188. package/dist/src/icons/Spotlight.js +9 -0
  189. package/dist/src/icons/Spotlight.js.map +1 -0
  190. package/dist/src/icons/ThreeDots.d.ts +5 -0
  191. package/dist/src/icons/ThreeDots.js +11 -0
  192. package/dist/src/icons/ThreeDots.js.map +1 -0
  193. package/dist/src/icons/Video.d.ts +5 -0
  194. package/dist/src/icons/Video.js +9 -0
  195. package/dist/src/icons/Video.js.map +1 -0
  196. package/dist/src/icons/VideoDisabled.d.ts +5 -0
  197. package/dist/src/icons/VideoDisabled.js +10 -0
  198. package/dist/src/icons/VideoDisabled.js.map +1 -0
  199. package/dist/src/icons/VideoOff.d.ts +5 -0
  200. package/dist/src/icons/VideoOff.js +10 -0
  201. package/dist/src/icons/VideoOff.js.map +1 -0
  202. package/dist/src/icons/VideoSlash.d.ts +5 -0
  203. package/dist/src/icons/VideoSlash.js +10 -0
  204. package/dist/src/icons/VideoSlash.js.map +1 -0
  205. package/dist/src/icons/index.d.ts +19 -0
  206. package/dist/src/icons/index.js +36 -0
  207. package/dist/src/icons/index.js.map +1 -0
  208. package/dist/src/providers/MediaDevices.d.ts +9 -0
  209. package/dist/src/providers/MediaDevices.js +43 -0
  210. package/dist/src/providers/MediaDevices.js.map +1 -0
  211. package/dist/src/providers/StreamCall.d.ts +81 -0
  212. package/dist/src/providers/StreamCall.js +74 -0
  213. package/dist/src/providers/StreamCall.js.map +1 -0
  214. package/dist/src/providers/StreamVideo.d.ts +10 -0
  215. package/dist/src/providers/StreamVideo.js +66 -0
  216. package/dist/src/providers/StreamVideo.js.map +1 -0
  217. package/dist/src/providers/index.d.ts +2 -0
  218. package/dist/src/providers/index.js +19 -0
  219. package/dist/src/providers/index.js.map +1 -0
  220. package/dist/src/theme/avatar.d.ts +2 -0
  221. package/dist/src/theme/avatar.js +11 -0
  222. package/dist/src/theme/avatar.js.map +1 -0
  223. package/dist/src/theme/button.d.ts +2 -0
  224. package/dist/src/theme/button.js +11 -0
  225. package/dist/src/theme/button.js.map +1 -0
  226. package/dist/src/theme/colors.d.ts +3 -0
  227. package/dist/src/theme/colors.js +49 -0
  228. package/dist/src/theme/colors.js.map +1 -0
  229. package/dist/src/theme/constants.d.ts +47 -0
  230. package/dist/src/theme/constants.js +54 -0
  231. package/dist/src/theme/constants.js.map +1 -0
  232. package/dist/src/theme/fonts.d.ts +2 -0
  233. package/dist/src/theme/fonts.js +67 -0
  234. package/dist/src/theme/fonts.js.map +1 -0
  235. package/dist/src/theme/icon.d.ts +2 -0
  236. package/dist/src/theme/icon.js +11 -0
  237. package/dist/src/theme/icon.js.map +1 -0
  238. package/dist/src/theme/index.d.ts +2 -0
  239. package/dist/src/theme/index.js +26 -0
  240. package/dist/src/theme/index.js.map +1 -0
  241. package/dist/src/theme/margin.d.ts +2 -0
  242. package/dist/src/theme/margin.js +11 -0
  243. package/dist/src/theme/margin.js.map +1 -0
  244. package/dist/src/theme/padding.d.ts +2 -0
  245. package/dist/src/theme/padding.js +11 -0
  246. package/dist/src/theme/padding.js.map +1 -0
  247. package/dist/src/theme/rounded.d.ts +2 -0
  248. package/dist/src/theme/rounded.js +11 -0
  249. package/dist/src/theme/rounded.js.map +1 -0
  250. package/dist/src/theme/spacing.d.ts +2 -0
  251. package/dist/src/theme/spacing.js +11 -0
  252. package/dist/src/theme/spacing.js.map +1 -0
  253. package/dist/src/theme/types.d.ts +45 -0
  254. package/dist/src/theme/types.js +3 -0
  255. package/dist/src/theme/types.js.map +1 -0
  256. package/dist/src/utils/StreamVideoRN.d.ts +25 -0
  257. package/dist/src/utils/StreamVideoRN.js +23 -0
  258. package/dist/src/utils/StreamVideoRN.js.map +1 -0
  259. package/dist/src/utils/hooks/index.d.ts +3 -0
  260. package/dist/src/utils/hooks/index.js +20 -0
  261. package/dist/src/utils/hooks/index.js.map +1 -0
  262. package/dist/src/utils/hooks/useAppStateListener.d.ts +1 -0
  263. package/dist/src/utils/hooks/useAppStateListener.js +41 -0
  264. package/dist/src/utils/hooks/useAppStateListener.js.map +1 -0
  265. package/dist/src/utils/hooks/useDebouncedValue.d.ts +7 -0
  266. package/dist/src/utils/hooks/useDebouncedValue.js +22 -0
  267. package/dist/src/utils/hooks/useDebouncedValue.js.map +1 -0
  268. package/dist/src/utils/hooks/usePrevious.d.ts +1 -0
  269. package/dist/src/utils/hooks/usePrevious.js +13 -0
  270. package/dist/src/utils/hooks/usePrevious.js.map +1 -0
  271. package/dist/src/utils/index.d.ts +5 -0
  272. package/dist/src/utils/index.js +53 -0
  273. package/dist/src/utils/index.js.map +1 -0
  274. package/dist/src/utils/verifyAndroidBluetoothPermissions.d.ts +1 -0
  275. package/dist/src/utils/verifyAndroidBluetoothPermissions.js +30 -0
  276. package/dist/src/utils/verifyAndroidBluetoothPermissions.js.map +1 -0
  277. package/index.ts +22 -0
  278. package/package.json +70 -0
  279. package/src/components/ActiveCall.tsx +122 -0
  280. package/src/components/Avatar.tsx +88 -0
  281. package/src/components/CallControlsButton.tsx +72 -0
  282. package/src/components/CallControlsView.tsx +128 -0
  283. package/src/components/CallParticipantsBadge.tsx +57 -0
  284. package/src/components/CallParticipantsInfoView.tsx +287 -0
  285. package/src/components/CallParticipantsList.tsx +172 -0
  286. package/src/components/CallParticipantsOptions.tsx +248 -0
  287. package/src/components/CallParticipantsSpotlightView.tsx +53 -0
  288. package/src/components/CallParticipantsView.tsx +30 -0
  289. package/src/components/IncomingCallView.tsx +133 -0
  290. package/src/components/LobbyView.tsx +236 -0
  291. package/src/components/LocalVideoView.tsx +141 -0
  292. package/src/components/NetworkQualityIndicator.tsx +72 -0
  293. package/src/components/OutgoingCallView.tsx +133 -0
  294. package/src/components/ParticipantReaction.tsx +59 -0
  295. package/src/components/ParticipantView.tsx +315 -0
  296. package/src/components/ReactionsModal.tsx +90 -0
  297. package/src/components/ToggleAudioButton.tsx +103 -0
  298. package/src/components/ToggleVideoButton.tsx +103 -0
  299. package/src/components/UserInfoView.tsx +118 -0
  300. package/src/components/VideoRenderer.tsx +85 -0
  301. package/src/components/index.ts +12 -0
  302. package/src/constants/A11yLabels.ts +24 -0
  303. package/src/constants/index.ts +28 -0
  304. package/src/contexts/StreamVideoContext/createStoreContext.tsx +117 -0
  305. package/src/contexts/StreamVideoContext/index.tsx +37 -0
  306. package/src/contexts/index.ts +1 -0
  307. package/src/hooks/index.ts +10 -0
  308. package/src/hooks/useCallControls.tsx +186 -0
  309. package/src/hooks/useCallCycleEffect.tsx +68 -0
  310. package/src/hooks/useCallKeep.tsx +51 -0
  311. package/src/hooks/useCreateStreamVideoClient.tsx +77 -0
  312. package/src/hooks/useIncallManager.tsx +23 -0
  313. package/src/hooks/useLocalVideoStream.ts +36 -0
  314. package/src/hooks/useMutingState.ts +24 -0
  315. package/src/hooks/usePermissionNotification.tsx +53 -0
  316. package/src/hooks/usePermissionRequest.tsx +67 -0
  317. package/src/hooks/usePublishMediaStreams.ts +59 -0
  318. package/src/icons/ArrowRight.tsx +16 -0
  319. package/src/icons/CameraSwitch.tsx +14 -0
  320. package/src/icons/Chat.tsx +14 -0
  321. package/src/icons/Cross.tsx +14 -0
  322. package/src/icons/Mic.tsx +18 -0
  323. package/src/icons/MicOff.tsx +14 -0
  324. package/src/icons/Participants.tsx +16 -0
  325. package/src/icons/Phone.tsx +14 -0
  326. package/src/icons/PhoneDown.tsx +15 -0
  327. package/src/icons/Pin.tsx +16 -0
  328. package/src/icons/Reaction.tsx +14 -0
  329. package/src/icons/ScreenShare.tsx +32 -0
  330. package/src/icons/Settings.tsx +13 -0
  331. package/src/icons/Spotlight.tsx +16 -0
  332. package/src/icons/ThreeDots.tsx +13 -0
  333. package/src/icons/Video.tsx +14 -0
  334. package/src/icons/VideoDisabled.tsx +22 -0
  335. package/src/icons/VideoOff.tsx +20 -0
  336. package/src/icons/VideoSlash.tsx +15 -0
  337. package/src/icons/index.tsx +19 -0
  338. package/src/providers/MediaDevices.tsx +45 -0
  339. package/src/providers/StreamCall.tsx +136 -0
  340. package/src/providers/StreamVideo.tsx +50 -0
  341. package/src/providers/index.ts +2 -0
  342. package/src/theme/avatar.ts +9 -0
  343. package/src/theme/button.ts +9 -0
  344. package/src/theme/colors.ts +49 -0
  345. package/src/theme/constants.ts +51 -0
  346. package/src/theme/fonts.ts +65 -0
  347. package/src/theme/icon.ts +9 -0
  348. package/src/theme/index.ts +25 -0
  349. package/src/theme/margin.ts +9 -0
  350. package/src/theme/padding.ts +9 -0
  351. package/src/theme/rounded.ts +9 -0
  352. package/src/theme/spacing.ts +9 -0
  353. package/src/theme/types.ts +64 -0
  354. package/src/utils/StreamVideoRN.ts +35 -0
  355. package/src/utils/hooks/index.ts +3 -0
  356. package/src/utils/hooks/useAppStateListener.ts +48 -0
  357. package/src/utils/hooks/useDebouncedValue.ts +21 -0
  358. package/src/utils/hooks/usePrevious.ts +11 -0
  359. package/src/utils/index.ts +45 -0
  360. package/src/utils/verifyAndroidBluetoothPermissions.ts +31 -0
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fonts = void 0;
4
+ const react_native_1 = require("react-native");
5
+ exports.fonts = react_native_1.Platform.select({
6
+ ios: {
7
+ heading4: {
8
+ fontSize: 34,
9
+ fontWeight: '400',
10
+ },
11
+ heading5: {
12
+ fontSize: 24,
13
+ fontWeight: '400',
14
+ },
15
+ heading6: {
16
+ fontSize: 20,
17
+ fontWeight: '500',
18
+ },
19
+ subtitle: {
20
+ fontSize: 16,
21
+ fontWeight: '400',
22
+ },
23
+ subtitleBold: {
24
+ fontSize: 16,
25
+ fontWeight: '500',
26
+ },
27
+ bodyBold: {
28
+ fontSize: 16,
29
+ fontWeight: '600',
30
+ },
31
+ caption: {
32
+ fontSize: 10,
33
+ fontWeight: '400',
34
+ },
35
+ },
36
+ default: {
37
+ heading4: {
38
+ fontSize: 34,
39
+ fontWeight: '400',
40
+ },
41
+ heading5: {
42
+ fontSize: 24,
43
+ fontWeight: '400',
44
+ },
45
+ heading6: {
46
+ fontSize: 20,
47
+ fontWeight: '500',
48
+ },
49
+ subtitle: {
50
+ fontSize: 16,
51
+ fontWeight: '400',
52
+ },
53
+ subtitleBold: {
54
+ fontSize: 16,
55
+ fontWeight: '500',
56
+ },
57
+ bodyBold: {
58
+ fontSize: 16,
59
+ fontWeight: '600',
60
+ },
61
+ caption: {
62
+ fontSize: 10,
63
+ fontWeight: '400',
64
+ },
65
+ },
66
+ });
67
+ //# sourceMappingURL=fonts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../../src/theme/fonts.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAG3B,QAAA,KAAK,GAAiC,uBAAQ,CAAC,MAAM,CAAC;IACjE,GAAG,EAAE;QACH,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;KACF;IACD,OAAO,EAAE;QACP,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;QACD,OAAO,EAAE;YACP,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;SAClB;KACF;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IconScheme } from './types';
2
+ export declare const icon: IconScheme;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.icon = void 0;
4
+ exports.icon = {
5
+ xs: { height: 15, width: 15 },
6
+ sm: { height: 20, width: 20 },
7
+ md: { height: 25, width: 25 },
8
+ lg: { height: 30, width: 30 },
9
+ xl: { height: 35, width: 35 },
10
+ };
11
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/theme/icon.ts"],"names":[],"mappings":";;;AAEa,QAAA,IAAI,GAAe;IAC9B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Theme } from './types';
2
+ export declare const theme: Theme;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.theme = void 0;
4
+ const colors_1 = require("./colors");
5
+ const fonts_1 = require("./fonts");
6
+ const padding_1 = require("./padding");
7
+ const margin_1 = require("./margin");
8
+ const icon_1 = require("./icon");
9
+ const button_1 = require("./button");
10
+ const avatar_1 = require("./avatar");
11
+ const spacing_1 = require("./spacing");
12
+ const rounded_1 = require("./rounded");
13
+ const { light, dark } = colors_1.colors;
14
+ exports.theme = {
15
+ light,
16
+ dark,
17
+ fonts: fonts_1.fonts,
18
+ padding: padding_1.padding,
19
+ margin: margin_1.margin,
20
+ icon: icon_1.icon,
21
+ button: button_1.button,
22
+ avatar: avatar_1.avatar,
23
+ spacing: spacing_1.spacing,
24
+ rounded: rounded_1.rounded,
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":";;;AAAA,qCAAkC;AAClC,mCAAgC;AAChC,uCAAoC;AACpC,qCAAkC;AAElC,iCAA8B;AAC9B,qCAAkC;AAClC,qCAAkC;AAClC,uCAAoC;AACpC,uCAAoC;AAEpC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,eAAM,CAAC;AAElB,QAAA,KAAK,GAAU;IAC1B,KAAK;IACL,IAAI;IACJ,KAAK,EAAL,aAAK;IACL,OAAO,EAAP,iBAAO;IACP,MAAM,EAAN,eAAM;IACN,IAAI,EAAJ,WAAI;IACJ,MAAM,EAAN,eAAM;IACN,MAAM,EAAN,eAAM;IACN,OAAO,EAAP,iBAAO;IACP,OAAO,EAAP,iBAAO;CACR,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { MarginScheme } from './types';
2
+ export declare const margin: MarginScheme;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.margin = void 0;
4
+ exports.margin = {
5
+ xs: 4,
6
+ sm: 8,
7
+ md: 16,
8
+ lg: 24,
9
+ xl: 32,
10
+ };
11
+ //# sourceMappingURL=margin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"margin.js","sourceRoot":"","sources":["../../../src/theme/margin.ts"],"names":[],"mappings":";;;AAEa,QAAA,MAAM,GAAiB;IAClC,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { PaddingScheme } from './types';
2
+ export declare const padding: PaddingScheme;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.padding = void 0;
4
+ exports.padding = {
5
+ xs: 4,
6
+ sm: 8,
7
+ md: 16,
8
+ lg: 24,
9
+ xl: 32,
10
+ };
11
+ //# sourceMappingURL=padding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"padding.js","sourceRoot":"","sources":["../../../src/theme/padding.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAkB;IACpC,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { RoundedScheme } from './types';
2
+ export declare const rounded: RoundedScheme;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rounded = void 0;
4
+ exports.rounded = {
5
+ xs: 5,
6
+ sm: 10,
7
+ md: 15,
8
+ lg: 20,
9
+ xl: 30,
10
+ };
11
+ //# sourceMappingURL=rounded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rounded.js","sourceRoot":"","sources":["../../../src/theme/rounded.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAkB;IACpC,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { SpacingScheme } from './types';
2
+ export declare const spacing: SpacingScheme;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.spacing = void 0;
4
+ exports.spacing = {
5
+ xs: 4,
6
+ sm: 6,
7
+ md: 8,
8
+ lg: 10,
9
+ xl: 12,
10
+ };
11
+ //# sourceMappingURL=spacing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../../src/theme/spacing.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAkB;IACpC,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;CACP,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { StyleProp, TextStyle, ViewStyle } from 'react-native';
2
+ export type ColorScheme = {
3
+ primary: string;
4
+ error: string;
5
+ info: string;
6
+ static_black: string;
7
+ static_white: string;
8
+ static_overlay: string;
9
+ static_grey: string;
10
+ disabled: string;
11
+ text_low_emphasis: string;
12
+ text_high_emphasis: string;
13
+ controls_bg: string;
14
+ borders: string;
15
+ overlay: string;
16
+ overlay_dark: string;
17
+ bars: string;
18
+ content_bg: string;
19
+ };
20
+ export type ColorType = Record<'light' | 'dark', ColorScheme>;
21
+ export type FontTypes = 'heading4' | 'heading5' | 'heading6' | 'subtitle' | 'subtitleBold' | 'caption' | 'bodyBold';
22
+ export type FontStyle = {
23
+ fontSize: TextStyle['fontSize'];
24
+ fontWeight: TextStyle['fontWeight'];
25
+ };
26
+ export type FontsScheme = Record<FontTypes, FontStyle>;
27
+ type SizingTypes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
28
+ export type PaddingScheme = Record<SizingTypes, number>;
29
+ export type MarginScheme = Record<SizingTypes, number>;
30
+ export type IconScheme = Record<SizingTypes, StyleProp<ViewStyle>>;
31
+ export type ButtonScheme = Record<SizingTypes, StyleProp<ViewStyle>>;
32
+ export type AvatarScheme = Record<SizingTypes, number>;
33
+ export type SpacingScheme = Record<SizingTypes, number>;
34
+ export type RoundedScheme = Record<SizingTypes, number>;
35
+ export type Theme = ColorType & {
36
+ fonts: FontsScheme;
37
+ padding: PaddingScheme;
38
+ margin: MarginScheme;
39
+ icon: IconScheme;
40
+ button: ButtonScheme;
41
+ avatar: AvatarScheme;
42
+ spacing: SpacingScheme;
43
+ rounded: RoundedScheme;
44
+ };
45
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/theme/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { StreamReaction } from '@stream-io/video-client';
2
+ type StreamReactionType = StreamReaction & {
3
+ icon: string | JSX.Element;
4
+ };
5
+ type StreamVideoConfig = {
6
+ /**
7
+ * Reactions that are to be supported in the app.
8
+ *
9
+ * Note: This is an array of reactions that is rendered in the Reaction list.
10
+ */
11
+ supportedReactions: StreamReactionType[];
12
+ };
13
+ export declare class StreamVideoRN {
14
+ /**
15
+ * Global config for StreamVideoRN.
16
+ */
17
+ static config: StreamVideoConfig;
18
+ /**
19
+ * Set global config for StreamVideoRN allows you to set wished CDN hosts for resizing images.
20
+ * This function accepts an config object that will be merged with the default config.
21
+ * @example StreamVideoRN.setConfig({ onOpenCallParticipantsInfoView: () => {} });
22
+ */
23
+ static setConfig(config: Partial<StreamVideoConfig>): void;
24
+ }
25
+ export {};
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StreamVideoRN = void 0;
4
+ const constants_1 = require("../constants");
5
+ const DEFAULT_STREAM_VIDEO_CONFIG = {
6
+ supportedReactions: constants_1.defaultEmojiReactions,
7
+ };
8
+ class StreamVideoRN {
9
+ /**
10
+ * Global config for StreamVideoRN.
11
+ */
12
+ static config = DEFAULT_STREAM_VIDEO_CONFIG;
13
+ /**
14
+ * Set global config for StreamVideoRN allows you to set wished CDN hosts for resizing images.
15
+ * This function accepts an config object that will be merged with the default config.
16
+ * @example StreamVideoRN.setConfig({ onOpenCallParticipantsInfoView: () => {} });
17
+ */
18
+ static setConfig(config) {
19
+ this.config = { ...this.config, ...config };
20
+ }
21
+ }
22
+ exports.StreamVideoRN = StreamVideoRN;
23
+ //# sourceMappingURL=StreamVideoRN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StreamVideoRN.js","sourceRoot":"","sources":["../../../src/utils/StreamVideoRN.ts"],"names":[],"mappings":";;;AACA,4CAAqD;AAerD,MAAM,2BAA2B,GAAG;IAClC,kBAAkB,EAAE,iCAAqB;CAC1C,CAAC;AAEF,MAAa,aAAa;IACxB;;OAEG;IACH,MAAM,CAAC,MAAM,GAAsB,2BAA2B,CAAC;IAE/D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAkC;QACjD,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC9C,CAAC;;AAbH,sCAcC"}
@@ -0,0 +1,3 @@
1
+ export * from './useAppStateListener';
2
+ export * from './useDebouncedValue';
3
+ export * from './usePrevious';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useAppStateListener"), exports);
18
+ __exportStar(require("./useDebouncedValue"), exports);
19
+ __exportStar(require("./usePrevious"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,sDAAoC;AACpC,gDAA8B"}
@@ -0,0 +1 @@
1
+ export declare const useAppStateListener: (onForeground?: () => void, onBackground?: () => void) => void;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAppStateListener = void 0;
4
+ const react_1 = require("react");
5
+ const react_native_1 = require("react-native");
6
+ const useAppStateListener = (onForeground, onBackground) => {
7
+ const appStateRef = (0, react_1.useRef)(react_native_1.AppState.currentState);
8
+ const onForegroundRef = (0, react_1.useRef)(onForeground);
9
+ const onBackgroundRef = (0, react_1.useRef)(onBackground);
10
+ // setting refs to avoid passing the functions as dependencies to useEffect
11
+ onForegroundRef.current = onForeground;
12
+ onBackgroundRef.current = onBackground;
13
+ (0, react_1.useEffect)(() => {
14
+ const handleAppStateChange = (nextAppState) => {
15
+ const prevAppState = appStateRef.current;
16
+ if (prevAppState.match(/inactive|background/) &&
17
+ nextAppState === 'active') {
18
+ onForegroundRef.current?.();
19
+ }
20
+ else if (prevAppState === 'active' &&
21
+ nextAppState.match(/inactive|background/)) {
22
+ onBackgroundRef.current?.();
23
+ }
24
+ appStateRef.current = nextAppState;
25
+ };
26
+ const subscription = react_native_1.AppState.addEventListener('change', handleAppStateChange);
27
+ return () => {
28
+ // Following if-else logic is to support RN >= 0.65 and RN < 0.65 versions.
29
+ // https://github.com/react-native-community/releases/blob/master/CHANGELOG.md#:~:text=EventEmitter%23removeSubscription%20is%20now%20deprecated.%20(cb6cbd12f8%20by%20%40yungsters)
30
+ if (subscription?.remove) {
31
+ subscription.remove();
32
+ }
33
+ else {
34
+ // @ts-ignore
35
+ react_native_1.AppState.removeEventListener('change', handleAppStateChange);
36
+ }
37
+ };
38
+ }, []);
39
+ };
40
+ exports.useAppStateListener = useAppStateListener;
41
+ //# sourceMappingURL=useAppStateListener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAppStateListener.js","sourceRoot":"","sources":["../../../../src/utils/hooks/useAppStateListener.ts"],"names":[],"mappings":";;;AAAA,iCAA0C;AAC1C,+CAAwD;AAEjD,MAAM,mBAAmB,GAAG,CACjC,YAAyB,EACzB,YAAyB,EACzB,EAAE;IACF,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,uBAAQ,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,eAAe,GAAG,IAAA,cAAM,EAAC,YAAY,CAAC,CAAC;IAC7C,MAAM,eAAe,GAAG,IAAA,cAAM,EAAC,YAAY,CAAC,CAAC;IAE7C,2EAA2E;IAC3E,eAAe,CAAC,OAAO,GAAG,YAAY,CAAC;IACvC,eAAe,CAAC,OAAO,GAAG,YAAY,CAAC;IAEvC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,oBAAoB,GAAG,CAAC,YAA4B,EAAE,EAAE;YAC5D,MAAM,YAAY,GAAG,WAAW,CAAC,OAAO,CAAC;YACzC,IACE,YAAY,CAAC,KAAK,CAAC,qBAAqB,CAAC;gBACzC,YAAY,KAAK,QAAQ,EACzB;gBACA,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;aAC7B;iBAAM,IACL,YAAY,KAAK,QAAQ;gBACzB,YAAY,CAAC,KAAK,CAAC,qBAAqB,CAAC,EACzC;gBACA,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;aAC7B;YACD,WAAW,CAAC,OAAO,GAAG,YAAY,CAAC;QACrC,CAAC,CAAC;QACF,MAAM,YAAY,GAAG,uBAAQ,CAAC,gBAAgB,CAC5C,QAAQ,EACR,oBAAoB,CACrB,CAAC;QAEF,OAAO,GAAG,EAAE;YACV,2EAA2E;YAC3E,oLAAoL;YACpL,IAAI,YAAY,EAAE,MAAM,EAAE;gBACxB,YAAY,CAAC,MAAM,EAAE,CAAC;aACvB;iBAAM;gBACL,aAAa;gBACb,uBAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;aAC9D;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC,CAAC;AA5CW,QAAA,mBAAmB,uBA4C9B"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * this is a custom hook that takes a value and a delay and returns a debounced value
3
+ * @param {T} value
4
+ * @param {number} delay
5
+ * @returns {T}
6
+ */
7
+ export declare function useDebouncedValue<T>(value: T, delay: number): T;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useDebouncedValue = void 0;
4
+ const react_1 = require("react");
5
+ /**
6
+ * this is a custom hook that takes a value and a delay and returns a debounced value
7
+ * @param {T} value
8
+ * @param {number} delay
9
+ * @returns {T}
10
+ */
11
+ function useDebouncedValue(value, delay) {
12
+ const [debouncedValue, setDebouncedValue] = (0, react_1.useState)(value);
13
+ (0, react_1.useEffect)(() => {
14
+ const timer = setTimeout(() => setDebouncedValue(value), delay);
15
+ return () => {
16
+ clearTimeout(timer);
17
+ };
18
+ }, [value, delay]);
19
+ return debouncedValue;
20
+ }
21
+ exports.useDebouncedValue = useDebouncedValue;
22
+ //# sourceMappingURL=useDebouncedValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebouncedValue.js","sourceRoot":"","sources":["../../../../src/utils/hooks/useDebouncedValue.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAE5C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAI,KAAQ,EAAE,KAAa;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAI,KAAK,CAAC,CAAC;IAE/D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;QAEhE,OAAO,GAAG,EAAE;YACV,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnB,OAAO,cAAc,CAAC;AACxB,CAAC;AAZD,8CAYC"}
@@ -0,0 +1 @@
1
+ export declare const usePrevious: (value: any) => any;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usePrevious = void 0;
4
+ const react_1 = require("react");
5
+ const usePrevious = (value) => {
6
+ const valueRef = (0, react_1.useRef)(value);
7
+ (0, react_1.useEffect)(() => {
8
+ valueRef.current = value;
9
+ }, [value]);
10
+ return valueRef.current;
11
+ };
12
+ exports.usePrevious = usePrevious;
13
+ //# sourceMappingURL=usePrevious.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrevious.js","sourceRoot":"","sources":["../../../../src/utils/hooks/usePrevious.ts"],"names":[],"mappings":";;;AAAA,iCAA0C;AAEnC,MAAM,WAAW,GAAG,CAAC,KAAU,EAAE,EAAE;IACxC,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IAE/B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC;IAC3B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,CAAC,CAAC;AARW,QAAA,WAAW,eAQtB"}
@@ -0,0 +1,5 @@
1
+ export declare const generateCallTitle: (memberUserIds: string[], totalMembersToShow?: number) => string;
2
+ export declare const generateParticipantTitle: (memberUserId: string) => string;
3
+ export declare const getInitialsOfName: (name: string) => string;
4
+ export declare const muteStatusColor: (status: boolean) => string;
5
+ export * from './StreamVideoRN';
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.muteStatusColor = exports.getInitialsOfName = exports.generateParticipantTitle = exports.generateCallTitle = void 0;
18
+ const theme_1 = require("../theme");
19
+ // Utility to join strings with commas and 'and'
20
+ const generateCallTitle = (memberUserIds, totalMembersToShow) => {
21
+ const supportedAmountOfMemberUserIds = memberUserIds.slice(0, totalMembersToShow);
22
+ if (totalMembersToShow &&
23
+ supportedAmountOfMemberUserIds.length < totalMembersToShow) {
24
+ return supportedAmountOfMemberUserIds.join(' and ');
25
+ }
26
+ const allMembersExceptLast = supportedAmountOfMemberUserIds.slice(0, -1);
27
+ const lastMember = supportedAmountOfMemberUserIds.slice(-1)[0];
28
+ return `${allMembersExceptLast.join(', ')}, and ${lastMember}`;
29
+ };
30
+ exports.generateCallTitle = generateCallTitle;
31
+ // Utility to truncate long strings
32
+ const generateParticipantTitle = (memberUserId) => {
33
+ return memberUserId.length > 15
34
+ ? memberUserId.slice(0, 15) + '...'
35
+ : memberUserId;
36
+ };
37
+ exports.generateParticipantTitle = generateParticipantTitle;
38
+ // Utility to get initials of a name
39
+ const getInitialsOfName = (name) => {
40
+ const names = name.split(' ');
41
+ let initials = names[0].substring(0, 1).toUpperCase();
42
+ if (names.length > 1) {
43
+ initials += names[names.length - 1].substring(0, 1).toUpperCase();
44
+ }
45
+ return initials;
46
+ };
47
+ exports.getInitialsOfName = getInitialsOfName;
48
+ const muteStatusColor = (status) => {
49
+ return status ? theme_1.theme.light.overlay_dark : theme_1.theme.light.static_white;
50
+ };
51
+ exports.muteStatusColor = muteStatusColor;
52
+ __exportStar(require("./StreamVideoRN"), exports);
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oCAAiC;AAEjC,gDAAgD;AACzC,MAAM,iBAAiB,GAAG,CAC/B,aAAuB,EACvB,kBAA2B,EAC3B,EAAE;IACF,MAAM,8BAA8B,GAAG,aAAa,CAAC,KAAK,CACxD,CAAC,EACD,kBAAkB,CACnB,CAAC;IACF,IACE,kBAAkB;QAClB,8BAA8B,CAAC,MAAM,GAAG,kBAAkB,EAC1D;QACA,OAAO,8BAA8B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,MAAM,oBAAoB,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,OAAO,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,UAAU,EAAE,CAAC;AACjE,CAAC,CAAC;AAlBW,QAAA,iBAAiB,qBAkB5B;AAEF,mCAAmC;AAC5B,MAAM,wBAAwB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAC/D,OAAO,YAAY,CAAC,MAAM,GAAG,EAAE;QAC7B,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK;QACnC,CAAC,CAAC,YAAY,CAAC;AACnB,CAAC,CAAC;AAJW,QAAA,wBAAwB,4BAInC;AAEF,oCAAoC;AAC7B,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACtD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;KACnE;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAPW,QAAA,iBAAiB,qBAO5B;AAEK,MAAM,eAAe,GAAG,CAAC,MAAe,EAAE,EAAE;IACjD,OAAO,MAAM,CAAC,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,YAAY,CAAC;AACtE,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF,kDAAgC"}
@@ -0,0 +1 @@
1
+ export declare const verifyAndroidBluetoothPermissions: () => Promise<boolean>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verifyAndroidBluetoothPermissions = void 0;
4
+ const react_native_1 = require("react-native");
5
+ const verifyAndroidBluetoothPermissions = async () => {
6
+ const shouldCheckForPermissions = Number(react_native_1.Platform.Version) >= 31;
7
+ if (!shouldCheckForPermissions)
8
+ return true;
9
+ const getCheckPermissionPromise = () => {
10
+ return react_native_1.PermissionsAndroid.check(react_native_1.PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT);
11
+ };
12
+ const hasPermission = await getCheckPermissionPromise();
13
+ if (!hasPermission) {
14
+ const getRequestPermissionPromise = async () => {
15
+ const result = await react_native_1.PermissionsAndroid.request(react_native_1.PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT, {
16
+ buttonNegative: 'Deny',
17
+ buttonNeutral: 'Ask Me Later',
18
+ buttonPositive: 'Allow',
19
+ message: 'Permissions are required to route audio to bluetooth devices.',
20
+ title: 'Bluetooth connect Access',
21
+ }).then((status) => status === react_native_1.PermissionsAndroid.RESULTS.GRANTED);
22
+ return result;
23
+ };
24
+ const granted = await getRequestPermissionPromise();
25
+ return granted;
26
+ }
27
+ return true;
28
+ };
29
+ exports.verifyAndroidBluetoothPermissions = verifyAndroidBluetoothPermissions;
30
+ //# sourceMappingURL=verifyAndroidBluetoothPermissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verifyAndroidBluetoothPermissions.js","sourceRoot":"","sources":["../../../src/utils/verifyAndroidBluetoothPermissions.ts"],"names":[],"mappings":";;;AAAA,+CAA4D;AAErD,MAAM,iCAAiC,GAAG,KAAK,IAAI,EAAE;IAC1D,MAAM,yBAAyB,GAAG,MAAM,CAAC,uBAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACjE,IAAI,CAAC,yBAAyB;QAAE,OAAO,IAAI,CAAC;IAC5C,MAAM,yBAAyB,GAAG,GAAG,EAAE;QACrC,OAAO,iCAAkB,CAAC,KAAK,CAC7B,iCAAkB,CAAC,WAAW,CAAC,iBAAiB,CACjD,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,aAAa,GAAG,MAAM,yBAAyB,EAAE,CAAC;IACxD,IAAI,CAAC,aAAa,EAAE;QAClB,MAAM,2BAA2B,GAAG,KAAK,IAAI,EAAE;YAC7C,MAAM,MAAM,GAAG,MAAM,iCAAkB,CAAC,OAAO,CAC7C,iCAAkB,CAAC,WAAW,CAAC,iBAAiB,EAChD;gBACE,cAAc,EAAE,MAAM;gBACtB,aAAa,EAAE,cAAc;gBAC7B,cAAc,EAAE,OAAO;gBACvB,OAAO,EACL,+DAA+D;gBACjE,KAAK,EAAE,0BAA0B;aAClC,CACF,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,iCAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAClE,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,2BAA2B,EAAE,CAAC;QACpD,OAAO,OAAO,CAAC;KAChB;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA5BW,QAAA,iCAAiC,qCA4B5C"}
package/index.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { setSdkInfo, SfuModels } from '@stream-io/video-client';
2
+
3
+ export * from '@stream-io/i18n';
4
+ export * from '@stream-io/video-client';
5
+ export * from '@stream-io/video-react-bindings';
6
+ export * from './src/components';
7
+ export * from './src/contexts';
8
+ export * from './src/hooks';
9
+ export * from './src/theme';
10
+ export * from './src/utils';
11
+
12
+ // Overriding 'StreamVideo' from '@stream-io/video-react-bindings'
13
+ // Explicitly re-exporting to resolve ambiguity.
14
+ export { StreamVideo, StreamCall } from './src/providers';
15
+
16
+ // TODO: set valid version
17
+ setSdkInfo({
18
+ type: SfuModels.SdkType.REACT_NATIVE,
19
+ major: '0',
20
+ minor: '0',
21
+ patch: '0',
22
+ });