@openpeepshq/react 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (418) hide show
  1. package/dist/components/accounts/SignUpLoginModal.js +2 -2
  2. package/dist/components/configuration/ConfigMenuButton.d.ts +10 -0
  3. package/dist/components/configuration/ConfigMenuButton.js +12 -0
  4. package/dist/components/configuration/ConfigurationTree.js +1 -1
  5. package/dist/components/configuration/index.d.ts +2 -0
  6. package/dist/components/configuration/index.js +1 -0
  7. package/dist/components/conversations/ConversationMessageBubble.d.ts +2 -1
  8. package/dist/components/conversations/ConversationMessageBubble.js +4 -5
  9. package/dist/components/conversations/CreateNewConversation.js +10 -42
  10. package/dist/components/conversations/DirectMessagesHeaderActions.js +1 -1
  11. package/dist/components/conversations/MessageInThread.js +1 -2
  12. package/dist/components/form/ImageEditModal.js +2 -4
  13. package/dist/components/form/ImageInput.js +13 -8
  14. package/dist/components/form/LocationInput.js +1 -1
  15. package/dist/components/groups/AddGroupMembersButton.d.ts +1 -1
  16. package/dist/components/groups/AddGroupMembersButton.js +2 -2
  17. package/dist/components/groups/ChangeGroupRolesModal.js +1 -1
  18. package/dist/components/groups/ConfirmGroupExitModal.js +2 -2
  19. package/dist/components/groups/ConfirmMemberRemovalModal.js +1 -1
  20. package/dist/components/groups/DeleteGroupModal.js +1 -1
  21. package/dist/components/groups/GroupAvatar.js +4 -4
  22. package/dist/components/groups/GroupCard.js +3 -3
  23. package/dist/components/groups/GroupHeader.js +1 -1
  24. package/dist/components/groups/GroupMembersList.js +2 -3
  25. package/dist/components/groups/GroupOptionsMenu.js +12 -6
  26. package/dist/components/groups/JoinGroupButton.js +3 -20
  27. package/dist/components/jams/CreateNewJam.js +4 -4
  28. package/dist/components/jams/JamCallParticipant.js +17 -7
  29. package/dist/components/jams/JamCapacityGate.js +1 -1
  30. package/dist/components/jams/JamChatDrawer.js +2 -2
  31. package/dist/components/jams/JamConference.js +1 -1
  32. package/dist/components/jams/JamContext.d.ts +4 -0
  33. package/dist/components/jams/JamContext.js +17 -2
  34. package/dist/components/jams/JamDetailsDrawer.js +1 -1
  35. package/dist/components/jams/JamDeviceSelectors.d.ts +15 -0
  36. package/dist/components/jams/JamDeviceSelectors.js +4 -3
  37. package/dist/components/jams/JamFooter.js +15 -16
  38. package/dist/components/jams/JamGuestForm.js +2 -2
  39. package/dist/components/jams/JamLobby.js +9 -19
  40. package/dist/components/jams/JamObserverShell.js +1 -1
  41. package/dist/components/jams/JamParticipantConference.js +1 -1
  42. package/dist/components/jams/JamPeopleDrawer.js +17 -13
  43. package/dist/components/jams/JamReactionMenu.js +1 -1
  44. package/dist/components/jams/JamRequestJoin.js +1 -1
  45. package/dist/components/jams/JamRoom.js +84 -4
  46. package/dist/components/jams/JamToolbarButton.d.ts +21 -0
  47. package/dist/components/jams/JamToolbarButton.js +19 -0
  48. package/dist/components/jams/JamVideoCall.js +8 -3
  49. package/dist/components/jams/JamVideoLayout.js +16 -5
  50. package/dist/components/jams/LeaveCloseButton.js +9 -44
  51. package/dist/components/jams/LiveJamsSection.js +1 -1
  52. package/dist/components/jams/constants.js +4 -0
  53. package/dist/components/jams/useParticipantConnection.d.ts +7 -0
  54. package/dist/components/jams/useParticipantConnection.js +11 -0
  55. package/dist/components/layout/Auth.js +1 -1
  56. package/dist/components/layout/Infos.js +2 -2
  57. package/dist/components/layout/OpenpeepsContextProvider.js +4 -3
  58. package/dist/components/layout/OpenpeepsThemeProvider.d.ts +3 -4
  59. package/dist/components/layout/OpenpeepsThemeProvider.js +23 -9
  60. package/dist/components/layout/Root.js +1 -1
  61. package/dist/components/markdown/CompiledMarkdown.js +15 -1
  62. package/dist/components/markdown/classes.d.ts +2 -0
  63. package/dist/components/markdown/classes.js +2 -0
  64. package/dist/components/markdown/index.d.ts +1 -1
  65. package/dist/components/markdown/index.js +1 -1
  66. package/dist/components/navigation/ContentHeader.js +1 -1
  67. package/dist/components/navigation/FooterMobile.js +5 -1
  68. package/dist/components/navigation/HeaderMobile.js +1 -1
  69. package/dist/components/navigation/MobileMenuItem.js +1 -1
  70. package/dist/components/navigation/PageHeaderAction.js +1 -1
  71. package/dist/components/navigation/PlusButton.js +1 -1
  72. package/dist/components/navigation/SideBar.js +6 -1
  73. package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +5 -1
  74. package/dist/components/navigation/sideBarNavLinkClass.js +1 -1
  75. package/dist/components/notifications/NotificationHeaderActions.js +2 -2
  76. package/dist/components/notifications/NotificationWrapper.js +1 -1
  77. package/dist/components/notifications/NotificationsList.js +3 -3
  78. package/dist/components/notifications/TypedNotification.js +3 -3
  79. package/dist/components/post/Feed.js +3 -3
  80. package/dist/components/post/FeedPost.d.ts +2 -1
  81. package/dist/components/post/FeedPost.js +11 -6
  82. package/dist/components/post/FeedPostContent.js +1 -1
  83. package/dist/components/post/FullPostLayout.js +11 -4
  84. package/dist/components/post/NewEventButton.js +1 -1
  85. package/dist/components/post/NewNoteButton.js +1 -1
  86. package/dist/components/post/PinnedPost.js +1 -1
  87. package/dist/components/post/ReplyBox.js +1 -1
  88. package/dist/components/post/feed/events/EventsFeed.js +3 -3
  89. package/dist/components/post/feed/threaded/ThreadPost.js +1 -1
  90. package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +3 -1
  91. package/dist/components/post/feed/threaded/ThreadedFeed.js +3 -3
  92. package/dist/components/post/pieces/Attachments.js +3 -3
  93. package/dist/components/post/pieces/EventMenu.js +1 -1
  94. package/dist/components/post/pieces/EventRsvpButton.js +3 -3
  95. package/dist/components/post/pieces/FeedPostStats.js +2 -2
  96. package/dist/components/post/pieces/GalleryModal.js +36 -5
  97. package/dist/components/post/pieces/PollContent.js +33 -14
  98. package/dist/components/post/pieces/PostActions.js +6 -45
  99. package/dist/components/post/pieces/PostInfoHeader.js +1 -1
  100. package/dist/components/post/pieces/PostMenu.js +35 -9
  101. package/dist/components/post/pieces/PostReactionHeader.js +1 -1
  102. package/dist/components/post/pieces/ShareMenu.js +4 -2
  103. package/dist/components/post/pieces/UnreadPostIndicator.d.ts +5 -3
  104. package/dist/components/post/pieces/UnreadPostIndicator.js +4 -3
  105. package/dist/components/post/pieces/modals/DeletePostModal.js +1 -1
  106. package/dist/components/post/pieces/modals/RepostModal.d.ts +5 -3
  107. package/dist/components/post/pieces/modals/RepostModal.js +8 -7
  108. package/dist/components/post/post-form/AttachmentCard.js +2 -2
  109. package/dist/components/post/post-form/ComposeAttachments.js +1 -1
  110. package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
  111. package/dist/components/post/post-form/EditPostModal.js +22 -12
  112. package/dist/components/post/post-form/EventForm.js +2 -2
  113. package/dist/components/post/post-form/EventTypeSwitcher.js +1 -1
  114. package/dist/components/post/post-form/NewPostModal.d.ts +1 -1
  115. package/dist/components/post/post-form/NewPostModal.js +10 -10
  116. package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +2 -2
  117. package/dist/components/post/post-form/PollComposerFields.d.ts +2 -0
  118. package/dist/components/post/post-form/PollComposerFields.js +12 -8
  119. package/dist/components/post/post-form/PostAudienceSelector.js +3 -3
  120. package/dist/components/post/post-form/PostTypeSwitcher.js +1 -1
  121. package/dist/components/post/post-form/ReplyModal.js +9 -8
  122. package/dist/components/post/post-form/VisibilitySelector.js +1 -1
  123. package/dist/components/post/types/Article.js +2 -1
  124. package/dist/components/post/types/Event.js +1 -1
  125. package/dist/components/post/types/Note.js +2 -1
  126. package/dist/components/post/types/Poll.js +2 -1
  127. package/dist/components/post/types/event/CardEvent.js +2 -2
  128. package/dist/components/post/types/event/FullEvent.js +8 -8
  129. package/dist/components/post/types/event/ProfileEventRelationship.d.ts +1 -1
  130. package/dist/components/post/types/event/ProfileEventRelationship.js +38 -18
  131. package/dist/components/preview-link/LocalPreviewLink.js +1 -1
  132. package/dist/components/preview-link/RemotePreviewLink.js +5 -1
  133. package/dist/components/profile/Avatar.js +3 -2
  134. package/dist/components/profile/FollowUnfollowButton.js +2 -2
  135. package/dist/components/profile/ProfileBadge.js +1 -1
  136. package/dist/components/profile/ProfileCard.js +1 -1
  137. package/dist/components/profile/ProfileHeader.js +1 -1
  138. package/dist/components/profile/ProfilePageAction.js +3 -3
  139. package/dist/components/profile/ProfilePostsAndReplies.js +3 -1
  140. package/dist/components/profile/ProfileSelector.js +3 -3
  141. package/dist/components/profile/ProfilesInput.js +1 -1
  142. package/dist/components/profile/ReportProfileOrPostModal.js +6 -4
  143. package/dist/components/server-data/context.d.ts +8 -0
  144. package/dist/contexts/openpeeps/hooks/admin.d.ts +63 -16774
  145. package/dist/contexts/openpeeps/hooks/admin.js +34 -14
  146. package/dist/contexts/openpeeps/hooks/conversations.d.ts +330 -0
  147. package/dist/contexts/openpeeps/hooks/jams.d.ts +110 -0
  148. package/dist/contexts/openpeeps/hooks/jams.js +1 -1
  149. package/dist/contexts/openpeeps/hooks/other.d.ts +8 -0
  150. package/dist/contexts/openpeeps/hooks/posts.d.ts +933 -53
  151. package/dist/contexts/openpeeps/hooks/profiles.d.ts +220 -0
  152. package/dist/contexts/openpeeps/hooks/search.d.ts +330 -0
  153. package/dist/contexts/openpeeps/index.d.ts +1 -1
  154. package/dist/contexts/openpeeps/index.js +10 -2
  155. package/dist/contexts/router/index.d.ts +8 -3
  156. package/dist/contexts/router/index.js +7 -3
  157. package/dist/hooks/conversations/useCreateConversation.d.ts +124 -0
  158. package/dist/hooks/conversations/useCreateConversation.js +56 -0
  159. package/dist/hooks/groups/useJoinGroup.d.ts +8 -0
  160. package/dist/hooks/groups/useJoinGroup.js +23 -0
  161. package/dist/hooks/index.d.ts +6 -0
  162. package/dist/hooks/index.js +4 -0
  163. package/dist/hooks/jams/useLeaveCloseJam.d.ts +20 -0
  164. package/dist/hooks/jams/useLeaveCloseJam.js +59 -0
  165. package/dist/hooks/posts/useFeedPostActions.d.ts +18 -0
  166. package/dist/hooks/posts/useFeedPostActions.js +51 -0
  167. package/dist/index.d.ts +3 -0
  168. package/dist/index.js +3 -0
  169. package/dist/lib/Markdown.d.ts +14 -0
  170. package/dist/lib/Markdown.js +16 -0
  171. package/dist/lib/analyticsClicks.d.ts +12 -0
  172. package/dist/lib/analyticsClicks.js +64 -0
  173. package/dist/lib/auth.d.ts +8 -0
  174. package/dist/lib/auth.js +27 -0
  175. package/dist/lib/canvasUtils.d.ts +6 -0
  176. package/dist/lib/canvasUtils.js +62 -1
  177. package/dist/lib/groupCapabilityHelpers.d.ts +1 -1
  178. package/dist/lib/passwordStrength.d.ts +6 -0
  179. package/dist/lib/passwordStrength.js +26 -0
  180. package/dist/lib/postUnread.d.ts +7 -0
  181. package/dist/lib/postUnread.js +7 -0
  182. package/dist/lib/postViewCounter.d.ts +1 -1
  183. package/dist/lib/postViewCounter.js +3 -1
  184. package/dist/lib/routeHandles.d.ts +2 -0
  185. package/dist/lib/routeHandles.js +2 -0
  186. package/dist/lib/svgCover.d.ts +2 -0
  187. package/dist/lib/svgCover.js +18 -0
  188. package/dist/navigation/index.d.ts +11 -0
  189. package/dist/navigation/index.js +2 -0
  190. package/dist/navigation/menuItems.d.ts +8 -0
  191. package/dist/navigation/menuItems.js +83 -0
  192. package/dist/navigation/targets.d.ts +94 -0
  193. package/dist/navigation/targets.js +12 -0
  194. package/dist/pages/About.d.ts +1 -0
  195. package/dist/pages/About.js +19 -0
  196. package/dist/pages/CodeOfConduct.d.ts +1 -0
  197. package/dist/pages/CodeOfConduct.js +14 -0
  198. package/dist/pages/Explore.d.ts +1 -0
  199. package/dist/pages/Explore.js +132 -0
  200. package/dist/pages/Home.d.ts +6 -0
  201. package/dist/pages/Home.js +31 -0
  202. package/dist/pages/Members.d.ts +1 -0
  203. package/dist/pages/Members.js +35 -0
  204. package/dist/pages/NotFound.d.ts +1 -0
  205. package/dist/pages/NotFound.js +9 -0
  206. package/dist/pages/Notifications.d.ts +1 -0
  207. package/dist/pages/Notifications.js +8 -0
  208. package/dist/pages/PostDetail.d.ts +1 -0
  209. package/dist/pages/PostDetail.js +27 -0
  210. package/dist/pages/Profile.d.ts +1 -0
  211. package/dist/pages/Profile.js +20 -0
  212. package/dist/pages/Tags.d.ts +1 -0
  213. package/dist/pages/Tags.js +14 -0
  214. package/dist/pages/Welcome.d.ts +1 -0
  215. package/dist/pages/Welcome.js +89 -0
  216. package/dist/pages/admin/Analytics.d.ts +11 -0
  217. package/dist/pages/admin/Analytics.js +11 -0
  218. package/dist/pages/admin/ApiKeys.d.ts +1 -0
  219. package/dist/pages/admin/ApiKeys.js +141 -0
  220. package/dist/pages/admin/Backups.d.ts +1 -0
  221. package/dist/pages/admin/Backups.js +39 -0
  222. package/dist/pages/admin/ConfigEditor.d.ts +14 -0
  223. package/dist/pages/admin/ConfigEditor.js +91 -0
  224. package/dist/pages/admin/Configuration.d.ts +1 -0
  225. package/dist/pages/admin/Configuration.js +8 -0
  226. package/dist/pages/admin/ConfigurationCommunity.d.ts +1 -0
  227. package/dist/pages/admin/ConfigurationCommunity.js +7 -0
  228. package/dist/pages/admin/ConfigurationCommunityLanguage.d.ts +1 -0
  229. package/dist/pages/admin/ConfigurationCommunityLanguage.js +71 -0
  230. package/dist/pages/admin/ConfigurationEmail.d.ts +1 -0
  231. package/dist/pages/admin/ConfigurationEmail.js +97 -0
  232. package/dist/pages/admin/ConfigurationI18n.d.ts +1 -0
  233. package/dist/pages/admin/ConfigurationI18n.js +51 -0
  234. package/dist/pages/admin/Dashboard.d.ts +1 -0
  235. package/dist/pages/admin/Dashboard.js +40 -0
  236. package/dist/pages/admin/Db.d.ts +1 -0
  237. package/dist/pages/admin/Db.js +238 -0
  238. package/dist/pages/admin/Diagnostics.d.ts +1 -0
  239. package/dist/pages/admin/Diagnostics.js +8 -0
  240. package/dist/pages/admin/DiagnosticsEmail.d.ts +1 -0
  241. package/dist/pages/admin/DiagnosticsEmail.js +65 -0
  242. package/dist/pages/admin/DiagnosticsJob.d.ts +1 -0
  243. package/dist/pages/admin/DiagnosticsJob.js +51 -0
  244. package/dist/pages/admin/DiagnosticsLogs.d.ts +1 -0
  245. package/dist/pages/admin/DiagnosticsLogs.js +62 -0
  246. package/dist/pages/admin/DiagnosticsPerformance.d.ts +1 -0
  247. package/dist/pages/admin/DiagnosticsPerformance.js +34 -0
  248. package/dist/pages/admin/GroupMembers.d.ts +1 -0
  249. package/dist/pages/admin/GroupMembers.js +109 -0
  250. package/dist/pages/admin/Groups.d.ts +1 -0
  251. package/dist/pages/admin/Groups.js +61 -0
  252. package/dist/pages/admin/Invites.d.ts +1 -0
  253. package/dist/pages/admin/Invites.js +72 -0
  254. package/dist/pages/admin/Members.d.ts +1 -0
  255. package/dist/pages/admin/Members.js +49 -0
  256. package/dist/pages/admin/Moderation.d.ts +1 -0
  257. package/dist/pages/admin/Moderation.js +62 -0
  258. package/dist/pages/admin/Reports.d.ts +1 -0
  259. package/dist/pages/admin/Reports.js +178 -0
  260. package/dist/pages/admin/analytics/AnalyticsLayout.d.ts +14 -0
  261. package/dist/pages/admin/analytics/AnalyticsLayout.js +104 -0
  262. package/dist/pages/admin/analytics/AnalyticsRangeContext.d.ts +9 -0
  263. package/dist/pages/admin/analytics/AnalyticsRangeContext.js +9 -0
  264. package/dist/pages/admin/analytics/Content.d.ts +1 -0
  265. package/dist/pages/admin/analytics/Content.js +117 -0
  266. package/dist/pages/admin/analytics/Engagement.d.ts +1 -0
  267. package/dist/pages/admin/analytics/Engagement.js +220 -0
  268. package/dist/pages/admin/analytics/Groups.d.ts +1 -0
  269. package/dist/pages/admin/analytics/Groups.js +139 -0
  270. package/dist/pages/admin/analytics/Members.d.ts +1 -0
  271. package/dist/pages/admin/analytics/Members.js +96 -0
  272. package/dist/pages/admin/analytics/Overview.d.ts +1 -0
  273. package/dist/pages/admin/analytics/Overview.js +165 -0
  274. package/dist/pages/admin/analytics/ReportSettings.d.ts +1 -0
  275. package/dist/pages/admin/analytics/ReportSettings.js +62 -0
  276. package/dist/pages/admin/analytics/analyticsInfo.d.ts +3 -0
  277. package/dist/pages/admin/analytics/analyticsInfo.js +4 -0
  278. package/dist/pages/admin/analytics/downloadCsv.d.ts +2 -0
  279. package/dist/pages/admin/analytics/downloadCsv.js +20 -0
  280. package/dist/pages/admin/community/CommunityFavicons.d.ts +1 -0
  281. package/dist/pages/admin/community/CommunityFavicons.js +47 -0
  282. package/dist/pages/admin/community/CommunityInfo.d.ts +1 -0
  283. package/dist/pages/admin/community/CommunityInfo.js +35 -0
  284. package/dist/pages/admin/community/CommunityLinks.d.ts +1 -0
  285. package/dist/pages/admin/community/CommunityLinks.js +35 -0
  286. package/dist/pages/admin/community/CommunityMarkdownPage.d.ts +8 -0
  287. package/dist/pages/admin/community/CommunityMarkdownPage.js +35 -0
  288. package/dist/pages/admin/community/CommunityProfileFields.d.ts +1 -0
  289. package/dist/pages/admin/community/CommunityProfileFields.js +50 -0
  290. package/dist/pages/admin/community/CommunityRoles.d.ts +1 -0
  291. package/dist/pages/admin/community/CommunityRoles.js +109 -0
  292. package/dist/pages/admin/community/CommunityTheme.d.ts +1 -0
  293. package/dist/pages/admin/community/CommunityTheme.js +56 -0
  294. package/dist/pages/admin/community/useCommunityConfig.d.ts +168 -0
  295. package/dist/pages/admin/community/useCommunityConfig.js +28 -0
  296. package/dist/pages/admin/components/AdminCharts.d.ts +22 -0
  297. package/dist/pages/admin/components/AdminCharts.js +29 -0
  298. package/dist/pages/admin/components/AdminGroupCard.d.ts +6 -0
  299. package/dist/pages/admin/components/AdminGroupCard.js +42 -0
  300. package/dist/pages/admin/components/AdminInviteActions.d.ts +1 -0
  301. package/dist/pages/admin/components/AdminInviteActions.js +23 -0
  302. package/dist/pages/admin/components/InviteWithEmailModal.d.ts +3 -0
  303. package/dist/pages/admin/components/InviteWithEmailModal.js +82 -0
  304. package/dist/pages/admin/components/InviteWithLinkModal.d.ts +22 -0
  305. package/dist/pages/admin/components/InviteWithLinkModal.js +98 -0
  306. package/dist/pages/admin/components/ProfileRowActions.d.ts +5 -0
  307. package/dist/pages/admin/components/ProfileRowActions.js +131 -0
  308. package/dist/pages/admin/components/RestoreBackupModal.d.ts +4 -0
  309. package/dist/pages/admin/components/RestoreBackupModal.js +33 -0
  310. package/dist/pages/admin/components/RestoreTestBackupModal.d.ts +4 -0
  311. package/dist/pages/admin/components/RestoreTestBackupModal.js +36 -0
  312. package/dist/pages/articles/Edit.d.ts +1 -0
  313. package/dist/pages/articles/Edit.js +60 -0
  314. package/dist/pages/articles/Index.d.ts +1 -0
  315. package/dist/pages/articles/Index.js +18 -0
  316. package/dist/pages/articles/New.d.ts +1 -0
  317. package/dist/pages/articles/New.js +48 -0
  318. package/dist/pages/auth/Closed.d.ts +1 -0
  319. package/dist/pages/auth/Closed.js +14 -0
  320. package/dist/pages/auth/Login.d.ts +1 -0
  321. package/dist/pages/auth/Login.js +74 -0
  322. package/dist/pages/auth/OidcCallback.d.ts +5 -0
  323. package/dist/pages/auth/OidcCallback.js +31 -0
  324. package/dist/pages/auth/OidcPending.d.ts +5 -0
  325. package/dist/pages/auth/OidcPending.js +39 -0
  326. package/dist/pages/auth/Register.d.ts +4 -0
  327. package/dist/pages/auth/Register.js +124 -0
  328. package/dist/pages/auth/RegisterInvitation.d.ts +1 -0
  329. package/dist/pages/auth/RegisterInvitation.js +5 -0
  330. package/dist/pages/auth/RequestResetPassword.d.ts +1 -0
  331. package/dist/pages/auth/RequestResetPassword.js +50 -0
  332. package/dist/pages/auth/ResetPassword.d.ts +1 -0
  333. package/dist/pages/auth/ResetPassword.js +40 -0
  334. package/dist/pages/auth/SsoCallback.d.ts +1 -0
  335. package/dist/pages/auth/SsoCallback.js +34 -0
  336. package/dist/pages/auth/ValidateEmail.d.ts +6 -0
  337. package/dist/pages/auth/ValidateEmail.js +64 -0
  338. package/dist/pages/conversations/Index.d.ts +1 -0
  339. package/dist/pages/conversations/Index.js +58 -0
  340. package/dist/pages/conversations/Info.d.ts +1 -0
  341. package/dist/pages/conversations/Info.js +26 -0
  342. package/dist/pages/conversations/New.d.ts +1 -0
  343. package/dist/pages/conversations/New.js +8 -0
  344. package/dist/pages/conversations/Show.d.ts +1 -0
  345. package/dist/pages/conversations/Show.js +100 -0
  346. package/dist/pages/events/Edit.d.ts +1 -0
  347. package/dist/pages/events/Edit.js +69 -0
  348. package/dist/pages/events/Index.d.ts +1 -0
  349. package/dist/pages/events/Index.js +23 -0
  350. package/dist/pages/events/My.d.ts +1 -0
  351. package/dist/pages/events/My.js +24 -0
  352. package/dist/pages/events/New.d.ts +1 -0
  353. package/dist/pages/events/New.js +66 -0
  354. package/dist/pages/feeds/Bookmarks.d.ts +1 -0
  355. package/dist/pages/feeds/Bookmarks.js +10 -0
  356. package/dist/pages/feeds/Local.d.ts +1 -0
  357. package/dist/pages/feeds/Local.js +14 -0
  358. package/dist/pages/feeds/My.d.ts +1 -0
  359. package/dist/pages/feeds/My.js +12 -0
  360. package/dist/pages/groups/Edit.d.ts +1 -0
  361. package/dist/pages/groups/Edit.js +57 -0
  362. package/dist/pages/groups/Index.d.ts +1 -0
  363. package/dist/pages/groups/Index.js +50 -0
  364. package/dist/pages/groups/Info.d.ts +1 -0
  365. package/dist/pages/groups/Info.js +21 -0
  366. package/dist/pages/groups/Members.d.ts +1 -0
  367. package/dist/pages/groups/Members.js +28 -0
  368. package/dist/pages/groups/New.d.ts +1 -0
  369. package/dist/pages/groups/New.js +68 -0
  370. package/dist/pages/groups/Show.d.ts +1 -0
  371. package/dist/pages/groups/Show.js +64 -0
  372. package/dist/pages/index.d.ts +94 -0
  373. package/dist/pages/index.js +94 -0
  374. package/dist/pages/jams/Event.d.ts +8 -0
  375. package/dist/pages/jams/Event.js +57 -0
  376. package/dist/pages/jams/Index.d.ts +6 -0
  377. package/dist/pages/jams/Index.js +44 -0
  378. package/dist/pages/payment/Success.d.ts +1 -0
  379. package/dist/pages/payment/Success.js +30 -0
  380. package/dist/pages/plugins/Index.d.ts +1 -0
  381. package/dist/pages/plugins/Index.js +69 -0
  382. package/dist/pages/profile/Followers.d.ts +6 -0
  383. package/dist/pages/profile/Followers.js +28 -0
  384. package/dist/pages/settings/AccessTokens.d.ts +1 -0
  385. package/dist/pages/settings/AccessTokens.js +149 -0
  386. package/dist/pages/settings/Account.d.ts +1 -0
  387. package/dist/pages/settings/Account.js +81 -0
  388. package/dist/pages/settings/Billing.d.ts +1 -0
  389. package/dist/pages/settings/Billing.js +82 -0
  390. package/dist/pages/settings/Index.d.ts +1 -0
  391. package/dist/pages/settings/Index.js +13 -0
  392. package/dist/pages/settings/Language.d.ts +1 -0
  393. package/dist/pages/settings/Language.js +54 -0
  394. package/dist/pages/settings/NotificationPreferences.d.ts +1 -0
  395. package/dist/pages/settings/NotificationPreferences.js +180 -0
  396. package/dist/pages/settings/Notifications.d.ts +1 -0
  397. package/dist/pages/settings/Notifications.js +10 -0
  398. package/dist/pages/settings/PublicProfile.d.ts +1 -0
  399. package/dist/pages/settings/PublicProfile.js +135 -0
  400. package/dist/pages/settings/PushEnabledDevices.d.ts +1 -0
  401. package/dist/pages/settings/PushEnabledDevices.js +67 -0
  402. package/dist/pages/settings/Theme.d.ts +1 -0
  403. package/dist/pages/settings/Theme.js +37 -0
  404. package/dist/pages/test/Error.d.ts +1 -0
  405. package/dist/pages/test/Error.js +10 -0
  406. package/dist/pages/test/Markdown.d.ts +1 -0
  407. package/dist/pages/test/Markdown.js +32 -0
  408. package/dist/pwa/InstallPrompt.js +1 -1
  409. package/dist/pwa/NotificationPermissionPrompt.js +2 -2
  410. package/dist/pwa/UpdatePrompt.js +1 -1
  411. package/dist/react-native.d.ts +1 -0
  412. package/dist/react-native.js +1 -0
  413. package/dist/session/useSessionEvents.d.ts +3 -0
  414. package/dist/session/useSessionEvents.js +64 -0
  415. package/dist/stores/newPosts.d.ts +8 -8
  416. package/package.json +14 -9
  417. package/dist/components/jams/useJamLiveKitTheme.d.ts +0 -3
  418. package/dist/components/jams/useJamLiveKitTheme.js +0 -10
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef } from 'react';
3
3
  import { TrackRefContext, VideoTrack, isTrackReference, useIsSpeaking, useRoomContext, } from '@livekit/components-react';
4
- import { AudioLines, Ellipsis, Hand, Mic, MicOff } from 'lucide-react';
4
+ import { AudioLines, Ellipsis, Hand, Mic, MicOff, WifiOff } from 'lucide-react';
5
5
  import { PopupMenu, PopupMenuButton } from '@openpeepshq/react-ui';
6
6
  import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
7
7
  import { useT } from '../../i18n/index.js';
@@ -12,6 +12,7 @@ import { JamAnimatedEmoji } from './JamAnimatedEmoji.js';
12
12
  import { useJamContext } from './JamContext.js';
13
13
  import { useJamEventsContext } from './JamEventsContext.js';
14
14
  import { parseParticipantMetadata } from './jamEventActions.js';
15
+ import { useConnectionLost } from './useParticipantConnection.js';
15
16
  import { useRaisedHands } from './useJamHands.js';
16
17
  function JamParticipantReactions({ identity, isLocal, }) {
17
18
  const { ownReactions, reactionsForParticipant } = useJamEventsContext();
@@ -50,7 +51,7 @@ function JamParticipantModeratorMenu({ trackRef, }) {
50
51
  }));
51
52
  }
52
53
  };
53
- return (_jsx(PopupMenu, { icon: Ellipsis, className: "bg-surface-100 text-foreground", iconSize: 16, title: t('jams.participants.title', { defaultValue: 'Participants' }), children: _jsx(PopupMenuButton, { title: t('jams.participants.muteParticipant', {
54
+ return (_jsx(PopupMenu, { icon: Ellipsis, className: "bg-surface text-foreground", iconSize: 16, title: t('jams.participants.title', { defaultValue: 'Participants' }), children: _jsx(PopupMenuButton, { title: t('jams.participants.muteParticipant', {
54
55
  defaultValue: 'Mute Participant',
55
56
  }), text: t('jams.participants.muteParticipant', {
56
57
  defaultValue: 'Mute Participant',
@@ -59,12 +60,14 @@ function JamParticipantModeratorMenu({ trackRef, }) {
59
60
  /** Overlay mirroring the Svelte `ParticipantOverlay`: raised hand + mic state
60
61
  * indicators on top, name (with moderator `*` prefix) at the bottom. */
61
62
  function JamParticipantOverlay({ trackRef, compact, }) {
63
+ const t = useT();
62
64
  const participant = trackRef.participant;
63
65
  const room = useRoomContext();
64
66
  const me = useCurrentProfile();
65
67
  const { jam } = useJamContext();
66
68
  const raisedHands = useRaisedHands(room);
67
69
  const speaking = useIsSpeaking(participant);
70
+ const connectionLost = useConnectionLost(participant);
68
71
  const micOn = participant.isMicrophoneEnabled;
69
72
  const handUp = raisedHands.has(participant.identity);
70
73
  const handRaiseSound = useRef(null);
@@ -83,10 +86,16 @@ function JamParticipantOverlay({ trackRef, compact, }) {
83
86
  const isModerator = jam.moderators.includes(participant.identity);
84
87
  const viewerIsModerator = !!me && jam.moderators.includes(me.id);
85
88
  const iconSize = compact ? 'size-3' : 'size-3 md:size-4';
86
- return (_jsxs("div", { className: `absolute right-0 top-0 flex h-full w-full flex-col justify-between ${compact ? '' : 'md:p-3'}`, children: [_jsxs("div", { className: "flex w-full items-start justify-between", children: [_jsxs("div", { className: "flex items-center gap-1", children: [handUp ? (_jsx("div", { className: "bg-surface-50/70 rounded-full p-2", children: _jsx(Hand, { className: iconSize }) })) : null, viewerIsModerator && !participant.isLocal ? (_jsx(JamParticipantModeratorMenu, { trackRef: trackRef })) : null] }), _jsx("div", { className: `bg-surface-100 text-foreground rounded-full p-2 ${micOn && speaking ? 'text-primary-500' : ''}`, children: !micOn ? (_jsx(MicOff, { className: iconSize })) : speaking ? (_jsx(AudioLines, { className: iconSize })) : (_jsx(Mic, { className: iconSize })) })] }), _jsx("div", { className: "flex w-full items-end justify-between", children: _jsx("div", { className: `bg-surface-100 text-foreground block max-w-full truncate rounded-lg p-1 ${compact ? 'text-xs' : 'text-sm'}`, children: profile
87
- ? (isModerator ? '* ' : '') +
88
- (profile.displayName || `@${profile.handle}`)
89
- : '' }) })] }));
89
+ return (_jsxs("div", { className: `absolute right-0 top-0 flex h-full w-full flex-col justify-between ${compact ? '' : 'md:p-3'}`, children: [_jsxs("div", { className: "flex w-full items-start justify-between", children: [_jsxs("div", { className: "flex items-center gap-1", children: [handUp ? (_jsx("div", { className: "bg-background/70 rounded-full p-2", children: _jsx(Hand, { className: iconSize }) })) : null, viewerIsModerator && !participant.isLocal ? (_jsx(JamParticipantModeratorMenu, { trackRef: trackRef })) : null] }), _jsx("div", { className: `bg-surface text-foreground rounded-full p-2 ${micOn && speaking && !connectionLost ? 'text-primary' : ''}`, title: connectionLost
90
+ ? t('jams.people.connectionLost', {
91
+ defaultValue: 'Connection lost',
92
+ })
93
+ : undefined, children: connectionLost ? (_jsx(WifiOff, { className: iconSize })) : !micOn ? (_jsx(MicOff, { className: iconSize })) : speaking ? (_jsx(AudioLines, { className: iconSize })) : (_jsx(Mic, { className: iconSize })) })] }), _jsxs("div", { className: "flex w-full items-end justify-between", children: [_jsx("div", { className: `bg-surface text-foreground block max-w-full truncate rounded-lg p-1 ${compact ? 'text-xs' : 'text-sm'}`, children: profile
94
+ ? (isModerator ? '* ' : '') +
95
+ (profile.displayName || `@${profile.handle}`)
96
+ : '' }), connectionLost ? (_jsx("div", { className: `bg-surface text-muted-foreground ml-1 shrink-0 truncate rounded-lg p-1 ${compact ? 'text-xs' : 'text-sm'}`, children: t('jams.people.connectionLost', {
97
+ defaultValue: 'Connection lost',
98
+ }) })) : null] })] }));
90
99
  }
91
100
  /**
92
101
  * Single participant tile mirroring the Svelte `CallParticipant`: the camera
@@ -97,5 +106,6 @@ function JamParticipantOverlay({ trackRef, compact, }) {
97
106
  export function JamCallParticipant({ trackRef, size, compact = false, }) {
98
107
  const participant = trackRef.participant;
99
108
  const profile = parseParticipantMetadata(participant.metadata).profile;
100
- return (_jsx("div", { className: `${size} bg-surface-50 relative rounded-xl border`, children: _jsxs(TrackRefContext.Provider, { value: trackRef, children: [_jsx("div", { className: "size-full overflow-hidden rounded-xl", children: isTrackReference(trackRef) && !trackRef.publication.isMuted ? (_jsx(VideoTrack, { trackRef: trackRef, className: "size-full object-cover" })) : (_jsx("div", { className: "relative flex size-full items-center justify-center", children: _jsx(Avatar, { profile: profile, size: 5, borderless: true }) })) }), _jsx(JamParticipantOverlay, { trackRef: trackRef, compact: compact }), _jsx(JamParticipantReactions, { identity: participant.identity, isLocal: participant.isLocal })] }) }));
109
+ const connectionLost = useConnectionLost(participant);
110
+ return (_jsx("div", { className: `${size} bg-background relative rounded-xl border`, children: _jsxs(TrackRefContext.Provider, { value: trackRef, children: [_jsx("div", { className: `size-full overflow-hidden rounded-xl ${connectionLost ? 'opacity-40 grayscale' : ''}`, children: isTrackReference(trackRef) && !trackRef.publication.isMuted ? (_jsx(VideoTrack, { trackRef: trackRef, className: "size-full object-cover" })) : (_jsx("div", { className: "relative flex size-full items-center justify-center", children: _jsx(Avatar, { profile: profile, size: 5, borderless: true }) })) }), _jsx(JamParticipantOverlay, { trackRef: trackRef, compact: compact }), _jsx(JamParticipantReactions, { identity: participant.identity, isLocal: participant.isLocal })] }) }));
101
111
  }
@@ -20,7 +20,7 @@ export const JamCapacityGate = ({ jamPost, reason, eventName, }) => {
20
20
  : t('error.jamRsvpRequired', {
21
21
  defaultValue: 'You must RSVP yes to join this event.',
22
22
  });
23
- return (_jsx("div", { className: "mx-auto flex h-full w-full items-center justify-center p-4", children: _jsxs("div", { className: "w-full max-w-md space-y-5 text-center", children: [eventName ? _jsx("h3", { className: "text-lg", children: eventName }) : null, _jsxs("div", { className: "bg-surface-100 flex w-full flex-col items-center justify-center space-y-4 rounded border p-4", children: [_jsx("p", { className: "text-sm", children: message }), showRsvp ? (_jsx("div", { className: "w-full px-2", children: _jsx(EventRsvpButton, { post: jamPost }) })) : null, _jsx("a", { href: `/posts/${jamPost.id}`, className: "text-primary text-sm underline", children: t('jams.room.viewEvent', { defaultValue: 'View event' }) }), !me ? (_jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx("a", { href: `/auth/login?redirect=${encodeURIComponent(window.location.pathname)}`, className: "bg-primary text-primary-foreground rounded px-4 py-2 text-sm", children: t('navigation.logIn', { defaultValue: 'Log in' }) }), _jsxs("span", { className: "text-muted-foreground text-sm", children: [t('navigation.haveAccount', {
23
+ return (_jsx("div", { className: "mx-auto flex h-full w-full items-center justify-center p-4", children: _jsxs("div", { className: "w-full max-w-md space-y-5 text-center", children: [eventName ? _jsx("h3", { className: "text-lg", children: eventName }) : null, _jsxs("div", { className: "bg-surface flex w-full flex-col items-center justify-center space-y-4 rounded border p-4", children: [_jsx("p", { className: "text-sm", children: message }), showRsvp ? (_jsx("div", { className: "w-full px-2", children: _jsx(EventRsvpButton, { post: jamPost }) })) : null, _jsx("a", { href: `/posts/${jamPost.id}`, className: "text-primary text-sm underline", children: t('jams.room.viewEvent', { defaultValue: 'View event' }) }), !me ? (_jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx("a", { href: `/auth/login?redirect=${encodeURIComponent(window.location.pathname)}`, className: "bg-primary text-primary-foreground rounded px-4 py-2 text-sm", children: t('navigation.logIn', { defaultValue: 'Log in' }) }), _jsxs("span", { className: "text-muted-foreground text-sm", children: [t('navigation.haveAccount', {
24
24
  defaultValue: 'Already have an account?',
25
25
  }), ' ', _jsx("a", { href: "/auth/register", className: "underline", children: t('navigation.joinCommunity', {
26
26
  defaultValue: 'Join the community',
@@ -76,13 +76,13 @@ export function JamChatDrawer({ open, onClose, readOnly = false, }) {
76
76
  if (!open) {
77
77
  return null;
78
78
  }
79
- return (_jsxs("div", { className: 'bg-surface-100 text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80', children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.drawer.chatTitle', { defaultValue: 'Chat' }) }), _jsx("button", { type: "button", title: t('jams.drawer.close', { defaultValue: 'Close' }), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsxs("div", { ref: scrollContainerRef, className: "z-10 box-content flex w-full flex-1 flex-col overflow-y-scroll", children: [_jsxs("div", { className: "mb-0 flex-grow space-y-4 px-2 pb-4 md:mb-6", children: [_jsx("div", { ref: topSentinelRef, className: "h-1" }), eventsQuery.isFetchingNextPage && (_jsx("div", { className: "flex justify-center py-2", children: _jsx(Loader, { className: "size-4 animate-spin" }) })), messages.length === 0 && !eventsQuery.isLoading ? (_jsx("p", { className: "mt-4 text-center text-neutral-400", children: t('jams.chat.noMessages', { defaultValue: 'No messages yet' }) })) : (messages.map((message) => (_jsx(JamChatMessage, { message: message }, message.id))))] }), _jsx("div", { ref: endRef, className: "pb-4" })] }), !readOnly && (_jsxs("div", { className: "bg-surface-50 sticky bottom-0 flex w-full items-center gap-x-2 p-2", children: [_jsx("textarea", { ref: textareaRef, disabled: isSending, value: newMessage, rows: 1, onChange: (event) => setNewMessage(event.target.value), onKeyDown: (event) => {
79
+ return (_jsxs("div", { className: 'bg-surface text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80', children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.drawer.chatTitle', { defaultValue: 'Chat' }) }), _jsx("button", { type: "button", title: t('jams.drawer.close', { defaultValue: 'Close' }), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsxs("div", { ref: scrollContainerRef, className: "z-10 box-content flex w-full flex-1 flex-col overflow-y-scroll", children: [_jsxs("div", { className: "mb-0 flex-grow space-y-4 px-2 pb-4 md:mb-6", children: [_jsx("div", { ref: topSentinelRef, className: "h-1" }), eventsQuery.isFetchingNextPage && (_jsx("div", { className: "flex justify-center py-2", children: _jsx(Loader, { className: "size-4 animate-spin" }) })), messages.length === 0 && !eventsQuery.isLoading ? (_jsx("p", { className: "mt-4 text-center text-neutral-400", children: t('jams.chat.noMessages', { defaultValue: 'No messages yet' }) })) : (messages.map((message) => (_jsx(JamChatMessage, { message: message }, message.id))))] }), _jsx("div", { ref: endRef, className: "pb-4" })] }), !readOnly && (_jsxs("div", { className: "bg-background sticky bottom-0 flex w-full items-center gap-x-2 p-2", children: [_jsx("textarea", { ref: textareaRef, disabled: isSending, value: newMessage, rows: 1, onChange: (event) => setNewMessage(event.target.value), onKeyDown: (event) => {
80
80
  if (!(event.shiftKey || event.ctrlKey || event.altKey) &&
81
81
  event.key === 'Enter') {
82
82
  event.preventDefault();
83
83
  void handleSendMessage();
84
84
  }
85
- }, className: "bg-surface-50 w-full resize-none border-none outline-none", placeholder: t('jams.chat.messagePlaceholder', {
85
+ }, className: "bg-background w-full resize-none border-none outline-none", placeholder: t('jams.chat.messagePlaceholder', {
86
86
  defaultValue: 'Send a message…',
87
87
  }) }), _jsx("button", { type: "button", title: t('jams.chat.sendTitle', { defaultValue: 'Send message' }), disabled: isSending, onClick: () => void handleSendMessage(), children: isSending ? (_jsx(Loader, { className: "size-4 animate-spin" })) : (_jsx(SendHorizontal, {})) })] }))] }));
88
88
  }
@@ -17,7 +17,7 @@ function JamObserverConference() {
17
17
  const screenShareTracks = tracks.filter((track) => isTrackReference(track) &&
18
18
  track.publication.source === Track.Source.ScreenShare &&
19
19
  !track.publication.isMuted);
20
- return (_jsx(JamObserverShell, { children: _jsx("div", { className: "min-h-0 flex-1", children: _jsx(JamVideoLayout, { cameraTracks: cameraTracks, screenShareTracks: screenShareTracks, observer: true }) }) }));
20
+ return (_jsx(JamObserverShell, { children: _jsx("div", { className: "h-full min-h-0 flex-1", children: _jsx(JamVideoLayout, { cameraTracks: cameraTracks, screenShareTracks: screenShareTracks, observer: true }) }) }));
21
21
  }
22
22
  function JamObserverRoom() {
23
23
  return (_jsxs(JamEventsProvider, { children: [_jsx(JamObserverConference, {}), _jsx(RoomAudioRenderer, {})] }));
@@ -4,6 +4,10 @@ export interface JamContextValue {
4
4
  jam: Jam;
5
5
  jamEvent: Event;
6
6
  observer: boolean;
7
+ /** Call before an intentional Leave/Close so disconnect does not auto-rejoin. */
8
+ markIntentionalLeave: () => void;
9
+ /** Returns true once after {@link markIntentionalLeave}; clears the flag. */
10
+ consumeIntentionalLeave: () => boolean;
7
11
  }
8
12
  export interface JamProviderProps {
9
13
  jamPost: PublicPost;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext, useContext } from 'react';
2
+ import { createContext, useContext, useMemo, useRef } from 'react';
3
3
  import { jamFromEvent } from '@openpeepshq/common/lib';
4
4
  const JamContext = createContext(null);
5
5
  /**
@@ -9,7 +9,22 @@ const JamContext = createContext(null);
9
9
  export function JamProvider({ jamPost, observer = false, children, }) {
10
10
  const jam = jamFromEvent(jamPost);
11
11
  const jamEvent = jamPost.data;
12
- return (_jsx(JamContext.Provider, { value: { jamPost, jam, jamEvent, observer }, children: children }));
12
+ const intentionalLeave = useRef(false);
13
+ const value = useMemo(() => ({
14
+ jamPost,
15
+ jam,
16
+ jamEvent,
17
+ observer,
18
+ markIntentionalLeave: () => {
19
+ intentionalLeave.current = true;
20
+ },
21
+ consumeIntentionalLeave: () => {
22
+ const flagged = intentionalLeave.current;
23
+ intentionalLeave.current = false;
24
+ return flagged;
25
+ },
26
+ }), [jamPost, jam, jamEvent, observer]);
27
+ return _jsx(JamContext.Provider, { value: value, children: children });
13
28
  }
14
29
  export function useJamContext() {
15
30
  const ctx = useContext(JamContext);
@@ -25,7 +25,7 @@ export const JamDetailsDrawer = ({ open, onClose }) => {
25
25
  ? observerPath
26
26
  : `${window.location.origin}${observerPath}`
27
27
  : null;
28
- return (_jsxs("div", { className: "bg-surface-100 text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80", children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.details.panelHeading') }), _jsx("button", { type: "button", title: t('jams.details.closePanel'), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto px-2 pb-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-muted-foreground text-xs font-semibold uppercase", children: t('jams.details.joiningInfoHeading') }), _jsx("span", { className: "mt-1 block break-all text-sm", children: href }), _jsxs("button", { type: "button", className: "mt-2 flex items-center text-sm", onClick: () => {
28
+ return (_jsxs("div", { className: "bg-surface text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80", children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.details.panelHeading') }), _jsx("button", { type: "button", title: t('jams.details.closePanel'), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto px-2 pb-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-muted-foreground text-xs font-semibold uppercase", children: t('jams.details.joiningInfoHeading') }), _jsx("span", { className: "mt-1 block break-all text-sm", children: href }), _jsxs("button", { type: "button", className: "mt-2 flex items-center text-sm", onClick: () => {
29
29
  void navigator.clipboard.writeText(href);
30
30
  setCopied(true);
31
31
  }, children: [copied ? (_jsx(CopyCheck, { className: "size-4" })) : (_jsx(Copy, { className: "size-4" })), _jsx("span", { className: "ml-2", children: copied
@@ -1,3 +1,17 @@
1
+ import { type IconType } from '@openpeepshq/react-ui';
2
+ type DeviceType = 'mic' | 'camera' | 'speaker';
3
+ interface DeviceSelectorPillProps {
4
+ enabled: boolean;
5
+ onToggle: () => void;
6
+ onIcon: IconType;
7
+ offIcon: IconType;
8
+ deviceType: DeviceType;
9
+ devices: MediaDeviceInfo[];
10
+ activeDeviceId: string;
11
+ onDeviceChange: (deviceId: string) => void;
12
+ }
13
+ /** Pill mirroring Svelte `DeviceSelectorAndSwitch.svelte`. */
14
+ export declare const DeviceSelectorPill: ({ enabled, onToggle, onIcon: OnIcon, offIcon: OffIcon, deviceType, devices, activeDeviceId, onDeviceChange, }: DeviceSelectorPillProps) => import("react/jsx-runtime").JSX.Element;
1
15
  /** In-room microphone control mirroring `MicrophoneSelectorAndSwitch.svelte`. */
2
16
  export declare const JamMicSelector: () => import("react/jsx-runtime").JSX.Element;
3
17
  /** In-room camera control mirroring `CameraSelectorAndSwitch.svelte`. */
@@ -10,3 +24,4 @@ export interface JamAudioOutputSelectorProps {
10
24
  }
11
25
  /** In-room speaker control mirroring `AudioOutputSelector.svelte`. */
12
26
  export declare const JamAudioOutputSelector: ({ speakerDeviceId, speakerEnabled, onSpeakerChange, onToggleSpeaker, }: JamAudioOutputSelectorProps) => import("react/jsx-runtime").JSX.Element | null;
27
+ export {};
@@ -2,18 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useMediaDeviceSelect, useRoomContext, useTrackToggle, } from '@livekit/components-react';
3
3
  import { LocalAudioTrack, LocalVideoTrack, Track } from 'livekit-client';
4
4
  import { Check, Mic, MicOff, Video, VideoOff, Volume2, VolumeX, } from 'lucide-react';
5
- import { PopupMenuButton, SplitButtonMenu, } from '@openpeepshq/react-ui';
5
+ import { PopupMenuButton } from '@openpeepshq/react-ui';
6
6
  import { useT } from '../../i18n/index.js';
7
7
  import { audioOutputSupported } from './constants.js';
8
+ import { JamToolbarButton } from './JamToolbarButton.js';
8
9
  /** Pill mirroring Svelte `DeviceSelectorAndSwitch.svelte`. */
9
- const DeviceSelectorPill = ({ enabled, onToggle, onIcon: OnIcon, offIcon: OffIcon, deviceType, devices, activeDeviceId, onDeviceChange, }) => {
10
+ export const DeviceSelectorPill = ({ enabled, onToggle, onIcon: OnIcon, offIcon: OffIcon, deviceType, devices, activeDeviceId, onDeviceChange, }) => {
10
11
  const t = useT();
11
12
  const deviceLabel = deviceType === 'mic'
12
13
  ? t('jams.device.microphone')
13
14
  : deviceType === 'camera'
14
15
  ? t('jams.device.camera')
15
16
  : '';
16
- return (_jsx(SplitButtonMenu, { className: "bg-surface-100 rounded-full backdrop-blur", title: `${enabled ? t('jams.device.turnOff') : t('jams.device.turnOn')}${deviceLabel ? ` ${deviceLabel}` : ''}`, variant: enabled ? 'variant-soft-surface' : 'variant-filled-error', action: onToggle, menuTitle: t('jams.device.changeTitle'), placement: "top-start", menuChildren: _jsxs(_Fragment, { children: [!enabled ? (_jsx(PopupMenuButton, { title: t('jams.device.turnOn'), action: onToggle, text: t('jams.device.turnOn'), icon: OnIcon })) : (_jsx(PopupMenuButton, { title: t('jams.device.turnOff'), action: onToggle, text: t('jams.device.turnOff'), icon: OffIcon })), devices.length === 0 ? (_jsx("div", { className: "p-2 text-sm", children: t('jams.device.loadingDevices') })) : (devices.map((device) => (_jsx(PopupMenuButton, { title: t('jams.device.switchTitle'), action: () => onDeviceChange(device.deviceId), icon: OnIcon, textSlot: _jsxs("span", { className: "flex w-full min-w-0 items-center gap-2", children: [_jsx("span", { className: "truncate", children: device.label ||
17
+ return (_jsx(JamToolbarButton, { title: `${enabled ? t('jams.device.turnOff') : t('jams.device.turnOn')}${deviceLabel ? ` ${deviceLabel}` : ''}`, tone: enabled ? 'default' : 'danger', action: onToggle, menuTitle: t('jams.device.changeTitle'), menuChildren: _jsxs(_Fragment, { children: [!enabled ? (_jsx(PopupMenuButton, { title: t('jams.device.turnOn'), action: onToggle, text: t('jams.device.turnOn'), icon: OnIcon })) : (_jsx(PopupMenuButton, { title: t('jams.device.turnOff'), action: onToggle, text: t('jams.device.turnOff'), icon: OffIcon })), devices.length === 0 ? (_jsx("div", { className: "p-2 text-sm", children: t('jams.device.loadingDevices') })) : (devices.map((device) => (_jsx(PopupMenuButton, { title: t('jams.device.switchTitle'), action: () => onDeviceChange(device.deviceId), icon: OnIcon, textSlot: _jsxs("span", { className: "flex w-full min-w-0 items-center gap-2", children: [_jsx("span", { className: "truncate", children: device.label ||
17
18
  (device.deviceId === 'default'
18
19
  ? t('jams.device.defaultSpeaker')
19
20
  : device.deviceId) }), (device.deviceId === activeDeviceId ||
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
3
3
  import { useParticipants, useRoomContext, useTrackToggle, } from '@livekit/components-react';
4
4
  import { Track } from 'livekit-client';
5
5
  import { CircleEllipsis, CircleStop, Disc, Dot, Hand, Info, Laugh, MessageSquareText, ScreenShare, ScreenShareOff, UsersRound, } from 'lucide-react';
6
- import { Blur, Button, SquareStop } from '@openpeepshq/react-ui';
6
+ import { Blur, SquareStop } from '@openpeepshq/react-ui';
7
7
  import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
8
8
  import { subscribePushNotifications } from '../../push/index.js';
9
9
  import { useT } from '../../i18n/index.js';
@@ -15,6 +15,7 @@ import { useJamEventsContext } from './JamEventsContext.js';
15
15
  import { useJamRecordingState } from './jamRecordingState.js';
16
16
  import { JamAudioOutputSelector, JamCameraSelector, JamMicSelector, } from './JamDeviceSelectors.js';
17
17
  import { JamReactionMenu } from './JamReactionMenu.js';
18
+ import { JamToolbarButton } from './JamToolbarButton.js';
18
19
  import { LeaveCloseButton } from './LeaveCloseButton.js';
19
20
  import { toggleHand } from './jamEventActions.js';
20
21
  import { useRaisedHands } from './useJamHands.js';
@@ -84,14 +85,12 @@ const useFooterControls = () => {
84
85
  raiseHand: () => void toggleHand(room),
85
86
  };
86
87
  };
87
- /** Toolbar icon button mirroring Svelte `Button` with soft variants. */
88
- const ToolbarButton = ({ title, active, className = '', onClick, children, }) => (_jsx(Button, { title: title, variant: active ? 'variant-soft-primary' : 'variant-soft-surface', className: `size-10 rounded-full p-2 ${className}`, action: onClick, children: children }));
89
88
  /** Record control mirroring `RecordSwitch.svelte` (always red, Disc / SquareStop). */
90
- const RecordButton = ({ isRecording, busy, onToggle, t, className = '', }) => (_jsx("button", { type: "button", disabled: busy, title: isRecording
89
+ const RecordButton = ({ isRecording, busy, onToggle, t, }) => (_jsx(JamToolbarButton, { tone: "danger", disabled: busy, title: isRecording
91
90
  ? t('jams.recording.stopTitle')
92
- : t('events.recordingInProgress'), onClick: onToggle, className: `bg-error-500 text-on-primary-token flex size-10 items-center justify-center rounded-full p-2 ${className}`, children: isRecording ? _jsx(SquareStop, {}) : _jsx(Disc, {}) }));
91
+ : t('events.recordingInProgress'), action: onToggle, children: isRecording ? _jsx(SquareStop, {}) : _jsx(Disc, {}) }));
93
92
  /** People button with count badges mirroring Svelte `UserButton.svelte`. */
94
- const UserButton = ({ active, count, waitingRoomCount, onToggle, t, }) => (_jsxs(Button, { title: t('jams.participant.showEveryone'), variant: active ? 'variant-soft-primary' : 'variant-soft-surface', className: "relative size-10 rounded-full p-2", action: onToggle, children: [_jsx("span", { className: "bg-surface-400 absolute -right-2 -top-2 size-6 rounded-full p-1 px-2 text-xs", children: count }), waitingRoomCount > 0 ? (_jsx("span", { className: "bg-surface-400 absolute -bottom-2 -right-2 size-6 rounded-full p-1 px-2 text-xs", children: waitingRoomCount })) : null, _jsx(UsersRound, {})] }));
93
+ const UserButton = ({ active, count, waitingRoomCount, onToggle, t, }) => (_jsxs(JamToolbarButton, { title: t('jams.participant.showEveryone'), tone: active ? 'active' : 'default', action: onToggle, children: [_jsx("span", { className: "bg-border-2 text-foreground absolute -right-2 -top-2 size-6 rounded-full p-1 px-2 text-xs", children: count }), waitingRoomCount > 0 ? (_jsx("span", { className: "bg-border-2 text-foreground absolute -bottom-2 -right-2 size-6 rounded-full p-1 px-2 text-xs", children: waitingRoomCount })) : null, _jsx(UsersRound, {})] }));
95
94
  /** Chat toggle with unread dot mirroring `ChatDrawerButton.svelte`. */
96
95
  const ChatButton = ({ active, onToggle, t, }) => {
97
96
  const { sessionEvents } = useJamEventsContext();
@@ -115,10 +114,10 @@ const ChatButton = ({ active, onToggle, t, }) => {
115
114
  setLastSeenMessageId(lastMessage.id);
116
115
  }
117
116
  }, [sessionEvents, active, lastSeenMessageId]);
118
- return (_jsxs(Button, { title: t('jams.chat.openEveryoneTitle'), variant: active ? 'variant-soft-primary' : 'variant-soft-surface', className: "relative size-10 rounded-full p-1", action: () => {
117
+ return (_jsxs(JamToolbarButton, { title: t('jams.chat.openEveryoneTitle'), tone: active ? 'active' : 'default', action: () => {
119
118
  onToggle();
120
119
  setHasNewMessages(false);
121
- }, children: [_jsx(MessageSquareText, {}), hasNewMessages && !active ? (_jsx(Dot, { size: 13, className: "bg-error-500 text-error-500 absolute right-0 top-0 rounded-full" })) : null] }));
120
+ }, children: [_jsx(MessageSquareText, {}), hasNewMessages && !active ? (_jsx(Dot, { size: 13, className: "bg-error text-destructive absolute right-0 top-0 rounded-full" })) : null] }));
122
121
  };
123
122
  /** Screen share control mirroring `ScreenShareSwitch.svelte`. */
124
123
  const ScreenShareButton = ({ closeMenu, t, mobile = false, }) => {
@@ -131,26 +130,26 @@ const ScreenShareButton = ({ closeMenu, t, mobile = false, }) => {
131
130
  void toggle();
132
131
  };
133
132
  if (mobile) {
134
- return (_jsxs("button", { type: "button", className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: action, children: [enabled ? _jsx(ScreenShareOff, {}) : _jsx(ScreenShare, {}), _jsx("span", { children: enabled
133
+ return (_jsxs("button", { type: "button", className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: action, children: [enabled ? _jsx(ScreenShareOff, {}) : _jsx(ScreenShare, {}), _jsx("span", { children: enabled
135
134
  ? t('jams.screenShare.stopScreenshareMobile')
136
135
  : t('jams.screenShare.startScreenshareMobile') })] }));
137
136
  }
138
- return (_jsx(Button, { title: t('jams.screenShare.startStopTitle'), variant: enabled ? 'variant-soft-primary' : 'variant-soft-surface', className: "hidden size-10 rounded-full p-2 md:flex", action: action, children: enabled ? _jsx(ScreenShareOff, {}) : _jsx(ScreenShare, {}) }));
137
+ return (_jsx(JamToolbarButton, { title: t('jams.screenShare.startStopTitle'), tone: enabled ? 'active' : 'default', className: "hidden md:flex", action: action, children: enabled ? _jsx(ScreenShareOff, {}) : _jsx(ScreenShare, {}) }));
139
138
  };
140
139
  /** Mobile overflow menu mirroring `MobileMenu.svelte`. */
141
- const MobileMenu = ({ isModerator, recordingEnabled, isRecording, busy, onClose, onOpenChat, onOpenPeople, onOpenDetails, onRaiseHand, onToggleRecording, t, }) => (_jsxs("div", { className: "bg-surface-100 text-foreground absolute bottom-20 left-2 right-2 z-50 grid grid-cols-3 rounded-md p-2", children: [_jsxs("button", { type: "button", className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
140
+ const MobileMenu = ({ isModerator, recordingEnabled, isRecording, busy, onClose, onOpenChat, onOpenPeople, onOpenDetails, onRaiseHand, onToggleRecording, t, }) => (_jsxs("div", { className: "bg-surface text-foreground absolute bottom-20 left-2 right-2 z-50 grid grid-cols-3 rounded-md p-2", children: [_jsxs("button", { type: "button", className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
142
141
  onClose();
143
142
  onOpenChat();
144
- }, children: [_jsx(MessageSquareText, {}), _jsx("span", { children: t('jams.mobileMenu.inJamMessage') })] }), _jsxs("button", { type: "button", className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
143
+ }, children: [_jsx(MessageSquareText, {}), _jsx("span", { children: t('jams.mobileMenu.inJamMessage') })] }), _jsxs("button", { type: "button", className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
145
144
  onClose();
146
145
  onOpenDetails();
147
- }, children: [_jsx(Info, {}), _jsx("span", { children: t('jams.mobileMenu.jamDetails') })] }), _jsx(ScreenShareButton, { closeMenu: onClose, t: t, mobile: true }), _jsxs("button", { type: "button", className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
146
+ }, children: [_jsx(Info, {}), _jsx("span", { children: t('jams.mobileMenu.jamDetails') })] }), _jsx(ScreenShareButton, { closeMenu: onClose, t: t, mobile: true }), _jsxs("button", { type: "button", className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
148
147
  onClose();
149
148
  onRaiseHand();
150
- }, children: [_jsx(Hand, {}), _jsx("span", { children: t('jams.hand.raiseLabel') })] }), _jsxs("button", { type: "button", className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
149
+ }, children: [_jsx(Hand, {}), _jsx("span", { children: t('jams.hand.raiseLabel') })] }), _jsxs("button", { type: "button", className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
151
150
  onClose();
152
151
  onOpenPeople();
153
- }, children: [_jsx(UsersRound, {}), _jsx("span", { children: t('jams.mobileMenu.people') })] }), isModerator && recordingEnabled ? (_jsxs("button", { type: "button", disabled: busy, className: "text-tertiary-500 flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
152
+ }, children: [_jsx(UsersRound, {}), _jsx("span", { children: t('jams.mobileMenu.people') })] }), isModerator && recordingEnabled ? (_jsxs("button", { type: "button", disabled: busy, className: "flex flex-col items-center justify-center gap-y-2 p-2 md:hidden", onClick: () => {
154
153
  onClose();
155
154
  onToggleRecording();
156
155
  }, children: [isRecording ? _jsx(CircleStop, {}) : _jsx(Disc, {}), _jsx("span", { children: isRecording
@@ -167,5 +166,5 @@ export const JamFooter = ({ chatOpen, onToggleChat, peopleOpen, onTogglePeople,
167
166
  const handleEmojiSelect = async (emoji) => {
168
167
  await sendReactionEmoji(emoji);
169
168
  };
170
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "hidden w-full flex-none items-center justify-between px-4 py-3 md:flex", children: [_jsx("h1", { className: "truncate pr-2", children: jamEvent.name }), _jsxs("div", { className: "relative flex items-center gap-x-4", children: [reactionMenuOpen ? (_jsx("div", { className: "absolute bottom-12 right-0 z-50 md:w-max", children: _jsx(JamReactionMenu, { onSelect: handleEmojiSelect }) })) : null, _jsx(JamMicSelector, {}), _jsx(JamCameraSelector, {}), _jsx(JamAudioOutputSelector, { speakerDeviceId: speakerDeviceId, speakerEnabled: speakerEnabled, onSpeakerChange: onSpeakerChange, onToggleSpeaker: onToggleSpeaker }), isModerator && recordingEnabled ? (_jsx(RecordButton, { isRecording: isRecording, busy: busy, onToggle: () => void toggleRecording(), t: t })) : null, _jsx(ToolbarButton, { title: blur ? t('jams.blur.turnOff') : t('jams.blur.blurBackground'), active: blur, onClick: onToggleBlur, children: _jsx(Blur, {}) }), _jsx(ToolbarButton, { title: t('jams.hand.raiseTitle'), active: handRaised, onClick: raiseHand, children: _jsx(Hand, {}) }), _jsx(ScreenShareButton, { t: t }), _jsx(ToolbarButton, { title: t('jams.reactions.sendTitle'), active: reactionMenuOpen, onClick: () => setReactionMenuOpen((open) => !open), children: _jsx(Laugh, {}) }), _jsx(ChatButton, { active: chatOpen, onToggle: onToggleChat, t: t })] }), _jsxs("div", { className: "relative flex items-center gap-x-4", children: [_jsx(ToolbarButton, { title: t('jams.mobileMenu.jamDetails'), active: detailsOpen, onClick: onToggleDetails, children: _jsx(Info, {}) }), _jsx(UserButton, { active: peopleOpen, count: participantCount, waitingRoomCount: waitingRoomCount, onToggle: onTogglePeople, t: t }), _jsx(LeaveCloseButton, {})] })] }), _jsxs("div", { className: "bg-surface-50/75 fixed bottom-0 flex w-full items-center justify-between gap-x-2 px-2 py-3 md:hidden", children: [reactionMenuOpen ? (_jsx("div", { className: "absolute bottom-20 right-[7%] z-50 mt-2 w-[90%] rounded-md p-2", children: _jsx(JamReactionMenu, { onSelect: handleEmojiSelect, mobile: true }) })) : null, mobileMenuOpen ? (_jsx(MobileMenu, { isModerator: isModerator, recordingEnabled: recordingEnabled, isRecording: isRecording, busy: busy, onClose: () => setMobileMenuOpen(false), onOpenChat: onToggleChat, onOpenPeople: onTogglePeople, onOpenDetails: onToggleDetails, onRaiseHand: raiseHand, onToggleRecording: () => void toggleRecording(), t: t })) : null, _jsx(JamMicSelector, {}), _jsx(JamCameraSelector, {}), _jsx(JamAudioOutputSelector, { speakerDeviceId: speakerDeviceId, speakerEnabled: speakerEnabled, onSpeakerChange: onSpeakerChange, onToggleSpeaker: onToggleSpeaker }), _jsx("button", { type: "button", title: t('jams.reactions.sendTitle'), onClick: () => setReactionMenuOpen((open) => !open), className: `text-on-primary-token flex items-center justify-center rounded-full p-2 ${reactionMenuOpen ? 'bg-primary-500' : 'bg-surface-400'}`, children: _jsx(Laugh, {}) }), _jsx("button", { type: "button", title: t('jams.drawer.jamControls'), onClick: () => setMobileMenuOpen((open) => !open), className: "bg-surface-400 text-on-primary-token flex items-center justify-center rounded-full p-2", children: _jsx(CircleEllipsis, {}) }), _jsx(LeaveCloseButton, {})] })] }));
169
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "hidden w-full flex-none items-center justify-between px-4 py-3 md:flex", children: [_jsx("h1", { className: "truncate pr-2", children: jamEvent.name }), _jsxs("div", { className: "relative flex items-center gap-x-4", children: [reactionMenuOpen ? (_jsx("div", { className: "absolute bottom-12 right-0 z-50 md:w-max", children: _jsx(JamReactionMenu, { onSelect: handleEmojiSelect }) })) : null, _jsx(JamMicSelector, {}), _jsx(JamCameraSelector, {}), _jsx(JamAudioOutputSelector, { speakerDeviceId: speakerDeviceId, speakerEnabled: speakerEnabled, onSpeakerChange: onSpeakerChange, onToggleSpeaker: onToggleSpeaker }), isModerator && recordingEnabled ? (_jsx(RecordButton, { isRecording: isRecording, busy: busy, onToggle: () => void toggleRecording(), t: t })) : null, _jsx(JamToolbarButton, { title: blur ? t('jams.blur.turnOff') : t('jams.blur.blurBackground'), tone: blur ? 'active' : 'default', action: onToggleBlur, children: _jsx(Blur, {}) }), _jsx(JamToolbarButton, { title: t('jams.hand.raiseTitle'), tone: handRaised ? 'active' : 'default', action: raiseHand, children: _jsx(Hand, {}) }), _jsx(ScreenShareButton, { t: t }), _jsx(JamToolbarButton, { title: t('jams.reactions.sendTitle'), tone: reactionMenuOpen ? 'active' : 'default', action: () => setReactionMenuOpen((open) => !open), children: _jsx(Laugh, {}) }), _jsx(ChatButton, { active: chatOpen, onToggle: onToggleChat, t: t })] }), _jsxs("div", { className: "relative flex items-center gap-x-4", children: [_jsx(JamToolbarButton, { title: t('jams.mobileMenu.jamDetails'), tone: detailsOpen ? 'active' : 'default', action: onToggleDetails, children: _jsx(Info, {}) }), _jsx(UserButton, { active: peopleOpen, count: participantCount, waitingRoomCount: waitingRoomCount, onToggle: onTogglePeople, t: t }), _jsx(LeaveCloseButton, {})] })] }), _jsxs("div", { className: "bg-background/75 relative flex w-full items-center justify-between gap-x-2 px-2 py-3 md:hidden", children: [reactionMenuOpen ? (_jsx("div", { className: "absolute bottom-20 right-[7%] z-50 mt-2 w-[90%] rounded-md p-2", children: _jsx(JamReactionMenu, { onSelect: handleEmojiSelect, mobile: true }) })) : null, mobileMenuOpen ? (_jsx(MobileMenu, { isModerator: isModerator, recordingEnabled: recordingEnabled, isRecording: isRecording, busy: busy, onClose: () => setMobileMenuOpen(false), onOpenChat: onToggleChat, onOpenPeople: onTogglePeople, onOpenDetails: onToggleDetails, onRaiseHand: raiseHand, onToggleRecording: () => void toggleRecording(), t: t })) : null, _jsx(JamMicSelector, {}), _jsx(JamCameraSelector, {}), _jsx(JamAudioOutputSelector, { speakerDeviceId: speakerDeviceId, speakerEnabled: speakerEnabled, onSpeakerChange: onSpeakerChange, onToggleSpeaker: onToggleSpeaker }), _jsx(JamToolbarButton, { title: t('jams.reactions.sendTitle'), tone: reactionMenuOpen ? 'active' : 'default', action: () => setReactionMenuOpen((open) => !open), children: _jsx(Laugh, {}) }), _jsx(JamToolbarButton, { title: t('jams.drawer.jamControls'), action: () => setMobileMenuOpen((open) => !open), children: _jsx(CircleEllipsis, {}) }), _jsx(LeaveCloseButton, {})] })] }));
171
170
  };
@@ -37,7 +37,7 @@ export function JamGuestForm() {
37
37
  setSubmitting(false);
38
38
  }
39
39
  };
40
- return (_jsx("div", { className: "mx-auto flex h-full w-full max-w-md items-center justify-center p-4", children: _jsxs("div", { className: "bg-card w-full space-y-4 rounded-md border p-6", children: [_jsxs("div", { className: "text-center", children: [_jsxs("h2", { className: "text-xl font-semibold", children: [jamEvent.name, " \u2014 ", profileName(jamPost.profile)] }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: t('jams.lobby.guestIntro', {
40
+ return (_jsx("div", { className: "mx-auto flex h-full w-full max-w-md items-center justify-center p-4", children: _jsxs("div", { className: "bg-surface w-full space-y-4 rounded-md border p-6", children: [_jsxs("div", { className: "text-center", children: [_jsxs("h2", { className: "text-xl font-semibold", children: [jamEvent.name, " \u2014 ", profileName(jamPost.profile)] }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: t('jams.lobby.guestIntro', {
41
41
  defaultValue: 'Enter your details to join as a guest.',
42
42
  }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "guest-name", children: t('jams.lobby.guestFullNameLabel', { defaultValue: 'Full name' }) }), _jsx(Input, { id: "guest-name", value: guestData.displayName, onChange: (e) => setGuestData((d) => ({ ...d, displayName: e.target.value })), placeholder: t('jams.lobby.guestFullNamePlaceholder', {
43
43
  defaultValue: 'Your name',
@@ -47,7 +47,7 @@ export function JamGuestForm() {
47
47
  defaultValue: 'By continuing you agree to the',
48
48
  }), ' ', _jsx("a", { href: termsLink, className: "anchor", target: "_blank", rel: "noreferrer", children: t('navigation.termsAndConditions', {
49
49
  defaultValue: 'terms and conditions',
50
- }) }), "."] }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(Button, { variant: "variant-filled-primary", action: submit, disabled: submitting ||
50
+ }) }), "."] }), error ? (_jsx("p", { className: "border-error/40 text-error rounded-md border p-2 text-sm", children: error })) : null, _jsx(Button, { variant: "default", action: submit, disabled: submitting ||
51
51
  !guestData.displayName.trim() ||
52
52
  !guestData.email.trim(), className: "w-full", children: submitting
53
53
  ? t('common.submitting', { defaultValue: 'Submitting…' })
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3
- import { Mic, MicOff, Video, VideoOff, Volume2, X } from 'lucide-react';
3
+ import { Mic, MicOff, Video, VideoOff, Volume2, VolumeX, X, } from 'lucide-react';
4
4
  import { useMediaDevices, usePreviewTracks, } from '@livekit/components-react';
5
5
  import { Track } from 'livekit-client';
6
6
  import { profileName } from '@openpeepshq/common/lib';
@@ -10,7 +10,10 @@ import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
10
10
  import { useT } from '../../i18n/index.js';
11
11
  import { useCurrentProfile } from '../layout/IdentityContext.js';
12
12
  import { useJamContext } from './JamContext.js';
13
+ import { audioOutputSupported } from './constants.js';
14
+ import { DeviceSelectorPill } from './JamDeviceSelectors.js';
13
15
  import { JamGuestForm } from './JamGuestForm.js';
16
+ import { JamToolbarButton } from './JamToolbarButton.js';
14
17
  import { useJamLocalSettings } from './jamLocalSettings.js';
15
18
  import { apiErrorMessage } from '../../lib/apiErrorMessage.js';
16
19
  function canAccessJamLobby(profile, jamPostId) {
@@ -21,16 +24,6 @@ function canAccessJamLobby(profile, jamPostId) {
21
24
  return (profile.guestData?.resource?.type === 'jams' &&
22
25
  profile.guestData.resource.id === jamPostId);
23
26
  }
24
- /** Pill mirroring the Svelte "selector and switch" controls (toggle + device list). */
25
- function DeviceControl({ enabled, onToggle, onLabel, offLabel, OnIcon, OffIcon, devices, deviceId, onDeviceChange, iconOnly = false, }) {
26
- return (_jsxs("div", { className: "bg-surface-100 flex items-center gap-1 rounded-full border p-1", children: [_jsx("button", { type: "button", title: enabled ? offLabel : onLabel, onClick: onToggle, className: `flex size-9 items-center justify-center rounded-full ${enabled ? '' : 'bg-surface-200'}`, children: enabled ? (_jsx(OnIcon, { className: "size-4" })) : (_jsx(OffIcon, { className: "size-4" })) }), !iconOnly && devices.length > 1 ? (_jsxs("select", { value: deviceId, onChange: (e) => onDeviceChange(e.target.value), className: "max-w-[6rem] truncate bg-transparent pr-1 text-xs outline-none", children: [_jsx("option", { value: "", children: onLabel }), devices.map((device, index) => (_jsx("option", { value: device.deviceId, children: device.label || `${index + 1}` }, device.deviceId)))] })) : null] }));
27
- }
28
- /** Speaker (audio output) selector for the lobby. Icon-only: the chosen device
29
- * is persisted and applied to the room's audio output on join, and there is no
30
- * on/off toggle since no audio is playing pre-room. */
31
- function SpeakerControl({ label }) {
32
- return (_jsx("div", { className: "bg-surface-100 flex items-center gap-1 rounded-full border p-1", children: _jsx("span", { title: label, className: "flex size-9 items-center justify-center rounded-full", children: _jsx(Volume2, { className: "size-4" }) }) }));
33
- }
34
27
  /**
35
28
  * Pre-room screen. Guests without a jam-scoped pass see {@link JamGuestForm};
36
29
  * authenticated users get a device-selection card that mirrors the Svelte
@@ -56,6 +49,7 @@ export function JamLobby({ onJoin }) {
56
49
  const videoRef = useRef(null);
57
50
  const audioDevices = useMediaDevices({ kind: 'audioinput' });
58
51
  const videoDevices = useMediaDevices({ kind: 'videoinput' });
52
+ const speakerDevices = useMediaDevices({ kind: 'audiooutput' });
59
53
  // Video preview only — mic state is persisted for join but not acquired here,
60
54
  // mirroring Svelte's separate CameraSelectorAndSwitch track management.
61
55
  const trackOptions = useMemo(() => ({
@@ -107,9 +101,7 @@ export function JamLobby({ onJoin }) {
107
101
  return _jsx(JamGuestForm, {});
108
102
  }
109
103
  const exitLobby = () => {
110
- if (window.confirm(t('jams.lobby.exitLobbyBody', { defaultValue: '' }))) {
111
- navigate('/jams');
112
- }
104
+ navigate({ type: 'jams' });
113
105
  };
114
106
  const handleJoin = async () => {
115
107
  setSubmitting(true);
@@ -146,14 +138,12 @@ export function JamLobby({ onJoin }) {
146
138
  setSubmitting(false);
147
139
  }
148
140
  };
149
- return (_jsx("div", { className: "mx-auto flex h-full w-full max-w-lg items-center justify-center p-4", children: _jsxs("div", { className: "bg-surface-50 w-full rounded-md border p-4", children: [_jsxs("div", { className: "flex items-center justify-between border-b p-2", children: [_jsx("h2", { className: "text-lg", children: t('jams.lobby.readyTitle', { defaultValue: 'Ready to join' }) }), _jsx("button", { type: "button", title: t('jams.exit.title', { defaultValue: 'Leave' }), className: "bg-surface-200 flex size-8 items-center justify-center rounded-full", onClick: exitLobby, children: _jsx(X, { className: "size-4" }) })] }), _jsxs("div", { className: "flex flex-col items-center p-5", children: [_jsx("h2", { className: "my-1 text-center text-lg", children: jamEvent.name ||
150
- t('jams.lobby.fallbackTitle', { defaultValue: 'Jam' }) }), _jsxs("div", { className: "relative size-64", children: [_jsx("video", { ref: videoRef, autoPlay: true, playsInline: true, muted: true, className: `size-64 rounded-xl object-cover ${showVideo ? '' : 'hidden'}` }), !showVideo ? (_jsx("div", { className: "bg-surface-100 flex size-64 items-center justify-center rounded-xl", children: _jsx("p", { className: "text-lg", children: t('jams.lobby.cameraOff', { defaultValue: 'Camera is off' }) }) })) : null] }), _jsxs("div", { className: "mt-4 flex w-full justify-center gap-2", children: [_jsx(DeviceControl, { enabled: audioEnabled, onToggle: () => setAudioEnabled((on) => !on), onLabel: `${t('jams.device.turnOn', { defaultValue: 'Turn on' })} ${t('jams.device.microphone', { defaultValue: 'microphone' })}`, offLabel: `${t('jams.device.turnOff', { defaultValue: 'Turn off' })} ${t('jams.device.microphone', { defaultValue: 'microphone' })}`, OnIcon: Mic, OffIcon: MicOff, devices: audioDevices, deviceId: audioDeviceId, onDeviceChange: setAudioDeviceId, iconOnly: true }), _jsx(SpeakerControl, { label: t('jams.device.defaultSpeaker', {
151
- defaultValue: 'Default Speaker',
152
- }) }), _jsx(DeviceControl, { enabled: videoEnabled, onToggle: () => setVideoEnabled((on) => !on), onLabel: `${t('jams.device.turnOn', { defaultValue: 'Turn on' })} ${t('jams.device.camera', { defaultValue: 'camera' })}`, offLabel: `${t('jams.device.turnOff', { defaultValue: 'Turn off' })} ${t('jams.device.camera', { defaultValue: 'camera' })}`, OnIcon: Video, OffIcon: VideoOff, devices: videoDevices, deviceId: videoDeviceId, onDeviceChange: setVideoDeviceId }), _jsx("button", { type: "button", title: settings.blur
141
+ return (_jsx("div", { className: "mx-auto flex h-full w-full max-w-lg items-center justify-center p-4", children: _jsxs("div", { className: "bg-background w-full rounded-md border p-4", children: [_jsxs("div", { className: "flex items-center justify-between border-b p-2", children: [_jsx("h2", { className: "text-lg", children: t('jams.lobby.readyTitle', { defaultValue: 'Ready to join' }) }), _jsx("button", { type: "button", title: t('jams.exit.title', { defaultValue: 'Leave' }), className: "bg-surface-2 flex size-8 items-center justify-center rounded-full", onClick: exitLobby, children: _jsx(X, { className: "size-4" }) })] }), _jsxs("div", { className: "flex flex-col items-center p-5", children: [_jsx("h2", { className: "my-1 text-center text-lg", children: jamEvent.name ||
142
+ t('jams.lobby.fallbackTitle', { defaultValue: 'Jam' }) }), _jsxs("div", { className: "relative size-64", children: [_jsx("video", { ref: videoRef, autoPlay: true, playsInline: true, muted: true, className: `size-64 rounded-xl object-cover ${showVideo ? '' : 'hidden'}` }), !showVideo ? (_jsx("div", { className: "bg-surface flex size-64 items-center justify-center rounded-xl", children: _jsx("p", { className: "text-lg", children: t('jams.lobby.cameraOff', { defaultValue: 'Camera is off' }) }) })) : null] }), _jsxs("div", { className: "mt-4 flex w-full items-center justify-center gap-x-4", children: [_jsx(DeviceSelectorPill, { enabled: audioEnabled, onToggle: () => setAudioEnabled((on) => !on), onIcon: Mic, offIcon: MicOff, deviceType: "mic", devices: audioDevices, activeDeviceId: audioDeviceId, onDeviceChange: setAudioDeviceId }), audioOutputSupported ? (_jsx(DeviceSelectorPill, { enabled: settings.speakerEnabled, onToggle: () => updateSettings({ speakerEnabled: !settings.speakerEnabled }), onIcon: Volume2, offIcon: VolumeX, deviceType: "speaker", devices: speakerDevices, activeDeviceId: settings.speakerDeviceId, onDeviceChange: (speakerDeviceId) => updateSettings({ speakerDeviceId }) })) : null, _jsx(DeviceSelectorPill, { enabled: videoEnabled, onToggle: () => setVideoEnabled((on) => !on), onIcon: Video, offIcon: VideoOff, deviceType: "camera", devices: videoDevices, activeDeviceId: videoDeviceId, onDeviceChange: setVideoDeviceId }), _jsx(JamToolbarButton, { title: settings.blur
153
143
  ? t('jams.blur.turnOff', { defaultValue: 'Turn off blur' })
154
144
  : t('jams.blur.blurBackground', {
155
145
  defaultValue: 'Blur background',
156
- }), onClick: () => updateSettings({ blur: !settings.blur }), className: `flex size-11 items-center justify-center rounded-full border ${settings.blur ? 'bg-primary text-primary-foreground' : 'bg-surface-100'}`, children: _jsx(Blur, { className: "size-4" }) })] })] }), _jsxs("div", { className: "flex w-full flex-col items-center px-5 pb-4", children: [_jsx(Button, { variant: "variant-filled-primary", title: t('jams.join.submit', { defaultValue: 'Join Jam' }), loading: submitting, action: handleJoin, className: "rounded-full", children: jamActive
146
+ }), tone: settings.blur ? 'active' : 'default', action: () => updateSettings({ blur: !settings.blur }), children: _jsx(Blur, {}) })] })] }), _jsxs("div", { className: "flex w-full flex-col items-center px-5 pb-4", children: [_jsx(Button, { variant: "default", title: t('jams.join.submit', { defaultValue: 'Join Jam' }), loading: submitting, action: handleJoin, children: jamActive
157
147
  ? t('jams.join.ctaJoin', { defaultValue: 'Join' })
158
148
  : t('jams.join.ctaStart', { defaultValue: 'Start' }) }), error ? (_jsx("div", { role: "alert", className: "text-destructive mt-3 text-sm", children: error })) : null] })] }) }));
159
149
  }
@@ -7,5 +7,5 @@ import { JamChatDrawer } from './JamChatDrawer.js';
7
7
  export function JamObserverShell({ children }) {
8
8
  const t = useT();
9
9
  const [chatOpen, setChatOpen] = useState(false);
10
- return (_jsxs("div", { className: "relative flex h-screen w-screen flex-1 overflow-hidden", children: [_jsx("div", { className: "flex min-w-0 flex-1 flex-col", children: children }), _jsx("div", { className: "absolute bottom-4 right-4 z-20", children: _jsx("button", { type: "button", title: t('jams.drawer.chatTitle', { defaultValue: 'Chat' }), className: `lk-button ${chatOpen ? 'lk-button-active' : ''}`, onClick: () => setChatOpen((open) => !open), children: _jsx(MessageSquare, { className: "size-5" }) }) }), _jsx(JamChatDrawer, { open: chatOpen, onClose: () => setChatOpen(false), readOnly: true })] }));
10
+ return (_jsxs("div", { className: "relative flex h-dvh w-screen flex-1 overflow-hidden", children: [_jsx("div", { className: "flex h-full min-h-0 min-w-0 flex-1 flex-col", children: children }), _jsx("div", { className: "absolute bottom-4 right-4 z-20", children: _jsx("button", { type: "button", title: t('jams.drawer.chatTitle', { defaultValue: 'Chat' }), className: `lk-button ${chatOpen ? 'lk-button-active' : ''}`, onClick: () => setChatOpen((open) => !open), children: _jsx(MessageSquare, { className: "size-5" }) }) }), _jsx(JamChatDrawer, { open: chatOpen, onClose: () => setChatOpen(false), readOnly: true })] }));
11
11
  }
@@ -67,7 +67,7 @@ function JamParticipantConferenceInner() {
67
67
  };
68
68
  }, [cameraTrack, settings.blur]);
69
69
  const toggleDrawer = (next) => setDrawer((current) => (current === next ? null : next));
70
- return (_jsxs("div", { className: "bg-surface-50 relative flex h-screen w-screen flex-col overflow-hidden", children: [_jsx(JamNetworkQuality, {}), _jsx(JamRecordingIndicator, {}), _jsxs("div", { className: "relative flex w-full flex-1 overflow-hidden p-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "flex items-center md:hidden", children: _jsx("h1", { className: "font-semibold", title: jamEvent.name, children: truncateText(jamEvent.name, 40) }) }), _jsx(JamVideoLayout, { cameraTracks: cameraTracks, screenShareTracks: screenShareTracks, observer: false })] }), _jsxs("div", { className: "max-h-full overflow-y-auto md:flex-shrink-0", children: [_jsx(JamChatDrawer, { open: drawer === 'chat', onClose: () => setDrawer(null) }), _jsx(JamPeopleDrawer, { open: drawer === 'people', onClose: () => setDrawer(null) }), _jsx(JamDetailsDrawer, { open: drawer === 'details', onClose: () => setDrawer(null) })] })] }), _jsx("div", { className: "bg-surface-50 w-full flex-shrink-0 md:h-20 md:p-2", children: _jsx(JamFooter, { chatOpen: drawer === 'chat', onToggleChat: () => toggleDrawer('chat'), peopleOpen: drawer === 'people', onTogglePeople: () => toggleDrawer('people'), detailsOpen: drawer === 'details', onToggleDetails: () => toggleDrawer('details'), speakerDeviceId: settings.speakerDeviceId, speakerEnabled: settings.speakerEnabled, onSpeakerChange: (speakerDeviceId) => updateSettings({ speakerDeviceId }), onToggleSpeaker: () => updateSettings({ speakerEnabled: !settings.speakerEnabled }), blur: settings.blur, onToggleBlur: () => updateSettings({ blur: !settings.blur }) }) }), _jsx(ConnectionStateToast, {})] }));
70
+ return (_jsxs("div", { className: "bg-background relative flex h-dvh w-screen flex-col overflow-hidden", children: [_jsx(JamNetworkQuality, {}), _jsx(JamRecordingIndicator, {}), _jsxs("div", { className: "relative flex min-h-0 w-full flex-1 overflow-hidden p-2", children: [_jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden", children: [_jsx("div", { className: "flex flex-shrink-0 items-center md:hidden landscape:hidden", children: _jsx("h1", { className: "font-semibold", title: jamEvent.name, children: truncateText(jamEvent.name, 40) }) }), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(JamVideoLayout, { cameraTracks: cameraTracks, screenShareTracks: screenShareTracks, observer: false }) })] }), _jsxs("div", { className: "max-h-full overflow-y-auto md:flex-shrink-0", children: [_jsx(JamChatDrawer, { open: drawer === 'chat', onClose: () => setDrawer(null) }), _jsx(JamPeopleDrawer, { open: drawer === 'people', onClose: () => setDrawer(null) }), _jsx(JamDetailsDrawer, { open: drawer === 'details', onClose: () => setDrawer(null) })] })] }), _jsx("div", { className: "bg-background w-full flex-shrink-0 md:h-20 md:p-2", children: _jsx(JamFooter, { chatOpen: drawer === 'chat', onToggleChat: () => toggleDrawer('chat'), peopleOpen: drawer === 'people', onTogglePeople: () => toggleDrawer('people'), detailsOpen: drawer === 'details', onToggleDetails: () => toggleDrawer('details'), speakerDeviceId: settings.speakerDeviceId, speakerEnabled: settings.speakerEnabled, onSpeakerChange: (speakerDeviceId) => updateSettings({ speakerDeviceId }), onToggleSpeaker: () => updateSettings({ speakerEnabled: !settings.speakerEnabled }), blur: settings.blur, onToggleBlur: () => updateSettings({ blur: !settings.blur }) }) }), _jsx(ConnectionStateToast, {})] }));
71
71
  }
72
72
  /**
73
73
  * In-call participant UI mirroring the Svelte `VideoCall`: a full-screen column
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
- import { AudioLines, Hand, Mic, MicOff, Search, UserRoundCheck, X, } from 'lucide-react';
3
+ import { AudioLines, Hand, Mic, MicOff, Search, UserRoundCheck, WifiOff, X, } from 'lucide-react';
4
4
  import { matchesQuery, profileName } from '@openpeepshq/common/lib';
5
5
  import { useParticipants, useRoomContext } from '@livekit/components-react';
6
6
  import { Button, Input } from '@openpeepshq/react-ui';
@@ -10,7 +10,20 @@ import { useCurrentProfile } from '../layout/IdentityContext.js';
10
10
  import { Avatar } from '../profile/index.js';
11
11
  import { useJamContext } from './JamContext.js';
12
12
  import { parseParticipantMetadata } from './jamEventActions.js';
13
+ import { useConnectionLost } from './useParticipantConnection.js';
13
14
  import { useRaisedHands } from './useJamHands.js';
15
+ /** One "In jam" row. Split out so the connection-quality hook runs per participant. */
16
+ function JamParticipantRow({ participant, handUp, isModerator, }) {
17
+ const t = useT();
18
+ const profile = parseParticipantMetadata(participant.metadata).profile;
19
+ const micOn = participant.isMicrophoneEnabled;
20
+ const speaking = participant.isSpeaking;
21
+ const connectionLost = useConnectionLost(participant);
22
+ return (_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: `flex min-w-0 items-center gap-2 ${connectionLost ? 'opacity-50' : ''}`, children: [_jsx(Avatar, { profile: profile, size: 2 }), _jsx("span", { className: "truncate text-sm", children: (isModerator ? '* ' : '') +
23
+ (profile ? profileName(profile) : participant.identity) })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [handUp ? _jsx(Hand, { className: "size-4" }) : null, connectionLost ? (_jsx("span", { className: "text-muted-foreground flex items-center gap-1 text-xs", title: t('jams.people.connectionLost', {
24
+ defaultValue: 'Connection lost',
25
+ }), children: _jsx(WifiOff, { className: "size-4" }) })) : !micOn ? (_jsx(MicOff, { className: "text-muted-foreground size-4" })) : speaking ? (_jsx(AudioLines, { className: "text-primary size-4" })) : (_jsx(Mic, { className: "size-4" }))] })] }));
26
+ }
14
27
  /**
15
28
  * In-room participants list with mic / raised-hand / moderator indicators, plus
16
29
  * a moderator-only waiting-room admit section. Mirrors the Svelte
@@ -55,22 +68,13 @@ export function JamPeopleDrawer({ open, onClose }) {
55
68
  setAdmittingId(null);
56
69
  }
57
70
  };
58
- return (_jsxs("div", { className: "bg-surface-100 text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80", children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.drawer.peopleTitle', { defaultValue: 'People' }) }), _jsx("button", { type: "button", title: t('jams.drawer.close', { defaultValue: 'Close' }), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsx("div", { className: "px-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute left-3 top-1/2 size-4 -translate-y-1/2" }), _jsx(Input, { className: "pl-9", value: query, onChange: (e) => setQuery(e.target.value), placeholder: t('jams.drawer.searchPeoplePlaceholder', {
71
+ return (_jsxs("div", { className: "bg-surface text-foreground absolute right-0 top-0 flex h-full w-full flex-col gap-3 overflow-hidden rounded md:relative md:w-80", children: [_jsxs("div", { className: "flex w-full flex-none items-center justify-between border-b p-2", children: [_jsx("h3", { className: "text-lg", children: t('jams.drawer.peopleTitle', { defaultValue: 'People' }) }), _jsx("button", { type: "button", title: t('jams.drawer.close', { defaultValue: 'Close' }), className: "text-neutral-400", onClick: onClose, children: _jsx(X, {}) })] }), _jsx("div", { className: "px-2", children: _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute left-3 top-1/2 size-4 -translate-y-1/2" }), _jsx(Input, { className: "pl-9", value: query, onChange: (e) => setQuery(e.target.value), placeholder: t('jams.drawer.searchPeoplePlaceholder', {
59
72
  defaultValue: 'Search for people',
60
- }) })] }) }), _jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto px-2 pb-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-muted-foreground text-xs font-semibold uppercase", children: t('jams.people.inJam', { defaultValue: 'In jam' }) }), _jsxs("div", { className: "mt-1 flex flex-col gap-2", children: [listedParticipants.map((participant) => {
61
- const profile = parseParticipantMetadata(participant.metadata).profile;
62
- const handUp = raisedHands.has(participant.identity);
63
- const micOn = participant.isMicrophoneEnabled;
64
- const speaking = participant.isSpeaking;
65
- return (_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Avatar, { profile: profile, size: 2 }), _jsx("span", { className: "truncate text-sm", children: (jam.moderators.includes(participant.identity)
66
- ? '* '
67
- : '') +
68
- (profile ? profileName(profile) : participant.identity) })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [handUp ? _jsx(Hand, { className: "size-4" }) : null, !micOn ? (_jsx(MicOff, { className: "text-muted-foreground size-4" })) : speaking ? (_jsx(AudioLines, { className: "text-primary size-4" })) : (_jsx(Mic, { className: "size-4" }))] })] }, participant.identity));
69
- }), listedParticipants.length === 0 ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-sm", children: t('jams.people.noParticipants', {
73
+ }) })] }) }), _jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto px-2 pb-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-muted-foreground text-xs font-semibold uppercase", children: t('jams.people.inJam', { defaultValue: 'In jam' }) }), _jsxs("div", { className: "mt-1 flex flex-col gap-2", children: [listedParticipants.map((participant) => (_jsx(JamParticipantRow, { participant: participant, handUp: raisedHands.has(participant.identity), isModerator: jam.moderators.includes(participant.identity) }, participant.identity))), listedParticipants.length === 0 ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-sm", children: t('jams.people.noParticipants', {
70
74
  defaultValue: 'No participants found',
71
75
  }) })) : null] })] }), isModerator && hasWaitingRoom && waitingProfiles.length > 0 ? (_jsxs("div", { children: [_jsx("h4", { className: "text-muted-foreground text-xs font-semibold uppercase", children: t('jams.people.inWaitingRoom', {
72
76
  defaultValue: 'In waiting room',
73
- }) }), _jsx("div", { className: "mt-1 flex flex-col gap-2", children: waitingProfiles.map((profile) => (_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Avatar, { profile: profile, size: 2 }), _jsx("span", { className: "truncate text-sm", children: profileName(profile) })] }), _jsx(Button, { variant: "variant-ringed-surface", compact: true, action: () => admit(profile), disabled: admittingId === profile.id, title: t('jams.waitingRoom.admitParticipant', {
77
+ }) }), _jsx("div", { className: "mt-1 flex flex-col gap-2", children: waitingProfiles.map((profile) => (_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx(Avatar, { profile: profile, size: 2 }), _jsx("span", { className: "truncate text-sm", children: profileName(profile) })] }), _jsx(Button, { variant: "outline", compact: true, action: () => admit(profile), disabled: admittingId === profile.id, title: t('jams.waitingRoom.admitParticipant', {
74
78
  defaultValue: 'Admit',
75
79
  }), children: _jsx(UserRoundCheck, { className: "size-4" }) })] }, profile.id))) })] })) : null] })] }));
76
80
  }
@@ -75,5 +75,5 @@ export function JamReactionMenu({ onSelect, mobile = false, }) {
75
75
  await syncEmojiPickerSkinTone(skinTone);
76
76
  setShowAllEmojis(true);
77
77
  };
78
- return (_jsx("div", { className: `bg-surface-200 rounded-2xl p-2 ${mobile ? 'w-full' : 'md:w-max'}`, children: showAllEmojis ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "mb-2", children: _jsxs("button", { type: "button", title: t('jams.reactions.backToQuickReactions'), className: "flex items-center gap-1 p-1 text-sm", onClick: () => setShowAllEmojis(false), children: [_jsx(ChevronLeft, { className: "size-4" }), t('jams.reactions.backToQuickReactions')] }) }), _jsx("emoji-picker", { ref: pickerRef })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col gap-y-1 md:flex-row md:flex-nowrap md:items-center md:gap-x-1", children: [_jsx("div", { className: "flex flex-wrap items-center gap-x-1 md:flex-nowrap", children: defaultEmojis.map((emoji) => (_jsx("button", { type: "button", title: emoji, className: "shrink-0 p-2 text-lg", onClick: () => void onSelect(emoji), children: emoji }, emoji))) }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-1 md:flex-nowrap", children: [_jsx("div", { className: "bg-surface-400 mx-1 h-8 w-px shrink-0 self-center max-md:hidden", "aria-hidden": "true" }), recentDisplayEmojis.length > 0 ? (_jsxs(_Fragment, { children: [recentDisplayEmojis.map((emoji) => (_jsx("button", { type: "button", title: emoji, className: "shrink-0 p-2 text-lg", onClick: () => void onSelect(emoji), children: emoji }, emoji))), _jsx("div", { className: "bg-surface-400 mx-1 h-8 w-px shrink-0 self-center", "aria-hidden": "true" })] })) : null, _jsx("button", { type: "button", title: t('jams.reactions.skinToneTitle'), className: `shrink-0 rounded p-2 text-lg ${showSkinToneSelector ? 'bg-surface-400' : ''}`, onClick: () => setShowSkinToneSelector((open) => !open), children: selectedSkinToneEmoji }), _jsx("button", { type: "button", title: t('jams.reactions.allEmojisTitle'), className: "shrink-0 p-2", onClick: () => void openAllEmojis(), children: _jsx(SmilePlus, { className: "size-5" }) })] })] }), showSkinToneSelector ? (_jsx("div", { className: "border-surface-300 mt-2 flex gap-1 border-t pt-2", children: SKIN_TONE_OPTIONS.map((option) => (_jsx("button", { type: "button", title: t('jams.reactions.skinToneTitle'), className: `rounded p-1 text-lg ${skinTone === option.tone ? 'bg-surface-400' : ''}`, onClick: () => void handleSetSkinTone(option.tone), children: option.emoji }, option.tone))) })) : null] })) }));
78
+ return (_jsx("div", { className: `bg-surface-2 rounded-2xl p-2 ${mobile ? 'w-full' : 'md:w-max'}`, children: showAllEmojis ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "mb-2", children: _jsxs("button", { type: "button", title: t('jams.reactions.backToQuickReactions'), className: "flex items-center gap-1 p-1 text-sm", onClick: () => setShowAllEmojis(false), children: [_jsx(ChevronLeft, { className: "size-4" }), t('jams.reactions.backToQuickReactions')] }) }), _jsx("emoji-picker", { ref: pickerRef })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-col gap-y-1 md:flex-row md:flex-nowrap md:items-center md:gap-x-1", children: [_jsx("div", { className: "flex flex-wrap items-center gap-x-1 md:flex-nowrap", children: defaultEmojis.map((emoji) => (_jsx("button", { type: "button", title: emoji, className: "shrink-0 p-2 text-lg", onClick: () => void onSelect(emoji), children: emoji }, emoji))) }), _jsxs("div", { className: "flex flex-wrap items-center gap-x-1 md:flex-nowrap", children: [_jsx("div", { className: "bg-border-2 mx-1 h-8 w-px shrink-0 self-center max-md:hidden", "aria-hidden": "true" }), recentDisplayEmojis.length > 0 ? (_jsxs(_Fragment, { children: [recentDisplayEmojis.map((emoji) => (_jsx("button", { type: "button", title: emoji, className: "rounded-button shrink-0 p-2 text-lg", onClick: () => void onSelect(emoji), children: emoji }, emoji))), _jsx("div", { className: "bg-border-2 mx-1 h-8 w-px shrink-0 self-center", "aria-hidden": "true" })] })) : null, _jsx("button", { type: "button", title: t('jams.reactions.skinToneTitle'), className: `rounded-button shrink-0 p-2 text-lg ${showSkinToneSelector ? 'bg-border-2' : ''}`, onClick: () => setShowSkinToneSelector((open) => !open), children: selectedSkinToneEmoji }), _jsx("button", { type: "button", title: t('jams.reactions.allEmojisTitle'), className: "rounded-button shrink-0 p-2", onClick: () => void openAllEmojis(), children: _jsx(SmilePlus, { className: "size-5" }) })] })] }), showSkinToneSelector ? (_jsx("div", { className: "border-border mt-2 flex gap-1 border-t pt-2", children: SKIN_TONE_OPTIONS.map((option) => (_jsx("button", { type: "button", title: t('jams.reactions.skinToneTitle'), className: `rounded-button p-1 text-lg ${skinTone === option.tone ? 'bg-border-2' : ''}`, onClick: () => void handleSetSkinTone(option.tone), children: option.emoji }, option.tone))) })) : null] })) }));
79
79
  }
@@ -30,5 +30,5 @@ export function JamRequestJoin({ onJoin }) {
30
30
  const [requested, setRequested] = useState(false);
31
31
  return (_jsx("div", { className: "mx-auto flex w-full max-w-md flex-col items-center gap-4 p-4", children: requested ? (_jsxs(_Fragment, { children: [_jsx(JamWaitingRoomListener, { onJoin: onJoin }), _jsx("p", { className: "text-muted-foreground text-center text-sm", children: t('jams.join.waitingForModerator', {
32
32
  defaultValue: 'Waiting for a moderator to admit you…',
33
- }) })] })) : (_jsx(Button, { variant: "variant-filled-primary", action: () => setRequested(true), children: t('jams.join.requestToJoin', { defaultValue: 'Request to join' }) })) }));
33
+ }) })] })) : (_jsx(Button, { variant: "default", action: () => setRequested(true), children: t('jams.join.requestToJoin', { defaultValue: 'Request to join' }) })) }));
34
34
  }