@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.
- package/dist/components/accounts/SignUpLoginModal.js +2 -2
- package/dist/components/configuration/ConfigMenuButton.d.ts +10 -0
- package/dist/components/configuration/ConfigMenuButton.js +12 -0
- package/dist/components/configuration/ConfigurationTree.js +1 -1
- package/dist/components/configuration/index.d.ts +2 -0
- package/dist/components/configuration/index.js +1 -0
- package/dist/components/conversations/ConversationMessageBubble.d.ts +2 -1
- package/dist/components/conversations/ConversationMessageBubble.js +4 -5
- package/dist/components/conversations/CreateNewConversation.js +10 -42
- package/dist/components/conversations/DirectMessagesHeaderActions.js +1 -1
- package/dist/components/conversations/MessageInThread.js +1 -2
- package/dist/components/form/ImageEditModal.js +2 -4
- package/dist/components/form/ImageInput.js +13 -8
- package/dist/components/form/LocationInput.js +1 -1
- package/dist/components/groups/AddGroupMembersButton.d.ts +1 -1
- package/dist/components/groups/AddGroupMembersButton.js +2 -2
- package/dist/components/groups/ChangeGroupRolesModal.js +1 -1
- package/dist/components/groups/ConfirmGroupExitModal.js +2 -2
- package/dist/components/groups/ConfirmMemberRemovalModal.js +1 -1
- package/dist/components/groups/DeleteGroupModal.js +1 -1
- package/dist/components/groups/GroupAvatar.js +4 -4
- package/dist/components/groups/GroupCard.js +3 -3
- package/dist/components/groups/GroupHeader.js +1 -1
- package/dist/components/groups/GroupMembersList.js +2 -3
- package/dist/components/groups/GroupOptionsMenu.js +12 -6
- package/dist/components/groups/JoinGroupButton.js +3 -20
- package/dist/components/jams/CreateNewJam.js +4 -4
- package/dist/components/jams/JamCallParticipant.js +17 -7
- package/dist/components/jams/JamCapacityGate.js +1 -1
- package/dist/components/jams/JamChatDrawer.js +2 -2
- package/dist/components/jams/JamConference.js +1 -1
- package/dist/components/jams/JamContext.d.ts +4 -0
- package/dist/components/jams/JamContext.js +17 -2
- package/dist/components/jams/JamDetailsDrawer.js +1 -1
- package/dist/components/jams/JamDeviceSelectors.d.ts +15 -0
- package/dist/components/jams/JamDeviceSelectors.js +4 -3
- package/dist/components/jams/JamFooter.js +15 -16
- package/dist/components/jams/JamGuestForm.js +2 -2
- package/dist/components/jams/JamLobby.js +9 -19
- package/dist/components/jams/JamObserverShell.js +1 -1
- package/dist/components/jams/JamParticipantConference.js +1 -1
- package/dist/components/jams/JamPeopleDrawer.js +17 -13
- package/dist/components/jams/JamReactionMenu.js +1 -1
- package/dist/components/jams/JamRequestJoin.js +1 -1
- package/dist/components/jams/JamRoom.js +84 -4
- package/dist/components/jams/JamToolbarButton.d.ts +21 -0
- package/dist/components/jams/JamToolbarButton.js +19 -0
- package/dist/components/jams/JamVideoCall.js +8 -3
- package/dist/components/jams/JamVideoLayout.js +16 -5
- package/dist/components/jams/LeaveCloseButton.js +9 -44
- package/dist/components/jams/LiveJamsSection.js +1 -1
- package/dist/components/jams/constants.js +4 -0
- package/dist/components/jams/useParticipantConnection.d.ts +7 -0
- package/dist/components/jams/useParticipantConnection.js +11 -0
- package/dist/components/layout/Auth.js +1 -1
- package/dist/components/layout/Infos.js +2 -2
- package/dist/components/layout/OpenpeepsContextProvider.js +4 -3
- package/dist/components/layout/OpenpeepsThemeProvider.d.ts +3 -4
- package/dist/components/layout/OpenpeepsThemeProvider.js +23 -9
- package/dist/components/layout/Root.js +1 -1
- package/dist/components/markdown/CompiledMarkdown.js +15 -1
- package/dist/components/markdown/classes.d.ts +2 -0
- package/dist/components/markdown/classes.js +2 -0
- package/dist/components/markdown/index.d.ts +1 -1
- package/dist/components/markdown/index.js +1 -1
- package/dist/components/navigation/ContentHeader.js +1 -1
- package/dist/components/navigation/FooterMobile.js +5 -1
- package/dist/components/navigation/HeaderMobile.js +1 -1
- package/dist/components/navigation/MobileMenuItem.js +1 -1
- package/dist/components/navigation/PageHeaderAction.js +1 -1
- package/dist/components/navigation/PlusButton.js +1 -1
- package/dist/components/navigation/SideBar.js +6 -1
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +5 -1
- package/dist/components/navigation/sideBarNavLinkClass.js +1 -1
- package/dist/components/notifications/NotificationHeaderActions.js +2 -2
- package/dist/components/notifications/NotificationWrapper.js +1 -1
- package/dist/components/notifications/NotificationsList.js +3 -3
- package/dist/components/notifications/TypedNotification.js +3 -3
- package/dist/components/post/Feed.js +3 -3
- package/dist/components/post/FeedPost.d.ts +2 -1
- package/dist/components/post/FeedPost.js +11 -6
- package/dist/components/post/FeedPostContent.js +1 -1
- package/dist/components/post/FullPostLayout.js +11 -4
- package/dist/components/post/NewEventButton.js +1 -1
- package/dist/components/post/NewNoteButton.js +1 -1
- package/dist/components/post/PinnedPost.js +1 -1
- package/dist/components/post/ReplyBox.js +1 -1
- package/dist/components/post/feed/events/EventsFeed.js +3 -3
- package/dist/components/post/feed/threaded/ThreadPost.js +1 -1
- package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +3 -1
- package/dist/components/post/feed/threaded/ThreadedFeed.js +3 -3
- package/dist/components/post/pieces/Attachments.js +3 -3
- package/dist/components/post/pieces/EventMenu.js +1 -1
- package/dist/components/post/pieces/EventRsvpButton.js +3 -3
- package/dist/components/post/pieces/FeedPostStats.js +2 -2
- package/dist/components/post/pieces/GalleryModal.js +36 -5
- package/dist/components/post/pieces/PollContent.js +33 -14
- package/dist/components/post/pieces/PostActions.js +6 -45
- package/dist/components/post/pieces/PostInfoHeader.js +1 -1
- package/dist/components/post/pieces/PostMenu.js +35 -9
- package/dist/components/post/pieces/PostReactionHeader.js +1 -1
- package/dist/components/post/pieces/ShareMenu.js +4 -2
- package/dist/components/post/pieces/UnreadPostIndicator.d.ts +5 -3
- package/dist/components/post/pieces/UnreadPostIndicator.js +4 -3
- package/dist/components/post/pieces/modals/DeletePostModal.js +1 -1
- package/dist/components/post/pieces/modals/RepostModal.d.ts +5 -3
- package/dist/components/post/pieces/modals/RepostModal.js +8 -7
- package/dist/components/post/post-form/AttachmentCard.js +2 -2
- package/dist/components/post/post-form/ComposeAttachments.js +1 -1
- package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
- package/dist/components/post/post-form/EditPostModal.js +22 -12
- package/dist/components/post/post-form/EventForm.js +2 -2
- package/dist/components/post/post-form/EventTypeSwitcher.js +1 -1
- package/dist/components/post/post-form/NewPostModal.d.ts +1 -1
- package/dist/components/post/post-form/NewPostModal.js +10 -10
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +2 -2
- package/dist/components/post/post-form/PollComposerFields.d.ts +2 -0
- package/dist/components/post/post-form/PollComposerFields.js +12 -8
- package/dist/components/post/post-form/PostAudienceSelector.js +3 -3
- package/dist/components/post/post-form/PostTypeSwitcher.js +1 -1
- package/dist/components/post/post-form/ReplyModal.js +9 -8
- package/dist/components/post/post-form/VisibilitySelector.js +1 -1
- package/dist/components/post/types/Article.js +2 -1
- package/dist/components/post/types/Event.js +1 -1
- package/dist/components/post/types/Note.js +2 -1
- package/dist/components/post/types/Poll.js +2 -1
- package/dist/components/post/types/event/CardEvent.js +2 -2
- package/dist/components/post/types/event/FullEvent.js +8 -8
- package/dist/components/post/types/event/ProfileEventRelationship.d.ts +1 -1
- package/dist/components/post/types/event/ProfileEventRelationship.js +38 -18
- package/dist/components/preview-link/LocalPreviewLink.js +1 -1
- package/dist/components/preview-link/RemotePreviewLink.js +5 -1
- package/dist/components/profile/Avatar.js +3 -2
- package/dist/components/profile/FollowUnfollowButton.js +2 -2
- package/dist/components/profile/ProfileBadge.js +1 -1
- package/dist/components/profile/ProfileCard.js +1 -1
- package/dist/components/profile/ProfileHeader.js +1 -1
- package/dist/components/profile/ProfilePageAction.js +3 -3
- package/dist/components/profile/ProfilePostsAndReplies.js +3 -1
- package/dist/components/profile/ProfileSelector.js +3 -3
- package/dist/components/profile/ProfilesInput.js +1 -1
- package/dist/components/profile/ReportProfileOrPostModal.js +6 -4
- package/dist/components/server-data/context.d.ts +8 -0
- package/dist/contexts/openpeeps/hooks/admin.d.ts +63 -16774
- package/dist/contexts/openpeeps/hooks/admin.js +34 -14
- package/dist/contexts/openpeeps/hooks/conversations.d.ts +330 -0
- package/dist/contexts/openpeeps/hooks/jams.d.ts +110 -0
- package/dist/contexts/openpeeps/hooks/jams.js +1 -1
- package/dist/contexts/openpeeps/hooks/other.d.ts +8 -0
- package/dist/contexts/openpeeps/hooks/posts.d.ts +933 -53
- package/dist/contexts/openpeeps/hooks/profiles.d.ts +220 -0
- package/dist/contexts/openpeeps/hooks/search.d.ts +330 -0
- package/dist/contexts/openpeeps/index.d.ts +1 -1
- package/dist/contexts/openpeeps/index.js +10 -2
- package/dist/contexts/router/index.d.ts +8 -3
- package/dist/contexts/router/index.js +7 -3
- package/dist/hooks/conversations/useCreateConversation.d.ts +124 -0
- package/dist/hooks/conversations/useCreateConversation.js +56 -0
- package/dist/hooks/groups/useJoinGroup.d.ts +8 -0
- package/dist/hooks/groups/useJoinGroup.js +23 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/jams/useLeaveCloseJam.d.ts +20 -0
- package/dist/hooks/jams/useLeaveCloseJam.js +59 -0
- package/dist/hooks/posts/useFeedPostActions.d.ts +18 -0
- package/dist/hooks/posts/useFeedPostActions.js +51 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/lib/Markdown.d.ts +14 -0
- package/dist/lib/Markdown.js +16 -0
- package/dist/lib/analyticsClicks.d.ts +12 -0
- package/dist/lib/analyticsClicks.js +64 -0
- package/dist/lib/auth.d.ts +8 -0
- package/dist/lib/auth.js +27 -0
- package/dist/lib/canvasUtils.d.ts +6 -0
- package/dist/lib/canvasUtils.js +62 -1
- package/dist/lib/groupCapabilityHelpers.d.ts +1 -1
- package/dist/lib/passwordStrength.d.ts +6 -0
- package/dist/lib/passwordStrength.js +26 -0
- package/dist/lib/postUnread.d.ts +7 -0
- package/dist/lib/postUnread.js +7 -0
- package/dist/lib/postViewCounter.d.ts +1 -1
- package/dist/lib/postViewCounter.js +3 -1
- package/dist/lib/routeHandles.d.ts +2 -0
- package/dist/lib/routeHandles.js +2 -0
- package/dist/lib/svgCover.d.ts +2 -0
- package/dist/lib/svgCover.js +18 -0
- package/dist/navigation/index.d.ts +11 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/menuItems.d.ts +8 -0
- package/dist/navigation/menuItems.js +83 -0
- package/dist/navigation/targets.d.ts +94 -0
- package/dist/navigation/targets.js +12 -0
- package/dist/pages/About.d.ts +1 -0
- package/dist/pages/About.js +19 -0
- package/dist/pages/CodeOfConduct.d.ts +1 -0
- package/dist/pages/CodeOfConduct.js +14 -0
- package/dist/pages/Explore.d.ts +1 -0
- package/dist/pages/Explore.js +132 -0
- package/dist/pages/Home.d.ts +6 -0
- package/dist/pages/Home.js +31 -0
- package/dist/pages/Members.d.ts +1 -0
- package/dist/pages/Members.js +35 -0
- package/dist/pages/NotFound.d.ts +1 -0
- package/dist/pages/NotFound.js +9 -0
- package/dist/pages/Notifications.d.ts +1 -0
- package/dist/pages/Notifications.js +8 -0
- package/dist/pages/PostDetail.d.ts +1 -0
- package/dist/pages/PostDetail.js +27 -0
- package/dist/pages/Profile.d.ts +1 -0
- package/dist/pages/Profile.js +20 -0
- package/dist/pages/Tags.d.ts +1 -0
- package/dist/pages/Tags.js +14 -0
- package/dist/pages/Welcome.d.ts +1 -0
- package/dist/pages/Welcome.js +89 -0
- package/dist/pages/admin/Analytics.d.ts +11 -0
- package/dist/pages/admin/Analytics.js +11 -0
- package/dist/pages/admin/ApiKeys.d.ts +1 -0
- package/dist/pages/admin/ApiKeys.js +141 -0
- package/dist/pages/admin/Backups.d.ts +1 -0
- package/dist/pages/admin/Backups.js +39 -0
- package/dist/pages/admin/ConfigEditor.d.ts +14 -0
- package/dist/pages/admin/ConfigEditor.js +91 -0
- package/dist/pages/admin/Configuration.d.ts +1 -0
- package/dist/pages/admin/Configuration.js +8 -0
- package/dist/pages/admin/ConfigurationCommunity.d.ts +1 -0
- package/dist/pages/admin/ConfigurationCommunity.js +7 -0
- package/dist/pages/admin/ConfigurationCommunityLanguage.d.ts +1 -0
- package/dist/pages/admin/ConfigurationCommunityLanguage.js +71 -0
- package/dist/pages/admin/ConfigurationEmail.d.ts +1 -0
- package/dist/pages/admin/ConfigurationEmail.js +97 -0
- package/dist/pages/admin/ConfigurationI18n.d.ts +1 -0
- package/dist/pages/admin/ConfigurationI18n.js +51 -0
- package/dist/pages/admin/Dashboard.d.ts +1 -0
- package/dist/pages/admin/Dashboard.js +40 -0
- package/dist/pages/admin/Db.d.ts +1 -0
- package/dist/pages/admin/Db.js +238 -0
- package/dist/pages/admin/Diagnostics.d.ts +1 -0
- package/dist/pages/admin/Diagnostics.js +8 -0
- package/dist/pages/admin/DiagnosticsEmail.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsEmail.js +65 -0
- package/dist/pages/admin/DiagnosticsJob.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsJob.js +51 -0
- package/dist/pages/admin/DiagnosticsLogs.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsLogs.js +62 -0
- package/dist/pages/admin/DiagnosticsPerformance.d.ts +1 -0
- package/dist/pages/admin/DiagnosticsPerformance.js +34 -0
- package/dist/pages/admin/GroupMembers.d.ts +1 -0
- package/dist/pages/admin/GroupMembers.js +109 -0
- package/dist/pages/admin/Groups.d.ts +1 -0
- package/dist/pages/admin/Groups.js +61 -0
- package/dist/pages/admin/Invites.d.ts +1 -0
- package/dist/pages/admin/Invites.js +72 -0
- package/dist/pages/admin/Members.d.ts +1 -0
- package/dist/pages/admin/Members.js +49 -0
- package/dist/pages/admin/Moderation.d.ts +1 -0
- package/dist/pages/admin/Moderation.js +62 -0
- package/dist/pages/admin/Reports.d.ts +1 -0
- package/dist/pages/admin/Reports.js +178 -0
- package/dist/pages/admin/analytics/AnalyticsLayout.d.ts +14 -0
- package/dist/pages/admin/analytics/AnalyticsLayout.js +104 -0
- package/dist/pages/admin/analytics/AnalyticsRangeContext.d.ts +9 -0
- package/dist/pages/admin/analytics/AnalyticsRangeContext.js +9 -0
- package/dist/pages/admin/analytics/Content.d.ts +1 -0
- package/dist/pages/admin/analytics/Content.js +117 -0
- package/dist/pages/admin/analytics/Engagement.d.ts +1 -0
- package/dist/pages/admin/analytics/Engagement.js +220 -0
- package/dist/pages/admin/analytics/Groups.d.ts +1 -0
- package/dist/pages/admin/analytics/Groups.js +139 -0
- package/dist/pages/admin/analytics/Members.d.ts +1 -0
- package/dist/pages/admin/analytics/Members.js +96 -0
- package/dist/pages/admin/analytics/Overview.d.ts +1 -0
- package/dist/pages/admin/analytics/Overview.js +165 -0
- package/dist/pages/admin/analytics/ReportSettings.d.ts +1 -0
- package/dist/pages/admin/analytics/ReportSettings.js +62 -0
- package/dist/pages/admin/analytics/analyticsInfo.d.ts +3 -0
- package/dist/pages/admin/analytics/analyticsInfo.js +4 -0
- package/dist/pages/admin/analytics/downloadCsv.d.ts +2 -0
- package/dist/pages/admin/analytics/downloadCsv.js +20 -0
- package/dist/pages/admin/community/CommunityFavicons.d.ts +1 -0
- package/dist/pages/admin/community/CommunityFavicons.js +47 -0
- package/dist/pages/admin/community/CommunityInfo.d.ts +1 -0
- package/dist/pages/admin/community/CommunityInfo.js +35 -0
- package/dist/pages/admin/community/CommunityLinks.d.ts +1 -0
- package/dist/pages/admin/community/CommunityLinks.js +35 -0
- package/dist/pages/admin/community/CommunityMarkdownPage.d.ts +8 -0
- package/dist/pages/admin/community/CommunityMarkdownPage.js +35 -0
- package/dist/pages/admin/community/CommunityProfileFields.d.ts +1 -0
- package/dist/pages/admin/community/CommunityProfileFields.js +50 -0
- package/dist/pages/admin/community/CommunityRoles.d.ts +1 -0
- package/dist/pages/admin/community/CommunityRoles.js +109 -0
- package/dist/pages/admin/community/CommunityTheme.d.ts +1 -0
- package/dist/pages/admin/community/CommunityTheme.js +56 -0
- package/dist/pages/admin/community/useCommunityConfig.d.ts +168 -0
- package/dist/pages/admin/community/useCommunityConfig.js +28 -0
- package/dist/pages/admin/components/AdminCharts.d.ts +22 -0
- package/dist/pages/admin/components/AdminCharts.js +29 -0
- package/dist/pages/admin/components/AdminGroupCard.d.ts +6 -0
- package/dist/pages/admin/components/AdminGroupCard.js +42 -0
- package/dist/pages/admin/components/AdminInviteActions.d.ts +1 -0
- package/dist/pages/admin/components/AdminInviteActions.js +23 -0
- package/dist/pages/admin/components/InviteWithEmailModal.d.ts +3 -0
- package/dist/pages/admin/components/InviteWithEmailModal.js +82 -0
- package/dist/pages/admin/components/InviteWithLinkModal.d.ts +22 -0
- package/dist/pages/admin/components/InviteWithLinkModal.js +98 -0
- package/dist/pages/admin/components/ProfileRowActions.d.ts +5 -0
- package/dist/pages/admin/components/ProfileRowActions.js +131 -0
- package/dist/pages/admin/components/RestoreBackupModal.d.ts +4 -0
- package/dist/pages/admin/components/RestoreBackupModal.js +33 -0
- package/dist/pages/admin/components/RestoreTestBackupModal.d.ts +4 -0
- package/dist/pages/admin/components/RestoreTestBackupModal.js +36 -0
- package/dist/pages/articles/Edit.d.ts +1 -0
- package/dist/pages/articles/Edit.js +60 -0
- package/dist/pages/articles/Index.d.ts +1 -0
- package/dist/pages/articles/Index.js +18 -0
- package/dist/pages/articles/New.d.ts +1 -0
- package/dist/pages/articles/New.js +48 -0
- package/dist/pages/auth/Closed.d.ts +1 -0
- package/dist/pages/auth/Closed.js +14 -0
- package/dist/pages/auth/Login.d.ts +1 -0
- package/dist/pages/auth/Login.js +74 -0
- package/dist/pages/auth/OidcCallback.d.ts +5 -0
- package/dist/pages/auth/OidcCallback.js +31 -0
- package/dist/pages/auth/OidcPending.d.ts +5 -0
- package/dist/pages/auth/OidcPending.js +39 -0
- package/dist/pages/auth/Register.d.ts +4 -0
- package/dist/pages/auth/Register.js +124 -0
- package/dist/pages/auth/RegisterInvitation.d.ts +1 -0
- package/dist/pages/auth/RegisterInvitation.js +5 -0
- package/dist/pages/auth/RequestResetPassword.d.ts +1 -0
- package/dist/pages/auth/RequestResetPassword.js +50 -0
- package/dist/pages/auth/ResetPassword.d.ts +1 -0
- package/dist/pages/auth/ResetPassword.js +40 -0
- package/dist/pages/auth/SsoCallback.d.ts +1 -0
- package/dist/pages/auth/SsoCallback.js +34 -0
- package/dist/pages/auth/ValidateEmail.d.ts +6 -0
- package/dist/pages/auth/ValidateEmail.js +64 -0
- package/dist/pages/conversations/Index.d.ts +1 -0
- package/dist/pages/conversations/Index.js +58 -0
- package/dist/pages/conversations/Info.d.ts +1 -0
- package/dist/pages/conversations/Info.js +26 -0
- package/dist/pages/conversations/New.d.ts +1 -0
- package/dist/pages/conversations/New.js +8 -0
- package/dist/pages/conversations/Show.d.ts +1 -0
- package/dist/pages/conversations/Show.js +100 -0
- package/dist/pages/events/Edit.d.ts +1 -0
- package/dist/pages/events/Edit.js +69 -0
- package/dist/pages/events/Index.d.ts +1 -0
- package/dist/pages/events/Index.js +23 -0
- package/dist/pages/events/My.d.ts +1 -0
- package/dist/pages/events/My.js +24 -0
- package/dist/pages/events/New.d.ts +1 -0
- package/dist/pages/events/New.js +66 -0
- package/dist/pages/feeds/Bookmarks.d.ts +1 -0
- package/dist/pages/feeds/Bookmarks.js +10 -0
- package/dist/pages/feeds/Local.d.ts +1 -0
- package/dist/pages/feeds/Local.js +14 -0
- package/dist/pages/feeds/My.d.ts +1 -0
- package/dist/pages/feeds/My.js +12 -0
- package/dist/pages/groups/Edit.d.ts +1 -0
- package/dist/pages/groups/Edit.js +57 -0
- package/dist/pages/groups/Index.d.ts +1 -0
- package/dist/pages/groups/Index.js +50 -0
- package/dist/pages/groups/Info.d.ts +1 -0
- package/dist/pages/groups/Info.js +21 -0
- package/dist/pages/groups/Members.d.ts +1 -0
- package/dist/pages/groups/Members.js +28 -0
- package/dist/pages/groups/New.d.ts +1 -0
- package/dist/pages/groups/New.js +68 -0
- package/dist/pages/groups/Show.d.ts +1 -0
- package/dist/pages/groups/Show.js +64 -0
- package/dist/pages/index.d.ts +94 -0
- package/dist/pages/index.js +94 -0
- package/dist/pages/jams/Event.d.ts +8 -0
- package/dist/pages/jams/Event.js +57 -0
- package/dist/pages/jams/Index.d.ts +6 -0
- package/dist/pages/jams/Index.js +44 -0
- package/dist/pages/payment/Success.d.ts +1 -0
- package/dist/pages/payment/Success.js +30 -0
- package/dist/pages/plugins/Index.d.ts +1 -0
- package/dist/pages/plugins/Index.js +69 -0
- package/dist/pages/profile/Followers.d.ts +6 -0
- package/dist/pages/profile/Followers.js +28 -0
- package/dist/pages/settings/AccessTokens.d.ts +1 -0
- package/dist/pages/settings/AccessTokens.js +149 -0
- package/dist/pages/settings/Account.d.ts +1 -0
- package/dist/pages/settings/Account.js +81 -0
- package/dist/pages/settings/Billing.d.ts +1 -0
- package/dist/pages/settings/Billing.js +82 -0
- package/dist/pages/settings/Index.d.ts +1 -0
- package/dist/pages/settings/Index.js +13 -0
- package/dist/pages/settings/Language.d.ts +1 -0
- package/dist/pages/settings/Language.js +54 -0
- package/dist/pages/settings/NotificationPreferences.d.ts +1 -0
- package/dist/pages/settings/NotificationPreferences.js +180 -0
- package/dist/pages/settings/Notifications.d.ts +1 -0
- package/dist/pages/settings/Notifications.js +10 -0
- package/dist/pages/settings/PublicProfile.d.ts +1 -0
- package/dist/pages/settings/PublicProfile.js +135 -0
- package/dist/pages/settings/PushEnabledDevices.d.ts +1 -0
- package/dist/pages/settings/PushEnabledDevices.js +67 -0
- package/dist/pages/settings/Theme.d.ts +1 -0
- package/dist/pages/settings/Theme.js +37 -0
- package/dist/pages/test/Error.d.ts +1 -0
- package/dist/pages/test/Error.js +10 -0
- package/dist/pages/test/Markdown.d.ts +1 -0
- package/dist/pages/test/Markdown.js +32 -0
- package/dist/pwa/InstallPrompt.js +1 -1
- package/dist/pwa/NotificationPermissionPrompt.js +2 -2
- package/dist/pwa/UpdatePrompt.js +1 -1
- package/dist/react-native.d.ts +1 -0
- package/dist/react-native.js +1 -0
- package/dist/session/useSessionEvents.d.ts +3 -0
- package/dist/session/useSessionEvents.js +64 -0
- package/dist/stores/newPosts.d.ts +8 -8
- package/package.json +14 -9
- package/dist/components/jams/useJamLiveKitTheme.d.ts +0 -3
- 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
|
|
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-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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-
|
|
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
|
-
|
|
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
|
|
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
|
|
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(
|
|
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,
|
|
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,
|
|
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'),
|
|
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(
|
|
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(
|
|
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
|
|
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: "
|
|
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(
|
|
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
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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(
|
|
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-
|
|
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: "
|
|
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
|
-
|
|
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-
|
|
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
|
|
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
|
-
}),
|
|
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-
|
|
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-
|
|
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
|
|
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: "
|
|
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-
|
|
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: "
|
|
33
|
+
}) })] })) : (_jsx(Button, { variant: "default", action: () => setRequested(true), children: t('jams.join.requestToJoin', { defaultValue: 'Request to join' }) })) }));
|
|
34
34
|
}
|