@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,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from 'react';
2
+ import { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import '@livekit/components-styles';
4
4
  import './livekit-light-theme.css';
5
5
  import { jamFromEvent, getJamCapacityJoinBlock } from '@openpeepshq/common/lib';
@@ -26,7 +26,7 @@ export function JamRoom({ jamPost, observer = false }) {
26
26
  }
27
27
  function JamRoomInner() {
28
28
  const t = useT();
29
- const { jamPost, jam, jamEvent, observer } = useJamContext();
29
+ const { jamPost, jam, jamEvent, observer, consumeIntentionalLeave } = useJamContext();
30
30
  const { openpeepsApi, client } = useOpenpeeps();
31
31
  const serverInfo = useServerInfo();
32
32
  const me = useCurrentProfile();
@@ -35,13 +35,25 @@ function JamRoomInner() {
35
35
  const rsvpToEvent = openpeepsApi.rsvpToEventAction({ id: jamPost.id });
36
36
  const post = postQuery.data ?? jamPost;
37
37
  const [connection, setConnection] = useState(undefined);
38
+ const [reconnectPrefs, setReconnectPrefs] = useState(undefined);
39
+ const [reconnectError, setReconnectError] = useState();
38
40
  const [observerError, setObserverError] = useState();
39
41
  const [autoRsvpError, setAutoRsvpError] = useState();
40
42
  const autoRsvpStarted = useRef(false);
43
+ const reconnectInFlight = useRef(false);
44
+ const mounted = useRef(true);
41
45
  const livekitUrl = serverInfo.jams.livekit.url;
42
46
  const isModerator = !!me && (jam?.moderators.includes(me.id) ?? false);
43
47
  const jamActive = !!jamStateQuery.data?.active;
48
+ useEffect(() => {
49
+ mounted.current = true;
50
+ return () => {
51
+ mounted.current = false;
52
+ };
53
+ }, []);
44
54
  const handleJoin = ({ token, livekitUrl: url, choices, }) => {
55
+ setReconnectPrefs(undefined);
56
+ setReconnectError(undefined);
45
57
  setConnection({
46
58
  token,
47
59
  livekitUrl: url ?? livekitUrl,
@@ -49,6 +61,69 @@ function JamRoomInner() {
49
61
  video: choices?.videoEnabled ?? true,
50
62
  });
51
63
  };
64
+ const tryReconnect = useCallback(async (prefs) => {
65
+ if (reconnectInFlight.current || !mounted.current)
66
+ return;
67
+ reconnectInFlight.current = true;
68
+ setReconnectError(undefined);
69
+ try {
70
+ const res = await client.jams.token({
71
+ pathParameters: { id: jamPost.id },
72
+ });
73
+ if (!mounted.current)
74
+ return;
75
+ if ('error' in res) {
76
+ // Not admitted / jam closed — fall back to the normal gate UI.
77
+ setReconnectPrefs(undefined);
78
+ return;
79
+ }
80
+ setConnection({
81
+ token: res.data.token,
82
+ livekitUrl: res.data.livekitUrl ?? livekitUrl,
83
+ audio: prefs.audio,
84
+ video: prefs.video,
85
+ });
86
+ setReconnectPrefs(undefined);
87
+ }
88
+ catch (err) {
89
+ if (!mounted.current)
90
+ return;
91
+ setReconnectError(apiErrorMessage(err, t, t('jams.lobby.tokenError', {
92
+ defaultValue: 'Failed to get jam token',
93
+ })));
94
+ }
95
+ finally {
96
+ reconnectInFlight.current = false;
97
+ }
98
+ }, [client, jamPost.id, livekitUrl, t]);
99
+ const handleDisconnected = useCallback(() => {
100
+ if (consumeIntentionalLeave()) {
101
+ setConnection(undefined);
102
+ setReconnectPrefs(undefined);
103
+ setReconnectError(undefined);
104
+ return;
105
+ }
106
+ setConnection((current) => {
107
+ if (!current)
108
+ return undefined;
109
+ const prefs = { audio: current.audio, video: current.video };
110
+ setReconnectPrefs(prefs);
111
+ queueMicrotask(() => void tryReconnect(prefs));
112
+ return undefined;
113
+ });
114
+ }, [consumeIntentionalLeave, tryReconnect]);
115
+ // Retry when the page becomes visible again (mobile idle / tab freeze).
116
+ useEffect(() => {
117
+ if (!reconnectPrefs)
118
+ return;
119
+ const onVisibility = () => {
120
+ if (document.visibilityState === 'visible') {
121
+ void tryReconnect(reconnectPrefs);
122
+ }
123
+ };
124
+ document.addEventListener('visibilitychange', onVisibility);
125
+ return () => document.removeEventListener('visibilitychange', onVisibility);
126
+ }, [reconnectPrefs, tryReconnect]);
52
127
  const capacityBlock = (() => {
53
128
  if (!me) {
54
129
  const eventData = post.data?.type === 'event' ? post.data : undefined;
@@ -127,7 +202,12 @@ function JamRoomInner() {
127
202
  };
128
203
  }, [shouldAutoRsvp, postQuery, rsvpToEvent, t]);
129
204
  if (connection) {
130
- return (_jsx(JamVideoCall, { token: connection.token, serverUrl: connection.livekitUrl, audio: connection.audio, video: connection.video, onDisconnected: () => setConnection(undefined) }));
205
+ return (_jsx(JamVideoCall, { token: connection.token, serverUrl: connection.livekitUrl, audio: connection.audio, video: connection.video, onDisconnected: handleDisconnected }));
206
+ }
207
+ if (reconnectPrefs) {
208
+ return (_jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center gap-2 p-4", children: [_jsx("span", { className: "text-center text-lg", children: t('jams.room.reconnecting', {
209
+ defaultValue: 'Reconnecting to the jam…',
210
+ }) }), reconnectError ? (_jsx("span", { className: "text-destructive text-center text-sm", children: reconnectError })) : null] }));
131
211
  }
132
212
  if (observer) {
133
213
  return (_jsx("div", { className: "flex h-full w-full items-center justify-center", children: observerError ? (_jsx("span", { className: "text-destructive text-center text-sm", children: observerError })) : (_jsx("span", { className: "text-center text-lg", children: t('jams.room.observerConnecting', {
@@ -150,7 +230,7 @@ function JamRoomInner() {
150
230
  if (canRequestJoin) {
151
231
  return _jsx(JamRequestJoin, { onJoin: handleJoin });
152
232
  }
153
- return (_jsx("div", { className: "mx-auto flex h-full w-full items-center justify-center p-4", children: _jsxs("div", { className: "space-y-5 text-center", children: [_jsx("h3", { className: "text-lg", children: jamEvent.name }), _jsxs("div", { className: "bg-surface-100 flex w-full flex-col items-center justify-center space-y-3 rounded border p-4", children: [_jsx("span", { children: t('jams.room.jamNotActive', {
233
+ return (_jsx("div", { className: "mx-auto flex h-full w-full items-center justify-center p-4", children: _jsxs("div", { className: "space-y-5 text-center", children: [_jsx("h3", { className: "text-lg", children: jamEvent.name }), _jsxs("div", { className: "bg-surface flex w-full flex-col items-center justify-center space-y-3 rounded border p-4", children: [_jsx("span", { children: t('jams.room.jamNotActive', {
154
234
  defaultValue: 'This jam is not active right now.',
155
235
  }) }), me ? (_jsx("a", { href: "/jams", className: "bg-primary text-primary-foreground rounded px-4 py-2 text-sm", children: t('jams.discover.checkOtherJams', {
156
236
  defaultValue: 'Check other jams',
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ export type JamToolbarTone = 'default' | 'active' | 'danger';
3
+ export interface JamToolbarButtonProps {
4
+ title: string;
5
+ /** `active` tints the control, `danger` marks a muted / destructive state. */
6
+ tone?: JamToolbarTone;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ action: () => void;
10
+ children?: ReactNode;
11
+ /** When set, a chevron attached to the button opens these items as a drop-up. */
12
+ menuChildren?: ReactNode;
13
+ menuTitle?: string;
14
+ menuWidth?: string;
15
+ }
16
+ /**
17
+ * Circular control used across the jam toolbars, optionally paired with a
18
+ * drop-up menu (mic / camera / speaker device pickers). Sits on the surface
19
+ * colour so it keeps the default foreground in both light and dark themes.
20
+ */
21
+ export declare const JamToolbarButton: ({ title, tone, disabled, className, action, children, menuChildren, menuTitle, menuWidth, }: JamToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronUp } from 'lucide-react';
3
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, cn, } from '@openpeepshq/react-ui';
4
+ const toneClasses = {
5
+ default: 'bg-surface text-foreground hover:bg-surface-2',
6
+ active: 'bg-primary/15 text-primary hover:bg-primary/25',
7
+ danger: 'bg-destructive text-destructive-foreground hover:opacity-90',
8
+ };
9
+ /**
10
+ * Circular control used across the jam toolbars, optionally paired with a
11
+ * drop-up menu (mic / camera / speaker device pickers). Sits on the surface
12
+ * colour so it keeps the default foreground in both light and dark themes.
13
+ */
14
+ export const JamToolbarButton = ({ title, tone = 'default', disabled = false, className, action, children, menuChildren, menuTitle, menuWidth, }) => {
15
+ const button = (_jsx("button", { type: "button", title: title, disabled: disabled, onClick: action, className: cn('relative flex size-10 shrink-0 items-center justify-center rounded-full p-2 transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0', toneClasses[tone], !menuChildren && className), children: children }));
16
+ if (!menuChildren)
17
+ return button;
18
+ return (_jsxs("div", { className: cn('bg-surface flex items-center rounded-full backdrop-blur', className), children: [button, _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", title: menuTitle, className: "text-foreground hover:bg-surface-2 -ml-1 flex h-10 items-center justify-center rounded-r-full pl-0.5 pr-1.5 transition-colors", children: _jsx(ChevronUp, { size: 20 }) }) }), _jsx(DropdownMenuContent, { side: "top", align: "start", className: cn('flex max-h-[60vh] flex-col items-start overflow-y-auto p-2 text-left', menuWidth ?? 'w-56'), children: menuChildren })] })] }));
19
+ };
@@ -1,10 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { LiveKitRoom } from '@livekit/components-react';
4
+ import { getTheme } from '@openpeepshq/common/lib';
4
5
  import { defaultRoomOptions } from './constants.js';
5
6
  import { useJamContext } from './JamContext.js';
6
7
  import { JamConference } from './JamConference.js';
7
- import { useJamLiveKitTheme } from './useJamLiveKitTheme.js';
8
+ import { useCurrentProfileSettings } from '../layout/IdentityContext.js';
9
+ import { useServerInfo } from '../server-data/context.js';
8
10
  /**
9
11
  * Connects to LiveKit and renders {@link JamConference} — LiveKit layout
10
12
  * primitives plus OpenPeeps persisted chat, reaction overlays, moderator
@@ -12,7 +14,10 @@ import { useJamLiveKitTheme } from './useJamLiveKitTheme.js';
12
14
  */
13
15
  export function JamVideoCall({ token, serverUrl, audio = true, video = true, onDisconnected, }) {
14
16
  const { jam } = useJamContext();
15
- const lkTheme = useJamLiveKitTheme();
17
+ const serverInfo = useServerInfo();
18
+ const profileSettings = useCurrentProfileSettings();
19
+ const userTheme = getTheme(serverInfo.communityConfig, profileSettings);
20
+ const lkTheme = userTheme.dark ? 'default' : 'light';
16
21
  const roomOptions = useMemo(() => defaultRoomOptions[jam.type] ?? defaultRoomOptions['video-call'], [jam.type]);
17
- return (_jsx(LiveKitRoom, { serverUrl: serverUrl, token: token, audio: audio, video: video, options: roomOptions, "data-lk-theme": lkTheme, style: { height: '100vh', width: '100vw' }, onDisconnected: onDisconnected, children: _jsx(JamConference, {}) }));
22
+ return (_jsx(LiveKitRoom, { serverUrl: serverUrl, token: token, audio: audio, video: video, options: roomOptions, "data-lk-theme": lkTheme, style: { height: '100dvh', width: '100vw' }, onDisconnected: onDisconnected, children: _jsx(JamConference, {}) }));
18
23
  }
@@ -10,7 +10,7 @@ import { JamCallParticipant } from './JamCallParticipant.js';
10
10
  import { parseParticipantMetadata } from './jamEventActions.js';
11
11
  /** Responsive grid for 1 (observer) or 3+ participants (Svelte `Default`). */
12
12
  function DefaultGrid({ cameraTracks, }) {
13
- return (_jsx("div", { className: "mb-16 grid h-full w-full auto-rows-min grid-cols-2 place-items-center content-start justify-items-center gap-2 overflow-auto p-2 md:mb-32 md:flex md:flex-grow md:flex-wrap md:content-center md:items-center md:justify-center", children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-40 md:size-52" }, track.participant.identity))) }));
13
+ return (_jsx("div", { className: "grid h-full w-full auto-rows-min grid-cols-2 place-items-center content-start justify-items-center gap-2 overflow-auto p-2 md:mb-32 md:flex md:flex-grow md:flex-wrap md:content-center md:items-center md:justify-center", children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-40 md:size-52" }, track.participant.identity))) }));
14
14
  }
15
15
  /** Single local participant filling the view (Svelte `Alone`). */
16
16
  function AloneLayout({ track }) {
@@ -19,7 +19,7 @@ function AloneLayout({ track }) {
19
19
  /** Remote full-screen with the local participant as a picture-in-picture tile
20
20
  * (Svelte `OneOnOne`). */
21
21
  function OneOnOneLayout({ local, remote, }) {
22
- return (_jsxs("div", { className: "relative size-full p-2", children: [_jsx(JamCallParticipant, { trackRef: remote, size: "size-full" }), _jsx("div", { className: "absolute bottom-12 right-12 mb-8 size-32 md:size-56", children: _jsx(JamCallParticipant, { trackRef: local, size: "size-full" }) })] }));
22
+ return (_jsxs("div", { className: "relative size-full p-2", children: [_jsx(JamCallParticipant, { trackRef: remote, size: "size-full" }), _jsx("div", { className: "absolute bottom-4 right-4 size-32 md:size-56", children: _jsx(JamCallParticipant, { trackRef: local, size: "size-full" }) })] }));
23
23
  }
24
24
  /** Presented screen plus a strip of participant tiles (Svelte `ScreenSharing`). */
25
25
  function ScreenSharingLayout({ cameraTracks, screenShareTrack, }) {
@@ -29,9 +29,12 @@ function ScreenSharingLayout({ cameraTracks, screenShareTrack, }) {
29
29
  const participant = screenShareTrack.participant;
30
30
  const profile = parseParticipantMetadata(participant.metadata).profile;
31
31
  const isLocal = participant.isLocal;
32
+ const canFullscreen = typeof document !== 'undefined' &&
33
+ typeof document.documentElement.requestFullscreen === 'function' &&
34
+ document.fullscreenEnabled;
32
35
  const toggleFullscreen = () => {
33
36
  const el = containerRef.current;
34
- if (!el)
37
+ if (!el || !canFullscreen)
35
38
  return;
36
39
  if (document.fullscreenElement) {
37
40
  void document.exitFullscreen().catch(() => undefined);
@@ -40,9 +43,17 @@ function ScreenSharingLayout({ cameraTracks, screenShareTrack, }) {
40
43
  void el.requestFullscreen().catch(() => undefined);
41
44
  }
42
45
  };
43
- return (_jsxs("div", { className: "flex h-auto w-full flex-col justify-center gap-2 p-2 md:h-full md:flex-row", children: [_jsxs("div", { className: "flex flex-1 flex-col gap-2 md:size-full", children: [_jsx("div", { className: "flex w-full items-center justify-between", children: isLocal ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-x-2", children: [_jsx(ScreenShare, { className: "size-5" }), profileName(profile), " ", t('jams.screenShare.youPresenting')] }), _jsx(Button, { variant: "variant-ringed-secondary", title: t('jams.screenShare.stopTitle'), action: () => void room.localParticipant
46
+ const participantStripClass = [
47
+ 'flex w-full flex-shrink-0 flex-row flex-wrap content-start',
48
+ 'justify-center gap-1 overflow-y-auto',
49
+ 'max-md:landscape:h-full max-md:landscape:w-28',
50
+ 'max-md:landscape:flex-col max-md:landscape:flex-nowrap',
51
+ 'md:my-4 md:h-full',
52
+ cameraTracks.length > 7 ? 'md:w-56' : 'md:w-28',
53
+ ].join(' ');
54
+ return (_jsxs("div", { className: "flex h-full min-h-0 w-full flex-col gap-2 md:flex-row max-md:landscape:flex-row", children: [_jsxs("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col gap-2", children: [_jsx("div", { className: "flex w-full flex-shrink-0 items-center justify-between", children: isLocal ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-x-2", children: [_jsx(ScreenShare, { className: "size-5" }), profileName(profile), " ", t('jams.screenShare.youPresenting')] }), _jsx(Button, { variant: "outline", title: t('jams.screenShare.stopTitle'), action: () => void room.localParticipant
44
55
  .setScreenShareEnabled(false)
45
- .catch(() => undefined), children: t('jams.screenShare.stopSharing') })] })) : (_jsxs("div", { className: "flex items-center gap-x-2 py-2", children: [_jsx(AvatarWithName, { profile: profile }), t('jams.screenShare.presenting')] })) }), _jsx("div", { ref: containerRef, className: "relative w-full flex-1 overflow-hidden rounded-xl border md:p-0", children: isTrackReference(screenShareTrack) ? (_jsxs(_Fragment, { children: [_jsx(VideoTrack, { trackRef: screenShareTrack, className: "h-full w-full object-contain object-center" }), _jsx("button", { type: "button", title: t('jams.screenShare.startStopTitle'), className: "bg-surface-900/60 text-on-primary-token hover:bg-surface-900/80 absolute bottom-3 right-3 rounded-full p-2 transition-colors", onClick: toggleFullscreen, children: _jsx(Maximize2, { className: "size-5" }) })] })) : null })] }), _jsx("div", { className: `flex w-full flex-row flex-wrap content-start justify-center gap-1 overflow-y-auto md:my-4 md:h-full ${cameraTracks.length > 7 ? 'md:w-56' : 'md:w-28'}`, children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-24 flex-shrink-0", compact: true }, track.participant.identity))) })] }));
56
+ .catch(() => undefined), children: t('jams.screenShare.stopSharing') })] })) : (_jsxs("div", { className: "flex items-center gap-x-2 py-1 landscape:py-0", children: [_jsx(AvatarWithName, { profile: profile }), t('jams.screenShare.presenting')] })) }), _jsx("div", { ref: containerRef, className: "relative min-h-0 w-full min-w-0 flex-1 overflow-hidden rounded-xl border", children: isTrackReference(screenShareTrack) ? (_jsxs(_Fragment, { children: [_jsx(VideoTrack, { trackRef: screenShareTrack, className: "absolute inset-0 h-full w-full object-contain object-center" }), canFullscreen ? (_jsx("button", { type: "button", title: t('jams.screenShare.startStopTitle'), className: "bg-foreground/60 text-on-primary-token hover:bg-foreground/80 absolute bottom-3 right-3 rounded-full p-2 transition-colors", onClick: toggleFullscreen, children: _jsx(Maximize2, { className: "size-5" }) })) : null] })) : null })] }), _jsx("div", { className: participantStripClass, children: cameraTracks.map((track) => (_jsx(JamCallParticipant, { trackRef: track, size: "size-24 flex-shrink-0", compact: true }, track.participant.identity))) })] }));
46
57
  }
47
58
  /**
48
59
  * Picks the in-call layout to match the Svelte `VideoCall` mode selection:
@@ -1,11 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
2
  import { useRoomContext } from '@livekit/components-react';
4
3
  import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, } from '@openpeepshq/react-ui';
5
- import { useNavigate } from '../../contexts/router/index.js';
6
- import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
7
4
  import { useT } from '../../i18n/index.js';
8
- import { useCurrentProfile } from '../layout/IdentityContext.js';
5
+ import { useLeaveCloseJam } from '../../hooks/jams/useLeaveCloseJam.js';
9
6
  import { useJamContext } from './JamContext.js';
10
7
  /**
11
8
  * Leave / close control mirroring the Svelte `LeaveCloseButton`. Moderators are
@@ -15,44 +12,12 @@ import { useJamContext } from './JamContext.js';
15
12
  export const LeaveCloseButton = () => {
16
13
  const t = useT();
17
14
  const room = useRoomContext();
18
- const navigate = useNavigate();
19
- const me = useCurrentProfile();
20
- const { jam, jamPost } = useJamContext();
21
- const { openpeepsApi } = useOpenpeeps();
22
- const closeJam = openpeepsApi.closeJamAction({ id: jamPost.id });
23
- const isModerator = !!me && jam.moderators.includes(me.id);
24
- const [busy, setBusy] = useState(false);
25
- const [confirmOpen, setConfirmOpen] = useState(false);
26
- const leave = async () => {
27
- await room.disconnect();
28
- navigate('/jams');
29
- };
30
- const handleLeave = async () => {
31
- setBusy(true);
32
- try {
33
- await leave();
34
- }
35
- finally {
36
- setBusy(false);
37
- }
38
- };
39
- const handleClose = async () => {
40
- setBusy(true);
41
- try {
42
- await closeJam();
43
- navigate('/jams');
44
- }
45
- finally {
46
- setBusy(false);
47
- }
48
- };
49
- const handleClick = () => {
50
- if (isModerator) {
51
- setConfirmOpen(true);
52
- }
53
- else {
54
- void handleLeave();
55
- }
56
- };
57
- return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "variant-filled-error", className: "rounded-full", title: t('jams.exit.confirm'), disabled: busy, action: handleClick, children: t('jams.exit.confirm') }), _jsx(Dialog, { open: confirmOpen, onOpenChange: (open) => !open && setConfirmOpen(false), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('jams.exit.title') }) }), _jsx("p", { className: "px-1 text-sm", children: t('jams.exit.closeOrExit.description') }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-error", disabled: busy, action: () => void handleClose(), children: t('jams.close.confirm') }), _jsx(Button, { variant: "variant-filled-error", disabled: busy, action: () => void handleLeave(), children: t('jams.exit.confirm') })] })] }) })] }));
15
+ const { jam, jamPost, markIntentionalLeave } = useJamContext();
16
+ const { busy, confirmOpen, setConfirmOpen, handleClick, handleLeave, handleClose, } = useLeaveCloseJam({
17
+ jamPostId: jamPost.id,
18
+ moderatorIds: jam.moderators,
19
+ disconnect: () => room.disconnect(),
20
+ markIntentionalLeave,
21
+ });
22
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "destructive", title: t('jams.exit.confirm'), disabled: busy, action: handleClick, children: t('jams.exit.confirm') }), _jsx(Dialog, { open: confirmOpen, onOpenChange: (open) => !open && setConfirmOpen(false), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('jams.exit.title') }) }), _jsx("p", { className: "px-1 text-sm", children: t('jams.exit.closeOrExit.description') }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", disabled: busy, action: () => void handleClose(), children: t('jams.close.confirm') }), _jsx(Button, { variant: "destructive", disabled: busy, action: () => void handleLeave(), children: t('jams.exit.confirm') })] })] }) })] }));
58
23
  };
@@ -10,7 +10,7 @@ export function LiveJamsSection() {
10
10
  const { openpeepsApi } = useOpenpeeps();
11
11
  const liveJamsQuery = openpeepsApi.useJams();
12
12
  const [open, setOpen] = useState(true);
13
- return (_jsxs("section", { className: "mb-8", children: [_jsxs("button", { type: "button", className: "mb-3 flex items-center gap-3 px-1", onClick: () => setOpen((value) => !value), children: [open ? (_jsx(ChevronDown, { className: "size-5" })) : (_jsx(ChevronRight, { className: "size-5" })), _jsx("h2", { className: "text-lg font-semibold", children: t('jams.liveJams', { defaultValue: 'Live jams' }) })] }), open ? (_jsx(AccessDeniedLoader, { queries: [liveJamsQuery], children: (liveJamsQuery.data ?? []).length ? (_jsx("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2 md:gap-4", children: (liveJamsQuery.data ?? []).map((jam) => (_jsx(CardEvent, { post: jam }, jam.id))) })) : (_jsxs("div", { className: "flex h-72 w-full flex-col items-center justify-center gap-y-6", children: [_jsx(PhoneOff, { size: 60, className: "text-muted-foreground" }), _jsx("p", { children: t('jams.noLiveJams', {
13
+ return (_jsxs("section", { className: "mb-8", children: [_jsxs("button", { type: "button", className: "mb-3 flex items-center gap-3 px-1", onClick: () => setOpen((value) => !value), children: [open ? (_jsx(ChevronDown, { className: "size-5" })) : (_jsx(ChevronRight, { className: "size-5" })), _jsx("h2", { className: "text-lg font-semibold", children: t('jams.liveJams', { defaultValue: 'Live jams' }) })] }), open ? (_jsx(AccessDeniedLoader, { queries: [liveJamsQuery], children: (liveJamsQuery.data ?? []).length ? (_jsx("div", { role: "feed", className: "grid grid-cols-1 gap-2 md:grid-cols-2 md:gap-4", children: (liveJamsQuery.data ?? []).map((jam) => (_jsx(CardEvent, { post: jam }, jam.id))) })) : (_jsxs("div", { className: "flex h-72 w-full flex-col items-center justify-center gap-y-6", children: [_jsx(PhoneOff, { size: 60, className: "text-muted-foreground" }), _jsx("p", { children: t('jams.noLiveJams', {
14
14
  defaultValue: 'No live jams right now',
15
15
  }) })] })) })) : null] }));
16
16
  }
@@ -7,6 +7,10 @@ export const defaultRoomOptions = {
7
7
  'video-call': {
8
8
  adaptiveStream: true,
9
9
  dynacast: true,
10
+ // Prefer reconnect over tearing down the session when the tab is
11
+ // backgrounded. livekit-client still disconnects on `freeze`; JamRoom
12
+ // re-tokens and rejoins when the page becomes visible again.
13
+ disconnectOnPageLeave: false,
10
14
  publishDefaults: {
11
15
  simulcast: true,
12
16
  videoSimulcastLayers: [VideoPresets.h90, VideoPresets.h216],
@@ -0,0 +1,7 @@
1
+ import type { Participant } from 'livekit-client';
2
+ /**
3
+ * True while the SFU reports a participant as unreachable. LiveKit flags this
4
+ * well before `ParticipantDisconnected` fires, so idle mobile devices (whose OS
5
+ * suspends the media pipeline) stop looking active to everyone else.
6
+ */
7
+ export declare const useConnectionLost: (participant: Participant) => boolean;
@@ -0,0 +1,11 @@
1
+ import { useConnectionQualityIndicator } from '@livekit/components-react';
2
+ import { ConnectionQuality } from 'livekit-client';
3
+ /**
4
+ * True while the SFU reports a participant as unreachable. LiveKit flags this
5
+ * well before `ParticipantDisconnected` fires, so idle mobile devices (whose OS
6
+ * suspends the media pipeline) stop looking active to everyone else.
7
+ */
8
+ export const useConnectionLost = (participant) => {
9
+ const { quality } = useConnectionQualityIndicator({ participant });
10
+ return quality === ConnectionQuality.Lost;
11
+ };
@@ -78,5 +78,5 @@ export function AuthLayout({ description, children, noRedirect = false, navigate
78
78
  paymentQuery?.isSuccess,
79
79
  paymentQuery?.data,
80
80
  ]);
81
- return (_jsxs("div", { className: "h-screen w-full overflow-hidden md:flex md:h-full", children: [_jsx("div", { className: "flex-1", children: userTheme.backgroundAuth && (_jsx("img", { src: userTheme.backgroundAuth, alt: "Authentication background", className: "hidden h-full w-full object-cover md:block" })) }), _jsx("div", { className: "bg-card flex h-full w-full flex-1 justify-center overflow-y-auto md:h-auto", children: _jsxs("div", { className: "mx-auto h-fit space-y-4 p-4 md:mx-10 md:w-[60%]", children: [userTheme.logoSmall && (_jsx("img", { src: userTheme.logoSmall, alt: "logo", className: "mb-6 h-6 md:h-10" })), description ?? (_jsx("p", { className: "text-sm md:text-lg", children: tagLine || t('auth.tagline') })), _jsx("div", { children: children })] }) })] }));
81
+ return (_jsxs("div", { className: "h-screen w-full overflow-hidden md:flex md:h-full", children: [_jsx("div", { className: "flex-1", children: userTheme.backgroundAuth && (_jsx("img", { src: userTheme.backgroundAuth, alt: "Authentication background", className: "hidden h-full w-full object-cover md:block" })) }), _jsx("main", { className: "bg-surface flex h-full w-full flex-1 justify-center overflow-y-auto md:h-auto", children: _jsxs("div", { className: "mx-auto h-fit space-y-4 p-4 md:mx-10 md:w-[60%]", children: [userTheme.logoSmall && (_jsx("img", { src: userTheme.logoSmall, alt: "logo", className: "mb-6 h-6 md:h-10" })), description ?? (_jsx("p", { className: "text-sm md:text-lg", children: tagLine || t('auth.tagline') })), _jsx("div", { children: children })] }) })] }));
82
82
  }
@@ -32,11 +32,11 @@ export function Infos() {
32
32
  setStatus('error');
33
33
  }
34
34
  };
35
- return (_jsx("div", { className: "flex flex-col gap-4", children: _jsxs("div", { className: "border-error bg-error/10 flex w-full items-start justify-between gap-4 rounded border p-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-error font-semibold", children: t('infos.emailNotVerified.title') }), _jsx("p", { children: t('infos.emailNotVerified.text') }), status === 'success' ? (_jsx("p", { className: "text-success mt-2 text-sm", children: t('accounts.validateEmail.success', {
35
+ return (_jsx("div", { className: "flex flex-col gap-4", children: _jsxs("div", { role: "status", className: "border-error bg-error/10 flex w-full items-start justify-between gap-4 rounded border p-4", children: [_jsxs("div", { children: [_jsx("h4", { className: "text-error font-semibold", children: t('infos.emailNotVerified.title') }), _jsx("p", { children: t('infos.emailNotVerified.text') }), status === 'success' ? (_jsx("p", { className: "text-success mt-2 text-sm", children: t('accounts.validateEmail.success', {
36
36
  defaultValue: 'Verification email sent.',
37
37
  }) })) : null, status === 'error' ? (_jsx("p", { className: "text-error mt-2 text-sm", children: t('accounts.validateEmail.error', {
38
38
  defaultValue: 'Could not send verification email.',
39
- }) })) : null] }), _jsx(Button, { action: handleValidate, variant: "variant-ghost-primary", disabled: status === 'pending', children: status === 'pending'
39
+ }) })) : null] }), _jsx(Button, { action: handleValidate, variant: "ghost", disabled: status === 'pending', children: status === 'pending'
40
40
  ? t('common.sending', { defaultValue: 'Sending…' })
41
41
  : t('infos.emailNotVerified.verify') })] }) }));
42
42
  }
@@ -1,8 +1,9 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useLayoutEffect } from 'react';
3
3
  import { initializeNewPostStores, initializePageStores, usePageHeader, } from '../../stores/index.js';
4
4
  import { useServerInfo } from '../server-data/index.js';
5
5
  import { PostViewCounterProvider, } from '../../lib/postViewCounter.js';
6
+ import { AnalyticsClickTracker } from '../../lib/analyticsClicks.js';
6
7
  import { adjustUnseenCounts, invalidateUnseenCounts, } from '../../lib/unseenCountsOptimistic.js';
7
8
  import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
8
9
  import { useHasAuthToken } from '../../contexts/openpeeps/hooks/useHasAuthToken.js';
@@ -34,9 +35,9 @@ function PostViewTracking({ children }) {
34
35
  const handleFlushFailed = useCallback(() => {
35
36
  void invalidateUnseenCounts(queryClient, client);
36
37
  }, [client, queryClient]);
37
- return (_jsx(PostViewCounterProvider, { hasAuthToken: hasToken, markPostsSeen: async (postIds) => {
38
+ return (_jsxs(PostViewCounterProvider, { hasAuthToken: hasToken, markPostsSeen: async (postIds) => {
38
39
  await markPostsSeenAction({ postIds });
39
- }, onPostQueued: handlePostQueued, onFlushFailed: handleFlushFailed, children: children }));
40
+ }, onPostQueued: handlePostQueued, onFlushFailed: handleFlushFailed, children: [_jsx(AnalyticsClickTracker, {}), children] }));
40
41
  }
41
42
  /**
42
43
  * Translation of @openpeepshq/svelte/components/layout/OpenpeepsContextProvider.
@@ -3,9 +3,8 @@ export interface OpenpeepsThemeProviderProps {
3
3
  children?: ReactNode;
4
4
  }
5
5
  /**
6
- * Translation of @openpeepshq/svelte/components/layout/OpenpeepsThemeProvider.
7
- * Reads the theme from server config + profile settings, applies the matching
8
- * data-theme on the body, and injects a `<style>` tag with primary-color
9
- * overrides into the document head.
6
+ * Reads theme from server config + profile settings, applies `data-theme` on
7
+ * the body, and injects CSS variable overrides (primary/secondary, font,
8
+ * radii, background).
10
9
  */
11
10
  export declare function OpenpeepsThemeProvider({ children, }: OpenpeepsThemeProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,13 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useEffect } from 'react';
3
- import { setTheme, themeStyleString } from '@openpeepshq/react-ui';
3
+ import { applyThemeOverrides, setTheme } from '@openpeepshq/react-ui';
4
4
  import { getTheme } from '@openpeepshq/common';
5
5
  import { useServerInfo } from '../server-data/index.js';
6
6
  import { useCurrentProfileSettings } from './IdentityContext.js';
7
7
  /**
8
- * Translation of @openpeepshq/svelte/components/layout/OpenpeepsThemeProvider.
9
- * Reads the theme from server config + profile settings, applies the matching
10
- * data-theme on the body, and injects a `<style>` tag with primary-color
11
- * overrides into the document head.
8
+ * Reads theme from server config + profile settings, applies `data-theme` on
9
+ * the body, and injects CSS variable overrides (primary/secondary, font,
10
+ * radii, background).
12
11
  */
13
12
  export function OpenpeepsThemeProvider({ children, }) {
14
13
  const serverInfo = useServerInfo();
@@ -20,15 +19,21 @@ export function OpenpeepsThemeProvider({ children, }) {
20
19
  if (typeof document === 'undefined')
21
20
  return;
22
21
  const styleId = '__openpeeps_theme__';
23
- const css = themeStyleString(base, userTheme.primaryHex, userTheme.background ?? '');
22
+ const css = applyThemeOverrides(base, {
23
+ primaryHex: userTheme.primaryHex,
24
+ secondaryHex: userTheme.secondaryHex,
25
+ fontFamily: userTheme.fontFamily,
26
+ buttonRadius: userTheme.buttonRadius,
27
+ radius: userTheme.radius,
28
+ background: userTheme.background ?? '',
29
+ });
24
30
  const wrapper = document.createElement('div');
25
31
  wrapper.innerHTML = css;
26
32
  const styleEl = wrapper.firstElementChild;
27
33
  if (!styleEl)
28
34
  return;
29
35
  styleEl.id = styleId;
30
- const previous = document.getElementById(styleId);
31
- previous?.remove();
36
+ document.getElementById(styleId)?.remove();
32
37
  document.head.appendChild(styleEl);
33
38
  const themeColorMeta = document.head.querySelector('meta[name="theme-color"]') ??
34
39
  (() => {
@@ -42,6 +47,15 @@ export function OpenpeepsThemeProvider({ children, }) {
42
47
  return () => {
43
48
  styleEl.remove();
44
49
  };
45
- }, [base, userTheme.primaryHex, userTheme.background, serverInfo]);
50
+ }, [
51
+ base,
52
+ userTheme.primaryHex,
53
+ userTheme.secondaryHex,
54
+ userTheme.fontFamily,
55
+ userTheme.buttonRadius,
56
+ userTheme.radius,
57
+ userTheme.background,
58
+ serverInfo,
59
+ ]);
46
60
  return _jsx(_Fragment, { children: children });
47
61
  }
@@ -32,5 +32,5 @@ function MobileFooter() {
32
32
  * plus button, and breadcrumbs / content header wrap `children`.
33
33
  */
34
34
  export function RootLayout({ children, sideBar }) {
35
- return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-x-hidden", children: [_jsx("div", { className: "min-w-0 flex-grow", children: _jsx("div", { className: "flex min-h-full w-full flex-col overflow-y-auto overflow-x-hidden", children: _jsx("div", { className: "mx-auto h-1 w-full min-w-0 flex-grow md:max-w-[950px]", children: _jsxs("div", { className: "flex w-full min-w-0 flex-col md:flex-row", children: [_jsx("aside", { className: "bg-card w-70 hidden shrink-0 border-r md:sticky md:top-0 md:flex md:h-screen md:self-start", children: _jsx(SideBar, { mainMenu: sideBar?.mainMenu?.(), profileMenu: sideBar?.profileMenu?.() }) }), _jsxs("div", { className: "bg-card flex min-h-screen min-w-0 flex-1 flex-col border-r", children: [_jsx(HeaderMobile, { sideBar: sideBar }), _jsx(ContentHeader, {}), _jsx(Breadcrumbs, {}), _jsx(Infos, {}), children, _jsx(PlusButton, {})] })] }) }) }) }), _jsx("div", { className: "bottom-0 w-full flex-grow-0 md:hidden", children: _jsx(MobileFooter, {}) })] }));
35
+ return (_jsxs("div", { className: "flex h-full w-full flex-col overflow-x-hidden", children: [_jsx("div", { className: "min-w-0 flex-grow", children: _jsx("div", { className: "flex min-h-full w-full flex-col overflow-y-auto overflow-x-hidden", children: _jsx("div", { className: "mx-auto h-1 w-full min-w-0 flex-grow md:max-w-[950px]", children: _jsxs("div", { className: "flex w-full min-w-0 flex-col md:flex-row", children: [_jsx("aside", { className: "w-70 hidden shrink-0 border-r md:sticky md:top-0 md:flex md:h-screen md:self-start", children: _jsx(SideBar, { mainMenu: sideBar?.mainMenu?.(), profileMenu: sideBar?.profileMenu?.() }) }), _jsxs("div", { className: "bg-background flex min-h-screen min-w-0 flex-1 flex-col border-r", children: [_jsx(HeaderMobile, { sideBar: sideBar }), _jsxs("main", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx(ContentHeader, {}), _jsx(Breadcrumbs, {}), _jsx(Infos, {}), children] }), _jsx(PlusButton, {})] })] }) }) }) }), _jsx("div", { className: "bottom-0 w-full flex-grow-0 md:hidden", children: _jsx(MobileFooter, {}) })] }));
36
36
  }
@@ -1,3 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { OPENPEEPS_MARKDOWN_PROSE_CLASS } from './classes.js';
3
- export const CompiledMarkdown = ({ html, className, }) => (_jsx("div", { className: className ?? OPENPEEPS_MARKDOWN_PROSE_CLASS, dangerouslySetInnerHTML: { __html: html } }));
3
+ import { isExternalLink } from './linkTargets.js';
4
+ import { recordOutboundClick } from '../../lib/analyticsClicks.js';
5
+ const onMarkdownClick = (event) => {
6
+ const anchor = event.target?.closest?.('a');
7
+ if (!anchor)
8
+ return;
9
+ const href = anchor.getAttribute('href');
10
+ if (!href)
11
+ return;
12
+ const origin = typeof window !== 'undefined' ? window.location.origin : undefined;
13
+ if (isExternalLink(href, origin)) {
14
+ recordOutboundClick(href, origin);
15
+ }
16
+ };
17
+ export const CompiledMarkdown = ({ html, className, }) => (_jsx("div", { className: className ?? OPENPEEPS_MARKDOWN_PROSE_CLASS, dangerouslySetInnerHTML: { __html: html }, onClick: onMarkdownClick }));
@@ -1,2 +1,4 @@
1
1
  export declare const OPENPEEPS_MARKDOWN_PROSE_CLASS = "allpeep-markdown prose prose-sm max-w-none break-words dark:prose-invert prose-a:text-primary prose-a:no-underline hover:prose-a:underline prose-code:before:content-[''] prose-code:after:content-[''] prose-pre:max-w-full prose-pre:overflow-x-auto";
2
2
  export declare const OPENPEEPS_MARKDOWN_STATIC_CLASS = "allpeep-markdown text-sm leading-relaxed break-words text-foreground";
3
+ /** Post-card caption text (feed Note/Poll/Article bodies) — Figma "PostCards" postCaption uses base (16px), not the prose-sm default used elsewhere (jam chat, editor preview, full event page). */
4
+ export declare const OPENPEEPS_POST_CAPTION_CLASS = "allpeep-markdown prose max-w-none break-words dark:prose-invert prose-a:text-primary prose-a:no-underline hover:prose-a:underline prose-code:before:content-[''] prose-code:after:content-[''] prose-pre:max-w-full prose-pre:overflow-x-auto";
@@ -1,2 +1,4 @@
1
1
  export const OPENPEEPS_MARKDOWN_PROSE_CLASS = "allpeep-markdown prose prose-sm max-w-none break-words dark:prose-invert prose-a:text-primary prose-a:no-underline hover:prose-a:underline prose-code:before:content-[''] prose-code:after:content-[''] prose-pre:max-w-full prose-pre:overflow-x-auto";
2
2
  export const OPENPEEPS_MARKDOWN_STATIC_CLASS = 'allpeep-markdown text-sm leading-relaxed break-words text-foreground';
3
+ /** Post-card caption text (feed Note/Poll/Article bodies) — Figma "PostCards" postCaption uses base (16px), not the prose-sm default used elsewhere (jam chat, editor preview, full event page). */
4
+ export const OPENPEEPS_POST_CAPTION_CLASS = "allpeep-markdown prose max-w-none break-words dark:prose-invert prose-a:text-primary prose-a:no-underline hover:prose-a:underline prose-code:before:content-[''] prose-code:after:content-[''] prose-pre:max-w-full prose-pre:overflow-x-auto";
@@ -1,6 +1,6 @@
1
1
  export { OpenpeepsMarkdown } from './OpenpeepsMarkdown';
2
2
  export type { OpenpeepsMarkdownProps } from './OpenpeepsMarkdown';
3
- export { OPENPEEPS_MARKDOWN_PROSE_CLASS, OPENPEEPS_MARKDOWN_STATIC_CLASS, } from './classes';
3
+ export { OPENPEEPS_MARKDOWN_PROSE_CLASS, OPENPEEPS_MARKDOWN_STATIC_CLASS, OPENPEEPS_POST_CAPTION_CLASS, } from './classes';
4
4
  export { compileMarkdownToHtml } from './compileMarkdown';
5
5
  export { CompiledMarkdown } from './CompiledMarkdown';
6
6
  export type { CompiledMarkdownProps } from './CompiledMarkdown';
@@ -1,5 +1,5 @@
1
1
  export { OpenpeepsMarkdown } from './OpenpeepsMarkdown.js';
2
- export { OPENPEEPS_MARKDOWN_PROSE_CLASS, OPENPEEPS_MARKDOWN_STATIC_CLASS, } from './classes.js';
2
+ export { OPENPEEPS_MARKDOWN_PROSE_CLASS, OPENPEEPS_MARKDOWN_STATIC_CLASS, OPENPEEPS_POST_CAPTION_CLASS, } from './classes.js';
3
3
  export { compileMarkdownToHtml } from './compileMarkdown.js';
4
4
  export { CompiledMarkdown } from './CompiledMarkdown.js';
5
5
  export { StaticRenderContext, useStaticRender, resolveStaticUrl, } from './staticRender.js';
@@ -14,5 +14,5 @@ export function ContentHeader() {
14
14
  const titleNode = pageHeader?.title && typeof pageHeader.title !== 'string'
15
15
  ? pageHeader.title
16
16
  : null;
17
- return (_jsxs("div", { className: "bg-card sticky top-0 z-10 flex h-16 w-full items-center justify-between border-b p-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("button", { type: "button", title: t('navigation.back'), onClick: () => router.back(), children: _jsx(ChevronLeft, {}) }), titleNode ?? (_jsx("h1", { className: "truncate text-xl font-semibold", "data-testid": pageHeader?.testId, children: titleString }))] }), pageHeader?.actions && (_jsx("div", { className: "flex items-center gap-2", children: pageHeader.actions }))] }));
17
+ return (_jsxs("header", { className: "bg-background sticky top-0 z-10 flex h-16 w-full items-center justify-between border-b p-4", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [_jsx("button", { type: "button", title: t('navigation.back'), onClick: () => router.back(), children: _jsx(ChevronLeft, {}) }), titleNode ?? (_jsx("h1", { className: "truncate text-xl font-semibold", "data-testid": pageHeader?.testId, children: titleString }))] }), pageHeader?.actions && (_jsx("div", { className: "flex items-center gap-2", children: pageHeader.actions }))] }));
18
18
  }
@@ -1,8 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Bell, Home, Newspaper, PlusSquare, Users } from 'lucide-react';
3
3
  import { MobileMenuItem } from './MobileMenuItem.js';
4
+ import { useHrefOf } from '../../contexts/router/index.js';
4
5
  import { useT } from '../../i18n/index.js';
5
6
  export function FooterMobile({ onNewPost } = {}) {
6
7
  const t = useT();
7
- return (_jsxs("div", { className: "bg-card flex h-20 w-full items-center justify-evenly md:hidden", children: [_jsx(MobileMenuItem, { title: t('navigation.home'), icon: Home, action: "/feeds/local" }), _jsx(MobileMenuItem, { title: t('navigation.myFeed'), icon: Newspaper, action: "/feeds/my" }), _jsx(MobileMenuItem, { title: t('navigation.newPost'), icon: PlusSquare, action: onNewPost ?? '/posts/new' }), _jsx(MobileMenuItem, { title: t('navigation.groups'), icon: Users, action: "/groups" }), _jsx(MobileMenuItem, { title: t('navigation.notifications'), icon: Bell, action: "/notifications" })] }));
8
+ const hrefOf = useHrefOf();
9
+ return (_jsxs("nav", { "aria-label": t('navigation.primaryMobile', {
10
+ defaultValue: 'Primary',
11
+ }), className: "bg-surface flex h-20 w-full items-center justify-evenly md:hidden", children: [_jsx(MobileMenuItem, { title: t('navigation.home'), icon: Home, action: hrefOf({ type: 'feed', feed: 'local' }) }), _jsx(MobileMenuItem, { title: t('navigation.myFeed'), icon: Newspaper, action: hrefOf({ type: 'feed', feed: 'my' }) }), _jsx(MobileMenuItem, { title: t('navigation.newPost'), icon: PlusSquare, action: onNewPost ?? hrefOf({ type: 'postNew' }) }), _jsx(MobileMenuItem, { title: t('navigation.groups'), icon: Users, action: hrefOf({ type: 'groups' }) }), _jsx(MobileMenuItem, { title: t('navigation.notifications'), icon: Bell, action: hrefOf({ type: 'notifications' }) })] }));
8
12
  }
@@ -22,5 +22,5 @@ export function HeaderMobile({ avatar, sideBar } = {}) {
22
22
  // users; guests fall back to a generic menu icon.
23
23
  const trigger = avatar ??
24
24
  (profile ? _jsx(Avatar, { profile: profile, size: 2.5, borderless: true }) : _jsx(Menu, {}));
25
- return (_jsx("div", { className: "bg-background sticky top-0 z-10 flex px-4 py-2 md:hidden", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsx("button", { type: "button", title: t('navigation.profile'), children: trigger }) }), _jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogContent, { showCloseButton: false, className: "left-0 top-0 h-screen w-[380px] translate-x-0 translate-y-0 rounded-none border-r p-0", children: _jsx(SidebarNavCloseContext.Provider, { value: () => setOpen(false), children: _jsx(SideBar, { onClose: () => setOpen(false), mainMenu: sideBar?.mainMenu?.(), profileMenu: sideBar?.profileMenu?.() }) }) })] })] }), _jsx("div", { children: logoSmall && (_jsx("a", { href: "/", children: _jsx("img", { src: logoSmall, alt: "logo", className: "h-6 px-4" }) })) }), _jsx("button", { type: "button", title: t('navigation.messages'), onClick: () => router.navigate('/conversations'), children: _jsx(MessageSquareText, {}) })] }) }));
25
+ return (_jsx("header", { className: "bg-background sticky top-0 z-10 flex px-4 py-2 md:hidden", children: _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, children: _jsx("button", { type: "button", title: t('navigation.profile'), children: trigger }) }), _jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogContent, { showCloseButton: false, className: "left-0 top-0 h-screen w-[380px] translate-x-0 translate-y-0 rounded-none border-r p-0", children: _jsx(SidebarNavCloseContext.Provider, { value: () => setOpen(false), children: _jsx(SideBar, { onClose: () => setOpen(false), mainMenu: sideBar?.mainMenu?.(), profileMenu: sideBar?.profileMenu?.() }) }) })] })] }), _jsx("div", { children: logoSmall && (_jsx("a", { href: "/", children: _jsx("img", { src: logoSmall, alt: "logo", className: "h-6 px-4" }) })) }), _jsx("button", { type: "button", title: t('navigation.messages'), onClick: () => router.navigate({ type: 'conversation' }), children: _jsx(MessageSquareText, {}) })] }) }));
26
26
  }