@openpeepshq/react 0.2.3

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 (558) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +1 -0
  3. package/dist/auth/credentials/index.d.ts +11 -0
  4. package/dist/auth/credentials/index.js +57 -0
  5. package/dist/auth/credentials/types.d.ts +6 -0
  6. package/dist/auth/credentials/types.js +1 -0
  7. package/dist/components/accounts/SignUpLoginModal.d.ts +9 -0
  8. package/dist/components/accounts/SignUpLoginModal.js +19 -0
  9. package/dist/components/accounts/SignUpLoginModalContext.d.ts +10 -0
  10. package/dist/components/accounts/SignUpLoginModalContext.js +16 -0
  11. package/dist/components/accounts/index.d.ts +3 -0
  12. package/dist/components/accounts/index.js +2 -0
  13. package/dist/components/configuration/ConfigurationCategory.d.ts +12 -0
  14. package/dist/components/configuration/ConfigurationCategory.js +61 -0
  15. package/dist/components/configuration/ConfigurationList.d.ts +10 -0
  16. package/dist/components/configuration/ConfigurationList.js +30 -0
  17. package/dist/components/configuration/ConfigurationTree.d.ts +8 -0
  18. package/dist/components/configuration/ConfigurationTree.js +20 -0
  19. package/dist/components/configuration/ConfigurationValueEditor.d.ts +11 -0
  20. package/dist/components/configuration/ConfigurationValueEditor.js +45 -0
  21. package/dist/components/configuration/index.d.ts +4 -0
  22. package/dist/components/configuration/index.js +4 -0
  23. package/dist/components/conversations/ConversationMessageBubble.d.ts +4 -0
  24. package/dist/components/conversations/ConversationMessageBubble.js +10 -0
  25. package/dist/components/conversations/CreateNewConversation.d.ts +8 -0
  26. package/dist/components/conversations/CreateNewConversation.js +62 -0
  27. package/dist/components/conversations/CreateNewConversationContext.d.ts +15 -0
  28. package/dist/components/conversations/CreateNewConversationContext.js +18 -0
  29. package/dist/components/conversations/DirectMessagesHeaderActions.d.ts +1 -0
  30. package/dist/components/conversations/DirectMessagesHeaderActions.js +10 -0
  31. package/dist/components/conversations/MessageInThread.d.ts +13 -0
  32. package/dist/components/conversations/MessageInThread.js +41 -0
  33. package/dist/components/conversations/index.d.ts +8 -0
  34. package/dist/components/conversations/index.js +5 -0
  35. package/dist/components/form/HeaderAvatarInput.d.ts +13 -0
  36. package/dist/components/form/HeaderAvatarInput.js +16 -0
  37. package/dist/components/form/ImageEditModal.d.ts +23 -0
  38. package/dist/components/form/ImageEditModal.js +75 -0
  39. package/dist/components/form/ImageInput.d.ts +32 -0
  40. package/dist/components/form/ImageInput.js +65 -0
  41. package/dist/components/form/LocationInput.d.ts +20 -0
  42. package/dist/components/form/LocationInput.js +59 -0
  43. package/dist/components/form/index.d.ts +8 -0
  44. package/dist/components/form/index.js +4 -0
  45. package/dist/components/groups/AddGroupMemberModal.d.ts +6 -0
  46. package/dist/components/groups/AddGroupMemberModal.js +40 -0
  47. package/dist/components/groups/AddGroupMembersButton.d.ts +5 -0
  48. package/dist/components/groups/AddGroupMembersButton.js +17 -0
  49. package/dist/components/groups/ChangeGroupRolesModal.d.ts +7 -0
  50. package/dist/components/groups/ChangeGroupRolesModal.js +45 -0
  51. package/dist/components/groups/ConfirmGroupExitModal.d.ts +6 -0
  52. package/dist/components/groups/ConfirmGroupExitModal.js +35 -0
  53. package/dist/components/groups/ConfirmMemberRemovalModal.d.ts +7 -0
  54. package/dist/components/groups/ConfirmMemberRemovalModal.js +33 -0
  55. package/dist/components/groups/DeleteGroupModal.d.ts +6 -0
  56. package/dist/components/groups/DeleteGroupModal.js +34 -0
  57. package/dist/components/groups/GroupAvatar.d.ts +14 -0
  58. package/dist/components/groups/GroupAvatar.js +32 -0
  59. package/dist/components/groups/GroupCard.d.ts +19 -0
  60. package/dist/components/groups/GroupCard.js +12 -0
  61. package/dist/components/groups/GroupFeed.d.ts +9 -0
  62. package/dist/components/groups/GroupFeed.js +14 -0
  63. package/dist/components/groups/GroupForm.d.ts +7 -0
  64. package/dist/components/groups/GroupForm.js +73 -0
  65. package/dist/components/groups/GroupHeader.d.ts +5 -0
  66. package/dist/components/groups/GroupHeader.js +14 -0
  67. package/dist/components/groups/GroupMembersList.d.ts +5 -0
  68. package/dist/components/groups/GroupMembersList.js +38 -0
  69. package/dist/components/groups/GroupOptionsMenu.d.ts +5 -0
  70. package/dist/components/groups/GroupOptionsMenu.js +61 -0
  71. package/dist/components/groups/GroupShareMenu.d.ts +5 -0
  72. package/dist/components/groups/GroupShareMenu.js +29 -0
  73. package/dist/components/groups/JoinGroupButton.d.ts +6 -0
  74. package/dist/components/groups/JoinGroupButton.js +28 -0
  75. package/dist/components/groups/index.d.ts +30 -0
  76. package/dist/components/groups/index.js +15 -0
  77. package/dist/components/index.d.ts +15 -0
  78. package/dist/components/index.js +15 -0
  79. package/dist/components/jams/CreateNewJam.d.ts +4 -0
  80. package/dist/components/jams/CreateNewJam.js +138 -0
  81. package/dist/components/jams/CreateNewJamContext.d.ts +9 -0
  82. package/dist/components/jams/CreateNewJamContext.js +16 -0
  83. package/dist/components/jams/JamAnimatedEmoji.d.ts +4 -0
  84. package/dist/components/jams/JamAnimatedEmoji.js +12 -0
  85. package/dist/components/jams/JamCallParticipant.d.ts +15 -0
  86. package/dist/components/jams/JamCallParticipant.js +101 -0
  87. package/dist/components/jams/JamCapacityGate.d.ts +7 -0
  88. package/dist/components/jams/JamCapacityGate.js +30 -0
  89. package/dist/components/jams/JamChatDrawer.d.ts +6 -0
  90. package/dist/components/jams/JamChatDrawer.js +88 -0
  91. package/dist/components/jams/JamChatMessage.d.ts +5 -0
  92. package/dist/components/jams/JamChatMessage.js +35 -0
  93. package/dist/components/jams/JamConference.d.ts +8 -0
  94. package/dist/components/jams/JamConference.js +38 -0
  95. package/dist/components/jams/JamContext.d.ts +20 -0
  96. package/dist/components/jams/JamContext.js +24 -0
  97. package/dist/components/jams/JamDetailsDrawer.d.ts +9 -0
  98. package/dist/components/jams/JamDetailsDrawer.js +39 -0
  99. package/dist/components/jams/JamDeviceSelectors.d.ts +12 -0
  100. package/dist/components/jams/JamDeviceSelectors.js +71 -0
  101. package/dist/components/jams/JamEventsContext.d.ts +14 -0
  102. package/dist/components/jams/JamEventsContext.js +143 -0
  103. package/dist/components/jams/JamFooter.d.ts +18 -0
  104. package/dist/components/jams/JamFooter.js +171 -0
  105. package/dist/components/jams/JamGuestForm.d.ts +1 -0
  106. package/dist/components/jams/JamGuestForm.js +55 -0
  107. package/dist/components/jams/JamLobby.d.ts +17 -0
  108. package/dist/components/jams/JamLobby.js +159 -0
  109. package/dist/components/jams/JamObserverShell.d.ts +6 -0
  110. package/dist/components/jams/JamObserverShell.js +11 -0
  111. package/dist/components/jams/JamParticipantConference.d.ts +7 -0
  112. package/dist/components/jams/JamParticipantConference.js +80 -0
  113. package/dist/components/jams/JamPeopleDrawer.d.ts +10 -0
  114. package/dist/components/jams/JamPeopleDrawer.js +76 -0
  115. package/dist/components/jams/JamReactionMenu.d.ts +12 -0
  116. package/dist/components/jams/JamReactionMenu.js +79 -0
  117. package/dist/components/jams/JamRequestJoin.d.ts +9 -0
  118. package/dist/components/jams/JamRequestJoin.js +34 -0
  119. package/dist/components/jams/JamRoom.d.ts +21 -0
  120. package/dist/components/jams/JamRoom.js +166 -0
  121. package/dist/components/jams/JamRoomIndicators.d.ts +10 -0
  122. package/dist/components/jams/JamRoomIndicators.js +39 -0
  123. package/dist/components/jams/JamVideoCall.d.ts +15 -0
  124. package/dist/components/jams/JamVideoCall.js +18 -0
  125. package/dist/components/jams/JamVideoLayout.d.ts +13 -0
  126. package/dist/components/jams/JamVideoLayout.js +68 -0
  127. package/dist/components/jams/LeaveCloseButton.d.ts +6 -0
  128. package/dist/components/jams/LeaveCloseButton.js +58 -0
  129. package/dist/components/jams/LiveJamsSection.d.ts +1 -0
  130. package/dist/components/jams/LiveJamsSection.js +16 -0
  131. package/dist/components/jams/animateEmoji.d.ts +1 -0
  132. package/dist/components/jams/animateEmoji.js +48 -0
  133. package/dist/components/jams/blurProcessor.d.ts +8 -0
  134. package/dist/components/jams/blurProcessor.js +28 -0
  135. package/dist/components/jams/constants.d.ts +10 -0
  136. package/dist/components/jams/constants.js +44 -0
  137. package/dist/components/jams/index.d.ts +24 -0
  138. package/dist/components/jams/index.js +19 -0
  139. package/dist/components/jams/jamEventActions.d.ts +26 -0
  140. package/dist/components/jams/jamEventActions.js +76 -0
  141. package/dist/components/jams/jamLocalSettings.d.ts +17 -0
  142. package/dist/components/jams/jamLocalSettings.js +53 -0
  143. package/dist/components/jams/jamReactionPreferences.d.ts +15 -0
  144. package/dist/components/jams/jamReactionPreferences.js +53 -0
  145. package/dist/components/jams/jamRecordingState.d.ts +10 -0
  146. package/dist/components/jams/jamRecordingState.js +25 -0
  147. package/dist/components/jams/reactionEmojis.d.ts +30 -0
  148. package/dist/components/jams/reactionEmojis.js +73 -0
  149. package/dist/components/jams/useJamHands.d.ts +7 -0
  150. package/dist/components/jams/useJamHands.js +39 -0
  151. package/dist/components/jams/useJamLiveKitTheme.d.ts +3 -0
  152. package/dist/components/jams/useJamLiveKitTheme.js +10 -0
  153. package/dist/components/layout/AccessDenied.d.ts +14 -0
  154. package/dist/components/layout/AccessDenied.js +28 -0
  155. package/dist/components/layout/AccessDeniedLoader.d.ts +16 -0
  156. package/dist/components/layout/AccessDeniedLoader.js +12 -0
  157. package/dist/components/layout/Auth.d.ts +22 -0
  158. package/dist/components/layout/Auth.js +82 -0
  159. package/dist/components/layout/IdentityContext.d.ts +17 -0
  160. package/dist/components/layout/IdentityContext.js +38 -0
  161. package/dist/components/layout/Infos.d.ts +5 -0
  162. package/dist/components/layout/Infos.js +42 -0
  163. package/dist/components/layout/OpenpeepsContextProvider.d.ts +10 -0
  164. package/dist/components/layout/OpenpeepsContextProvider.js +63 -0
  165. package/dist/components/layout/OpenpeepsThemeProvider.d.ts +11 -0
  166. package/dist/components/layout/OpenpeepsThemeProvider.js +47 -0
  167. package/dist/components/layout/ProfileGuard.d.ts +14 -0
  168. package/dist/components/layout/ProfileGuard.js +38 -0
  169. package/dist/components/layout/ProfileProvider.d.ts +10 -0
  170. package/dist/components/layout/ProfileProvider.js +60 -0
  171. package/dist/components/layout/Root.d.ts +16 -0
  172. package/dist/components/layout/Root.js +36 -0
  173. package/dist/components/layout/ToastProvider.d.ts +22 -0
  174. package/dist/components/layout/ToastProvider.js +37 -0
  175. package/dist/components/layout/index.d.ts +21 -0
  176. package/dist/components/layout/index.js +11 -0
  177. package/dist/components/markdown/CompiledMarkdown.d.ts +5 -0
  178. package/dist/components/markdown/CompiledMarkdown.js +3 -0
  179. package/dist/components/markdown/OpenpeepsMarkdown.d.ts +16 -0
  180. package/dist/components/markdown/OpenpeepsMarkdown.js +66 -0
  181. package/dist/components/markdown/classes.d.ts +2 -0
  182. package/dist/components/markdown/classes.js +2 -0
  183. package/dist/components/markdown/compileMarkdown.d.ts +5 -0
  184. package/dist/components/markdown/compileMarkdown.js +36 -0
  185. package/dist/components/markdown/index.d.ts +11 -0
  186. package/dist/components/markdown/index.js +7 -0
  187. package/dist/components/markdown/linkTargets.d.ts +3 -0
  188. package/dist/components/markdown/linkTargets.js +27 -0
  189. package/dist/components/markdown/staticRender.d.ts +16 -0
  190. package/dist/components/markdown/staticRender.js +17 -0
  191. package/dist/components/navigation/ContentHeader.d.ts +1 -0
  192. package/dist/components/navigation/ContentHeader.js +18 -0
  193. package/dist/components/navigation/FooterMobile.d.ts +5 -0
  194. package/dist/components/navigation/FooterMobile.js +8 -0
  195. package/dist/components/navigation/HeaderMobile.d.ts +11 -0
  196. package/dist/components/navigation/HeaderMobile.js +26 -0
  197. package/dist/components/navigation/MobileMenuItem.d.ts +7 -0
  198. package/dist/components/navigation/MobileMenuItem.js +13 -0
  199. package/dist/components/navigation/PageHeaderAction.d.ts +5 -0
  200. package/dist/components/navigation/PageHeaderAction.js +7 -0
  201. package/dist/components/navigation/PlusButton.d.ts +1 -0
  202. package/dist/components/navigation/PlusButton.js +11 -0
  203. package/dist/components/navigation/SideBar.d.ts +16 -0
  204. package/dist/components/navigation/SideBar.js +24 -0
  205. package/dist/components/navigation/SidebarNavContext.d.ts +3 -0
  206. package/dist/components/navigation/SidebarNavContext.js +4 -0
  207. package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +1 -0
  208. package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +10 -0
  209. package/dist/components/navigation/breadcrumbs/Crumb.d.ts +5 -0
  210. package/dist/components/navigation/breadcrumbs/Crumb.js +4 -0
  211. package/dist/components/navigation/index.d.ts +17 -0
  212. package/dist/components/navigation/index.js +11 -0
  213. package/dist/components/navigation/sideBarNavLinkClass.d.ts +4 -0
  214. package/dist/components/navigation/sideBarNavLinkClass.js +3 -0
  215. package/dist/components/notifications/NotificationErrorBoundary.d.ts +16 -0
  216. package/dist/components/notifications/NotificationErrorBoundary.js +21 -0
  217. package/dist/components/notifications/NotificationHeaderActions.d.ts +6 -0
  218. package/dist/components/notifications/NotificationHeaderActions.js +35 -0
  219. package/dist/components/notifications/NotificationItem.d.ts +5 -0
  220. package/dist/components/notifications/NotificationItem.js +6 -0
  221. package/dist/components/notifications/NotificationWrapper.d.ts +10 -0
  222. package/dist/components/notifications/NotificationWrapper.js +6 -0
  223. package/dist/components/notifications/NotificationsList.d.ts +12 -0
  224. package/dist/components/notifications/NotificationsList.js +88 -0
  225. package/dist/components/notifications/TypedNotification.d.ts +4 -0
  226. package/dist/components/notifications/TypedNotification.js +201 -0
  227. package/dist/components/notifications/index.d.ts +7 -0
  228. package/dist/components/notifications/index.js +5 -0
  229. package/dist/components/post/Feed.d.ts +20 -0
  230. package/dist/components/post/Feed.js +63 -0
  231. package/dist/components/post/FeedPost.d.ts +17 -0
  232. package/dist/components/post/FeedPost.js +31 -0
  233. package/dist/components/post/FeedPostContent.d.ts +5 -0
  234. package/dist/components/post/FeedPostContent.js +22 -0
  235. package/dist/components/post/FullPostLayout.d.ts +7 -0
  236. package/dist/components/post/FullPostLayout.js +23 -0
  237. package/dist/components/post/Markdown.d.ts +2 -0
  238. package/dist/components/post/Markdown.js +1 -0
  239. package/dist/components/post/NewEventButton.d.ts +14 -0
  240. package/dist/components/post/NewEventButton.js +39 -0
  241. package/dist/components/post/NewNoteButton.d.ts +14 -0
  242. package/dist/components/post/NewNoteButton.js +38 -0
  243. package/dist/components/post/PinnedPost.d.ts +5 -0
  244. package/dist/components/post/PinnedPost.js +15 -0
  245. package/dist/components/post/PostDetail.d.ts +4 -0
  246. package/dist/components/post/PostDetail.js +31 -0
  247. package/dist/components/post/ReplyBox.d.ts +5 -0
  248. package/dist/components/post/ReplyBox.js +30 -0
  249. package/dist/components/post/VideoPlayOverlay.d.ts +5 -0
  250. package/dist/components/post/VideoPlayOverlay.js +8 -0
  251. package/dist/components/post/attachmentPreview.d.ts +5 -0
  252. package/dist/components/post/attachmentPreview.js +14 -0
  253. package/dist/components/post/feed/events/EventsFeed.d.ts +7 -0
  254. package/dist/components/post/feed/events/EventsFeed.js +44 -0
  255. package/dist/components/post/feed/threaded/ThreadPost.d.ts +9 -0
  256. package/dist/components/post/feed/threaded/ThreadPost.js +19 -0
  257. package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +10 -0
  258. package/dist/components/post/feed/threaded/ThreadedFeed.js +8 -0
  259. package/dist/components/post/helpers.d.ts +6 -0
  260. package/dist/components/post/helpers.js +24 -0
  261. package/dist/components/post/index.d.ts +78 -0
  262. package/dist/components/post/index.js +57 -0
  263. package/dist/components/post/pieces/Attachments.d.ts +5 -0
  264. package/dist/components/post/pieces/Attachments.js +44 -0
  265. package/dist/components/post/pieces/EventLocation.d.ts +7 -0
  266. package/dist/components/post/pieces/EventLocation.js +28 -0
  267. package/dist/components/post/pieces/EventMenu.d.ts +6 -0
  268. package/dist/components/post/pieces/EventMenu.js +35 -0
  269. package/dist/components/post/pieces/EventRsvpButton.d.ts +5 -0
  270. package/dist/components/post/pieces/EventRsvpButton.js +60 -0
  271. package/dist/components/post/pieces/FeedPostStats.d.ts +5 -0
  272. package/dist/components/post/pieces/FeedPostStats.js +27 -0
  273. package/dist/components/post/pieces/GalleryModal.d.ts +7 -0
  274. package/dist/components/post/pieces/GalleryModal.js +16 -0
  275. package/dist/components/post/pieces/ParticipantsCard.d.ts +8 -0
  276. package/dist/components/post/pieces/ParticipantsCard.js +13 -0
  277. package/dist/components/post/pieces/PollContent.d.ts +5 -0
  278. package/dist/components/post/pieces/PollContent.js +109 -0
  279. package/dist/components/post/pieces/PostActions.d.ts +6 -0
  280. package/dist/components/post/pieces/PostActions.js +63 -0
  281. package/dist/components/post/pieces/PostInfoHeader.d.ts +7 -0
  282. package/dist/components/post/pieces/PostInfoHeader.js +8 -0
  283. package/dist/components/post/pieces/PostMenu.d.ts +6 -0
  284. package/dist/components/post/pieces/PostMenu.js +77 -0
  285. package/dist/components/post/pieces/PostReactionHeader.d.ts +12 -0
  286. package/dist/components/post/pieces/PostReactionHeader.js +31 -0
  287. package/dist/components/post/pieces/ShareMenu.d.ts +6 -0
  288. package/dist/components/post/pieces/ShareMenu.js +46 -0
  289. package/dist/components/post/pieces/UnreadPostIndicator.d.ts +9 -0
  290. package/dist/components/post/pieces/UnreadPostIndicator.js +6 -0
  291. package/dist/components/post/pieces/VideoPlayer.d.ts +16 -0
  292. package/dist/components/post/pieces/VideoPlayer.js +127 -0
  293. package/dist/components/post/pieces/modals/DeletePostModal.d.ts +8 -0
  294. package/dist/components/post/pieces/modals/DeletePostModal.js +20 -0
  295. package/dist/components/post/pieces/modals/ReactionsModal.d.ts +7 -0
  296. package/dist/components/post/pieces/modals/ReactionsModal.js +11 -0
  297. package/dist/components/post/pieces/modals/RepostModal.d.ts +7 -0
  298. package/dist/components/post/pieces/modals/RepostModal.js +13 -0
  299. package/dist/components/post/post-form/ArticleForm.d.ts +7 -0
  300. package/dist/components/post/post-form/ArticleForm.js +45 -0
  301. package/dist/components/post/post-form/AttachmentCard.d.ts +29 -0
  302. package/dist/components/post/post-form/AttachmentCard.js +120 -0
  303. package/dist/components/post/post-form/ComposeAttachments.d.ts +25 -0
  304. package/dist/components/post/post-form/ComposeAttachments.js +137 -0
  305. package/dist/components/post/post-form/ComposePreviewLinks.d.ts +4 -0
  306. package/dist/components/post/post-form/ComposePreviewLinks.js +9 -0
  307. package/dist/components/post/post-form/DescriptionEditModal.d.ts +13 -0
  308. package/dist/components/post/post-form/DescriptionEditModal.js +22 -0
  309. package/dist/components/post/post-form/EditPostModal.d.ts +6 -0
  310. package/dist/components/post/post-form/EditPostModal.js +81 -0
  311. package/dist/components/post/post-form/EditPostModalContext.d.ts +10 -0
  312. package/dist/components/post/post-form/EditPostModalContext.js +18 -0
  313. package/dist/components/post/post-form/EventForm.d.ts +7 -0
  314. package/dist/components/post/post-form/EventForm.js +104 -0
  315. package/dist/components/post/post-form/EventTypeSwitcher.d.ts +8 -0
  316. package/dist/components/post/post-form/EventTypeSwitcher.js +165 -0
  317. package/dist/components/post/post-form/NewPostModal.d.ts +13 -0
  318. package/dist/components/post/post-form/NewPostModal.js +272 -0
  319. package/dist/components/post/post-form/NewPostModalContext.d.ts +15 -0
  320. package/dist/components/post/post-form/NewPostModalContext.js +20 -0
  321. package/dist/components/post/post-form/OpenpeepsMarkdownInput.d.ts +19 -0
  322. package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +65 -0
  323. package/dist/components/post/post-form/PollComposerFields.d.ts +12 -0
  324. package/dist/components/post/post-form/PollComposerFields.js +19 -0
  325. package/dist/components/post/post-form/PostAudienceSelector.d.ts +12 -0
  326. package/dist/components/post/post-form/PostAudienceSelector.js +83 -0
  327. package/dist/components/post/post-form/PostTypeSwitcher.d.ts +16 -0
  328. package/dist/components/post/post-form/PostTypeSwitcher.js +22 -0
  329. package/dist/components/post/post-form/ReplyModal.d.ts +6 -0
  330. package/dist/components/post/post-form/ReplyModal.js +202 -0
  331. package/dist/components/post/post-form/ReplyModalContext.d.ts +10 -0
  332. package/dist/components/post/post-form/ReplyModalContext.js +18 -0
  333. package/dist/components/post/post-form/VisibilitySelector.d.ts +8 -0
  334. package/dist/components/post/post-form/VisibilitySelector.js +35 -0
  335. package/dist/components/post/post-form/audienceChoices.d.ts +14 -0
  336. package/dist/components/post/post-form/audienceChoices.js +66 -0
  337. package/dist/components/post/types/Article.d.ts +5 -0
  338. package/dist/components/post/types/Article.js +14 -0
  339. package/dist/components/post/types/Event.d.ts +5 -0
  340. package/dist/components/post/types/Event.js +19 -0
  341. package/dist/components/post/types/Note.d.ts +5 -0
  342. package/dist/components/post/types/Note.js +10 -0
  343. package/dist/components/post/types/Poll.d.ts +7 -0
  344. package/dist/components/post/types/Poll.js +11 -0
  345. package/dist/components/post/types/article/FullArticle.d.ts +5 -0
  346. package/dist/components/post/types/article/FullArticle.js +8 -0
  347. package/dist/components/post/types/event/CardEvent.d.ts +5 -0
  348. package/dist/components/post/types/event/CardEvent.js +45 -0
  349. package/dist/components/post/types/event/FullEvent.d.ts +5 -0
  350. package/dist/components/post/types/event/FullEvent.js +161 -0
  351. package/dist/components/post/types/event/ProfileEventRelationship.d.ts +5 -0
  352. package/dist/components/post/types/event/ProfileEventRelationship.js +31 -0
  353. package/dist/components/post/types/note/FullNote.d.ts +5 -0
  354. package/dist/components/post/types/note/FullNote.js +5 -0
  355. package/dist/components/post/types/poll/FullPoll.d.ts +5 -0
  356. package/dist/components/post/types/poll/FullPoll.js +7 -0
  357. package/dist/components/post/visibility.d.ts +7 -0
  358. package/dist/components/post/visibility.js +10 -0
  359. package/dist/components/preview-link/LocalPreviewLink.d.ts +4 -0
  360. package/dist/components/preview-link/LocalPreviewLink.js +12 -0
  361. package/dist/components/preview-link/PreviewLink.d.ts +4 -0
  362. package/dist/components/preview-link/PreviewLink.js +11 -0
  363. package/dist/components/preview-link/RemotePreviewLink.d.ts +4 -0
  364. package/dist/components/preview-link/RemotePreviewLink.js +21 -0
  365. package/dist/components/preview-link/helpers.d.ts +7 -0
  366. package/dist/components/preview-link/helpers.js +31 -0
  367. package/dist/components/preview-link/index.d.ts +3 -0
  368. package/dist/components/preview-link/index.js +2 -0
  369. package/dist/components/preview-link/local/GroupPreview.d.ts +4 -0
  370. package/dist/components/preview-link/local/GroupPreview.js +15 -0
  371. package/dist/components/preview-link/local/JamPreview.d.ts +9 -0
  372. package/dist/components/preview-link/local/JamPreview.js +20 -0
  373. package/dist/components/preview-link/local/PostPreview.d.ts +4 -0
  374. package/dist/components/preview-link/local/PostPreview.js +15 -0
  375. package/dist/components/profile/Avatar.d.ts +17 -0
  376. package/dist/components/profile/Avatar.js +36 -0
  377. package/dist/components/profile/AvatarWithName.d.ts +5 -0
  378. package/dist/components/profile/AvatarWithName.js +5 -0
  379. package/dist/components/profile/FollowUnfollowButton.d.ts +8 -0
  380. package/dist/components/profile/FollowUnfollowButton.js +27 -0
  381. package/dist/components/profile/ProfileBadge.d.ts +7 -0
  382. package/dist/components/profile/ProfileBadge.js +12 -0
  383. package/dist/components/profile/ProfileCard.d.ts +24 -0
  384. package/dist/components/profile/ProfileCard.js +12 -0
  385. package/dist/components/profile/ProfileFromId.d.ts +6 -0
  386. package/dist/components/profile/ProfileFromId.js +15 -0
  387. package/dist/components/profile/ProfileHeader.d.ts +10 -0
  388. package/dist/components/profile/ProfileHeader.js +16 -0
  389. package/dist/components/profile/ProfileLink.d.ts +9 -0
  390. package/dist/components/profile/ProfileLink.js +9 -0
  391. package/dist/components/profile/ProfilePageAction.d.ts +6 -0
  392. package/dist/components/profile/ProfilePageAction.js +35 -0
  393. package/dist/components/profile/ProfilePostsAndReplies.d.ts +9 -0
  394. package/dist/components/profile/ProfilePostsAndReplies.js +24 -0
  395. package/dist/components/profile/ProfileSelector.d.ts +14 -0
  396. package/dist/components/profile/ProfileSelector.js +72 -0
  397. package/dist/components/profile/ProfileStats.d.ts +5 -0
  398. package/dist/components/profile/ProfileStats.js +6 -0
  399. package/dist/components/profile/ProfileWithActionCard.d.ts +5 -0
  400. package/dist/components/profile/ProfileWithActionCard.js +6 -0
  401. package/dist/components/profile/ProfilesInput.d.ts +15 -0
  402. package/dist/components/profile/ProfilesInput.js +31 -0
  403. package/dist/components/profile/ReportProfileOrPostModal.d.ts +9 -0
  404. package/dist/components/profile/ReportProfileOrPostModal.js +75 -0
  405. package/dist/components/profile/index.d.ts +30 -0
  406. package/dist/components/profile/index.js +15 -0
  407. package/dist/components/registry/ErrorComponent.d.ts +6 -0
  408. package/dist/components/registry/ErrorComponent.js +7 -0
  409. package/dist/components/registry/PluginLoader.d.ts +3 -0
  410. package/dist/components/registry/PluginLoader.js +51 -0
  411. package/dist/components/registry/PluginRegistryProvider.d.ts +23 -0
  412. package/dist/components/registry/PluginRegistryProvider.js +57 -0
  413. package/dist/components/registry/PluginSlot.d.ts +7 -0
  414. package/dist/components/registry/PluginSlot.js +31 -0
  415. package/dist/components/registry/index.d.ts +10 -0
  416. package/dist/components/registry/index.js +16 -0
  417. package/dist/components/server-data/ServerDataProvider.d.ts +8 -0
  418. package/dist/components/server-data/ServerDataProvider.js +30 -0
  419. package/dist/components/server-data/context.d.ts +121 -0
  420. package/dist/components/server-data/context.js +10 -0
  421. package/dist/components/server-data/index.d.ts +4 -0
  422. package/dist/components/server-data/index.js +2 -0
  423. package/dist/components/server-data/types.d.ts +5 -0
  424. package/dist/components/server-data/types.js +1 -0
  425. package/dist/contexts/credentialsStore/index.d.ts +8 -0
  426. package/dist/contexts/credentialsStore/index.js +13 -0
  427. package/dist/contexts/credentialsStore/types.d.ts +4 -0
  428. package/dist/contexts/credentialsStore/types.js +1 -0
  429. package/dist/contexts/index.d.ts +3 -0
  430. package/dist/contexts/index.js +3 -0
  431. package/dist/contexts/openpeeps/helpers.d.ts +93 -0
  432. package/dist/contexts/openpeeps/helpers.js +311 -0
  433. package/dist/contexts/openpeeps/hooks/accounts.d.ts +302 -0
  434. package/dist/contexts/openpeeps/hooks/accounts.js +17 -0
  435. package/dist/contexts/openpeeps/hooks/admin.d.ts +17177 -0
  436. package/dist/contexts/openpeeps/hooks/admin.js +115 -0
  437. package/dist/contexts/openpeeps/hooks/auth.d.ts +55 -0
  438. package/dist/contexts/openpeeps/hooks/auth.js +22 -0
  439. package/dist/contexts/openpeeps/hooks/conversations.d.ts +9815 -0
  440. package/dist/contexts/openpeeps/hooks/conversations.js +6 -0
  441. package/dist/contexts/openpeeps/hooks/groups.d.ts +319 -0
  442. package/dist/contexts/openpeeps/hooks/groups.js +31 -0
  443. package/dist/contexts/openpeeps/hooks/index.d.ts +18 -0
  444. package/dist/contexts/openpeeps/hooks/index.js +26 -0
  445. package/dist/contexts/openpeeps/hooks/jams.d.ts +3318 -0
  446. package/dist/contexts/openpeeps/hooks/jams.js +32 -0
  447. package/dist/contexts/openpeeps/hooks/other.d.ts +239 -0
  448. package/dist/contexts/openpeeps/hooks/other.js +89 -0
  449. package/dist/contexts/openpeeps/hooks/payments.d.ts +36 -0
  450. package/dist/contexts/openpeeps/hooks/payments.js +10 -0
  451. package/dist/contexts/openpeeps/hooks/posts.d.ts +26001 -0
  452. package/dist/contexts/openpeeps/hooks/posts.js +139 -0
  453. package/dist/contexts/openpeeps/hooks/profiles.d.ts +6896 -0
  454. package/dist/contexts/openpeeps/hooks/profiles.js +43 -0
  455. package/dist/contexts/openpeeps/hooks/search.d.ts +9620 -0
  456. package/dist/contexts/openpeeps/hooks/search.js +24 -0
  457. package/dist/contexts/openpeeps/hooks/streaming.d.ts +26 -0
  458. package/dist/contexts/openpeeps/hooks/streaming.js +10 -0
  459. package/dist/contexts/openpeeps/hooks/useHasAuthToken.d.ts +2 -0
  460. package/dist/contexts/openpeeps/hooks/useHasAuthToken.js +35 -0
  461. package/dist/contexts/openpeeps/index.d.ts +21 -0
  462. package/dist/contexts/openpeeps/index.js +180 -0
  463. package/dist/contexts/openpeeps/types.d.ts +11 -0
  464. package/dist/contexts/openpeeps/types.js +1 -0
  465. package/dist/contexts/router/index.d.ts +28 -0
  466. package/dist/contexts/router/index.js +69 -0
  467. package/dist/email/index.d.ts +13 -0
  468. package/dist/email/index.js +10 -0
  469. package/dist/i18n/I18nProvider.d.ts +19 -0
  470. package/dist/i18n/I18nProvider.js +33 -0
  471. package/dist/i18n/context.d.ts +8 -0
  472. package/dist/i18n/context.js +10 -0
  473. package/dist/i18n/index.d.ts +5 -0
  474. package/dist/i18n/index.js +23 -0
  475. package/dist/index.d.ts +14 -0
  476. package/dist/index.js +14 -0
  477. package/dist/lib/apiErrorMessage.d.ts +3 -0
  478. package/dist/lib/apiErrorMessage.js +14 -0
  479. package/dist/lib/canvasUtils.d.ts +12 -0
  480. package/dist/lib/canvasUtils.js +104 -0
  481. package/dist/lib/configuration/helpers.d.ts +7 -0
  482. package/dist/lib/configuration/helpers.js +83 -0
  483. package/dist/lib/configuration/resolveSchema.d.ts +3 -0
  484. package/dist/lib/configuration/resolveSchema.js +8 -0
  485. package/dist/lib/groupCapabilityHelpers.d.ts +24 -0
  486. package/dist/lib/groupCapabilityHelpers.js +119 -0
  487. package/dist/lib/notificationBadge.d.ts +5 -0
  488. package/dist/lib/notificationBadge.js +25 -0
  489. package/dist/lib/postUnread.d.ts +2 -0
  490. package/dist/lib/postUnread.js +1 -0
  491. package/dist/lib/postViewCounter.d.ts +17 -0
  492. package/dist/lib/postViewCounter.js +162 -0
  493. package/dist/lib/threadHelpers.d.ts +5 -0
  494. package/dist/lib/threadHelpers.js +23 -0
  495. package/dist/lib/unseenCountsOptimistic.d.ts +15 -0
  496. package/dist/lib/unseenCountsOptimistic.js +43 -0
  497. package/dist/log/index.d.ts +11 -0
  498. package/dist/log/index.js +14 -0
  499. package/dist/push/index.d.ts +16 -0
  500. package/dist/push/index.js +145 -0
  501. package/dist/push/usePushSubscription.d.ts +18 -0
  502. package/dist/push/usePushSubscription.js +102 -0
  503. package/dist/push/vapid.d.ts +6 -0
  504. package/dist/push/vapid.js +12 -0
  505. package/dist/pwa/InstallPrompt.d.ts +13 -0
  506. package/dist/pwa/InstallPrompt.js +17 -0
  507. package/dist/pwa/NotificationPermissionPrompt.d.ts +22 -0
  508. package/dist/pwa/NotificationPermissionPrompt.js +56 -0
  509. package/dist/pwa/PwaProvider.d.ts +16 -0
  510. package/dist/pwa/PwaProvider.js +56 -0
  511. package/dist/pwa/UpdatePrompt.d.ts +14 -0
  512. package/dist/pwa/UpdatePrompt.js +14 -0
  513. package/dist/pwa/index.d.ts +18 -0
  514. package/dist/pwa/index.js +16 -0
  515. package/dist/pwa/navigationUrl.d.ts +16 -0
  516. package/dist/pwa/navigationUrl.js +51 -0
  517. package/dist/pwa/pushInvalidate.d.ts +7 -0
  518. package/dist/pwa/pushInvalidate.js +29 -0
  519. package/dist/pwa/registration.d.ts +28 -0
  520. package/dist/pwa/registration.js +71 -0
  521. package/dist/pwa/sw-types.d.ts +14 -0
  522. package/dist/pwa/sw-types.js +1 -0
  523. package/dist/pwa/sw.d.ts +2 -0
  524. package/dist/pwa/sw.js +171 -0
  525. package/dist/pwa/useInstallPrompt.d.ts +10 -0
  526. package/dist/pwa/useInstallPrompt.js +45 -0
  527. package/dist/pwa/useNotificationBadgeSync.d.ts +2 -0
  528. package/dist/pwa/useNotificationBadgeSync.js +23 -0
  529. package/dist/pwa/useServiceWorker.d.ts +19 -0
  530. package/dist/pwa/useServiceWorker.js +49 -0
  531. package/dist/pwa/vite.d.ts +50 -0
  532. package/dist/pwa/vite.js +53 -0
  533. package/dist/react-native.d.ts +11 -0
  534. package/dist/react-native.js +11 -0
  535. package/dist/setupTests.d.ts +1 -0
  536. package/dist/setupTests.js +5 -0
  537. package/dist/stores/breadcrumbs.d.ts +5 -0
  538. package/dist/stores/breadcrumbs.js +5 -0
  539. package/dist/stores/createStore.d.ts +19 -0
  540. package/dist/stores/createStore.js +63 -0
  541. package/dist/stores/index.d.ts +7 -0
  542. package/dist/stores/index.js +9 -0
  543. package/dist/stores/newPosts.d.ts +591 -0
  544. package/dist/stores/newPosts.js +191 -0
  545. package/dist/stores/pageHeader.d.ts +15 -0
  546. package/dist/stores/pageHeader.js +22 -0
  547. package/dist/stores/plusButton.d.ts +5 -0
  548. package/dist/stores/plusButton.js +13 -0
  549. package/dist/stores/types.d.ts +35 -0
  550. package/dist/stores/types.js +1 -0
  551. package/dist/streaming.d.ts +6 -0
  552. package/dist/streaming.js +6 -0
  553. package/dist/types/index.d.ts +0 -0
  554. package/dist/types/index.js +1 -0
  555. package/package.json +72 -0
  556. package/src/pwa/navigationUrl.ts +61 -0
  557. package/src/pwa/sw-types.ts +9 -0
  558. package/src/pwa/sw.ts +228 -0
@@ -0,0 +1,166 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import '@livekit/components-styles';
4
+ import './livekit-light-theme.css';
5
+ import { jamFromEvent, getJamCapacityJoinBlock } from '@openpeepshq/common/lib';
6
+ import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
7
+ import { useT } from '../../i18n/index.js';
8
+ import { useCurrentProfile } from '../layout/IdentityContext.js';
9
+ import { useServerInfo } from '../server-data/context.js';
10
+ import { JamProvider, useJamContext } from './JamContext.js';
11
+ import { JamLobby } from './JamLobby.js';
12
+ import { JamCapacityGate } from './JamCapacityGate.js';
13
+ import { JamRequestJoin } from './JamRequestJoin.js';
14
+ import { JamVideoCall } from './JamVideoCall.js';
15
+ import { apiErrorMessage } from '../../lib/apiErrorMessage.js';
16
+ /**
17
+ * Top-level React port of `core/jams/room/Room.svelte`. Decides whether to
18
+ * render the lobby, the live video call, an "access denied / jam not active"
19
+ * screen, or — for observers — auto-connects via the join token.
20
+ *
21
+ * Drop this into a route or page; everything below it lives inside the
22
+ * `<JamProvider>`.
23
+ */
24
+ export function JamRoom({ jamPost, observer = false }) {
25
+ return (_jsx(JamProvider, { jamPost: jamPost, observer: observer, children: _jsx(JamRoomInner, {}) }));
26
+ }
27
+ function JamRoomInner() {
28
+ const t = useT();
29
+ const { jamPost, jam, jamEvent, observer } = useJamContext();
30
+ const { openpeepsApi, client } = useOpenpeeps();
31
+ const serverInfo = useServerInfo();
32
+ const me = useCurrentProfile();
33
+ const jamStateQuery = openpeepsApi.useJamState(jamPost.id);
34
+ const postQuery = openpeepsApi.usePost(jamPost.id);
35
+ const rsvpToEvent = openpeepsApi.rsvpToEventAction({ id: jamPost.id });
36
+ const post = postQuery.data ?? jamPost;
37
+ const [connection, setConnection] = useState(undefined);
38
+ const [observerError, setObserverError] = useState();
39
+ const [autoRsvpError, setAutoRsvpError] = useState();
40
+ const autoRsvpStarted = useRef(false);
41
+ const livekitUrl = serverInfo.jams.livekit.url;
42
+ const isModerator = !!me && (jam?.moderators.includes(me.id) ?? false);
43
+ const jamActive = !!jamStateQuery.data?.active;
44
+ const handleJoin = ({ token, livekitUrl: url, choices, }) => {
45
+ setConnection({
46
+ token,
47
+ livekitUrl: url ?? livekitUrl,
48
+ audio: choices?.audioEnabled ?? true,
49
+ video: choices?.videoEnabled ?? true,
50
+ });
51
+ };
52
+ const capacityBlock = (() => {
53
+ if (!me) {
54
+ const eventData = post.data?.type === 'event' ? post.data : undefined;
55
+ if (eventData?.maxAttendees) {
56
+ return { blocked: true, reason: 'rsvp-required' };
57
+ }
58
+ return { blocked: false };
59
+ }
60
+ return getJamCapacityJoinBlock(post, me);
61
+ })();
62
+ const shouldAutoRsvp = !!me &&
63
+ jamActive &&
64
+ capacityBlock.blocked &&
65
+ capacityBlock.reason === 'rsvp-required';
66
+ useEffect(() => {
67
+ if (!observer)
68
+ return;
69
+ let cancelled = false;
70
+ (async () => {
71
+ try {
72
+ const res = await client.jams.token({
73
+ pathParameters: { id: jamPost.id },
74
+ });
75
+ if ('error' in res) {
76
+ if (!cancelled) {
77
+ setObserverError(apiErrorMessage(res.error, t, t('jams.lobby.tokenError', {
78
+ defaultValue: 'Failed to get jam token',
79
+ })));
80
+ }
81
+ return;
82
+ }
83
+ if (cancelled)
84
+ return;
85
+ setConnection({
86
+ token: res.data.token,
87
+ livekitUrl: res.data.livekitUrl ?? livekitUrl,
88
+ audio: false,
89
+ video: false,
90
+ });
91
+ }
92
+ catch (err) {
93
+ if (!cancelled) {
94
+ setObserverError(apiErrorMessage(err, t, t('jams.lobby.tokenError', {
95
+ defaultValue: 'Failed to get jam token',
96
+ })));
97
+ }
98
+ }
99
+ })();
100
+ return () => {
101
+ cancelled = true;
102
+ };
103
+ }, [observer, jamPost.id, client, livekitUrl, t]);
104
+ useEffect(() => {
105
+ if (!shouldAutoRsvp || autoRsvpStarted.current)
106
+ return;
107
+ autoRsvpStarted.current = true;
108
+ let cancelled = false;
109
+ (async () => {
110
+ try {
111
+ await rsvpToEvent({ response: 'yes' });
112
+ if (!cancelled) {
113
+ await postQuery.refetch();
114
+ }
115
+ }
116
+ catch (err) {
117
+ if (!cancelled) {
118
+ autoRsvpStarted.current = false;
119
+ setAutoRsvpError(apiErrorMessage(err, t, t('jams.room.autoRsvpError', {
120
+ defaultValue: 'Failed to register for this event.',
121
+ })));
122
+ }
123
+ }
124
+ })();
125
+ return () => {
126
+ cancelled = true;
127
+ };
128
+ }, [shouldAutoRsvp, postQuery, rsvpToEvent, t]);
129
+ if (connection) {
130
+ return (_jsx(JamVideoCall, { token: connection.token, serverUrl: connection.livekitUrl, audio: connection.audio, video: connection.video, onDisconnected: () => setConnection(undefined) }));
131
+ }
132
+ if (observer) {
133
+ return (_jsx("div", { className: "flex h-full w-full items-center justify-center", children: observerError ? (_jsx("span", { className: "text-destructive text-center text-sm", children: observerError })) : (_jsx("span", { className: "text-center text-lg", children: t('jams.room.observerConnecting', {
134
+ defaultValue: 'Connecting as observer…',
135
+ }) })) }));
136
+ }
137
+ if (shouldAutoRsvp && !autoRsvpError) {
138
+ return (_jsx("div", { className: "flex h-full w-full items-center justify-center", children: _jsx("span", { className: "text-center text-lg", children: t('jams.room.autoRsvpInProgress', {
139
+ defaultValue: 'Registering you for this event…',
140
+ }) }) }));
141
+ }
142
+ if (capacityBlock.blocked) {
143
+ return (_jsx(JamCapacityGate, { jamPost: post, reason: capacityBlock.reason, eventName: jamEvent.name }));
144
+ }
145
+ const canDirectJoin = isModerator || (jamActive && !jam?.waitingRoom);
146
+ const canRequestJoin = !isModerator && !!jam?.waitingRoom;
147
+ if (canDirectJoin) {
148
+ return _jsx(JamLobby, { onJoin: handleJoin });
149
+ }
150
+ if (canRequestJoin) {
151
+ return _jsx(JamRequestJoin, { onJoin: handleJoin });
152
+ }
153
+ return (_jsx("div", { className: "mx-auto flex h-full w-full items-center justify-center p-4", children: _jsxs("div", { className: "space-y-5 text-center", children: [_jsx("h3", { className: "text-lg", children: jamEvent.name }), _jsxs("div", { className: "bg-surface-100 flex w-full flex-col items-center justify-center space-y-3 rounded border p-4", children: [_jsx("span", { children: t('jams.room.jamNotActive', {
154
+ defaultValue: 'This jam is not active right now.',
155
+ }) }), me ? (_jsx("a", { href: "/jams", className: "bg-primary text-primary-foreground rounded px-4 py-2 text-sm", children: t('jams.discover.checkOtherJams', {
156
+ defaultValue: 'Check other jams',
157
+ }) })) : (_jsxs(_Fragment, { children: [_jsx("a", { href: "/auth/register", className: "bg-primary text-primary-foreground rounded px-4 py-2 text-sm", children: t('navigation.joinCommunity', {
158
+ defaultValue: 'Join the community',
159
+ }) }), _jsxs("span", { children: [t('navigation.haveAccount', {
160
+ defaultValue: 'Already have an account?',
161
+ }), ' ', _jsx("a", { href: "/auth/login", className: "underline", children: t('navigation.logIn', { defaultValue: 'Log in' }) })] })] }))] })] }) }));
162
+ }
163
+ /** Convenience helper for callers that have a `PublicPost` of any type. */
164
+ export function isJamPost(post) {
165
+ return (post.data?.type === 'event' && !!jamFromEvent(post));
166
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Red "recording" pill shown to every participant while egress is active,
3
+ * mirroring the Svelte `RecordingIndicator` (jam recordStart/recordStop events).
4
+ */
5
+ export declare function JamRecordingIndicator(): import("react/jsx-runtime").JSX.Element | null;
6
+ /**
7
+ * Dismissable banner shown when the local connection quality degrades, mirroring
8
+ * the Svelte `NetworkQuality` component.
9
+ */
10
+ export declare function JamNetworkQuality(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { useConnectionQualityIndicator, useLocalParticipant, } from '@livekit/components-react';
4
+ import { ConnectionQuality } from 'livekit-client';
5
+ import { Circle, X } from 'lucide-react';
6
+ import { useT } from '../../i18n/index.js';
7
+ import { useJamRecordingState } from './jamRecordingState.js';
8
+ /**
9
+ * Red "recording" pill shown to every participant while egress is active,
10
+ * mirroring the Svelte `RecordingIndicator` (jam recordStart/recordStop events).
11
+ */
12
+ export function JamRecordingIndicator() {
13
+ const t = useT();
14
+ const { isRecording } = useJamRecordingState();
15
+ if (!isRecording)
16
+ return null;
17
+ return (_jsxs("div", { className: "bg-error/90 text-error-foreground pointer-events-none fixed left-4 top-4 z-50 flex items-center gap-2 rounded-full px-3 py-1 text-sm font-medium shadow-lg", children: [_jsx(Circle, { className: "size-3 animate-pulse fill-current" }), t('events.recordingInProgress', { defaultValue: 'Recording' })] }));
18
+ }
19
+ /**
20
+ * Dismissable banner shown when the local connection quality degrades, mirroring
21
+ * the Svelte `NetworkQuality` component.
22
+ */
23
+ export function JamNetworkQuality() {
24
+ const t = useT();
25
+ const { localParticipant } = useLocalParticipant();
26
+ const { quality } = useConnectionQualityIndicator({
27
+ participant: localParticipant,
28
+ });
29
+ const [dismissed, setDismissed] = useState(false);
30
+ const poor = quality === ConnectionQuality.Poor || quality === ConnectionQuality.Lost;
31
+ if (!poor || dismissed)
32
+ return null;
33
+ return (_jsxs("div", { className: "bg-warning/90 text-warning-foreground fixed left-1/2 top-4 z-50 flex -translate-x-1/2 items-center gap-3 rounded-lg px-4 py-2 text-sm shadow-lg", children: [_jsxs("span", { children: [_jsx("span", { className: "font-medium", children: t('jams.network.connectionStatus', {
34
+ defaultValue: 'Connection status',
35
+ }) }), ' ', t('jams.network.connectionDetail', {
36
+ defaultValue: 'Your internet connection is {{quality}}.',
37
+ quality,
38
+ })] }), _jsx("button", { type: "button", title: t('jams.network.dismiss', { defaultValue: 'Dismiss' }), onClick: () => setDismissed(true), children: _jsx(X, { className: "size-4" }) })] }));
39
+ }
@@ -0,0 +1,15 @@
1
+ export interface JamVideoCallProps {
2
+ token: string;
3
+ serverUrl: string;
4
+ /** Initial audio/video defaults. Useful for hand-off from `<JamLobby>`. */
5
+ audio?: boolean;
6
+ video?: boolean;
7
+ /** Fired when the participant leaves the room. */
8
+ onDisconnected?: () => void;
9
+ }
10
+ /**
11
+ * Connects to LiveKit and renders {@link JamConference} — LiveKit layout
12
+ * primitives plus OpenPeeps persisted chat, reaction overlays, moderator
13
+ * tools, and the waiting-room admit panel.
14
+ */
15
+ export declare function JamVideoCall({ token, serverUrl, audio, video, onDisconnected, }: JamVideoCallProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { LiveKitRoom } from '@livekit/components-react';
4
+ import { defaultRoomOptions } from './constants.js';
5
+ import { useJamContext } from './JamContext.js';
6
+ import { JamConference } from './JamConference.js';
7
+ import { useJamLiveKitTheme } from './useJamLiveKitTheme.js';
8
+ /**
9
+ * Connects to LiveKit and renders {@link JamConference} — LiveKit layout
10
+ * primitives plus OpenPeeps persisted chat, reaction overlays, moderator
11
+ * tools, and the waiting-room admit panel.
12
+ */
13
+ export function JamVideoCall({ token, serverUrl, audio = true, video = true, onDisconnected, }) {
14
+ const { jam } = useJamContext();
15
+ const lkTheme = useJamLiveKitTheme();
16
+ const roomOptions = useMemo(() => defaultRoomOptions[jam.type] ?? defaultRoomOptions['video-call'], [jam.type]);
17
+ return (_jsx(LiveKitRoom, { serverUrl: serverUrl, token: token, audio: audio, video: video, options: roomOptions, "data-lk-theme": lkTheme, style: { height: '100vh', width: '100vw' }, onDisconnected: onDisconnected, children: _jsx(JamConference, {}) }));
18
+ }
@@ -0,0 +1,13 @@
1
+ import { type TrackReferenceOrPlaceholder } from '@livekit/components-react';
2
+ export interface JamVideoLayoutProps {
3
+ /** One camera track reference (or placeholder) per participant. */
4
+ cameraTracks: TrackReferenceOrPlaceholder[];
5
+ /** Active screen-share track references. */
6
+ screenShareTracks: TrackReferenceOrPlaceholder[];
7
+ observer: boolean;
8
+ }
9
+ /**
10
+ * Picks the in-call layout to match the Svelte `VideoCall` mode selection:
11
+ * screen-sharing > observer/default grid > alone (1) > one-on-one (2) > grid.
12
+ */
13
+ export declare function JamVideoLayout({ cameraTracks, screenShareTracks, observer, }: JamVideoLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useRef } from 'react';
3
+ import { VideoTrack, isTrackReference, useRoomContext, } from '@livekit/components-react';
4
+ import { Maximize2, ScreenShare } from 'lucide-react';
5
+ import { profileName } from '@openpeepshq/common/lib';
6
+ import { Button } from '@openpeepshq/react-ui';
7
+ import { useT } from '../../i18n/index.js';
8
+ import { AvatarWithName } from '../profile/index.js';
9
+ import { JamCallParticipant } from './JamCallParticipant.js';
10
+ import { parseParticipantMetadata } from './jamEventActions.js';
11
+ /** Responsive grid for 1 (observer) or 3+ participants (Svelte `Default`). */
12
+ function DefaultGrid({ cameraTracks, }) {
13
+ return (_jsx("div", { className: "mb-16 grid h-full w-full auto-rows-min grid-cols-2 place-items-center content-start justify-items-center gap-2 overflow-auto p-2 md:mb-32 md:flex md:flex-grow md:flex-wrap md:content-center md:items-center md:justify-center", children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-40 md:size-52" }, track.participant.identity))) }));
14
+ }
15
+ /** Single local participant filling the view (Svelte `Alone`). */
16
+ function AloneLayout({ track }) {
17
+ return (_jsx("div", { className: "size-full p-2", children: _jsx(JamCallParticipant, { trackRef: track, size: "size-full" }) }));
18
+ }
19
+ /** Remote full-screen with the local participant as a picture-in-picture tile
20
+ * (Svelte `OneOnOne`). */
21
+ function OneOnOneLayout({ local, remote, }) {
22
+ return (_jsxs("div", { className: "relative size-full p-2", children: [_jsx(JamCallParticipant, { trackRef: remote, size: "size-full" }), _jsx("div", { className: "absolute bottom-12 right-12 mb-8 size-32 md:size-56", children: _jsx(JamCallParticipant, { trackRef: local, size: "size-full" }) })] }));
23
+ }
24
+ /** Presented screen plus a strip of participant tiles (Svelte `ScreenSharing`). */
25
+ function ScreenSharingLayout({ cameraTracks, screenShareTrack, }) {
26
+ const t = useT();
27
+ const room = useRoomContext();
28
+ const containerRef = useRef(null);
29
+ const participant = screenShareTrack.participant;
30
+ const profile = parseParticipantMetadata(participant.metadata).profile;
31
+ const isLocal = participant.isLocal;
32
+ const toggleFullscreen = () => {
33
+ const el = containerRef.current;
34
+ if (!el)
35
+ return;
36
+ if (document.fullscreenElement) {
37
+ void document.exitFullscreen().catch(() => undefined);
38
+ }
39
+ else {
40
+ void el.requestFullscreen().catch(() => undefined);
41
+ }
42
+ };
43
+ return (_jsxs("div", { className: "flex h-auto w-full flex-col justify-center gap-2 p-2 md:h-full md:flex-row", children: [_jsxs("div", { className: "flex flex-1 flex-col gap-2 md:size-full", children: [_jsx("div", { className: "flex w-full items-center justify-between", children: isLocal ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-x-2", children: [_jsx(ScreenShare, { className: "size-5" }), profileName(profile), " ", t('jams.screenShare.youPresenting')] }), _jsx(Button, { variant: "variant-ringed-secondary", title: t('jams.screenShare.stopTitle'), action: () => void room.localParticipant
44
+ .setScreenShareEnabled(false)
45
+ .catch(() => undefined), children: t('jams.screenShare.stopSharing') })] })) : (_jsxs("div", { className: "flex items-center gap-x-2 py-2", children: [_jsx(AvatarWithName, { profile: profile }), t('jams.screenShare.presenting')] })) }), _jsx("div", { ref: containerRef, className: "relative w-full flex-1 overflow-hidden rounded-xl border md:p-0", children: isTrackReference(screenShareTrack) ? (_jsxs(_Fragment, { children: [_jsx(VideoTrack, { trackRef: screenShareTrack, className: "h-full w-full object-contain object-center" }), _jsx("button", { type: "button", title: t('jams.screenShare.startStopTitle'), className: "bg-surface-900/60 text-on-primary-token hover:bg-surface-900/80 absolute bottom-3 right-3 rounded-full p-2 transition-colors", onClick: toggleFullscreen, children: _jsx(Maximize2, { className: "size-5" }) })] })) : null })] }), _jsx("div", { className: `flex w-full flex-row flex-wrap content-start justify-center gap-1 overflow-y-auto md:my-4 md:h-full ${cameraTracks.length > 7 ? 'md:w-56' : 'md:w-28'}`, children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-24 flex-shrink-0", compact: true }, track.participant.identity))) })] }));
46
+ }
47
+ /**
48
+ * Picks the in-call layout to match the Svelte `VideoCall` mode selection:
49
+ * screen-sharing > observer/default grid > alone (1) > one-on-one (2) > grid.
50
+ */
51
+ export function JamVideoLayout({ cameraTracks, screenShareTracks, observer, }) {
52
+ const [screenShareTrack] = screenShareTracks;
53
+ if (screenShareTrack) {
54
+ return (_jsx(ScreenSharingLayout, { cameraTracks: cameraTracks, screenShareTrack: screenShareTrack }));
55
+ }
56
+ const [firstTrack] = cameraTracks;
57
+ if (!observer && cameraTracks.length === 1 && firstTrack) {
58
+ return _jsx(AloneLayout, { track: firstTrack });
59
+ }
60
+ if (!observer && cameraTracks.length === 2) {
61
+ const local = cameraTracks.find((track) => track.participant.isLocal);
62
+ const remote = cameraTracks.find((track) => !track.participant.isLocal);
63
+ if (local && remote) {
64
+ return _jsx(OneOnOneLayout, { local: local, remote: remote });
65
+ }
66
+ }
67
+ return _jsx(DefaultGrid, { cameraTracks: cameraTracks });
68
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Leave / close control mirroring the Svelte `LeaveCloseButton`. Moderators are
3
+ * offered a choice between leaving (everyone stays) and closing the jam for
4
+ * everyone; everyone else just disconnects.
5
+ */
6
+ export declare const LeaveCloseButton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { useRoomContext } from '@livekit/components-react';
4
+ import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from '@openpeepshq/react-ui';
5
+ import { useNavigate } from '../../contexts/router/index.js';
6
+ import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
7
+ import { useT } from '../../i18n/index.js';
8
+ import { useCurrentProfile } from '../layout/IdentityContext.js';
9
+ import { useJamContext } from './JamContext.js';
10
+ /**
11
+ * Leave / close control mirroring the Svelte `LeaveCloseButton`. Moderators are
12
+ * offered a choice between leaving (everyone stays) and closing the jam for
13
+ * everyone; everyone else just disconnects.
14
+ */
15
+ export const LeaveCloseButton = () => {
16
+ const t = useT();
17
+ const room = useRoomContext();
18
+ const navigate = useNavigate();
19
+ const me = useCurrentProfile();
20
+ const { jam, jamPost } = useJamContext();
21
+ const { openpeepsApi } = useOpenpeeps();
22
+ const closeJam = openpeepsApi.closeJamAction({ id: jamPost.id });
23
+ const isModerator = !!me && jam.moderators.includes(me.id);
24
+ const [busy, setBusy] = useState(false);
25
+ const [confirmOpen, setConfirmOpen] = useState(false);
26
+ const leave = async () => {
27
+ await room.disconnect();
28
+ navigate('/jams');
29
+ };
30
+ const handleLeave = async () => {
31
+ setBusy(true);
32
+ try {
33
+ await leave();
34
+ }
35
+ finally {
36
+ setBusy(false);
37
+ }
38
+ };
39
+ const handleClose = async () => {
40
+ setBusy(true);
41
+ try {
42
+ await closeJam();
43
+ navigate('/jams');
44
+ }
45
+ finally {
46
+ setBusy(false);
47
+ }
48
+ };
49
+ const handleClick = () => {
50
+ if (isModerator) {
51
+ setConfirmOpen(true);
52
+ }
53
+ else {
54
+ void handleLeave();
55
+ }
56
+ };
57
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "variant-filled-error", className: "rounded-full", title: t('jams.exit.confirm'), disabled: busy, action: handleClick, children: t('jams.exit.confirm') }), _jsx(Dialog, { open: confirmOpen, onOpenChange: (open) => !open && setConfirmOpen(false), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('jams.exit.title') }) }), _jsx("p", { className: "px-1 text-sm", children: t('jams.exit.closeOrExit.description') }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-error", disabled: busy, action: () => void handleClose(), children: t('jams.close.confirm') }), _jsx(Button, { variant: "variant-filled-error", disabled: busy, action: () => void handleLeave(), children: t('jams.exit.confirm') })] })] }) })] }));
58
+ };
@@ -0,0 +1 @@
1
+ export declare function LiveJamsSection(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { ChevronDown, ChevronRight, PhoneOff } from 'lucide-react';
4
+ import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
5
+ import { useT } from '../../i18n/index.js';
6
+ import { AccessDeniedLoader } from '../layout/AccessDeniedLoader.js';
7
+ import { CardEvent } from '../post/types/event/CardEvent.js';
8
+ export function LiveJamsSection() {
9
+ const t = useT();
10
+ const { openpeepsApi } = useOpenpeeps();
11
+ const liveJamsQuery = openpeepsApi.useJams();
12
+ const [open, setOpen] = useState(true);
13
+ return (_jsxs("section", { className: "mb-8", children: [_jsxs("button", { type: "button", className: "mb-3 flex items-center gap-3 px-1", onClick: () => setOpen((value) => !value), children: [open ? (_jsx(ChevronDown, { className: "size-5" })) : (_jsx(ChevronRight, { className: "size-5" })), _jsx("h2", { className: "text-lg font-semibold", children: t('jams.liveJams', { defaultValue: 'Live jams' }) })] }), open ? (_jsx(AccessDeniedLoader, { queries: [liveJamsQuery], children: (liveJamsQuery.data ?? []).length ? (_jsx("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2 md:gap-4", children: (liveJamsQuery.data ?? []).map((jam) => (_jsx(CardEvent, { post: jam }, jam.id))) })) : (_jsxs("div", { className: "flex h-72 w-full flex-col items-center justify-center gap-y-6", children: [_jsx(PhoneOff, { size: 60, className: "text-muted-foreground" }), _jsx("p", { children: t('jams.noLiveJams', {
14
+ defaultValue: 'No live jams right now',
15
+ }) })] })) })) : null] }));
16
+ }
@@ -0,0 +1 @@
1
+ export default function animateEmoji(element: HTMLElement): void;
@@ -0,0 +1,48 @@
1
+ // floating emoji animation — Gregor Mitscha-Baude 2021
2
+ const g = -0.4e-4;
3
+ const G = Math.abs(g);
4
+ const tmax = 5000;
5
+ const Rx = 2 * G;
6
+ const Fx = 4 * G;
7
+ const vx0 = 0.1 * tmax * G;
8
+ const Fy = 2 * G;
9
+ const vy0 = 0.4 * tmax * G;
10
+ const size = 80;
11
+ const Ra = 1e-8 * size * 360;
12
+ const Fa = 5e-4;
13
+ const Sa = (5 * G) / size;
14
+ function move(t, x, vx, y, vy, a, va) {
15
+ const dt = Date.now() - t;
16
+ t += dt;
17
+ x += dt * vx;
18
+ y += dt * vy;
19
+ a += dt * va;
20
+ vx += dt * (Rx * randn() - Fx * vx);
21
+ vy += dt * (g - Fy * vy);
22
+ va += dt * (-Sa * a + Ra * randn() - Fa * va);
23
+ return [t, x, vx, y, vy, a, va];
24
+ }
25
+ function render(emojiStyle, t, t0, tend, x, y, a) {
26
+ const timeFraction = (t - t0) / (tend - t0);
27
+ const scale = 1 - 0.75 * timeFraction;
28
+ const opacity = 1 - timeFraction ** 2;
29
+ emojiStyle.opacity = `${opacity}`;
30
+ emojiStyle.transform = `scale(${scale}) translate(${x / scale}px,${-y / scale}px) rotate(${a}deg)`;
31
+ }
32
+ const randn = () => Math.sqrt(-2 * Math.log(1 - Math.random())) *
33
+ Math.cos(2 * Math.PI * Math.random());
34
+ export default function animateEmoji(element) {
35
+ const emojiStyle = element.style;
36
+ const t0 = Date.now();
37
+ const tend = t0 + tmax;
38
+ const vx00 = vx0 * randn();
39
+ let [t, x, vx, y, vy, a, va] = [t0, 0, vx00, 0, vy0, 0, 0];
40
+ function step() {
41
+ if (t > tend)
42
+ return;
43
+ [t, x, vx, y, vy, a, va] = [...move(t, x, vx, y, vy, a, va)];
44
+ render(emojiStyle, t, t0, tend, x, y, a);
45
+ window.requestAnimationFrame(step);
46
+ }
47
+ window.requestAnimationFrame(step);
48
+ }
@@ -0,0 +1,8 @@
1
+ import type { Track, TrackProcessor } from 'livekit-client';
2
+ /**
3
+ * LiveKit video track processor that applies the `@openpeepshq/greenscreen`
4
+ * background blur, mirroring the Svelte `blurProcessor` pipeline. Used both for
5
+ * the lobby preview track and the published in-room camera track via
6
+ * `LocalVideoTrack.setProcessor` / `stopProcessor`.
7
+ */
8
+ export declare function createBlurProcessor(radius?: number): TrackProcessor<Track.Kind.Video>;
@@ -0,0 +1,28 @@
1
+ import { blurProcessor, transformStream } from '@openpeepshq/greenscreen';
2
+ /**
3
+ * LiveKit video track processor that applies the `@openpeepshq/greenscreen`
4
+ * background blur, mirroring the Svelte `blurProcessor` pipeline. Used both for
5
+ * the lobby preview track and the published in-room camera track via
6
+ * `LocalVideoTrack.setProcessor` / `stopProcessor`.
7
+ */
8
+ export function createBlurProcessor(radius = 12) {
9
+ let output;
10
+ const processor = {
11
+ name: 'greenscreen-blur',
12
+ async init(opts) {
13
+ const input = new MediaStream([opts.track]);
14
+ output = await transformStream(input, blurProcessor(radius));
15
+ processor.processedTrack = output.getVideoTracks()[0];
16
+ },
17
+ async restart(opts) {
18
+ await processor.destroy();
19
+ await processor.init(opts);
20
+ },
21
+ async destroy() {
22
+ output?.getTracks().forEach((track) => track.stop());
23
+ output = undefined;
24
+ processor.processedTrack = undefined;
25
+ },
26
+ };
27
+ return processor;
28
+ }
@@ -0,0 +1,10 @@
1
+ import { type RoomOptions } from 'livekit-client';
2
+ /**
3
+ * Defaults for LiveKit `Room` keyed by jam `type`. Tweaks here apply to every
4
+ * `<JamRoom>` automatically.
5
+ */
6
+ export declare const defaultRoomOptions: Record<string, RoomOptions>;
7
+ export declare const JAM_EMOJIS: string[];
8
+ /** Alias mirroring the Svelte `emojis` export used by the reaction picker. */
9
+ export declare const emojis: string[];
10
+ export declare const audioOutputSupported: boolean;
@@ -0,0 +1,44 @@
1
+ import { VideoPresets } from 'livekit-client';
2
+ /**
3
+ * Defaults for LiveKit `Room` keyed by jam `type`. Tweaks here apply to every
4
+ * `<JamRoom>` automatically.
5
+ */
6
+ export const defaultRoomOptions = {
7
+ 'video-call': {
8
+ adaptiveStream: true,
9
+ dynacast: true,
10
+ publishDefaults: {
11
+ simulcast: true,
12
+ videoSimulcastLayers: [VideoPresets.h90, VideoPresets.h216],
13
+ videoCodec: 'vp9',
14
+ backupCodec: {
15
+ codec: 'vp8',
16
+ },
17
+ },
18
+ videoCaptureDefaults: {
19
+ resolution: {
20
+ width: 256,
21
+ height: 256,
22
+ },
23
+ },
24
+ audioCaptureDefaults: {
25
+ noiseSuppression: true,
26
+ echoCancellation: true,
27
+ },
28
+ },
29
+ };
30
+ export const JAM_EMOJIS = [
31
+ '💖',
32
+ '👍🏿',
33
+ '🎉',
34
+ '👏🏿',
35
+ '😂',
36
+ '😮',
37
+ '😥',
38
+ '🤔',
39
+ '👎🏿',
40
+ ];
41
+ /** Alias mirroring the Svelte `emojis` export used by the reaction picker. */
42
+ export const emojis = JAM_EMOJIS;
43
+ export const audioOutputSupported = typeof HTMLMediaElement !== 'undefined' &&
44
+ 'setSinkId' in HTMLMediaElement.prototype;
@@ -0,0 +1,24 @@
1
+ export { JamRoom, isJamPost } from './JamRoom';
2
+ export type { JamRoomProps, LocalUserChoices } from './JamRoom';
3
+ export { JamLobby } from './JamLobby';
4
+ export type { JamLobbyProps } from './JamLobby';
5
+ export { JamVideoCall } from './JamVideoCall';
6
+ export type { JamVideoCallProps } from './JamVideoCall';
7
+ export { JamProvider, useJamContext, useJamObserver } from './JamContext';
8
+ export type { JamContextValue, JamProviderProps } from './JamContext';
9
+ export { CreateNewJamProvider, useCreateNewJam } from './CreateNewJamContext';
10
+ export { JamRequestJoin } from './JamRequestJoin';
11
+ export type { JamRequestJoinProps } from './JamRequestJoin';
12
+ export { JamConference } from './JamConference';
13
+ export { JamParticipantConference } from './JamParticipantConference';
14
+ export { JamFooter } from './JamFooter';
15
+ export { JamVideoLayout } from './JamVideoLayout';
16
+ export { JamCallParticipant } from './JamCallParticipant';
17
+ export { JamPeopleDrawer } from './JamPeopleDrawer';
18
+ export { JamRecordingIndicator, JamNetworkQuality } from './JamRoomIndicators';
19
+ export { JamChatDrawer } from './JamChatDrawer';
20
+ export { JamDetailsDrawer } from './JamDetailsDrawer';
21
+ export { JamEventsProvider, useJamEventsContext } from './JamEventsContext';
22
+ export { JamGuestForm } from './JamGuestForm';
23
+ export { LiveJamsSection } from './LiveJamsSection';
24
+ export { defaultRoomOptions, JAM_EMOJIS } from './constants';
@@ -0,0 +1,19 @@
1
+ export { JamRoom, isJamPost } from './JamRoom.js';
2
+ export { JamLobby } from './JamLobby.js';
3
+ export { JamVideoCall } from './JamVideoCall.js';
4
+ export { JamProvider, useJamContext, useJamObserver } from './JamContext.js';
5
+ export { CreateNewJamProvider, useCreateNewJam } from './CreateNewJamContext.js';
6
+ export { JamRequestJoin } from './JamRequestJoin.js';
7
+ export { JamConference } from './JamConference.js';
8
+ export { JamParticipantConference } from './JamParticipantConference.js';
9
+ export { JamFooter } from './JamFooter.js';
10
+ export { JamVideoLayout } from './JamVideoLayout.js';
11
+ export { JamCallParticipant } from './JamCallParticipant.js';
12
+ export { JamPeopleDrawer } from './JamPeopleDrawer.js';
13
+ export { JamRecordingIndicator, JamNetworkQuality } from './JamRoomIndicators.js';
14
+ export { JamChatDrawer } from './JamChatDrawer.js';
15
+ export { JamDetailsDrawer } from './JamDetailsDrawer.js';
16
+ export { JamEventsProvider, useJamEventsContext } from './JamEventsContext.js';
17
+ export { JamGuestForm } from './JamGuestForm.js';
18
+ export { LiveJamsSection } from './LiveJamsSection.js';
19
+ export { defaultRoomOptions, JAM_EMOJIS } from './constants.js';
@@ -0,0 +1,26 @@
1
+ import type { JamEvent, PublicProfile } from '@openpeepshq/common/types';
2
+ import type { Room } from 'livekit-client';
3
+ /**
4
+ * Shape of the JSON encoded into a LiveKit participant's `metadata`, mirroring
5
+ * the Svelte `MetadataType`. `handRaised` is an ISO timestamp (or absent).
6
+ */
7
+ export type JamParticipantMetadata = {
8
+ profile?: PublicProfile;
9
+ handRaised?: string;
10
+ observer?: boolean;
11
+ };
12
+ export declare function parseParticipantMetadata(metadata?: string): JamParticipantMetadata;
13
+ /**
14
+ * Toggle the local participant's raised-hand flag via participant metadata,
15
+ * mirroring the Svelte `toggleHand` action.
16
+ */
17
+ export declare function toggleHand(room: Room): Promise<void>;
18
+ /** Publish + persist a join/leave attendance event (mirrors Svelte). */
19
+ export declare function sendAttendance(room: Room, persistEvent: PersistJamEvent, type: 'join' | 'leave'): Promise<JamEvent>;
20
+ type PersistJamEvent = (event: JamEvent, pathParams: {
21
+ id: string;
22
+ }) => Promise<JamEvent>;
23
+ export declare function sendJamEvent(room: Room, persistEvent: PersistJamEvent, type: JamEvent['type'], content: JamEvent['content']): Promise<JamEvent>;
24
+ export declare function sendReaction(room: Room, emoji: string, persistEvent: PersistJamEvent): Promise<JamEvent>;
25
+ export declare function parseJamEventPayload(payload: Uint8Array): JamEvent | undefined;
26
+ export {};