@openpeepshq/react 0.2.3 → 0.2.4

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 (406) 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 +7 -2
  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/GalleryModal.js +36 -5
  96. package/dist/components/post/pieces/PollContent.js +4 -4
  97. package/dist/components/post/pieces/PostActions.js +6 -45
  98. package/dist/components/post/pieces/PostInfoHeader.js +1 -1
  99. package/dist/components/post/pieces/PostMenu.js +34 -8
  100. package/dist/components/post/pieces/PostReactionHeader.js +1 -1
  101. package/dist/components/post/pieces/ShareMenu.js +4 -2
  102. package/dist/components/post/pieces/UnreadPostIndicator.d.ts +5 -3
  103. package/dist/components/post/pieces/UnreadPostIndicator.js +4 -3
  104. package/dist/components/post/pieces/modals/DeletePostModal.js +1 -1
  105. package/dist/components/post/post-form/AttachmentCard.js +2 -2
  106. package/dist/components/post/post-form/ComposeAttachments.js +1 -1
  107. package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
  108. package/dist/components/post/post-form/EditPostModal.js +22 -12
  109. package/dist/components/post/post-form/EventForm.js +2 -2
  110. package/dist/components/post/post-form/EventTypeSwitcher.js +1 -1
  111. package/dist/components/post/post-form/NewPostModal.d.ts +1 -1
  112. package/dist/components/post/post-form/NewPostModal.js +10 -10
  113. package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +2 -2
  114. package/dist/components/post/post-form/PollComposerFields.d.ts +2 -0
  115. package/dist/components/post/post-form/PollComposerFields.js +12 -8
  116. package/dist/components/post/post-form/PostAudienceSelector.js +3 -3
  117. package/dist/components/post/post-form/PostTypeSwitcher.js +1 -1
  118. package/dist/components/post/post-form/ReplyModal.js +9 -8
  119. package/dist/components/post/post-form/VisibilitySelector.js +1 -1
  120. package/dist/components/post/types/Article.js +2 -1
  121. package/dist/components/post/types/Event.js +1 -1
  122. package/dist/components/post/types/Note.js +2 -1
  123. package/dist/components/post/types/Poll.js +2 -1
  124. package/dist/components/post/types/event/CardEvent.js +2 -2
  125. package/dist/components/post/types/event/FullEvent.js +8 -8
  126. package/dist/components/post/types/event/ProfileEventRelationship.d.ts +1 -1
  127. package/dist/components/post/types/event/ProfileEventRelationship.js +38 -18
  128. package/dist/components/preview-link/LocalPreviewLink.js +1 -1
  129. package/dist/components/preview-link/RemotePreviewLink.js +5 -1
  130. package/dist/components/profile/Avatar.js +3 -2
  131. package/dist/components/profile/FollowUnfollowButton.js +2 -2
  132. package/dist/components/profile/ProfileBadge.js +1 -1
  133. package/dist/components/profile/ProfileCard.js +1 -1
  134. package/dist/components/profile/ProfileHeader.js +1 -1
  135. package/dist/components/profile/ProfilePageAction.js +3 -3
  136. package/dist/components/profile/ProfilePostsAndReplies.js +3 -1
  137. package/dist/components/profile/ProfileSelector.js +3 -3
  138. package/dist/components/profile/ProfilesInput.js +1 -1
  139. package/dist/components/profile/ReportProfileOrPostModal.js +6 -4
  140. package/dist/components/server-data/context.d.ts +8 -0
  141. package/dist/contexts/openpeeps/hooks/admin.d.ts +53 -0
  142. package/dist/contexts/openpeeps/hooks/admin.js +1 -0
  143. package/dist/contexts/openpeeps/hooks/jams.js +1 -1
  144. package/dist/contexts/openpeeps/hooks/other.d.ts +8 -0
  145. package/dist/contexts/openpeeps/index.js +10 -2
  146. package/dist/contexts/router/index.d.ts +8 -3
  147. package/dist/contexts/router/index.js +7 -3
  148. package/dist/hooks/conversations/useCreateConversation.d.ts +124 -0
  149. package/dist/hooks/conversations/useCreateConversation.js +56 -0
  150. package/dist/hooks/groups/useJoinGroup.d.ts +8 -0
  151. package/dist/hooks/groups/useJoinGroup.js +23 -0
  152. package/dist/hooks/index.d.ts +6 -0
  153. package/dist/hooks/index.js +4 -0
  154. package/dist/hooks/jams/useLeaveCloseJam.d.ts +20 -0
  155. package/dist/hooks/jams/useLeaveCloseJam.js +59 -0
  156. package/dist/hooks/posts/useFeedPostActions.d.ts +18 -0
  157. package/dist/hooks/posts/useFeedPostActions.js +51 -0
  158. package/dist/index.d.ts +3 -0
  159. package/dist/index.js +3 -0
  160. package/dist/lib/Markdown.d.ts +14 -0
  161. package/dist/lib/Markdown.js +16 -0
  162. package/dist/lib/analyticsClicks.d.ts +12 -0
  163. package/dist/lib/analyticsClicks.js +64 -0
  164. package/dist/lib/auth.d.ts +8 -0
  165. package/dist/lib/auth.js +27 -0
  166. package/dist/lib/canvasUtils.d.ts +6 -0
  167. package/dist/lib/canvasUtils.js +62 -1
  168. package/dist/lib/groupCapabilityHelpers.d.ts +1 -1
  169. package/dist/lib/passwordStrength.d.ts +6 -0
  170. package/dist/lib/passwordStrength.js +26 -0
  171. package/dist/lib/postViewCounter.d.ts +1 -1
  172. package/dist/lib/postViewCounter.js +3 -1
  173. package/dist/lib/routeHandles.d.ts +2 -0
  174. package/dist/lib/routeHandles.js +2 -0
  175. package/dist/lib/svgCover.d.ts +2 -0
  176. package/dist/lib/svgCover.js +18 -0
  177. package/dist/navigation/index.d.ts +11 -0
  178. package/dist/navigation/index.js +2 -0
  179. package/dist/navigation/menuItems.d.ts +8 -0
  180. package/dist/navigation/menuItems.js +83 -0
  181. package/dist/navigation/targets.d.ts +94 -0
  182. package/dist/navigation/targets.js +12 -0
  183. package/dist/pages/About.d.ts +1 -0
  184. package/dist/pages/About.js +19 -0
  185. package/dist/pages/CodeOfConduct.d.ts +1 -0
  186. package/dist/pages/CodeOfConduct.js +14 -0
  187. package/dist/pages/Explore.d.ts +1 -0
  188. package/dist/pages/Explore.js +132 -0
  189. package/dist/pages/Home.d.ts +6 -0
  190. package/dist/pages/Home.js +31 -0
  191. package/dist/pages/Members.d.ts +1 -0
  192. package/dist/pages/Members.js +35 -0
  193. package/dist/pages/NotFound.d.ts +1 -0
  194. package/dist/pages/NotFound.js +9 -0
  195. package/dist/pages/Notifications.d.ts +1 -0
  196. package/dist/pages/Notifications.js +8 -0
  197. package/dist/pages/PostDetail.d.ts +1 -0
  198. package/dist/pages/PostDetail.js +27 -0
  199. package/dist/pages/Profile.d.ts +1 -0
  200. package/dist/pages/Profile.js +20 -0
  201. package/dist/pages/Tags.d.ts +1 -0
  202. package/dist/pages/Tags.js +14 -0
  203. package/dist/pages/Welcome.d.ts +1 -0
  204. package/dist/pages/Welcome.js +89 -0
  205. package/dist/pages/admin/Analytics.d.ts +11 -0
  206. package/dist/pages/admin/Analytics.js +11 -0
  207. package/dist/pages/admin/ApiKeys.d.ts +1 -0
  208. package/dist/pages/admin/ApiKeys.js +141 -0
  209. package/dist/pages/admin/Backups.d.ts +1 -0
  210. package/dist/pages/admin/Backups.js +39 -0
  211. package/dist/pages/admin/ConfigEditor.d.ts +14 -0
  212. package/dist/pages/admin/ConfigEditor.js +91 -0
  213. package/dist/pages/admin/Configuration.d.ts +1 -0
  214. package/dist/pages/admin/Configuration.js +8 -0
  215. package/dist/pages/admin/ConfigurationCommunity.d.ts +1 -0
  216. package/dist/pages/admin/ConfigurationCommunity.js +7 -0
  217. package/dist/pages/admin/ConfigurationCommunityLanguage.d.ts +1 -0
  218. package/dist/pages/admin/ConfigurationCommunityLanguage.js +71 -0
  219. package/dist/pages/admin/ConfigurationEmail.d.ts +1 -0
  220. package/dist/pages/admin/ConfigurationEmail.js +97 -0
  221. package/dist/pages/admin/ConfigurationI18n.d.ts +1 -0
  222. package/dist/pages/admin/ConfigurationI18n.js +51 -0
  223. package/dist/pages/admin/Dashboard.d.ts +1 -0
  224. package/dist/pages/admin/Dashboard.js +40 -0
  225. package/dist/pages/admin/Db.d.ts +1 -0
  226. package/dist/pages/admin/Db.js +238 -0
  227. package/dist/pages/admin/Diagnostics.d.ts +1 -0
  228. package/dist/pages/admin/Diagnostics.js +8 -0
  229. package/dist/pages/admin/DiagnosticsEmail.d.ts +1 -0
  230. package/dist/pages/admin/DiagnosticsEmail.js +65 -0
  231. package/dist/pages/admin/DiagnosticsJob.d.ts +1 -0
  232. package/dist/pages/admin/DiagnosticsJob.js +51 -0
  233. package/dist/pages/admin/DiagnosticsLogs.d.ts +1 -0
  234. package/dist/pages/admin/DiagnosticsLogs.js +62 -0
  235. package/dist/pages/admin/DiagnosticsPerformance.d.ts +1 -0
  236. package/dist/pages/admin/DiagnosticsPerformance.js +34 -0
  237. package/dist/pages/admin/GroupMembers.d.ts +1 -0
  238. package/dist/pages/admin/GroupMembers.js +109 -0
  239. package/dist/pages/admin/Groups.d.ts +1 -0
  240. package/dist/pages/admin/Groups.js +61 -0
  241. package/dist/pages/admin/Invites.d.ts +1 -0
  242. package/dist/pages/admin/Invites.js +72 -0
  243. package/dist/pages/admin/Members.d.ts +1 -0
  244. package/dist/pages/admin/Members.js +49 -0
  245. package/dist/pages/admin/Moderation.d.ts +1 -0
  246. package/dist/pages/admin/Moderation.js +62 -0
  247. package/dist/pages/admin/Reports.d.ts +1 -0
  248. package/dist/pages/admin/Reports.js +178 -0
  249. package/dist/pages/admin/analytics/AnalyticsLayout.d.ts +14 -0
  250. package/dist/pages/admin/analytics/AnalyticsLayout.js +104 -0
  251. package/dist/pages/admin/analytics/AnalyticsRangeContext.d.ts +9 -0
  252. package/dist/pages/admin/analytics/AnalyticsRangeContext.js +9 -0
  253. package/dist/pages/admin/analytics/Content.d.ts +1 -0
  254. package/dist/pages/admin/analytics/Content.js +117 -0
  255. package/dist/pages/admin/analytics/Engagement.d.ts +1 -0
  256. package/dist/pages/admin/analytics/Engagement.js +220 -0
  257. package/dist/pages/admin/analytics/Groups.d.ts +1 -0
  258. package/dist/pages/admin/analytics/Groups.js +139 -0
  259. package/dist/pages/admin/analytics/Members.d.ts +1 -0
  260. package/dist/pages/admin/analytics/Members.js +96 -0
  261. package/dist/pages/admin/analytics/Overview.d.ts +1 -0
  262. package/dist/pages/admin/analytics/Overview.js +165 -0
  263. package/dist/pages/admin/analytics/ReportSettings.d.ts +1 -0
  264. package/dist/pages/admin/analytics/ReportSettings.js +62 -0
  265. package/dist/pages/admin/analytics/analyticsInfo.d.ts +3 -0
  266. package/dist/pages/admin/analytics/analyticsInfo.js +4 -0
  267. package/dist/pages/admin/analytics/downloadCsv.d.ts +2 -0
  268. package/dist/pages/admin/analytics/downloadCsv.js +20 -0
  269. package/dist/pages/admin/community/CommunityFavicons.d.ts +1 -0
  270. package/dist/pages/admin/community/CommunityFavicons.js +47 -0
  271. package/dist/pages/admin/community/CommunityInfo.d.ts +1 -0
  272. package/dist/pages/admin/community/CommunityInfo.js +35 -0
  273. package/dist/pages/admin/community/CommunityLinks.d.ts +1 -0
  274. package/dist/pages/admin/community/CommunityLinks.js +35 -0
  275. package/dist/pages/admin/community/CommunityMarkdownPage.d.ts +8 -0
  276. package/dist/pages/admin/community/CommunityMarkdownPage.js +35 -0
  277. package/dist/pages/admin/community/CommunityProfileFields.d.ts +1 -0
  278. package/dist/pages/admin/community/CommunityProfileFields.js +50 -0
  279. package/dist/pages/admin/community/CommunityRoles.d.ts +1 -0
  280. package/dist/pages/admin/community/CommunityRoles.js +109 -0
  281. package/dist/pages/admin/community/CommunityTheme.d.ts +1 -0
  282. package/dist/pages/admin/community/CommunityTheme.js +56 -0
  283. package/dist/pages/admin/community/useCommunityConfig.d.ts +168 -0
  284. package/dist/pages/admin/community/useCommunityConfig.js +28 -0
  285. package/dist/pages/admin/components/AdminCharts.d.ts +22 -0
  286. package/dist/pages/admin/components/AdminCharts.js +29 -0
  287. package/dist/pages/admin/components/AdminGroupCard.d.ts +6 -0
  288. package/dist/pages/admin/components/AdminGroupCard.js +42 -0
  289. package/dist/pages/admin/components/AdminInviteActions.d.ts +1 -0
  290. package/dist/pages/admin/components/AdminInviteActions.js +23 -0
  291. package/dist/pages/admin/components/InviteWithEmailModal.d.ts +3 -0
  292. package/dist/pages/admin/components/InviteWithEmailModal.js +82 -0
  293. package/dist/pages/admin/components/InviteWithLinkModal.d.ts +22 -0
  294. package/dist/pages/admin/components/InviteWithLinkModal.js +98 -0
  295. package/dist/pages/admin/components/ProfileRowActions.d.ts +5 -0
  296. package/dist/pages/admin/components/ProfileRowActions.js +131 -0
  297. package/dist/pages/admin/components/RestoreBackupModal.d.ts +4 -0
  298. package/dist/pages/admin/components/RestoreBackupModal.js +33 -0
  299. package/dist/pages/admin/components/RestoreTestBackupModal.d.ts +4 -0
  300. package/dist/pages/admin/components/RestoreTestBackupModal.js +36 -0
  301. package/dist/pages/articles/Edit.d.ts +1 -0
  302. package/dist/pages/articles/Edit.js +60 -0
  303. package/dist/pages/articles/Index.d.ts +1 -0
  304. package/dist/pages/articles/Index.js +18 -0
  305. package/dist/pages/articles/New.d.ts +1 -0
  306. package/dist/pages/articles/New.js +48 -0
  307. package/dist/pages/auth/Closed.d.ts +1 -0
  308. package/dist/pages/auth/Closed.js +14 -0
  309. package/dist/pages/auth/Login.d.ts +1 -0
  310. package/dist/pages/auth/Login.js +74 -0
  311. package/dist/pages/auth/OidcCallback.d.ts +5 -0
  312. package/dist/pages/auth/OidcCallback.js +31 -0
  313. package/dist/pages/auth/OidcPending.d.ts +5 -0
  314. package/dist/pages/auth/OidcPending.js +39 -0
  315. package/dist/pages/auth/Register.d.ts +4 -0
  316. package/dist/pages/auth/Register.js +124 -0
  317. package/dist/pages/auth/RegisterInvitation.d.ts +1 -0
  318. package/dist/pages/auth/RegisterInvitation.js +5 -0
  319. package/dist/pages/auth/RequestResetPassword.d.ts +1 -0
  320. package/dist/pages/auth/RequestResetPassword.js +50 -0
  321. package/dist/pages/auth/ResetPassword.d.ts +1 -0
  322. package/dist/pages/auth/ResetPassword.js +40 -0
  323. package/dist/pages/auth/SsoCallback.d.ts +1 -0
  324. package/dist/pages/auth/SsoCallback.js +34 -0
  325. package/dist/pages/auth/ValidateEmail.d.ts +6 -0
  326. package/dist/pages/auth/ValidateEmail.js +64 -0
  327. package/dist/pages/conversations/Index.d.ts +1 -0
  328. package/dist/pages/conversations/Index.js +58 -0
  329. package/dist/pages/conversations/Info.d.ts +1 -0
  330. package/dist/pages/conversations/Info.js +26 -0
  331. package/dist/pages/conversations/New.d.ts +1 -0
  332. package/dist/pages/conversations/New.js +8 -0
  333. package/dist/pages/conversations/Show.d.ts +1 -0
  334. package/dist/pages/conversations/Show.js +100 -0
  335. package/dist/pages/events/Edit.d.ts +1 -0
  336. package/dist/pages/events/Edit.js +69 -0
  337. package/dist/pages/events/Index.d.ts +1 -0
  338. package/dist/pages/events/Index.js +23 -0
  339. package/dist/pages/events/My.d.ts +1 -0
  340. package/dist/pages/events/My.js +24 -0
  341. package/dist/pages/events/New.d.ts +1 -0
  342. package/dist/pages/events/New.js +66 -0
  343. package/dist/pages/feeds/Bookmarks.d.ts +1 -0
  344. package/dist/pages/feeds/Bookmarks.js +10 -0
  345. package/dist/pages/feeds/Local.d.ts +1 -0
  346. package/dist/pages/feeds/Local.js +14 -0
  347. package/dist/pages/feeds/My.d.ts +1 -0
  348. package/dist/pages/feeds/My.js +12 -0
  349. package/dist/pages/groups/Edit.d.ts +1 -0
  350. package/dist/pages/groups/Edit.js +57 -0
  351. package/dist/pages/groups/Index.d.ts +1 -0
  352. package/dist/pages/groups/Index.js +50 -0
  353. package/dist/pages/groups/Info.d.ts +1 -0
  354. package/dist/pages/groups/Info.js +21 -0
  355. package/dist/pages/groups/Members.d.ts +1 -0
  356. package/dist/pages/groups/Members.js +28 -0
  357. package/dist/pages/groups/New.d.ts +1 -0
  358. package/dist/pages/groups/New.js +68 -0
  359. package/dist/pages/groups/Show.d.ts +1 -0
  360. package/dist/pages/groups/Show.js +64 -0
  361. package/dist/pages/index.d.ts +94 -0
  362. package/dist/pages/index.js +94 -0
  363. package/dist/pages/jams/Event.d.ts +8 -0
  364. package/dist/pages/jams/Event.js +57 -0
  365. package/dist/pages/jams/Index.d.ts +6 -0
  366. package/dist/pages/jams/Index.js +44 -0
  367. package/dist/pages/payment/Success.d.ts +1 -0
  368. package/dist/pages/payment/Success.js +30 -0
  369. package/dist/pages/plugins/Index.d.ts +1 -0
  370. package/dist/pages/plugins/Index.js +69 -0
  371. package/dist/pages/profile/Followers.d.ts +6 -0
  372. package/dist/pages/profile/Followers.js +28 -0
  373. package/dist/pages/settings/AccessTokens.d.ts +1 -0
  374. package/dist/pages/settings/AccessTokens.js +149 -0
  375. package/dist/pages/settings/Account.d.ts +1 -0
  376. package/dist/pages/settings/Account.js +81 -0
  377. package/dist/pages/settings/Billing.d.ts +1 -0
  378. package/dist/pages/settings/Billing.js +82 -0
  379. package/dist/pages/settings/Index.d.ts +1 -0
  380. package/dist/pages/settings/Index.js +13 -0
  381. package/dist/pages/settings/Language.d.ts +1 -0
  382. package/dist/pages/settings/Language.js +54 -0
  383. package/dist/pages/settings/NotificationPreferences.d.ts +1 -0
  384. package/dist/pages/settings/NotificationPreferences.js +180 -0
  385. package/dist/pages/settings/Notifications.d.ts +1 -0
  386. package/dist/pages/settings/Notifications.js +10 -0
  387. package/dist/pages/settings/PublicProfile.d.ts +1 -0
  388. package/dist/pages/settings/PublicProfile.js +135 -0
  389. package/dist/pages/settings/PushEnabledDevices.d.ts +1 -0
  390. package/dist/pages/settings/PushEnabledDevices.js +67 -0
  391. package/dist/pages/settings/Theme.d.ts +1 -0
  392. package/dist/pages/settings/Theme.js +37 -0
  393. package/dist/pages/test/Error.d.ts +1 -0
  394. package/dist/pages/test/Error.js +10 -0
  395. package/dist/pages/test/Markdown.d.ts +1 -0
  396. package/dist/pages/test/Markdown.js +32 -0
  397. package/dist/pwa/InstallPrompt.js +1 -1
  398. package/dist/pwa/NotificationPermissionPrompt.js +2 -2
  399. package/dist/pwa/UpdatePrompt.js +1 -1
  400. package/dist/react-native.d.ts +1 -0
  401. package/dist/react-native.js +1 -0
  402. package/dist/session/useSessionEvents.d.ts +3 -0
  403. package/dist/session/useSessionEvents.js +64 -0
  404. package/package.json +12 -7
  405. package/dist/components/jams/useJamLiveKitTheme.d.ts +0 -3
  406. package/dist/components/jams/useJamLiveKitTheme.js +0 -10
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
3
  import { Image, Paperclip } from 'lucide-react';
4
+ import { resolvePollOptionContents } from '@openpeepshq/common';
4
5
  import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, ModalFooter, } from '@openpeepshq/react-ui';
5
6
  import { useOpenpeeps } from '../../../contexts/openpeeps/index.js';
6
7
  import { useT } from '../../../i18n/index.js';
@@ -14,7 +15,7 @@ import { OpenpeepsMarkdownInput } from './OpenpeepsMarkdownInput.js';
14
15
  import { ComposePreviewLinks } from './ComposePreviewLinks.js';
15
16
  import { useComposeAttachments } from './ComposeAttachments.js';
16
17
  import { PostTypeSwitcher } from './PostTypeSwitcher.js';
17
- import { PollComposerFields } from './PollComposerFields.js';
18
+ import { PollComposerFields, pollOptionLabel } from './PollComposerFields.js';
18
19
  export function ReplyModal({ post, onClose }) {
19
20
  const t = useT();
20
21
  const { success, error: toastError } = useToast();
@@ -75,12 +76,12 @@ export function ReplyModal({ post, onClose }) {
75
76
  });
76
77
  };
77
78
  const trimmedContent = content.trim();
78
- const validPollOptions = pollOptions.map((o) => o.trim()).filter(Boolean);
79
+ const resolvedPollOptions = resolvePollOptionContents(pollOptions, (index) => pollOptionLabel(index, t));
79
80
  const canSubmit = useMemo(() => {
80
81
  if (submitting || composeAttachments.pending)
81
82
  return false;
82
83
  if (composerType === 'question') {
83
- return trimmedContent.length > 0 && validPollOptions.length >= 2;
84
+ return trimmedContent.length > 0 && resolvedPollOptions.length >= 2;
84
85
  }
85
86
  return ((trimmedContent.length > 0 && trimmedContent.length <= 500) ||
86
87
  attachments.length > 0);
@@ -89,7 +90,7 @@ export function ReplyModal({ post, onClose }) {
89
90
  composeAttachments.pending,
90
91
  composerType,
91
92
  trimmedContent,
92
- validPollOptions.length,
93
+ resolvedPollOptions.length,
93
94
  attachments.length,
94
95
  ]);
95
96
  const publish = async () => {
@@ -106,7 +107,7 @@ export function ReplyModal({ post, onClose }) {
106
107
  ...payload.data,
107
108
  type: 'question',
108
109
  content: trimmedContent,
109
- options: validPollOptions.map((text) => ({
110
+ options: resolvedPollOptions.map((text) => ({
110
111
  type: 'note',
111
112
  content: text,
112
113
  })),
@@ -192,11 +193,11 @@ export function ReplyModal({ post, onClose }) {
192
193
  ...draft,
193
194
  data: { ...draft.data, votersVisible: value },
194
195
  });
195
- } })) : null] })] })] }), _jsx(ModalFooter, { className: "border-t", children: _jsxs("div", { className: "flex w-full items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center gap-1", children: [composerType === 'note' ? (_jsxs(_Fragment, { children: [_jsx(Button, { compact: true, variant: "variant-ghost-primary", title: t('posts.form.addImage', {
196
+ } })) : null] })] })] }), _jsx(ModalFooter, { className: "border-t", children: _jsxs("div", { className: "flex w-full items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center gap-1", children: [composerType === 'note' ? (_jsxs(_Fragment, { children: [_jsx(Button, { compact: true, variant: "ghost", title: t('posts.form.addImage', {
196
197
  defaultValue: 'Add image',
197
- }), action: composeAttachments.openImagePicker, children: _jsx(Image, { className: "size-5" }) }), _jsx(Button, { compact: true, variant: "variant-ghost-primary", title: t('posts.form.addAttachment', {
198
+ }), action: composeAttachments.openImagePicker, children: _jsx(Image, { className: "size-5" }) }), _jsx(Button, { compact: true, variant: "ghost", title: t('posts.form.addAttachment', {
198
199
  defaultValue: 'Add attachment',
199
- }), action: composeAttachments.openDocumentPicker, children: _jsx(Paperclip, { className: "size-5" }) })] })) : null, _jsx(PostTypeSwitcher, { type: composerType, onSelect: setComposerType, onClose: onClose, showEventType: false, showArticleType: false })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { variant: "variant-ghost-primary", action: onClose, children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "variant-filled-primary", action: publish, disabled: !canSubmit, children: submitting
200
+ }), action: composeAttachments.openDocumentPicker, children: _jsx(Paperclip, { className: "size-5" }) })] })) : null, _jsx(PostTypeSwitcher, { type: composerType, onSelect: setComposerType, onClose: onClose, showEventType: false, showArticleType: false })] }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { variant: "ghost", action: onClose, children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "default", action: publish, disabled: !canSubmit, children: submitting
200
201
  ? t('common.posting', { defaultValue: 'Posting…' })
201
202
  : t('posts.reply', { defaultValue: 'Reply' }) })] })] }) })] }) }), composeAttachments.inputs] }));
202
203
  }
@@ -31,5 +31,5 @@ export const VisibilitySelector = ({ postData, onClick, disabled = false, showDi
31
31
  };
32
32
  return (_jsxs("div", { className: "op-input-group grid grid-cols-[auto_1fr_auto]", children: [_jsx("div", { className: "op-input-group-shim", children: _jsx(Eye, { className: "size-4" }) }), _jsx("button", { type: "button", title: t('posts.form.changeAudience', {
33
33
  defaultValue: 'Change audience',
34
- }), className: "hover:bg-muted/50 flex h-10 w-full min-w-0 items-center px-3 text-left disabled:cursor-not-allowed disabled:opacity-50", onClick: onClick, disabled: disabled, children: content() }), !disabled ? (_jsx("div", { className: "op-input-group-shim", children: _jsx(ChevronDown, { className: "text-muted-foreground size-4" }) })) : null] }));
34
+ }), className: "hover:bg-surface/50 flex h-10 w-full min-w-0 items-center px-3 text-left disabled:cursor-not-allowed disabled:opacity-50", onClick: onClick, disabled: disabled, children: content() }), !disabled ? (_jsx("div", { className: "op-input-group-shim", children: _jsx(ChevronDown, { className: "text-muted-foreground size-4" }) })) : null] }));
35
35
  };
@@ -3,6 +3,7 @@ import { ArrowRight } from 'lucide-react';
3
3
  import { useT } from '../../../i18n/index.js';
4
4
  import { resolveStaticUrl, useStaticRender } from '../../markdown/staticRender.js';
5
5
  import { PostMarkdown } from '../Markdown.js';
6
+ import { OPENPEEPS_POST_CAPTION_CLASS } from '../../markdown/classes.js';
6
7
  import { firstNWords } from '../helpers.js';
7
8
  export function FeedArticle({ post }) {
8
9
  const t = useT();
@@ -10,5 +11,5 @@ export function FeedArticle({ post }) {
10
11
  const article = post.data;
11
12
  const previewContent = firstNWords(article.content, 50);
12
13
  const showReadMore = !!article.content && previewContent.length < article.content.length;
13
- return (_jsxs("div", { className: "flex w-full min-w-0 flex-col gap-2", children: [article.image && (_jsx("img", { src: article.image, className: "w-full object-cover", alt: `image for ${article.title ?? 'article'}` })), _jsx("div", { className: "prose", children: _jsx("h3", { children: article.title }) }), _jsx(PostMarkdown, { source: `${previewContent}${showReadMore ? '...' : ''}` }), showReadMore && (_jsx("div", { className: "flex justify-end", children: _jsxs("a", { href: resolveStaticUrl(`/posts/${post.id}`, staticRender ? baseUrl : undefined), className: "text-primary inline-flex items-center gap-1 text-sm hover:underline", children: [t('posts.article.readMore', { defaultValue: 'Read more' }), _jsx(ArrowRight, { className: "inline-block size-4" })] }) }))] }));
14
+ return (_jsxs("div", { className: "flex w-full min-w-0 flex-col gap-2", children: [article.image && (_jsx("img", { src: article.image, className: "w-full object-cover", alt: `image for ${article.title ?? 'article'}` })), _jsx("div", { className: "prose-sm", children: _jsx("h3", { children: article.title }) }), _jsx(PostMarkdown, { source: `${previewContent}${showReadMore ? '...' : ''}`, className: OPENPEEPS_POST_CAPTION_CLASS }), showReadMore && (_jsx("div", { className: "flex justify-end", children: _jsxs("a", { href: resolveStaticUrl(`/posts/${post.id}`, staticRender ? baseUrl : undefined), className: "text-primary inline-flex items-center gap-1 text-sm hover:underline", children: [t('posts.article.readMore', { defaultValue: 'Read more' }), _jsx(ArrowRight, { className: "inline-block size-4" })] }) }))] }));
14
15
  }
@@ -15,5 +15,5 @@ export function FeedEvent({ post }) {
15
15
  return (_jsx("h1", { children: "FeedEvent was used but post type is not \"event\". Please report this to the developers." }));
16
16
  }
17
17
  const event = post.data;
18
- return (_jsxs("div", { className: "flex w-full flex-col gap-2", children: [event.image && (_jsx("span", { className: "aspect-video w-full overflow-hidden", children: _jsx("img", { src: event.image, className: "h-full w-full object-cover", alt: `image for ${event.name ?? 'event'}` }) })), _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsxs("span", { className: "text-error-600 text-sm", children: [fmtRange(event.start, event.end), ' ', _jsx("span", { className: "text-muted-foreground", children: "(your local time)" })] }), _jsx("a", { href: resolveStaticUrl(`/posts/${post.id}`, staticRender ? baseUrl : undefined), className: "border-primary text-primary hover:bg-primary/10 rounded-md border px-3 py-1 text-sm", children: t('posts.event.viewEvent', { defaultValue: 'View Event' }) })] }), _jsx("div", { className: "text-lg font-medium", children: event.name }), _jsx(EventLocation, { post: post })] }));
18
+ return (_jsxs("div", { className: "flex w-full flex-col gap-2", children: [event.image && (_jsx("span", { className: "aspect-video w-full overflow-hidden", children: _jsx("img", { src: event.image, className: "h-full w-full object-cover", alt: `image for ${event.name ?? 'event'}` }) })), _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsxs("span", { className: "text-destructive text-sm", children: [fmtRange(event.start, event.end), ' ', _jsx("span", { className: "text-muted-foreground", children: "(your local time)" })] }), _jsx("a", { href: resolveStaticUrl(`/posts/${post.id}`, staticRender ? baseUrl : undefined), className: "border-primary text-primary hover:bg-primary/10 rounded-button border px-3 py-1 text-sm", children: t('posts.event.viewEvent', { defaultValue: 'View Event' }) })] }), _jsx("div", { className: "text-lg font-medium", children: event.name }), _jsx(EventLocation, { post: post })] }));
19
19
  }
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { OpenpeepsMarkdown } from '../../markdown/OpenpeepsMarkdown.js';
3
+ import { OPENPEEPS_POST_CAPTION_CLASS } from '../../markdown/classes.js';
3
4
  import { Attachments } from '../pieces/Attachments.js';
4
5
  export function FeedNote({ post }) {
5
6
  if (post?.data?.type !== 'note') {
6
7
  return (_jsx("h1", { children: "FeedNote was used but post type is not \"note\". Please report this to the developers." }));
7
8
  }
8
9
  const data = post.data;
9
- return (_jsxs("div", { children: [_jsx(OpenpeepsMarkdown, { source: data.content, mentions: post.mentions, linkPreviewMode: post.data.attachments?.length ? 'none' : 'append' }), _jsx(Attachments, { post: post })] }));
10
+ return (_jsxs("div", { children: [_jsx(OpenpeepsMarkdown, { source: data.content, mentions: post.mentions, className: OPENPEEPS_POST_CAPTION_CLASS, linkPreviewMode: post.data.attachments?.length ? 'none' : 'append' }), _jsx(Attachments, { post: post })] }));
10
11
  }
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { PostMarkdown } from '../Markdown.js';
3
+ import { OPENPEEPS_POST_CAPTION_CLASS } from '../../markdown/classes.js';
3
4
  import { Attachments } from '../pieces/Attachments.js';
4
5
  import { PollContent } from '../pieces/PollContent.js';
5
6
  export function FeedPoll({ post, interactive = true }) {
@@ -7,5 +8,5 @@ export function FeedPoll({ post, interactive = true }) {
7
8
  return (_jsx("p", { className: "text-error text-sm", children: "FeedPoll was used for a non-question post." }));
8
9
  }
9
10
  const data = post.data;
10
- return (_jsxs("div", { className: "space-y-3", children: [data.content ? (_jsx(PostMarkdown, { source: data.content, mentions: post.mentions, linkPreviewMode: data.attachments?.length ? 'none' : 'append' })) : null, _jsx(Attachments, { post: post }), interactive ? (_jsx(PollContent, { post: post })) : (_jsxs(_Fragment, { children: [_jsx("ul", { className: "space-y-1.5", children: data.options.map((opt, idx) => (_jsx("li", { className: "rounded-md border border-border px-3 py-2 text-sm", children: opt.content }, idx))) }), data.expiresAt ? (_jsxs("p", { className: "text-muted-foreground text-xs", children: ["Closes ", new Date(data.expiresAt).toLocaleString()] })) : null] }))] }));
11
+ return (_jsxs("div", { className: "space-y-3", children: [data.content ? (_jsx(PostMarkdown, { source: data.content, mentions: post.mentions, className: OPENPEEPS_POST_CAPTION_CLASS, linkPreviewMode: data.attachments?.length ? 'none' : 'append' })) : null, _jsx(Attachments, { post: post }), interactive ? (_jsx(PollContent, { post: post })) : (_jsxs(_Fragment, { children: [_jsx("ul", { className: "space-y-1.5", children: data.options.map((opt, idx) => (_jsx("li", { className: "border-border rounded-md border px-3 py-2 text-sm", children: opt.content }, idx))) }), data.expiresAt ? (_jsxs("p", { className: "text-muted-foreground text-xs", children: ["Closes ", new Date(data.expiresAt).toLocaleString()] })) : null] }))] }));
11
12
  }
@@ -39,7 +39,7 @@ export function CardEvent({ post }) {
39
39
  const attendeesLength = jamState?.participants.length ?? 0;
40
40
  const jamLink = getJamUrl(post.id, typeof window !== 'undefined' ? window.location.origin : undefined);
41
41
  const postLink = `/posts/${post.id}`;
42
- return (_jsxs("div", { ref: postViewRef, className: "hover:bg-surface-100 mb-6 w-full overflow-hidden rounded-lg border", children: [_jsx("a", { href: postLink, className: "block", children: _jsx("div", { className: "aspect-video w-full overflow-hidden", children: _jsx("img", { src: event.image || '/img/event-default.png', alt: event.name ? `image for ${event.name}` : 'Event', className: "h-full w-full object-cover" }) }) }), _jsxs("div", { className: "grid gap-y-4 p-4", children: [_jsxs("a", { href: postLink, className: "block text-inherit no-underline", children: [_jsx("p", { className: "text-muted-foreground text-sm", children: formatEventTimespan(event) }), _jsx("h3", { className: "text-xl font-semibold", children: truncateText(event.name, 100) || '-' })] }), _jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1", children: [_jsx(EventLocation, { post: post, truncate: true }), _jsx(ProfileEventRelationship, { post: post })] }), jam && me ? (jamState?.active ? (_jsxs("div", { className: "text-surface-600 flex items-center justify-start gap-2 text-xs", children: [_jsx("span", { className: "w-12", children: _jsx(ParticipantsCard, { jamState: jamState }) }), _jsxs("span", { children: [attendeesLength, ' ', attendeesLength === 1
42
+ return (_jsxs("article", { ref: postViewRef, className: "hover:bg-surface mb-6 w-full overflow-hidden rounded-lg border", children: [_jsx("a", { href: postLink, className: "block", children: _jsx("div", { className: "aspect-video w-full overflow-hidden", children: _jsx("img", { src: event.image || '/img/event-default.png', alt: event.name ? `image for ${event.name}` : 'Event', className: "h-full w-full object-cover" }) }) }), _jsxs("div", { className: "grid gap-y-4 p-4", children: [_jsxs("a", { href: postLink, className: "block text-inherit no-underline", children: [_jsx("p", { className: "text-muted-foreground text-sm", children: formatEventTimespan(event) }), _jsx("h3", { className: "text-xl font-semibold", children: truncateText(event.name, 100) || '-' })] }), _jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1", children: [_jsx(EventLocation, { post: post, truncate: true }), _jsx(ProfileEventRelationship, { post: post })] }), jam && me ? (jamState?.active ? (_jsxs("div", { className: "text-muted-foreground flex items-center justify-start gap-2 text-xs", children: [_jsx("span", { className: "w-12", children: _jsx(ParticipantsCard, { jamState: jamState }) }), _jsxs("span", { children: [attendeesLength, ' ', attendeesLength === 1
43
43
  ? t('events.jam.attendee', { defaultValue: 'attendee' })
44
- : t('events.jam.attendees', { defaultValue: 'attendees' })] }), _jsx(Button, { action: jamLink, variant: "variant-filled-primary", compact: true, children: t('jam.join.submit', { defaultValue: 'Join Jam' }) })] })) : jam.moderators.includes(me.id) ? (_jsx("div", { children: _jsx(Button, { action: jamLink, variant: "variant-filled-primary", children: t('jam.start.submit', { defaultValue: 'Start Jam' }) }) })) : null) : null] })] }));
44
+ : t('events.jam.attendees', { defaultValue: 'attendees' })] }), _jsx(Button, { action: jamLink, variant: "default", compact: true, children: t('jam.join.submit', { defaultValue: 'Join Jam' }) })] })) : jam.moderators.includes(me.id) ? (_jsx("div", { children: _jsx(Button, { action: jamLink, variant: "default", children: t('jam.start.submit', { defaultValue: 'Start Jam' }) }) })) : null) : null] })] }));
45
45
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { Download, MoreHorizontal, Share, Trash2 } from 'lucide-react';
3
3
  import { useMemo, useState } from 'react';
4
4
  import { buildThreads, calculateEffectiveRsvps, canAccessJamRecordings, canManageEventRsvps, canModerateJam, countYesRsvps, groupName, isCapacityEvent, profileName, } from '@openpeepshq/common/lib';
5
- import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, LoadingSpinner, PopupMenu, PopupMenuButton, UpdatingDate } from '@openpeepshq/react-ui';
5
+ import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, LoadingSpinner, PopupMenu, PopupMenuButton, UpdatingDate, } from '@openpeepshq/react-ui';
6
6
  import { useOpenpeeps } from '../../../../contexts/openpeeps/index.js';
7
7
  import { useT } from '../../../../i18n/index.js';
8
8
  import { useCurrentProfile } from '../../../layout/IdentityContext.js';
@@ -50,7 +50,7 @@ export function FullEvent({ post }) {
50
50
  return t('events.community', { defaultValue: 'Community' });
51
51
  }, [post, t]);
52
52
  const showJamAttendeesTab = !!event.jam && (myEvent || iAmModerator) && jamAttendeesQuery.isSuccess;
53
- return (_jsxs("div", { ref: postViewRef, className: "flex w-full flex-col gap-2 p-3", children: [_jsx("span", { className: "mb-3 block aspect-video w-full overflow-hidden rounded", children: _jsx("img", { src: event.image || '/img/event-default.png', className: "h-full w-full object-cover", alt: event.name ? `image for ${event.name}` : 'Event' }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-x-4", children: [_jsx("span", { className: "bg-surface-200 mb-3 inline-block rounded-lg px-3 py-1 text-sm", children: eventScope }), slotsLeft !== null ? (_jsx("span", { className: "bg-surface-200 mb-3 inline-block rounded-lg px-3 py-1 text-sm", children: slotsLeft <= 0
53
+ return (_jsxs("article", { ref: postViewRef, className: "flex w-full flex-col gap-2 p-3", children: [_jsx("span", { className: "mb-3 block aspect-video w-full overflow-hidden rounded", children: _jsx("img", { src: event.image || '/img/event-default.png', className: "h-full w-full object-cover", alt: event.name ? `image for ${event.name}` : 'Event' }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex gap-x-4", children: [_jsx("span", { className: "bg-surface-2 mb-3 inline-block rounded-lg px-3 py-1 text-sm", children: eventScope }), slotsLeft !== null ? (_jsx("span", { className: "bg-surface-2 mb-3 inline-block rounded-lg px-3 py-1 text-sm", children: slotsLeft <= 0
54
54
  ? t('events.noSpotsAvailable', {
55
55
  defaultValue: 'No spots available',
56
56
  })
@@ -80,16 +80,16 @@ export function FullEvent({ post }) {
80
80
  }) }), _jsx("p", { className: "text-muted-foreground mt-2 text-sm", children: new Date(event.end).toLocaleTimeString(undefined, {
81
81
  hour: '2-digit',
82
82
  minute: '2-digit',
83
- }) })] })] })) : null, _jsx(EventLocation, { post: post, preview: false }), _jsx(EventRsvpButton, { post: post }), event.jam && (myEvent || iAmModerator) ? (_jsx(Button, { variant: "variant-filled-primary", className: "mt-2 w-full", action: `/events/${post.id}/jam`, children: t('events.jam.start', { defaultValue: 'Start jam' }) })) : null, _jsxs("nav", { className: "mt-4 flex flex-wrap gap-2 border-b", children: [event.content ? (_jsx(TabButton, { active: tab === 'description', onClick: () => setTab('description'), children: t('events.tabs.description', { defaultValue: 'Description' }) })) : null, _jsx(TabButton, { active: tab === 'replies', onClick: () => setTab('replies'), children: t('events.tabs.discussion', { defaultValue: 'Discussion' }) }), _jsx(TabButton, { active: tab === 'rsvps', onClick: () => setTab('rsvps'), children: t('events.tabs.rsvps', { defaultValue: 'RSVPs' }) }), showJamAttendeesTab ? (_jsx(TabButton, { active: tab === 'attendees', onClick: () => setTab('attendees'), children: t('events.tabs.jamAttendees', { defaultValue: 'Jam attendees' }) })) : null, event.jam && canViewRecordings ? (_jsx(TabButton, { active: tab === 'recordings', onClick: () => setTab('recordings'), children: t('events.tabs.recordings', { defaultValue: 'Recordings' }) })) : null] }), tab === 'description' && event.content ? (_jsx(OpenpeepsMarkdown, { source: event.content, mentions: post.mentions })) : null, tab === 'replies' ? (_jsxs(_Fragment, { children: [_jsx(ReplyBox, { post: post }), contextQuery.isLoading ? (_jsx("div", { className: "text-muted-foreground py-4 text-sm", children: _jsx(LoadingSpinner, {}) })) : (descendentThreads.map((thread) => (_jsx(ThreadedFeed, { thread: thread, isDescendants: true }, thread.id))))] })) : null, tab === 'rsvps' ? (rsvps.length ? (rsvps.map((rsvp) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "min-w-0 flex-1", children: _jsx(ProfileCard, { profile: rsvp.profile, action: profile && profile.id !== rsvp.profile.id ? (_jsxs(PopupMenu, { children: [profile.following?.some((f) => f.id === rsvp.profile.id) ? (_jsx(PopupMenuButton, { title: t('profile.actions.message', {
83
+ }) })] })] })) : null, _jsx(EventLocation, { post: post, preview: false }), _jsx(EventRsvpButton, { post: post }), event.jam && (myEvent || iAmModerator) ? (_jsx(Button, { variant: "default", className: "mt-2 w-full", action: `/events/${post.id}/jam`, children: t('events.jam.start', { defaultValue: 'Start jam' }) })) : null, _jsxs("nav", { "aria-label": t('events.tabs.label', { defaultValue: 'Event sections' }), className: "mt-4 flex flex-wrap gap-2 border-b", children: [event.content ? (_jsx(TabButton, { active: tab === 'description', onClick: () => setTab('description'), children: t('events.tabs.description', { defaultValue: 'Description' }) })) : null, _jsx(TabButton, { active: tab === 'replies', onClick: () => setTab('replies'), children: t('events.tabs.discussion', { defaultValue: 'Discussion' }) }), _jsx(TabButton, { active: tab === 'rsvps', onClick: () => setTab('rsvps'), children: t('events.tabs.rsvps', { defaultValue: 'RSVPs' }) }), showJamAttendeesTab ? (_jsx(TabButton, { active: tab === 'attendees', onClick: () => setTab('attendees'), children: t('events.tabs.jamAttendees', { defaultValue: 'Jam attendees' }) })) : null, event.jam && canViewRecordings ? (_jsx(TabButton, { active: tab === 'recordings', onClick: () => setTab('recordings'), children: t('events.tabs.recordings', { defaultValue: 'Recordings' }) })) : null] }), tab === 'description' && event.content ? (_jsx(OpenpeepsMarkdown, { source: event.content, mentions: post.mentions })) : null, tab === 'replies' ? (_jsxs(_Fragment, { children: [_jsx(ReplyBox, { post: post }), contextQuery.isLoading ? (_jsx("div", { className: "text-muted-foreground py-4 text-sm", children: _jsx(LoadingSpinner, {}) })) : (descendentThreads.map((thread) => (_jsx(ThreadedFeed, { thread: thread, isDescendants: true }, thread.id))))] })) : null, tab === 'rsvps' ? (rsvps.length ? (rsvps.map((rsvp) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "min-w-0 flex-1", children: _jsx(ProfileCard, { profile: rsvp.profile, action: profile && profile.id !== rsvp.profile.id ? (_jsxs(PopupMenu, { children: [profile.following?.some((f) => f.id === rsvp.profile.id) ? (_jsx(PopupMenuButton, { title: t('profile.actions.message', {
84
84
  defaultValue: 'Message',
85
85
  }), text: t('profile.actions.message', {
86
86
  defaultValue: 'Message',
87
87
  }), action: () => openCreateConversation({
88
88
  profiles: [rsvp.profile],
89
89
  skipProfileSelection: true,
90
- }) })) : null, _jsx(FollowUnfollowButton, { profile: rsvp.profile, popup: true })] })) : undefined }) }), canManageRsvps && rsvp.profile.id !== post.profile.id ? (rsvp.response === 'removed' ? (_jsx(Button, { variant: "variant-ringed-primary", action: () => rsvpManage({ response: 'yes' }, { id: post.id, profileId: rsvp.profile.id }), children: t('events.rsvp.restoreAttendee', {
90
+ }) })) : null, _jsx(FollowUnfollowButton, { profile: rsvp.profile, popup: true })] })) : undefined }) }), canManageRsvps && rsvp.profile.id !== post.profile.id ? (rsvp.response === 'removed' ? (_jsx(Button, { variant: "outline", action: () => rsvpManage({ response: 'yes' }, { id: post.id, profileId: rsvp.profile.id }), children: t('events.rsvp.restoreAttendee', {
91
91
  defaultValue: 'Restore',
92
- }) })) : (_jsx(Button, { variant: "variant-ringed-error", action: () => rsvpManage({ response: 'removed' }, { id: post.id, profileId: rsvp.profile.id }), children: t('events.rsvp.removeAttendee', {
92
+ }) })) : (_jsx(Button, { variant: "outline", action: () => rsvpManage({ response: 'removed' }, { id: post.id, profileId: rsvp.profile.id }), children: t('events.rsvp.removeAttendee', {
93
93
  defaultValue: 'Remove',
94
94
  }) }))) : null] }, rsvp.profile.id)))) : (_jsx("p", { className: "text-muted-foreground py-4 text-sm", children: t('events.noRsvps', { defaultValue: 'No RSVPs yet.' }) }))) : null, tab === 'attendees' && showJamAttendeesTab ? (jamAttendeesQuery.data?.length ? (jamAttendeesQuery.data.map((attendee) => (_jsx(ProfileFromId, { profileId: attendee.profileId, action: _jsx(UpdatingDate, { date: attendee.createdAt }) }, attendee.id)))) : (_jsx("p", { className: "text-muted-foreground py-4 text-sm", children: t('events.noAttendees', { defaultValue: 'No attendees yet.' }) }))) : null, tab === 'recordings' && event.jam && canViewRecordings ? (recordingsQuery.isLoading ? (_jsx("div", { className: "text-muted-foreground py-4 text-sm", children: _jsx(LoadingSpinner, {}) })) : recordingsQuery.data?.length ? (recordingsQuery.data.map((recording) => (_jsx(JamRecordingItem, { post: post, recording: recording, canManage: canViewRecordings }, recording.id)))) : (_jsx("p", { className: "text-muted-foreground py-4 text-sm", children: t('events.noRecordings', { defaultValue: 'No recordings yet.' }) }))) : null, _jsx("div", { className: "h-[40vh]" })] }));
95
95
  }
@@ -132,7 +132,7 @@ function JamRecordingItem({ post, recording, canManage, }) {
132
132
  recording.status === 'completed' &&
133
133
  recording.attachment ? (recording.replyPostId ? (_jsx("p", { className: "text-muted-foreground text-sm", children: t('events.recordingReplyPosted', {
134
134
  defaultValue: 'Posted to discussion',
135
- }) })) : (_jsx(Button, { variant: "variant-ringed-primary", className: "self-start", action: async () => {
135
+ }) })) : (_jsx(Button, { variant: "outline", className: "self-start", action: async () => {
136
136
  try {
137
137
  await publishReply();
138
138
  success(t('events.postRecordingReplySuccess', {
@@ -148,13 +148,13 @@ function JamRecordingItem({ post, recording, canManage, }) {
148
148
  defaultValue: 'Post to discussion',
149
149
  }) }))) : null, canManage &&
150
150
  recording.status !== 'active' &&
151
- recording.status !== 'requested' ? (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "variant-ringed-error", className: "self-start", action: () => setConfirmOpen(true), children: [_jsx(Trash2, { className: "mr-1 h-4 w-4" }), t('events.deleteRecording', {
151
+ recording.status !== 'requested' ? (_jsxs(_Fragment, { children: [_jsxs(Button, { variant: "outline", className: "self-start", action: () => setConfirmOpen(true), children: [_jsx(Trash2, { className: "mr-1 h-4 w-4" }), t('events.deleteRecording', {
152
152
  defaultValue: 'Delete recording',
153
153
  })] }), _jsx(Dialog, { open: confirmOpen, onOpenChange: (next) => !next && setConfirmOpen(false), children: _jsxs(DialogContent, { className: "max-w-sm", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t('events.deleteRecording', {
154
154
  defaultValue: 'Delete recording',
155
155
  }) }) }), _jsx("p", { className: "text-sm", children: t('events.deleteRecordingConfirm', {
156
156
  defaultValue: 'Delete this recording permanently?',
157
- }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-surface", action: () => setConfirmOpen(false), children: t('posts.deleteModal.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "variant-filled-error", action: handleDelete, children: t('posts.deleteModal.delete', { defaultValue: 'Delete' }) })] })] }) })] })) : null] })] }));
157
+ }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", action: () => setConfirmOpen(false), children: t('posts.deleteModal.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "destructive", action: handleDelete, children: t('posts.deleteModal.delete', { defaultValue: 'Delete' }) })] })] }) })] })) : null] })] }));
158
158
  }
159
159
  function TabButton({ active, onClick, children, }) {
160
160
  return (_jsx("button", { type: "button", onClick: onClick, className: `px-4 py-2 text-sm ${active ? 'border-primary border-b-2 font-semibold' : 'text-muted-foreground hover:text-foreground'}`, children: children }));
@@ -2,4 +2,4 @@ import type { PublicPost } from '@openpeepshq/common/types';
2
2
  export interface ProfileEventRelationshipProps {
3
3
  post: PublicPost;
4
4
  }
5
- export declare function ProfileEventRelationship({ post, }: ProfileEventRelationshipProps): import("react/jsx-runtime").JSX.Element | null;
5
+ export declare const ProfileEventRelationship: ({ post, }: ProfileEventRelationshipProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,31 +1,51 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { calculateEffectiveRsvps } from '@openpeepshq/common/lib';
3
+ import { Badge } from '@openpeepshq/react-ui';
3
4
  import { useT } from '../../../../i18n/index.js';
4
5
  import { useCurrentProfile } from '../../../layout/IdentityContext.js';
5
- export function ProfileEventRelationship({ post, }) {
6
+ export const ProfileEventRelationship = ({ post, }) => {
6
7
  const t = useT();
7
8
  const me = useCurrentProfile();
8
9
  const event = post.data;
9
10
  const myEvent = post.profile?.id === me?.id;
10
11
  const iAmModerator = !!event.moderators?.includes(me?.id ?? '');
11
12
  const myRsvp = calculateEffectiveRsvps(post).find((rsvp) => me?.id === rsvp.profile.id);
12
- if (myEvent) {
13
- return (_jsx("div", { className: "text-muted-foreground rounded-2xl px-2", children: _jsx("span", { className: "text-background text-center text-sm", children: t('events.profileRelationship.owner', { defaultValue: 'Owner' }) }) }));
14
- }
15
- if (iAmModerator) {
16
- return (_jsx("div", { className: "text-muted-foreground rounded-2xl px-2", children: _jsx("span", { className: "text-center text-sm", children: t('events.profileRelationship.moderator', {
13
+ const badge = (() => {
14
+ if (myEvent) {
15
+ return {
16
+ status: t('events.profileRelationship.owner', {
17
+ defaultValue: 'Owner',
18
+ }),
19
+ variant: 'default',
20
+ };
21
+ }
22
+ if (iAmModerator) {
23
+ return {
24
+ status: t('events.profileRelationship.moderator', {
17
25
  defaultValue: 'Moderator',
18
- }) }) }));
19
- }
20
- if (myRsvp?.response === 'yes') {
21
- return (_jsx("div", { className: "text-muted-foreground rounded-2xl px-2", children: _jsx("span", { className: "text-foreground text-center text-sm", children: t('events.profileRelationship.attending', {
26
+ }),
27
+ variant: 'default',
28
+ };
29
+ }
30
+ if (myRsvp?.response === 'yes') {
31
+ return {
32
+ status: t('events.profileRelationship.attending', {
22
33
  defaultValue: 'Attending',
23
- }) }) }));
24
- }
25
- if (myRsvp?.response === 'tentative') {
26
- return (_jsx("div", { className: "text-muted-foreground rounded-2xl px-2", children: _jsx("span", { className: "text-foreground text-center text-sm", children: t('events.profileRelationship.tentative', {
34
+ }),
35
+ variant: 'success',
36
+ };
37
+ }
38
+ if (myRsvp?.response === 'tentative') {
39
+ return {
40
+ status: t('events.profileRelationship.tentative', {
27
41
  defaultValue: 'Tentative',
28
- }) }) }));
29
- }
30
- return null;
31
- }
42
+ }),
43
+ variant: 'outline',
44
+ };
45
+ }
46
+ return null;
47
+ })();
48
+ if (!badge)
49
+ return null;
50
+ return _jsx(Badge, { status: badge.status, variant: badge.variant });
51
+ };
@@ -8,5 +8,5 @@ export function LocalPreviewLink({ url }) {
8
8
  const isPost = isPostPath(path);
9
9
  const isJam = isJamPath(path);
10
10
  const isGroup = isGroupPath(path);
11
- return (_jsxs("a", { href: url, className: "hover:bg-surface-100 mb-2 block w-full min-w-0 max-w-full overflow-hidden rounded-md border p-3 no-underline", onClick: (e) => e.stopPropagation(), children: [isPost ? _jsx(PostPreview, { path: path }) : null, isGroup ? _jsx(GroupPreview, { path: path }) : null, isJam ? _jsx(JamPreview, { path: path }) : null] }));
11
+ return (_jsxs("a", { href: url, className: "hover:bg-surface mb-2 block w-full min-w-0 max-w-full overflow-hidden rounded-md border p-3 no-underline", onClick: (e) => e.stopPropagation(), children: [isPost ? _jsx(PostPreview, { path: path }) : null, isGroup ? _jsx(GroupPreview, { path: path }) : null, isJam ? _jsx(JamPreview, { path: path }) : null] }));
12
12
  }
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { LoadingSpinner } from '@openpeepshq/react-ui';
3
3
  import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
4
+ import { recordOutboundClick } from '../../lib/analyticsClicks.js';
4
5
  export function RemotePreviewLink({ url }) {
5
6
  const { openpeepsApi } = useOpenpeeps();
6
7
  const previewQuery = openpeepsApi.usePreviewLink(url);
@@ -17,5 +18,8 @@ export function RemotePreviewLink({ url }) {
17
18
  catch {
18
19
  /* keep url */
19
20
  }
20
- return (_jsx("a", { href: url, target: "_blank", rel: "noreferrer", className: "hover:bg-surface-100 mb-2 block w-full min-w-0 max-w-full overflow-hidden rounded-md border no-underline", onClick: (e) => e.stopPropagation(), children: _jsxs("div", { className: "flex w-full min-w-0 flex-row items-center gap-4 p-2", children: [data.image ? (_jsx("div", { className: "flex h-24 w-24 shrink-0 items-center justify-center", children: _jsx("img", { src: data.image, alt: data.title ?? '', className: "h-full w-full rounded-md object-cover" }) })) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [_jsx("p", { className: "text-muted-foreground truncate text-xs", children: hostname }), data.title ? (_jsx("p", { className: "truncate font-semibold", children: data.title })) : null, data.description ? (_jsx("p", { className: "text-muted-foreground truncate text-sm", children: data.description })) : null] })] }) }));
21
+ return (_jsx("a", { href: url, target: "_blank", rel: "noreferrer", className: "hover:bg-surface mb-2 block w-full min-w-0 max-w-full overflow-hidden rounded-md border no-underline", onClick: (e) => {
22
+ e.stopPropagation();
23
+ recordOutboundClick(url);
24
+ }, children: _jsxs("div", { className: "flex w-full min-w-0 flex-row items-center gap-4 p-2", children: [data.image ? (_jsx("div", { className: "flex h-24 w-24 shrink-0 items-center justify-center", children: _jsx("img", { src: data.image, alt: data.title ?? '', className: "h-full w-full rounded-md object-cover" }) })) : null, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [_jsx("p", { className: "text-muted-foreground truncate text-xs", children: hostname }), data.title ? (_jsx("p", { className: "truncate font-semibold", children: data.title })) : null, data.description ? (_jsx("p", { className: "text-muted-foreground truncate text-sm", children: data.description })) : null] })] }) }));
21
25
  }
@@ -3,6 +3,7 @@ import { getTheme, isDeletedProfile } from '@openpeepshq/common';
3
3
  import { UserX } from 'lucide-react';
4
4
  import { useServerInfo } from '../server-data/index.js';
5
5
  import { useCurrentProfileSettings } from '../layout/IdentityContext.js';
6
+ import { svgCoverSrc } from '../../lib/svgCover.js';
6
7
  const initials = (profile) => {
7
8
  const name = profile?.displayName || profile?.handle || '?';
8
9
  const parts = name.split(' ');
@@ -26,8 +27,8 @@ export function Avatar({ profile, size = 3.5, borderless = false, containerClass
26
27
  const iconSize = Math.max(12, size * 8);
27
28
  const borderClass = borderless
28
29
  ? ''
29
- : 'border-4 border-surface-300 hover:border-neutral-500';
30
- const inner = (_jsx("div", { className: `bg-surface-200 relative inline-flex items-center justify-center overflow-hidden rounded-full ${borderClass}`, style: { width: `${size}rem`, height: `${size}rem` }, children: deleted ? (_jsx(UserX, { "aria-label": profile?.displayName || 'Deleted author', className: "text-muted-foreground", size: iconSize })) : src ? (_jsx("img", { src: src, alt: profile?.displayName || profile?.handle || 'avatar', className: "h-full w-full rounded-full object-cover" })) : (_jsx("span", { className: "text-foreground/80 text-sm font-medium", children: initials(profile) })) }));
30
+ : 'border-4 border-border hover:border-neutral-500';
31
+ const inner = (_jsx("div", { className: `bg-surface-2 relative inline-flex items-center justify-center overflow-hidden rounded-full ${borderClass}`, style: { width: `${size}rem`, height: `${size}rem` }, children: deleted ? (_jsx(UserX, { "aria-label": profile?.displayName || 'Deleted author', className: "text-muted-foreground", size: iconSize })) : src ? (_jsx("img", { src: svgCoverSrc(src), alt: profile?.displayName || profile?.handle || 'avatar', className: "h-full w-full rounded-full object-cover" })) : (_jsx("span", { className: "text-foreground/80 text-sm font-medium", children: initials(profile) })) }));
31
32
  return (_jsx("div", { className: containerClassName, style: {
32
33
  width: `${size}rem`,
33
34
  height: `${size}rem`,
@@ -21,7 +21,7 @@ export function FollowUnfollowButton({ profile, compact = false, popup = false,
21
21
  return (_jsx(PopupMenuButton, { title: t('profile.actions.follow', { defaultValue: 'Follow' }), text: t('profile.actions.follow', { defaultValue: 'Follow' }), action: () => followProfile({ reblogs: true, notify: true }) }));
22
22
  }
23
23
  if (isFollowing) {
24
- return (_jsx(Button, { compact: compact, variant: "variant-ringed-secondary", action: () => unfollowProfile(undefined), children: t('profile.actions.unfollow', { defaultValue: 'Unfollow' }) }));
24
+ return (_jsx(Button, { compact: compact, variant: "outline", action: () => unfollowProfile(undefined), children: t('profile.actions.unfollow', { defaultValue: 'Unfollow' }) }));
25
25
  }
26
- return (_jsx(Button, { compact: compact, variant: "variant-filled-primary", action: () => followProfile({ reblogs: true, notify: true }), children: t('profile.actions.follow', { defaultValue: 'Follow' }) }));
26
+ return (_jsx(Button, { compact: compact, variant: "default", action: () => followProfile({ reblogs: true, notify: true }), children: t('profile.actions.follow', { defaultValue: 'Follow' }) }));
27
27
  }
@@ -5,7 +5,7 @@ import { useT } from '../../i18n/index.js';
5
5
  import { Avatar } from './Avatar.js';
6
6
  export const ProfileBadge = ({ profile, onRemove, className, }) => {
7
7
  const t = useT();
8
- return (_jsxs("div", { className: `border-secondary bg-surface-50 text-primary flex items-center gap-1.5 rounded-md border px-2 py-1 text-sm ${className ?? ''}`, children: [_jsx(Avatar, { profile: profile, size: 0.75, borderless: true }), _jsx("span", { className: "max-w-40 truncate font-medium", children: profileName(profile) }), onRemove ? (_jsx("button", { type: "button", className: "hover:bg-secondary ml-0.5 rounded-full p-0.5 transition-colors", title: t('profile.selector.remove', { defaultValue: 'Remove' }), onClick: (e) => {
8
+ return (_jsxs("div", { className: `border-secondary bg-background text-primary flex items-center gap-1.5 rounded-md border px-2 py-1 text-sm ${className ?? ''}`, children: [_jsx(Avatar, { profile: profile, size: 0.75, borderless: true }), _jsx("span", { className: "max-w-40 truncate font-medium", children: profileName(profile) }), onRemove ? (_jsx("button", { type: "button", className: "hover:bg-secondary ml-0.5 rounded-full p-0.5 transition-colors", title: t('profile.selector.remove', { defaultValue: 'Remove' }), onClick: (e) => {
9
9
  e.stopPropagation();
10
10
  onRemove();
11
11
  }, children: _jsx(X, { className: "size-3" }) })) : null] }));
@@ -8,5 +8,5 @@ import { FollowUnfollowButton } from './FollowUnfollowButton.js';
8
8
  */
9
9
  export function ProfileCard({ profile, onSelect, showAction = true, action, }) {
10
10
  const details = (_jsxs(_Fragment, { children: [_jsx(Avatar, { profile: profile, size: 3 }), _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-sm font-semibold", children: profile.displayName || `@${profile.handle}` }), _jsxs("span", { className: "text-muted-foreground truncate text-xs", children: ["@", profile.handle] }), profile.bio && (_jsx("span", { className: "text-muted-foreground mt-1 line-clamp-2 text-sm", children: profile.bio }))] })] }));
11
- return (_jsxs("div", { className: "hover:bg-surface-100 flex items-center justify-between gap-3 border-b p-4", children: [onSelect ? (_jsx("button", { type: "button", onClick: () => onSelect(profile), className: "flex min-w-0 flex-1 items-center gap-3 text-left", children: details })) : (_jsx("a", { href: `/@${profile.handle}`, className: "flex min-w-0 flex-1 items-center gap-3", children: details })), action ? (_jsx("div", { className: "flex-shrink-0", children: action })) : showAction ? (_jsx("div", { className: "flex-shrink-0", children: _jsx(FollowUnfollowButton, { profile: profile, compact: true }) })) : null] }));
11
+ return (_jsxs("article", { className: "hover:bg-surface flex items-center justify-between gap-3 border-b p-4", children: [onSelect ? (_jsx("button", { type: "button", onClick: () => onSelect(profile), className: "flex min-w-0 flex-1 items-center gap-3 text-left", children: details })) : (_jsx("a", { href: `/@${profile.handle}`, className: "flex min-w-0 flex-1 items-center gap-3", children: details })), action ? (_jsx("div", { className: "flex-shrink-0", children: action })) : showAction ? (_jsx("div", { className: "flex-shrink-0", children: _jsx(FollowUnfollowButton, { profile: profile, compact: true }) })) : null] }));
12
12
  }
@@ -12,5 +12,5 @@ import { ProfileStats } from './ProfileStats.js';
12
12
  */
13
13
  export function ProfileHeader({ profile, isCurrentProfile = false, }) {
14
14
  const t = useT();
15
- return (_jsx("div", { className: "relative", children: _jsxs("div", { className: "mb-8", children: [_jsxs("div", { className: "relative aspect-[3/1] w-full", children: [_jsx("div", { className: "bg-surface-200 absolute inset-0 overflow-hidden", children: profile.header && (_jsx("img", { src: profile.header, alt: "banner", className: "h-full w-full object-cover" })) }), _jsx(Avatar, { profile: profile, size: 6, containerClassName: "absolute -bottom-12 left-4", borderless: true })] }), _jsx(ProfilePageAction, { profile: profile, isCurrentProfile: isCurrentProfile }), _jsxs("div", { className: "p-2", children: [_jsx("h1", { className: "mt-4 text-base font-semibold", "data-testid": "profile-header-title", children: truncateText(profile.displayName || profile.handle, 50) }), _jsxs("span", { className: "text-surface-500 my-1 text-sm font-normal", children: ["@", profile.handle] }), _jsx(PostMarkdown, { source: profile.bio || t('profile.noBio', { defaultValue: '' }) }), profile.location?.text && (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "input-group-shim", children: _jsx(MapPin, { className: "size-3" }) }), _jsx("p", { children: profile.location.text })] })), _jsx(ProfileStats, { profile: profile }), (profile.fields ?? []).map((field) => (_jsxs("div", { className: "mt-4 flex items-center gap-2", children: [_jsx("span", { className: "text-surface-500 text-sm", children: field.name }), _jsx(PostMarkdown, { source: field.value, className: "pt-1 text-sm" })] }, field.name)))] })] }) }));
15
+ return (_jsx("div", { className: "relative", children: _jsxs("div", { className: "mb-8", children: [_jsxs("div", { className: "relative aspect-[3/1] w-full", children: [_jsx("div", { className: "bg-surface-2 absolute inset-0 overflow-hidden", children: profile.header && (_jsx("img", { src: profile.header, alt: "banner", className: "h-full w-full object-cover" })) }), _jsx(Avatar, { profile: profile, size: 6, containerClassName: "absolute -bottom-12 left-4", borderless: true })] }), _jsx(ProfilePageAction, { profile: profile, isCurrentProfile: isCurrentProfile }), _jsxs("div", { className: "p-2", children: [_jsx("h1", { className: "mt-4 text-base font-semibold", "data-testid": "profile-header-title", children: truncateText(profile.displayName || profile.handle, 50) }), _jsxs("span", { className: "text-muted-foreground my-1 text-sm font-normal", children: ["@", profile.handle] }), _jsx(PostMarkdown, { source: profile.bio || t('profile.noBio', { defaultValue: '' }) }), profile.location?.text && (_jsxs("div", { className: "flex items-center gap-1", children: [_jsx("span", { className: "input-group-shim", children: _jsx(MapPin, { className: "size-3" }) }), _jsx("p", { children: profile.location.text })] })), _jsx(ProfileStats, { profile: profile }), (profile.fields ?? []).map((field) => (_jsxs("div", { className: "mt-4 flex items-center gap-2", children: [_jsx("span", { className: "text-muted-foreground text-sm", children: field.name }), _jsx(PostMarkdown, { source: field.value, className: "pt-1 text-sm" })] }, field.name)))] })] }) }));
16
16
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState } from 'react';
3
3
  import { Copy, Flag, MessageSquareText } from 'lucide-react';
4
4
  import { canCreatePost } from '@openpeepshq/common/lib';
5
- import { Button, PopupMenu, PopupMenuButton, } from '@openpeepshq/react-ui';
5
+ import { Button, PopupMenu, PopupMenuButton } from '@openpeepshq/react-ui';
6
6
  import { useT } from '../../i18n/index.js';
7
7
  import { useAuthData, useCurrentProfile } from '../layout/IdentityContext.js';
8
8
  import { useCreateNewConversation } from '../conversations/CreateNewConversationContext.js';
@@ -14,7 +14,7 @@ export function ProfilePageAction({ profile, isCurrentProfile = false, }) {
14
14
  const authData = useAuthData();
15
15
  const { openCreateConversation } = useCreateNewConversation();
16
16
  const [reportOpen, setReportOpen] = useState(false);
17
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-2 flex h-6 items-center justify-end gap-x-2 pr-2 pt-3", children: isCurrentProfile ? (_jsx(Button, { variant: "variant-ringed-surface", action: "/settings/public-profile", children: t('profile.edit.title', { defaultValue: 'Edit profile' }) })) : me ? (_jsxs(_Fragment, { children: [_jsxs(PopupMenu, { menuButton: _jsx("span", { className: "text-muted-foreground px-2 text-sm", children: "\u22EF" }), title: t('profile.actions.menu', {
17
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "mt-2 flex h-6 items-center justify-end gap-x-2 pr-2 pt-3", children: isCurrentProfile ? (_jsx(Button, { variant: "outline", action: "/settings/public-profile", children: t('profile.edit.title', { defaultValue: 'Edit profile' }) })) : me ? (_jsxs(_Fragment, { children: [_jsxs(PopupMenu, { menuButton: _jsx("span", { className: "text-muted-foreground px-2 text-sm", children: "\u22EF" }), title: t('profile.actions.menu', {
18
18
  defaultValue: 'Profile actions',
19
19
  }), children: [_jsx(PopupMenuButton, { title: t('profile.actions.copyProfileLink', {
20
20
  defaultValue: 'Copy profile link',
@@ -26,7 +26,7 @@ export function ProfilePageAction({ profile, isCurrentProfile = false, }) {
26
26
  }), text: t('common.actions.reportProfile', {
27
27
  defaultValue: 'Report @{{handle}}',
28
28
  handle: profile.handle,
29
- }), icon: Flag, action: () => setReportOpen(true), danger: true })] }), canCreatePost(authData, 'note', 'direct') ? (_jsx(Button, { variant: "variant-ringed-surface", title: t('conversations.newMessage', {
29
+ }), icon: Flag, action: () => setReportOpen(true), danger: true })] }), canCreatePost(authData, 'note', 'direct') ? (_jsx(Button, { variant: "outline", title: t('conversations.newMessage', {
30
30
  defaultValue: 'New message',
31
31
  }), action: () => openCreateConversation({
32
32
  profiles: [profile],
@@ -18,7 +18,9 @@ export function ProfilePostsAndReplies({ profile, }) {
18
18
  const postsQuery = openpeepsApi.usePostsByProfile(profile.id);
19
19
  const commonGroupsQuery = openpeepsApi.useCommonGroups(profile.id);
20
20
  const [tab, setTab] = useState('posts');
21
- return (_jsxs("div", { children: [_jsxs("div", { className: "border-b flex", children: [_jsx("button", { type: "button", className: `flex-1 px-4 py-3 text-sm font-medium ${tab === 'posts' ? 'border-primary border-b-2' : 'text-muted-foreground'}`, onClick: () => setTab('posts'), children: t('profile.posts', { defaultValue: 'Posts' }) }), _jsx("button", { type: "button", className: `flex-1 px-4 py-3 text-sm font-medium ${tab === 'groups' ? 'border-primary border-b-2' : 'text-muted-foreground'}`, onClick: () => setTab('groups'), children: t('profile.groups.tabName', { defaultValue: 'Groups' }) })] }), tab === 'posts' ? (_jsx(Feed, { query: postsQuery })) : (_jsxs(AccessDeniedLoader, { queries: [commonGroupsQuery], children: [(commonGroupsQuery.data ?? []).map((group) => (_jsx(GroupCard, { group: group, onSelect: () => navigate(`/groups/@${group.handle}`) }, group.id))), !commonGroupsQuery.data?.length ? (_jsxs("div", { className: "flex h-[60vh] w-full flex-col items-center justify-center gap-y-6", children: [_jsx(Users, { size: 60 }), _jsx("p", { children: t('profile.groups.noCommonGroups', {
21
+ return (_jsxs("div", { children: [_jsxs("nav", { "aria-label": t('profile.tabs.label', {
22
+ defaultValue: 'Profile sections',
23
+ }), className: "flex border-b", children: [_jsx("button", { type: "button", className: `flex-1 px-4 py-3 text-sm font-medium ${tab === 'posts' ? 'border-primary border-b-2' : 'text-muted-foreground'}`, onClick: () => setTab('posts'), children: t('profile.posts', { defaultValue: 'Posts' }) }), _jsx("button", { type: "button", className: `flex-1 px-4 py-3 text-sm font-medium ${tab === 'groups' ? 'border-primary border-b-2' : 'text-muted-foreground'}`, onClick: () => setTab('groups'), children: t('profile.groups.tabName', { defaultValue: 'Groups' }) })] }), tab === 'posts' ? (_jsx(Feed, { query: postsQuery })) : (_jsxs(AccessDeniedLoader, { queries: [commonGroupsQuery], children: [(commonGroupsQuery.data ?? []).map((group) => (_jsx(GroupCard, { group: group, onSelect: () => navigate({ type: 'group', handle: group.handle }) }, group.id))), !commonGroupsQuery.data?.length ? (_jsxs("div", { className: "flex h-[60vh] w-full flex-col items-center justify-center gap-y-6", children: [_jsx(Users, { size: 60 }), _jsx("p", { children: t('profile.groups.noCommonGroups', {
22
24
  defaultValue: 'No groups in common',
23
25
  }) })] })) : null] }))] }));
24
26
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useState } from 'react';
3
3
  import { Check, Search } from 'lucide-react';
4
- import { matchesQuery, profileName, sortProfiles } from '@openpeepshq/common/lib';
4
+ import { matchesQuery, profileName, sortProfiles, } from '@openpeepshq/common/lib';
5
5
  import { Button, Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, } from '@openpeepshq/react-ui';
6
6
  import { useOpenpeeps } from '../../contexts/openpeeps/index.js';
7
7
  import { useT } from '../../i18n/index.js';
@@ -67,6 +67,6 @@ export const ProfileSelector = ({ open, onOpenChange, mode, selectedProfiles, on
67
67
  const selected = mode === 'single'
68
68
  ? profile.id === singleSelectionId || isSelected(profile.id)
69
69
  : isSelected(profile.id);
70
- return (_jsxs("button", { type: "button", className: `hover:bg-surface-100 flex w-full items-center gap-3 rounded-md p-2 text-left ${selected ? 'bg-secondary/40' : ''}`, onClick: () => toggleProfile(profile), children: [_jsx(Avatar, { profile: profile, size: 2.5, borderless: true }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-sm font-medium", children: profileName(profile) }), profile.handle ? (_jsxs("span", { className: "text-muted-foreground block truncate text-xs", children: ["@", profile.handle] })) : null] }), selected ? (_jsx(Check, { className: "text-primary size-4 shrink-0" })) : null] }, profile.id));
71
- }))) : null }), mode === 'multiple' ? (_jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-surface", action: () => onOpenChange(false), children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "variant-filled-primary", action: confirmMultiple, children: t('profile.selector.confirm', { defaultValue: 'OK' }) })] })) : null] }) }));
70
+ return (_jsxs("button", { type: "button", className: `hover:bg-surface rounded-button flex w-full items-center gap-3 p-2 text-left ${selected ? 'bg-secondary/40' : ''}`, onClick: () => toggleProfile(profile), children: [_jsx(Avatar, { profile: profile, size: 2.5, borderless: true }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block truncate text-sm font-medium", children: profileName(profile) }), profile.handle ? (_jsxs("span", { className: "text-muted-foreground block truncate text-xs", children: ["@", profile.handle] })) : null] }), selected ? (_jsx(Check, { className: "text-primary size-4 shrink-0" })) : null] }, profile.id));
71
+ }))) : null }), mode === 'multiple' ? (_jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", action: () => onOpenChange(false), children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "default", action: confirmMultiple, children: t('profile.selector.confirm', { defaultValue: 'OK' }) })] })) : null] }) }));
72
72
  };
@@ -10,7 +10,7 @@ export const ProfilesInput = ({ value, onChange, mode = 'multiple', placeholder,
10
10
  const removeProfile = (profileId) => {
11
11
  onChange(value.filter((profile) => profile.id !== profileId));
12
12
  };
13
- return (_jsxs(_Fragment, { children: [_jsx("div", { role: "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled, className: `border-surface-300 bg-surface-200 flex max-h-40 min-h-10 w-full flex-wrap content-start items-center gap-1 overflow-y-auto rounded-lg border px-3 py-1.5 text-left ${disabled ? 'cursor-not-allowed opacity-60' : 'cursor-pointer'} ${className ?? ''}`, onClick: () => {
13
+ return (_jsxs(_Fragment, { children: [_jsx("div", { role: "button", tabIndex: disabled ? -1 : 0, "aria-disabled": disabled, className: `border-border bg-surface-2 flex max-h-40 min-h-10 w-full flex-wrap content-start items-center gap-1 overflow-y-auto rounded-lg border px-3 py-1.5 text-left ${disabled ? 'cursor-not-allowed opacity-60' : 'cursor-pointer'} ${className ?? ''}`, onClick: () => {
14
14
  if (!disabled)
15
15
  setOpen(true);
16
16
  }, onKeyDown: (e) => {
@@ -58,18 +58,20 @@ export function ReportProfileOrPostModal({ reportType, profile, post, open, onCl
58
58
  defaultValue: 'Report @{{handle}}',
59
59
  handle: profile?.handle,
60
60
  })
61
- : t('reports.create.post.title', { defaultValue: 'Report post' }) }) }), step === 1 ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-sm text-muted-foreground", children: t(`reports.create.${reportType}.description`, {
61
+ : t('reports.create.post.title', { defaultValue: 'Report post' }) }) }), step === 1 ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-muted-foreground text-sm", children: t(`reports.create.${reportType}.description`, {
62
62
  defaultValue: 'Help moderators understand what is wrong.',
63
63
  }) }), _jsx("div", { className: "space-y-2 py-2", children: categories.map((item) => (_jsxs("label", { className: "flex cursor-pointer items-center gap-2", children: [_jsx("input", { type: "radio", name: "category", checked: category === item.value, onChange: () => setCategory(item.value) }), _jsx("span", { className: "text-sm", children: item.label })] }, item.value))) }), _jsx(Textarea, { rows: 4, value: comment, onChange: (e) => setComment(e.target.value), placeholder: t(`reports.create.${reportType}.anythingElse`, {
64
64
  defaultValue: 'Anything else we should know?',
65
- }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-surface", action: onClose, children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "variant-filled-primary", action: () => setStep(2), children: t(`reports.create.${reportType}.continue`, {
65
+ }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", action: onClose, children: t('common.cancel', { defaultValue: 'Cancel' }) }), _jsx(Button, { variant: "default", action: () => setStep(2), children: t(`reports.create.${reportType}.continue`, {
66
66
  defaultValue: 'Continue',
67
67
  }) })] })] })) : (_jsxs(_Fragment, { children: [_jsx("h3", { className: "font-semibold", children: t(`reports.create.${reportType}.confirmMessageHeading`, {
68
68
  defaultValue: 'Send report?',
69
69
  handle: profile?.handle ?? post?.profile.handle,
70
- }) }), reportType === 'profile' ? (_jsx("p", { className: "text-sm text-muted-foreground", children: t('reports.create.profile.confirmMessageDescription', {
70
+ }) }), reportType === 'profile' ? (_jsx("p", { className: "text-muted-foreground text-sm", children: t('reports.create.profile.confirmMessageDescription', {
71
71
  defaultValue: 'Moderators at {{community}} will review this report.',
72
72
  handle: profile?.handle,
73
73
  community: communityName,
74
- }) })) : null, _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "variant-ringed-surface", action: () => setStep(1), children: t('reports.create.back', { defaultValue: 'Back' }) }), _jsx(Button, { variant: "variant-filled-error", action: submit, disabled: submitting, children: t('reports.create.sendReport', { defaultValue: 'Send report' }) })] })] }))] }) }));
74
+ }) })) : null, _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", action: () => setStep(1), children: t('reports.create.back', { defaultValue: 'Back' }) }), _jsx(Button, { variant: "destructive", action: submit, disabled: submitting, children: t('reports.create.sendReport', {
75
+ defaultValue: 'Send report',
76
+ }) })] })] }))] }) }));
75
77
  }
@@ -11,6 +11,10 @@ export declare const useServerInfo: () => {
11
11
  primaryHex: string;
12
12
  light: {
13
13
  primaryHex: string;
14
+ secondaryHex?: string | undefined;
15
+ fontFamily?: string | undefined;
16
+ buttonRadius?: string | undefined;
17
+ radius?: string | undefined;
14
18
  logoSmall?: string | undefined;
15
19
  defaultProfileAvatar?: string | undefined;
16
20
  defaultGroupAvatar?: string | undefined;
@@ -19,6 +23,10 @@ export declare const useServerInfo: () => {
19
23
  };
20
24
  dark: {
21
25
  primaryHex: string;
26
+ secondaryHex?: string | undefined;
27
+ fontFamily?: string | undefined;
28
+ buttonRadius?: string | undefined;
29
+ radius?: string | undefined;
22
30
  logoSmall?: string | undefined;
23
31
  defaultProfileAvatar?: string | undefined;
24
32
  defaultGroupAvatar?: string | undefined;